@cntrl-site/components 1.0.77 → 1.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),yt=require("classnames"),D=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Vn=require("react-dom");function Ou(e){return e.type==="object"&&e.version===1}const Du="ControlSlider-module__wrapper___sHEkd",ju="ControlSlider-module__hoverArrow___A-dOH",zu="ControlSlider-module__sliderItem___QQSkR",Bu="ControlSlider-module__sliderImage___9hRl-",Vu="ControlSlider-module__arrow___05ghY",Gu="ControlSlider-module__arrowVertical___tBfVN",qu="ControlSlider-module__nextArrow___-30Yc",Xu="ControlSlider-module__arrowInner___aEra3",Uu="ControlSlider-module__arrowIcon___S4ztF",Yu="ControlSlider-module__arrowImg___2dwJW",Ku="ControlSlider-module__mirror___brd6U",Zu="ControlSlider-module__pagination___bicLF",Ju="ControlSlider-module__paginationInner___bT-P-",Qu="ControlSlider-module__paginationVertical___zYqKw",ep="ControlSlider-module__paginationItem___nTRbk",tp="ControlSlider-module__dot___p1Qun",np="ControlSlider-module__activeDot___LHFaj",ip="ControlSlider-module__paginationInsideBottom___R3FWn",op="ControlSlider-module__paginationInsideTop___V-qb-",rp="ControlSlider-module__paginationOutsideBottom___14w8D",ap="ControlSlider-module__paginationOutsideTop___SCLqB",sp="ControlSlider-module__paginationInsideLeft___yOBRZ",lp="ControlSlider-module__paginationInsideRight___Rtt3o",cp="ControlSlider-module__paginationOutsideLeft___lahaw",dp="ControlSlider-module__paginationOutsideRight___EtuQa",up="ControlSlider-module__imgWrapper___UjEgB",pp="ControlSlider-module__captionBlock___dJ6-j",mp="ControlSlider-module__captionTextWrapper___HFlpf",gp="ControlSlider-module__captionText___uGBVc",hp="ControlSlider-module__active___WZK4G",fp="ControlSlider-module__withPointerEvents___t-18M",yp="ControlSlider-module__topLeftAlignment___zjnGM",vp="ControlSlider-module__topCenterAlignment___gD1xW",xp="ControlSlider-module__topRightAlignment___NMapS",bp="ControlSlider-module__middleLeftAlignment___OnUrY",wp="ControlSlider-module__middleCenterAlignment___Tdkl0",Sp="ControlSlider-module__middleRightAlignment___wEbfX",$p="ControlSlider-module__bottomLeftAlignment___cTP2-",Cp="ControlSlider-module__bottomCenterAlignment___c54fB",Tp="ControlSlider-module__bottomRightAlignment___kEwrz",Lp="ControlSlider-module__clickOverlay___DZA28",Rp="ControlSlider-module__contain___pLyq7",Ip="ControlSlider-module__cover___KdDat",ht={wrapper:Du,hoverArrow:ju,sliderItem:zu,sliderImage:Bu,arrow:Vu,arrowVertical:Gu,nextArrow:qu,arrowInner:Xu,arrowIcon:Uu,arrowImg:Yu,mirror:Ku,pagination:Zu,paginationInner:Ju,paginationVertical:Qu,paginationItem:ep,dot:tp,activeDot:np,paginationInsideBottom:ip,paginationInsideTop:op,paginationOutsideBottom:rp,paginationOutsideTop:ap,paginationInsideLeft:sp,paginationInsideRight:lp,paginationOutsideLeft:cp,paginationOutsideRight:dp,imgWrapper:up,captionBlock:pp,captionTextWrapper:mp,captionText:gp,active:hp,withPointerEvents:fp,topLeftAlignment:yp,topCenterAlignment:vp,topRightAlignment:xp,middleLeftAlignment:bp,middleCenterAlignment:wp,middleRightAlignment:Sp,bottomLeftAlignment:$p,bottomCenterAlignment:Cp,bottomRightAlignment:Tp,clickOverlay:Lp,contain:Rp,cover:Ip};function Ep(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mp(e,t,n){return t&&Ep(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var sl="(prefers-reduced-motion: reduce)",ji=1,Pp=2,Ki=3,uo=4,Go=5,Er=6,Wr=7,kp={CREATED:ji,MOUNTED:Pp,IDLE:Ki,MOVING:uo,SCROLLING:Go,DRAGGING:Er,DESTROYED:Wr};function zn(e){e.length=0}function ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ut(e){return e.bind.apply(e,[null].concat(ai(arguments,1)))}var Qc=setTimeout,Za=function(){};function ll(e){return requestAnimationFrame(e)}function Yr(e,t){return typeof t===e}function ko(e){return!Ts(e)&&Yr("object",e)}var Cs=Array.isArray,ed=Ut(Yr,"function"),ti=Ut(Yr,"string"),qo=Ut(Yr,"undefined");function Ts(e){return e===null}function td(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Xo(e){return Cs(e)?e:[e]}function bn(e,t){Xo(e).forEach(t)}function Ls(e,t){return e.indexOf(t)>-1}function Mr(e,t){return e.push.apply(e,Xo(t)),e}function Nn(e,t,n){e&&bn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Pn(e,t){Nn(e,ti(t)?t.split(" "):t,!0)}function Uo(e,t){bn(t,e.appendChild.bind(e))}function Rs(e,t){bn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ao(e,t){return td(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function nd(e,t){var n=e?ai(e.children):[];return t?n.filter(function(i){return Ao(i,t)}):n}function Yo(e,t){return t?nd(e,t)[0]:e.firstElementChild}var Fo=Object.keys;function $i(e,t,n){return e&&(n?Fo(e).reverse():Fo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function _o(e){return ai(arguments,1).forEach(function(t){$i(t,function(n,i){e[i]=t[i]})}),e}function Kn(e){return ai(arguments,1).forEach(function(t){$i(t,function(n,i){Cs(n)?e[i]=n.slice():ko(n)?e[i]=Kn({},ko(e[i])?e[i]:{},n):e[i]=n})}),e}function cl(e,t){bn(t||Fo(e),function(n){delete e[n]})}function kn(e,t){bn(e,function(n){bn(t,function(i){n&&n.removeAttribute(i)})})}function Ct(e,t,n){ko(t)?$i(t,function(i,o){Ct(e,o,i)}):bn(e,function(i){Ts(n)||n===""?kn(i,t):i.setAttribute(t,String(n))})}function Gi(e,t,n){var i=document.createElement(e);return t&&(ti(t)?Pn(i,t):Ct(i,t)),n&&Uo(n,i),i}function Sn(e,t,n){if(qo(n))return getComputedStyle(e)[t];Ts(n)||(e.style[t]=""+n)}function Wo(e,t){Sn(e,"display",t)}function id(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function $n(e,t){return e.getAttribute(t)}function dl(e,t){return e&&e.classList.contains(t)}function fn(e){return e.getBoundingClientRect()}function Ti(e){bn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function od(e){return Yo(new DOMParser().parseFromString(e,"text/html").body)}function Wn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function rd(e,t){return e&&e.querySelector(t)}function Is(e,t){return t?ai(e.querySelectorAll(t)):[]}function Hn(e,t){Nn(e,t,!1)}function Ja(e){return e.timeStamp}function pi(e){return ti(e)?e:e?e+"px":""}var Ko="splide",Es="data-"+Ko;function Io(e,t){if(!e)throw new Error("["+Ko+"] "+(t||""))}var ni=Math.min,Nr=Math.max,Hr=Math.floor,No=Math.ceil,un=Math.abs;function ad(e,t,n){return un(e-t)<n}function Pr(e,t,n,i){var o=ni(t,n),r=Nr(t,n);return i?o<e&&e<r:o<=e&&e<=r}function Ni(e,t,n){var i=ni(t,n),o=Nr(t,n);return ni(Nr(i,e),o)}function Qa(e){return+(e>0)-+(e<0)}function es(e,t){return bn(t,function(n){e=e.replace("%s",""+n)}),e}function Ms(e){return e<10?"0"+e:""+e}var ul={};function Ap(e){return""+e+Ms(ul[e]=(ul[e]||0)+1)}function sd(){var e=[];function t(l,d,c,u){o(l,d,function(p,b,v){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,b,c,u):p.removeListener.bind(p,c);g?p.addEventListener(b,c,u):p.addListener(c),e.push([p,b,v,c,h])})}function n(l,d,c){o(l,d,function(u,p,b){e=e.filter(function(v){return v[0]===u&&v[1]===p&&v[2]===b&&(!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){bn(l,function(u){u&&bn(d,function(p){p.split(" ").forEach(function(b){var v=b.split(".");c(u,v[0],v[1])})})})}function r(){e.forEach(function(l){l[4]()}),zn(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var si="mounted",ts="ready",Bn="move",po="moved",Ps="click",ld="active",cd="inactive",dd="visible",ud="hidden",Qt="refresh",cn="updated",Zi="resize",Kr="resized",pd="drag",md="dragging",gd="dragged",Zr="scroll",Ii="scrolled",Fp="overflow",ks="destroy",hd="arrows:mounted",fd="arrows:updated",yd="pagination:mounted",vd="pagination:updated",As="navigation:mounted",Fs="autoplay:play",xd="autoplay:playing",_s="autoplay:pause",Ws="lazyload:loaded",bd="sk",wd="sh",Or="ei";function Kt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=sd();function i(r,l){n.bind(t,Xo(r).join(" "),function(d){l.apply(l,Cs(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,ai(arguments,1))}return e&&e.event.on(ks,n.destroy),_o(n,{bus:t,on:i,off:Ut(n.unbind,t),emit:o})}function Jr(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ni((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();d=ll(p)}}function b(S){S||h(),r=o()-(S?l*e:0),c=!1,d=ll(p)}function v(){c=!0}function g(){r=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function f(S){e=S}function x(){return c}return{start:b,rewind:g,pause:v,cancel:h,set:f,isPaused:x}}function _p(e){var t=e;function n(o){t=o}function i(o){return Ls(Xo(o),t)}return{set:n,is:i}}function Wp(e,t){var n=Jr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Np(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=sd(),d=[];function c(){var h=n.mediaQuery==="min";Fo(o).sort(function(f,x){return h?+f-+x:+x-+f}).forEach(function(f){p(o[f],"("+(h?"min":"max")+"-width:"+f+"px)")}),p(r,sl),b()}function u(h){h&&l.destroy()}function p(h,f){var x=matchMedia(f);l.bind(x,"change",b),d.push([h,x])}function b(){var h=i.is(Wr),f=n.direction,x=d.reduce(function(S,y){return Kn(S,y[1].matches?y[0]:{})},{});cl(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):f!==n.direction&&e.refresh()}function v(h){matchMedia(sl).matches&&(h?Kn(n,r):cl(n,Fo(r)))}function g(h,f,x){Kn(n,h),f&&Kn(Object.getPrototypeOf(n),h),(x||!i.is(ji))&&e.emit(cn,n)}return{setup:c,destroy:u,reduce:v,set:g}}var Qr="Arrow",ea=Qr+"Left",ta=Qr+"Right",Sd=Qr+"Up",$d=Qr+"Down",pl="rtl",na="ttb",ha={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Sd,ta],ArrowRight:[$d,ea]};function Hp(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===pl&&!l?1:d===na?0:-1;return ha[r]&&ha[r][c]||r.replace(/width|left|right/i,function(u,p){var b=ha[u.toLowerCase()][c]||u;return p>0?b.charAt(0).toUpperCase()+b.slice(1):b})}function o(r){return r*(n.direction===pl?1:-1)}return{resolve:i,orient:o}}var On="role",qi="tabindex",Op="disabled",Cn="aria-",Zo=Cn+"controls",Cd=Cn+"current",ml=Cn+"selected",vn=Cn+"label",Ns=Cn+"labelledby",Td=Cn+"hidden",Hs=Cn+"orientation",Ho=Cn+"roledescription",gl=Cn+"live",hl=Cn+"busy",fl=Cn+"atomic",Os=[On,qi,Op,Zo,Cd,vn,Ns,Td,Hs,Ho],Fn=Ko+"__",li="is-",fa=Ko,yl=Fn+"track",Dp=Fn+"list",ia=Fn+"slide",Ld=ia+"--clone",jp=ia+"__container",Ds=Fn+"arrows",oa=Fn+"arrow",Rd=oa+"--prev",Id=oa+"--next",ra=Fn+"pagination",Ed=ra+"__page",zp=Fn+"progress",Bp=zp+"__bar",Vp=Fn+"toggle",Gp=Fn+"spinner",qp=Fn+"sr",Xp=li+"initialized",Li=li+"active",Md=li+"prev",Pd=li+"next",ns=li+"visible",is=li+"loading",kd=li+"focus-in",Ad=li+"overflow",Up=[Li,ns,Md,Pd,is,kd,Ad],Yp={slide:ia,clone:Ld,arrows:Ds,arrow:oa,prev:Rd,next:Id,pagination:ra,page:Ed,spinner:Gp};function Kp(e,t){if(ed(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ao(n,t);)n=n.parentElement;return n}var Zp=5,vl=200,Fd="touchstart mousedown",ya="touchmove mousemove",va="touchend touchcancel mouseup click";function Jp(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],b=[],v,g,h;function f(){w(),H(),y()}function x(){o(Qt,S),o(Qt,f),o(cn,y),r(document,Fd+" keydown",function(O){h=O.type==="keydown"},{capture:!0}),r(l,"focusin",function(){Nn(l,kd,!!h)})}function S(O){var C=Os.concat("style");zn(u),Hn(l,p),Hn(v,b),kn([v,g],C),kn(l,O?C:["style",Ho])}function y(){Hn(l,p),Hn(v,b),p=U(fa),b=U(yl),Pn(l,p),Pn(v,b),Ct(l,vn,n.label),Ct(l,Ns,n.labelledby)}function w(){v=N("."+yl),g=Yo(v,"."+Dp),Io(v&&g,"A track/list element is missing."),Mr(u,nd(g,"."+ia+":not(."+Ld+")")),$i({arrows:Ds,pagination:ra,prev:Rd,next:Id,bar:Bp,toggle:Vp},function(O,C){c[C]=N("."+O)}),_o(c,{root:l,track:v,list:g,slides:u})}function H(){var O=l.id||Ap(Ko),C=n.role;l.id=O,v.id=v.id||O+"-track",g.id=g.id||O+"-list",!$n(l,On)&&l.tagName!=="SECTION"&&C&&Ct(l,On,C),Ct(l,Ho,d.carousel),Ct(g,On,"presentation")}function N(O){var C=rd(l,O);return C&&Kp(C,"."+fa)===l?C:void 0}function U(O){return[O+"--"+n.type,O+"--"+n.direction,n.drag&&O+"--draggable",n.isNavigation&&O+"--nav",O===fa&&Li]}return _o(c,{setup:f,mount:x,destroy:S})}var Ji="slide",mo="loop",Jo="fade";function Qp(e,t,n,i){var o=Kt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,b=p.isNavigation,v=p.updateOnMove,g=p.i18n,h=p.pagination,f=p.slideFocus,x=c.Direction.resolve,S=$n(i,"style"),y=$n(i,vn),w=n>-1,H=Yo(i,"."+jp),N;function U(){w||(i.id=u.id+"-slide"+Ms(t+1),Ct(i,On,h?"tabpanel":"group"),Ct(i,Ho,g.slide),Ct(i,vn,y||es(g.slideLabel,[t+1,e.length]))),O()}function O(){d(i,"click",Ut(l,Ps,ne)),d(i,"keydown",Ut(l,bd,ne)),r([po,wd,Ii],R),r(As,V),v&&r(Bn,$)}function C(){N=!0,o.destroy(),Hn(i,Up),kn(i,Os),Ct(i,"style",S),Ct(i,vn,y||"")}function V(){var I=e.splides.map(function(W){var K=W.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ct(i,vn,es(g.slideX,(w?n:t)+1)),Ct(i,Zo,I),Ct(i,On,f?"button":""),f&&kn(i,Ho)}function $(){N||R()}function R(){if(!N){var I=e.index;k(),T(),Nn(i,Md,t===I-1),Nn(i,Pd,t===I+1)}}function k(){var I=M();I!==dl(i,Li)&&(Nn(i,Li,I),Ct(i,Cd,b&&I||""),l(I?ld:cd,ne))}function T(){var I=E(),W=!I&&(!M()||w);if(e.state.is([uo,Go])||Ct(i,Td,W||""),Ct(Is(i,p.focusableNodes||""),qi,W?-1:""),f&&Ct(i,qi,W?-1:0),I!==dl(i,ns)&&(Nn(i,ns,I),l(I?dd:ud,ne)),!I&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&id(K.slide)}}function m(I,W,K){Sn(K&&H||i,I,W)}function M(){var I=e.index;return I===t||p.cloneStatus&&I===n}function E(){if(e.is(Jo))return M();var I=fn(c.Elements.track),W=fn(i),K=x("left",!0),ae=x("right",!0);return Hr(I[K])<=No(W[K])&&Hr(W[ae])<=No(I[ae])}function z(I,W){var K=un(I-t);return!w&&(p.rewind||e.is(mo))&&(K=ni(K,e.length-K)),K<=W}var ne={index:t,slideIndex:n,slide:i,container:H,isClone:w,mount:U,destroy:C,update:R,style:m,isWithin:z};return ne}function em(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function b(){v(),o(Qt,g),o(Qt,v)}function v(){c.forEach(function(R,k){f(R,k,-1)})}function g(){N(function(R){R.destroy()}),zn(p)}function h(){N(function(R){R.update()})}function f(R,k,T){var m=Qp(e,k,T,R);m.mount(),p.push(m),p.sort(function(M,E){return M.index-E.index})}function x(R){return R?U(function(k){return!k.isClone}):p}function S(R){var k=t.Controller,T=k.toIndex(R),m=k.hasFocus()?1:n.perPage;return U(function(M){return Pr(M.index,T,T+m-1)})}function y(R){return U(R)[0]}function w(R,k){bn(R,function(T){if(ti(T)&&(T=od(T)),td(T)){var m=c[k];m?Rs(T,m):Uo(u,T),Pn(T,n.classes.slide),C(T,Ut(r,Zi))}}),r(Qt)}function H(R){Ti(U(R).map(function(k){return k.slide})),r(Qt)}function N(R,k){x(k).forEach(R)}function U(R){return p.filter(ed(R)?R:function(k){return ti(R)?Ao(k.slide,R):Ls(Xo(R),k.index)})}function O(R,k,T){N(function(m){m.style(R,k,T)})}function C(R,k){var T=Is(R,"img"),m=T.length;m?T.forEach(function(M){l(M,"load error",function(){--m||k()})}):k()}function V(R){return R?c.length:p.length}function $(){return p.length>n.perPage}return{mount:b,destroy:g,update:h,register:f,get:x,getIn:S,getAt:y,add:w,remove:H,forEach:N,filter:U,style:O,getLength:V,isEnough:$}}function tm(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,b=u.track,v=u.list,g=d.getAt,h=d.style,f,x,S;function y(){w(),r(window,"resize load",Wp(Ut(l,Zi))),o([cn,Qt],w),o(Zi,H)}function w(){f=n.direction===na,Sn(p,"maxWidth",pi(n.width)),Sn(b,c("paddingLeft"),N(!1)),Sn(b,c("paddingRight"),N(!0)),H(!0)}function H(ne){var I=fn(p);(ne||x.width!==I.width||x.height!==I.height)&&(Sn(b,"height",U()),h(c("marginRight"),pi(n.gap)),h("width",C()),h("height",V(),!0),x=I,l(Kr),S!==(S=z())&&(Nn(p,Ad,S),l(Fp,S)))}function N(ne){var I=n.padding,W=c(ne?"right":"left");return I&&pi(I[W]||(ko(I)?0:I))||"0px"}function U(){var ne="";return f&&(ne=O(),Io(ne,"height or heightRatio is missing."),ne="calc("+ne+" - "+N(!1)+" - "+N(!0)+")"),ne}function O(){return pi(n.height||fn(v).width*n.heightRatio)}function C(){return n.autoWidth?null:pi(n.fixedWidth)||(f?"":$())}function V(){return pi(n.fixedHeight)||(f?n.autoHeight?null:$():O())}function $(){var ne=pi(n.gap);return"calc((100%"+(ne&&" + "+ne)+")/"+(n.perPage||1)+(ne&&" - "+ne)+")"}function R(){return fn(v)[c("width")]}function k(ne,I){var W=g(ne||0);return W?fn(W.slide)[c("width")]+(I?0:M()):0}function T(ne,I){var W=g(ne);if(W){var K=fn(W.slide)[c("right")],ae=fn(v)[c("left")];return un(K-ae)+(I?0:M())}return 0}function m(ne){return T(e.length-1)-T(0)+k(0,ne)}function M(){var ne=g(0);return ne&&parseFloat(Sn(ne.slide,c("marginRight")))||0}function E(ne){return parseFloat(Sn(b,c("padding"+(ne?"Right":"Left"))))||0}function z(){return e.is(Jo)||m(!0)>R()}return{mount:y,resize:H,listSize:R,slideSize:k,sliderSize:m,totalSize:T,getPadding:E,isOverflow:z}}var nm=2;function im(e,t,n){var i=Kt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(Qt,b),o([cn,Zi],g),(u=x())&&(h(u),t.Layout.resize(!0))}function b(){v(),p()}function v(){Ti(c),zn(c),i.destroy()}function g(){var S=x();u!==S&&(u<S||!S)&&i.emit(Qt)}function h(S){var y=l.get().slice(),w=y.length;if(w){for(;y.length<S;)Mr(y,y);Mr(y.slice(-S),y.slice(0,S)).forEach(function(H,N){var U=N<S,O=f(H.slide,N);U?Rs(O,y[0].slide):Uo(r.list,O),Mr(c,O),l.register(O,N-S+(U?0:w),H.index)})}}function f(S,y){var w=S.cloneNode(!0);return Pn(w,n.classes.clone),w.id=e.root.id+"-clone"+Ms(y+1),w}function x(){var S=n.clones;if(!e.is(mo))S=0;else if(qo(S)){var y=n[d("fixedWidth")]&&t.Layout.slideSize(0),w=y&&No(fn(r.track)[d("width")]/y);S=w||n[d("autoWidth")]&&e.length||n.perPage*nm}return S}return{mount:p,destroy:v}}function om(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,b=d.listSize,v=d.sliderSize,g=t.Direction,h=g.resolve,f=g.orient,x=t.Elements,S=x.list,y=x.track,w;function H(){w=t.Transition,o([si,Kr,cn,Qt],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),O(e.index),t.Slides.update())}function U(W,K,ae,de){W!==K&&ne(W>ae)&&(R(),C($(m(),W>ae),!0)),l(uo),r(Bn,K,ae,W),w.start(K,function(){l(Ki),r(po,K,ae,W),de&&de()})}function O(W){C(T(W,!0))}function C(W,K){if(!e.is(Jo)){var ae=K?W:V(W);Sn(S,"transform","translate"+h("X")+"("+ae+"px)"),W!==ae&&r(wd)}}function V(W){if(e.is(mo)){var K=k(W),ae=K>t.Controller.getEnd(),de=K<0;(de||ae)&&(W=$(W,ae))}return W}function $(W,K){var ae=W-z(K),de=v();return W-=f(de*(No(un(ae)/de)||1))*(K?1:-1),W}function R(){C(m(),!0),w.cancel()}function k(W){for(var K=t.Slides.get(),ae=0,de=1/0,A=0;A<K.length;A++){var he=K[A].index,q=un(T(he,!0)-W);if(q<=de)de=q,ae=he;else break}return ae}function T(W,K){var ae=f(p(W-1)-E(W));return K?M(ae):ae}function m(){var W=h("left");return fn(S)[W]-fn(y)[W]+f(u(!1))}function M(W){return n.trimSpace&&e.is(Ji)&&(W=Ni(W,0,f(v(!0)-b()))),W}function E(W){var K=n.focus;return K==="center"?(b()-c(W,!0))/2:+K*c(W)||0}function z(W){return T(W?t.Controller.getEnd():0,!!n.trimSpace)}function ne(W){var K=f($(m(),W));return W?K>=0:K<=S[h("scrollWidth")]-fn(y)[h("width")]}function I(W,K){K=qo(K)?m():K;var ae=W!==!0&&f(K)<f(z(!1)),de=W!==!1&&f(K)>f(z(!0));return ae||de}return{mount:H,move:U,jump:O,translate:C,shift:$,cancel:R,toIndex:k,toPosition:T,getPosition:m,getLimit:z,exceededLimit:I,reposition:N}}function rm(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,b=p.isEnough,v=p.getLength,g=n.omitEnd,h=e.is(mo),f=e.is(Ji),x=Ut(m,!1),S=Ut(m,!0),y=n.start||0,w,H=y,N,U,O;function C(){V(),o([cn,Qt,Or],V),o(Kr,$)}function V(){N=v(!0),U=n.perMove,O=n.perPage,w=ne();var q=Ni(y,0,g?w:N-1);q!==y&&(y=q,l.reposition())}function $(){w!==ne()&&r(Or)}function R(q,ce,Q){if(!he()){var be=T(q),He=z(be);He>-1&&(ce||He!==y)&&(ae(He),l.move(be,He,H,Q))}}function k(q,ce,Q,be){t.Scroll.scroll(q,ce,Q,function(){var He=z(l.toIndex(d()));ae(g?ni(He,w):He),be&&be()})}function T(q){var ce=y;if(ti(q)){var Q=q.match(/([+\-<>])(\d+)?/)||[],be=Q[1],He=Q[2];be==="+"||be==="-"?ce=M(y+ +(""+be+(+He||1)),y):be===">"?ce=He?I(+He):x(!0):be==="<"&&(ce=S(!0))}else ce=h?q:Ni(q,0,w);return ce}function m(q,ce){var Q=U||(A()?1:O),be=M(y+Q*(q?-1:1),y,!(U||A()));return be===-1&&f&&!ad(d(),c(!q),1)?q?0:w:ce?be:z(be)}function M(q,ce,Q){if(b()||A()){var be=E(q);be!==q&&(ce=q,q=be,Q=!1),q<0||q>w?!U&&(Pr(0,q,ce,!0)||Pr(w,ce,q,!0))?q=I(W(q)):h?q=Q?q<0?-(N%O||O):N:q:n.rewind?q=q<0?w:0:q=-1:Q&&q!==ce&&(q=I(W(ce)+(q<ce?-1:1)))}else q=-1;return q}function E(q){if(f&&n.trimSpace==="move"&&q!==y)for(var ce=d();ce===u(q,!0)&&Pr(q,0,e.length-1,!n.rewind);)q<y?--q:++q;return q}function z(q){return h?(q+N)%N||0:q}function ne(){for(var q=N-(A()||h&&U?1:O);g&&q-- >0;)if(u(N-1,!0)!==u(q,!0)){q++;break}return Ni(q,0,N-1)}function I(q){return Ni(A()?q:O*q,0,w)}function W(q){return A()?ni(q,w):Hr((q>=w?N-1:q)/O)}function K(q){var ce=l.toIndex(q);return f?Ni(ce,0,w):ce}function ae(q){q!==y&&(H=y,y=q)}function de(q){return q?H:y}function A(){return!qo(n.focus)||n.isNavigation}function he(){return e.state.is([uo,Go])&&!!n.waitForTransition}return{mount:C,go:R,scroll:k,getNext:x,getPrev:S,getAdjacent:m,getEnd:ne,setIndex:ae,getIndex:de,toIndex:I,toPage:W,toDest:K,hasFocus:A,isBusy:he}}var am="http://www.w3.org/2000/svg",sm="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",ar=40;function lm(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,b=u.arrows,v=u.track,g=b,h=u.prev,f=u.next,x,S,y={};function w(){N(),o(cn,H)}function H(){U(),w()}function N(){var k=n.arrows;k&&!(h&&f)&&V(),h&&f&&(_o(y,{prev:h,next:f}),Wo(g,k?"":"none"),Pn(g,S=Ds+"--"+n.direction),k&&(O(),R(),Ct([h,f],Zo,v.id),l(hd,h,f)))}function U(){i.destroy(),Hn(g,S),x?(Ti(b?[h,f]:g),h=f=null):kn([h,f],Os)}function O(){o([si,po,Qt,Ii,Or],R),r(f,"click",Ut(C,">")),r(h,"click",Ut(C,"<"))}function C(k){p.go(k,!0)}function V(){g=b||Gi("div",d.arrows),h=$(!0),f=$(!1),x=!0,Uo(g,[h,f]),!b&&Rs(g,v)}function $(k){var T='<button class="'+d.arrow+" "+(k?d.prev:d.next)+'" type="button"><svg xmlns="'+am+'" viewBox="0 0 '+ar+" "+ar+'" width="'+ar+'" height="'+ar+'" focusable="false"><path d="'+(n.arrowPath||sm)+'" />';return od(T)}function R(){if(h&&f){var k=e.index,T=p.getPrev(),m=p.getNext(),M=T>-1&&k<T?c.last:c.prev,E=m>-1&&k>m?c.first:c.next;h.disabled=T<0,f.disabled=m<0,Ct(h,vn,M),Ct(f,vn,E),l(fd,h,f,T,m)}}return{arrows:y,mount:w,destroy:U,update:R}}var cm=Es+"-interval";function dm(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.emit,d=Jr(n.interval,e.go.bind(e,">"),O),c=d.isPaused,u=t.Elements,p=t.Elements,b=p.root,v=p.toggle,g=n.autoplay,h,f,x=g==="pause";function S(){g&&(y(),v&&Ct(v,Zo,u.track.id),x||w(),U())}function y(){n.pauseOnHover&&r(b,"mouseenter mouseleave",function(V){h=V.type==="mouseenter",N()}),n.pauseOnFocus&&r(b,"focusin focusout",function(V){f=V.type==="focusin",N()}),v&&r(v,"click",function(){x?w():H(!0)}),o([Bn,Zr,Qt],d.rewind),o(Bn,C)}function w(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=h=x=!1,U(),l(Fs))}function H(V){V===void 0&&(V=!0),x=!!V,U(),c()||(d.pause(),l(_s))}function N(){x||(h||f?H(!1):w())}function U(){v&&(Nn(v,Li,!x),Ct(v,vn,n.i18n[x?"play":"pause"]))}function O(V){var $=u.bar;$&&Sn($,"width",V*100+"%"),l(xd,V)}function C(V){var $=t.Slides.getAt(V);d.set($&&+$n($.slide,cm)||n.interval)}return{mount:S,destroy:d.cancel,play:w,pause:H,isPaused:c}}function um(e,t,n){var i=Kt(e),o=i.on;function r(){n.cover&&(o(Ws,Ut(d,!0)),o([si,cn,Qt],Ut(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Yo(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),Wo(u,c?"none":"")}return{mount:r,destroy:Ut(l,!1)}}var pm=10,mm=600,gm=.6,hm=1.5,fm=800;function ym(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,b=d.translate,v=e.is(Ji),g,h,f=1;function x(){o(Bn,H),o([cn,Qt],N)}function S(O,C,V,$,R){var k=c();if(H(),V&&(!v||!p())){var T=t.Layout.sliderSize(),m=Qa(O)*T*Hr(un(O)/T)||0;O=d.toPosition(t.Controller.toDest(O%T))+m}var M=ad(k,O,1);f=1,C=M?0:C||Nr(un(O-k)/hm,fm),h=$,g=Jr(C,y,Ut(w,k,O,R),1),l(Go),r(Zr),g.start()}function y(){l(Ki),h&&h(),r(Ii)}function w(O,C,V,$){var R=c(),k=O+(C-O)*U($),T=(k-R)*f;b(R+T),v&&!V&&p()&&(f*=gm,un(T)<pm&&S(u(p(!0)),mm,!1,h,!0))}function H(){g&&g.cancel()}function N(){g&&!g.isPaused()&&(H(),y())}function U(O){var C=n.easingFunc;return C?C(O):1-Math.pow(1-O,4)}return{mount:x,destroy:H,scroll:S,cancel:N}}var Hi={passive:!1,capture:!0};function vm(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,b=t.Controller,v=t.Elements.track,g=t.Media.reduce,h=t.Direction,f=h.resolve,x=h.orient,S=u.getPosition,y=u.exceededLimit,w,H,N,U,O,C=!1,V,$,R;function k(){l(v,ya,Za,Hi),l(v,va,Za,Hi),l(v,Fd,m,Hi),l(v,"click",z,{capture:!0}),l(v,"dragstart",Wn),o([si,cn],T)}function T(){var ee=n.drag;le(!ee),U=ee==="free"}function m(ee){if(V=!1,!$){var ue=He(ee);be(ee.target)&&(ue||!ee.button)&&(b.isBusy()?Wn(ee,!0):(R=ue?v:window,O=c.is([uo,Go]),N=null,l(R,ya,M,Hi),l(R,va,E,Hi),u.cancel(),p.cancel(),ne(ee)))}}function M(ee){if(c.is(Er)||(c.set(Er),r(pd)),ee.cancelable)if(O){u.translate(w+Q(A(ee)));var ue=he(ee)>vl,oe=C!==(C=y());(ue||oe)&&ne(ee),V=!0,r(md),Wn(ee)}else K(ee)&&(O=W(ee),Wn(ee))}function E(ee){c.is(Er)&&(c.set(Ki),r(gd)),O&&(I(ee),Wn(ee)),d(R,ya,M),d(R,va,E),O=!1}function z(ee){!$&&V&&Wn(ee,!0)}function ne(ee){N=H,H=ee,w=S()}function I(ee){var ue=ae(ee),oe=de(ue),Fe=n.rewind&&n.rewindByDrag;g(!1),U?b.scroll(oe,0,n.snap):e.is(Jo)?b.go(x(Qa(ue))<0?Fe?"<":"-":Fe?">":"+"):e.is(Ji)&&C&&Fe?b.go(y(!0)?">":"<"):b.go(b.toDest(oe),!0),g(!0)}function W(ee){var ue=n.dragMinThreshold,oe=ko(ue),Fe=oe&&ue.mouse||0,Ce=(oe?ue.touch:+ue)||10;return un(A(ee))>(He(ee)?Ce:Fe)}function K(ee){return un(A(ee))>un(A(ee,!0))}function ae(ee){if(e.is(mo)||!C){var ue=he(ee);if(ue&&ue<vl)return A(ee)/ue}return 0}function de(ee){return S()+Qa(ee)*ni(un(ee)*(n.flickPower||600),U?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function A(ee,ue){return ce(ee,ue)-ce(q(ee),ue)}function he(ee){return Ja(ee)-Ja(q(ee))}function q(ee){return H===ee&&N||H}function ce(ee,ue){return(He(ee)?ee.changedTouches[0]:ee)["page"+f(ue?"Y":"X")]}function Q(ee){return ee/(C&&e.is(Ji)?Zp:1)}function be(ee){var ue=n.noDrag;return!Ao(ee,"."+Ed+", ."+oa)&&(!ue||!Ao(ee,ue))}function He(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function xe(){return O}function le(ee){$=ee}return{mount:k,disable:le,isDragging:xe}}var xm={Spacebar:" ",Right:ta,Left:ea,Up:Sd,Down:$d};function js(e){return e=ti(e)?e:e.key,xm[e]||e}var xl="keydown";function bm(e,t,n){var i=Kt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function b(){v(),o(cn,g),o(cn,v),o(Bn,f)}function v(){var S=n.keyboard;S&&(u=S==="global"?window:d,r(u,xl,x))}function g(){l(u,xl)}function h(S){p=S}function f(){var S=p;p=!0,Qc(function(){p=S})}function x(S){if(!p){var y=js(S);y===c(ea)?e.go("<"):y===c(ta)&&e.go(">")}}return{mount:b,destroy:g,disable:h}}var Eo=Es+"-lazy",kr=Eo+"-srcset",wm="["+Eo+"], ["+kr+"]";function Sm(e,t,n){var i=Kt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[po,Ii],p=[];function b(){n.lazyLoad&&(v(),o(Qt,v))}function v(){zn(p),g(),c?S():(r(u),o(u,h),h())}function g(){t.Slides.forEach(function(y){Is(y.slide,wm).forEach(function(w){var H=$n(w,Eo),N=$n(w,kr);if(H!==w.src||N!==w.srcset){var U=n.classes.spinner,O=w.parentElement,C=Yo(O,"."+U)||Gi("span",U,O);p.push([w,y,C]),w.src||Wo(w,"none")}})})}function h(){p=p.filter(function(y){var w=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,w)?f(y):!0}),p.length||r(u)}function f(y){var w=y[0];Pn(y[1].slide,is),l(w,"load error",Ut(x,y)),Ct(w,"src",$n(w,Eo)),Ct(w,"srcset",$n(w,kr)),kn(w,Eo),kn(w,kr)}function x(y,w){var H=y[0],N=y[1];Hn(N.slide,is),w.type!=="error"&&(Ti(y[2]),Wo(H,""),d(Ws,H,N),d(Zi)),c&&S()}function S(){p.length&&f(p.shift())}return{mount:b,destroy:Ut(zn,p),check:h}}function $m(e,t,n){var i=Kt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,b=u.getIndex,v=u.go,g=t.Direction.resolve,h=c.pagination,f=[],x,S;function y(){w(),o([cn,Qt,Or],y);var $=n.pagination;h&&Wo(h,$?"":"none"),$&&(o([Bn,Zr,Ii],V),H(),V(),r(yd,{list:x,items:f},C(e.index)))}function w(){x&&(Ti(h?ai(x.children):x),Hn(x,S),zn(f),x=null),i.destroy()}function H(){var $=e.length,R=n.classes,k=n.i18n,T=n.perPage,m=p()?u.getEnd()+1:No($/T);x=h||Gi("ul",R.pagination,c.track.parentElement),Pn(x,S=ra+"--"+O()),Ct(x,On,"tablist"),Ct(x,vn,k.select),Ct(x,Hs,O()===na?"vertical":"");for(var M=0;M<m;M++){var E=Gi("li",null,x),z=Gi("button",{class:R.page,type:"button"},E),ne=d.getIn(M).map(function(W){return W.slide.id}),I=!p()&&T>1?k.pageX:k.slideX;l(z,"click",Ut(N,M)),n.paginationKeyboard&&l(z,"keydown",Ut(U,M)),Ct(E,On,"presentation"),Ct(z,On,"tab"),Ct(z,Zo,ne.join(" ")),Ct(z,vn,es(I,M+1)),Ct(z,qi,-1),f.push({li:E,button:z,page:M})}}function N($){v(">"+$,!0)}function U($,R){var k=f.length,T=js(R),m=O(),M=-1;T===g(ta,!1,m)?M=++$%k:T===g(ea,!1,m)?M=(--$+k)%k:T==="Home"?M=0:T==="End"&&(M=k-1);var E=f[M];E&&(id(E.button),v(">"+M),Wn(R,!0))}function O(){return n.paginationDirection||n.direction}function C($){return f[u.toPage($)]}function V(){var $=C(b(!0)),R=C(b());if($){var k=$.button;Hn(k,Li),kn(k,ml),Ct(k,qi,-1)}if(R){var T=R.button;Pn(T,Li),Ct(T,ml,!0),Ct(T,qi,"")}r(vd,{list:x,items:f},$,R)}return{items:f,mount:y,destroy:w,getAt:C,update:V}}var Cm=[" ","Enter"];function Tm(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()}),zn(r)}function c(){d(),l()}function u(h,f){var x=Kt(h);x.on(Bn,function(S,y,w){f.go(f.is(mo)?w:S)}),r.push(x)}function p(){var h=Kt(e),f=h.on;f(Ps,v),f(bd,g),f([si,cn],b),r.push(h),h.emit(As,e.splides)}function b(){Ct(t.Elements.list,Hs,n.direction===na?"vertical":"")}function v(h){e.go(h.index)}function g(h,f){Ls(Cm,js(f))&&(v(h),Wn(f))}return{setup:Ut(t.Media.set,{slideFocus:qo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Lm(e,t,n){var i=Kt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Hi)}function d(u){if(u.cancelable){var p=u.deltaY,b=p<0,v=Ja(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;un(p)>g&&v-r>h&&(e.go(b?"<":">"),r=v),c(b)&&Wn(u)}}function c(u){return!n.releaseWheel||e.state.is(uo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Rm=90;function Im(e,t,n){var i=Kt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=Gi("span",qp),c=Jr(Rm,Ut(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Ct(r,fl,!0),d.textContent="…",o(Fs,Ut(v,!0)),o(_s,Ut(v,!1)),o([po,Ii],Ut(p,!0)))}function p(g){Ct(r,hl,g),g?(Uo(r,d),c.start()):(Ti(d),c.cancel())}function b(){kn(r,[gl,fl,hl]),Ti(d)}function v(g){l&&Ct(r,gl,g?"off":"polite")}return{mount:u,disable:v,destroy:b}}var Em=Object.freeze({__proto__:null,Media:Np,Direction:Hp,Elements:Jp,Slides:em,Layout:tm,Clones:im,Move:om,Controller:rm,Arrows:lm,Autoplay:dm,Cover:um,Scroll:ym,Drag:vm,Keyboard:bm,LazyLoad:Sm,Pagination:$m,Sync:Tm,Wheel:Lm,Live:Im}),Mm={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},Pm={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:Yp,i18n:Mm,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function km(e,t,n){var i=t.Slides;function o(){Kt(e).on([si,Qt],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),Qc(c)}return{mount:o,start:l,cancel:Za}}function Am(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Ut(Sn,l,"transition"),c;function u(){Kt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(b(),c())})}function p(g,h){var f=i.toPosition(g,!0),x=i.getPosition(),S=v(g);un(f-x)>=1&&S>=1?n.useScroll?r.scroll(f,S,!1,h):(d("transform "+S+"ms "+n.easing),i.translate(f,!0),c=h):(i.jump(g),h())}function b(){d(""),r.cancel()}function v(g){var h=n.rewindSpeed;if(e.is(Ji)&&h){var f=o.getIndex(!0),x=o.getEnd();if(f===0&&g>=x||f>=x&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:b}}var Fm=(function(){function e(n,i){this.event=Kt(),this.Components={},this.state=_p(ji),this.splides=[],this._o={},this._E={};var o=ti(n)?rd(document,n):n;Io(o,o+" is invalid."),this.root=o,i=Kn({label:$n(o,vn)||"",labelledby:$n(o,Ns)||""},Pm,e.defaults,i||{});try{Kn(i,JSON.parse($n(o,Es)))}catch{Io(!1,"Invalid JSON")}this._o=Object.create(Kn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;Io(l.is([ji,Wr]),"Already mounted!"),l.set(ji),this._C=d,this._T=o||this._T||(this.is(Jo)?km:Am),this._E=i||this._E;var c=_o({},Em,this._E,{Transition:this._T});return $i(c,function(u,p){var b=u(r,d,r._o);d[p]=b,b.setup&&b.setup()}),$i(d,function(u){u.mount&&u.mount()}),this.emit(si),Pn(this.root,Xp),l.set(Ki),this.emit(ts),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ki)&&(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(ai(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(Qt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(ji)?Kt(this).on(ts,this.destroy.bind(this,i)):($i(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ks),o.destroy(),i&&zn(this.splides),r.set(Wr)),this},Mp(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),zs=Fm;zs.defaults={};zs.STATES=kp;var bl=[[si,"onMounted"],[ts,"onReady"],[Bn,"onMove"],[po,"onMoved"],[Ps,"onClick"],[ld,"onActive"],[cd,"onInactive"],[dd,"onVisible"],[ud,"onHidden"],[Qt,"onRefresh"],[cn,"onUpdated"],[Zi,"onResize"],[Kr,"onResized"],[pd,"onDrag"],[md,"onDragging"],[gd,"onDragged"],[Zr,"onScroll"],[Ii,"onScrolled"],[ks,"onDestroy"],[hd,"onArrowsMounted"],[fd,"onArrowsUpdated"],[yd,"onPaginationMounted"],[vd,"onPaginationUpdated"],[As,"onNavigationMounted"],[Fs,"onAutoplayPlay"],[xd,"onAutoplayPlaying"],[_s,"onAutoplayPause"],[Ws,"onLazyLoadLoaded"]];function Bs(...e){return e.filter(Boolean).join(" ")}function Dr(e){return e!==null&&typeof e=="object"}function os(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!os(n,t[i]));if(Dr(e)&&Dr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!os(e[o],t[o]))}return e===t}function _m(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Wm(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 Wm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Dr(i)?n[o]=rs(Dr(n[o])?n[o]:{},i):n[o]=i}),n}var Nm=({children:e,className:t,...n})=>s.createElement("div",{className:Bs("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Vs=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 zs(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&&!os(this.options,e)&&(this.splide.options=e,this.options=rs({},e));const t=this.getSlides();_m(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){bl.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:Bs("splide",e),ref:this.splideRef,...this.omit(o,["options",...bl.map(r=>r[1])])},n?s.createElement(Nm,null,i):i)}},Gs=({children:e,className:t,...n})=>s.createElement("li",{className:Bs("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),xt=require("classnames"),z=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Gn=require("react-dom");function Du(e){return e.type==="object"&&e.version===1}const ju="ControlSlider-module__wrapper___sHEkd",zu="ControlSlider-module__hoverArrow___A-dOH",Bu="ControlSlider-module__sliderItem___QQSkR",Vu="ControlSlider-module__sliderImage___9hRl-",Gu="ControlSlider-module__arrow___05ghY",qu="ControlSlider-module__arrowVertical___tBfVN",Xu="ControlSlider-module__nextArrow___-30Yc",Uu="ControlSlider-module__arrowInner___aEra3",Yu="ControlSlider-module__arrowIcon___S4ztF",Ku="ControlSlider-module__arrowImg___2dwJW",Zu="ControlSlider-module__mirror___brd6U",Ju="ControlSlider-module__pagination___bicLF",Qu="ControlSlider-module__paginationInner___bT-P-",ep="ControlSlider-module__paginationVertical___zYqKw",tp="ControlSlider-module__paginationItem___nTRbk",np="ControlSlider-module__dot___p1Qun",ip="ControlSlider-module__activeDot___LHFaj",op="ControlSlider-module__paginationInsideBottom___R3FWn",rp="ControlSlider-module__paginationInsideTop___V-qb-",ap="ControlSlider-module__paginationOutsideBottom___14w8D",sp="ControlSlider-module__paginationOutsideTop___SCLqB",lp="ControlSlider-module__paginationInsideLeft___yOBRZ",cp="ControlSlider-module__paginationInsideRight___Rtt3o",dp="ControlSlider-module__paginationOutsideLeft___lahaw",up="ControlSlider-module__paginationOutsideRight___EtuQa",pp="ControlSlider-module__imgWrapper___UjEgB",mp="ControlSlider-module__captionBlock___dJ6-j",gp="ControlSlider-module__captionTextWrapper___HFlpf",hp="ControlSlider-module__captionText___uGBVc",fp="ControlSlider-module__active___WZK4G",yp="ControlSlider-module__withPointerEvents___t-18M",vp="ControlSlider-module__topLeftAlignment___zjnGM",xp="ControlSlider-module__topCenterAlignment___gD1xW",bp="ControlSlider-module__topRightAlignment___NMapS",wp="ControlSlider-module__middleLeftAlignment___OnUrY",Sp="ControlSlider-module__middleCenterAlignment___Tdkl0",$p="ControlSlider-module__middleRightAlignment___wEbfX",Cp="ControlSlider-module__bottomLeftAlignment___cTP2-",Tp="ControlSlider-module__bottomCenterAlignment___c54fB",Lp="ControlSlider-module__bottomRightAlignment___kEwrz",Rp="ControlSlider-module__clickOverlay___DZA28",Ip="ControlSlider-module__contain___pLyq7",Ep="ControlSlider-module__cover___KdDat",vt={wrapper:ju,hoverArrow:zu,sliderItem:Bu,sliderImage:Vu,arrow:Gu,arrowVertical:qu,nextArrow:Xu,arrowInner:Uu,arrowIcon:Yu,arrowImg:Ku,mirror:Zu,pagination:Ju,paginationInner:Qu,paginationVertical:ep,paginationItem:tp,dot:np,activeDot:ip,paginationInsideBottom:op,paginationInsideTop:rp,paginationOutsideBottom:ap,paginationOutsideTop:sp,paginationInsideLeft:lp,paginationInsideRight:cp,paginationOutsideLeft:dp,paginationOutsideRight:up,imgWrapper:pp,captionBlock:mp,captionTextWrapper:gp,captionText:hp,active:fp,withPointerEvents:yp,topLeftAlignment:vp,topCenterAlignment:xp,topRightAlignment:bp,middleLeftAlignment:wp,middleCenterAlignment:Sp,middleRightAlignment:$p,bottomLeftAlignment:Cp,bottomCenterAlignment:Tp,bottomRightAlignment:Lp,clickOverlay:Rp,contain:Ip,cover:Ep};function Mp(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 Pp(e,t,n){return t&&Mp(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ll="(prefers-reduced-motion: reduce)",Bi=1,kp=2,Ji=3,mo=4,qo=5,Er=6,Wr=7,Ap={CREATED:Bi,MOUNTED:kp,IDLE:Ji,MOVING:mo,SCROLLING:qo,DRAGGING:Er,DESTROYED:Wr};function Bn(e){e.length=0}function si(e,t,n){return Array.prototype.slice.call(e,t,n)}function Yt(e){return e.bind.apply(e,[null].concat(si(arguments,1)))}var td=setTimeout,Za=function(){};function cl(e){return requestAnimationFrame(e)}function Yr(e,t){return typeof t===e}function Ao(e){return!Ls(e)&&Yr("object",e)}var Ts=Array.isArray,nd=Yt(Yr,"function"),ni=Yt(Yr,"string"),Xo=Yt(Yr,"undefined");function Ls(e){return e===null}function id(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Uo(e){return Ts(e)?e:[e]}function bn(e,t){Uo(e).forEach(t)}function Rs(e,t){return e.indexOf(t)>-1}function Mr(e,t){return e.push.apply(e,Uo(t)),e}function Hn(e,t,n){e&&bn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function kn(e,t){Hn(e,ni(t)?t.split(" "):t,!0)}function Yo(e,t){bn(t,e.appendChild.bind(e))}function Is(e,t){bn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Fo(e,t){return id(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function od(e,t){var n=e?si(e.children):[];return t?n.filter(function(i){return Fo(i,t)}):n}function Ko(e,t){return t?od(e,t)[0]:e.firstElementChild}var _o=Object.keys;function Ci(e,t,n){return e&&(n?_o(e).reverse():_o(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Wo(e){return si(arguments,1).forEach(function(t){Ci(t,function(n,i){e[i]=t[i]})}),e}function Zn(e){return si(arguments,1).forEach(function(t){Ci(t,function(n,i){Ts(n)?e[i]=n.slice():Ao(n)?e[i]=Zn({},Ao(e[i])?e[i]:{},n):e[i]=n})}),e}function dl(e,t){bn(t||_o(e),function(n){delete e[n]})}function An(e,t){bn(e,function(n){bn(t,function(i){n&&n.removeAttribute(i)})})}function Rt(e,t,n){Ao(t)?Ci(t,function(i,o){Rt(e,o,i)}):bn(e,function(i){Ls(n)||n===""?An(i,t):i.setAttribute(t,String(n))})}function Xi(e,t,n){var i=document.createElement(e);return t&&(ni(t)?kn(i,t):Rt(i,t)),n&&Yo(n,i),i}function Sn(e,t,n){if(Xo(n))return getComputedStyle(e)[t];Ls(n)||(e.style[t]=""+n)}function No(e,t){Sn(e,"display",t)}function rd(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function $n(e,t){return e.getAttribute(t)}function ul(e,t){return e&&e.classList.contains(t)}function fn(e){return e.getBoundingClientRect()}function Li(e){bn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ad(e){return Ko(new DOMParser().parseFromString(e,"text/html").body)}function Nn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function sd(e,t){return e&&e.querySelector(t)}function Es(e,t){return t?si(e.querySelectorAll(t)):[]}function On(e,t){Hn(e,t,!1)}function Ja(e){return e.timeStamp}function mi(e){return ni(e)?e:e?e+"px":""}var Zo="splide",Ms="data-"+Zo;function Eo(e,t){if(!e)throw new Error("["+Zo+"] "+(t||""))}var ii=Math.min,Nr=Math.max,Hr=Math.floor,Ho=Math.ceil,un=Math.abs;function ld(e,t,n){return un(e-t)<n}function Pr(e,t,n,i){var o=ii(t,n),r=Nr(t,n);return i?o<e&&e<r:o<=e&&e<=r}function Oi(e,t,n){var i=ii(t,n),o=Nr(t,n);return ii(Nr(i,e),o)}function Qa(e){return+(e>0)-+(e<0)}function es(e,t){return bn(t,function(n){e=e.replace("%s",""+n)}),e}function Ps(e){return e<10?"0"+e:""+e}var pl={};function Fp(e){return""+e+Ps(pl[e]=(pl[e]||0)+1)}function cd(){var e=[];function t(l,d,c,u){o(l,d,function(p,w,x){var f="addEventListener"in p,h=f?p.removeEventListener.bind(p,w,c,u):p.removeListener.bind(p,c);f?p.addEventListener(w,c,u):p.addListener(c),e.push([p,w,x,c,h])})}function n(l,d,c){o(l,d,function(u,p,w){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===w&&(!c||x[3]===c)?(x[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){bn(l,function(u){u&&bn(d,function(p){p.split(" ").forEach(function(w){var x=w.split(".");c(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),Bn(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var li="mounted",ts="ready",Vn="move",go="moved",ks="click",dd="active",ud="inactive",pd="visible",md="hidden",en="refresh",cn="updated",Qi="resize",Kr="resized",gd="drag",hd="dragging",fd="dragged",Zr="scroll",Ei="scrolled",_p="overflow",As="destroy",yd="arrows:mounted",vd="arrows:updated",xd="pagination:mounted",bd="pagination:updated",Fs="navigation:mounted",_s="autoplay:play",wd="autoplay:playing",Ws="autoplay:pause",Ns="lazyload:loaded",Sd="sk",$d="sh",Or="ei";function Jt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=cd();function i(r,l){n.bind(t,Uo(r).join(" "),function(d){l.apply(l,Ts(d.detail)?d.detail:[])})}function o(r){n.dispatch(t,r,si(arguments,1))}return e&&e.event.on(As,n.destroy),Wo(n,{bus:t,on:i,off:Yt(n.unbind,t),emit:o})}function Jr(e,t,n,i){var o=Date.now,r,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?ii((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();d=cl(p)}}function w(C){C||h(),r=o()-(C?l*e:0),c=!1,d=cl(p)}function x(){c=!0}function f(){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:w,rewind:f,pause:x,cancel:h,set:y,isPaused:b}}function Wp(e){var t=e;function n(o){t=o}function i(o){return Rs(Uo(o),t)}return{set:n,is:i}}function Np(e,t){var n=Jr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Hp(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=cd(),d=[];function c(){var h=n.mediaQuery==="min";_o(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,ll),w()}function u(h){h&&l.destroy()}function p(h,y){var b=matchMedia(y);l.bind(b,"change",w),d.push([h,b])}function w(){var h=i.is(Wr),y=n.direction,b=d.reduce(function(C,v){return Zn(C,v[1].matches?v[0]:{})},{});dl(n),f(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):y!==n.direction&&e.refresh()}function x(h){matchMedia(ll).matches&&(h?Zn(n,r):dl(n,_o(r)))}function f(h,y,b){Zn(n,h),y&&Zn(Object.getPrototypeOf(n),h),(b||!i.is(Bi))&&e.emit(cn,n)}return{setup:c,destroy:u,reduce:x,set:f}}var Qr="Arrow",ea=Qr+"Left",ta=Qr+"Right",Cd=Qr+"Up",Td=Qr+"Down",ml="rtl",na="ttb",ha={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Cd,ta],ArrowRight:[Td,ea]};function Op(e,t,n){function i(r,l,d){d=d||n.direction;var c=d===ml&&!l?1:d===na?0:-1;return ha[r]&&ha[r][c]||r.replace(/width|left|right/i,function(u,p){var w=ha[u.toLowerCase()][c]||u;return p>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(r){return r*(n.direction===ml?1:-1)}return{resolve:i,orient:o}}var Dn="role",Ui="tabindex",Dp="disabled",Cn="aria-",Jo=Cn+"controls",Ld=Cn+"current",gl=Cn+"selected",vn=Cn+"label",Hs=Cn+"labelledby",Rd=Cn+"hidden",Os=Cn+"orientation",Oo=Cn+"roledescription",hl=Cn+"live",fl=Cn+"busy",yl=Cn+"atomic",Ds=[Dn,Ui,Dp,Jo,Ld,vn,Hs,Rd,Os,Oo],_n=Zo+"__",ci="is-",fa=Zo,vl=_n+"track",jp=_n+"list",ia=_n+"slide",Id=ia+"--clone",zp=ia+"__container",js=_n+"arrows",oa=_n+"arrow",Ed=oa+"--prev",Md=oa+"--next",ra=_n+"pagination",Pd=ra+"__page",Bp=_n+"progress",Vp=Bp+"__bar",Gp=_n+"toggle",qp=_n+"spinner",Xp=_n+"sr",Up=ci+"initialized",Ri=ci+"active",kd=ci+"prev",Ad=ci+"next",ns=ci+"visible",is=ci+"loading",Fd=ci+"focus-in",_d=ci+"overflow",Yp=[Ri,ns,kd,Ad,is,Fd,_d],Kp={slide:ia,clone:Id,arrows:js,arrow:oa,prev:Ed,next:Md,pagination:ra,page:Pd,spinner:qp};function Zp(e,t){if(nd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Fo(n,t);)n=n.parentElement;return n}var Jp=5,xl=200,Wd="touchstart mousedown",ya="touchmove mousemove",va="touchend touchcancel mouseup click";function Qp(e,t,n){var i=Jt(e),o=i.on,r=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],w=[],x,f,h;function y(){S(),H(),v()}function b(){o(en,C),o(en,y),o(cn,v),r(document,Wd+" keydown",function(O){h=O.type==="keydown"},{capture:!0}),r(l,"focusin",function(){Hn(l,Fd,!!h)})}function C(O){var R=Ds.concat("style");Bn(u),On(l,p),On(x,w),An([x,f],R),An(l,O?R:["style",Oo])}function v(){On(l,p),On(x,w),p=U(fa),w=U(vl),kn(l,p),kn(x,w),Rt(l,vn,n.label),Rt(l,Hs,n.labelledby)}function S(){x=N("."+vl),f=Ko(x,"."+jp),Eo(x&&f,"A track/list element is missing."),Mr(u,od(f,"."+ia+":not(."+Id+")")),Ci({arrows:js,pagination:ra,prev:Ed,next:Md,bar:Vp,toggle:Gp},function(O,R){c[R]=N("."+O)}),Wo(c,{root:l,track:x,list:f,slides:u})}function H(){var O=l.id||Fp(Zo),R=n.role;l.id=O,x.id=x.id||O+"-track",f.id=f.id||O+"-list",!$n(l,Dn)&&l.tagName!=="SECTION"&&R&&Rt(l,Dn,R),Rt(l,Oo,d.carousel),Rt(f,Dn,"presentation")}function N(O){var R=sd(l,O);return R&&Zp(R,"."+fa)===l?R:void 0}function U(O){return[O+"--"+n.type,O+"--"+n.direction,n.drag&&O+"--draggable",n.isNavigation&&O+"--nav",O===fa&&Ri]}return Wo(c,{setup:y,mount:b,destroy:C})}var eo="slide",ho="loop",Qo="fade";function em(e,t,n,i){var o=Jt(e),r=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,w=p.isNavigation,x=p.updateOnMove,f=p.i18n,h=p.pagination,y=p.slideFocus,b=c.Direction.resolve,C=$n(i,"style"),v=$n(i,vn),S=n>-1,H=Ko(i,"."+zp),N;function U(){S||(i.id=u.id+"-slide"+Ps(t+1),Rt(i,Dn,h?"tabpanel":"group"),Rt(i,Oo,f.slide),Rt(i,vn,v||es(f.slideLabel,[t+1,e.length]))),O()}function O(){d(i,"click",Yt(l,ks,ee)),d(i,"keydown",Yt(l,Sd,ee)),r([go,$d,Ei],M),r(Fs,B),x&&r(Vn,$)}function R(){N=!0,o.destroy(),On(i,Yp),An(i,Ds),Rt(i,"style",C),Rt(i,vn,v||"")}function B(){var T=e.splides.map(function(j){var K=j.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Rt(i,vn,es(f.slideX,(S?n:t)+1)),Rt(i,Jo,T),Rt(i,Dn,y?"button":""),y&&An(i,Oo)}function $(){N||M()}function M(){if(!N){var T=e.index;_(),A(),Hn(i,kd,t===T-1),Hn(i,Ad,t===T+1)}}function _(){var T=P();T!==ul(i,Ri)&&(Hn(i,Ri,T),Rt(i,Ld,w&&T||""),l(T?dd:ud,ee))}function A(){var T=I(),j=!T&&(!P()||S);if(e.state.is([mo,qo])||Rt(i,Rd,j||""),Rt(Es(i,p.focusableNodes||""),Ui,j?-1:""),y&&Rt(i,Ui,j?-1:0),T!==ul(i,ns)&&(Hn(i,ns,T),l(T?pd:md,ee)),!T&&document.activeElement===i){var K=c.Slides.getAt(e.index);K&&rd(K.slide)}}function m(T,j,K){Sn(K&&H||i,T,j)}function P(){var T=e.index;return T===t||p.cloneStatus&&T===n}function I(){if(e.is(Qo))return P();var T=fn(c.Elements.track),j=fn(i),K=b("left",!0),ce=b("right",!0);return Hr(T[K])<=Ho(j[K])&&Hr(j[ce])<=Ho(T[ce])}function V(T,j){var K=un(T-t);return!S&&(p.rewind||e.is(ho))&&(K=ii(K,e.length-K)),K<=j}var ee={index:t,slideIndex:n,slide:i,container:H,isClone:S,mount:U,destroy:R,update:M,style:m,isWithin:V};return ee}function tm(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function w(){x(),o(en,f),o(en,x)}function x(){c.forEach(function(M,_){y(M,_,-1)})}function f(){N(function(M){M.destroy()}),Bn(p)}function h(){N(function(M){M.update()})}function y(M,_,A){var m=em(e,_,A,M);m.mount(),p.push(m),p.sort(function(P,I){return P.index-I.index})}function b(M){return M?U(function(_){return!_.isClone}):p}function C(M){var _=t.Controller,A=_.toIndex(M),m=_.hasFocus()?1:n.perPage;return U(function(P){return Pr(P.index,A,A+m-1)})}function v(M){return U(M)[0]}function S(M,_){bn(M,function(A){if(ni(A)&&(A=ad(A)),id(A)){var m=c[_];m?Is(A,m):Yo(u,A),kn(A,n.classes.slide),R(A,Yt(r,Qi))}}),r(en)}function H(M){Li(U(M).map(function(_){return _.slide})),r(en)}function N(M,_){b(_).forEach(M)}function U(M){return p.filter(nd(M)?M:function(_){return ni(M)?Fo(_.slide,M):Rs(Uo(M),_.index)})}function O(M,_,A){N(function(m){m.style(M,_,A)})}function R(M,_){var A=Es(M,"img"),m=A.length;m?A.forEach(function(P){l(P,"load error",function(){--m||_()})}):_()}function B(M){return M?c.length:p.length}function $(){return p.length>n.perPage}return{mount:w,destroy:f,update:h,register:y,get:b,getIn:C,getAt:v,add:S,remove:H,forEach:N,filter:U,style:O,getLength:B,isEnough:$}}function nm(e,t,n){var i=Jt(e),o=i.on,r=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,w=u.track,x=u.list,f=d.getAt,h=d.style,y,b,C;function v(){S(),r(window,"resize load",Np(Yt(l,Qi))),o([cn,en],S),o(Qi,H)}function S(){y=n.direction===na,Sn(p,"maxWidth",mi(n.width)),Sn(w,c("paddingLeft"),N(!1)),Sn(w,c("paddingRight"),N(!0)),H(!0)}function H(ee){var T=fn(p);(ee||b.width!==T.width||b.height!==T.height)&&(Sn(w,"height",U()),h(c("marginRight"),mi(n.gap)),h("width",R()),h("height",B(),!0),b=T,l(Kr),C!==(C=V())&&(Hn(p,_d,C),l(_p,C)))}function N(ee){var T=n.padding,j=c(ee?"right":"left");return T&&mi(T[j]||(Ao(T)?0:T))||"0px"}function U(){var ee="";return y&&(ee=O(),Eo(ee,"height or heightRatio is missing."),ee="calc("+ee+" - "+N(!1)+" - "+N(!0)+")"),ee}function O(){return mi(n.height||fn(x).width*n.heightRatio)}function R(){return n.autoWidth?null:mi(n.fixedWidth)||(y?"":$())}function B(){return mi(n.fixedHeight)||(y?n.autoHeight?null:$():O())}function $(){var ee=mi(n.gap);return"calc((100%"+(ee&&" + "+ee)+")/"+(n.perPage||1)+(ee&&" - "+ee)+")"}function M(){return fn(x)[c("width")]}function _(ee,T){var j=f(ee||0);return j?fn(j.slide)[c("width")]+(T?0:P()):0}function A(ee,T){var j=f(ee);if(j){var K=fn(j.slide)[c("right")],ce=fn(x)[c("left")];return un(K-ce)+(T?0:P())}return 0}function m(ee){return A(e.length-1)-A(0)+_(0,ee)}function P(){var ee=f(0);return ee&&parseFloat(Sn(ee.slide,c("marginRight")))||0}function I(ee){return parseFloat(Sn(w,c("padding"+(ee?"Right":"Left"))))||0}function V(){return e.is(Qo)||m(!0)>M()}return{mount:v,resize:H,listSize:M,slideSize:_,sliderSize:m,totalSize:A,getPadding:I,isOverflow:V}}var im=2;function om(e,t,n){var i=Jt(e),o=i.on,r=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,w),o([cn,Qi],f),(u=b())&&(h(u),t.Layout.resize(!0))}function w(){x(),p()}function x(){Li(c),Bn(c),i.destroy()}function f(){var C=b();u!==C&&(u<C||!C)&&i.emit(en)}function h(C){var v=l.get().slice(),S=v.length;if(S){for(;v.length<C;)Mr(v,v);Mr(v.slice(-C),v.slice(0,C)).forEach(function(H,N){var U=N<C,O=y(H.slide,N);U?Is(O,v[0].slide):Yo(r.list,O),Mr(c,O),l.register(O,N-C+(U?0:S),H.index)})}}function y(C,v){var S=C.cloneNode(!0);return kn(S,n.classes.clone),S.id=e.root.id+"-clone"+Ps(v+1),S}function b(){var C=n.clones;if(!e.is(ho))C=0;else if(Xo(C)){var v=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=v&&Ho(fn(r.track)[d("width")]/v);C=S||n[d("autoWidth")]&&e.length||n.perPage*im}return C}return{mount:p,destroy:x}}function rm(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,w=d.listSize,x=d.sliderSize,f=t.Direction,h=f.resolve,y=f.orient,b=t.Elements,C=b.list,v=b.track,S;function H(){S=t.Transition,o([li,Kr,cn,en],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),O(e.index),t.Slides.update())}function U(j,K,ce,se){j!==K&&ee(j>ce)&&(M(),R($(m(),j>ce),!0)),l(mo),r(Vn,K,ce,j),S.start(K,function(){l(Ji),r(go,K,ce,j),se&&se()})}function O(j){R(A(j,!0))}function R(j,K){if(!e.is(Qo)){var ce=K?j:B(j);Sn(C,"transform","translate"+h("X")+"("+ce+"px)"),j!==ce&&r($d)}}function B(j){if(e.is(ho)){var K=_(j),ce=K>t.Controller.getEnd(),se=K<0;(se||ce)&&(j=$(j,ce))}return j}function $(j,K){var ce=j-V(K),se=x();return j-=y(se*(Ho(un(ce)/se)||1))*(K?1:-1),j}function M(){R(m(),!0),S.cancel()}function _(j){for(var K=t.Slides.get(),ce=0,se=1/0,k=0;k<K.length;k++){var ae=K[k].index,q=un(A(ae,!0)-j);if(q<=se)se=q,ce=ae;else break}return ce}function A(j,K){var ce=y(p(j-1)-I(j));return K?P(ce):ce}function m(){var j=h("left");return fn(C)[j]-fn(v)[j]+y(u(!1))}function P(j){return n.trimSpace&&e.is(eo)&&(j=Oi(j,0,y(x(!0)-w()))),j}function I(j){var K=n.focus;return K==="center"?(w()-c(j,!0))/2:+K*c(j)||0}function V(j){return A(j?t.Controller.getEnd():0,!!n.trimSpace)}function ee(j){var K=y($(m(),j));return j?K>=0:K<=C[h("scrollWidth")]-fn(v)[h("width")]}function T(j,K){K=Xo(K)?m():K;var ce=j!==!0&&y(K)<y(V(!1)),se=j!==!1&&y(K)>y(V(!0));return ce||se}return{mount:H,move:U,jump:O,translate:R,shift:$,cancel:M,toIndex:_,toPosition:A,getPosition:m,getLimit:V,exceededLimit:T,reposition:N}}function am(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,w=p.isEnough,x=p.getLength,f=n.omitEnd,h=e.is(ho),y=e.is(eo),b=Yt(m,!1),C=Yt(m,!0),v=n.start||0,S,H=v,N,U,O;function R(){B(),o([cn,en,Or],B),o(Kr,$)}function B(){N=x(!0),U=n.perMove,O=n.perPage,S=ee();var q=Oi(v,0,f?S:N-1);q!==v&&(v=q,l.reposition())}function $(){S!==ee()&&r(Or)}function M(q,le,Z){if(!ae()){var xe=A(q),Ne=V(xe);Ne>-1&&(le||Ne!==v)&&(ce(Ne),l.move(xe,Ne,H,Z))}}function _(q,le,Z,xe){t.Scroll.scroll(q,le,Z,function(){var Ne=V(l.toIndex(d()));ce(f?ii(Ne,S):Ne),xe&&xe()})}function A(q){var le=v;if(ni(q)){var Z=q.match(/([+\-<>])(\d+)?/)||[],xe=Z[1],Ne=Z[2];xe==="+"||xe==="-"?le=P(v+ +(""+xe+(+Ne||1)),v):xe===">"?le=Ne?T(+Ne):b(!0):xe==="<"&&(le=C(!0))}else le=h?q:Oi(q,0,S);return le}function m(q,le){var Z=U||(k()?1:O),xe=P(v+Z*(q?-1:1),v,!(U||k()));return xe===-1&&y&&!ld(d(),c(!q),1)?q?0:S:le?xe:V(xe)}function P(q,le,Z){if(w()||k()){var xe=I(q);xe!==q&&(le=q,q=xe,Z=!1),q<0||q>S?!U&&(Pr(0,q,le,!0)||Pr(S,le,q,!0))?q=T(j(q)):h?q=Z?q<0?-(N%O||O):N:q:n.rewind?q=q<0?S:0:q=-1:Z&&q!==le&&(q=T(j(le)+(q<le?-1:1)))}else q=-1;return q}function I(q){if(y&&n.trimSpace==="move"&&q!==v)for(var le=d();le===u(q,!0)&&Pr(q,0,e.length-1,!n.rewind);)q<v?--q:++q;return q}function V(q){return h?(q+N)%N||0:q}function ee(){for(var q=N-(k()||h&&U?1:O);f&&q-- >0;)if(u(N-1,!0)!==u(q,!0)){q++;break}return Oi(q,0,N-1)}function T(q){return Oi(k()?q:O*q,0,S)}function j(q){return k()?ii(q,S):Hr((q>=S?N-1:q)/O)}function K(q){var le=l.toIndex(q);return y?Oi(le,0,S):le}function ce(q){q!==v&&(H=v,v=q)}function se(q){return q?H:v}function k(){return!Xo(n.focus)||n.isNavigation}function ae(){return e.state.is([mo,qo])&&!!n.waitForTransition}return{mount:R,go:M,scroll:_,getNext:b,getPrev:C,getAdjacent:m,getEnd:ee,setIndex:ce,getIndex:se,toIndex:T,toPage:j,toDest:K,hasFocus:k,isBusy:ae}}var sm="http://www.w3.org/2000/svg",lm="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",ar=40;function cm(e,t,n){var i=Jt(e),o=i.on,r=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,w=u.arrows,x=u.track,f=w,h=u.prev,y=u.next,b,C,v={};function S(){N(),o(cn,H)}function H(){U(),S()}function N(){var _=n.arrows;_&&!(h&&y)&&B(),h&&y&&(Wo(v,{prev:h,next:y}),No(f,_?"":"none"),kn(f,C=js+"--"+n.direction),_&&(O(),M(),Rt([h,y],Jo,x.id),l(yd,h,y)))}function U(){i.destroy(),On(f,C),b?(Li(w?[h,y]:f),h=y=null):An([h,y],Ds)}function O(){o([li,go,en,Ei,Or],M),r(y,"click",Yt(R,">")),r(h,"click",Yt(R,"<"))}function R(_){p.go(_,!0)}function B(){f=w||Xi("div",d.arrows),h=$(!0),y=$(!1),b=!0,Yo(f,[h,y]),!w&&Is(f,x)}function $(_){var A='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+sm+'" viewBox="0 0 '+ar+" "+ar+'" width="'+ar+'" height="'+ar+'" focusable="false"><path d="'+(n.arrowPath||lm)+'" />';return ad(A)}function M(){if(h&&y){var _=e.index,A=p.getPrev(),m=p.getNext(),P=A>-1&&_<A?c.last:c.prev,I=m>-1&&_>m?c.first:c.next;h.disabled=A<0,y.disabled=m<0,Rt(h,vn,P),Rt(y,vn,I),l(vd,h,y,A,m)}}return{arrows:v,mount:S,destroy:U,update:M}}var dm=Ms+"-interval";function um(e,t,n){var i=Jt(e),o=i.on,r=i.bind,l=i.emit,d=Jr(n.interval,e.go.bind(e,">"),O),c=d.isPaused,u=t.Elements,p=t.Elements,w=p.root,x=p.toggle,f=n.autoplay,h,y,b=f==="pause";function C(){f&&(v(),x&&Rt(x,Jo,u.track.id),b||S(),U())}function v(){n.pauseOnHover&&r(w,"mouseenter mouseleave",function(B){h=B.type==="mouseenter",N()}),n.pauseOnFocus&&r(w,"focusin focusout",function(B){y=B.type==="focusin",N()}),x&&r(x,"click",function(){b?S():H(!0)}),o([Vn,Zr,en],d.rewind),o(Vn,R)}function S(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=h=b=!1,U(),l(_s))}function H(B){B===void 0&&(B=!0),b=!!B,U(),c()||(d.pause(),l(Ws))}function N(){b||(h||y?H(!1):S())}function U(){x&&(Hn(x,Ri,!b),Rt(x,vn,n.i18n[b?"play":"pause"]))}function O(B){var $=u.bar;$&&Sn($,"width",B*100+"%"),l(wd,B)}function R(B){var $=t.Slides.getAt(B);d.set($&&+$n($.slide,dm)||n.interval)}return{mount:C,destroy:d.cancel,play:S,pause:H,isPaused:c}}function pm(e,t,n){var i=Jt(e),o=i.on;function r(){n.cover&&(o(Ns,Yt(d,!0)),o([li,cn,en],Yt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Ko(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),No(u,c?"none":"")}return{mount:r,destroy:Yt(l,!1)}}var mm=10,gm=600,hm=.6,fm=1.5,ym=800;function vm(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,w=d.translate,x=e.is(eo),f,h,y=1;function b(){o(Vn,H),o([cn,en],N)}function C(O,R,B,$,M){var _=c();if(H(),B&&(!x||!p())){var A=t.Layout.sliderSize(),m=Qa(O)*A*Hr(un(O)/A)||0;O=d.toPosition(t.Controller.toDest(O%A))+m}var P=ld(_,O,1);y=1,R=P?0:R||Nr(un(O-_)/fm,ym),h=$,f=Jr(R,v,Yt(S,_,O,M),1),l(qo),r(Zr),f.start()}function v(){l(Ji),h&&h(),r(Ei)}function S(O,R,B,$){var M=c(),_=O+(R-O)*U($),A=(_-M)*y;w(M+A),x&&!B&&p()&&(y*=hm,un(A)<mm&&C(u(p(!0)),gm,!1,h,!0))}function H(){f&&f.cancel()}function N(){f&&!f.isPaused()&&(H(),v())}function U(O){var R=n.easingFunc;return R?R(O):1-Math.pow(1-O,4)}return{mount:b,destroy:H,scroll:C,cancel:N}}var Di={passive:!1,capture:!0};function xm(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,w=t.Controller,x=t.Elements.track,f=t.Media.reduce,h=t.Direction,y=h.resolve,b=h.orient,C=u.getPosition,v=u.exceededLimit,S,H,N,U,O,R=!1,B,$,M;function _(){l(x,ya,Za,Di),l(x,va,Za,Di),l(x,Wd,m,Di),l(x,"click",V,{capture:!0}),l(x,"dragstart",Nn),o([li,cn],A)}function A(){var Q=n.drag;ue(!Q),U=Q==="free"}function m(Q){if(B=!1,!$){var de=Ne(Q);xe(Q.target)&&(de||!Q.button)&&(w.isBusy()?Nn(Q,!0):(M=de?x:window,O=c.is([mo,qo]),N=null,l(M,ya,P,Di),l(M,va,I,Di),u.cancel(),p.cancel(),ee(Q)))}}function P(Q){if(c.is(Er)||(c.set(Er),r(gd)),Q.cancelable)if(O){u.translate(S+Z(k(Q)));var de=ae(Q)>xl,ne=R!==(R=v());(de||ne)&&ee(Q),B=!0,r(hd),Nn(Q)}else K(Q)&&(O=j(Q),Nn(Q))}function I(Q){c.is(Er)&&(c.set(Ji),r(fd)),O&&(T(Q),Nn(Q)),d(M,ya,P),d(M,va,I),O=!1}function V(Q){!$&&B&&Nn(Q,!0)}function ee(Q){N=H,H=Q,S=C()}function T(Q){var de=ce(Q),ne=se(de),Ee=n.rewind&&n.rewindByDrag;f(!1),U?w.scroll(ne,0,n.snap):e.is(Qo)?w.go(b(Qa(de))<0?Ee?"<":"-":Ee?">":"+"):e.is(eo)&&R&&Ee?w.go(v(!0)?">":"<"):w.go(w.toDest(ne),!0),f(!0)}function j(Q){var de=n.dragMinThreshold,ne=Ao(de),Ee=ne&&de.mouse||0,Te=(ne?de.touch:+de)||10;return un(k(Q))>(Ne(Q)?Te:Ee)}function K(Q){return un(k(Q))>un(k(Q,!0))}function ce(Q){if(e.is(ho)||!R){var de=ae(Q);if(de&&de<xl)return k(Q)/de}return 0}function se(Q){return C()+Qa(Q)*ii(un(Q)*(n.flickPower||600),U?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Q,de){return le(Q,de)-le(q(Q),de)}function ae(Q){return Ja(Q)-Ja(q(Q))}function q(Q){return H===Q&&N||H}function le(Q,de){return(Ne(Q)?Q.changedTouches[0]:Q)["page"+y(de?"Y":"X")]}function Z(Q){return Q/(R&&e.is(eo)?Jp:1)}function xe(Q){var de=n.noDrag;return!Fo(Q,"."+Pd+", ."+oa)&&(!de||!Fo(Q,de))}function Ne(Q){return typeof TouchEvent<"u"&&Q instanceof TouchEvent}function ye(){return O}function ue(Q){$=Q}return{mount:_,disable:ue,isDragging:ye}}var bm={Spacebar:" ",Right:ta,Left:ea,Up:Cd,Down:Td};function zs(e){return e=ni(e)?e:e.key,bm[e]||e}var bl="keydown";function wm(e,t,n){var i=Jt(e),o=i.on,r=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function w(){x(),o(cn,f),o(cn,x),o(Vn,y)}function x(){var C=n.keyboard;C&&(u=C==="global"?window:d,r(u,bl,b))}function f(){l(u,bl)}function h(C){p=C}function y(){var C=p;p=!0,td(function(){p=C})}function b(C){if(!p){var v=zs(C);v===c(ea)?e.go("<"):v===c(ta)&&e.go(">")}}return{mount:w,destroy:f,disable:h}}var Mo=Ms+"-lazy",kr=Mo+"-srcset",Sm="["+Mo+"], ["+kr+"]";function $m(e,t,n){var i=Jt(e),o=i.on,r=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[go,Ei],p=[];function w(){n.lazyLoad&&(x(),o(en,x))}function x(){Bn(p),f(),c?C():(r(u),o(u,h),h())}function f(){t.Slides.forEach(function(v){Es(v.slide,Sm).forEach(function(S){var H=$n(S,Mo),N=$n(S,kr);if(H!==S.src||N!==S.srcset){var U=n.classes.spinner,O=S.parentElement,R=Ko(O,"."+U)||Xi("span",U,O);p.push([S,v,R]),S.src||No(S,"none")}})})}function h(){p=p.filter(function(v){var S=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,S)?y(v):!0}),p.length||r(u)}function y(v){var S=v[0];kn(v[1].slide,is),l(S,"load error",Yt(b,v)),Rt(S,"src",$n(S,Mo)),Rt(S,"srcset",$n(S,kr)),An(S,Mo),An(S,kr)}function b(v,S){var H=v[0],N=v[1];On(N.slide,is),S.type!=="error"&&(Li(v[2]),No(H,""),d(Ns,H,N),d(Qi)),c&&C()}function C(){p.length&&y(p.shift())}return{mount:w,destroy:Yt(Bn,p),check:h}}function Cm(e,t,n){var i=Jt(e),o=i.on,r=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,w=u.getIndex,x=u.go,f=t.Direction.resolve,h=c.pagination,y=[],b,C;function v(){S(),o([cn,en,Or],v);var $=n.pagination;h&&No(h,$?"":"none"),$&&(o([Vn,Zr,Ei],B),H(),B(),r(xd,{list:b,items:y},R(e.index)))}function S(){b&&(Li(h?si(b.children):b),On(b,C),Bn(y),b=null),i.destroy()}function H(){var $=e.length,M=n.classes,_=n.i18n,A=n.perPage,m=p()?u.getEnd()+1:Ho($/A);b=h||Xi("ul",M.pagination,c.track.parentElement),kn(b,C=ra+"--"+O()),Rt(b,Dn,"tablist"),Rt(b,vn,_.select),Rt(b,Os,O()===na?"vertical":"");for(var P=0;P<m;P++){var I=Xi("li",null,b),V=Xi("button",{class:M.page,type:"button"},I),ee=d.getIn(P).map(function(j){return j.slide.id}),T=!p()&&A>1?_.pageX:_.slideX;l(V,"click",Yt(N,P)),n.paginationKeyboard&&l(V,"keydown",Yt(U,P)),Rt(I,Dn,"presentation"),Rt(V,Dn,"tab"),Rt(V,Jo,ee.join(" ")),Rt(V,vn,es(T,P+1)),Rt(V,Ui,-1),y.push({li:I,button:V,page:P})}}function N($){x(">"+$,!0)}function U($,M){var _=y.length,A=zs(M),m=O(),P=-1;A===f(ta,!1,m)?P=++$%_:A===f(ea,!1,m)?P=(--$+_)%_:A==="Home"?P=0:A==="End"&&(P=_-1);var I=y[P];I&&(rd(I.button),x(">"+P),Nn(M,!0))}function O(){return n.paginationDirection||n.direction}function R($){return y[u.toPage($)]}function B(){var $=R(w(!0)),M=R(w());if($){var _=$.button;On(_,Ri),An(_,gl),Rt(_,Ui,-1)}if(M){var A=M.button;kn(A,Ri),Rt(A,gl,!0),Rt(A,Ui,"")}r(bd,{list:b,items:y},$,M)}return{items:y,mount:v,destroy:S,getAt:R,update:B}}var Tm=[" ","Enter"];function Lm(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){r.forEach(function(h){h.destroy()}),Bn(r)}function c(){d(),l()}function u(h,y){var b=Jt(h);b.on(Vn,function(C,v,S){y.go(y.is(ho)?S:C)}),r.push(b)}function p(){var h=Jt(e),y=h.on;y(ks,x),y(Sd,f),y([li,cn],w),r.push(h),h.emit(Fs,e.splides)}function w(){Rt(t.Elements.list,Os,n.direction===na?"vertical":"")}function x(h){e.go(h.index)}function f(h,y){Rs(Tm,zs(y))&&(x(h),Nn(y))}return{setup:Yt(t.Media.set,{slideFocus:Xo(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Rm(e,t,n){var i=Jt(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Di)}function d(u){if(u.cancelable){var p=u.deltaY,w=p<0,x=Ja(u),f=n.wheelMinThreshold||0,h=n.wheelSleep||0;un(p)>f&&x-r>h&&(e.go(w?"<":">"),r=x),c(w)&&Nn(u)}}function c(u){return!n.releaseWheel||e.state.is(mo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Im=90;function Em(e,t,n){var i=Jt(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,d=Xi("span",Xp),c=Jr(Im,Yt(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Rt(r,yl,!0),d.textContent="…",o(_s,Yt(x,!0)),o(Ws,Yt(x,!1)),o([go,Ei],Yt(p,!0)))}function p(f){Rt(r,fl,f),f?(Yo(r,d),c.start()):(Li(d),c.cancel())}function w(){An(r,[hl,yl,fl]),Li(d)}function x(f){l&&Rt(r,hl,f?"off":"polite")}return{mount:u,disable:x,destroy:w}}var Mm=Object.freeze({__proto__:null,Media:Hp,Direction:Op,Elements:Qp,Slides:tm,Layout:nm,Clones:om,Move:rm,Controller:am,Arrows:cm,Autoplay:um,Cover:pm,Scroll:vm,Drag:xm,Keyboard:wm,LazyLoad:$m,Pagination:Cm,Sync:Lm,Wheel:Rm,Live:Em}),Pm={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"},km={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Kp,i18n:Pm,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Am(e,t,n){var i=t.Slides;function o(){Jt(e).on([li,en],r)}function r(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),td(c)}return{mount:o,start:l,cancel:Za}}function Fm(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,d=Yt(Sn,l,"transition"),c;function u(){Jt(e).bind(l,"transitionend",function(f){f.target===l&&c&&(w(),c())})}function p(f,h){var y=i.toPosition(f,!0),b=i.getPosition(),C=x(f);un(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(f),h())}function w(){d(""),r.cancel()}function x(f){var h=n.rewindSpeed;if(e.is(eo)&&h){var y=o.getIndex(!0),b=o.getEnd();if(y===0&&f>=b||y>=b&&f===0)return h}return n.speed}return{mount:u,start:p,cancel:w}}var _m=(function(){function e(n,i){this.event=Jt(),this.Components={},this.state=Wp(Bi),this.splides=[],this._o={},this._E={};var o=ni(n)?sd(document,n):n;Eo(o,o+" is invalid."),this.root=o,i=Zn({label:$n(o,vn)||"",labelledby:$n(o,Hs)||""},km,e.defaults,i||{});try{Zn(i,JSON.parse($n(o,Ms)))}catch{Eo(!1,"Invalid JSON")}this._o=Object.create(Zn({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,d=this.Components;Eo(l.is([Bi,Wr]),"Already mounted!"),l.set(Bi),this._C=d,this._T=o||this._T||(this.is(Qo)?Am:Fm),this._E=i||this._E;var c=Wo({},Mm,this._E,{Transition:this._T});return Ci(c,function(u,p){var w=u(r,d,r._o);d[p]=w,w.setup&&w.setup()}),Ci(d,function(u){u.mount&&u.mount()}),this.emit(li),kn(this.root,Up),l.set(Ji),this.emit(ts),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Ji)&&(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(si(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(Bi)?Jt(this).on(ts,this.destroy.bind(this,i)):(Ci(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(As),o.destroy(),i&&Bn(this.splides),r.set(Wr)),this},Pp(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})(),Bs=_m;Bs.defaults={};Bs.STATES=Ap;var wl=[[li,"onMounted"],[ts,"onReady"],[Vn,"onMove"],[go,"onMoved"],[ks,"onClick"],[dd,"onActive"],[ud,"onInactive"],[pd,"onVisible"],[md,"onHidden"],[en,"onRefresh"],[cn,"onUpdated"],[Qi,"onResize"],[Kr,"onResized"],[gd,"onDrag"],[hd,"onDragging"],[fd,"onDragged"],[Zr,"onScroll"],[Ei,"onScrolled"],[As,"onDestroy"],[yd,"onArrowsMounted"],[vd,"onArrowsUpdated"],[xd,"onPaginationMounted"],[bd,"onPaginationUpdated"],[Fs,"onNavigationMounted"],[_s,"onAutoplayPlay"],[wd,"onAutoplayPlaying"],[Ws,"onAutoplayPause"],[Ns,"onLazyLoadLoaded"]];function Vs(...e){return e.filter(Boolean).join(" ")}function Dr(e){return e!==null&&typeof e=="object"}function os(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!os(n,t[i]));if(Dr(e)&&Dr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!os(e[o],t[o]))}return e===t}function Wm(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Nm(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 Nm(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Dr(i)?n[o]=rs(Dr(n[o])?n[o]:{},i):n[o]=i}),n}var Hm=({children:e,className:t,...n})=>s.createElement("div",{className:Vs("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Gs=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 Bs(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&&!os(this.options,e)&&(this.splide.options=e,this.options=rs({},e));const t=this.getSlides();Wm(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){wl.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:Vs("splide",e),ref:this.splideRef,...this.omit(o,["options",...wl.map(r=>r[1])])},n?s.createElement(Hm,null,i):i)}},qs=({children:e,className:t,...n})=>s.createElement("li",{className:Vs("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 Hm="RichTextRenderer-module__link___BWeZ2",Om={link:Hm},Dm=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))},go=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Dm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function sn(e){const{color:t,...n}=e;return n}function Yt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:go(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:D.scalingValue(e.letterSpacing,t),wordSpacing:D.scalingValue(e.wordSpacing,t),fontSize:D.scalingValue(n,t),lineHeight:i!==void 0?D.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const Ri=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Om.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:jm(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 jm(e){return{...e.fontFamily&&{fontFamily:go(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 zm="SvgImage-module__svg___q3xE-",Bm="SvgImage-module__img___VsTm-",wl={svg:zm,img:Bm},Vm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},Gm=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ln=({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)}},[]),!Vm(e)||!r?a.jsx("img",{src:e,alt:"",className:yt(wl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:yt(wl.svg,i),style:{"--svg":Gm(e),"--fill":t,"--hover-fill":n,...o??{}}})},qm={"top-left":ht.topLeftAlignment,"top-center":ht.topCenterAlignment,"top-right":ht.topRightAlignment,"middle-left":ht.middleLeftAlignment,"middle-center":ht.middleCenterAlignment,"middle-right":ht.middleRightAlignment,"bottom-left":ht.bottomLeftAlignment,"bottom-center":ht.bottomCenterAlignment,"bottom-right":ht.bottomRightAlignment};function Xm({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:b,textAppearance:v,color:g}=n.imageCaption??{},[h,f]=s.useState(void 0),[x,S]=s.useState(null),[y,w]=s.useState(0),[H,N]=s.useState(0),{direction:U,transition:O,controls:C,pagination:V,imageCaption:$,triggers:R}=e,k=s.useRef(O.type),{x:T,y:m}=e.controls.offset,M=E=>{o&&o.go(E)};return s.useEffect(()=>{if(!x)return;const E=new ResizeObserver(z=>{if(!o)return;const[ne]=z;f({width:Math.round(ne.contentRect.width),height:Math.round(ne.contentRect.height)})});return E.observe(x),()=>E.unobserve(x)},[x]),s.useEffect(()=>{!o||k.current===O.type||(N(E=>E+1),k.current=O.type)},[O.type]),a.jsx("div",{className:yt(ht.wrapper,{[ht.editor]:i}),ref:S,children:a.jsxs("div",{className:ht.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:O.backgroundColor&&O.type==="fade in"?O.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:yt(ht.captionBlock),children:a.jsx("div",{className:ht.captionTextWrapper,children:t.map((E,z)=>a.jsx("div",{className:yt(ht.captionText,qm[$.alignment],{[ht.withPointerEvents]:z===y&&i,[ht.active]:z===y}),style:{fontFamily:go(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":D.scalingValue(l.width,i),letterSpacing:D.scalingValue(c,i),wordSpacing:D.scalingValue(p,i),textAlign:u,fontSize:D.scalingValue(b.fontSize,i),lineHeight:D.scalingValue(b.lineHeight,i),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:g,transitionDuration:O.duration?`${Math.round(parseInt(O.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ht.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:D.scalingValue($.offset.y,i),left:D.scalingValue($.offset.x,i)},children:a.jsx(Ri,{content:E.imageCaption})})},z))})}),a.jsx(Vs,{onMove:E=>{w(E.index)},ref:r,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:U==="horiz"||O.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:O.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((E,z)=>a.jsx(Gs,{children:a.jsx("div",{className:ht.sliderItem,children:a.jsx("div",{className:ht.imgWrapper,children:a.jsx("img",{className:yt(ht.sliderImage,{[ht.contain]:E.image.objectFit==="contain",[ht.cover]:E.image.objectFit==="cover"}),src:E.image.url,alt:E.image.name??""})})})},z))},H),C.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:yt(ht.arrow,{[ht.arrowVertical]:U==="vert",[ht.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{onClick:()=>{M("-1")},className:ht.arrowInner,style:{transform:`translate(${D.scalingValue(T,i)}, ${D.scalingValue(m*(U==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&a.jsx(ln,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:yt(ht.arrowImg,ht.mirror)}),!C.arrowsImgUrl&&a.jsx(Sl,{color:C.color,className:yt(ht.arrowIcon,ht.arrowImg,ht.mirror)})]})}),a.jsx("div",{className:yt(ht.arrow,ht.nextArrow,{[ht.arrowVertical]:U==="vert",[ht.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{className:ht.arrowInner,onClick:()=>M("+1"),style:{transform:`translate(${D.scalingValue(T*(U==="horiz"?-1:1),i)}, ${D.scalingValue(m,i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&a.jsx(ln,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ht.arrowImg}),!C.arrowsImgUrl&&a.jsx(Sl,{color:C.color,className:yt(ht.arrowIcon,ht.arrowImg)})]})})]}),R.triggersList.click&&a.jsx("div",{className:ht.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&a.jsx("div",{className:yt(ht.pagination,{[ht.paginationInsideBottom]:V.position==="inside-1"&&U==="horiz",[ht.paginationInsideTop]:V.position==="inside-2"&&U==="horiz",[ht.paginationOutsideBottom]:V.position==="outside-1"&&U==="horiz",[ht.paginationOutsideTop]:V.position==="outside-2"&&U==="horiz",[ht.paginationInsideLeft]:V.position==="inside-1"&&U==="vert",[ht.paginationInsideRight]:V.position==="inside-2"&&U==="vert",[ht.paginationOutsideLeft]:V.position==="outside-1"&&U==="vert",[ht.paginationOutsideRight]:V.position==="outside-2"&&U==="vert",[ht.paginationVertical]:U==="vert"}),children:a.jsx("div",{className:ht.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${D.scalingValue(V.offset.x,i)}, ${D.scalingValue(V.offset.y,i)}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:t.map((E,z)=>a.jsx("button",{onClick:()=>{o&&o.go(z)},className:yt(ht.paginationItem),children:a.jsx("div",{className:yt(ht.dot,{[ht.activeDot]:z===y}),style:{backgroundColor:z===y?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},z))})})]})})}function Sl({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 Um={element:Xm,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"]}},Ym="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Km="ImageRevealSlider-module__image___Qjt-e",Zm="ImageRevealSlider-module__link___N-iLG",Jm="ImageRevealSlider-module__cursor___2U03d",Pi={imageRevealSlider:Ym,image:Km,link:Zm,cursor:Jm};function $l(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 xa(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Qm(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await xa(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await xa(e);r=l.height/l.width*o}else{const l=await xa(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function eg({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,b]=s.useState({x:0,y:0}),[v,g]=s.useState(1),[h,f]=s.useState("none"),x=s.useRef({x:0,y:0}),[S,y]=s.useState(!1),{sizeType:w,imageWidth:H,randomRangeImageWidth:N}=e.imageSize,{revealPosition:U,visible:O}=e.position,{cursorType:C,target:V,defaultCursorScale:$,defaultCursor:R,hoverCursorScale:k,hoverCursor:T}=e.cursor;s.useEffect(()=>{if(!i)return;const E=(I,W)=>{const K=i.getBoundingClientRect(),ae=I-K.left,de=W-K.top;if(b({x:ae,y:de}),C==="system"){f("none"),g(1);return}const A=ae,he=de,q=document.elementFromPoint(K.left+A,K.top+he);if(q&&q.closest("a")){f("none"),g(1);return}const ce=$l(A,he,r)||V==="area"?{img:T??"none",scale:k}:{img:R??"none",scale:$};f(ce.img),g(ce.scale)},z=I=>{I.stopPropagation(),x.current={x:I.clientX,y:I.clientY},E(I.clientX,I.clientY)},ne=()=>{S&&E(x.current.x,x.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",ne,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",ne,!0)}},[i,S,p,C,V,T,R,k,$,r]),s.useEffect(()=>{S||(f("none"),g(0))},[S]);const m=async(E,z,ne,I={})=>{const{width:W,height:K,finalWidth:ae}=await Qm(E.image.url,w,H,N);let de=0,A=0;U==="same"?(de=z/2,A=ne/2):(de=I.x??Math.random()*z,A=I.y??Math.random()*ne);const he=Math.min(Math.max(de,W/2),z-W/2),q=Math.min(Math.max(A,K/2),ne-K/2);return{id:u.current++,url:E.image.url,link:E.link,name:E.image.name,x:he,y:q,width:ae}};s.useEffect(()=>{if(!i||t.length===0)return;const E=i.getBoundingClientRect(),z=E.width,ne=E.height,I=[];(async()=>{const K=t[0],ae=await m(K,z,ne);I.push(ae),l(I),c(1)})()},[w,H,N,U,i]),s.useEffect(()=>{O==="last One"&&l(E=>E.length>0?[E[E.length-1]]:[])},[O]);const M=async E=>{if(!i)return;const z=i.getBoundingClientRect(),ne=E.clientX-z.left,I=E.clientY-z.top;if(V==="image"&&!$l(ne,I,r))return;let W=0,K=0;U==="on Click"?(W=ne,K=I):U==="same"?(W=z.width/2,K=z.height/2):(W=Math.random()*z.width,K=Math.random()*z.height);const ae=t[d],de=await m(ae,z.width,z.height,{x:W,y:K});l(A=>O==="all"?[...A,de]:[de]),c(A=>A>=t.length-1?0:A+1)};return a.jsxs("div",{ref:o,onClick:M,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Pi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(E=>a.jsx("div",{className:Pi.wrapper,style:{top:`${E.y}px`,left:`${E.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:E.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:V==="area"&&E.link?a.jsx("a",{href:E.link,target:"_blank",className:Pi.link,children:a.jsx("img",{src:E.url,alt:E.name,className:Pi.image},E.id)}):a.jsx("img",{src:E.url,alt:E.name,className:Pi.image},E.id)},E.id)),S&&a.jsx("div",{className:Pi.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 tg={element:eg,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:""}]}}}},ng="LightBox-module__hidden___9s-9x",ig="LightBox-module__heroImage___sTxNF",og="LightBox-module__background___rm9ml",rg="LightBox-module__editor___4ACaY",ag="LightBox-module__contentStyle___Bgnsq",sg="LightBox-module__imageStyle___tLIlB",lg="LightBox-module__imgWrapper___LuFUp",cg="LightBox-module__contain___8-yaS",dg="LightBox-module__cover___hNvOG",ug="LightBox-module__caption___b6L2I",pg="LightBox-module__captionTextInner___rCGNH",mg="LightBox-module__lightboxSplide___XFuWC",gg="LightBox-module__arrow___iz38X",hg="LightBox-module__arrowVertical___Zfz81",fg="LightBox-module__nextArrow___zkAQN",yg="LightBox-module__arrowInner___p48sW",vg="LightBox-module__arrowIcon___3VaFf",xg="LightBox-module__arrowImg___pNV88",bg="LightBox-module__mirror___pjeXc",wg="LightBox-module__thumbsWrapper___GB-nU",Sg="LightBox-module__thumbsContainerVertical___wttk5",$g="LightBox-module__thumbsContainer___osSma",Cg="LightBox-module__thumbsAlignStart___MO6tY",Tg="LightBox-module__thumbsAlignCenter___Q4sUx",Lg="LightBox-module__thumbsAlignEnd___p4y9R",Rg="LightBox-module__thumbItem___HvnF3",Ig="LightBox-module__closeButton___g2khP",Eg="LightBox-module__fadeIn___0m5GW",Mg="LightBox-module__slideInLeft___gPYwC",Pg="LightBox-module__slideInRight___S-pPp",kg="LightBox-module__slideInTop___DFdAj",Ag="LightBox-module__slideInBottom___m27kZ",Fg="LightBox-module__fadeOut___55qBR",_g="LightBox-module__slideOutLeft___NvU7P",Wg="LightBox-module__slideOutRight___SK7eC",Ng="LightBox-module__slideOutTop___Vgg0z",Hg="LightBox-module__slideOutBottom___nJ0Ef",Og="LightBox-module__scaleSlide___vZriG",et={hidden:ng,heroImage:ig,background:og,editor:rg,contentStyle:ag,imageStyle:sg,imgWrapper:lg,contain:cg,cover:dg,caption:ug,captionTextInner:pg,lightboxSplide:mg,arrow:gg,arrowVertical:hg,nextArrow:fg,arrowInner:yg,arrowIcon:vg,arrowImg:xg,mirror:bg,thumbsWrapper:wg,thumbsContainerVertical:Sg,thumbsContainer:$g,thumbsAlignStart:Cg,thumbsAlignCenter:Tg,thumbsAlignEnd:Lg,thumbItem:Rg,closeButton:Ig,fadeIn:Eg,slideInLeft:Mg,slideInRight:Pg,slideInTop:kg,slideInBottom:Ag,fadeOut:Fg,slideOutLeft:_g,slideOutRight:Wg,slideOutTop:Ng,slideOutBottom:Hg,scaleSlide:Og},sr=(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% + ${D.scalingValue(t.x,n)}), calc(-50% + ${D.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${D.scalingValue(t.x,n)}, calc(-50% + ${D.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${D.scalingValue(t.x,n)}), ${D.scalingValue(t.y,n)})`:i.transform=`translate(${D.scalingValue(t.x,n)}, ${D.scalingValue(t.y,n)})`,i};function _d(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 Dg(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 Wd(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 jg(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 Nd(e,t,n,i,o){const{x:r,y:l}=Dg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function zg(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"?jg:Wd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:b,offsetY:v}=Nd(n,i,u,p,d),g=(b+u/2)/n*100,h=(v+p/2)/i*100;return`${g}% ${h}%`}function Bg(e){return zg(e)}function jr(e){const t=e.getBoundingClientRect(),n=_d(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}=Wd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:b}=Nd(i,o,d,c,u),v=t.left+n.left,g=t.top+n.top;return{x:p+v,y:b+g,width:d,height:c}}function Cl(e){const t=e.getBoundingClientRect(),n=_d(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Tl(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Vg(e,t){const n=(()=>{if(e==="fade in")return et.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return et.slideInLeft;case"right":return et.slideInRight;case"top":return et.slideInTop;case"bottom":return et.slideInBottom;default:return et.slideInRight}return et.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return et.fadeIn;if(e==="slide in")switch(t){case"left":return et.slideInLeft;case"right":return et.slideInRight;case"top":return et.slideInTop;case"bottom":return et.slideInBottom;default:return et.slideInRight}return et.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return et.fadeOut;if(e==="slide in")switch(t){case"left":return et.slideOutLeft;case"right":return et.slideOutRight;case"top":return et.slideOutTop;case"bottom":return et.slideOutBottom;default:return et.slideOutRight}return et.fadeOut})(),r=(()=>{if(e==="fade in")return et.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return et.slideOutLeft;case"right":return et.slideOutRight;case"top":return et.slideOutTop;case"bottom":return et.slideOutBottom;default:return et.slideOutRight}return et.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const Gg=({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:et.heroImage,onClick:()=>c(!0)}),a.jsx(qg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},qg=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:d})=>{var ie;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:b,wordSpacing:v,fontSizeLineHeight:g,textAppearance:h,color:f}=i.imageCaption??{},[x,S]=s.useState(0),[y,w]=s.useState(0),[H,N]=s.useState(!1),[U,O]=s.useState(!1),[C,V]=s.useState({}),$=s.useRef(null),R=s.useRef(null),k=s.useRef(null),T=s.useRef(!1),m=s.useRef(null),M=s.useRef(null),E=s.useRef(null),z=s.useRef(null),ne=s.useRef(!1),I=s.useRef(null),[W,K]=s.useState(!1),{appear:ae,triggers:de,slider:A,thumbnail:he,controls:q,area:ce,caption:Q,layout:be}=o.lightboxBlock,{appearClass:He,backdropAppearClass:xe,backdropDisappearClass:le,disappearClass:ee}=Vg(ae.type,ae.direction),ue=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const j=()=>{setTimeout(()=>{var J,te;(te=(J=$.current)==null?void 0:J.splide)==null||te.refresh()},16)},B=()=>{w(J=>J+1)};return window.addEventListener("ArticleEditor.Layout:change",j),window.addEventListener("ArticleEditor.ComponentContent:change",B),()=>{window.removeEventListener("ArticleEditor.Layout:change",j),window.removeEventListener("ArticleEditor.ComponentContent:change",B)}},[]),s.useEffect(()=>{if(!e||!he.isActive){K(!1);return}const j=I.current;if(!j)return;const B=()=>{A.direction==="horiz"?K(j.scrollWidth>j.clientWidth):K(j.scrollHeight>j.clientHeight)};B();const J=new ResizeObserver(B);return J.observe(j),()=>J.disconnect()},[e,he.isActive,n.length,C,A.direction]);const oe=s.useCallback(()=>{const j=window.matchMedia("(max-width: 768px)").matches,B=Tl(ce.color);j&&!l&&B>.9&&(document.body.style.backgroundColor=""),N(!0),T.current=!0;const J=te=>{te.target===m.current&&te.animationName&&(m.current&&M.current&&m.current.removeEventListener("animationend",M.current),M.current=null,T.current&&(T.current=!1,t()),N(!1))};m.current&&(M.current=J,m.current.addEventListener("animationend",J))},[t,ce.color,l]),Fe=(j,B,J)=>{var te,$e;if(j){if(de.type==="click"&&de.switch==="image")de.repeat==="close"&&x===n.length-1?oe():(te=$.current)==null||te.go("+1");else if(de.type==="click"&&de.switch==="50/50"){const ye=j.getBoundingClientRect(),F=B-ye.left,ve=J-ye.top,pe=ye.width,Z=ye.height;let me;A.direction==="horiz"?me=F<pe/2?"-1":"+1":me=ve<Z/2?"-1":"+1",($e=$.current)==null||$e.go(me)}}},Ce=j=>{if(ne.current){ne.current=!1;return}const B=n[x],J=(B==null?void 0:B.image.objectFit)==="cover";let te,$e;if("changedTouches"in j&&j.changedTouches.length>0)te=j.changedTouches[0].clientX,$e=j.changedTouches[0].clientY;else if("clientX"in j)te=j.clientX,$e=j.clientY;else return;let ye;if(J&&k.current){const F=Cl(k.current);ye=te>=F.left&&te<=F.right&&$e>=F.top&&$e<=F.bottom}else{const F=k.current?jr(k.current):null;if(!F){j.target===j.currentTarget&&oe();return}ye=te>=F.x&&te<=F.x+F.width&&$e>=F.y&&$e<=F.y+F.height}ye?Fe(k.current,te,$e):oe()},P=j=>{const B=j.target;(B.classList.contains(et.thumbsWrapper)||B.classList.contains(et.thumbsContainer))&&Ce(j)};s.useEffect(()=>{if(!e)return;const j=B=>{var J,te;if(B.key==="Escape"){oe();return}if(B.key==="ArrowRight"){S($e=>($e+1)%Math.max(n.length,1)),(J=$.current)==null||J.go("+1");return}B.key==="ArrowLeft"&&(S($e=>($e-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=$.current)==null||te.go("-1"))};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(S(0),w(B=>B+1),T.current=!1,N(!1),O(!1),V({}),!ue)return;const j=new CustomEvent("page-overlay",{detail:{itemId:ue}});window.dispatchEvent(j)}return()=>{m.current&&M.current&&(m.current.removeEventListener("animationend",M.current),M.current=null),O(!1)}},[e,ue]),s.useEffect(()=>{R.current!==null&&R.current!==A.type&&w(j=>j+1),R.current=A.type},[A.type]),s.useEffect(()=>{if(!e)return;const j=document.body.style.overflow,B=window.matchMedia("(max-width: 768px)").matches,J=Tl(ce.color);document.body.style.overflow="hidden",O(!1);const te=ye=>{ye.target===m.current&&!T.current&&ye.animationName&&(B&&!l&&J>.9&&(document.body.style.backgroundColor=ce.color),O(!0),m.current&&E.current&&m.current.removeEventListener("animationend",E.current),E.current=null)};m.current&&(E.current=te,m.current.addEventListener("animationend",te));const $e=ye=>{const F=ye.target;F&&(F.closest(`.${et.thumbsWrapper}`)||F.closest(`.${et.thumbsContainer}`))||A.type!=="slide"&&ye.preventDefault()};return document.addEventListener("touchmove",$e,{passive:!1}),()=>{document.body.style.overflow=j,document.removeEventListener("touchmove",$e),m.current&&E.current&&(m.current.removeEventListener("animationend",E.current),E.current=null),O(!1)}},[e,l,ce.color,A.type]),s.useEffect(()=>{if(!e)return;const j=B=>{var te,$e;if(T.current){B.stopPropagation();return}if(ne.current){ne.current=!1;return}const J=B.target;if(!(J&&(J.closest(`.${et.thumbsContainer}`)||J.closest(`.${et.thumbItem}`)||J.closest(`.${et.arrow}`)||J.closest(`.${et.closeButton}`)||J.closest(`.${et.caption}`)))){if(A.type==="slide"&&de.type==="drag"&&(($e=(te=$.current)==null?void 0:te.splide)!=null&&$e.root)){const ye=$.current.splide.root;if(J&&(ye.contains(J)||ye===J))return}if(B.touches.length===0&&B.changedTouches.length>0){const ye=n[x],F=(ye==null?void 0:ye.image.objectFit)==="cover",ve=B.changedTouches[0];let pe;if(F&&k.current){const Z=Cl(k.current);pe=ve.clientX>=Z.left&&ve.clientX<=Z.right&&ve.clientY>=Z.top&&ve.clientY<=Z.bottom}else{const Z=k.current?jr(k.current):null;if(!Z)return;pe=ve.clientX>=Z.x&&ve.clientX<=Z.x+Z.width&&ve.clientY>=Z.y&&ve.clientY<=Z.y+Z.height}if(!pe){B.stopPropagation(),T.current=!0;const Z=me=>{me.stopPropagation(),me.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),oe()}}}};return document.addEventListener("touchend",j,{passive:!0}),()=>{document.removeEventListener("touchend",j)}},[e,oe,x,n]);const Y=(A.type==="scale"||A.type==="fade")&&A.direction==="vert"&&de.type==="drag";s.useEffect(()=>{var me,De;if(!e||!Y||!((De=(me=$.current)==null?void 0:me.splide)!=null&&De.root))return;const j=$.current.splide.root,B=30,J=(ge,G)=>{if(z.current){const Me=Math.abs(ge-z.current.x),_e=Math.abs(G-z.current.y);(Me>0||_e>0)&&(ne.current=!0)}},te=ge=>{z.current&&(ge.preventDefault(),J(ge.clientX,ge.clientY))},$e=ge=>{z.current&&ge.touches.length>0&&(ge.preventDefault(),J(ge.touches[0].clientX,ge.touches[0].clientY))},ye=(ge,G)=>{if(!z.current||!$.current){z.current=null;return}const Me=Math.abs(ge-z.current.x),_e=Math.abs(G-z.current.y);_e>B&&_e>Me&&$.current.go(G<z.current.y?"+1":"-1"),z.current=null},F=ge=>{z.current&&ye(ge.clientX,ge.clientY),document.removeEventListener("pointerup",F),document.removeEventListener("pointercancel",F),document.removeEventListener("pointermove",te)},ve=ge=>{if(z.current){if(ge.changedTouches.length>0){const G=ge.changedTouches[0];ye(G.clientX,G.clientY)}document.removeEventListener("touchend",ve),document.removeEventListener("touchcancel",ve),document.removeEventListener("touchmove",$e)}},pe=ge=>{z.current={x:ge.clientX,y:ge.clientY},ne.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",F),document.addEventListener("pointercancel",F)},Z=ge=>{ge.touches.length>0&&(z.current={x:ge.touches[0].clientX,y:ge.touches[0].clientY},ne.current=!1,document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",ve),document.addEventListener("touchcancel",ve))};return j.addEventListener("pointerdown",pe),j.addEventListener("touchstart",Z),()=>{j.removeEventListener("pointerdown",pe),j.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",F),document.removeEventListener("pointercancel",F),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",ve),document.removeEventListener("touchcancel",ve),z.current=null,ne.current=!1}},[e,Y,y]);const X={backgroundColor:ce.color,backdropFilter:`blur(${ce.blur}px)`,animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Vn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:m,className:yt(et.background,H?le:xe,{[et.editor]:l},{[et.hidden]:!e}),style:{...X,...U&&!l&&!H?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?m:null,className:yt(et.contentStyle,H?ee:He,{[et.editor]:l},{[et.hidden]:!e}),style:{animationDuration:`${parseInt(ae.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Vs,{onMove:j=>S(j.index),ref:$,className:et.lightboxSplide,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,direction:A.direction==="horiz"||A.type==="fade"||A.type==="scale"?"ltr":"ttb",pagination:!1,drag:de.type==="drag"&&!Y,perPage:1,width:"100%",height:"100%",type:A.type==="fade"||A.type==="scale"?"fade":"loop",padding:0,rewind:de.repeat!=="close",start:0},style:{"--splide-speed":A.duration},children:n.map((j,B)=>{const J=sr(be.position,be.offset,l),te=`${D.scalingValue(be.padding.top,l)} ${D.scalingValue(be.padding.right,l)} ${D.scalingValue(be.padding.bottom,l)} ${D.scalingValue(be.padding.left,l)}`,$e=A.type==="scale"?(()=>{const{transform:ye,...F}=J;return{...F,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":ye||"none"}})():{...J,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx(Gs,{children:a.jsx("div",{className:et.imgWrapper,onClick:Ce,children:a.jsx("img",{ref:B===x?k:null,className:yt(et.imageStyle,{[et.contain]:j.image.objectFit==="contain",[et.cover]:j.image.objectFit==="cover",[et.scaleSlide]:A.type==="scale"}),src:j.image.url,alt:j.image.name??"",style:{...$e,pointerEvents:j.image.objectFit==="contain"?"none":"auto"}})})},B)})},y),q.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:yt(et.arrow,{[et.arrowVertical]:A.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:et.arrowInner,style:{transform:`translate(${D.scalingValue(q.offset.x,l)}, ${D.scalingValue(q.offset.y*(A.direction==="horiz"?1:-1),l)}) scale(${q.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=$.current)==null?void 0:j.go("-1")},"aria-label":"Previous",children:[q.arrowsImgUrl&&a.jsx(ln,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:yt(et.arrowImg,et.mirror)}),!q.arrowsImgUrl&&a.jsx(Ll,{color:q.color,className:yt(et.arrowIcon,et.arrowImg,et.mirror)})]})}),a.jsx("div",{className:yt(et.arrow,et.nextArrow,{[et.arrowVertical]:A.direction==="vert"}),style:{color:q.color,"--arrow-hover-color":q.hover},children:a.jsxs("button",{className:et.arrowInner,style:{transform:`translate(${D.scalingValue(q.offset.x*(A.direction==="horiz"?-1:1),l)}, ${D.scalingValue(q.offset.y,l)}) scale(${q.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var j;return(j=$.current)==null?void 0:j.go("+1")},"aria-label":"Next",children:[q.arrowsImgUrl&&a.jsx(ln,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:et.arrowImg}),!q.arrowsImgUrl&&a.jsx(Ll,{color:q.color,className:yt(et.arrowIcon,et.arrowImg)})]})})]}),ce.closeIconUrl&&(()=>{const j=sr(ce.closeIconAlign,ce.closeIconOffset,l),B=`scale(${ce.closeIconScale})`,J=j.transform?`${j.transform} ${B}`:B;return a.jsx("button",{className:et.closeButton,style:{...j,transform:J},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(ln,{url:ce.closeIconUrl,fill:ce.closeIconColor??"#000000",hoverFill:ce.closeIconHover??"#cccccc"})})})(),Q&&Q.isActive&&i.imageCaption&&((ie=n[x])==null?void 0:ie.imageCaption)&&a.jsx("div",{className:et.caption,style:{...sr(Q.alignment,Q.offset,l),fontFamily:go(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":D.scalingValue(c.width,l),letterSpacing:D.scalingValue(p,l),wordSpacing:D.scalingValue(v,l),textAlign:b,fontSize:D.scalingValue(g.fontSize,l),lineHeight:D.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f},onClick:j=>j.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:et.captionTextInner,style:{"--link-color":Q.linkColor,"--link-hover-color":Q.linkHoverColor},children:a.jsx(Ri,{content:n[x].imageCaption})})}),he.isActive&&(()=>{const[j,B]=he.position.split("-"),J=A.direction==="horiz"?`${j}-left`:he.position,te=sr(J,he.offset,l),$e=()=>{if(A.direction==="horiz"){if(B==="left")return"flex-start";if(B==="center")return"center";if(B==="right")return"flex-end"}else{if(j==="top")return"flex-start";if(j==="middle")return"center";if(j==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:I,className:et.thumbsWrapper,onClick:ye=>P(ye),style:{position:l?"absolute":"fixed",...te,...A.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:yt(et.thumbsContainer,{[et.thumbsContainerVertical]:A.direction==="vert",[et.thumbsAlignStart]:he.align==="start",[et.thumbsAlignCenter]:he.align==="center",[et.thumbsAlignEnd]:he.align==="end"}),style:{gap:D.scalingValue(he.grid.gap,l),justifyContent:W?"flex-start":$e()},children:n.map((ye,F)=>{const ve=F===x,pe=C[F],me=he.grid.size*(ve?he.activeState.scale:1),De=()=>{if(he.fit!=="fit")return{};if(!pe)return A.direction==="horiz"?{height:D.scalingValue(me,l)}:{width:D.scalingValue(me,l)};const ge=pe.width/pe.height;if(A.direction==="horiz"){const G=me,Me=G*ge;return{width:D.scalingValue(Me,l),height:D.scalingValue(G,l)}}else{const G=me,Me=G/ge;return{width:D.scalingValue(G,l),height:D.scalingValue(Me,l)}}};return a.jsx("button",{className:et.thumbItem,style:{...A.direction==="horiz"&&he.fit!=="fit"?{height:D.scalingValue(me,l)}:{},...A.direction==="vert"&&he.fit!=="fit"?{width:D.scalingValue(me,l)}:{},...he.fit==="cover"?{width:D.scalingValue(me,l),height:D.scalingValue(me,l)}:{},...De(),transition:ve?"all 0.25s ease-out":"none",opacity:ve?he.activeState.opacity/100:he.opacity/100,"--thumb-hover":he.activeState.opacity/100},onClick:ge=>{var G;ge.stopPropagation(),S(F),(G=$.current)==null||G.go(F)},onMouseEnter:()=>{var ge;he.triggers==="hov"&&((ge=$.current)==null||ge.go(F))},children:a.jsx("img",{src:ye.image.url,alt:ye.image.name??"",onLoad:ge=>{const G=ge.currentTarget;G.naturalWidth&&G.naturalHeight&&V(Me=>({...Me,[F]:{width:G.naturalWidth,height:G.naturalHeight}}))},style:{objectFit:he.fit==="cover"?"cover":"contain",...he.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...he.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ye.image.name}-${F}`)})})})})()]})]}),document.getElementById(r))};function Ll({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 Xg={element:Gg,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 lr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ug(e){return`
6
+ */const Om="RichTextRenderer-module__link___BWeZ2",Dm={link:Om},jm=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))},fo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>jm(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function sn(e){const{color:t,...n}=e;return n}function Zt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:fo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:z.scalingValue(e.letterSpacing,t),wordSpacing:z.scalingValue(e.wordSpacing,t),fontSize:z.scalingValue(n,t),lineHeight:i!==void 0?z.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 Ii=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Dm.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:zm(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 zm(e){return{...e.fontFamily&&{fontFamily:fo(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 Bm="SvgImage-module__svg___q3xE-",Vm="SvgImage-module__img___VsTm-",Sl={svg:Bm,img:Vm},Gm=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},qm=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ln=({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)}},[]),!Gm(e)||!r?a.jsx("img",{src:e,alt:"",className:xt(Sl.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:xt(Sl.svg,i),style:{"--svg":qm(e),"--fill":t,"--hover-fill":n,...o??{}}})},Xm={"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 Um({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:w,textAppearance:x,color:f}=n.imageCaption??{},[h,y]=s.useState(void 0),[b,C]=s.useState(null),[v,S]=s.useState(0),[H,N]=s.useState(0),{direction:U,transition:O,controls:R,pagination:B,imageCaption:$,triggers:M}=e,_=s.useRef(O.type),{x:A,y:m}=e.controls.offset,P=I=>{o&&o.go(I)};return s.useEffect(()=>{if(!b)return;const I=new ResizeObserver(V=>{if(!o)return;const[ee]=V;y({width:Math.round(ee.contentRect.width),height:Math.round(ee.contentRect.height)})});return I.observe(b),()=>I.unobserve(b)},[b]),s.useEffect(()=>{!o||_.current===O.type||(N(I=>I+1),_.current=O.type)},[O.type]),a.jsx("div",{className:xt(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:O.backgroundColor&&O.type==="fade in"?O.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:xt(vt.captionBlock),children:a.jsx("div",{className:vt.captionTextWrapper,children:t.map((I,V)=>a.jsx("div",{className:xt(vt.captionText,Xm[$.alignment],{[vt.withPointerEvents]:V===v&&i,[vt.active]:V===v}),style:{fontFamily:fo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":z.scalingValue(l.width,i),letterSpacing:z.scalingValue(c,i),wordSpacing:z.scalingValue(p,i),textAlign:u,fontSize:z.scalingValue(w.fontSize,i),lineHeight:z.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:O.duration?`${Math.round(parseInt(O.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:z.scalingValue($.offset.y,i),left:z.scalingValue($.offset.x,i)},children:a.jsx(Ii,{content:I.imageCaption})})},V))})}),a.jsx(Gs,{onMove:I=>{S(I.index)},ref:r,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:U==="horiz"||O.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:O.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((I,V)=>a.jsx(qs,{children:a.jsx("div",{className:vt.sliderItem,children:a.jsx("div",{className:vt.imgWrapper,children:a.jsx("img",{className:xt(vt.sliderImage,{[vt.contain]:I.image.objectFit==="contain",[vt.cover]:I.image.objectFit==="cover"}),src:I.image.url,alt:I.image.name??""})})})},V))},H),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:xt(vt.arrow,{[vt.arrowVertical]:U==="vert",[vt.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{onClick:()=>{P("-1")},className:vt.arrowInner,style:{transform:`translate(${z.scalingValue(A,i)}, ${z.scalingValue(m*(U==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(ln,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:xt(vt.arrowImg,vt.mirror)}),!R.arrowsImgUrl&&a.jsx($l,{color:R.color,className:xt(vt.arrowIcon,vt.arrowImg,vt.mirror)})]})}),a.jsx("div",{className:xt(vt.arrow,vt.nextArrow,{[vt.arrowVertical]:U==="vert",[vt.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:vt.arrowInner,onClick:()=>P("+1"),style:{transform:`translate(${z.scalingValue(A*(U==="horiz"?-1:1),i)}, ${z.scalingValue(m,i)}) scale(${e.controls.scale/100}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(ln,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:vt.arrowImg}),!R.arrowsImgUrl&&a.jsx($l,{color:R.color,className:xt(vt.arrowIcon,vt.arrowImg)})]})})]}),M.triggersList.click&&a.jsx("div",{className:vt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),B.isActive&&a.jsx("div",{className:xt(vt.pagination,{[vt.paginationInsideBottom]:B.position==="inside-1"&&U==="horiz",[vt.paginationInsideTop]:B.position==="inside-2"&&U==="horiz",[vt.paginationOutsideBottom]:B.position==="outside-1"&&U==="horiz",[vt.paginationOutsideTop]:B.position==="outside-2"&&U==="horiz",[vt.paginationInsideLeft]:B.position==="inside-1"&&U==="vert",[vt.paginationInsideRight]:B.position==="inside-2"&&U==="vert",[vt.paginationOutsideLeft]:B.position==="outside-1"&&U==="vert",[vt.paginationOutsideRight]:B.position==="outside-2"&&U==="vert",[vt.paginationVertical]:U==="vert"}),children:a.jsx("div",{className:vt.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${z.scalingValue(B.offset.x,i)}, ${z.scalingValue(B.offset.y,i)}) rotate(${U==="horiz"?"0deg":"90deg"})`},children:t.map((I,V)=>a.jsx("button",{onClick:()=>{o&&o.go(V)},className:xt(vt.paginationItem),children:a.jsx("div",{className:xt(vt.dot,{[vt.activeDot]:V===v}),style:{backgroundColor:V===v?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},V))})})]})})}function $l({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 Ym={element:Um,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Km="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Zm="ImageRevealSlider-module__image___Qjt-e",Jm="ImageRevealSlider-module__link___N-iLG",Qm="ImageRevealSlider-module__cursor___2U03d",ki={imageRevealSlider:Km,image:Zm,link:Jm,cursor:Qm};function Cl(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 xa(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function eg(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await xa(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await xa(e);r=l.height/l.width*o}else{const l=await xa(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function tg({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,w]=s.useState({x:0,y:0}),[x,f]=s.useState(1),[h,y]=s.useState("none"),b=s.useRef({x:0,y:0}),[C,v]=s.useState(!1),{sizeType:S,imageWidth:H,randomRangeImageWidth:N}=e.imageSize,{revealPosition:U,visible:O}=e.position,{cursorType:R,target:B,defaultCursorScale:$,defaultCursor:M,hoverCursorScale:_,hoverCursor:A}=e.cursor;s.useEffect(()=>{if(!i)return;const I=(T,j)=>{const K=i.getBoundingClientRect(),ce=T-K.left,se=j-K.top;if(w({x:ce,y:se}),R==="system"){y("none"),f(1);return}const k=ce,ae=se,q=document.elementFromPoint(K.left+k,K.top+ae);if(q&&q.closest("a")){y("none"),f(1);return}const le=Cl(k,ae,r)||B==="area"?{img:A??"none",scale:_}:{img:M??"none",scale:$};y(le.img),f(le.scale)},V=T=>{T.stopPropagation(),b.current={x:T.clientX,y:T.clientY},I(T.clientX,T.clientY)},ee=()=>{C&&I(b.current.x,b.current.y)};return i.addEventListener("mousemove",V),window.addEventListener("scroll",ee,!0),()=>{i.removeEventListener("mousemove",V),window.removeEventListener("scroll",ee,!0)}},[i,C,p,R,B,A,M,_,$,r]),s.useEffect(()=>{C||(y("none"),f(0))},[C]);const m=async(I,V,ee,T={})=>{const{width:j,height:K,finalWidth:ce}=await eg(I.image.url,S,H,N);let se=0,k=0;U==="same"?(se=V/2,k=ee/2):(se=T.x??Math.random()*V,k=T.y??Math.random()*ee);const ae=Math.min(Math.max(se,j/2),V-j/2),q=Math.min(Math.max(k,K/2),ee-K/2);return{id:u.current++,url:I.image.url,link:I.link,name:I.image.name,x:ae,y:q,width:ce}};s.useEffect(()=>{if(!i||t.length===0)return;const I=i.getBoundingClientRect(),V=I.width,ee=I.height,T=[];(async()=>{const K=t[0],ce=await m(K,V,ee);T.push(ce),l(T),c(1)})()},[S,H,N,U,i]),s.useEffect(()=>{O==="last One"&&l(I=>I.length>0?[I[I.length-1]]:[])},[O]);const P=async I=>{if(!i)return;const V=i.getBoundingClientRect(),ee=I.clientX-V.left,T=I.clientY-V.top;if(B==="image"&&!Cl(ee,T,r))return;let j=0,K=0;U==="on Click"?(j=ee,K=T):U==="same"?(j=V.width/2,K=V.height/2):(j=Math.random()*V.width,K=Math.random()*V.height);const ce=t[d],se=await m(ce,V.width,V.height,{x:j,y:K});l(k=>O==="all"?[...k,se]:[se]),c(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:P,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:ki.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(I=>a.jsx("div",{className:ki.wrapper,style:{top:`${I.y}px`,left:`${I.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:I.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:B==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",className:ki.link,children:a.jsx("img",{src:I.url,alt:I.name,className:ki.image},I.id)}):a.jsx("img",{src:I.url,alt:I.name,className:ki.image},I.id)},I.id)),C&&a.jsx("div",{className:ki.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ng={element:tg,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:""}]}}}},ig="LightBox-module__hidden___9s-9x",og="LightBox-module__heroImage___sTxNF",rg="LightBox-module__background___rm9ml",ag="LightBox-module__editor___4ACaY",sg="LightBox-module__contentStyle___Bgnsq",lg="LightBox-module__imageStyle___tLIlB",cg="LightBox-module__imgWrapper___LuFUp",dg="LightBox-module__contain___8-yaS",ug="LightBox-module__cover___hNvOG",pg="LightBox-module__caption___b6L2I",mg="LightBox-module__captionTextInner___rCGNH",gg="LightBox-module__lightboxSplide___XFuWC",hg="LightBox-module__arrow___iz38X",fg="LightBox-module__arrowVertical___Zfz81",yg="LightBox-module__nextArrow___zkAQN",vg="LightBox-module__arrowInner___p48sW",xg="LightBox-module__arrowIcon___3VaFf",bg="LightBox-module__arrowImg___pNV88",wg="LightBox-module__mirror___pjeXc",Sg="LightBox-module__thumbsWrapper___GB-nU",$g="LightBox-module__thumbsContainerVertical___wttk5",Cg="LightBox-module__thumbsContainer___osSma",Tg="LightBox-module__thumbsAlignStart___MO6tY",Lg="LightBox-module__thumbsAlignCenter___Q4sUx",Rg="LightBox-module__thumbsAlignEnd___p4y9R",Ig="LightBox-module__thumbItem___HvnF3",Eg="LightBox-module__closeButton___g2khP",Mg="LightBox-module__fadeIn___0m5GW",Pg="LightBox-module__slideInLeft___gPYwC",kg="LightBox-module__slideInRight___S-pPp",Ag="LightBox-module__slideInTop___DFdAj",Fg="LightBox-module__slideInBottom___m27kZ",_g="LightBox-module__fadeOut___55qBR",Wg="LightBox-module__slideOutLeft___NvU7P",Ng="LightBox-module__slideOutRight___SK7eC",Hg="LightBox-module__slideOutTop___Vgg0z",Og="LightBox-module__slideOutBottom___nJ0Ef",Dg="LightBox-module__scaleSlide___vZriG",at={hidden:ig,heroImage:og,background:rg,editor:ag,contentStyle:sg,imageStyle:lg,imgWrapper:cg,contain:dg,cover:ug,caption:pg,captionTextInner:mg,lightboxSplide:gg,arrow:hg,arrowVertical:fg,nextArrow:yg,arrowInner:vg,arrowIcon:xg,arrowImg:bg,mirror:wg,thumbsWrapper:Sg,thumbsContainerVertical:$g,thumbsContainer:Cg,thumbsAlignStart:Tg,thumbsAlignCenter:Lg,thumbsAlignEnd:Rg,thumbItem:Ig,closeButton:Eg,fadeIn:Mg,slideInLeft:Pg,slideInRight:kg,slideInTop:Ag,slideInBottom:Fg,fadeOut:_g,slideOutLeft:Wg,slideOutRight:Ng,slideOutTop:Hg,slideOutBottom:Og,scaleSlide:Dg},sr=(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% + ${z.scalingValue(t.x,n)}), calc(-50% + ${z.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${z.scalingValue(t.x,n)}, calc(-50% + ${z.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${z.scalingValue(t.x,n)}), ${z.scalingValue(t.y,n)})`:i.transform=`translate(${z.scalingValue(t.x,n)}, ${z.scalingValue(t.y,n)})`,i};function Nd(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 jg(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 Hd(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 zg(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 Od(e,t,n,i,o){const{x:r,y:l}=jg(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Bg(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"?zg:Hd,{renderedW:u,renderedH:p}=c(n,i,o,r),{offsetX:w,offsetY:x}=Od(n,i,u,p,d),f=(w+u/2)/n*100,h=(x+p/2)/i*100;return`${f}% ${h}%`}function Vg(e){return Bg(e)}function jr(e){const t=e.getBoundingClientRect(),n=Nd(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}=Hd(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:w}=Od(i,o,d,c,u),x=t.left+n.left,f=t.top+n.top;return{x:p+x,y:w+f,width:d,height:c}}function Tl(e){const t=e.getBoundingClientRect(),n=Nd(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ll(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gg(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 qg=({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(Xg,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},Xg=({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:w,wordSpacing:x,fontSizeLineHeight:f,textAppearance:h,color:y}=i.imageCaption??{},[b,C]=s.useState(0),[v,S]=s.useState(0),[H,N]=s.useState(!1),[U,O]=s.useState(!1),[R,B]=s.useState({}),$=s.useRef(null),M=s.useRef(null),_=s.useRef(null),A=s.useRef(!1),m=s.useRef(null),P=s.useRef(null),I=s.useRef(null),V=s.useRef(null),ee=s.useRef(!1),T=s.useRef(null),[j,K]=s.useState(!1),{appear:ce,triggers:se,slider:k,thumbnail:ae,controls:q,area:le,caption:Z,layout:xe}=o.lightboxBlock,{appearClass:Ne,backdropAppearClass:ye,backdropDisappearClass:ue,disappearClass:Q}=Gg(ce.type,ce.direction),de=(d==null?void 0:d.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var F,X;(X=(F=$.current)==null?void 0:F.splide)==null||X.refresh()},16)},G=()=>{S(F=>F+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),s.useEffect(()=>{if(!e||!ae.isActive){K(!1);return}const g=T.current;if(!g)return;const G=()=>{k.direction==="horiz"?K(g.scrollWidth>g.clientWidth):K(g.scrollHeight>g.clientHeight)};G();const F=new ResizeObserver(G);return F.observe(g),()=>F.disconnect()},[e,ae.isActive,n.length,R,k.direction]);const ne=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,G=Ll(le.color);g&&!l&&G>.9&&(document.body.style.backgroundColor=""),N(!0),A.current=!0;const F=X=>{X.target===m.current&&X.animationName&&(m.current&&P.current&&m.current.removeEventListener("animationend",P.current),P.current=null,A.current&&(A.current=!1,t()),N(!1))};m.current&&(P.current=F,m.current.addEventListener("animationend",F))},[t,le.color,l]),Ee=(g,G,F)=>{var X,me;if(g){if(se.type==="click"&&se.switch==="image")se.repeat==="close"&&b===n.length-1?ne():(X=$.current)==null||X.go("+1");else if(se.type==="click"&&se.switch==="50/50"){const Y=g.getBoundingClientRect(),L=G-Y.left,ie=F-Y.top,oe=Y.width,D=Y.height;let te;k.direction==="horiz"?te=L<oe/2?"-1":"+1":te=ie<D/2?"-1":"+1",(me=$.current)==null||me.go(te)}}},Te=g=>{if(ee.current){ee.current=!1;return}const G=n[b],F=(G==null?void 0:G.image.objectFit)==="cover";let X,me;if("changedTouches"in g&&g.changedTouches.length>0)X=g.changedTouches[0].clientX,me=g.changedTouches[0].clientY;else if("clientX"in g)X=g.clientX,me=g.clientY;else return;let Y;if(F&&_.current){const L=Tl(_.current);Y=X>=L.left&&X<=L.right&&me>=L.top&&me<=L.bottom}else{const L=_.current?jr(_.current):null;if(!L){g.target===g.currentTarget&&ne();return}Y=X>=L.x&&X<=L.x+L.width&&me>=L.y&&me<=L.y+L.height}Y?Ee(_.current,X,me):ne()},Oe=g=>{const G=g.target;(G.classList.contains(at.thumbsWrapper)||G.classList.contains(at.thumbsContainer))&&Te(g)};s.useEffect(()=>{if(!e)return;const g=G=>{var F,X;if(G.key==="Escape"){ne();return}if(G.key==="ArrowRight"){C(me=>(me+1)%Math.max(n.length,1)),(F=$.current)==null||F.go("+1");return}G.key==="ArrowLeft"&&(C(me=>(me-1+Math.max(n.length,1))%Math.max(n.length,1)),(X=$.current)==null||X.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,ne,n.length]),s.useEffect(()=>{if(e){if(C(0),S(G=>G+1),A.current=!1,N(!1),O(!1),B({}),!de)return;const g=new CustomEvent("page-overlay",{detail:{itemId:de}});window.dispatchEvent(g)}return()=>{m.current&&P.current&&(m.current.removeEventListener("animationend",P.current),P.current=null),O(!1)}},[e,de]),s.useEffect(()=>{M.current!==null&&M.current!==k.type&&S(g=>g+1),M.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,F=Ll(le.color);document.body.style.overflow="hidden",O(!1);const X=Y=>{Y.target===m.current&&!A.current&&Y.animationName&&(G&&!l&&F>.9&&(document.body.style.backgroundColor=le.color),O(!0),m.current&&I.current&&m.current.removeEventListener("animationend",I.current),I.current=null)};m.current&&(I.current=X,m.current.addEventListener("animationend",X));const me=Y=>{const L=Y.target;L&&(L.closest(`.${at.thumbsWrapper}`)||L.closest(`.${at.thumbsContainer}`))||k.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",me,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",me),m.current&&I.current&&(m.current.removeEventListener("animationend",I.current),I.current=null),O(!1)}},[e,l,le.color,k.type]),s.useEffect(()=>{if(!e)return;const g=G=>{var X,me;if(A.current){G.stopPropagation();return}if(ee.current){ee.current=!1;return}const F=G.target;if(!(F&&(F.closest(`.${at.thumbsContainer}`)||F.closest(`.${at.thumbItem}`)||F.closest(`.${at.arrow}`)||F.closest(`.${at.closeButton}`)||F.closest(`.${at.caption}`)))){if(k.type==="slide"&&se.type==="drag"&&((me=(X=$.current)==null?void 0:X.splide)!=null&&me.root)){const Y=$.current.splide.root;if(F&&(Y.contains(F)||Y===F))return}if(G.touches.length===0&&G.changedTouches.length>0){const Y=n[b],L=(Y==null?void 0:Y.image.objectFit)==="cover",ie=G.changedTouches[0];let oe;if(L&&_.current){const D=Tl(_.current);oe=ie.clientX>=D.left&&ie.clientX<=D.right&&ie.clientY>=D.top&&ie.clientY<=D.bottom}else{const D=_.current?jr(_.current):null;if(!D)return;oe=ie.clientX>=D.x&&ie.clientX<=D.x+D.width&&ie.clientY>=D.y&&ie.clientY<=D.y+D.height}if(!oe){G.stopPropagation(),A.current=!0;const D=te=>{te.stopPropagation(),te.preventDefault(),document.removeEventListener("click",D,!0)};document.addEventListener("click",D,!0),ne()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[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 g=$.current.splide.root,G=30,F=(he,J)=>{if(V.current){const Ze=Math.abs(he-V.current.x),Fe=Math.abs(J-V.current.y);(Ze>0||Fe>0)&&(ee.current=!0)}},X=he=>{V.current&&(he.preventDefault(),F(he.clientX,he.clientY))},me=he=>{V.current&&he.touches.length>0&&(he.preventDefault(),F(he.touches[0].clientX,he.touches[0].clientY))},Y=(he,J)=>{if(!V.current||!$.current){V.current=null;return}const Ze=Math.abs(he-V.current.x),Fe=Math.abs(J-V.current.y);Fe>G&&Fe>Ze&&$.current.go(J<V.current.y?"+1":"-1"),V.current=null},L=he=>{V.current&&Y(he.clientX,he.clientY),document.removeEventListener("pointerup",L),document.removeEventListener("pointercancel",L),document.removeEventListener("pointermove",X)},ie=he=>{if(V.current){if(he.changedTouches.length>0){const J=he.changedTouches[0];Y(J.clientX,J.clientY)}document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),document.removeEventListener("touchmove",me)}},oe=he=>{V.current={x:he.clientX,y:he.clientY},ee.current=!1,document.addEventListener("pointermove",X,{passive:!1}),document.addEventListener("pointerup",L),document.addEventListener("pointercancel",L)},D=he=>{he.touches.length>0&&(V.current={x:he.touches[0].clientX,y:he.touches[0].clientY},ee.current=!1,document.addEventListener("touchmove",me,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie))};return g.addEventListener("pointerdown",oe),g.addEventListener("touchstart",D),()=>{g.removeEventListener("pointerdown",oe),g.removeEventListener("touchstart",D),document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",L),document.removeEventListener("pointercancel",L),document.removeEventListener("touchmove",me),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),V.current=null,ee.current=!1}},[e,ve,v]);const we={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Gn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:m,className:xt(at.background,H?ue:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...we,...U&&!l&&!H?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?m:null,className:xt(at.contentStyle,H?Q:Ne,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Gs,{onMove:g=>C(g.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((g,G)=>{const F=sr(xe.position,xe.offset,l),X=`${z.scalingValue(xe.padding.top,l)} ${z.scalingValue(xe.padding.right,l)} ${z.scalingValue(xe.padding.bottom,l)} ${z.scalingValue(xe.padding.left,l)}`,me=k.type==="scale"?(()=>{const{transform:Y,...L}=F;return{...L,position:"absolute",padding:X,boxSizing:"border-box","--position-transform":Y||"none"}})():{...F,position:"absolute",padding:X,boxSizing:"border-box"};return a.jsx(qs,{children:a.jsx("div",{className:at.imgWrapper,onClick:Te,children:a.jsx("img",{ref:G===b?_:null,className:xt(at.imageStyle,{[at.contain]:g.image.objectFit==="contain",[at.cover]:g.image.objectFit==="cover",[at.scaleSlide]:k.type==="scale"}),src:g.image.url,alt:g.image.name??"",style:{...me,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},G)})},v),q.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:xt(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(${z.scalingValue(q.offset.x,l)}, ${z.scalingValue(q.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${q.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[q.arrowsImgUrl&&a.jsx(ln,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:xt(at.arrowImg,at.mirror)}),!q.arrowsImgUrl&&a.jsx(Rl,{color:q.color,className:xt(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:xt(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(${z.scalingValue(q.offset.x*(k.direction==="horiz"?-1:1),l)}, ${z.scalingValue(q.offset.y,l)}) scale(${q.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[q.arrowsImgUrl&&a.jsx(ln,{url:q.arrowsImgUrl,fill:q.color,hoverFill:q.hover,className:at.arrowImg}),!q.arrowsImgUrl&&a.jsx(Rl,{color:q.color,className:xt(at.arrowIcon,at.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const g=sr(le.closeIconAlign,le.closeIconOffset,l),G=`scale(${le.closeIconScale})`,F=g.transform?`${g.transform} ${G}`:G;return a.jsx("button",{className:at.closeButton,style:{...g,transform:F},onClick:ne,"aria-label":"Close lightbox",children:a.jsx(ln,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),Z&&Z.isActive&&i.imageCaption&&(($e=n[b])==null?void 0:$e.imageCaption)&&a.jsx("div",{className:at.caption,style:{...sr(Z.alignment,Z.offset,l),fontFamily:fo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":z.scalingValue(c.width,l),letterSpacing:z.scalingValue(p,l),wordSpacing:z.scalingValue(x,l),textAlign:w,fontSize:z.scalingValue(f.fontSize,l),lineHeight:z.scalingValue(f.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:y},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":Z.linkColor,"--link-hover-color":Z.linkHoverColor},children:a.jsx(Ii,{content:n[b].imageCaption})})}),ae.isActive&&(()=>{const[g,G]=ae.position.split("-"),F=k.direction==="horiz"?`${g}-left`:ae.position,X=sr(F,ae.offset,l),me=()=>{if(k.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="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",...X,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:xt(at.thumbsContainer,{[at.thumbsContainerVertical]:k.direction==="vert",[at.thumbsAlignStart]:ae.align==="start",[at.thumbsAlignCenter]:ae.align==="center",[at.thumbsAlignEnd]:ae.align==="end"}),style:{gap:z.scalingValue(ae.grid.gap,l),justifyContent:j?"flex-start":me()},children:n.map((Y,L)=>{const ie=L===b,oe=R[L],te=ae.grid.size*(ie?ae.activeState.scale:1),Ae=()=>{if(ae.fit!=="fit")return{};if(!oe)return k.direction==="horiz"?{height:z.scalingValue(te,l)}:{width:z.scalingValue(te,l)};const he=oe.width/oe.height;if(k.direction==="horiz"){const J=te,Ze=J*he;return{width:z.scalingValue(Ze,l),height:z.scalingValue(J,l)}}else{const J=te,Ze=J/he;return{width:z.scalingValue(J,l),height:z.scalingValue(Ze,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...k.direction==="horiz"&&ae.fit!=="fit"?{height:z.scalingValue(te,l)}:{},...k.direction==="vert"&&ae.fit!=="fit"?{width:z.scalingValue(te,l)}:{},...ae.fit==="cover"?{width:z.scalingValue(te,l),height:z.scalingValue(te,l)}:{},...Ae(),transition:ie?"all 0.25s ease-out":"none",opacity:ie?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:he=>{var J;he.stopPropagation(),C(L),(J=$.current)==null||J.go(L)},onMouseEnter:()=>{var he;ae.triggers==="hov"&&((he=$.current)==null||he.go(L))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:he=>{const J=he.currentTarget;J.naturalWidth&&J.naturalHeight&&B(Ze=>({...Ze,[L]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${L}`)})})})})()]})]}),document.getElementById(r))};function Rl({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 Ug={element:qg,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 lr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yg(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Yg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=D.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:b=[],buttonLabel:v,gap:g,fieldsGap:h,buttonCorners:f,buttonStroke:x,buttonPadding:S,isButtonFullWidth:y,inputCorners:w,inputStroke:H,inputPadding:N,inputColor:U,inputTextColor:O,inputBorderColor:C,placeholderColor:V,buttonColor:$,buttonTextColor:R,buttonBorderColor:k,labelTextColor:T,successColor:m,errorColor:M,fontFamily:E,inputFontSettings:z,inputFontSize:ne,inputLineHeight:I,inputLetterSpacing:W,inputWordSpacing:K,inputTextAppearance:ae,buttonFontSettings:de,buttonFontSize:A,buttonLineHeight:he,buttonLetterSpacing:q,buttonWordSpacing:ce,buttonTextAppearance:Q,labelFontSettings:be,labelFontSize:He,labelLineHeight:xe,labelLetterSpacing:le,labelWordSpacing:ee,labelTextAppearance:ue,statusFontSettings:oe,statusFontSize:Fe,statusLineHeight:Ce,statusLetterSpacing:P,statusWordSpacing:Y,statusTextAppearance:X,successMessage:ie,errorMessage:j,stateOverrides:B}=e,J=u==="B",te=b.slice(0,Math.min(p,b.length)),$e={fontSettings:{fontFamily:E,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:I,letterSpacing:W??0,wordSpacing:K??0,textAppearance:ae,color:O},ye=sn(Yt($e,t)),F=D.scalingValue(H??0,t),ve=D.scalingValue((I??ne??.01)+((N==null?void 0:N.top)??0)+((N==null?void 0:N.bottom)??0)+(u==="C"?H??0:(H??0)*2),t),pe={...ye,borderStyle:"solid",borderRadius:u==="C"?0:D.scalingValue(w??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:F,borderLeftWidth:0}:{borderWidth:F},paddingTop:D.scalingValue((N==null?void 0:N.top)??0,t),paddingRight:D.scalingValue((N==null?void 0:N.right)??0,t),paddingBottom:D.scalingValue((N==null?void 0:N.bottom)??0,t),paddingLeft:D.scalingValue((N==null?void 0:N.left)??0,t),height:ve,minHeight:ve},Z={fontSettings:{fontFamily:E,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:A??.01,lineHeight:he,letterSpacing:q??0,wordSpacing:ce??0,textAppearance:Q,color:R},me=sn(Yt(Z,t)),De=D.scalingValue(x??0,t),ge={fontSettings:{fontFamily:E,fontWeight:(be==null?void 0:be.fontWeight)??400,fontStyle:(be==null?void 0:be.fontStyle)??"normal"},fontSize:He??.01,lineHeight:xe,letterSpacing:le??0,wordSpacing:ee??0,textAppearance:ue,color:T},G=Yt(ge,t),Me={fontSettings:{fontFamily:E,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:Fe??.01,lineHeight:Ce,letterSpacing:P??0,wordSpacing:Y??0,textAppearance:X,color:m},_e=sn(Yt(Me,t)),rt=D.buildColorVars(c,{inputColor:U,inputTextColor:O,inputBorderColor:C,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:$,buttonTextColor:R,buttonBorderColor:k,labelTextColor:T,successColor:m,errorColor:M},Kg,Zg,B),[Je,at]=s.useState(()=>Object.fromEntries(te.map(Ae=>[Ae.name,""]))),[it,je]=s.useState("idle"),[Se,We]=s.useState(null),Be=r==="success"?"success":r==="error"?"error":it,Ze=r==="error"?j:Se,Le=r==="filled",Ve=s.useMemo(()=>{if(!Le)return Je;let Ae=null;for(const Ke of te)(Je[Ke.name]??"").trim().length>0||(Ae=Ae??{...Je},Ae[Ke.name]="Filled");return Ae??Je},[Je,Le,te]),se=Be==="error"?D.getFormFieldValidationError(te,Ve):null,Xe=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),ze=o==null?void 0:o.submitUrl,Re=(Ae,Ke)=>{at(Oe=>({...Oe,[Ae]:Ke}))},Pe=async Ae=>{if(Ae.preventDefault(),!d)return;const Ke=Object.fromEntries(te.map(Qe=>{var tt;return[Qe.name,((tt=Je[Qe.name])==null?void 0:tt.trim())??""]}).filter(([,Qe])=>Qe));if(!ze){je("error"),We("No integrations were found for this form.");return}if(Object.keys(Ke).length===0)return;const Oe=D.getFormFieldValidationError(te,Je);if(Oe){je("error"),We(Oe);return}je("submitting"),We(null);try{const Qe=await fetch(ze,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke)});if(!Qe.ok){const tt=await Qe.text();throw new Error(tt||`Request failed: ${Qe.status}`)}je("success"),at(Object.fromEntries(te.map(tt=>[tt.name,""])))}catch(Qe){je("error"),We(Qe instanceof Error?Qe.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Xe}`.trim(),style:rt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ug(c)}}),a.jsxs("form",{onSubmit:Pe,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:te.map((Ae,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:D.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${J?` ${c}-labeled`:""}`,children:[J&&a.jsx("span",{className:`${c}-field-label`,style:G?{...G,lineHeight:G.fontSize}:void 0,children:Ae.label||Ae.name}),Ae.type==="textarea"?a.jsx("textarea",{name:Ae.name,autoComplete:"off",value:Ve[Ae.name]??"",onChange:Oe=>Re(Ae.name,Oe.target.value),placeholder:Ae.placeholder,className:`${c}-input`,style:pe,rows:1,"data-filled":Le||(Ve[Ae.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ae.type==="phone"?"tel":Ae.type==="email"?"email":"text",name:Ae.name,autoComplete:"off",value:Ve[Ae.name]??"",onChange:Oe=>Re(Ae.name,Oe.target.value),placeholder:Ae.placeholder,required:Ae.isRequired??Ae.type==="email",className:`${c}-input`,style:pe,"data-filled":Le||(Ve[Ae.name]??"").trim().length>0})]})]},Ke))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:D.scalingValue(g??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:D.scalingValue(f??0,t),borderWidth:De,paddingTop:D.scalingValue((S==null?void 0:S.top)??0,t),paddingRight:D.scalingValue((S==null?void 0:S.right)??0,t),paddingBottom:D.scalingValue((S==null?void 0:S.bottom)??0,t),paddingLeft:D.scalingValue((S==null?void 0:S.left)??0,t),pointerEvents:d?"auto":void 0,...me,...y?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:y?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:it==="submitting"?"...":v})})})]}),Be==="success"&&a.jsx("p",{className:`${c}-success`,style:{..._e},children:ie}),Be==="error"&&a.jsx("p",{className:`${c}-error`,style:{..._e},role:"alert",children:se??Ze??j})]})}const Kg={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"},Zg=["hover","focus","filled","success","error"],Jg=`import React, { useMemo, useState } from 'react';
158
+ `}function Kg({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,d=i&&t||!t,{prefix:c}=z.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:w=[],buttonLabel:x,gap:f,fieldsGap:h,buttonCorners:y,buttonStroke:b,buttonPadding:C,isButtonFullWidth:v,inputCorners:S,inputStroke:H,inputPadding:N,inputColor:U,inputTextColor:O,inputBorderColor:R,placeholderColor:B,buttonColor:$,buttonTextColor:M,buttonBorderColor:_,labelTextColor:A,successColor:m,errorColor:P,fontFamily:I,inputFontSettings:V,inputFontSize:ee,inputLineHeight:T,inputLetterSpacing:j,inputWordSpacing:K,inputTextAppearance:ce,buttonFontSettings:se,buttonFontSize:k,buttonLineHeight:ae,buttonLetterSpacing:q,buttonWordSpacing:le,buttonTextAppearance:Z,labelFontSettings:xe,labelFontSize:Ne,labelLineHeight:ye,labelLetterSpacing:ue,labelWordSpacing:Q,labelTextAppearance:de,statusFontSettings:ne,statusFontSize:Ee,statusLineHeight:Te,statusLetterSpacing:Oe,statusWordSpacing:ve,statusTextAppearance:we,successMessage:$e,errorMessage:g,stateOverrides:G}=e,F=u==="B",X=w.slice(0,Math.min(p,w.length)),me={fontSettings:{fontFamily:I,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:T,letterSpacing:j??0,wordSpacing:K??0,textAppearance:ce,color:O},Y=sn(Zt(me,t)),L=z.scalingValue(H??0,t),ie=z.scalingValue((T??ee??.01)+((N==null?void 0:N.top)??0)+((N==null?void 0:N.bottom)??0)+(u==="C"?H??0:(H??0)*2),t),oe={...Y,borderStyle:"solid",borderRadius:u==="C"?0:z.scalingValue(S??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:L,borderLeftWidth:0}:{borderWidth:L},paddingTop:z.scalingValue((N==null?void 0:N.top)??0,t),paddingRight:z.scalingValue((N==null?void 0:N.right)??0,t),paddingBottom:z.scalingValue((N==null?void 0:N.bottom)??0,t),paddingLeft:z.scalingValue((N==null?void 0:N.left)??0,t),height:ie,minHeight:ie},D={fontSettings:{fontFamily:I,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:k??.01,lineHeight:ae,letterSpacing:q??0,wordSpacing:le??0,textAppearance:Z,color:M},te=sn(Zt(D,t)),Ae=z.scalingValue(b??0,t),he={fontSettings:{fontFamily:I,fontWeight:(xe==null?void 0:xe.fontWeight)??400,fontStyle:(xe==null?void 0:xe.fontStyle)??"normal"},fontSize:Ne??.01,lineHeight:ye,letterSpacing:ue??0,wordSpacing:Q??0,textAppearance:de,color:A},J=Zt(he,t),Ze={fontSettings:{fontFamily:I,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:Ee??.01,lineHeight:Te,letterSpacing:Oe??0,wordSpacing:ve??0,textAppearance:we,color:m},Fe=sn(Zt(Ze,t)),Qe=z.buildColorVars(c,{inputColor:U,inputTextColor:O,inputBorderColor:R,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:$,buttonTextColor:M,buttonBorderColor:_,labelTextColor:A,successColor:m,errorColor:P},Zg,Jg,G),[Xe,nt]=s.useState(()=>Object.fromEntries(X.map(Le=>[Le.name,""]))),[et,Be]=s.useState("idle"),[fe,He]=s.useState(null),ze=r==="success"?"success":r==="error"?"error":et,Je=r==="error"?g:fe,Ce=r==="filled",De=s.useMemo(()=>{if(!Ce)return Xe;let Le=null;for(const Ye of X)(Xe[Ye.name]??"").trim().length>0||(Le=Le??{...Xe},Le[Ye.name]="Filled");return Le??Xe},[Xe,Ce,X]),qe=ze==="error"?z.getFormFieldValidationError(X,De):null,Pe=`${r&&r!=="default"?`${c}-state-${r}`:""}`.trim(),je=o==null?void 0:o.submitUrl,Ie=(Le,Ye)=>{nt(_e=>({..._e,[Le]:Ye}))},be=async Le=>{if(Le.preventDefault(),!d)return;const Ye=Object.fromEntries(X.map(it=>{var ot;return[it.name,((ot=Xe[it.name])==null?void 0:ot.trim())??""]}).filter(([,it])=>it));if(!je){Be("error"),He("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const _e=z.getFormFieldValidationError(X,Xe);if(_e){Be("error"),He(_e);return}Be("submitting"),He(null);try{const it=await fetch(je,{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}`)}Be("success"),nt(Object.fromEntries(X.map(ot=>[ot.name,""])))}catch(it){Be("error"),He(it instanceof Error?it.message:"Something went wrong")}};return a.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Pe}`.trim(),style:Qe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Yg(c)}}),a.jsxs("form",{onSubmit:be,className:`${c}-form`,children:[a.jsx("div",{className:`${c}-fields`,children:X.map((Le,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:z.scalingValue(h??0,t)}}),a.jsxs("div",{className:`${c}-field-group${F?` ${c}-labeled`:""}`,children:[F&&a.jsx("span",{className:`${c}-field-label`,style:J?{...J,lineHeight:J.fontSize}:void 0,children:Le.label||Le.name}),Le.type==="textarea"?a.jsx("textarea",{name:Le.name,autoComplete:"off",value:De[Le.name]??"",onChange:_e=>Ie(Le.name,_e.target.value),placeholder:Le.placeholder,className:`${c}-input`,style:oe,rows:1,"data-filled":Ce||(De[Le.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Le.type==="phone"?"tel":Le.type==="email"?"email":"text",name:Le.name,autoComplete:"off",value:De[Le.name]??"",onChange:_e=>Ie(Le.name,_e.target.value),placeholder:Le.placeholder,required:Le.isRequired??Le.type==="email",className:`${c}-input`,style:oe,"data-filled":Ce||(De[Le.name]??"").trim().length>0})]})]},Ye))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:z.scalingValue(f??0,t)}}),a.jsx("div",{className:`${c}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:z.scalingValue(y??0,t),borderWidth:Ae,paddingTop:z.scalingValue((C==null?void 0:C.top)??0,t),paddingRight:z.scalingValue((C==null?void 0:C.right)??0,t),paddingBottom:z.scalingValue((C==null?void 0:C.bottom)??0,t),paddingLeft:z.scalingValue((C==null?void 0:C.left)??0,t),pointerEvents:d?"auto":void 0,...te,...v?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${c}-overlay-anchor`,style:v?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:et==="submitting"?"...":x})})})]}),ze==="success"&&a.jsx("p",{className:`${c}-success`,style:{...Fe},children:$e}),ze==="error"&&a.jsx("p",{className:`${c}-error`,style:{...Fe},role:"alert",children:qe??Je??g})]})}const Zg={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"},Jg=["hover","focus","filled","success","error"],Qg=`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
- `,Qg=[{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"}],cr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},eh=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],th={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:{...cr.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:{...cr.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:{...cr.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:{...cr.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:Qg,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:[...eh],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"]},nh={element:Yg,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:th,sourceCode:Jg,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function dr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ih(e){return`
792
+ `,eh=[{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"}],cr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},th=["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:{...cr.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:{...cr.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:{...cr.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:{...cr.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:eh,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:[...th],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"]},ih={element:Kg,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:nh,sourceCode:Qg,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function dr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oh(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -982,7 +982,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
982
982
  font-size: ${dr(14)};
983
983
  color: var(--${e}-error-error-color, var(--${e}-error-color));
984
984
  }
985
- `}const oh=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=D.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:b,inputFontSettings:v,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:x,inputTextAppearance:S,buttonFontSettings:y,buttonFontSize:w,buttonLineHeight:H,buttonLetterSpacing:N,buttonWordSpacing:U,buttonTextAppearance:O,statusFontSettings:C,statusFontSize:V,statusLineHeight:$,statusLetterSpacing:R,statusWordSpacing:k,statusTextAppearance:T,iconMaxWidth:m,minHeight:M,corners:E,stroke:z,stateOverrides:ne,inputPadding:I,buttonPadding:W,successMessage:K="Thanks for subscribing!",errorMessage:ae="Please, fill all required fields."}=e,de=d.slice(0,Math.min(p,d.length)),[A,he]=s.useState(()=>Object.fromEntries(de.map(ge=>[ge.name,""]))),[q,ce]=s.useState("idle"),[Q,be]=s.useState(null),He=o==="success"?"success":o==="error"?"error":q,xe=o==="error"?ae:Q,le=o==="filled",ee=s.useMemo(()=>{if(!le)return A;let ge=null;for(const G of de)(A[G.name]??"").trim().length>0||(ge=ge??{...A},ge[G.name]="Filled");return ge??A},[le,A,de]),ue=He==="error"?D.getFormFieldValidationError(de,ee):null,oe=o&&o!=="default"?`${r}-state-${o}`:"",Fe=de.some(ge=>(ee[ge.name]??"").trim().length>0),Ce=oe!==`${r}-state-filled`&&Fe?`${r}-state-filled`:"",P=`${oe} ${Ce}`.trim(),Y=i==null?void 0:i.submitUrl,X=u??"",ie=(c==null?void 0:c.icon)??"",j=(c==null?void 0:c.mode)==="On",B=X||"Submit",J={fontSettings:{fontFamily:b,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:x??0,textAppearance:S,color:e.inputTextColor??"#111111"},te={fontSettings:{fontFamily:b,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:w??.01,lineHeight:H,letterSpacing:N??0,wordSpacing:U??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},$e={fontSettings:{fontFamily:b,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:V??.01,lineHeight:$,letterSpacing:R??0,wordSpacing:k??0,textAppearance:T,color:e.successColor??"#22c55e"},ye=sn(Yt(J,t)),F=sn(Yt(te,t)),ve=sn(Yt($e,t)),pe=D.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(J==null?void 0:J.color)??"#111111",buttonTextColor:e.buttonTextColor??(te==null?void 0:te.color)??"#ffffff"},rh,ah,ne),Z={borderRadius:D.scalingValue(E,t),borderWidth:D.scalingValue(z,t),borderStyle:"solid"},me={borderLeftWidth:D.scalingValue(z,t)},De=async ge=>{if(ge.preventDefault(),!l)return;const G=Object.fromEntries(de.map(_e=>{var rt;return[_e.name,((rt=A[_e.name])==null?void 0:rt.trim())??""]}).filter(([,_e])=>_e));if(!Y){ce("error"),be("No integrations were found for this form.");return}if(Object.keys(G).length===0)return;const Me=D.getFormFieldValidationError(de,A);if(Me){ce("error"),be(Me);return}ce("submitting"),be(null);try{const _e=await fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)});if(!_e.ok){const rt=await _e.text();throw new Error(rt||`Request failed: ${_e.status}`)}ce("success"),he(Object.fromEntries(de.map(rt=>[rt.name,""])))}catch(_e){ce("error"),be(_e instanceof Error?_e.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${P}`.trim(),style:pe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ih(r)}}),a.jsxs("form",{onSubmit:De,className:`${r}-form`,style:{...Z,height:D.scalingValue(M,t),minHeight:D.scalingValue(M,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:de.map(ge=>a.jsx("input",{type:ge.type==="email"?"email":ge.type==="phone"?"tel":"text",name:ge.name,autoComplete:"off",value:ee[ge.name]??"",onChange:G=>he(Me=>({...Me,[ge.name]:G.target.value})),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${r}-input`,style:{...ye,paddingRight:D.scalingValue(I.right,t),paddingLeft:D.scalingValue(I.left,t),paddingTop:D.scalingValue(I.top,t),paddingBottom:D.scalingValue(I.bottom,t)}},ge.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":B,style:{...F,...me,paddingRight:D.scalingValue(W.right,t),paddingLeft:D.scalingValue(W.left,t),paddingTop:D.scalingValue(W.top,t),paddingBottom:D.scalingValue(W.bottom,t),pointerEvents:l?"auto":void 0},children:q==="submitting"?"...":j?ie&&a.jsx(ln,{url:ie,className:`${r}-submitBtnIcon`,style:{maxWidth:D.scalingValue(m??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):X})})]}),He==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ve},children:K}),He==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ve},role:"alert",children:ue??xe??ae})]})},rh={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"},ah=["hover","focus","filled","success","error"],sh=`import React, { useMemo, useState } from 'react';
985
+ `}const rh=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=z.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:w,inputFontSettings:x,inputFontSize:f,inputLineHeight:h,inputLetterSpacing:y,inputWordSpacing:b,inputTextAppearance:C,buttonFontSettings:v,buttonFontSize:S,buttonLineHeight:H,buttonLetterSpacing:N,buttonWordSpacing:U,buttonTextAppearance:O,statusFontSettings:R,statusFontSize:B,statusLineHeight:$,statusLetterSpacing:M,statusWordSpacing:_,statusTextAppearance:A,iconMaxWidth:m,minHeight:P,corners:I,stroke:V,stateOverrides:ee,inputPadding:T,buttonPadding:j,successMessage:K="Thanks for subscribing!",errorMessage:ce="Please, fill all required fields."}=e,se=d.slice(0,Math.min(p,d.length)),[k,ae]=s.useState(()=>Object.fromEntries(se.map(he=>[he.name,""]))),[q,le]=s.useState("idle"),[Z,xe]=s.useState(null),Ne=o==="success"?"success":o==="error"?"error":q,ye=o==="error"?ce:Z,ue=o==="filled",Q=s.useMemo(()=>{if(!ue)return k;let he=null;for(const J of se)(k[J.name]??"").trim().length>0||(he=he??{...k},he[J.name]="Filled");return he??k},[ue,k,se]),de=Ne==="error"?z.getFormFieldValidationError(se,Q):null,ne=o&&o!=="default"?`${r}-state-${o}`:"",Ee=se.some(he=>(Q[he.name]??"").trim().length>0),Te=ne!==`${r}-state-filled`&&Ee?`${r}-state-filled`:"",Oe=`${ne} ${Te}`.trim(),ve=i==null?void 0:i.submitUrl,we=u??"",$e=(c==null?void 0:c.icon)??"",g=(c==null?void 0:c.mode)==="On",G=we||"Submit",F={fontSettings:{fontFamily:w,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:h,letterSpacing:y??0,wordSpacing:b??0,textAppearance:C,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:w,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:S??.01,lineHeight:H,letterSpacing:N??0,wordSpacing:U??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},me={fontSettings:{fontFamily:w,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:B??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:_??0,textAppearance:A,color:e.successColor??"#22c55e"},Y=sn(Zt(F,t)),L=sn(Zt(X,t)),ie=sn(Zt(me,t)),oe=z.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(F==null?void 0:F.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},ah,sh,ee),D={borderRadius:z.scalingValue(I,t),borderWidth:z.scalingValue(V,t),borderStyle:"solid"},te={borderLeftWidth:z.scalingValue(V,t)},Ae=async he=>{if(he.preventDefault(),!l)return;const J=Object.fromEntries(se.map(Fe=>{var Qe;return[Fe.name,((Qe=k[Fe.name])==null?void 0:Qe.trim())??""]}).filter(([,Fe])=>Fe));if(!ve){le("error"),xe("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const Ze=z.getFormFieldValidationError(se,k);if(Ze){le("error"),xe(Ze);return}le("submitting"),xe(null);try{const Fe=await fetch(ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!Fe.ok){const Qe=await Fe.text();throw new Error(Qe||`Request failed: ${Fe.status}`)}le("success"),ae(Object.fromEntries(se.map(Qe=>[Qe.name,""])))}catch(Fe){le("error"),xe(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:oh(r)}}),a.jsxs("form",{onSubmit:Ae,className:`${r}-form`,style:{...D,height:z.scalingValue(P,t),minHeight:z.scalingValue(P,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:Q[he.name]??"",onChange:J=>ae(Ze=>({...Ze,[he.name]:J.target.value})),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:{...Y,paddingRight:z.scalingValue(T.right,t),paddingLeft:z.scalingValue(T.left,t),paddingTop:z.scalingValue(T.top,t),paddingBottom:z.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":G,style:{...L,...te,paddingRight:z.scalingValue(j.right,t),paddingLeft:z.scalingValue(j.left,t),paddingTop:z.scalingValue(j.top,t),paddingBottom:z.scalingValue(j.bottom,t),pointerEvents:l?"auto":void 0},children:q==="submitting"?"...":g?$e&&a.jsx(ln,{url:$e,className:`${r}-submitBtnIcon`,style:{maxWidth:z.scalingValue(m??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):we})})]}),Ne==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ie},children:K}),Ne==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ie},role:"alert",children:de??ye??ce})]})},ah={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"},sh=["hover","focus","filled","success","error"],lh=`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
- `,lh="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>'),ch=[{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"}}}},dh=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],uh={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:ch,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:lh},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:[...dh],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"]},ph={element:oh,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:uh,sourceCode:sh};function mh(e,t){const n=t>0?`${t}px`:"0px";return`
1564
+ `,ch="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>'),dh=[{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"],ph={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:dh,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:ch},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"]},mh={element:rh,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:ph,sourceCode:lh};function gh(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 gh=30,hh=20,wa=3,fh=12,yh=32,vh=3,xh=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},bh=(e,t)=>Array.from({length:t},()=>e).flat(),wh=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},Hd=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Rl=(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=Hd(d);return c<=0?0:c+r*Math.max(0,t-1)},Sh=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Hd(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},$h=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ch=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>$h(i,e))},Th=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??"")},Lh=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Rh=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var k,T,m,M;const p=s.useRef(null),b=!!((k=e.image)!=null&&k.url&&Th(e.image));s.useLayoutEffect(()=>{d&&Lh(p.current)&&(u==null||u())},[d,(T=e.image)==null?void 0:T.url,u]);const v=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[f,x]=g.split(":").map(Number),w=(h?x:f)/(h?f:x),H=i/w,N=H>o?o:H,U=H>o?o*w:i,O=c(U),C=c(N),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},R=((m=e.image)==null?void 0:m.url)&&(b?a.jsx("video",{ref:E=>{p.current=E},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:E=>{p.current=E},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:O}:{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:O,height:C,overflow:"hidden",...V}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:R&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:yt(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:R}):R})})},Ih=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=D.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>mh(r,c),[r,c]),{speed:p,direction:b,pauseOnHover:v,gap:g,imageMaxWidth:h,imageMaxHeight:f,hoverEffect:x,cornerRadius:S=0}=e,y=s.useMemo(()=>wh(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,H=!!o,N=!n||!!i,U=N&&x!=="off"&&x!=="randomize"?`${r}-image-hover-${x}`:void 0,O=n?!!i:!0,V=((t==null?void 0:t.length)??0)>0&&(O||!!n),$=Math.max(0,p)*gh,R=Ce=>D.scalingValue(Ce,n??!1),k=s.useRef(null),T=s.useRef(null),m=s.useRef(null),[M,E]=s.useState(0),z=O&&v==="on",[ne,I]=s.useState(!1),[W,K]=s.useState({}),ae=s.useRef(W);ae.current=W;const de=s.useRef(null),A=s.useRef(0),he=s.useRef(null),q=s.useMemo(()=>(t??[]).map(Ce=>{var P;return((P=Ce.image)==null?void 0:P.url)??""}).join("\0"),[t]),[ce,Q]=s.useState(wa),be=s.useMemo(()=>{const Ce=t??[];return Ce.length===0||!(O||!!n)?Ce:bh(Ce,ce)},[t,O,ce,n]),He=s.useMemo(()=>(t??[]).filter(Ce=>{var P;return!!((P=Ce.image)!=null&&P.url)}).length,[t]),xe=V?vh:1;s.useLayoutEffect(()=>{A.current=0,K({}),de.current=null,Q(wa),d(0)},[q]),s.useEffect(()=>{if(!N||x!=="randomize")return;const Ce=k.current;if(!Ce)return;const P=j=>{K(B=>{const J=Array.from(j).filter($e=>$e in B&&!Ch(Ce,$e));if(J.length===0)return B;const te={...B};return J.forEach($e=>{delete te[$e]}),te})},Y=new IntersectionObserver(j=>{const B=new Set;for(const J of j){const te=J.target.dataset.marqueeItemIndex,$e=te!==void 0?Number(te):NaN;Number.isNaN($e)||B.add($e)}B.size>0&&P(B)},{root:Ce,threshold:0});Object.keys(W).forEach(j=>{const B=Number(j);Ce.querySelectorAll(`[data-marquee-item-index="${B}"]`).forEach(J=>Y.observe(J))});const X={current:0},ie=()=>{const j=Object.keys(ae.current);j.length!==0&&(P(j.map(Number)),X.current=requestAnimationFrame(ie))};return Object.keys(ae.current).length>0&&(X.current=requestAnimationFrame(ie)),()=>{cancelAnimationFrame(X.current),Y.disconnect()}},[x,W,N]),s.useLayoutEffect(()=>{if(!V)return;const Ce=k.current,P=m.current;if(!Ce||!P)return;const Y={current:0},X=()=>{const B=Ce.getBoundingClientRect().width||Ce.offsetWidth,J=Sh(P),te=de.current,$e=typeof te=="number"&&Math.abs(te-J)<=.25;de.current=J;let ye=ce,F=0;if((O||n)&&w>0&&B>0){const Z=Rl(P,w);if(Z>=yh){F=Z;const me=Math.min(fh,Math.max(wa,Math.ceil(B/Z)+1));ye=me,me!==ce&&Q(me)}}const pe=ye!==ce&&F>0?F*ye:J>0?J:F>0?F*ye:(()=>{const Z=Rl(P,w);return Z>0?Z*ye:0})();pe>0?d(Z=>Z<=0?pe:!$e||Math.round(Z)===Math.round(pe)?Z:pe):!$e&&l<=0&&(cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(X))},ie=()=>{cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(X)};he.current=ie,ie();const j=new ResizeObserver(ie);return j.observe(Ce),j.observe(P),()=>{he.current=null,cancelAnimationFrame(Y.current),j.disconnect()}},[O,V,l,q,ce,w,n]),s.useLayoutEffect(()=>{if(!V||c<=0)return;const Ce=T.current;Ce&&xh(Ce)},[V,c,b,$]),s.useLayoutEffect(()=>{if(!V||l<=0){E(0);return}const Ce=T.current,P=m.current;if(!Ce||!P)return;const Y=()=>{const ie=Ce.offsetHeight||Ce.getBoundingClientRect().height,j=Array.from(P.children).reduce((J,te)=>Math.max(J,te.offsetHeight||te.getBoundingClientRect().height),0),B=ie>0?ie:j;E(B>0?B:0)};Y();const X=new ResizeObserver(Y);return X.observe(Ce),X.observe(P),()=>X.disconnect()},[V,xe,be,n,g,h,f,l,y,W]),s.useLayoutEffect(()=>{if(!n||!H||!V||typeof window>"u")return;const Ce=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Ce)},[n,H,V,b,l,M,g,be]);const le=()=>{z&&I(!0)},ee=()=>{z&&I(!1)},ue=s.useCallback(()=>{var Ce;A.current=Math.min(He,A.current+1),(Ce=he.current)==null||Ce.call(he)},[He]),oe=s.useCallback((Ce,P)=>{K(Y=>{const X=Y[Ce]??P,ie=(t??[]).filter(B=>B!==X);if(ie.length===0)return Y;const j=ie[Math.floor(Math.random()*ie.length)];return{...Y,[Ce]:j}})},[t]),Fe=(Ce,P,Y,X)=>{const ie=N&&x==="randomize"&&y.display==="cover"?W[Y]??Ce:Ce,j=`max(${R(g)}, ${hh}px)`,B=`calc(-0.5 * (${j} + ${R(g)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Y,onMouseEnter:N&&x==="randomize"&&y.display==="cover"?()=>oe(Y,Ce):void 0,children:[a.jsx(Rh,{item:ie,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:f,cornerRadius:S,imageHoverClass:U,isEditor:n,isFirstSet:X,scaled:R,onFirstSetImageDone:ue}),H&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:B,width:j,height:"100%"}})]},`${P}-${Y}`)};if(V){const Ce=O?z&&ne?"paused":"running":"paused",P=c>0&&$>0?c/$*1e3:0,Y=`${Math.max(0,P)/1e3}s`;return a.jsxs("div",{ref:k,className:yt(`${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:T,className:`${r}-marquee-track`,"data-direction":b,onMouseEnter:le,onMouseLeave:ee,style:{WebkitAnimationDuration:Y,animationDuration:Y,WebkitAnimationPlayState:Ce,animationPlayState:Ce},children:Array.from({length:xe},(X,ie)=>a.jsx("div",{ref:ie===0?m:void 0,className:yt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:R(g),paddingRight:R(g)},"aria-hidden":ie>0,children:be.map((j,B)=>Fe(j,ie,B,ie===0&&B<w))},`set-${ie}`))})]})}return a.jsxs("div",{ref:k,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:yt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:R(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Ce,P)=>Fe(Ce,0,P))},"marquee-static")]})},Eh=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1696
+ `}const hh=30,fh=20,wa=3,yh=12,vh=32,xh=3,bh=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")},wh=(e,t)=>Array.from({length:t},()=>e).flat(),Sh=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},Dd=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Il=(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=Dd(d);return c<=0?0:c+r*Math.max(0,t-1)},$h=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Dd(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},Ch=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Th=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Ch(i,e))},Lh=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},Rh=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Ih=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var _,A,m,P;const p=s.useRef(null),w=!!((_=e.image)!=null&&_.url&&Lh(e.image));s.useLayoutEffect(()=>{d&&Rh(p.current)&&(u==null||u())},[d,(A=e.image)==null?void 0:A.url,u]);const x=n.display==="cover",f=n.ratioValue??"1:1",h=n.reversed??!1,[y,b]=f.split(":").map(Number),S=(h?b:y)/(h?y:b),H=i/S,N=H>o?o:H,U=H>o?o*S:i,O=c(U),R=c(N),B={borderRadius:c(r)},$=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...B}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...B},M=((m=e.image)==null?void 0:m.url)&&(w?a.jsx("video",{ref:I=>{p.current=I},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:I=>{p.current=I},src:e.image.url,alt:((P=e.image)==null?void 0:P.name)??"",style:$,onLoad:d?u:void 0,onError:d?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:O}:{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,...x?{width:O,height:R,overflow:"hidden",...B}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:M&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:xt(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:M}):M})})},Eh=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=z.useScopedStyles(),[l,d]=s.useState(0),c=l>0?Math.round(l):0,u=s.useMemo(()=>gh(r,c),[r,c]),{speed:p,direction:w,pauseOnHover:x,gap:f,imageMaxWidth:h,imageMaxHeight:y,hoverEffect:b,cornerRadius:C=0}=e,v=s.useMemo(()=>Sh(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,H=!!o,N=!n||!!i,U=N&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,O=n?!!i:!0,B=((t==null?void 0:t.length)??0)>0&&(O||!!n),$=Math.max(0,p)*hh,M=Te=>z.scalingValue(Te,n??!1),_=s.useRef(null),A=s.useRef(null),m=s.useRef(null),[P,I]=s.useState(0),V=O&&x==="on",[ee,T]=s.useState(!1),[j,K]=s.useState({}),ce=s.useRef(j);ce.current=j;const se=s.useRef(null),k=s.useRef(0),ae=s.useRef(null),q=s.useMemo(()=>(t??[]).map(Te=>{var Oe;return((Oe=Te.image)==null?void 0:Oe.url)??""}).join("\0"),[t]),[le,Z]=s.useState(wa),xe=s.useMemo(()=>{const Te=t??[];return Te.length===0||!(O||!!n)?Te:wh(Te,le)},[t,O,le,n]),Ne=s.useMemo(()=>(t??[]).filter(Te=>{var Oe;return!!((Oe=Te.image)!=null&&Oe.url)}).length,[t]),ye=B?xh:1;s.useLayoutEffect(()=>{k.current=0,K({}),se.current=null,Z(wa),d(0)},[q]),s.useEffect(()=>{if(!N||b!=="randomize")return;const Te=_.current;if(!Te)return;const Oe=g=>{K(G=>{const F=Array.from(g).filter(me=>me in G&&!Th(Te,me));if(F.length===0)return G;const X={...G};return F.forEach(me=>{delete X[me]}),X})},ve=new IntersectionObserver(g=>{const G=new Set;for(const F of g){const X=F.target.dataset.marqueeItemIndex,me=X!==void 0?Number(X):NaN;Number.isNaN(me)||G.add(me)}G.size>0&&Oe(G)},{root:Te,threshold:0});Object.keys(j).forEach(g=>{const G=Number(g);Te.querySelectorAll(`[data-marquee-item-index="${G}"]`).forEach(F=>ve.observe(F))});const we={current:0},$e=()=>{const g=Object.keys(ce.current);g.length!==0&&(Oe(g.map(Number)),we.current=requestAnimationFrame($e))};return Object.keys(ce.current).length>0&&(we.current=requestAnimationFrame($e)),()=>{cancelAnimationFrame(we.current),ve.disconnect()}},[b,j,N]),s.useLayoutEffect(()=>{if(!B)return;const Te=_.current,Oe=m.current;if(!Te||!Oe)return;const ve={current:0},we=()=>{const G=Te.getBoundingClientRect().width||Te.offsetWidth,F=$h(Oe),X=se.current,me=typeof X=="number"&&Math.abs(X-F)<=.25;se.current=F;let Y=le,L=0;if((O||n)&&S>0&&G>0){const D=Il(Oe,S);if(D>=vh){L=D;const te=Math.min(yh,Math.max(wa,Math.ceil(G/D)+1));Y=te,te!==le&&Z(te)}}const oe=Y!==le&&L>0?L*Y:F>0?F:L>0?L*Y:(()=>{const D=Il(Oe,S);return D>0?D*Y:0})();oe>0?d(D=>D<=0?oe:!me||Math.round(D)===Math.round(oe)?D:oe):!me&&l<=0&&(cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(we))},$e=()=>{cancelAnimationFrame(ve.current),ve.current=requestAnimationFrame(we)};ae.current=$e,$e();const g=new ResizeObserver($e);return g.observe(Te),g.observe(Oe),()=>{ae.current=null,cancelAnimationFrame(ve.current),g.disconnect()}},[O,B,l,q,le,S,n]),s.useLayoutEffect(()=>{if(!B||c<=0)return;const Te=A.current;Te&&bh(Te)},[B,c,w,$]),s.useLayoutEffect(()=>{if(!B||l<=0){I(0);return}const Te=A.current,Oe=m.current;if(!Te||!Oe)return;const ve=()=>{const $e=Te.offsetHeight||Te.getBoundingClientRect().height,g=Array.from(Oe.children).reduce((F,X)=>Math.max(F,X.offsetHeight||X.getBoundingClientRect().height),0),G=$e>0?$e:g;I(G>0?G:0)};ve();const we=new ResizeObserver(ve);return we.observe(Te),we.observe(Oe),()=>we.disconnect()},[B,ye,xe,n,f,h,y,l,v,j]),s.useLayoutEffect(()=>{if(!n||!H||!B||typeof window>"u")return;const Te=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(Te)},[n,H,B,w,l,P,f,xe]);const ue=()=>{V&&T(!0)},Q=()=>{V&&T(!1)},de=s.useCallback(()=>{var Te;k.current=Math.min(Ne,k.current+1),(Te=ae.current)==null||Te.call(ae)},[Ne]),ne=s.useCallback((Te,Oe)=>{K(ve=>{const we=ve[Te]??Oe,$e=(t??[]).filter(G=>G!==we);if($e.length===0)return ve;const g=$e[Math.floor(Math.random()*$e.length)];return{...ve,[Te]:g}})},[t]),Ee=(Te,Oe,ve,we)=>{const $e=N&&b==="randomize"&&v.display==="cover"?j[ve]??Te:Te,g=`max(${M(f)}, ${fh}px)`,G=`calc(-0.5 * (${g} + ${M(f)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ve,onMouseEnter:N&&b==="randomize"&&v.display==="cover"?()=>ne(ve,Te):void 0,children:[a.jsx(Ih,{item:$e,prefix:r,imageFit:v,imageMaxWidth:h,imageMaxHeight:y,cornerRadius:C,imageHoverClass:U,isEditor:n,isFirstSet:we,scaled:M,onFirstSetImageDone:de}),H&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:G,width:g,height:"100%"}})]},`${Oe}-${ve}`)};if(B){const Te=O?V&&ee?"paused":"running":"paused",Oe=c>0&&$>0?c/$*1e3:0,ve=`${Math.max(0,Oe)/1e3}s`;return a.jsxs("div",{ref:_,className:xt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:P>0?{height:P}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:A,className:`${r}-marquee-track`,"data-direction":w,onMouseEnter:ue,onMouseLeave:Q,style:{WebkitAnimationDuration:ve,animationDuration:ve,WebkitAnimationPlayState:Te,animationPlayState:Te},children:Array.from({length:ye},(we,$e)=>a.jsx("div",{ref:$e===0?m:void 0,className:xt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:M(f),paddingRight:M(f)},"aria-hidden":$e>0,children:xe.map((g,G)=>Ee(g,$e,G,$e===0&&G<S))},`set-${$e}`))})]})}return a.jsxs("div",{ref:_,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:xt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:M(f),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Te,Oe)=>Ee(Te,0,Oe))},"marquee-static")]})},Mh=`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
- `,Mh={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},Ph={element:Ih,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:Mh,sourceCode:Eh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function kh(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2479
+ `,Ph={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:""}]}},kh={element:Eh,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:Ph,sourceCode:Mh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ah(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 Ah=30,Sa=3,Fh=12,_h=96,Il=3,as=.72,Wh=100,Nh=10,Hh=e=>e/Wh,Oh=e=>Math.max(0,e)/Nh,Dh=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},jh=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ki={ctx:void 0},zh=()=>ki.ctx!==void 0?ki.ctx:typeof document>"u"?(ki.ctx=null,ki.ctx):(ki.ctx=document.createElement("canvas").getContext("2d"),ki.ctx),Bh=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},El=e=>{e.style.transform=""},Vh=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},Gh=(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)},Od=96,Dd=(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 b=p*c,v=b+c;o[p+1]=v,r[p+1]=r[p]+(d(b)+d(v))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},qh=(e,t)=>{const n=Dd(e,t,Od);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Xh=(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=(g,h)=>{if(h-g<=1)return[g,h];const f=g+h>>1;return l[f]<=r?c(f,h):c(g,f)},[u,p]=c(0,l.length-1),b=l[p]-l[u],v=b>0?(r-l[u])/b:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*v)},Uh=(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,b=e+o-u,v=Math.max(4,Math.ceil(r*4*(b/Math.max(e,1)))),g=Array.from({length:v},(h,f)=>{const x=u+f/v*b,S=u+(f+1)/v*b,y=S-x,w=d(x),H=d(S),N=x+y/3,U=w+c(x)*y/3,O=S-y/3,C=H-c(S)*y/3;return`C${N.toFixed(2)} ${U.toFixed(2)} ${O.toFixed(2)} ${C.toFixed(2)} ${S.toFixed(2)} ${H.toFixed(2)}`});return[`M${u.toFixed(2)} ${d(u).toFixed(2)}`,...g].join(" ")},Yh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${as}em`},u=((g=e.image)==null?void 0:g.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),b=l?a.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,f)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},f))}):a.jsx("span",{className:`${t}-text`,style:d,children:e.text}),v=a.jsxs(a.Fragment,{children:[p,b]});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})},Kh=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=D.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:b,layoutType:v,curveAmplitude:g,curveFrequency:h,textFontFamily:f,textFontSettings:x,textFontSize:S,textLineHeight:y,textLetterSpacing:w,textWordSpacing:H,textTextAppearance:N,textColor:U,backgroundColor:O,ribbonWidth:C}=e,V=C??y,$=v==="curve",R=Hh(g),k=Oh(h),T=s.useMemo(()=>kh(o,d,$),[o,d,$]),m=s.useMemo(()=>Yt({fontSettings:{fontFamily:f,fontWeight:x.fontWeight,fontStyle:x.fontStyle},letterSpacing:w,wordSpacing:H,fontSize:S,lineHeight:y,textAppearance:N,color:U},n),[f,x,w,H,S,y,N,U,n]),M=Re=>D.scalingValue(Re,n??!1),E=((t==null?void 0:t.length)??0)>0,z=n?!!i:!0,ne=E&&(z||!!n),I=Math.max(0,c)*Ah,W=z&&p==="on",[K,ae]=s.useState(!1),de=z?W&&K?"paused":"running":"paused",A=de==="running"&&I>0&&d>0,he=d>0&&I>0?d/I*1e3:0,q=s.useRef(null),ce=s.useRef(null),Q=s.useRef(null),be=s.useRef(null),He=s.useRef(null),xe=s.useRef(null),le=s.useRef(A),ee=s.useRef(null),ue=s.useRef(null),oe=s.useRef(R),Fe=s.useRef(k);le.current=A,oe.current=R,Fe.current=k;const[Ce,P]=s.useState(0),[Y,X]=s.useState(0),[ie,j]=s.useState(0),[B,J]=s.useState(0),[te,$e]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(Re=>{var Pe;return`${Re.text}\0${((Pe=Re.image)==null?void 0:Pe.url)??""}\0${Re.link??""}`}).join("\0"),[t]),[F,ve]=s.useState(Sa),pe=s.useMemo(()=>{const Re=t??[];return Re.length===0||!(z||n)?Re:jh(Re,F)},[t,z,F,n]),Z=ne?Il:1;s.useLayoutEffect(()=>{ve(Sa),l(0)},[ye]),s.useLayoutEffect(()=>{var Oe;const Re=xe.current;if(!Re)return;const Pe=()=>{const Qe=getComputedStyle(Re),tt=parseFloat(Qe.fontSize)||0;if(tt<=0)return;const nt=zh();if(!nt){P(tt*as),X(0);return}nt.font=`${Qe.fontStyle} ${Qe.fontWeight} ${tt}px ${Qe.fontFamily}`;const xt=nt.measureText("H"),It=xt.actualBoundingBoxAscent>0?xt.actualBoundingBoxAscent:tt*as,Tt=Math.max(0,xt.actualBoundingBoxDescent||0),ut=xt.fontBoundingBoxAscent||0,ft=xt.fontBoundingBoxDescent||0;P(Lt=>Math.abs(Lt-It)>.5?It:Lt);const Et=ut>0||ft>0?(ft-Tt-(ut-It))/2:0;X(Lt=>Math.abs(Lt-Et)>.25?Et:Lt)};Pe();const Ae=typeof document<"u"?document.fonts:void 0;(Oe=Ae==null?void 0:Ae.ready)==null||Oe.then(Pe).catch(()=>{});const Ke=new ResizeObserver(Pe);return Ke.observe(Re),()=>Ke.disconnect()},[m.fontFamily,m.fontWeight,m.fontStyle,m.fontSize,m.lineHeight]),s.useLayoutEffect(()=>{if(!ne)return;const Re=q.current,Pe=be.current;if(!Re||!Pe)return;const Ae={id:0},Ke=()=>{const nt=Re.offsetWidth||Re.getBoundingClientRect().width,xt=Pe.offsetWidth||Pe.getBoundingClientRect().width;if(E&&nt>0&&xt>0){const It=xt/F;if(It>0){let Tt=nt,ut=Fh;if($){const Et=nt*oe.current,Lt=Fe.current,bt=Lt>0?2*Math.PI*Lt/nt:0,Nt=qh(Et,bt);Tt=Math.max(nt,Nt*nt/(Il-1)),ut=_h}const ft=Math.min(ut,Math.max(Sa,Math.ceil(Tt/It)+1));if(ft!==F){ve(ft);return}}}xt>0&&l(xt)},Oe=()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(Ke)};Oe();const Qe=new ResizeObserver(Oe);Qe.observe(Re),Qe.observe(Pe);const tt=()=>{document.hidden||Oe()};return document.addEventListener("visibilitychange",tt),window.addEventListener("pageshow",tt),window.addEventListener("focus",tt),()=>{cancelAnimationFrame(Ae.id),Qe.disconnect(),document.removeEventListener("visibilitychange",tt),window.removeEventListener("pageshow",tt),window.removeEventListener("focus",tt)}},[ne,ye,F,E,Ce,$,R,k]),s.useLayoutEffect(()=>{const Re=He.current;if(!Re)return;const Pe={id:0},Ae=()=>{const Oe=Re.offsetHeight;Oe>0&&$e(Qe=>Math.abs(Qe-Oe)>.5?Oe:Qe)};Pe.id=requestAnimationFrame(Ae);const Ke=new ResizeObserver(()=>{cancelAnimationFrame(Pe.id),Pe.id=requestAnimationFrame(Ae)});return Ke.observe(Re),()=>{cancelAnimationFrame(Pe.id),Ke.disconnect()}},[V,n]),s.useLayoutEffect(()=>{if(!$){j(0),J(0);return}const Re=q.current,Pe=be.current;if(!Re||!Pe)return;const Ae={id:0},Ke=()=>{const Qe=Re.offsetWidth,tt=Pe.offsetHeight;Qe>0&&J(nt=>Math.abs(nt-Qe)>.5?Qe:nt),tt>0&&j(nt=>Math.abs(nt-tt)>.5?tt:nt)};Ae.id=requestAnimationFrame(Ke);const Oe=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(Ke)});return Oe.observe(Re),Oe.observe(Pe),()=>{cancelAnimationFrame(Ae.id),Oe.disconnect()}},[$,ye,Ce,y,S,ne]),s.useLayoutEffect(()=>{if(!ne||d<=0)return;const Re=Q.current;Re&&Dh(Re)},[ne,d,u,I]),s.useLayoutEffect(()=>{if(!$||!E)return;const Re=q.current;if(!Re)return;const Pe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ae=()=>{for(const It of Pe.itemsCache)for(const Tt of It.glyphs)El(Tt.inner)},Ke=()=>{const It=ce.current??Re;Pe.itemsCache=Array.from(Re.querySelectorAll("[data-marquee-text-item]"),Tt=>{const ut=[];return Tt.querySelectorAll("[data-marquee-wave-node]").forEach(ft=>{const Et=ft.firstElementChild;Et&&ut.push({inner:Et,layoutLocalX:Gh(ft,It)})}),{item:Tt,glyphs:ut}}),Pe.cacheDirty=!1},Oe=()=>{Pe.cacheDirty&&Ke();const Tt=(ce.current??Re).offsetWidth||1,ut=Tt*oe.current,ft=Fe.current,Et=2*Math.PI*ft/Tt,Lt=`${Tt}|${ut}|${Et}`;if(Lt!==Pe.lutKey&&(Pe.lutKey=Lt,Pe.lut=Dd(ut,Et,Od)),Math.abs(ut)<=0||Et<=0){Ae();return}const bt=Q.current,Nt=bt?Vh(getComputedStyle(bt).transform):0,Bt=Re.getBoundingClientRect(),Zt=Bt.left,en=Bt.right,Rt=Pe.lut&&Pe.lut.wavelength>0?Math.max(0,(Pe.lut.periodArc/Pe.lut.wavelength-1)*Tt):0;for(const{item:Ot,glyphs:nn}of Pe.itemsCache){const pt=Ot.getBoundingClientRect();if(pt.right<Zt||pt.left>en+Rt){for(const Ee of nn)El(Ee.inner);continue}for(const Ee of nn){const qe=Ee.layoutLocalX+Nt,st=Pe.lut?Xh(Pe.lut,qe):qe,mt=Et*st,vt=ut*Math.sin(mt),Mt=ut*Et*Math.cos(mt),gt=Math.atan(Mt)*(180/Math.PI);Bh(Ee.inner,st-qe,vt,gt)}}},Qe=()=>{Pe.cancelled||(Pe.raf=0,Oe(),le.current&&!document.hidden&&(Pe.raf=requestAnimationFrame(Qe)))},tt=()=>{Pe.cancelled||Pe.raf||(Pe.raf=requestAnimationFrame(Qe))},nt=()=>{Pe.cacheDirty=!0,Oe(),tt()};ee.current=tt,ue.current=nt,Oe(),tt();const xt=()=>{if(document.hidden){cancelAnimationFrame(Pe.raf),Pe.raf=0;return}cancelAnimationFrame(Pe.raf),Pe.raf=0,nt()};return document.addEventListener("visibilitychange",xt),window.addEventListener("pageshow",xt),window.addEventListener("focus",xt),()=>{Pe.cancelled=!0,ee.current=null,ue.current=null,cancelAnimationFrame(Pe.raf),document.removeEventListener("visibilitychange",xt),window.removeEventListener("pageshow",xt),window.removeEventListener("focus",xt),Ae()}},[$,E]),s.useLayoutEffect(()=>{var Re;!$||!E||(Re=ue.current)==null||Re.call(ue)},[$,E,r,ye,F,Ce,R,k,B]),s.useLayoutEffect(()=>{var Re;(Re=ee.current)==null||Re.call(ee)},[A,u]);const me=()=>{W&&ae(!0)},De=()=>{W&&ae(!1)},ge=$?Math.abs(R)*100:0,G=M(V),Me={minHeight:G,...$?{paddingTop:`${ge}%`,paddingBottom:`${ge}%`}:{}},_e={height:G,...$?{visibility:"hidden"}:{backgroundColor:O}},rt={gap:M(b),minHeight:G},Je=B*R,at=Math.abs(Je),it=te>0?te:ie,je=Math.max(ie,it),Se=at+je/2,We=Math.max(it,1),Be=$&&B>0&&je>0?Uh(B,Je,k,Se,We):"",Ze=at*2+je,Le=Be?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${B} ${Ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Be,fill:"none",stroke:O,strokeWidth:it,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Ve=a.jsx("div",{ref:He,className:`${o}-ribbon`,style:_e,"aria-hidden":!0}),se=(Re,Pe,Ae)=>a.jsx(Yh,{item:Re,prefix:o,textCss:m,capHeightPx:Ce,opticalOffsetY:Y,imageGapPx:M(b),isCurve:$},`${Pe}-${Ae}`),Te=a.jsx("span",{ref:xe,"aria-hidden":!0,className:`${o}-cap-ref`,style:m,children:"H"}),Xe=`${Math.max(0,he)/1e3}s`,ze=ne?a.jsx("div",{ref:Q,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:me,onMouseLeave:De,style:{WebkitAnimationDuration:Xe,animationDuration:Xe,WebkitAnimationPlayState:de,animationPlayState:de},children:Array.from({length:Z},(Re,Pe)=>a.jsx("div",{ref:Pe===0?be:void 0,className:`${o}-marquee-set`,style:{...rt,paddingRight:M(b)},"aria-hidden":Pe>0,children:pe.map((Ae,Ke)=>se(Ae,Pe,Ke))},`set-${Pe}`))}):a.jsx("div",{ref:be,className:yt(`${o}-marquee-set`,`${o}-marquee-static`),style:rt,children:t==null?void 0:t.map((Re,Pe)=>se(Re,0,Pe))});return a.jsxs("div",{ref:q,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),Te,a.jsxs("div",{ref:ce,className:`${o}-marquee-wrapper`,style:Me,children:[Ve,Le,ze]})]})},Zh=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2608
+ `}const Fh=30,Sa=3,_h=12,Wh=96,El=3,as=.72,Nh=100,Hh=10,Oh=e=>e/Nh,Dh=e=>Math.max(0,e)/Hh,jh=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")},zh=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Ai={ctx:void 0},Bh=()=>Ai.ctx!==void 0?Ai.ctx:typeof document>"u"?(Ai.ctx=null,Ai.ctx):(Ai.ctx=document.createElement("canvas").getContext("2d"),Ai.ctx),Vh=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Ml=e=>{e.style.transform=""},Gh=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},qh=(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)},jd=96,zd=(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 w=p*c,x=w+c;o[p+1]=x,r[p+1]=r[p]+(d(w)+d(x))*.5*c}),{wavelength:i,periodArc:r[n],x:o,s:r}},Xh=(e,t)=>{const n=zd(e,t,jd);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Uh=(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=(f,h)=>{if(h-f<=1)return[f,h];const y=f+h>>1;return l[y]<=r?c(y,h):c(f,y)},[u,p]=c(0,l.length-1),w=l[p]-l[u],x=w>0?(r-l[u])/w:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*x)},Yh=(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,w=e+o-u,x=Math.max(4,Math.ceil(r*4*(w/Math.max(e,1)))),f=Array.from({length:x},(h,y)=>{const b=u+y/x*w,C=u+(y+1)/x*w,v=C-b,S=d(b),H=d(C),N=b+v/3,U=S+c(b)*v/3,O=C-v/3,R=H-c(C)*v/3;return`C${N.toFixed(2)} ${U.toFixed(2)} ${O.toFixed(2)} ${R.toFixed(2)} ${C.toFixed(2)} ${H.toFixed(2)}`});return[`M${u.toFixed(2)} ${d(u).toFixed(2)}`,...f].join(" ")},Kh=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var f;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${as}em`},u=((f=e.image)==null?void 0:f.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),w=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}),x=a.jsxs(a.Fragment,{children:[p,w]});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:x}):x})},Zh=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=z.useScopedStyles(),[r,l]=s.useState(0),d=r>0?Math.round(r):0,{speed:c,direction:u,pauseOnHover:p,gap:w,layoutType:x,curveAmplitude:f,curveFrequency:h,textFontFamily:y,textFontSettings:b,textFontSize:C,textLineHeight:v,textLetterSpacing:S,textWordSpacing:H,textTextAppearance:N,textColor:U,backgroundColor:O,ribbonWidth:R}=e,B=R??v,$=x==="curve",M=Oh(f),_=Dh(h),A=s.useMemo(()=>Ah(o,d,$),[o,d,$]),m=s.useMemo(()=>Zt({fontSettings:{fontFamily:y,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:S,wordSpacing:H,fontSize:C,lineHeight:v,textAppearance:N,color:U},n),[y,b,S,H,C,v,N,U,n]),P=Ie=>z.scalingValue(Ie,n??!1),I=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,ee=I&&(V||!!n),T=Math.max(0,c)*Fh,j=V&&p==="on",[K,ce]=s.useState(!1),se=V?j&&K?"paused":"running":"paused",k=se==="running"&&T>0&&d>0,ae=d>0&&T>0?d/T*1e3:0,q=s.useRef(null),le=s.useRef(null),Z=s.useRef(null),xe=s.useRef(null),Ne=s.useRef(null),ye=s.useRef(null),ue=s.useRef(k),Q=s.useRef(null),de=s.useRef(null),ne=s.useRef(M),Ee=s.useRef(_);ue.current=k,ne.current=M,Ee.current=_;const[Te,Oe]=s.useState(0),[ve,we]=s.useState(0),[$e,g]=s.useState(0),[G,F]=s.useState(0),[X,me]=s.useState(0),Y=s.useMemo(()=>(t??[]).map(Ie=>{var be;return`${Ie.text}\0${((be=Ie.image)==null?void 0:be.url)??""}\0${Ie.link??""}`}).join("\0"),[t]),[L,ie]=s.useState(Sa),oe=s.useMemo(()=>{const Ie=t??[];return Ie.length===0||!(V||n)?Ie:zh(Ie,L)},[t,V,L,n]),D=ee?El:1;s.useLayoutEffect(()=>{ie(Sa),l(0)},[Y]),s.useLayoutEffect(()=>{var _e;const Ie=ye.current;if(!Ie)return;const be=()=>{const it=getComputedStyle(Ie),ot=parseFloat(it.fontSize)||0;if(ot<=0)return;const rt=Bh();if(!rt){Oe(ot*as),we(0);return}rt.font=`${it.fontStyle} ${it.fontWeight} ${ot}px ${it.fontFamily}`;const ht=rt.measureText("H"),It=ht.actualBoundingBoxAscent>0?ht.actualBoundingBoxAscent:ot*as,Et=Math.max(0,ht.actualBoundingBoxDescent||0),dt=ht.fontBoundingBoxAscent||0,mt=ht.fontBoundingBoxDescent||0;Oe(Tt=>Math.abs(Tt-It)>.5?It:Tt);const $t=dt>0||mt>0?(mt-Et-(dt-It))/2:0;we(Tt=>Math.abs(Tt-$t)>.25?$t:Tt)};be();const Le=typeof document<"u"?document.fonts:void 0;(_e=Le==null?void 0:Le.ready)==null||_e.then(be).catch(()=>{});const Ye=new ResizeObserver(be);return Ye.observe(Ie),()=>Ye.disconnect()},[m.fontFamily,m.fontWeight,m.fontStyle,m.fontSize,m.lineHeight]),s.useLayoutEffect(()=>{if(!ee)return;const Ie=q.current,be=xe.current;if(!Ie||!be)return;const Le={id:0},Ye=()=>{const rt=Ie.offsetWidth||Ie.getBoundingClientRect().width,ht=be.offsetWidth||be.getBoundingClientRect().width;if(I&&rt>0&&ht>0){const It=ht/L;if(It>0){let Et=rt,dt=_h;if($){const $t=rt*ne.current,Tt=Ee.current,ft=Tt>0?2*Math.PI*Tt/rt:0,Ft=Xh($t,ft);Et=Math.max(rt,Ft*rt/(El-1)),dt=Wh}const mt=Math.min(dt,Math.max(Sa,Math.ceil(Et/It)+1));if(mt!==L){ie(mt);return}}}ht>0&&l(ht)},_e=()=>{cancelAnimationFrame(Le.id),Le.id=requestAnimationFrame(Ye)};_e();const it=new ResizeObserver(_e);it.observe(Ie),it.observe(be);const ot=()=>{document.hidden||_e()};return document.addEventListener("visibilitychange",ot),window.addEventListener("pageshow",ot),window.addEventListener("focus",ot),()=>{cancelAnimationFrame(Le.id),it.disconnect(),document.removeEventListener("visibilitychange",ot),window.removeEventListener("pageshow",ot),window.removeEventListener("focus",ot)}},[ee,Y,L,I,Te,$,M,_]),s.useLayoutEffect(()=>{const Ie=Ne.current;if(!Ie)return;const be={id:0},Le=()=>{const _e=Ie.offsetHeight;_e>0&&me(it=>Math.abs(it-_e)>.5?_e:it)};be.id=requestAnimationFrame(Le);const Ye=new ResizeObserver(()=>{cancelAnimationFrame(be.id),be.id=requestAnimationFrame(Le)});return Ye.observe(Ie),()=>{cancelAnimationFrame(be.id),Ye.disconnect()}},[B,n]),s.useLayoutEffect(()=>{if(!$){g(0),F(0);return}const Ie=q.current,be=xe.current;if(!Ie||!be)return;const Le={id:0},Ye=()=>{const it=Ie.offsetWidth,ot=be.offsetHeight;it>0&&F(rt=>Math.abs(rt-it)>.5?it:rt),ot>0&&g(rt=>Math.abs(rt-ot)>.5?ot:rt)};Le.id=requestAnimationFrame(Ye);const _e=new ResizeObserver(()=>{cancelAnimationFrame(Le.id),Le.id=requestAnimationFrame(Ye)});return _e.observe(Ie),_e.observe(be),()=>{cancelAnimationFrame(Le.id),_e.disconnect()}},[$,Y,Te,v,C,ee]),s.useLayoutEffect(()=>{if(!ee||d<=0)return;const Ie=Z.current;Ie&&jh(Ie)},[ee,d,u,T]),s.useLayoutEffect(()=>{if(!$||!I)return;const Ie=q.current;if(!Ie)return;const be={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Le=()=>{for(const It of be.itemsCache)for(const Et of It.glyphs)Ml(Et.inner)},Ye=()=>{const It=le.current??Ie;be.itemsCache=Array.from(Ie.querySelectorAll("[data-marquee-text-item]"),Et=>{const dt=[];return Et.querySelectorAll("[data-marquee-wave-node]").forEach(mt=>{const $t=mt.firstElementChild;$t&&dt.push({inner:$t,layoutLocalX:qh(mt,It)})}),{item:Et,glyphs:dt}}),be.cacheDirty=!1},_e=()=>{be.cacheDirty&&Ye();const Et=(le.current??Ie).offsetWidth||1,dt=Et*ne.current,mt=Ee.current,$t=2*Math.PI*mt/Et,Tt=`${Et}|${dt}|${$t}`;if(Tt!==be.lutKey&&(be.lutKey=Tt,be.lut=zd(dt,$t,jd)),Math.abs(dt)<=0||$t<=0){Le();return}const ft=Z.current,Ft=ft?Gh(getComputedStyle(ft).transform):0,Ht=Ie.getBoundingClientRect(),Ot=Ht.left,Kt=Ht.right,Ct=be.lut&&be.lut.wavelength>0?Math.max(0,(be.lut.periodArc/be.lut.wavelength-1)*Et):0;for(const{item:Dt,glyphs:tn}of be.itemsCache){const gt=Dt.getBoundingClientRect();if(gt.right<Ot||gt.left>Kt+Ct){for(const Me of tn)Ml(Me.inner);continue}for(const Me of tn){const Ve=Me.layoutLocalX+Ft,tt=be.lut?Uh(be.lut,Ve):Ve,pt=$t*tt,bt=dt*Math.sin(pt),Mt=dt*$t*Math.cos(pt),yt=Math.atan(Mt)*(180/Math.PI);Vh(Me.inner,tt-Ve,bt,yt)}}},it=()=>{be.cancelled||(be.raf=0,_e(),ue.current&&!document.hidden&&(be.raf=requestAnimationFrame(it)))},ot=()=>{be.cancelled||be.raf||(be.raf=requestAnimationFrame(it))},rt=()=>{be.cacheDirty=!0,_e(),ot()};Q.current=ot,de.current=rt,_e(),ot();const ht=()=>{if(document.hidden){cancelAnimationFrame(be.raf),be.raf=0;return}cancelAnimationFrame(be.raf),be.raf=0,rt()};return document.addEventListener("visibilitychange",ht),window.addEventListener("pageshow",ht),window.addEventListener("focus",ht),()=>{be.cancelled=!0,Q.current=null,de.current=null,cancelAnimationFrame(be.raf),document.removeEventListener("visibilitychange",ht),window.removeEventListener("pageshow",ht),window.removeEventListener("focus",ht),Le()}},[$,I]),s.useLayoutEffect(()=>{var Ie;!$||!I||(Ie=de.current)==null||Ie.call(de)},[$,I,r,Y,L,Te,M,_,G]),s.useLayoutEffect(()=>{var Ie;(Ie=Q.current)==null||Ie.call(Q)},[k,u]);const te=()=>{j&&ce(!0)},Ae=()=>{j&&ce(!1)},he=$?Math.abs(M)*100:0,J=P(B),Ze={minHeight:J,...$?{paddingTop:`${he}%`,paddingBottom:`${he}%`}:{}},Fe={height:J,...$?{visibility:"hidden"}:{backgroundColor:O}},Qe={gap:P(w),minHeight:J},Xe=G*M,nt=Math.abs(Xe),et=X>0?X:$e,Be=Math.max($e,et),fe=nt+Be/2,He=Math.max(et,1),ze=$&&G>0&&Be>0?Yh(G,Xe,_,fe,He):"",Je=nt*2+Be,Ce=ze?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${G} ${Je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:ze,fill:"none",stroke:O,strokeWidth:et,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,De=a.jsx("div",{ref:Ne,className:`${o}-ribbon`,style:Fe,"aria-hidden":!0}),qe=(Ie,be,Le)=>a.jsx(Kh,{item:Ie,prefix:o,textCss:m,capHeightPx:Te,opticalOffsetY:ve,imageGapPx:P(w),isCurve:$},`${be}-${Le}`),ge=a.jsx("span",{ref:ye,"aria-hidden":!0,className:`${o}-cap-ref`,style:m,children:"H"}),Pe=`${Math.max(0,ae)/1e3}s`,je=ee?a.jsx("div",{ref:Z,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:te,onMouseLeave:Ae,style:{WebkitAnimationDuration:Pe,animationDuration:Pe,WebkitAnimationPlayState:se,animationPlayState:se},children:Array.from({length:D},(Ie,be)=>a.jsx("div",{ref:be===0?xe:void 0,className:`${o}-marquee-set`,style:{...Qe,paddingRight:P(w)},"aria-hidden":be>0,children:oe.map((Le,Ye)=>qe(Le,be,Ye))},`set-${be}`))}):a.jsx("div",{ref:xe,className:xt(`${o}-marquee-set`,`${o}-marquee-static`),style:Qe,children:t==null?void 0:t.map((Ie,be)=>qe(Ie,0,be))});return a.jsxs("div",{ref:q,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),ge,a.jsxs("div",{ref:le,className:`${o}-marquee-wrapper`,style:Ze,children:[De,Ce,je]})]})},Jh=`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
- `,Jh={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Qh={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:{...Jh.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:""}]}},ef={element:Kh,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:Qh,sourceCode:Zh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function tf(e,t){const n=t>0?`${t}px`:"0px";return`
3538
+ `,Qh={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ef={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:{...Qh.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:""}]}},tf={element:Zh,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:ef,sourceCode:Jh,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function nf(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 nf=30,Ml=2,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=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=D.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:b,corners:v,stroke:g,strokeColor:h,bgColor:f,padding:x,logoMarginTop:S,logoWidth:y,logoHeight:w,captionMarginTop:H}=e,N=!!o,U=((t==null?void 0:t.length)??0)>0,O=d>0&&(!n||i),C=U&&(O||n),V=Math.max(0,d)*nf,$=F=>D.scalingValue(F,n??!1),R=s.useRef(null),k=s.useRef(null),T=s.useRef(null),[m,M]=s.useState(0),[E,z]=s.useState(0),ne=E>0?E:0,I=s.useMemo(()=>tf(r,ne),[r,ne]),[W,K]=s.useState(0),ae=O&&u==="on",[de,A]=s.useState(!1),he=s.useRef(null),[q,ce]=s.useState(0),[Q,be]=s.useState(0),He=s.useRef(null),xe=F=>{var pe,Z,me,De,ge;return{fontSettings:{fontFamily:(e==null?void 0:e[`${F}FontFamily`])??"Arial",fontWeight:((pe=e==null?void 0:e[`${F}FontSettings`])==null?void 0:pe.fontWeight)??400,fontStyle:((Z=e==null?void 0:e[`${F}FontSettings`])==null?void 0:Z.fontStyle)??"normal"},textAppearance:{textTransform:((me=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:me.textTransform)??"none",textDecoration:((De=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:De.textDecoration)??"none",fontVariant:((ge=e==null?void 0:e[`${F}TextAppearance`])==null?void 0:ge.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${F}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${F}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${F}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${F}LineHeight`])??.01,color:(e==null?void 0:e[`${F}Color`])??"#000000"}},le=xe("text"),ee=xe("caption"),ue=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(F=>{var ve,pe;return(((ve=F.text)==null?void 0:ve.length)??0)>0||(((pe=F.caption)==null?void 0:pe.length)??0)>0}),[t]),oe=s.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:E<=0||m<=0?Ml:Math.max(Ml,Math.ceil(m/E)+1),[C,t==null?void 0:t.length,E,m]);s.useLayoutEffect(()=>{if(!C)return;const F=R.current,ve=T.current;if(!F||!ve)return;let pe=0;const Z=()=>{const ge=F.getBoundingClientRect().width,G=ve.getBoundingClientRect().width,Me=He.current,_e=typeof Me=="number"&&Math.abs(Me-G)<=.25;if(He.current=G,M(ge),typeof G=="number"&&G>0&&E<=0){z(G);return}_e&&G!==E?z(G):!_e&&E<=0&&(cancelAnimationFrame(pe),pe=requestAnimationFrame(Z))},me=()=>{cancelAnimationFrame(pe),pe=requestAnimationFrame(Z)};me();const De=new ResizeObserver(me);return De.observe(F),De.observe(ve),()=>{cancelAnimationFrame(pe),De.disconnect()}},[O,C,E]);const Fe=ne>0&&V>0?ne/V*1e3:0,Ce=`${Math.max(0,Fe)/1e3}s`;s.useLayoutEffect(()=>{if(!C||ne<=0)return;const F=k.current;F&&of(F)},[C,ne,c]),s.useLayoutEffect(()=>{if(!C){K(0);return}const F=T.current,ve=k.current;if(!F||!ve)return;const pe=()=>{let me=0;for(let De=0;De<F.children.length;De++){const G=F.children[De].firstElementChild;G&&(me=Math.max(me,G.offsetHeight))}me<=0&&(me=ve.offsetHeight),K(me>0?me:0)};pe();const Z=new ResizeObserver(pe);return Z.observe(F),Z.observe(ve),()=>{Z.disconnect()}},[C,oe,t,n,p,b,x,g,v,y,w,q,Q]);const P=()=>{ae&&A(!0)},Y=()=>{ae&&A(!1)},X=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),ie=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),j=s.useCallback((F,ve,pe,Z)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:X,width:"100%"},children:[a.jsx("div",{"data-controls":N?Z==null?void 0:Z.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${r}-control`:void 0,style:{height:$((Z==null?void 0:Z.marginTop)??0)}}),a.jsx("div",{...Z!=null&&Z.dataMeasureKind?{"data-testimonial-measure":Z.dataMeasureKind}:{},style:{...Yt(F,n),textAlign:ie,pointerEvents:"auto",...typeof(Z==null?void 0:Z.minHeightPx)=="number"&&Z.minHeightPx>0?{minHeight:Z.minHeightPx}:{}},children:a.jsx(Ri,{content:ve})})]},pe),[X,ie,n,N,r,$]),B=s.useCallback((F,ve,pe)=>{var Z,me,De;return a.jsxs("div",{style:{padding:`${$(x.top)} ${$(x.right)} ${$(x.bottom)} ${$(x.left)}`,width:$(b+g*2),height:"100%",borderRadius:$(v),border:`${$(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:f}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:X,textAlign:ie},children:[F.text&&j(le,F.text,"text",pe!=null&&pe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(pe==null?void 0:pe.textMinHeightPx)=="number"&&pe.textMinHeightPx>0?{minHeightPx:pe.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:X,width:"100%"},children:[a.jsx("div",{"data-controls":N&&!(pe!=null&&pe.dataMeasureAttrs)?"logoMarginTop":void 0,className:N&&!(pe!=null&&pe.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(S)}}),a.jsx("div",{style:{width:$(y),height:$(w)},children:((Z=F.logo)==null?void 0:Z.url)&&a.jsx("img",{src:F.logo.url,alt:((me=F.logo)==null?void 0:me.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((De=F.logo)==null?void 0:De.objectFit)||"contain"}})})]}),F.caption&&j(ee,F.caption,"caption",{...pe!=null&&pe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...pe!=null&&pe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(pe==null?void 0:pe.captionMinHeightPx)=="number"&&pe.captionMinHeightPx>0?{minHeightPx:pe.captionMinHeightPx}:{}})]})]},ve)},[f,H,ee,b,v,w,S,y,X,ie,x.bottom,x.left,x.right,x.top,j,g,h,le,n,N,r]),J=s.useCallback(F=>{ce(F.maxTextPx),be(F.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!ue){J({maxTextPx:0,maxCaptionPx:0});return}const F=he.current;if(!F)return;const ve=()=>{D.readTestimonialTextMeasure(F,J)};ve();const pe=new ResizeObserver(ve);return pe.observe(F),()=>{pe.disconnect()}},[ue,J,t,B]);const te=ue?{textMinHeightPx:q,captionMinHeightPx:Q}:void 0,$e=ue?a.jsx("div",{ref:he,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((F,ve)=>B(F,`measure-${ve}`,{dataMeasureAttrs:!0}))}):null,ye=(F,ve)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[B(F,`card-${ve}`,te),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ve);if(C){const F=O?ae&&de?"paused":"running":"paused";return a.jsxs("div",{ref:R,className:yt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...W>0?{height:W}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),$e,a.jsx("div",{ref:k,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:P,onMouseLeave:Y,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:Ce,WebkitAnimationDuration:Ce,animationPlayState:F,WebkitAnimationPlayState:F},children:Array.from({length:oe},(ve,pe)=>a.jsx("div",{ref:pe===0?T:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":pe>0,children:t==null?void 0:t.map((Z,me)=>ye(Z,`${pe}-${me}`))},`set-${pe}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),$e,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((F,ve)=>ye(F,ve))})]})},af=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3627
+ `}const of=30,Pl=2,rf=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")},af=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=z.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:w,corners:x,stroke:f,strokeColor:h,bgColor:y,padding:b,logoMarginTop:C,logoWidth:v,logoHeight:S,captionMarginTop:H}=e,N=!!o,U=((t==null?void 0:t.length)??0)>0,O=d>0&&(!n||i),R=U&&(O||n),B=Math.max(0,d)*of,$=L=>z.scalingValue(L,n??!1),M=s.useRef(null),_=s.useRef(null),A=s.useRef(null),[m,P]=s.useState(0),[I,V]=s.useState(0),ee=I>0?I:0,T=s.useMemo(()=>nf(r,ee),[r,ee]),[j,K]=s.useState(0),ce=O&&u==="on",[se,k]=s.useState(!1),ae=s.useRef(null),[q,le]=s.useState(0),[Z,xe]=s.useState(0),Ne=s.useRef(null),ye=L=>{var oe,D,te,Ae,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${L}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${L}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((D=e==null?void 0:e[`${L}FontSettings`])==null?void 0:D.fontStyle)??"normal"},textAppearance:{textTransform:((te=e==null?void 0:e[`${L}TextAppearance`])==null?void 0:te.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${L}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${L}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${L}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${L}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${L}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${L}LineHeight`])??.01,color:(e==null?void 0:e[`${L}Color`])??"#000000"}},ue=ye("text"),Q=ye("caption"),de=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(L=>{var ie,oe;return(((ie=L.text)==null?void 0:ie.length)??0)>0||(((oe=L.caption)==null?void 0:oe.length)??0)>0}),[t]),ne=s.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:I<=0||m<=0?Pl:Math.max(Pl,Math.ceil(m/I)+1),[R,t==null?void 0:t.length,I,m]);s.useLayoutEffect(()=>{if(!R)return;const L=M.current,ie=A.current;if(!L||!ie)return;let oe=0;const D=()=>{const he=L.getBoundingClientRect().width,J=ie.getBoundingClientRect().width,Ze=Ne.current,Fe=typeof Ze=="number"&&Math.abs(Ze-J)<=.25;if(Ne.current=J,P(he),typeof J=="number"&&J>0&&I<=0){V(J);return}Fe&&J!==I?V(J):!Fe&&I<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(D))},te=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(D)};te();const Ae=new ResizeObserver(te);return Ae.observe(L),Ae.observe(ie),()=>{cancelAnimationFrame(oe),Ae.disconnect()}},[O,R,I]);const Ee=ee>0&&B>0?ee/B*1e3:0,Te=`${Math.max(0,Ee)/1e3}s`;s.useLayoutEffect(()=>{if(!R||ee<=0)return;const L=_.current;L&&rf(L)},[R,ee,c]),s.useLayoutEffect(()=>{if(!R){K(0);return}const L=A.current,ie=_.current;if(!L||!ie)return;const oe=()=>{let te=0;for(let Ae=0;Ae<L.children.length;Ae++){const J=L.children[Ae].firstElementChild;J&&(te=Math.max(te,J.offsetHeight))}te<=0&&(te=ie.offsetHeight),K(te>0?te:0)};oe();const D=new ResizeObserver(oe);return D.observe(L),D.observe(ie),()=>{D.disconnect()}},[R,ne,t,n,p,w,b,f,x,v,S,q,Z]);const Oe=()=>{ce&&k(!0)},ve=()=>{ce&&k(!1)},we=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]),g=s.useCallback((L,ie,oe,D)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:we,width:"100%"},children:[a.jsx("div",{"data-controls":N?D==null?void 0:D.controlsName:void 0,"data-controls-axis":N?"y":void 0,className:N?`${r}-control`:void 0,style:{height:$((D==null?void 0:D.marginTop)??0)}}),a.jsx("div",{...D!=null&&D.dataMeasureKind?{"data-testimonial-measure":D.dataMeasureKind}:{},style:{...Zt(L,n),textAlign:$e,pointerEvents:"auto",...typeof(D==null?void 0:D.minHeightPx)=="number"&&D.minHeightPx>0?{minHeight:D.minHeightPx}:{}},children:a.jsx(Ii,{content:ie})})]},oe),[we,$e,n,N,r,$]),G=s.useCallback((L,ie,oe)=>{var D,te,Ae;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(w+f*2),height:"100%",borderRadius:$(x),border:`${$(f)} 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:we,textAlign:$e},children:[L.text&&g(ue,L.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:we,width:"100%"},children:[a.jsx("div",{"data-controls":N&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:N&&!(oe!=null&&oe.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(C)}}),a.jsx("div",{style:{width:$(v),height:$(S)},children:((D=L.logo)==null?void 0:D.url)&&a.jsx("img",{src:L.logo.url,alt:((te=L.logo)==null?void 0:te.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ae=L.logo)==null?void 0:Ae.objectFit)||"contain"}})})]}),L.caption&&g(Q,L.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},ie)},[y,H,Q,w,x,S,C,v,we,$e,b.bottom,b.left,b.right,b.top,g,f,h,ue,n,N,r]),F=s.useCallback(L=>{le(L.maxTextPx),xe(L.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!de){F({maxTextPx:0,maxCaptionPx:0});return}const L=ae.current;if(!L)return;const ie=()=>{z.readTestimonialTextMeasure(L,F)};ie();const oe=new ResizeObserver(ie);return oe.observe(L),()=>{oe.disconnect()}},[de,F,t,G]);const X=de?{textMinHeightPx:q,captionMinHeightPx:Z}:void 0,me=de?a.jsx("div",{ref:ae,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((L,ie)=>G(L,`measure-${ie}`,{dataMeasureAttrs:!0}))}):null,Y=(L,ie)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[G(L,`card-${ie}`,X),N&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ie);if(R){const L=O?ce&&se?"paused":"running":"paused";return a.jsxs("div",{ref:M,className:xt(`${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:_,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:L,WebkitAnimationPlayState:L},children:Array.from({length:ne},(ie,oe)=>a.jsx("div",{ref:oe===0?A: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((D,te)=>Y(D,`${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((L,ie)=>Y(L,ie))})]})},sf=`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
- `,Pl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},sf={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:{...Pl.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:{...Pl.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"}]}]}]}},lf={element:rf,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:sf,sourceCode:af,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function cf(e){return`
4258
+ `,kl={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},lf={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:{...kl.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:{...kl.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"}]}]}]}},cf={element:af,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:lf,sourceCode:sf,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function df(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 df=3e3,uf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=D.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:b,captionMarginTop:v,imageWidth:g,imageHeight:h,controlsWidth:f,controlsColor:x,controlsHoverColor:S}=e,y=d>0&&(!n||!!i),[w,H]=s.useState(0),[N,U]=s.useState(null),[O,C]=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]),R=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{H(0),U(null),C(!1)},[l.length]);const k=l[w],T=N===null?null:l[N],m=xe=>{var ee,ue,oe,Fe,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${xe}FontFamily`])??"Arial",fontWeight:((ee=e==null?void 0:e[`${xe}FontSettings`])==null?void 0:ee.fontWeight)??400,fontStyle:((ue=e==null?void 0:e[`${xe}FontSettings`])==null?void 0:ue.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((Fe=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:Fe.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${xe}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${xe}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${xe}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${xe}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${xe}WordSpacing`])??0,color:(e==null?void 0:e[`${xe}Color`])??"#000000"}},M=m("text"),E=m("caption"),z=l.length>1&&l.some(xe=>{var le,ee;return(((le=xe.text)==null?void 0:le.length)??0)>0||(((ee=xe.caption)==null?void 0:ee.length)??0)>0}),ne=s.useRef(null),[I,W]=s.useState(0),[K,ae]=s.useState(0),de=e.controls??{mode:"Off",icon:null},A=l.length>1,he=s.useCallback((xe,le)=>!A||le===xe?xe:(V.current&&window.clearTimeout(V.current),U(xe),C(!0),V.current=window.setTimeout(()=>{U(null),C(!1),V.current=null},300),le),[A]),q=s.useCallback(()=>{A&&H(xe=>he(xe,(xe-1+l.length)%l.length))},[A,he,l.length]),ce=s.useCallback(()=>{A&&H(xe=>he(xe,(xe+1)%l.length))},[A,he,l.length]);s.useEffect(()=>{if(!y||!A)return;const xe=Math.max(300,df/d),le=window.setInterval(()=>{H(ee=>he(ee,(ee+1)%l.length))},xe);return()=>{window.clearInterval(le)}},[y,A,he,l.length,d]),s.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const Q=(xe,le)=>{var Ce,P,Y,X;const ee=le==null?void 0:le.textMinHeightPx,ue=le==null?void 0:le.captionMinHeightPx,oe=le==null?void 0:le.dataMeasureAttrs,Fe=o&&!(le!=null&&le.dataMeasureAttrs)&&!(le!=null&&le.hideControls);return a.jsxs(a.Fragment,{children:[xe.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Fe?"textMarginTop":void 0,className:Fe?`${r}-control`:void 0,style:{height:D.scalingValue(b??0,n??!1)}}),a.jsx("div",{...oe&&{"data-testimonial-measure":"text"},style:{...Yt(M,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:R,pointerEvents:"auto"},children:a.jsx(Ri,{content:xe.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Fe?"imageMarginTop":void 0,className:Fe?`${r}-control`:void 0,style:{height:D.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:D.scalingValue(g??0,n??!1),height:D.scalingValue(h??0,n??!1)},children:((Ce=xe.image)==null?void 0:Ce.url)&&a.jsx("img",{src:(P=xe.image)==null?void 0:P.url,alt:((Y=xe.image)==null?void 0:Y.name)??"",className:`${r}-icon`,style:{objectFit:((X=xe.image)==null?void 0:X.objectFit)||"contain"}})})]}),xe.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Fe?"captionMarginTop":void 0,className:Fe?`${r}-control`:void 0,style:{height:D.scalingValue(v??0,n??!1)}}),a.jsx("div",{...oe?{"data-testimonial-measure":"caption"}:{},style:{...Yt(E,n),...ue&&ue>0?{minHeight:ue}:{},textAlign:R,pointerEvents:"auto"},children:a.jsx(Ri,{content:xe.caption})})]})]})},be=s.useCallback(xe=>{W(xe.maxTextPx),ae(xe.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!z){be({maxTextPx:0,maxCaptionPx:0});return}const xe=ne.current;if(!xe)return;const le=()=>{D.readTestimonialTextMeasure(xe,be)};le();const ee=new ResizeObserver(le);return ee.observe(xe),()=>{ee.disconnect()}},[z,be,t]),!k)return a.jsx(a.Fragment,{});const He=z?{textMinHeightPx:I,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:cf(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:D.scalingValue(u??0,n??!1),alignItems:$},children:[z&&a.jsx("div",{ref:ne,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((xe,le)=>a.jsx("div",{style:{width:"100%"},children:Q(xe,{dataMeasureAttrs:!0})},le))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[T&&O&&a.jsx("div",{className:yt(`${r}-fade-item-prev`,`${r}-fade-out`),children:Q(T,{...He,hideControls:!0})}),a.jsx("div",{className:yt(`${r}-fade-item-current`,O?`${r}-fade-in`:void 0),children:Q(k,He)})]})]}),de.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:D.scalingValue(f??.02,n??!1),height:D.scalingValue(f??.02,n??!1),"--arrow-hover-color":S},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:q,disabled:!A,"aria-label":"Previous testimonial",children:de.icon&&a.jsx(ln,{url:de.icon,fill:x,hoverFill:S,className:yt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:yt(`${r}-arrow`,`${r}-next-arrow`),style:{width:D.scalingValue(f??.02,n??!1),height:D.scalingValue(f??.02,n??!1),"--arrow-hover-color":S},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ce,disabled:!A,"aria-label":"Next testimonial",children:de.icon&&a.jsx(ln,{url:de.icon,fill:x,hoverFill:S,className:`${r}-arrow-img`})})})]})]})})},pf=`import cn from 'classnames';
4382
+ `}const uf=3e3,pf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=z.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:w,captionMarginTop:x,imageWidth:f,imageHeight:h,controlsWidth:y,controlsColor:b,controlsHoverColor:C}=e,v=d>0&&(!n||!!i),[S,H]=s.useState(0),[N,U]=s.useState(null),[O,R]=s.useState(!1),B=s.useRef(null),$=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=s.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);s.useEffect(()=>{H(0),U(null),R(!1)},[l.length]);const _=l[S],A=N===null?null:l[N],m=ye=>{var Q,de,ne,Ee,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((Q=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:Q.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:((Ee=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:Ee.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"}},P=m("text"),I=m("caption"),V=l.length>1&&l.some(ye=>{var ue,Q;return(((ue=ye.text)==null?void 0:ue.length)??0)>0||(((Q=ye.caption)==null?void 0:Q.length)??0)>0}),ee=s.useRef(null),[T,j]=s.useState(0),[K,ce]=s.useState(0),se=e.controls??{mode:"Off",icon:null},k=l.length>1,ae=s.useCallback((ye,ue)=>!k||ue===ye?ye:(B.current&&window.clearTimeout(B.current),U(ye),R(!0),B.current=window.setTimeout(()=>{U(null),R(!1),B.current=null},300),ue),[k]),q=s.useCallback(()=>{k&&H(ye=>ae(ye,(ye-1+l.length)%l.length))},[k,ae,l.length]),le=s.useCallback(()=>{k&&H(ye=>ae(ye,(ye+1)%l.length))},[k,ae,l.length]);s.useEffect(()=>{if(!v||!k)return;const ye=Math.max(300,uf/d),ue=window.setInterval(()=>{H(Q=>ae(Q,(Q+1)%l.length))},ye);return()=>{window.clearInterval(ue)}},[v,k,ae,l.length,d]),s.useEffect(()=>()=>{B.current&&window.clearTimeout(B.current)},[]);const Z=(ye,ue)=>{var Te,Oe,ve,we;const Q=ue==null?void 0:ue.textMinHeightPx,de=ue==null?void 0:ue.captionMinHeightPx,ne=ue==null?void 0:ue.dataMeasureAttrs,Ee=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":Ee?"textMarginTop":void 0,className:Ee?`${r}-control`:void 0,style:{height:z.scalingValue(w??0,n??!1)}}),a.jsx("div",{...ne&&{"data-testimonial-measure":"text"},style:{...Zt(P,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(Ii,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Ee?"imageMarginTop":void 0,className:Ee?`${r}-control`:void 0,style:{height:z.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:z.scalingValue(f??0,n??!1),height:z.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:((we=ye.image)==null?void 0:we.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":Ee?"captionMarginTop":void 0,className:Ee?`${r}-control`:void 0,style:{height:z.scalingValue(x??0,n??!1)}}),a.jsx("div",{...ne?{"data-testimonial-measure":"caption"}:{},style:{...Zt(I,n),...de&&de>0?{minHeight:de}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(Ii,{content:ye.caption})})]})]})},xe=s.useCallback(ye=>{j(ye.maxTextPx),ce(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!V){xe({maxTextPx:0,maxCaptionPx:0});return}const ye=ee.current;if(!ye)return;const ue=()=>{z.readTestimonialTextMeasure(ye,xe)};ue();const Q=new ResizeObserver(ue);return Q.observe(ye),()=>{Q.disconnect()}},[V,xe,t]),!_)return a.jsx(a.Fragment,{});const Ne=V?{textMinHeightPx:T,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:df(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:z.scalingValue(u??0,n??!1),alignItems:$},children:[V&&a.jsx("div",{ref:ee,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ue)=>a.jsx("div",{style:{width:"100%"},children:Z(ye,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[A&&O&&a.jsx("div",{className:xt(`${r}-fade-item-prev`,`${r}-fade-out`),children:Z(A,{...Ne,hideControls:!0})}),a.jsx("div",{className:xt(`${r}-fade-item-current`,O?`${r}-fade-in`:void 0),children:Z(_,Ne)})]})]}),se.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:z.scalingValue(y??.02,n??!1),height:z.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(ln,{url:se.icon,fill:b,hoverFill:C,className:xt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:xt(`${r}-arrow`,`${r}-next-arrow`),style:{width:z.scalingValue(y??.02,n??!1),height:z.scalingValue(y??.02,n??!1),"--arrow-hover-color":C},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!k,"aria-label":"Next testimonial",children:se.icon&&a.jsx(ln,{url:se.icon,fill:b,hoverFill:C,className:`${r}-arrow-img`})})})]})]})})},mf=`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
- `,mf="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>'),kl={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},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:{...kl.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:{...kl.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:mf},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"}]}]}]}},hf={element:uf,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:gf,sourceCode:pf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function ff(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Al(e){return((e==null?void 0:e.trim().length)??0)>0}function $a(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ca(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:D.scalingValue((o-t)/2,i)}}function yf(e){return`
4878
+ `,gf="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>'),Al={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},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: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:{...Al.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:{...Al.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:gf},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"}]}]}]}},ff={element:pf,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:hf,sourceCode:mf,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 Fl(e){return((e==null?void 0:e.trim().length)??0)>0}function $a(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ca(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:z.scalingValue((o-t)/2,i)}}function vf(e){return`
4879
4879
  .${e}-wrapper {
4880
4880
  display: grid;
4881
4881
  align-items: start;
4882
4882
  justify-content: center;
4883
- min-height: ${ff(48)};
4883
+ min-height: ${yf(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 vf(){return Math.random()<.5?"ltr":"ttb"}function xf(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function bf(e){const t=vf();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{xf(e)})})}const wn=500,wf=750,Gn="cubic-bezier(0.22, 1, 0.36, 1)",Sf=72,$f=50;function Cf(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Tf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Lf(e){const[t]=e.media;return t!=null&&t.url?t:null}function jd(e){return!Array.isArray(e)||e.length===0?[]:Cf(e)?e.flatMap(t=>{const n=Tf(t);if(!n)return[];const i=Lf(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 Ci(e){return e.type==="video"}function Rf(e){const t=new Set,n=[];for(const i of e){const o=jd(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 If({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=>Ci(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 Ef(e){e.pause(),e.removeAttribute("src"),e.load()}function Fl({media:e,className:t,style:n,onMediaClick:i}){return Ci(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function _l(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Mf(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Pf({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{Ef(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 kf({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",b=s.useRef(null),v=s.useRef(null),g=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),S=s.useRef("none"),y=s.useRef(!1),w=s.useRef(!1),H=s.useRef(null),N=s.useRef(0),U=s.useRef(null),O=s.useRef(!1),C=s.useRef(null),V=s.useRef(null),$=s.useRef(null),R=s.useRef(()=>{}),[k,T]=s.useState(null),[m,M]=s.useState(null),[E,z]=s.useState("opening"),[ne,I]=s.useState(0),[W,K]=s.useState(0),[ae,de]=s.useState(null),[A,he]=s.useState(!1),[q,ce]=s.useState(!1),[Q,be]=s.useState(!1),[He,xe]=s.useState(null),le=s.useRef(n),ee=s.useRef(void 0),ue=t[n],oe=ue?Ci(ue):!1,Fe=W!==0||A,Ce=ae!==null,P=s.useCallback(Le=>{const Ve=Le.currentTarget,se=Ve instanceof HTMLVideoElement?{width:Ve.videoWidth,height:Ve.videoHeight}:{width:Ve.naturalWidth,height:Ve.naturalHeight};!se.width||!se.height||xe(se)},[]);s.useEffect(()=>{H.current=m},[m]),s.useEffect(()=>{const Le=b.current;if(!Le)return;const Ve=()=>M(_l(Le));Ve();const se=new ResizeObserver(Ve);return se.observe(Le),()=>se.disconnect()},[]);const Y=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),X=s.useCallback(()=>{const Le=V.current;V.current=null,Y(),U.current=null,O.current=!1,de(null),he(!1),K(0),N.current=0,ce(!1),y.current=!1,x.current=0,S.current="none",Le===1?d():Le===-1&&l()},[Y,d,l]),ie=s.useCallback(()=>{Y(),V.current=null,U.current=null,O.current=!1,de(null),he(!1),K(0),N.current=0},[Y]),j=s.useCallback(()=>{Y(),C.current=window.setTimeout(()=>{V.current!==null&&X()},wn+32)},[Y,X]),B=s.useCallback((Le,Ve)=>{var Te;const se=((Te=H.current)==null?void 0:Te.width)??0;if(Y(),U.current=Le,de(Le),O.current=!0,he(!0),Ve){V.current=Le;const Xe=-Le*se;N.current=Xe,K(Xe),j();return}N.current=0,K(0),C.current=window.setTimeout(()=>{C.current=null,ie()},wn+32)},[Y,ie,j]),J=s.useCallback(Le=>{if(!(t.length<=1)){if(O.current){if(V.current===Le){$.current=Le,X();return}ie()}Y(),U.current=Le,de(Le),O.current=!1,he(!1),N.current=0,K(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(Le,!0)})})}},[t.length,B,X,ie,Y]);R.current=J;const te=s.useCallback(Le=>{Le.propertyName!=="transform"||!O.current||V.current!==null&&X()},[X]),$e=s.useCallback(()=>{const Le=v.current;if(!Le)return;const Ve=_l(Le);!Ve.width||!Ve.height||T(Ve)},[]);s.useEffect(()=>{$e();const Le=v.current;if(!Le)return;const Ve=new ResizeObserver(()=>$e());return Ve.observe(Le),()=>Ve.disconnect()},[$e]),s.useEffect(()=>{E==="opening"&&k&&z("open")},[E,k]),s.useEffect(()=>{if(E!=="closing")return;const Le=setTimeout(()=>r(),wn);return()=>clearTimeout(Le)},[E,r]),s.useEffect(()=>()=>{Y()},[Y]),s.useLayoutEffect(()=>{le.current===n&&ee.current===(ue==null?void 0:ue.url)||(Y(),V.current=null,de(null),I(0),K(0),he(!1),be(!1),ce(!1),xe(null),f.current=0,x.current=0,S.current="none",y.current=!1,O.current=!1,N.current=0,U.current=null,h.current=null,w.current=!1,le.current=n,ee.current=ue==null?void 0:ue.url)},[n,ue==null?void 0:ue.url,Y]),s.useLayoutEffect(()=>{const Le=$.current;Le!==null&&($.current=null,requestAnimationFrame(()=>{R.current(Le)}))},[n,ue==null?void 0:ue.url]),s.useEffect(()=>{if(E!=="open")return;let Le=null;const Ve=()=>{Le&&(document.removeEventListener("click",Le,!0),Le=null)},se=()=>{Ve(),Le=Pe=>{Pe.stopPropagation(),Pe.preventDefault(),Ve()},document.addEventListener("click",Le,!0)},Te=Pe=>{const Ae=Pe<0?1:-1;if(Math.abs(Pe)>$f&&t.length>1){B(Ae,!0);return}B(Ae,!1)},Xe=Pe=>{if(Pe.touches.length!==1||O.current)return;const Ae=Pe.touches[0];w.current=!0,h.current={x:Ae.clientX,y:Ae.clientY},S.current="none",x.current=0,y.current=!1},ze=Pe=>{if(!h.current||Pe.touches.length!==1||O.current)return;const Ae=Pe.touches[0],Ke=Ae.clientX-h.current.x,Oe=Ae.clientY-h.current.y;if(S.current==="none"){if(Math.abs(Ke)<10&&Math.abs(Oe)<10)return;if(Math.abs(Ke)>Math.abs(Oe)){if(t.length<=1)return;S.current="horizontal"}else if(Oe>0)S.current="vertical";else return}if(S.current==="horizontal"){y.current=!0,ce(!0),x.current=Ke;const Qe=Ke<0?1:-1;U.current!==Qe&&(U.current=Qe,de(Qe)),N.current=Ke,K(Ke),Pe.preventDefault();return}S.current==="vertical"&&(y.current=!0,ce(!0),f.current=Oe,I(Oe),Pe.preventDefault())},Re=()=>{if(!h.current)return;const Pe=S.current,Ae=y.current;if(Ae&&Pe==="horizontal")Te(x.current),se();else if(Ae&&Pe==="vertical")if(f.current>Sf){const Oe=window.innerHeight;f.current=Oe,be(!0),I(Oe),z("closing")}else f.current=0,I(0),se();else Pe==="horizontal"&&Math.abs(x.current)>0&&(Te(x.current),se());h.current=null,S.current="none",x.current=0,y.current=!1,ce(!1)};return document.addEventListener("touchstart",Xe,{passive:!0}),document.addEventListener("touchmove",ze,{passive:!1}),document.addEventListener("touchend",Re),document.addEventListener("touchcancel",Re),()=>{document.removeEventListener("touchstart",Xe),document.removeEventListener("touchmove",ze),document.removeEventListener("touchend",Re),document.removeEventListener("touchcancel",Re),Ve()}},[E,t.length,B]),s.useEffect(()=>{const Le=Ve=>{Ve.key==="Escape"&&(Ve.preventDefault(),Ve.stopPropagation(),E!=="closing"&&z("closing"))};return window.addEventListener("keydown",Le,!0),()=>window.removeEventListener("keydown",Le,!0)},[E]);const ye=()=>{E!=="closing"&&z("closing")},F=E==="open",ve=E==="closing",pe=ne>0?Math.max(0,1-ne/500):1,Z=ne>0?Math.max(.35,1-ne/500):1,me=k?p?k:Mf(k,He):null,De=Le=>{if(Le.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const Ve=me??Le.currentTarget.getBoundingClientRect(),se=Le.clientY-Ve.top,Te=Math.min(52,Ve.height*.2);if(!(se>Ve.height-Te)){if(Le.clientX-Ve.left<Ve.width/2){J(-1);return}J(1)}},ge=Le=>{if(t.length<=1)return;const Ve=me??Le.currentTarget.getBoundingClientRect(),se=Le.clientX-Ve.left,Te=Le.clientY-Ve.top,Xe=Math.min(52,Ve.height*.2);if(Te>Ve.height-Xe){Le.currentTarget.style.cursor="default";return}Le.currentTarget.style.cursor=se<Ve.width/2?"w-resize":"e-resize"},G={position:"fixed",top:m==null?void 0:m.top,left:m==null?void 0:m.left,width:m==null?void 0:m.width,height:m==null?void 0:m.height,zIndex:9998},Me=p?"cover":"contain",_e=W!==0||ne>0?`translate(${W}px, ${ne}px)`:void 0,rt=q&&!A?"none":A?`transform ${wn}ms ${Gn}`:Q?`transform ${wn}ms ${Gn}, opacity ${wn}ms ${Gn}`:E==="opening"||ve?`opacity ${wn}ms ${Gn}`:"none",Je={...G,transform:_e,opacity:ne>0?Z:E==="opening"||ve?0:1,transition:rt,pointerEvents:"none"},at={position:"absolute",top:((me==null?void 0:me.top)??0)-((m==null?void 0:m.top)??0),left:((me==null?void 0:me.left)??0)-((m==null?void 0:m.left)??0),width:me==null?void 0:me.width,height:me==null?void 0:me.height,objectFit:Me,pointerEvents:oe&&F&&!Fe?"auto":"none",touchAction:oe&&F?"none":void 0},it=(m==null?void 0:m.width)??0,je=Ce?(n+ae+t.length)%t.length:null,Se=je!==null?t[je]:null,We={...G,transform:Ce?`translateX(${ae*it+W}px)`:void 0,opacity:1,transition:A?`transform ${wn}ms ${Gn}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((k==null?void 0:k.top)??0)-((m==null?void 0:m.top)??0),left:((k==null?void 0:k.left)??0)-((m==null?void 0:m.left)??0),width:k==null?void 0:k.width,height:k==null?void 0:k.height,objectFit:Me,pointerEvents:"none"},Ze=me?{position:"fixed",top:me.top,height:me.height,width:me.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:b,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:E==="open"?"none":void 0},onClick:ye,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:F?pe:0,transition:q?"none":`opacity ${wn}ms ${Gn}`,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:F?1:0,transition:`opacity ${wn}ms ${Gn}`,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:F?1:0,transition:`opacity ${wn}ms ${Gn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),k&&m&&Se&&a.jsx("div",{style:We,onTransitionEnd:te,children:Ci(Se)?a.jsx("video",{src:Se.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${je}-${Se.url}`):a.jsx("img",{src:Se.url,alt:Se.name,style:Be},`neighbor-${je}-${Se.url}`)}),k&&m&&ue&&a.jsx("div",{style:Je,onTransitionEnd:te,children:oe?a.jsx(Pf,{src:ue.url,phase:E,mediaRef:g,mediaStyle:at,onLoadedMetadata:P,onClick:De,onMouseMove:ge},`${n}-${ue.url}`):a.jsx("img",{ref:g,src:ue.url,alt:ue.name,onLoad:P,style:at},`${n}-${ue.url}`)}),F&&Ze&&t.length>1&&!oe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ze,left:me.left,cursor:"w-resize",pointerEvents:q?"none":"auto"},onClick:Le=>{if(w.current){w.current=!1;return}Le.stopPropagation(),J(-1)}}),a.jsx("div",{style:{...Ze,left:me.left+me.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:Le=>{if(w.current){w.current=!1;return}Le.stopPropagation(),J(1)}})]})]})}function Af(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ff({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=D.useScopedStyles(),{type:p="a",gridLayout:b,textBoxWidth:v=100,verticalGap:g,entriesCount:h,lightbox:f,imageDisplay:x,imageCorners:S,lightboxImageDisplay:y,slider:w,sliderTiming:H,direction:N,transition:U,titleMarginTop:O,subtitleMarginTop:C,titleColor:V,subtitleColor:$,lightboxCounterColor:R,titleFontFamily:k,titleFontSettings:T,titleFontSize:m,titleLineHeight:M,titleLetterSpacing:E,titleWordSpacing:z,titleTextAppearance:ne,subtitleFontFamily:I,subtitleFontSettings:W,subtitleFontSize:K,subtitleLineHeight:ae,subtitleLetterSpacing:de,subtitleWordSpacing:A,subtitleTextAppearance:he,lightboxCounterFontFamily:q,lightboxCounterFontSettings:ce,lightboxCounterFontSize:Q,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:He,lightboxCounterWordSpacing:xe,lightboxCounterTextAppearance:le,showText:ee="always",alignEntries:ue="off",align:oe="top"}=e,Fe={fontSettings:{fontFamily:k,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:m??.01,lineHeight:M,letterSpacing:E??0,wordSpacing:z??0,textAppearance:ne,color:V},P={...sn(Yt(Fe,n))},Y={fontSettings:{fontFamily:I,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:K??.01,lineHeight:ae,letterSpacing:de??0,wordSpacing:A??0,textAppearance:he,color:$},ie={...sn(Yt(Y,n))},j={fontSettings:{fontFamily:q,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:be,letterSpacing:He??0,wordSpacing:xe??0,textAppearance:le,color:R},J={...sn(Yt(j,n)),...Ca(Q,be,u,n)},te=$a(m,M,`${u}-item-title`,`${u}-text-tight-leading`),$e=$a(K,ae,`${u}-item-subtitle`,`${u}-text-tight-leading`),ye=Ca(m,M,u,n),F=Ca(K,ae,u,n),ve=$a(Q,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),pe=D.buildColorVars(u,{titleColor:V,subtitleColor:$,lightboxCounterColor:R},_f,Wf),De=`${l&&l!=="default"?`${u}-state-${l}`:""}${ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ge=h===0?1/0:h,G=(t??[]).slice(0,ge),Me=s.useMemo(()=>f==="on"?Rf(G):[],[G,f]),_e=b.entryWidth??.2,rt=(x==null?void 0:x.display)==="cover",Je=(x==null?void 0:x.ratioValue)??"1:1",at=(x==null?void 0:x.reversed)??!1,[it,je]=Je.split(":").map(Number),Be=`${at?je:it} / ${at?it:je}`,Ze=b.columnsCount,Le=D.scalingValue(_e??0,n),Ve=Le,se=!rt&&w!=="off",Te=G.length%Ze||Ze,Xe=Te<Ze&&G.length>0,ze=G.length-Te,Re=Xe?Math.floor((Ze-Te)/2)+1:1,Pe=S?D.scalingValue(S,n):void 0,Ae={width:Ve,...rt?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...Pe?{borderRadius:Pe,overflow:"hidden"}:{}},Ke=`${u}-item-image-wrapper${se?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Oe=p==="d"||p==="e"||p==="f",Qe=ue==="on",tt=`calc(${D.scalingValue(_e??0,n)} * (${v} / 100))`,nt=D.scalingValue(_e*v/100,n),xt=rt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Pe?{borderRadius:Pe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Pe?{borderRadius:Pe}:{}},[It,Tt]=s.useState(0),ut=s.useRef(null),ft=U==="fade"||N==="horizontal"?"ltr":N==="vertical"?"ttb":"ltr";s.useEffect(()=>{const pt=ut.current;if(!pt)return;const Ee=new ResizeObserver(qe=>{Tt(Math.round(qe[0].contentRect.width))});return Ee.observe(pt),()=>Ee.disconnect()},[]);const Et=(()=>{const pt={...pe},Ee=ut.current?getComputedStyle(ut.current).getPropertyValue("--cntrl-article-width").trim():"";return Ee&&(pt["--cntrl-article-width"]=Ee),pt})(),[Lt,bt]=s.useState(!1),[Nt,Bt]=s.useState([]),[Zt,en]=s.useState(0),Rt=f==="on"&&(!n||i),Ot=(pt,Ee)=>{n&&!i||f!=="off"&&(Bt(pt),en(Ee),bt(!0))};s.useEffect(()=>{if(!Lt||f!=="on"||typeof document>"u")return;const pt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=pt}},[Lt,f]),s.useEffect(()=>{!n||i||bt(!1)},[n,i]);const nn=s.useMemo(()=>yf(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nn}}),f==="on"&&a.jsx(If,{mediaList:Me}),a.jsx("div",{style:pe,children:a.jsx("div",{ref:ut,className:`${u}-wrapper ${u}-type-${p}${Qe?` ${u}-align-entries`:""} ${u}-image-align-${oe} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${Ze}, ${Le})`,rowGap:Qe?0:D.scalingValue(g??0,n),columnGap:D.scalingValue(b.horizontalGap??0,n),width:D.scalingValue(b.wrapperWidth??0,n),...Qe?{[`--${u}-align-entries-row-gap`]:D.scalingValue(g??0,n)}:{}},children:G.map((pt,Ee)=>{var Ht;const qe=Al(pt.title),st=Al(pt.subtitle),mt=(((Ht=pt.link)==null?void 0:Ht.length)??0)>0&&f==="off"?pt.link:void 0,vt=Math.floor(Ee/Ze)===Math.ceil(G.length/Ze)-1,Mt=Xe&&Ee>=ze?`${Re+(Ee-ze)}`:void 0,gt=Oe?a.jsxs("div",{className:`${u}-item-text-block`,children:[qe&&a.jsx("p",{className:te,style:{width:tt,...P,...ye},children:pt.title}),qe&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:D.scalingValue(O??0,n),width:nt}}),st&&a.jsx("p",{className:$e,style:{width:tt,...ie,...F},children:pt.subtitle}),st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:D.scalingValue(C??0,n),width:nt}})]}):null,Vt=Qe?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Oe&&a.jsx("div",{"data-controls":o&&qe?"titleMarginTop":void 0,className:o&&qe?`${u}-control`:void 0,style:{height:qe?D.scalingValue(O??0,n):0,width:nt}}),qe&&a.jsx("p",{className:te,style:{width:tt,...P,...ye},children:pt.title}),Oe&&qe&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:D.scalingValue(O??0,n),width:nt}})]}):null,Wt=Qe?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Oe&&a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?D.scalingValue(C??0,n):0,width:nt}}),st&&a.jsx("p",{className:$e,style:{width:tt,...ie,...F},children:pt.subtitle}),Oe&&st&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:D.scalingValue(C??0,n),width:nt}})]}):null,_t=mt?a.jsxs("a",{href:mt,target:"_blank",className:`${u}-item-text-link`,children:[Vt,Wt]}):a.jsxs(a.Fragment,{children:[Vt,Wt]}),qt=jd(pt.gallery),Xt=qt.filter($t=>$t.lightboxMedia).map($t=>$t.lightboxMedia),Dt=a.jsx("div",{className:Ke,style:Ae,children:qt.length===0?null:w==="off"?(()=>{const{displayMedia:$t,lightboxMedia:_}=qt[0],Ie=_?Xt.findIndex(Ne=>Ne.url===_.url):-1;return a.jsx(Fl,{media:$t,className:`${u}-item-${Ci($t)?"video":"image"}`.trim(),style:xt,onMediaClick:Rt&&Ie>=0?()=>Ot(Xt,Ie):void 0})})():a.jsxs(a.Fragment,{children:[se&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:$t})=>Ci($t)?a.jsx("video",{src:$t.url,muted:!0,playsInline:!0},`sizer-${$t.url}`):a.jsx("img",{src:$t.url,alt:""},`sizer-${$t.url}`))}),a.jsx(Vs,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:H*1e3,width:"100%",height:"100%",speed:wf,type:U==="fade"?"fade":"loop",rewind:U==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ft},onMoved:$t=>{N!=="random"||U==="fade"||bf($t)},children:qt.map(({displayMedia:$t,lightboxMedia:_},Ie)=>{const Ne=_?Xt.findIndex(Ge=>Ge.url===_.url):-1;return a.jsx(Gs,{children:a.jsx(Fl,{media:$t,className:`${u}-item-${Ci($t)?"video":"image"}`.trim(),style:xt,onMediaClick:Rt&&Ne>=0?()=>Ot(Xt,Ne):void 0})},Ie)})},`${U}-${_e}-${N}-${H}-${It}-${d}`)]})}),jt=Oe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&qe?"titleMarginTop":void 0,className:o&&qe?`${u}-control`:void 0,style:{height:qe?D.scalingValue(O??0,n):0,width:nt}}),a.jsx("p",{className:te,style:{width:tt,...P,...ye},children:pt.title}),a.jsx("div",{"data-controls":o&&st?"subtitleMarginTop":void 0,className:o&&st?`${u}-control`:void 0,style:{height:st?D.scalingValue(C??0,n):0,width:nt}}),a.jsx("p",{className:$e,style:{width:tt,...ie,...F},children:pt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Mt&&!Qe?{gridColumn:Mt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Qe&&vt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${Le} * (${v} / 100))`:Le,...Mt&&Qe?{gridColumn:Mt}:{}},children:Qe?a.jsx(a.Fragment,{children:Oe?a.jsxs(a.Fragment,{children:[_t,a.jsx("a",{href:mt,target:"_blank",className:`${u}-item-image-link`,children:Dt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:mt,target:"_blank",className:`${u}-item-image-link`,children:Dt}),_t]})}):mt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:mt,target:"_blank",className:`${u}-item-image-link`,children:[gt,Dt]}),!Oe&&a.jsx("a",{href:mt,target:"_blank",className:`${u}-item-text-link`,children:jt})]}):a.jsxs(a.Fragment,{children:[gt,Dt,jt]})})},Ee)})})}),(!n||i)&&Lt&&typeof document<"u"&&f==="on"&&(()=>{const pt=(c?document.getElementById(c):null)??document.body;return Vn.createPortal(a.jsx("div",{style:Et,"data-selection":"none",children:a.jsx(kf,{prefix:u,items:Nt,index:Zt,imageDisplay:Af(y),isEditor:n,onClose:()=>bt(!1),onPrev:()=>en(Ee=>(Ee-1+Nt.length)%Nt.length),onNext:()=>en(Ee=>(Ee+1)%Nt.length),counterClassName:ve,counterStyle:J})}),pt)})()]})}const _f={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Wf=["hover","focus","filled","success","error"],Nf=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5225
+ `}function xf(){return Math.random()<.5?"ltr":"ttb"}function bf(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function wf(e){const t=xf();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{bf(e)})})}const wn=500,Sf=750,qn="cubic-bezier(0.22, 1, 0.36, 1)",$f=72,Cf=50;function Tf(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 Lf(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Rf(e){const[t]=e.media;return t!=null&&t.url?t:null}function Bd(e){return!Array.isArray(e)||e.length===0?[]:Tf(e)?e.flatMap(t=>{const n=Lf(t);if(!n)return[];const i=Rf(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 Ti(e){return e.type==="video"}function If(e){const t=new Set,n=[];for(const i of e){const o=Bd(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 Ef({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=>Ti(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 Mf(e){e.pause(),e.removeAttribute("src"),e.load()}function _l({media:e,className:t,style:n,onMediaClick:i}){return Ti(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 Wl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Pf(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 kf({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{Mf(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 Af({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",w=s.useRef(null),x=s.useRef(null),f=s.useRef(null),h=s.useRef(null),y=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),v=s.useRef(!1),S=s.useRef(!1),H=s.useRef(null),N=s.useRef(0),U=s.useRef(null),O=s.useRef(!1),R=s.useRef(null),B=s.useRef(null),$=s.useRef(null),M=s.useRef(()=>{}),[_,A]=s.useState(null),[m,P]=s.useState(null),[I,V]=s.useState("opening"),[ee,T]=s.useState(0),[j,K]=s.useState(0),[ce,se]=s.useState(null),[k,ae]=s.useState(!1),[q,le]=s.useState(!1),[Z,xe]=s.useState(!1),[Ne,ye]=s.useState(null),ue=s.useRef(n),Q=s.useRef(void 0),de=t[n],ne=de?Ti(de):!1,Ee=j!==0||k,Te=ce!==null,Oe=s.useCallback(Ce=>{const De=Ce.currentTarget,qe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!qe.width||!qe.height||ye(qe)},[]);s.useEffect(()=>{H.current=m},[m]),s.useEffect(()=>{const Ce=w.current;if(!Ce)return;const De=()=>P(Wl(Ce));De();const qe=new ResizeObserver(De);return qe.observe(Ce),()=>qe.disconnect()},[]);const ve=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),we=s.useCallback(()=>{const Ce=B.current;B.current=null,ve(),U.current=null,O.current=!1,se(null),ae(!1),K(0),N.current=0,le(!1),v.current=!1,b.current=0,C.current="none",Ce===1?d():Ce===-1&&l()},[ve,d,l]),$e=s.useCallback(()=>{ve(),B.current=null,U.current=null,O.current=!1,se(null),ae(!1),K(0),N.current=0},[ve]),g=s.useCallback(()=>{ve(),R.current=window.setTimeout(()=>{B.current!==null&&we()},wn+32)},[ve,we]),G=s.useCallback((Ce,De)=>{var ge;const qe=((ge=H.current)==null?void 0:ge.width)??0;if(ve(),U.current=Ce,se(Ce),O.current=!0,ae(!0),De){B.current=Ce;const Pe=-Ce*qe;N.current=Pe,K(Pe),g();return}N.current=0,K(0),R.current=window.setTimeout(()=>{R.current=null,$e()},wn+32)},[ve,$e,g]),F=s.useCallback(Ce=>{if(!(t.length<=1)){if(O.current){if(B.current===Ce){$.current=Ce,we();return}$e()}ve(),U.current=Ce,se(Ce),O.current=!1,ae(!1),N.current=0,K(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(Ce,!0)})})}},[t.length,G,we,$e,ve]);M.current=F;const X=s.useCallback(Ce=>{Ce.propertyName!=="transform"||!O.current||B.current!==null&&we()},[we]),me=s.useCallback(()=>{const Ce=x.current;if(!Ce)return;const De=Wl(Ce);!De.width||!De.height||A(De)},[]);s.useEffect(()=>{me();const Ce=x.current;if(!Ce)return;const De=new ResizeObserver(()=>me());return De.observe(Ce),()=>De.disconnect()},[me]),s.useEffect(()=>{I==="opening"&&_&&V("open")},[I,_]),s.useEffect(()=>{if(I!=="closing")return;const Ce=setTimeout(()=>r(),wn);return()=>clearTimeout(Ce)},[I,r]),s.useEffect(()=>()=>{ve()},[ve]),s.useLayoutEffect(()=>{ue.current===n&&Q.current===(de==null?void 0:de.url)||(ve(),B.current=null,se(null),T(0),K(0),ae(!1),xe(!1),le(!1),ye(null),y.current=0,b.current=0,C.current="none",v.current=!1,O.current=!1,N.current=0,U.current=null,h.current=null,S.current=!1,ue.current=n,Q.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(()=>{M.current(Ce)}))},[n,de==null?void 0:de.url]),s.useEffect(()=>{if(I!=="open")return;let Ce=null;const De=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},qe=()=>{De(),Ce=be=>{be.stopPropagation(),be.preventDefault(),De()},document.addEventListener("click",Ce,!0)},ge=be=>{const Le=be<0?1:-1;if(Math.abs(be)>Cf&&t.length>1){G(Le,!0);return}G(Le,!1)},Pe=be=>{if(be.touches.length!==1||O.current)return;const Le=be.touches[0];S.current=!0,h.current={x:Le.clientX,y:Le.clientY},C.current="none",b.current=0,v.current=!1},je=be=>{if(!h.current||be.touches.length!==1||O.current)return;const Le=be.touches[0],Ye=Le.clientX-h.current.x,_e=Le.clientY-h.current.y;if(C.current==="none"){if(Math.abs(Ye)<10&&Math.abs(_e)<10)return;if(Math.abs(Ye)>Math.abs(_e)){if(t.length<=1)return;C.current="horizontal"}else if(_e>0)C.current="vertical";else return}if(C.current==="horizontal"){v.current=!0,le(!0),b.current=Ye;const it=Ye<0?1:-1;U.current!==it&&(U.current=it,se(it)),N.current=Ye,K(Ye),be.preventDefault();return}C.current==="vertical"&&(v.current=!0,le(!0),y.current=_e,T(_e),be.preventDefault())},Ie=()=>{if(!h.current)return;const be=C.current,Le=v.current;if(Le&&be==="horizontal")ge(b.current),qe();else if(Le&&be==="vertical")if(y.current>$f){const _e=window.innerHeight;y.current=_e,xe(!0),T(_e),V("closing")}else y.current=0,T(0),qe();else be==="horizontal"&&Math.abs(b.current)>0&&(ge(b.current),qe());h.current=null,C.current="none",b.current=0,v.current=!1,le(!1)};return document.addEventListener("touchstart",Pe,{passive:!0}),document.addEventListener("touchmove",je,{passive:!1}),document.addEventListener("touchend",Ie),document.addEventListener("touchcancel",Ie),()=>{document.removeEventListener("touchstart",Pe),document.removeEventListener("touchmove",je),document.removeEventListener("touchend",Ie),document.removeEventListener("touchcancel",Ie),De()}},[I,t.length,G]),s.useEffect(()=>{const Ce=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),I!=="closing"&&V("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[I]);const Y=()=>{I!=="closing"&&V("closing")},L=I==="open",ie=I==="closing",oe=ee>0?Math.max(0,1-ee/500):1,D=ee>0?Math.max(.35,1-ee/500):1,te=_?p?_:Pf(_,Ne):null,Ae=Ce=>{if(Ce.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),qe=Ce.clientY-De.top,ge=Math.min(52,De.height*.2);if(!(qe>De.height-ge)){if(Ce.clientX-De.left<De.width/2){F(-1);return}F(1)}},he=Ce=>{if(t.length<=1)return;const De=te??Ce.currentTarget.getBoundingClientRect(),qe=Ce.clientX-De.left,ge=Ce.clientY-De.top,Pe=Math.min(52,De.height*.2);if(ge>De.height-Pe){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=qe<De.width/2?"w-resize":"e-resize"},J={position:"fixed",top:m==null?void 0:m.top,left:m==null?void 0:m.left,width:m==null?void 0:m.width,height:m==null?void 0:m.height,zIndex:9998},Ze=p?"cover":"contain",Fe=j!==0||ee>0?`translate(${j}px, ${ee}px)`:void 0,Qe=q&&!k?"none":k?`transform ${wn}ms ${qn}`:Z?`transform ${wn}ms ${qn}, opacity ${wn}ms ${qn}`:I==="opening"||ie?`opacity ${wn}ms ${qn}`:"none",Xe={...J,transform:Fe,opacity:ee>0?D:I==="opening"||ie?0:1,transition:Qe,pointerEvents:"none"},nt={position:"absolute",top:((te==null?void 0:te.top)??0)-((m==null?void 0:m.top)??0),left:((te==null?void 0:te.left)??0)-((m==null?void 0:m.left)??0),width:te==null?void 0:te.width,height:te==null?void 0:te.height,objectFit:Ze,pointerEvents:ne&&L&&!Ee?"auto":"none",touchAction:ne&&L?"none":void 0},et=(m==null?void 0:m.width)??0,Be=Te?(n+ce+t.length)%t.length:null,fe=Be!==null?t[Be]:null,He={...J,transform:Te?`translateX(${ce*et+j}px)`:void 0,opacity:1,transition:k?`transform ${wn}ms ${qn}`:"none",pointerEvents:"none"},ze={position:"absolute",top:((_==null?void 0:_.top)??0)-((m==null?void 0:m.top)??0),left:((_==null?void 0:_.left)??0)-((m==null?void 0:m.left)??0),width:_==null?void 0:_.width,height:_==null?void 0:_.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:w,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:I==="open"?"none":void 0},onClick:Y,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:L?oe:0,transition:q?"none":`opacity ${wn}ms ${qn}`,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:x,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:L?1:0,transition:`opacity ${wn}ms ${qn}`,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:L?1:0,transition:`opacity ${wn}ms ${qn}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),_&&m&&fe&&a.jsx("div",{style:He,onTransitionEnd:X,children:Ti(fe)?a.jsx("video",{src:fe.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Be}-${fe.url}`):a.jsx("img",{src:fe.url,alt:fe.name,style:ze},`neighbor-${Be}-${fe.url}`)}),_&&m&&de&&a.jsx("div",{style:Xe,onTransitionEnd:X,children:ne?a.jsx(kf,{src:de.url,phase:I,mediaRef:f,mediaStyle:nt,onLoadedMetadata:Oe,onClick:Ae,onMouseMove:he},`${n}-${de.url}`):a.jsx("img",{ref:f,src:de.url,alt:de.name,onLoad:Oe,style:nt},`${n}-${de.url}`)}),L&&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(S.current){S.current=!1;return}Ce.stopPropagation(),F(-1)}}),a.jsx("div",{style:{...Je,left:te.left+te.width/2,cursor:"e-resize",pointerEvents:q?"none":"auto"},onClick:Ce=>{if(S.current){S.current=!1;return}Ce.stopPropagation(),F(1)}})]})]})}function Ff(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _f({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=z.useScopedStyles(),{type:p="a",gridLayout:w,textBoxWidth:x=100,verticalGap:f,entriesCount:h,lightbox:y,imageDisplay:b,imageCorners:C,lightboxImageDisplay:v,slider:S,sliderTiming:H,direction:N,transition:U,titleMarginTop:O,subtitleMarginTop:R,titleColor:B,subtitleColor:$,lightboxCounterColor:M,titleFontFamily:_,titleFontSettings:A,titleFontSize:m,titleLineHeight:P,titleLetterSpacing:I,titleWordSpacing:V,titleTextAppearance:ee,subtitleFontFamily:T,subtitleFontSettings:j,subtitleFontSize:K,subtitleLineHeight:ce,subtitleLetterSpacing:se,subtitleWordSpacing:k,subtitleTextAppearance:ae,lightboxCounterFontFamily:q,lightboxCounterFontSettings:le,lightboxCounterFontSize:Z,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:Ne,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ue,showText:Q="always",alignEntries:de="off",align:ne="top"}=e,Ee={fontSettings:{fontFamily:_,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:m??.01,lineHeight:P,letterSpacing:I??0,wordSpacing:V??0,textAppearance:ee,color:B},Oe={...sn(Zt(Ee,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:ce,letterSpacing:se??0,wordSpacing:k??0,textAppearance:ae,color:$},$e={...sn(Zt(ve,n))},g={fontSettings:{fontFamily:q,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:xe,letterSpacing:Ne??0,wordSpacing:ye??0,textAppearance:ue,color:M},F={...sn(Zt(g,n)),...Ca(Z,xe,u,n)},X=$a(m,P,`${u}-item-title`,`${u}-text-tight-leading`),me=$a(K,ce,`${u}-item-subtitle`,`${u}-text-tight-leading`),Y=Ca(m,P,u,n),L=Ca(K,ce,u,n),ie=$a(Z,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),oe=z.buildColorVars(u,{titleColor:B,subtitleColor:$,lightboxCounterColor:M},Wf,Nf),Ae=`${l&&l!=="default"?`${u}-state-${l}`:""}${Q==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),he=h===0?1/0:h,J=(t??[]).slice(0,he),Ze=s.useMemo(()=>y==="on"?If(J):[],[J,y]),Fe=w.entryWidth??.2,Qe=(b==null?void 0:b.display)==="cover",Xe=(b==null?void 0:b.ratioValue)??"1:1",nt=(b==null?void 0:b.reversed)??!1,[et,Be]=Xe.split(":").map(Number),ze=`${nt?Be:et} / ${nt?et:Be}`,Je=w.columnsCount,Ce=z.scalingValue(Fe??0,n),De=Ce,qe=!Qe&&S!=="off",ge=J.length%Je||Je,Pe=ge<Je&&J.length>0,je=J.length-ge,Ie=Pe?Math.floor((Je-ge)/2)+1:1,be=C?z.scalingValue(C,n):void 0,Le={width:De,...Qe?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...be?{borderRadius:be,overflow:"hidden"}:{}},Ye=`${u}-item-image-wrapper${qe?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),_e=p==="d"||p==="e"||p==="f",it=de==="on",ot=`calc(${z.scalingValue(Fe??0,n)} * (${x} / 100))`,rt=z.scalingValue(Fe*x/100,n),ht=Qe?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...be?{borderRadius:be}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...be?{borderRadius:be}:{}},[It,Et]=s.useState(0),dt=s.useRef(null),mt=U==="fade"||N==="horizontal"?"ltr":N==="vertical"?"ttb":"ltr";s.useEffect(()=>{const gt=dt.current;if(!gt)return;const Me=new ResizeObserver(Ve=>{Et(Math.round(Ve[0].contentRect.width))});return Me.observe(gt),()=>Me.disconnect()},[]);const $t=(()=>{const gt={...oe},Me=dt.current?getComputedStyle(dt.current).getPropertyValue("--cntrl-article-width").trim():"";return Me&&(gt["--cntrl-article-width"]=Me),gt})(),[Tt,ft]=s.useState(!1),[Ft,Ht]=s.useState([]),[Ot,Kt]=s.useState(0),Ct=y==="on"&&(!n||i),Dt=(gt,Me)=>{n&&!i||y!=="off"&&(Ht(gt),Kt(Me),ft(!0))};s.useEffect(()=>{if(!Tt||y!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[Tt,y]),s.useEffect(()=>{!n||i||ft(!1)},[n,i]);const tn=s.useMemo(()=>vf(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:tn}}),y==="on"&&a.jsx(Ef,{mediaList:Ze}),a.jsx("div",{style:oe,children:a.jsx("div",{ref:dt,className:`${u}-wrapper ${u}-type-${p}${it?` ${u}-align-entries`:""} ${u}-image-align-${ne} ${Ae}`.trim(),style:{gridTemplateColumns:`repeat(${Je}, ${Ce})`,rowGap:it?0:z.scalingValue(f??0,n),columnGap:z.scalingValue(w.horizontalGap??0,n),width:z.scalingValue(w.wrapperWidth??0,n),...it?{[`--${u}-align-entries-row-gap`]:z.scalingValue(f??0,n)}:{}},children:J.map((gt,Me)=>{var jt;const Ve=Fl(gt.title),tt=Fl(gt.subtitle),pt=(((jt=gt.link)==null?void 0:jt.length)??0)>0&&y==="off"?gt.link:void 0,bt=Math.floor(Me/Je)===Math.ceil(J.length/Je)-1,Mt=Pe&&Me>=je?`${Ie+(Me-je)}`:void 0,yt=_e?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ve&&a.jsx("p",{className:X,style:{width:ot,...Oe,...Y},children:gt.title}),Ve&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:z.scalingValue(O??0,n),width:rt}}),tt&&a.jsx("p",{className:me,style:{width:ot,...$e,...L},children:gt.subtitle}),tt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:z.scalingValue(R??0,n),width:rt}})]}):null,Gt=it?a.jsxs("div",{className:`${u}-item-title-row`,children:[!_e&&a.jsx("div",{"data-controls":o&&Ve?"titleMarginTop":void 0,className:o&&Ve?`${u}-control`:void 0,style:{height:Ve?z.scalingValue(O??0,n):0,width:rt}}),Ve&&a.jsx("p",{className:X,style:{width:ot,...Oe,...Y},children:gt.title}),_e&&Ve&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:z.scalingValue(O??0,n),width:rt}})]}):null,Nt=it?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!_e&&a.jsx("div",{"data-controls":o&&tt?"subtitleMarginTop":void 0,className:o&&tt?`${u}-control`:void 0,style:{height:tt?z.scalingValue(R??0,n):0,width:rt}}),tt&&a.jsx("p",{className:me,style:{width:ot,...$e,...L},children:gt.subtitle}),_e&&tt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:z.scalingValue(R??0,n),width:rt}})]}):null,Wt=pt?a.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:[Gt,Nt]}):a.jsxs(a.Fragment,{children:[Gt,Nt]}),Xt=Bd(gt.gallery),Ut=Xt.filter(Lt=>Lt.lightboxMedia).map(Lt=>Lt.lightboxMedia),zt=a.jsx("div",{className:Ye,style:Le,children:Xt.length===0?null:S==="off"?(()=>{const{displayMedia:Lt,lightboxMedia:W}=Xt[0],Re=W?Ut.findIndex(We=>We.url===W.url):-1;return a.jsx(_l,{media:Lt,className:`${u}-item-${Ti(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&Re>=0?()=>Dt(Ut,Re):void 0})})():a.jsxs(a.Fragment,{children:[qe&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xt.map(({displayMedia:Lt})=>Ti(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(Gs,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:H*1e3,width:"100%",height:"100%",speed:Sf,type:U==="fade"?"fade":"loop",rewind:U==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:mt},onMoved:Lt=>{N!=="random"||U==="fade"||wf(Lt)},children:Xt.map(({displayMedia:Lt,lightboxMedia:W},Re)=>{const We=W?Ut.findIndex(Ge=>Ge.url===W.url):-1;return a.jsx(qs,{children:a.jsx(_l,{media:Lt,className:`${u}-item-${Ti(Lt)?"video":"image"}`.trim(),style:ht,onMediaClick:Ct&&We>=0?()=>Dt(Ut,We):void 0})},Re)})},`${U}-${Fe}-${N}-${H}-${It}-${d}`)]})}),Bt=_e?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ve?"titleMarginTop":void 0,className:o&&Ve?`${u}-control`:void 0,style:{height:Ve?z.scalingValue(O??0,n):0,width:rt}}),a.jsx("p",{className:X,style:{width:ot,...Oe,...Y},children:gt.title}),a.jsx("div",{"data-controls":o&&tt?"subtitleMarginTop":void 0,className:o&&tt?`${u}-control`:void 0,style:{height:tt?z.scalingValue(R??0,n):0,width:rt}}),a.jsx("p",{className:me,style:{width:ot,...$e,...L},children:gt.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&&bt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ce} * (${x} / 100))`:Ce,...Mt&&it?{gridColumn:Mt}:{}},children:it?a.jsx(a.Fragment,{children:_e?a.jsxs(a.Fragment,{children:[Wt,a.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:zt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:zt}),Wt]})}):pt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:[yt,zt]}),!_e&&a.jsx("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:Bt})]}):a.jsxs(a.Fragment,{children:[yt,zt,Bt]})})},Me)})})}),(!n||i)&&Tt&&typeof document<"u"&&y==="on"&&(()=>{const gt=(c?document.getElementById(c):null)??document.body;return Gn.createPortal(a.jsx("div",{style:$t,"data-selection":"none",children:a.jsx(Af,{prefix:u,items:Ft,index:Ot,imageDisplay:Ff(v),isEditor:n,onClose:()=>ft(!1),onPrev:()=>Kt(Me=>(Me-1+Ft.length)%Ft.length),onNext:()=>Kt(Me=>(Me+1)%Ft.length),counterClassName:ie,counterStyle:F})}),gt)})()]})}const Wf={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Nf=["hover","focus","filled","success","error"],Hf=`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
- `,Ta={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hf=["titleColor","subtitleColor","lightboxCounterColor"],Of={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Hf],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Df={element:Ff,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:Of,sourceCode:Nf},jf=50,Wl=10,qs="cntrl-lightbox-journal",aa=qs,ss=`${qs}-`,sa=e=>`${qs}-${e}`,Xs=e=>e===aa||e.startsWith(ss),Nl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Hl=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Nl(t.get(sa(e)));if(i)return i}const n=Nl(t.get(aa));if(n)return n;for(const[i]of t){if(!i.startsWith(ss))continue;const o=i.slice(ss.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ol=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},zd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Xs(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(sa(t),String(e)):i.searchParams.set(aa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},zf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===sa(e)||i===aa:Xs(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)}},Bd=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(sa(e)):[...t.keys()].some(n=>Xs(n))},Bf=(e,t)=>{if(Bd(t)){if(e){window.history.back();return}zf(t)}},Vf=20,Gf=2,La=e=>`max(${e}, ${Vf}px)`,Qi=e=>((e==null?void 0:e.image)??[]).slice(0,Gf),Vd=e=>e.reduce((t,n)=>t+Qi(n).length,0),qf=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Qi(r).length,1),i=Qi(e[t]).length;return{start:n,end:n+i-1}},Xf=(e,t)=>{const n=Vd(e),{start:i,end:o}=qf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ar=(e,t)=>t==="B"?e.flatMap((n,i)=>Qi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Qi(n)})),Uf=(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 Xf(i,o)},Dl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Yf=(e,t,n)=>e==="B"?t.length>1:Vd(n)>1,yn=.004,Zn=.004,Xi={title1Width:.13,title2Width:.13,title3Width:.14},Jn=(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},eo=(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},Oo=(e,t)=>eo(e,t),dn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:eo(e.length,n),effective:Oo(e.length,n)}},Gd=(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),qd=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ii=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Us={title1:"1",title2:"2",title3:"3",count:"Count"},Ys=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],Kf=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(ii.map(e=>[Us[e],Ys(e)]))}),Zf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Jf={title1:.02,title2:.02,title3:.02,count:.017},bi=(e,t)=>{const n=i=>{const o=ct(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[Zf[t]]}},wi=(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??Jf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Yt(i,n)};function Xd({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:b=0,title3MarginLeft:v=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:f=0,iconMarginRight:x=0,closeIcon:S=null,closeIconMaxWidth:y=0,closeIconColor:w="#000000",closeIconHoverColor:H="#cccccc"}=n,N=D.scalingValue(f,i),U=D.scalingValue(x,i),O=D.scalingValue(g,i),C=h==="mobile",V=wi("title1",bi(n,"title1"),i),$=wi("title2",bi(n,"title2"),i),R=wi("title3",bi(n,"title3"),i),k=s.useMemo(()=>({title1Width:d??Xi.title1Width,title2Width:c??Xi.title2Width,title3Width:u??Xi.title3Width}),[d,c,u]),T=s.useMemo(()=>({title2MarginLeft:b,title3MarginLeft:v}),[b,v]),m=s.useMemo(()=>Jn(e,t,V,$,R),[e,t,V,$,R]),M=s.useMemo(()=>m.map(Z=>k[Z.widthKey]),[m,k]),E=s.useMemo(()=>eo(m.length,M),[m.length,M]),z=s.useMemo(()=>Oo(m.length,M),[m.length,M]),ne=s.useMemo(()=>m.filter(Z=>Z.prefix==="title1"),[m]),I=s.useMemo(()=>m.filter(Z=>Z.prefix==="title2"||Z.prefix==="title3"),[m]),W=s.useMemo(()=>Qn(ne,k),[ne,k]),K=s.useMemo(()=>Qn(I,k),[I,k]),ae=!!(t.title1||t.title2||t.title3),de=S!==null;if(!(ae||de))return null;const he=(p??0)>0||o,q=(Z,me)=>{const De=m.findIndex(G=>G.prefix===Z.prefix);if(!C||me==="single-row")return{effectiveWidth:z[De]??0,resolvedWidth:E[De]??0,maxWidth:dn(De,E)};if(me==="two-row-top"){const G=ne.findIndex(Me=>Me.prefix===Z.prefix);return{effectiveWidth:W.effective[G]??0,resolvedWidth:W.resolved[G]??0,maxWidth:dn(G,W.resolved)}}const ge=I.findIndex(G=>G.prefix===Z.prefix);return{effectiveWidth:K.effective[ge]??0,resolvedWidth:K.resolved[ge]??0,maxWidth:dn(ge,K.resolved)}},ce=(Z,me,De)=>{if(!C||De==="single-row"){const rt=Z.findIndex(je=>je.prefix===me.prefix),Je=Z.map(je=>k[je.widthKey]),at=eo(Z.length,Je);return{effectiveWidth:Oo(Z.length,Je)[rt]??0,resolvedWidth:at[rt]??0,maxWidth:dn(rt,at)}}if(De==="two-row-top"){const rt=Z.filter(je=>je.prefix==="title1"),Je=rt.findIndex(je=>je.prefix===me.prefix),{resolved:at,effective:it}=Qn(rt,k);return{effectiveWidth:it[Je]??0,resolvedWidth:at[Je]??0,maxWidth:dn(Je,at)}}const ge=Z.filter(rt=>rt.prefix==="title2"||rt.prefix==="title3"),G=ge.findIndex(rt=>rt.prefix===me.prefix),{resolved:Me,effective:_e}=Qn(ge,k);return{effectiveWidth:_e[G]??0,resolvedWidth:Me[G]??0,maxWidth:dn(G,Me)}},Q=Z=>qd(m,E,T,Z)+(C?0:p??0),be=()=>C?0:p??0,He=Z=>I.slice(0,Z).reduce((me,De,ge)=>me+(De.marginLeftKey?T[De.marginLeftKey]??0:0)+(K.resolved[ge]??0),0),xe=Z=>{const me=I[Z];return He(Z)+(me.marginLeftKey?T[me.marginLeftKey]??0:0)+(K.resolved[Z]??0)},le=(Z,me,De)=>{const ge=Z.marginLeftKey?T[Z.marginLeftKey]??0:0,{effectiveWidth:G,resolvedWidth:Me,maxWidth:_e}=De??q(Z,me),rt=Math.max(ge,Zn),Je=o&&me==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Z.prefix,style:{width:D.scalingValue(G,i),...ge>0?{marginLeft:D.scalingValue(ge,i)}:{}},children:[a.jsx("p",{className:Z.className,style:Z.style,children:Z.text}),Je&&Z.marginLeftKey?a.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:D.scalingValue(-ge,i),width:D.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}}):null,Je?a.jsx("div",{"data-controls":Z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(_e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:D.scalingValue(-yn/2,i),width:D.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}}):null]},Z.className)},ee=(Z="two-row")=>{const me=m.findIndex(G=>G.prefix==="title1"),De=me>=0?E[me]:k.title1Width,ge=Z==="two-row"&&o;return a.jsx("div",{...ge?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(De)}:{},style:{width:D.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...ge?{pointerEvents:"auto"}:{}}})},ue=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:V,"aria-hidden":"true",children:" "}),oe=Z=>{const me=Jn(e,Z,V,$,R);return a.jsx(a.Fragment,{children:me.map(De=>le(De,"single-row",ce(me,De,"single-row")))})},Fe=Z=>{const me=Jn(e,Z,V,$,R),De=me.find(ge=>ge.prefix==="title1");return De?le(De,"two-row-top",ce(me,De,"two-row-top")):null},Ce=(Z,me=!1)=>{const De=Jn(e,Z,V,$,R),ge=De.filter(_e=>_e.prefix==="title2"||_e.prefix==="title3"),G=o&&me;return ge.length>0||G||(g??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ge.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:ge.map(_e=>le(_e,"two-row-bottom",ce(De,_e,"two-row-bottom")))}),me&&o?a.jsxs(a.Fragment,{children:[te(),$e()]}):null]}):null,(g??0)>0||G?a.jsx("div",{"data-controls":G?"titleRowMarginBottom":void 0,"data-controls-axis":G?"y":void 0,"data-controls-reverse":G?"":void 0,className:G?`${e}-control`:void 0,style:{height:O,width:"100%",flexShrink:0,pointerEvents:G?"auto":"none"}}):null]}):null},P=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:D.scalingValue(y??0,i),height:D.scalingValue(y??0,i),marginRight:U,"--close-icon-hover-color":H},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Z=>{Z.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(ln,{url:S??"",fill:w,hoverFill:i&&!r?w:H,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:U,height:"100%",pointerEvents:"auto"}})]}),Y=()=>de?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:P()}):null,X=Z=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:Z})}),ie=Z=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[de||ae?ue():null,he?ee("two-row"):null,X(Z),Y()]}),j=(Z,me=!1)=>a.jsxs(a.Fragment,{children:[ie(Fe(Z)),Ce(Z,me)]}),B=()=>{const Z=C?-1:m.findIndex(ge=>ge.prefix==="title1"),me=!C&&(o||(p??0)>0)?(()=>{const ge=p??0,G=Z>=0?E[Z]:k.title1Width,Me=Math.max(ge,Zn);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(G),style:{position:"absolute",top:0,left:0,width:D.scalingValue(Me,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,De=m.flatMap((ge,G)=>{if(!ge.marginLeftKey)return[];const Me=T[ge.marginLeftKey]??0,_e=Gd(m,E,T,G)+be(),rt=Math.max(Me,Zn);return a.jsx("div",{"data-controls":ge.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(E[G]),style:{position:"absolute",top:0,left:D.scalingValue(_e,i),width:D.scalingValue(rt,i),height:"100%",pointerEvents:"auto"}},ge.marginLeftKey)});return me?[me,...De]:De},J=()=>m.map((Z,me)=>{const De=dn(me,E),G=Q(me)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D.scalingValue(G,i),width:D.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}})},`${Z.widthKey}-junction`)}),te=()=>I.flatMap((Z,me)=>{if(!Z.marginLeftKey)return[];const De=T[Z.marginLeftKey]??0,ge=He(me),G=Math.max(De,Zn),{resolvedWidth:Me}=q(Z,"two-row-bottom");return a.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:D.scalingValue(ge,i),width:D.scalingValue(G,i),height:"100%",pointerEvents:"auto"}},Z.marginLeftKey)}),$e=()=>I.map((Z,me)=>{const{maxWidth:De}=q(Z,"two-row-bottom"),G=xe(me)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Z.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(De),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:D.scalingValue(G,i),width:D.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}})},`${Z.widthKey}-junction`)}),ye=()=>!o||C?null:a.jsxs(a.Fragment,{children:[B(),J()]}),F=!!(t.title2||t.title3||(g??0)>0||o),ve=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[de||ae?ue():null,he?ee("single-row"):null,ae?X(oe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Y(),ye()]}),pe=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...F?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:F?void 0:{flex:"0 0 auto",height:"auto"},children:j(t,!0)}),ye()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:N,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...C?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${C?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${C?` ${e}-text-bar-cell-stacked`:""}`,style:C?void 0:{flex:1,minWidth:0,width:"100%"},children:C?pe():ve()})})})]})}function Qf(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ey(e){return`
7278
+ `,Ta={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Of=["titleColor","subtitleColor","lightboxCounterColor"],Df={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Ta.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Of],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},jf={element:_f,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:Df,sourceCode:Hf},zf=50,Nl=10,Xs="cntrl-lightbox-journal",aa=Xs,ss=`${Xs}-`,sa=e=>`${Xs}-${e}`,Us=e=>e===aa||e.startsWith(ss),Hl=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ol=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Hl(t.get(sa(e)));if(i)return i}const n=Hl(t.get(aa));if(n)return n;for(const[i]of t){if(!i.startsWith(ss))continue;const o=i.slice(ss.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Dl=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Vd=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Us(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(sa(t),String(e)):i.searchParams.set(aa,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Bf=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===sa(e)||i===aa:Us(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)}},Gd=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(sa(e)):[...t.keys()].some(n=>Us(n))},Vf=(e,t)=>{if(Gd(t)){if(e){window.history.back();return}Bf(t)}},Gf=20,qf=2,La=e=>`max(${e}, ${Gf}px)`,to=e=>((e==null?void 0:e.image)??[]).slice(0,qf),qd=e=>e.reduce((t,n)=>t+to(n).length,0),Xf=(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}},Uf=(e,t)=>{const n=qd(e),{start:i,end:o}=Xf(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},Ar=(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)})),Yf=(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 Uf(i,o)},jl=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Kf=(e,t,n)=>e==="B"?t.length>1:qd(n)>1,yn=.004,Jn=.004,Yi={title1Width:.13,title2Width:.13,title3Width:.14},Qn=(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},no=(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},Do=(e,t)=>no(e,t),dn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ei=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:no(e.length,n),effective:Do(e.length,n)}},Xd=(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),Ud=(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),oi=["title1","title2","title3","count"],ct=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ys={title1:"1",title2:"2",title3:"3",count:"Count"},Ks=e=>[ct(e,"fontFamily"),ct(e,"fontSettings"),{type:"row",items:[ct(e,"fontSize"),ct(e,"lineHeight"),ct(e,"letterSpacing"),ct(e,"wordSpacing")]},ct(e,"textAlign"),ct(e,"textAppearance")],Zf=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(oi.map(e=>[Ys[e],Ks(e)]))}),Jf={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Qf={title1:.02,title2:.02,title3:.02,count:.017},wi=(e,t)=>{const n=i=>{const o=ct(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[Jf[t]]}},Si=(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??Qf[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Zt(i,n)};function Yd({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:w=0,title3MarginLeft:x=0,titleRowMarginBottom:f=0,titleHeaderLayout:h="desktop",contentMarginTop:y=0,iconMarginRight:b=0,closeIcon:C=null,closeIconMaxWidth:v=0,closeIconColor:S="#000000",closeIconHoverColor:H="#cccccc"}=n,N=z.scalingValue(y,i),U=z.scalingValue(b,i),O=z.scalingValue(f,i),R=h==="mobile",B=Si("title1",wi(n,"title1"),i),$=Si("title2",wi(n,"title2"),i),M=Si("title3",wi(n,"title3"),i),_=s.useMemo(()=>({title1Width:d??Yi.title1Width,title2Width:c??Yi.title2Width,title3Width:u??Yi.title3Width}),[d,c,u]),A=s.useMemo(()=>({title2MarginLeft:w,title3MarginLeft:x}),[w,x]),m=s.useMemo(()=>Qn(e,t,B,$,M),[e,t,B,$,M]),P=s.useMemo(()=>m.map(D=>_[D.widthKey]),[m,_]),I=s.useMemo(()=>no(m.length,P),[m.length,P]),V=s.useMemo(()=>Do(m.length,P),[m.length,P]),ee=s.useMemo(()=>m.filter(D=>D.prefix==="title1"),[m]),T=s.useMemo(()=>m.filter(D=>D.prefix==="title2"||D.prefix==="title3"),[m]),j=s.useMemo(()=>ei(ee,_),[ee,_]),K=s.useMemo(()=>ei(T,_),[T,_]),ce=!!(t.title1||t.title2||t.title3),se=C!==null;if(!(ce||se))return null;const ae=(p??0)>0||o,q=(D,te)=>{const Ae=m.findIndex(J=>J.prefix===D.prefix);if(!R||te==="single-row")return{effectiveWidth:V[Ae]??0,resolvedWidth:I[Ae]??0,maxWidth:dn(Ae,I)};if(te==="two-row-top"){const J=ee.findIndex(Ze=>Ze.prefix===D.prefix);return{effectiveWidth:j.effective[J]??0,resolvedWidth:j.resolved[J]??0,maxWidth:dn(J,j.resolved)}}const he=T.findIndex(J=>J.prefix===D.prefix);return{effectiveWidth:K.effective[he]??0,resolvedWidth:K.resolved[he]??0,maxWidth:dn(he,K.resolved)}},le=(D,te,Ae)=>{if(!R||Ae==="single-row"){const Qe=D.findIndex(Be=>Be.prefix===te.prefix),Xe=D.map(Be=>_[Be.widthKey]),nt=no(D.length,Xe);return{effectiveWidth:Do(D.length,Xe)[Qe]??0,resolvedWidth:nt[Qe]??0,maxWidth:dn(Qe,nt)}}if(Ae==="two-row-top"){const Qe=D.filter(Be=>Be.prefix==="title1"),Xe=Qe.findIndex(Be=>Be.prefix===te.prefix),{resolved:nt,effective:et}=ei(Qe,_);return{effectiveWidth:et[Xe]??0,resolvedWidth:nt[Xe]??0,maxWidth:dn(Xe,nt)}}const he=D.filter(Qe=>Qe.prefix==="title2"||Qe.prefix==="title3"),J=he.findIndex(Qe=>Qe.prefix===te.prefix),{resolved:Ze,effective:Fe}=ei(he,_);return{effectiveWidth:Fe[J]??0,resolvedWidth:Ze[J]??0,maxWidth:dn(J,Ze)}},Z=D=>Ud(m,I,A,D)+(R?0:p??0),xe=()=>R?0:p??0,Ne=D=>T.slice(0,D).reduce((te,Ae,he)=>te+(Ae.marginLeftKey?A[Ae.marginLeftKey]??0:0)+(K.resolved[he]??0),0),ye=D=>{const te=T[D];return Ne(D)+(te.marginLeftKey?A[te.marginLeftKey]??0:0)+(K.resolved[D]??0)},ue=(D,te,Ae)=>{const he=D.marginLeftKey?A[D.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ze,maxWidth:Fe}=Ae??q(D,te),Qe=Math.max(he,Jn),Xe=o&&te==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":D.prefix,style:{width:z.scalingValue(J,i),...he>0?{marginLeft:z.scalingValue(he,i)}:{}},children:[a.jsx("p",{className:D.className,style:D.style,children:D.text}),Xe&&D.marginLeftKey?a.jsx("div",{"data-controls":D.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:z.scalingValue(-he,i),width:z.scalingValue(Qe,i),height:"100%",pointerEvents:"auto"}}):null,Xe?a.jsx("div",{"data-controls":D.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:z.scalingValue(-yn/2,i),width:z.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}}):null]},D.className)},Q=(D="two-row")=>{const te=m.findIndex(J=>J.prefix==="title1"),Ae=te>=0?I[te]:_.title1Width,he=D==="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:z.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...he?{pointerEvents:"auto"}:{}}})},de=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:B,"aria-hidden":"true",children:" "}),ne=D=>{const te=Qn(e,D,B,$,M);return a.jsx(a.Fragment,{children:te.map(Ae=>ue(Ae,"single-row",le(te,Ae,"single-row")))})},Ee=D=>{const te=Qn(e,D,B,$,M),Ae=te.find(he=>he.prefix==="title1");return Ae?ue(Ae,"two-row-top",le(te,Ae,"two-row-top")):null},Te=(D,te=!1)=>{const Ae=Qn(e,D,B,$,M),he=Ae.filter(Fe=>Fe.prefix==="title2"||Fe.prefix==="title3"),J=o&&te;return he.length>0||J||(f??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",le(Ae,Fe,"two-row-bottom")))}),te&&o?a.jsxs(a.Fragment,{children:[X(),me()]}):null]}):null,(f??0)>0||J?a.jsx("div",{"data-controls":J?"titleRowMarginBottom":void 0,"data-controls-axis":J?"y":void 0,"data-controls-reverse":J?"":void 0,className:J?`${e}-control`:void 0,style:{height:O,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},Oe=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:z.scalingValue(v??0,i),height:z.scalingValue(v??0,i),marginRight:U,"--close-icon-hover-color":H},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:D=>{D.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(ln,{url:C??"",fill:S,hoverFill:i&&!r?S:H,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:U,height:"100%",pointerEvents:"auto"}})]}),ve=()=>se?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Oe()}):null,we=D=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:D})}),$e=D=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[se||ce?de():null,ae?Q("two-row"):null,we(D),ve()]}),g=(D,te=!1)=>a.jsxs(a.Fragment,{children:[$e(Ee(D)),Te(D,te)]}),G=()=>{const D=R?-1:m.findIndex(he=>he.prefix==="title1"),te=!R&&(o||(p??0)>0)?(()=>{const he=p??0,J=D>=0?I[D]:_.title1Width,Ze=Math.max(he,Jn);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J),style:{position:"absolute",top:0,left:0,width:z.scalingValue(Ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=m.flatMap((he,J)=>{if(!he.marginLeftKey)return[];const Ze=A[he.marginLeftKey]??0,Fe=Xd(m,I,A,J)+xe(),Qe=Math.max(Ze,Jn);return a.jsx("div",{"data-controls":he.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(I[J]),style:{position:"absolute",top:0,left:z.scalingValue(Fe,i),width:z.scalingValue(Qe,i),height:"100%",pointerEvents:"auto"}},he.marginLeftKey)});return te?[te,...Ae]:Ae},F=()=>m.map((D,te)=>{const Ae=dn(te,I),J=Z(te)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":D.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:z.scalingValue(J,i),width:z.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}})},`${D.widthKey}-junction`)}),X=()=>T.flatMap((D,te)=>{if(!D.marginLeftKey)return[];const Ae=A[D.marginLeftKey]??0,he=Ne(te),J=Math.max(Ae,Jn),{resolvedWidth:Ze}=q(D,"two-row-bottom");return a.jsx("div",{"data-controls":D.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ze),style:{position:"absolute",top:0,left:z.scalingValue(he,i),width:z.scalingValue(J,i),height:"100%",pointerEvents:"auto"}},D.marginLeftKey)}),me=()=>T.map((D,te)=>{const{maxWidth:Ae}=q(D,"two-row-bottom"),J=ye(te)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":D.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:z.scalingValue(J,i),width:z.scalingValue(yn,i),height:"100%",pointerEvents:"auto"}})},`${D.widthKey}-junction`)}),Y=()=>!o||R?null:a.jsxs(a.Fragment,{children:[G(),F()]}),L=!!(t.title2||t.title3||(f??0)>0||o),ie=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[se||ce?de():null,ae?Q("single-row"):null,ce?we(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,...L?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:L?void 0:{flex:"0 0 auto",height:"auto"},children:g(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:N,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...R?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${R?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${R?` ${e}-text-bar-cell-stacked`:""}`,style:R?void 0:{flex:1,minWidth:0,width:"100%"},children:R?oe():ie()})})})]})}function ey(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ty(e){return`
7279
7279
  .${e}-wrapper {
7280
7280
  display: grid;
7281
7281
  align-items: start;
7282
7282
  justify-content: center;
7283
- min-height: ${Qf(48)};
7283
+ min-height: ${ey(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 jl={url:"",name:"",objectFit:"cover"},Ln=500,vo=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",ty=72,ny=50,iy=1e4,oy=650,ry=500;function ay(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 Ud(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=jr(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 sy(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Ud(i,n):null}function ly(e){return e.reduce((t,n,i)=>{const o=Ks(n.gallery),l=Zs(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 To(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 zl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return To(e,i,n)}const cy=.03;function Yd(e){return e.width*cy}const Ra={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function ur(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Bl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dy(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function ls(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 uy(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ls(e,t.width,t.height)}function py(e,t){if(ho(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 my(e){const t=new Set,n=[];for(const i of e){const o=Ks(i.gallery),r=Zs(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 gy({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=>ho(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 to(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=Yd(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 zr(e,t,n){const i=to(e,t,n);return{...i,left:2*i.left-e.left}}function hy(e,t,n){const{left:i,width:o}=n,r=Yd(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 Kd(e,t,n,i){const o=to(e,"left",i),r=to(e,"right",i),l=zr(e,"left",i),d=zr(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 fy(e,t,n,i){const{start:o,end:r}=Kd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function yy(e,t,n){const i=to(e,t,n),o=zr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Zd(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 Ks(e){if(!e)return;if(Zd(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??jl,i??o??jl]}]}function vy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function xy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Zs(e){if(!Array.isArray(e)||e.length===0)return[];if(Zd(e)){const t=[];for(const n of e){const i=vy(n);if(!i)continue;const o=xy(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 ho(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function by({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return ho(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 wy({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 pr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return ho(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Sy({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:b,sourceRect:v,resolveCloseSourceRect:g,onClose:h,onPrev:f,onNext:x}){const S=s.useRef(null),y=s.useRef(null),w=s.useRef(null),H=s.useRef(new Map),[N,U]=s.useState(0),O=s.useRef(null),C=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),R=s.useRef(!1),k=s.useRef(!1),T=s.useRef(!1),m=s.useRef(null),M=s.useRef(null),E=s.useRef(null),z=s.useRef(()=>{}),ne=s.useRef(null),I=s.useRef(null),W=s.useRef(null),K=s.useRef(!1),[ae,de]=s.useState(null),[A,he]=s.useState(Ra),[q,ce]=s.useState(0),[Q,be]=s.useState("opening"),[He,xe]=s.useState(0),[le,ee]=s.useState(0),[ue,oe]=s.useState(!1),[Fe,Ce]=s.useState(null),[P,Y]=s.useState(null),[X,ie]=s.useState(null),[j,B]=s.useState(!1),[J,te]=s.useState(null),[$e,ye]=s.useState(!1),F=s.useRef(!1),[ve,pe]=s.useState(!1),[Z,me]=s.useState(!1),De=s.useRef(n),ge=s.useRef(void 0),G=t[n],Me=G?ho(G):!1,_e=le!==0||ue,rt=!l&&(!r||!!d),Je=c&&!l,at=u.length>1,it=s.useCallback((_,Ie)=>t.length<=1?null:t[(_+Ie+t.length)%t.length]??null,[t]),je=at?To(u,p,-1):it(n,-1),Se=at?To(u,p,1):it(n,1),We=Fe===-1&&_e?at&&P!==null?To(u,P,-1):X!==null?it(X,-1):null:null,Be=Fe===1&&_e?at&&P!==null?To(u,P,1):X!==null?it(X,1):null:null,Ze=We&&We.url!==(je==null?void 0:je.url)?We:null,Le=Be&&Be.url!==(Se==null?void 0:Se.url)?Be:null,Ve=je&&Je?(()=>{const _=at?zl(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return _&&_.url!==je.url?_:null})():null,se=Se&&Je?(()=>{const _=at?zl(u,p,1):t.length>2?it((n+1)%t.length,1):null;return _&&_.url!==Se.url?_:null})():null,Te=Ze??Ve,Xe=Le??se,ze=s.useCallback((_,Ie,Ne)=>{if(!_||!Ie||!Ne)return;const Ge=H.current,dt=Ge.get(_);(dt==null?void 0:dt.width)===Ie&&(dt==null?void 0:dt.height)===Ne||(Ge.set(_,{width:Ie,height:Ne}),U(Ft=>Ft+1))},[]),Re=s.useCallback(_=>{if(!(_!=null&&_.url))return null;const Ie=H.current.get(_.url);return uy(y.current,Ie)},[N,q]),Pe=s.useCallback(()=>{if(!G)return;const _=Re(G);if(_){de(_);return}const Ie=y.current;Ie&&de(Bl(Ie))},[G,Re]),Ae=s.useCallback(_=>{if(at){const Ie=u.length;Y((p+_+Ie)%Ie),ie(null);return}t.length>1&&(ie((n+_+t.length)%t.length),Y(null))},[at,u.length,p,t.length,n]),Ke=s.useCallback(_=>{T.current=_,oe(_)},[]),Oe=s.useCallback(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),Qe=s.useCallback(()=>{Oe(),m.current=window.setTimeout(()=>{Oe(),Ke(!1)},vo+32)},[Oe,Ke]),tt=s.useCallback(()=>{const _=S.current;if(!_){he({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ra.width,height:typeof window<"u"?window.innerHeight:Ra.height});return}const Ie=_.getBoundingClientRect();he({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),nt=s.useCallback((_,Ie)=>{if(_e){if(ve&&!ue)return`translate(${le}px, 0px)`;if(ue&&Fe!==null){const Ne=Re(_);if(!Ne)return;const{x:Ge,y:dt}=fy(Ne,Ie,Fe,A);return`translate(${Ge}px, ${dt}px)`}if(ue)return"translate(0px, 0px)"}},[_e,ve,ue,le,Fe,A,Re]),xt=s.useCallback(()=>{const _=M.current;M.current=null,Oe(),Ke(!1),Ce(null),Y(null),ie(null),ee(0),pe(!1),R.current=!1,V.current=0,$.current="none",_===-1?f():_===1&&x()},[Oe,Ke,f,x]),It=s.useCallback(()=>{Oe(),m.current=window.setTimeout(()=>{M.current!==null&&xt()},vo+32)},[Oe,xt]),Tt=s.useCallback(()=>{Oe(),M.current=null,Ke(!1),Ce(null),Y(null),ie(null),ee(0),pe(!1),R.current=!1,V.current=0,$.current="none"},[Oe,Ke]),ut=s.useCallback(_=>{if(!(!Je||!ae)){if(T.current){if(M.current===_){E.current=_,xt();return}Tt()}Oe(),Ae(_),M.current=_,Ce(_),Ke(!0),It()}},[Je,ae,xt,Tt,Oe,Ae,Ke,It]);z.current=ut;const ft=s.useCallback(()=>{ne.current=null,K.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),W.current!==null&&(window.clearTimeout(W.current),W.current=null)},[]),Et=s.useCallback(_=>{I.current!==null&&window.clearInterval(I.current);const Ie=K.current?ry:oy;I.current=window.setInterval(()=>{z.current(_)},Ie)},[]),Lt=s.useCallback(_=>{ne.current!==_&&(ft(),ne.current=_,K.current=!1,z.current(_),Et(_),W.current=window.setTimeout(()=>{W.current=null,ne.current===_&&(K.current=!0,Et(_))},iy))},[ft,Et]),bt=s.useCallback(()=>{const _=y.current;if(!_)return;const Ie=G==null?void 0:G.url,Ne=Ie?H.current.get(Ie):void 0;if(Ne!=null&&Ne.width&&(Ne!=null&&Ne.height)){de(ls(_,Ne.width,Ne.height));return}const Ge=w.current;if(Ge&&Ie&&(Ge.src===Ie||Ge.currentSrc===Ie)){const{width:Ft,height:lt}=dy(Ge);if(Ft&&lt){ze(Ie,Ft,lt),de(ls(_,Ft,lt));return}}const dt=Bl(_);!dt.width||!dt.height||de(dt)},[G==null?void 0:G.url,ze]),Nt=s.useCallback(_=>{if(w.current=_,!!_){if(_ instanceof HTMLVideoElement){_.readyState>=1&&_.videoWidth>0&&bt();return}_.complete&&_.naturalWidth>0&&bt()}},[bt]),Bt=s.useCallback(()=>{tt(),bt(),ce(_=>_+1)},[tt,bt]);s.useEffect(()=>{Bt();const _=y.current,Ie=S.current,Ne=new ResizeObserver(()=>Bt());return _&&Ne.observe(_),Ie&&Ne.observe(Ie),window.addEventListener("resize",Bt),()=>{Ne.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,b]),s.useLayoutEffect(()=>{if(!G)return;const _=w.current;if(_){if(_ instanceof HTMLImageElement&&_.complete&&_.naturalWidth>0){bt();return}_ instanceof HTMLVideoElement&&_.readyState>=1&&_.videoWidth>0&&bt()}},[G==null?void 0:G.url,n,bt]),s.useEffect(()=>{Pe()},[Pe,N]),s.useEffect(()=>{const _=new Set,Ie=[],Ne=Ge=>{!(Ge!=null&&Ge.url)||_.has(Ge.url)||(_.add(Ge.url),Ie.push(Ge))};t.forEach(Ne),u.forEach(Ge=>Ge.items.forEach(Ne)),Ie.forEach(Ge=>{H.current.has(Ge.url)||py(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(Q!=="opening"||!ae)return;if(!v){be("open");return}B(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),be("open")})});return()=>cancelAnimationFrame(_)},[Q,ae,v]),s.useEffect(()=>{if(Q!=="closing")return;const _=setTimeout(()=>h(),Ln);return()=>clearTimeout(_)},[Q,h]),s.useEffect(()=>()=>{Oe()},[Oe]),s.useLayoutEffect(()=>{De.current===n&&ge.current===(G==null?void 0:G.url)||(Oe(),M.current=null,Ce(null),Y(null),ie(null),xe(0),ee(0),Ke(!1),me(!1),pe(!1),C.current=0,V.current=0,$.current="none",R.current=!1,O.current=null,k.current=!1,w.current=null,Pe(),De.current=n,ge.current=G==null?void 0:G.url)},[n,G==null?void 0:G.url,Ke,Oe,Pe]),s.useLayoutEffect(()=>{const _=E.current;_!==null&&(E.current=null,requestAnimationFrame(()=>{z.current(_)}))},[n,p,G==null?void 0:G.url]),s.useLayoutEffect(()=>{if(Q==="opening"){F.current=!1,ye(!1);return}if(Q!=="open"||F.current)return;if(!je&&!Se){F.current=!0;return}ye(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ye(!0),F.current=!0})});return()=>cancelAnimationFrame(_)},[Q,je==null?void 0:je.url,Se==null?void 0:Se.url]),s.useEffect(()=>{if(Q!=="open")return;const _=()=>{const lt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Ie=lt=>{const wt=lt<0?1:-1;Oe(),Ae(wt),M.current=wt,Ce(wt),Ke(!0),It()},Ne=lt=>{if(Math.abs(lt)>ny&&Je){Ie(lt);return}M.current=null,Ce(null),Y(null),ie(null),Ke(!0),ee(0),Qe()},Ge=lt=>{if(lt.touches.length!==1||T.current)return;const wt=lt.touches[0];k.current=!0,O.current={x:wt.clientX,y:wt.clientY},$.current="none",V.current=0,R.current=!1},dt=lt=>{if(!O.current||lt.touches.length!==1||T.current)return;const wt=lt.touches[0],zt=wt.clientX-O.current.x,Pt=wt.clientY-O.current.y;if($.current==="none"){if(Math.abs(zt)<10&&Math.abs(Pt)<10)return;if(Math.abs(zt)>Math.abs(Pt)){if(!Je)return;$.current="horizontal"}else if(Pt>0){if(!rt)return;$.current="vertical"}else return}if($.current==="horizontal"){R.current=!0,pe(!0),V.current=zt,ee(zt),lt.preventDefault();return}$.current==="vertical"&&(R.current=!0,pe(!0),C.current=Pt,xe(Pt),lt.preventDefault())},Ft=()=>{if(!O.current)return;const lt=$.current,wt=R.current;if(wt&&lt==="horizontal")Ne(V.current),_();else if(wt&&lt==="vertical"){const zt=C.current;if(rt&&zt>ty){const Pt=window.innerHeight;C.current=Pt,me(!0),xe(Pt),be("closing")}else C.current=0,xe(0);_()}else lt==="horizontal"&&Math.abs(V.current)>0&&(Ne(V.current),_());O.current=null,$.current="none",V.current=0,R.current=!1,pe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",dt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",dt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[Q,Je,Ke,Qe,Oe,rt,It,Ae]);const Zt=s.useCallback(()=>{const _=(g==null?void 0:g())??v??null;_&&ae&&(te(_),B(!0)),be("closing")},[g,v,ae]);s.useEffect(()=>{const _=Ge=>{if(Ge.key==="Escape"){if(r&&d||Q==="closing")return;ft(),Zt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||Q!=="open"||!Je)return;Ge.preventDefault();const dt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&ne.current===dt||Lt(dt)},Ie=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const dt=Ge.key==="ArrowLeft"?-1:1;ne.current===dt&&ft()},Ne=()=>{ft()};return window.addEventListener("keydown",_),window.addEventListener("keyup",Ie),window.addEventListener("blur",Ne),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Ne),ft()}},[Q,r,d,Zt,Je,Lt,ft]),s.useEffect(()=>{Q!=="open"&&ft()},[Q,ft]);const en=()=>{Q==="closing"||l||Zt()},Rt=Q==="open",Ot=Q==="closing",nn=He>0?Math.max(0,1-He/500):1,pt=He>0?Math.max(.35,1-He/500):1,Ee=s.useCallback(_=>{if(!(_.propertyName!=="transform"||!T.current)){if(M.current!==null){xt();return}Oe(),Ke(!1)}},[Oe,Ke,xt]),qe=Q==="closing"?J??v:v,st=qe&&ae&&(Q==="opening"||Ot)?ay(qe,ae):void 0,mt=_e&&G?nt(G,"center"):He>0?`translateY(${He}px)`:st,vt=ae?ur(ae,A):null,Mt=!!(qe&&ae),gt=Mt&&(Q==="closing"||Q==="open"&&j),Vt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:mt,opacity:He>0?pt:Mt?1:Q==="opening"||Ot?0:1,transition:ve&&!ue?"none":ue?`transform ${vo}ms ${mn}`:Z?`transform ${Ln}ms ${mn}, opacity ${Ln}ms ${mn}`:gt?`transform ${Ln}ms ${mn}`:Q==="opening"||Ot?`opacity ${Ln}ms ${mn}`:"none",pointerEvents:Me&&Rt&&!_e?"auto":"none",touchAction:Me&&Rt?"none":void 0,zIndex:1,overflow:Me?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!_e?"auto":"none"},_t=(_,Ie,Ne="adjacent")=>{const Ge=Re(_);if(!Ge)return{display:"none"};const dt=Ne==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Fe!==null?Kd(Ge,dt,Fe,A):{start:Ne==="far"?zr(Ge,Ie,A):to(Ge,Ie,A)},lt=ur(Ft,A),wt=nt(_,dt),zt=!_e&&Ne==="adjacent"&&Rt&&!$e?yy(Ge,Ie,A):null,Pt=Ne==="far"&&_e&&Fe===(Ie==="left"?-1:1),on=ve&&!ue?!1:ue,pn=Ne==="adjacent"&&Rt&&$e&&!_e;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:wt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Ne==="far"?Rt&&Pt?1:0:Rt?1:0,transition:on?Ne==="far"?`transform ${vo}ms ${mn}`:`transform ${vo}ms ${mn}, opacity ${Ln}ms ${mn}`:pn?`transform ${Ln}ms ${mn}`:Q==="opening"||Ot?`opacity ${Ln}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},qt=(_,Ie)=>{const Ne=Re(_);return Ne?hy(to(Ne,Ie,A),Ie,A):null},Xt=_=>Ie=>{if(!l){if(k.current){k.current=!1;return}Ie.stopPropagation(),ut(_)}},Dt=je?qt(je,"left"):null,jt=Se?qt(Se,"right"):null,Ht=Dt?ur(Dt,A):null,$t=jt?ur(jt,A):null;return a.jsxs("div",{ref:S,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:en,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?nn:0,transition:ve?"none":`opacity ${Ln}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ve?"none":`opacity ${Ln}ms ${mn}`,pointerEvents:"none"},children:a.jsx(Xd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Rt&&Te&&a.jsx(pr,{media:Te,style:_t(Te,"left","far"),onMeasure:ze,onTransitionEnd:Ee},`far-prev-${Te.url}`),Rt&&je&&a.jsxs(a.Fragment,{children:[a.jsx(pr,{media:je,style:_t(je,"left"),onMeasure:ze,onTransitionEnd:Ee},`prev-${je.url}`),Ht&&a.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||ve?"default":"pointer",pointerEvents:l||ve?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Rt&&Se&&a.jsxs(a.Fragment,{children:[a.jsx(pr,{media:Se,style:_t(Se,"right"),onMeasure:ze,onTransitionEnd:Ee},`next-${Se.url}`),$t&&a.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||ve?"default":"pointer",pointerEvents:l||ve?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Rt&&Xe&&a.jsx(pr,{media:Xe,style:_t(Xe,"right","far"),onMeasure:ze,onTransitionEnd:Ee},`far-next-${Xe.url}`),ae&&G&&(Me?a.jsx(wy,{src:G.url,phase:Q,onMediaElement:Nt,wrapperStyle:Vt,videoStyle:Wt,onLoadedMetadata:bt,onTransitionEnd:Ee},`${n}-${G.url}`):a.jsx("img",{ref:Nt,src:G.url,alt:G.name,onLoad:bt,onTransitionEnd:Ee,style:Vt},`${n}-${G.url}`))]})}function $y({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=D.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:b}=e,v=(b==null?void 0:b.display)==="cover",g=(b==null?void 0:b.ratioValue)??"1:1",h=(b==null?void 0:b.reversed)??!1,[f,x]=g.split(":").map(Number),w=`${h?x:f} / ${h?f:x}`,H=c.entryWidth??.2,N=c.columnsCount,U=D.scalingValue(H,n),O=D.scalingValue(c.horizontalGap??0,n),C=U,V=U,$={width:C,...v?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},R=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},k=s.useRef(null),[T,m]=s.useState(!1),[M,E]=s.useState([]),[z,ne]=s.useState(0),[I,W]=s.useState(0),[K,ae]=s.useState(null),[de,A]=s.useState({title1:"",title2:"",title3:""}),he=(()=>{const X={},ie=k.current?getComputedStyle(k.current).getPropertyValue("--cntrl-article-width").trim():"";return ie&&(X["--cntrl-article-width"]=ie),X})(),q=!n||i||o,ce=s.useMemo(()=>ey(d),[d]),Q=t??[],be=Q.length%N||N,He=be<N&&Q.length>0,xe=Q.length-be,le=He?Math.floor((N-be)/2)+1:1,ee=s.useMemo(()=>ly(Q),[Q]),ue=s.useMemo(()=>my(Q),[Q]),oe=(X,ie,j)=>{if(n&&!o&&!i)return;const B=ee.findIndex(te=>te.gridIndex===X);if(B<0)return;const J=ee[B];W(B),E(J.items),ne(ie),A(J.entry),ae(j??null),m(!0)},Fe=s.useCallback(()=>{m(!1),ae(null)},[]),Ce=s.useCallback(()=>{const X=ee[I];return!X||!k.current?K:sy(k.current,X.gridIndex,v?"cover":"contain")??K},[ee,I,K,v]),P=s.useCallback(X=>{if(ee.length>1){const ie=ee.length,j=(I+X+ie)%ie,B=ee[j],J=Math.min(z,B.items.length-1);W(j),E(B.items),ne(J),A(B.entry);return}ne(ie=>(ie+X+M.length)%M.length)},[ee,I,z,M.length]),Y=ee.length>1||M.length>1;return s.useEffect(()=>{if(!T||typeof document>"u")return;const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=X}},[T]),s.useEffect(()=>{!n||o||i||m(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ce}}),a.jsx(gy,{mediaList:ue}),a.jsx("div",{ref:k,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${N}, ${U})`,rowGap:0,columnGap:O,width:D.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:D.scalingValue(u??0,n)},children:Q.map((X,ie)=>{const j=Ks(X.gallery),B=Zs(j),J=B.filter(pe=>pe.lightboxMedia).map(pe=>pe.lightboxMedia),te=Math.floor(ie/N)===Math.ceil(Q.length/N)-1,$e=He&&ie>=xe?`${le+(ie-xe)}`:void 0,ye=B[0],F=ye!=null&&ye.lightboxMedia?J.findIndex(pe=>pe.url===ye.lightboxMedia.url):-1,ve=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:B.length>0&&a.jsx(by,{media:ye.displayMedia,gridIndex:ie,className:`${d}-item-${ho(ye.displayMedia)?"video":"image"}`.trim(),style:R,onMediaClick:q&&F>=0?pe=>oe(ie,F,Ud(pe.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`,te?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:U,...$e?{gridColumn:$e}:{}},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:ve}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:V}})})]})},ie)})}),T&&typeof document<"u"&&(()=>{const X=(l?document.getElementById(l):null)??document.body;return Vn.createPortal(a.jsx("div",{style:he,"data-selection":"none",children:a.jsx(Sy,{prefix:d,items:M,index:z,entry:de,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Y,lightboxEntries:ee,entryIdx:I,layoutId:r,sourceRect:K,resolveCloseSourceRect:Ce,onClose:Fe,onPrev:()=>P(-1),onNext:()=>P(1)})}),X)})()]})}const Cy=`import { CommonComponentProps } from '../props';
7598
+ `}const zl={url:"",name:"",objectFit:"cover"},Ln=500,wo=650,mn="cubic-bezier(0.22, 1, 0.36, 1)",ny=72,iy=50,oy=1e4,ry=650,ay=500;function sy(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Kd(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=jr(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 ly(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Kd(i,n):null}function cy(e){return e.reduce((t,n,i)=>{const o=Zs(n.gallery),l=Js(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function Lo(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 Bl(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Lo(e,i,n)}const dy=.03;function Zd(e){return e.width*dy}const Ra={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function ur(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Vl(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 ls(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 py(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:ls(e,t.width,t.height)}function my(e,t){if(yo(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 gy(e){const t=new Set,n=[];for(const i of e){const o=Zs(i.gallery),r=Js(o);for(const l of r)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function hy({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=>yo(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=Zd(n);return t==="left"?{left:l+c-i,top:r,width:i,height:o}:{left:l+d-c,top:r,width:i,height:o}}function zr(e,t,n){const i=io(e,t,n);return{...i,left:2*i.left-e.left}}function fy(e,t,n){const{left:i,width:o}=n,r=Zd(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Jd(e,t,n,i){const o=io(e,"left",i),r=io(e,"right",i),l=zr(e,"left",i),d=zr(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}=Jd(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function vy(e,t,n){const i=io(e,t,n),o=zr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Qd(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Zs(e){if(!e)return;if(Qd(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??zl,i??o??zl]}]}function xy(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function by(e){const[t]=e.media;return t!=null&&t.url?t:null}function Js(e){if(!Array.isArray(e)||e.length===0)return[];if(Qd(e)){const t=[];for(const n of e){const i=xy(n);if(!i)continue;const o=by(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 yo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function wy({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return yo(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 Sy({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 pr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return yo(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 $y({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:w,sourceRect:x,resolveCloseSourceRect:f,onClose:h,onPrev:y,onNext:b}){const C=s.useRef(null),v=s.useRef(null),S=s.useRef(null),H=s.useRef(new Map),[N,U]=s.useState(0),O=s.useRef(null),R=s.useRef(0),B=s.useRef(0),$=s.useRef("none"),M=s.useRef(!1),_=s.useRef(!1),A=s.useRef(!1),m=s.useRef(null),P=s.useRef(null),I=s.useRef(null),V=s.useRef(()=>{}),ee=s.useRef(null),T=s.useRef(null),j=s.useRef(null),K=s.useRef(!1),[ce,se]=s.useState(null),[k,ae]=s.useState(Ra),[q,le]=s.useState(0),[Z,xe]=s.useState("opening"),[Ne,ye]=s.useState(0),[ue,Q]=s.useState(0),[de,ne]=s.useState(!1),[Ee,Te]=s.useState(null),[Oe,ve]=s.useState(null),[we,$e]=s.useState(null),[g,G]=s.useState(!1),[F,X]=s.useState(null),[me,Y]=s.useState(!1),L=s.useRef(!1),[ie,oe]=s.useState(!1),[D,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),J=t[n],Ze=J?yo(J):!1,Fe=ue!==0||de,Qe=!l&&(!r||!!d),Xe=c&&!l,nt=u.length>1,et=s.useCallback((W,Re)=>t.length<=1?null:t[(W+Re+t.length)%t.length]??null,[t]),Be=nt?Lo(u,p,-1):et(n,-1),fe=nt?Lo(u,p,1):et(n,1),He=Ee===-1&&Fe?nt&&Oe!==null?Lo(u,Oe,-1):we!==null?et(we,-1):null:null,ze=Ee===1&&Fe?nt&&Oe!==null?Lo(u,Oe,1):we!==null?et(we,1):null:null,Je=He&&He.url!==(Be==null?void 0:Be.url)?He:null,Ce=ze&&ze.url!==(fe==null?void 0:fe.url)?ze:null,De=Be&&Xe?(()=>{const W=nt?Bl(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return W&&W.url!==Be.url?W:null})():null,qe=fe&&Xe?(()=>{const W=nt?Bl(u,p,1):t.length>2?et((n+1)%t.length,1):null;return W&&W.url!==fe.url?W:null})():null,ge=Je??De,Pe=Ce??qe,je=s.useCallback((W,Re,We)=>{if(!W||!Re||!We)return;const Ge=H.current,ut=Ge.get(W);(ut==null?void 0:ut.width)===Re&&(ut==null?void 0:ut.height)===We||(Ge.set(W,{width:Re,height:We}),U(_t=>_t+1))},[]),Ie=s.useCallback(W=>{if(!(W!=null&&W.url))return null;const Re=H.current.get(W.url);return py(v.current,Re)},[N,q]),be=s.useCallback(()=>{if(!J)return;const W=Ie(J);if(W){se(W);return}const Re=v.current;Re&&se(Vl(Re))},[J,Ie]),Le=s.useCallback(W=>{if(nt){const Re=u.length;ve((p+W+Re)%Re),$e(null);return}t.length>1&&($e((n+W+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ye=s.useCallback(W=>{A.current=W,ne(W)},[]),_e=s.useCallback(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),it=s.useCallback(()=>{_e(),m.current=window.setTimeout(()=>{_e(),Ye(!1)},wo+32)},[_e,Ye]),ot=s.useCallback(()=>{const W=C.current;if(!W){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ra.width,height:typeof window<"u"?window.innerHeight:Ra.height});return}const Re=W.getBoundingClientRect();ae({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),rt=s.useCallback((W,Re)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Ee!==null){const We=Ie(W);if(!We)return;const{x:Ge,y:ut}=yy(We,Re,Ee,k);return`translate(${Ge}px, ${ut}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Ee,k,Ie]),ht=s.useCallback(()=>{const W=P.current;P.current=null,_e(),Ye(!1),Te(null),ve(null),$e(null),Q(0),oe(!1),M.current=!1,B.current=0,$.current="none",W===-1?y():W===1&&b()},[_e,Ye,y,b]),It=s.useCallback(()=>{_e(),m.current=window.setTimeout(()=>{P.current!==null&&ht()},wo+32)},[_e,ht]),Et=s.useCallback(()=>{_e(),P.current=null,Ye(!1),Te(null),ve(null),$e(null),Q(0),oe(!1),M.current=!1,B.current=0,$.current="none"},[_e,Ye]),dt=s.useCallback(W=>{if(!(!Xe||!ce)){if(A.current){if(P.current===W){I.current=W,ht();return}Et()}_e(),Le(W),P.current=W,Te(W),Ye(!0),It()}},[Xe,ce,ht,Et,_e,Le,Ye,It]);V.current=dt;const mt=s.useCallback(()=>{ee.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(W=>{T.current!==null&&window.clearInterval(T.current);const Re=K.current?ay:ry;T.current=window.setInterval(()=>{V.current(W)},Re)},[]),Tt=s.useCallback(W=>{ee.current!==W&&(mt(),ee.current=W,K.current=!1,V.current(W),$t(W),j.current=window.setTimeout(()=>{j.current=null,ee.current===W&&(K.current=!0,$t(W))},oy))},[mt,$t]),ft=s.useCallback(()=>{const W=v.current;if(!W)return;const Re=J==null?void 0:J.url,We=Re?H.current.get(Re):void 0;if(We!=null&&We.width&&(We!=null&&We.height)){se(ls(W,We.width,We.height));return}const Ge=S.current;if(Ge&&Re&&(Ge.src===Re||Ge.currentSrc===Re)){const{width:_t,height:lt}=uy(Ge);if(_t&&lt){je(Re,_t,lt),se(ls(W,_t,lt));return}}const ut=Vl(W);!ut.width||!ut.height||se(ut)},[J==null?void 0:J.url,je]),Ft=s.useCallback(W=>{if(S.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&ft();return}W.complete&&W.naturalWidth>0&&ft()}},[ft]),Ht=s.useCallback(()=>{ot(),ft(),le(W=>W+1)},[ot,ft]);s.useEffect(()=>{Ht();const W=v.current,Re=C.current,We=new ResizeObserver(()=>Ht());return W&&We.observe(W),Re&&We.observe(Re),window.addEventListener("resize",Ht),()=>{We.disconnect(),window.removeEventListener("resize",Ht)}},[Ht,n,w]),s.useLayoutEffect(()=>{if(!J)return;const W=S.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){ft();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&ft()}},[J==null?void 0:J.url,n,ft]),s.useEffect(()=>{be()},[be,N]),s.useEffect(()=>{const W=new Set,Re=[],We=Ge=>{!(Ge!=null&&Ge.url)||W.has(Ge.url)||(W.add(Ge.url),Re.push(Ge))};t.forEach(We),u.forEach(Ge=>Ge.items.forEach(We)),Re.forEach(Ge=>{H.current.has(Ge.url)||my(Ge,je)})},[t,u,je]),s.useEffect(()=>{if(Z!=="opening"||!ce)return;if(!x){xe("open");return}G(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),xe("open")})});return()=>cancelAnimationFrame(W)},[Z,ce,x]),s.useEffect(()=>{if(Z!=="closing")return;const W=setTimeout(()=>h(),Ln);return()=>clearTimeout(W)},[Z,h]),s.useEffect(()=>()=>{_e()},[_e]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(J==null?void 0:J.url)||(_e(),P.current=null,Te(null),ve(null),$e(null),ye(0),Q(0),Ye(!1),te(!1),oe(!1),R.current=0,B.current=0,$.current="none",M.current=!1,O.current=null,_.current=!1,S.current=null,be(),Ae.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,Ye,_e,be]),s.useLayoutEffect(()=>{const W=I.current;W!==null&&(I.current=null,requestAnimationFrame(()=>{V.current(W)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Z==="opening"){L.current=!1,Y(!1);return}if(Z!=="open"||L.current)return;if(!Be&&!fe){L.current=!0;return}Y(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),L.current=!0})});return()=>cancelAnimationFrame(W)},[Z,Be==null?void 0:Be.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(Z!=="open")return;const W=()=>{const lt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Re=lt=>{const wt=lt<0?1:-1;_e(),Le(wt),P.current=wt,Te(wt),Ye(!0),It()},We=lt=>{if(Math.abs(lt)>iy&&Xe){Re(lt);return}P.current=null,Te(null),ve(null),$e(null),Ye(!0),Q(0),it()},Ge=lt=>{if(lt.touches.length!==1||A.current)return;const wt=lt.touches[0];_.current=!0,O.current={x:wt.clientX,y:wt.clientY},$.current="none",B.current=0,M.current=!1},ut=lt=>{if(!O.current||lt.touches.length!==1||A.current)return;const wt=lt.touches[0],Vt=wt.clientX-O.current.x,Pt=wt.clientY-O.current.y;if($.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!Xe)return;$.current="horizontal"}else if(Pt>0){if(!Qe)return;$.current="vertical"}else return}if($.current==="horizontal"){M.current=!0,oe(!0),B.current=Vt,Q(Vt),lt.preventDefault();return}$.current==="vertical"&&(M.current=!0,oe(!0),R.current=Pt,ye(Pt),lt.preventDefault())},_t=()=>{if(!O.current)return;const lt=$.current,wt=M.current;if(wt&&lt==="horizontal")We(B.current),W();else if(wt&&lt==="vertical"){const Vt=R.current;if(Qe&&Vt>ny){const Pt=window.innerHeight;R.current=Pt,te(!0),ye(Pt),xe("closing")}else R.current=0,ye(0);W()}else lt==="horizontal"&&Math.abs(B.current)>0&&(We(B.current),W());O.current=null,$.current="none",B.current=0,M.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",ut,{passive:!1}),document.addEventListener("touchend",_t),document.addEventListener("touchcancel",_t),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",ut),document.removeEventListener("touchend",_t),document.removeEventListener("touchcancel",_t)}},[Z,Xe,Ye,it,_e,Qe,It,Le]);const Ot=s.useCallback(()=>{const W=(f==null?void 0:f())??x??null;W&&ce&&(X(W),G(!0)),xe("closing")},[f,x,ce]);s.useEffect(()=>{const W=Ge=>{if(Ge.key==="Escape"){if(r&&d||Z==="closing")return;mt(),Ot();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||Z!=="open"||!Xe)return;Ge.preventDefault();const ut=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&ee.current===ut||Tt(ut)},Re=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const ut=Ge.key==="ArrowLeft"?-1:1;ee.current===ut&&mt()},We=()=>{mt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Re),window.addEventListener("blur",We),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Re),window.removeEventListener("blur",We),mt()}},[Z,r,d,Ot,Xe,Tt,mt]),s.useEffect(()=>{Z!=="open"&&mt()},[Z,mt]);const Kt=()=>{Z==="closing"||l||Ot()},Ct=Z==="open",Dt=Z==="closing",tn=Ne>0?Math.max(0,1-Ne/500):1,gt=Ne>0?Math.max(.35,1-Ne/500):1,Me=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!A.current)){if(P.current!==null){ht();return}_e(),Ye(!1)}},[_e,Ye,ht]),Ve=Z==="closing"?F??x:x,tt=Ve&&ce&&(Z==="opening"||Dt)?sy(Ve,ce):void 0,pt=Fe&&J?rt(J,"center"):Ne>0?`translateY(${Ne}px)`:tt,bt=ce?ur(ce,k):null,Mt=!!(Ve&&ce),yt=Mt&&(Z==="closing"||Z==="open"&&g),Gt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:Ne>0?gt:Mt?1:Z==="opening"||Dt?0:1,transition:ie&&!de?"none":de?`transform ${wo}ms ${mn}`:D?`transform ${Ln}ms ${mn}, opacity ${Ln}ms ${mn}`:yt?`transform ${Ln}ms ${mn}`:Z==="opening"||Dt?`opacity ${Ln}ms ${mn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Wt=(W,Re,We="adjacent")=>{const Ge=Ie(W);if(!Ge)return{display:"none"};const ut=We==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:_t}=Ee!==null?Jd(Ge,ut,Ee,k):{start:We==="far"?zr(Ge,Re,k):io(Ge,Re,k)},lt=ur(_t,k),wt=rt(W,ut),Vt=!Fe&&We==="adjacent"&&Ct&&!me?vy(Ge,Re,k):null,Pt=We==="far"&&Fe&&Ee===(Re==="left"?-1:1),rn=ie&&!de?!1:de,pn=We==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:wt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:We==="far"?Ct&&Pt?1:0:Ct?1:0,transition:rn?We==="far"?`transform ${wo}ms ${mn}`:`transform ${wo}ms ${mn}, opacity ${Ln}ms ${mn}`:pn?`transform ${Ln}ms ${mn}`:Z==="opening"||Dt?`opacity ${Ln}ms ${mn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(W,Re)=>{const We=Ie(W);return We?fy(io(We,Re,k),Re,k):null},Ut=W=>Re=>{if(!l){if(_.current){_.current=!1;return}Re.stopPropagation(),dt(W)}},zt=Be?Xt(Be,"left"):null,Bt=fe?Xt(fe,"right"):null,jt=zt?ur(zt,k):null,Lt=Bt?ur(Bt,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:Z==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?tn:0,transition:ie?"none":`opacity ${Ln}ms ${mn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,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 ${Ln}ms ${mn}`,pointerEvents:"none"},children:a.jsx(Yd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Kt})})]}),Ct&&ge&&a.jsx(pr,{media:ge,style:Wt(ge,"left","far"),onMeasure:je,onTransitionEnd:Me},`far-prev-${ge.url}`),Ct&&Be&&a.jsxs(a.Fragment,{children:[a.jsx(pr,{media:Be,style:Wt(Be,"left"),onMeasure:je,onTransitionEnd:Me},`prev-${Be.url}`),jt&&a.jsx("div",{style:{position:"absolute",top:jt.top,left:jt.left,width:jt.width,height:jt.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(pr,{media:fe,style:Wt(fe,"right"),onMeasure:je,onTransitionEnd:Me},`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&&Pe&&a.jsx(pr,{media:Pe,style:Wt(Pe,"right","far"),onMeasure:je,onTransitionEnd:Me},`far-next-${Pe.url}`),ce&&J&&(Ze?a.jsx(Sy,{src:J.url,phase:Z,onMediaElement:Ft,wrapperStyle:Gt,videoStyle:Nt,onLoadedMetadata:ft,onTransitionEnd:Me},`${n}-${J.url}`):a.jsx("img",{ref:Ft,src:J.url,alt:J.name,onLoad:ft,onTransitionEnd:Me,style:Gt},`${n}-${J.url}`))]})}function Cy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=z.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:w}=e,x=(w==null?void 0:w.display)==="cover",f=(w==null?void 0:w.ratioValue)??"1:1",h=(w==null?void 0:w.reversed)??!1,[y,b]=f.split(":").map(Number),S=`${h?b:y} / ${h?y:b}`,H=c.entryWidth??.2,N=c.columnsCount,U=z.scalingValue(H,n),O=z.scalingValue(c.horizontalGap??0,n),R=U,B=U,$={width:R,...x?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},M=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},_=s.useRef(null),[A,m]=s.useState(!1),[P,I]=s.useState([]),[V,ee]=s.useState(0),[T,j]=s.useState(0),[K,ce]=s.useState(null),[se,k]=s.useState({title1:"",title2:"",title3:""}),ae=(()=>{const we={},$e=_.current?getComputedStyle(_.current).getPropertyValue("--cntrl-article-width").trim():"";return $e&&(we["--cntrl-article-width"]=$e),we})(),q=!n||i||o,le=s.useMemo(()=>ty(d),[d]),Z=t??[],xe=Z.length%N||N,Ne=xe<N&&Z.length>0,ye=Z.length-xe,ue=Ne?Math.floor((N-xe)/2)+1:1,Q=s.useMemo(()=>cy(Z),[Z]),de=s.useMemo(()=>gy(Z),[Z]),ne=(we,$e,g)=>{if(n&&!o&&!i)return;const G=Q.findIndex(X=>X.gridIndex===we);if(G<0)return;const F=Q[G];j(G),I(F.items),ee($e),k(F.entry),ce(g??null),m(!0)},Ee=s.useCallback(()=>{m(!1),ce(null)},[]),Te=s.useCallback(()=>{const we=Q[T];return!we||!_.current?K:ly(_.current,we.gridIndex,x?"cover":"contain")??K},[Q,T,K,x]),Oe=s.useCallback(we=>{if(Q.length>1){const $e=Q.length,g=(T+we+$e)%$e,G=Q[g],F=Math.min(V,G.items.length-1);j(g),I(G.items),ee(F),k(G.entry);return}ee($e=>($e+we+P.length)%P.length)},[Q,T,V,P.length]),ve=Q.length>1||P.length>1;return s.useEffect(()=>{if(!A||typeof document>"u")return;const we=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=we}},[A]),s.useEffect(()=>{!n||o||i||m(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(hy,{mediaList:de}),a.jsx("div",{ref:_,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${N}, ${U})`,rowGap:0,columnGap:O,width:z.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:z.scalingValue(u??0,n)},children:Z.map((we,$e)=>{const g=Zs(we.gallery),G=Js(g),F=G.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),X=Math.floor($e/N)===Math.ceil(Z.length/N)-1,me=Ne&&$e>=ye?`${ue+($e-ye)}`:void 0,Y=G[0],L=Y!=null&&Y.lightboxMedia?F.findIndex(oe=>oe.url===Y.lightboxMedia.url):-1,ie=a.jsx("div",{className:`${d}-item-image-wrapper`,style:$,children:G.length>0&&a.jsx(wy,{media:Y.displayMedia,gridIndex:$e,className:`${d}-item-${yo(Y.displayMedia)?"video":"image"}`.trim(),style:M,onMediaClick:q&&L>=0?oe=>ne($e,L,Kd(oe.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${d}-item`,children:a.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,X?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:U,...me?{gridColumn:me}:{}},children:[a.jsx("div",{className:`${d}-item-title-row`,children:a.jsx("div",{style:{height:0,width:B}})}),a.jsx("a",{className:`${d}-item-image-link`,children:ie}),a.jsx("div",{className:`${d}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:B}})})]})},$e)})}),A&&typeof document<"u"&&(()=>{const we=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx($y,{prefix:d,items:P,index:V,entry:se,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:Q,entryIdx:T,layoutId:r,sourceRect:K,resolveCloseSourceRect:Te,onClose:Ee,onPrev:()=>Oe(-1),onNext:()=>Oe(1)})}),we)})()]})}const Ty=`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,7 +9938,7 @@ export function Hive({
9938
9938
  </>
9939
9939
  );
9940
9940
  }
9941
- `,Ty="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),mi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Ly(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...mi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...mi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...mi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...mi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...mi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...mi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...mi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const no=ii.filter(e=>e!=="count"),Ry=no.reduce((e,t)=>({...e,...Ly(t)}),{}),Iy=no.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Arial",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ia(e){return no.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const Ey={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(no.map(e=>[Us[e],Ys(e)]))},My={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Py=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...My,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),ky={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Py},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Ry},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Ty,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Iy},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,...Ia({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,...Ia({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,...Ia({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:[Ey]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Ay={element:$y,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:[...no.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...no.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})},schema:ky,sourceCode:Cy};function Fy(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 _y({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 Ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wy(e){return String(e??"").trim().length>0}function Vl(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 Gl(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 ql(e,t,n,i,o,r,l){const d=D.scalingValue(r,l),c=D.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Ny(e,t,n){const i=D.scalingValue(t,n),o=D.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Xl=10,Ul=10,xo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Hy(e,t,n){return Math.max(t,Math.min(n,e))}function Ma(e,t,n){return e+(t-e)*n}function Oy(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+Xl,y:n.clientY-d.top+Xl}}switch(e){case"left":return{x:Ul+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Ul-i/2,y:l};default:return{x:o/2,y:l}}}function Dy(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 g=n.current,h=i.current;g&&(g.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 g=i.current;t?(g.x=Ma(g.x,g.targetX,xo.positionEase),g.y=Ma(g.y,g.targetY,xo.positionEase),g.rotation=Ma(g.rotation,g.targetRotation,xo.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),r();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,f=Math.abs(g.rotation-g.targetRotation)<.08;!h||!f?o.current=requestAnimationFrame(d):o.current=null},[r,t]),c=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=s.useCallback((g,h)=>{const f=i.current;f.targetX=g,f.targetY=h,f.targetRotation=0,f.x=g,f.y=h,f.rotation=0,f.lastX=g,f.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((g,h)=>{if(!e)return;const f=i.current;if(t&&f.hasLastX){const x=g-f.lastX;f.targetRotation=Hy(x*xo.rotationFactor,-20,xo.maxRotation)}else f.targetRotation=0;if(f.lastX=g,f.hasLastX=!0,f.targetX=g,f.targetY=h,t){c();return}f.x=g,f.y=h,f.rotation=f.targetRotation,r()},[e,r,t,c]),b=s.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[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:b,reset:v}}function jy(e){return`
9941
+ `,Ly="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 Ry(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...gi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...gi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...gi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...gi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...gi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...gi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const oo=oi.filter(e=>e!=="count"),Iy=oo.reduce((e,t)=>({...e,...Ry(t)}),{}),Ey=oo.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Arial",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ia(e){return oo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const My={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(oo.map(e=>[Ys[e],Ks(e)]))},Py={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},ky=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Py,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),Ay={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:ky},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"}},...Iy},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Ly,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ey},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,...Ia({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,...Ia({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,...Ia({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:[My]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Fy={element:Cy,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:[...oo.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...oo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})},schema:Ay,sourceCode:Ty};function _y(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 Wy({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 Ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ny(e){return String(e??"").trim().length>0}function Gl(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 ql(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 Xl(e,t,n,i,o,r,l){const d=z.scalingValue(r,l),c=z.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function Hy(e,t,n){const i=z.scalingValue(t,n),o=z.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ul=10,Yl=10,So={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Oy(e,t,n){return Math.max(t,Math.min(n,e))}function Ma(e,t,n){return e+(t-e)*n}function Dy(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+Ul,y:n.clientY-d.top+Ul}}switch(e){case"left":return{x:Yl+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Yl-i/2,y:l};default:return{x:o/2,y:l}}}function jy(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 f=n.current,h=i.current;f&&(f.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 f=i.current;t?(f.x=Ma(f.x,f.targetX,So.positionEase),f.y=Ma(f.y,f.targetY,So.positionEase),f.rotation=Ma(f.rotation,f.targetRotation,So.rotationEase)):(f.x=f.targetX,f.y=f.targetY,f.rotation=f.targetRotation),r();const h=Math.abs(f.x-f.targetX)<.4&&Math.abs(f.y-f.targetY)<.4,y=Math.abs(f.rotation-f.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((f,h)=>{const y=i.current;y.targetX=f,y.targetY=h,y.targetRotation=0,y.x=f,y.y=h,y.rotation=0,y.lastX=f,y.hasLastX=!0,r(),t&&c()},[r,t,c]),p=s.useCallback((f,h)=>{if(!e)return;const y=i.current;if(t&&y.hasLastX){const b=f-y.lastX;y.targetRotation=Oy(b*So.rotationFactor,-20,So.maxRotation)}else y.targetRotation=0;if(y.lastX=f,y.hasLastX=!0,y.targetX=f,y.targetY=h,t){c();return}y.x=f,y.y=h,y.rotation=y.targetRotation,r()},[e,r,t,c]),w=s.useCallback(f=>{l(),i.current.hasLastX=!1,f==null||f()},[l]),x=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||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:w,reset:x}}function zy(e){return`
9942
9942
  .${e}-wrapper {
9943
9943
  display: grid;
9944
9944
  align-items: start;
@@ -10314,7 +10314,7 @@ a.${e}-list-item {
10314
10314
  overflow-wrap: anywhere;
10315
10315
  word-break: break-word;
10316
10316
  }
10317
- `}const oi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Js=["AColumn","BColumn","CColumn","DColumn","EColumn"],Dn="cutLabel",Do=[...Js,Dn],la=["A","B","C","D","E"];function Jd(e){return`${e}ColumnVerticalAlign`}const cs=["Top","Center","Bottom"];function Qs(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return la.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function zy(e){const t=Qs(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function By(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return la.includes(n)?n:null}function Qd(e,t,n){const i=By(e);return i?i===t?!1:zy(n[Jd(i)]):!0}function jo(e){const t=Qs(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return la.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Vy(e,t,n){if(eu(e,t,n))return jo(e);const i=jo(e);return i.kind==="baseline"?{kind:"top"}:i}function Gy(e){const t=jo(e);return t.kind==="baseline"?{kind:"top"}:t}function eu(e,t,n){return Qd(e,n,t)?jo(e).kind==="baseline":!1}function qy(e){const t={};let n=!1;for(const i of la){const o=Jd(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}Qd(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Xy(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Uy(e){const t=jo(e).kind;return t==="baseline"?"center":t}function Yy(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Yl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Ky(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 Pa(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Ky(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 Zy(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 Jy(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Qy={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function At(e,t){return`${e}${t.replace(/^text/,"Text")}`}const ev={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function tv(e){return[At(e,"textFontFamily"),At(e,"textFontSettings"),{type:"row",items:[At(e,"textFontSize"),At(e,"textLineHeight"),At(e,"textLetterSpacing"),At(e,"textWordSpacing")]},At(e,"textTextAlign"),At(e,"textTextAppearance"),`${e}VerticalAlign`]}function nv(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Do.map(e=>[ev[e],tv(e)]))}}function Br(e,t){const n=i=>{const o=At(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===Dn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Kl(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return sn(Yt(n,t))}function Zl(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Jl(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:D.scalingValue((r-l)/2,i)}}const xn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],io=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],oo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ro=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],iv={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},ov=["hover","focus","filled","success","error"],Ql=.004,Oi=.004,ka=Oi,el=50,zo=1440,Bo=el/zo;function tu(e){const t=typeof e=="number"&&e>0?e:zo;return el/t}function rv(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 zo}const nu={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Mo(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function av(e,t=1){const n=t/e;return Object.fromEntries(xn.map(i=>[i,n]))}function sv(){return Object.fromEntries([...io.map(e=>[e,0]),...oo.map(e=>[e,0])])}function lv(){return Object.fromEntries(ro.map(e=>[e,0]))}function mr(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:nu[t]]))}function iu(e,t,n){const i=e-Bo,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 Fr(e,t,n){const i=tl(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 cv(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=io[o],l=oo[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=iu(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function tl(e,t,n){if(e<=0)return[];const i=xn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Bo;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]-Bo;if(p<=0)continue;const b=Math.min(c,p);d[u]-=b,c-=b}return[...d,i[e-1]]}function dv(e,t,n){if(e<=1)return{};const i=tl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=xn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function ec(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...oi]}function uv(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function pv(e,t,n,i){const o=Math.min(i,e.length,xn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=xn[c],p=io[c],b=oo[c],v=ro[c],g=xn[l],h=io[l],f=oo[l],x=ro[l],S=n[u],y=n[p],w=n[b],H=n[v];typeof S=="number"&&(r[g]=S),typeof y=="number"&&(r[h]=y),typeof w=="number"&&(r[f]=w),typeof H=="number"&&(r[x]=H)}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 mv(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Mo(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...av(n,o),...sv()};if(r)for(const d of ro)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,lv());return ou(e,l)?l:e}function gv(e,t,n){const i=qy(e);i&&(e={...e,...i});const o=tu(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=Mo(e),c=Mo(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:oi.length,b=w=>{if(u)return w;const H=mr({...t,...w}),N=Mo(w),U=Fr(p,N,H),O=cv(p,U,{...t,...w});return Object.keys(O).length===0?w:{...w,...O}};if(typeof r=="number"&&r!==l)return e;const v=ec(e),g=ec(t);if(!uv(v,g))return b({...e,...pv(v,g,t,p)});if(d<c&&typeof p=="number"&&!u){const w=mr({...t,...e});return b({...e,...dv(p,d,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return w>H?{...e,textPaddingLR:H}:e}const h=mr({...t,...e}),f=Fr(p,c,mr(t)),S=Fr(p,d,h).some((w,H)=>w<(f[H]??w)),y=xn.some(w=>{const H=e[w],N=t[w];return typeof H=="number"&&typeof N=="number"&&H!==N});return S||y?b(e):e}function hv(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(Bo,i-o-r-Bo)}function fv(e,t){return Math.random()*(t-e)+e}function yv(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:nu[t]]))}function Aa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function vv(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=io[d],u=oo[d],p=ro[d];return{key:l,textPrefix:Qy[l],widthKey:xn[d],width:n[xn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function xv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=D.useScopedStyles(),u=!!o,{columns:p,type:b,wrapperWidth:v,entriesCount:g,cellMinHeight:h,dividerWidth:f,showVisibility:x,cut:S,showCut:y,cutCellMinHeight:w,cutLabel:H,imageSize:N,imageOnHover:U,imagePosition:O="cursor",imageInterpolation:C="on",entryHoverEffect:V,entryHoverShowOption:$,rowPaddingTop:R,rowPaddingBottom:k,rowPaddingTopB:T,columnsOrder:m,textPaddingLR:M,textColor:E,backgroundColor:z,dividerColor:ne,textHoverColor:I,backgroundHoverColor:W,dividerHoverColor:K}=e,[ae,de]=s.useState(void 0),[A,he]=s.useState(null),q=s.useRef(null),ce=U==="on"&&(!n||i),Q=O==="cursor",be=Q&&C==="on",{anchorRef:He,onShow:xe,onCursorMove:le,exit:ee}=Dy(!!(ce&&A!==null),be),ue=(S??0)>0,oe=b==="b",Fe=s.useRef(null),Ce=s.useRef(null),[P,Y]=s.useState(null),[X,ie]=s.useState(zo),j=tu(X),B=Math.max(0,((v??0)-j)/2),J=Math.min(M??0,B),te=Math.max(J,Oi),$e=((v??0)+j)/2;s.useLayoutEffect(()=>{if(!n){ie(zo);return}const Ee=()=>{ie(rv(Fe.current))};Ee();const qe=Fe.current;if(!qe)return;const st=new ResizeObserver(Ee);st.observe(qe);let mt=qe;for(;mt&&!mt.style.getPropertyValue("--cntrl-article-width");)mt=mt.parentElement;return mt&&st.observe(mt),()=>st.disconnect()},[n,l]),s.useEffect(()=>{de(void 0)},[S,y,t,g]),s.useEffect(()=>{n&&!i&&de(void 0)},[n,i]);const ye=D.buildColorVars(c,{textColor:E,backgroundColor:z,dividerColor:ne,textHoverColor:I,backgroundHoverColor:W,dividerHoverColor:K},iv,ov),F=r&&r!=="default"?`${c}-state-${r}`:"",pe=`${!n||i?V==="default"?`${c}-entry-hover-default`:V==="blinds"?`${c}-entry-hover-blinds`:V==="reveal"?`${c}-entry-hover-reveal`:"":""} ${F}`.trim(),Z=V==="reveal"&&(!n||i),me=(x==null?void 0:x[0])??!1,De=(x==null?void 0:x[1])??!1,ge=s.useRef(e),G=s.useRef(l);s.useEffect(()=>{if(!d||!n){ge.current=e,G.current=l;return}if(G.current!==l){ge.current=e,G.current=l;return}const Ee=ge.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){ge.current=e;return}const st=gv(e,Ee,{designWidth:X});ge.current=e,ou(e,st)&&d(st)},[e,d,n,l,X]);const Me=s.useMemo(()=>yv(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),_e=s.useMemo(()=>Aa(e,io),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),rt=s.useMemo(()=>Aa(e,oo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Je=s.useMemo(()=>Aa(e,ro),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),at=s.useMemo(()=>Array.isArray(m)&&m.length>0?m:[...oi],[m]),it=s.useMemo(()=>vv(at,p,Me,_e,rt,Je),[at,p,Me,_e,rt,Je]),je=Mo(e),Se=s.useMemo(()=>xn.slice(0,p).map(Ee=>Me[Ee]),[p,Me]),We=s.useMemo(()=>tl(p,je,Me),[p,je,Me]),Be=s.useMemo(()=>Fr(p,je,Me),[p,je,Me]),Ze=s.useMemo(()=>it.map((Ee,qe)=>iu(Be[qe]??0,Ee.paddingLeft,Ee.paddingRight)),[it,Be]),Le=s.useMemo(()=>{const Ee=g===0?1/0:g;return(t??[]).slice(0,Ee).map((st,mt)=>({id:mt,cells:Object.fromEntries(oi.map(vt=>[vt,st[vt]??""])),image:st.image,link:st.link}))},[t,g]),Ve=ue?ae??S:Le.length,se=s.useMemo(()=>ue?Le.slice(0,Ve):Le,[Le,ue,Ve]),Te=ue&&Ve<Le.length,Xe=se.length>1||Te,ze=[me?`${c}-divider-top`:"",De||Xe?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Re=!n||i,Pe=()=>{if(!Re)return;const Ee=ae??S;if(!y){de(Le.length);return}de(Math.min(Ee+y,Le.length))},Ae=Ee=>D.scalingValue(Ee,n??!1),Ke=oe?T??0:R??0,Oe=k??0,Qe=h??0,tt=Math.max(Oe,ka),nt=ql(0,se.length,me,De,Te,f??0,n??!1).borderTopWidth,xt=oe?"rowPaddingTopB":"rowPaddingTop",It=it[0],Tt=it[it.length-1],ut=Ze[0],ft=Ze[Ze.length-1],Et=It&&ut?Math.max(ut.paddingLeft,Oi):0,Lt=Tt&&ft?Math.max(ft.paddingRight,Oi):0,bt=je,Nt=(Ee,qe)=>Oy(O,Fe.current,Q?Ee:null,qe),Bt=(Ee,qe)=>{if(!ce)return;const st=Ee.image;if(!(st!=null&&st.url)){ee(()=>he(null));return}const mt=(N==null?void 0:N.min)??80,vt=(N==null?void 0:N.max)??320,Mt=(A==null?void 0:A.rowId)===Ee.id,gt=Mt?A.widthPx:fv(mt,vt),{x:Vt,y:Wt}=Nt(qe,gt);if(Mt&&Q){le(Vt,Wt);return}he({rowId:Ee.id,url:st.url,objectFit:"contain",isVideo:Fy(st),widthPx:gt}),q.current={x:Vt,y:Wt}},Zt=Ee=>{if(!ce||!A||!Q)return;const{x:qe,y:st}=Nt(Ee,A.widthPx);le(qe,st)},en=()=>{A&&ee(()=>he(null))},Rt=Ee=>{Z&&Vl(Ee,c),!(!ce||!A)&&ee(()=>he(null))},Ot=Ee=>{Z&&Gl(Ee,c)};s.useLayoutEffect(()=>{if(!A||!q.current)return;const{x:Ee,y:qe}=q.current;q.current=null,xe(Ee,qe)},[A==null?void 0:A.rowId,A==null?void 0:A.url,xe]),s.useLayoutEffect(()=>{if(!u||oe){Y(null);return}const Ee=Ce.current,qe=Ee==null?void 0:Ee.parentElement;if(!Ee||!qe){Y(null);return}const st=()=>{const vt=Ee.querySelector("[data-list-row]");if(!vt){Y(null);return}const Mt=qe.getBoundingClientRect(),gt=vt.getBoundingClientRect();Y(gt.top-Mt.top+gt.height/2)};st();const mt=new ResizeObserver(st);return mt.observe(Ee),mt.observe(qe),()=>mt.disconnect()},[u,oe,se,Ke,Oe,Qe,t,e,it,Be,X,f,me,De,Te]);const nn=s.useMemo(()=>!oe&&Js.some(Ee=>{const qe=Ee.charAt(0),st=e[`${Ee}VerticalAlign`];return eu(st,e,qe)}),[oe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Vt;const Ee=Fe.current;if(!Ee)return;const qe=()=>{Ee.querySelectorAll("[data-list-col]").forEach(Wt=>{Wt.style.transform="";const _t=Wt.querySelector(`.${c}-list-col`);_t&&(_t.style.minHeight="",_t.style.height="");const qt=Wt.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(oe||!nn){qe();return}const st=()=>{const Wt=Array.from(Ee.querySelectorAll("[data-list-row]")),_t=`${c}-list-col`,qt=`${c}-baseline-probe`;Wt.forEach(Xt=>{Xt.querySelectorAll("[data-list-col]").forEach(Dt=>{Dt.style.transform="";const jt=Dt.querySelector(`.${_t}`);jt&&(jt.style.minHeight="",jt.style.height="");const Ht=Dt.querySelector(`.${c}-list-col-title`);Ht&&(Ht.style.transform="")})}),Wt.forEach(Xt=>{const Dt=Array.from(Xt.querySelectorAll("[data-list-col]"));Zy(Xt,Dt,_t)}),Ee.offsetHeight,Wt.forEach(Xt=>{const Dt=Array.from(Xt.querySelectorAll("[data-list-col]")),jt=Xt.getBoundingClientRect().top,Ht=new Map,$t=Dt.map(Ne=>{const Ge=Ne.querySelector(`.${c}-list-col-title`),dt={el:Ne,titleEl:Ge,letter:Ne.getAttribute("data-col-letter")??"",kind:Ne.getAttribute("data-valign")??"top",anchor:Ne.getAttribute("data-valign-anchor")};return Ht.set(dt.letter,dt),dt}),_=new Map,Ie=(Ne,Ge)=>{const dt=_.get(Ne.letter);if(dt!==void 0)return dt;const Ft=Ne.anchor?Ht.get(Ne.anchor):void 0;if(Ne.kind!=="baseline"||!Ft||Ge.has(Ne.letter)){const on=Pa(Ne,jt,_t,qt);return _.set(Ne.letter,on),on}Ge.add(Ne.letter);const lt=Ie(Ft,Ge);Ge.delete(Ne.letter);const wt=Pa(Ne,jt,_t,qt),zt=lt-wt;Jy(Ne.titleEl,zt);const Pt=Pa(Ne,jt,_t,qt);return _.set(Ne.letter,Pt),Pt};$t.forEach(Ne=>Ie(Ne,new Set))})};let mt=null;const vt=()=>{mt===null&&(mt=requestAnimationFrame(()=>{mt=null,st()}))};st();const Mt=new ResizeObserver(()=>vt());Mt.observe(Ee);let gt=!1;return typeof document<"u"&&((Vt=document.fonts)!=null&&Vt.ready)&&document.fonts.ready.then(()=>{gt||vt()}),()=>{gt=!0,mt!==null&&(cancelAnimationFrame(mt),mt=null),Mt.disconnect(),qe()}},[nn,oe,e,t,X,se,Be]);const pt=s.useMemo(()=>jy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:pt}}),a.jsx("div",{style:ye,children:a.jsxs("div",{ref:Fe,className:`${c}-wrapper ${pe}${ze?` ${ze}`:""}${oe?` ${c}-type-b`:""}`.trim(),style:{width:D.scalingValue(v??0,n)},onMouseMove:ce?Zt:void 0,onMouseLeave:ce?en:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[se.map((Ee,qe)=>{var Mt;const st=(((Mt=Ee.link)==null?void 0:Mt.length)??0)>0,mt=st&&(!n||i)?"a":"div",vt=ql(qe,se.length,me,De,Te,f??0,n??!1);return a.jsxs(mt,{ref:qe===0?gt=>{Ce.current=gt}:void 0,className:`${c}-list-item${st||$==="always"?` ${c}-list-item-has-link`:""}${Te&&qe===se.length-1?` ${c}-list-item-before-cut`:""}`,...st?{href:Ee.link,target:"_blank"}:{},style:vt,onMouseEnter:gt=>{Z&&(st||$==="always")&&Vl(gt,c),ce&&Bt(Ee,gt)},onMouseLeave:gt=>{Z&&(st||$==="always")&&Gl(gt,c)},children:[Ke>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Ke)}}),a.jsxs("div",{className:`${c}-list-cols-row${oe?"":` ${c}-list-cols-row-h`}${u&&qe===0&&oe?` ${c}-list-cols-row-controls`:""}`,...oe?{}:{"data-list-row":""},style:oe?void 0:{minHeight:Ae(Qe)},children:[it.map((gt,Vt)=>{const Wt=Vt===it.length-1,_t=Ze[Vt],qt=gt.paddingBottom,Xt=Wy(Ee.cells[gt.key]),Dt=oe&&Xt&&qt>0,jt=oe?{minHeight:Ae(Qe)}:{width:Ae(Be[Vt])},Ht=oe?{paddingLeft:Ae(J),paddingRight:Ae(J)}:{paddingLeft:Ae(_t.paddingLeft),paddingRight:Ae(_t.paddingRight)},$t=gt.textPrefix.charAt(0),_=oe?Gy(e[`${gt.textPrefix}VerticalAlign`]):Vy(e[`${gt.textPrefix}VerticalAlign`],e,$t),Ie=oe&&Xt&&u&&qe===0;return oe&&!Xt?null:a.jsxs("div",{className:oe?`${c}-list-col-wrap`:void 0,...oe?{}:{"data-list-col":"","data-col-letter":$t,"data-valign":_.kind,..._.kind==="baseline"?{"data-valign-anchor":_.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${Wt?` ${c}-list-col-last`:""}`,style:{...Ht,...jt,...oe?{justifyContent:Yl(_.kind)}:{}},"data-test":gt.width,children:a.jsx("span",{className:Zl(e,gt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Kl(Br(e,gt.textPrefix),n),...Jl(e,gt.textPrefix,c,n),...oe?{}:Xy(_.kind)},children:Ee.cells[gt.key]??null})}),Dt&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(qt)}}),Ie&&a.jsx("div",{"data-controls":gt.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:Ae(Math.max(qt,ka))}})]},gt.key)}),u&&qe===0&&oe&&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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ae(te),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($e),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ae(Math.max(te,je-te)),width:Ae(te),height:"100%"}})]})]}),!oe&&Oe>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Oe)}}),u&&qe===0&&!oe&&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:Ae(tt)}})]},Ee.id)}),u&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":xt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":oe?"center":"left-y",className:`${c}-control-anchor`,style:{top:nt,left:0,width:"100%",height:Ae(Math.max(Ke,ka))}})},"row-padding-handles"),u&&!oe&&It&&Tt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":It.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":P??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ae(Et),height:"100%"}}),a.jsx("div",{"data-controls":Tt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Be[it.length-1]-((ft==null?void 0:ft.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":P??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ae(bt-Lt),width:Ae(Lt),height:"100%"}})]},"column-edge-padding-handles"),u&&!oe&&it.slice(0,-1).map((Ee,qe)=>{const st=it[qe+1],mt=We.slice(0,qe+1).reduce((Wt,_t)=>Wt+_t,0),vt=Ze[qe],Mt=Ze[qe+1],gt=Math.max(vt.paddingRight,Oi),Vt=Math.max(Mt.paddingLeft,Oi);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[qe]-vt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":P??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ae(mt-gt),width:Ae(gt),height:"100%"}}),a.jsx("div",{"data-controls":st.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Be[qe+1]-Mt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":P??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ae(mt),width:Ae(Vt),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),u&&!oe&&it.slice(0,-1).map((Ee,qe)=>{const st=hv(qe,We,Se,je),vt=We.slice(0,qe+1).reduce((Mt,gt)=>Mt+gt,0)-Ql/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(el),"data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ae(vt),width:Ae(Ql),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),Te&&(()=>{const Ee=Br(e,Dn),qe=Uy(e.cutLabelVerticalAlign),st=Ee.textTextAlign==="justify"||oe;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ae(w??0),cursor:Re?"pointer":"default",...Ny(De,f??0,n??!1)},onClick:Re?Pe:void 0,onMouseEnter:Z||ce?Rt:void 0,onMouseLeave:Z?Ot:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...oe?{paddingLeft:Ae(J),paddingRight:Ae(J)}:{},justifyContent:Yy(Ee.textTextAlign),alignItems:Yl(qe)},children:a.jsx("span",{className:Zl(e,Dn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Kl(Ee,n),...Jl(e,Dn,c,n),...st?{width:"100%"}:{}},children:H})})})})(),ce&&A&&(()=>{const Ee=`${A.widthPx}px`,qe={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"};return a.jsx("div",{ref:He,className:`${c}-hover-media-anchor`,children:a.jsx(_y,{media:A,className:A.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:qe},`${A.rowId}-${A.url}`)})})()]})})]})}const bv=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10317
+ `}const ri=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Qs=["AColumn","BColumn","CColumn","DColumn","EColumn"],jn="cutLabel",jo=[...Qs,jn],la=["A","B","C","D","E"];function eu(e){return`${e}ColumnVerticalAlign`}const cs=["Top","Center","Bottom"];function el(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return la.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function By(e){const t=el(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Vy(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return la.includes(n)?n:null}function tu(e,t,n){const i=Vy(e);return i?i===t?!1:By(n[eu(i)]):!0}function zo(e){const t=el(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return la.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Gy(e,t,n){if(nu(e,t,n))return zo(e);const i=zo(e);return i.kind==="baseline"?{kind:"top"}:i}function qy(e){const t=zo(e);return t.kind==="baseline"?{kind:"top"}:t}function nu(e,t,n){return tu(e,n,t)?zo(e).kind==="baseline":!1}function Xy(e){const t={};let n=!1;for(const i of la){const o=eu(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}tu(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Uy(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Yy(e){const t=zo(e).kind;return t==="baseline"?"center":t}function Ky(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Kl(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Zy(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 Pa(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=Zy(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 Jy(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 Qy(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const ev={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function At(e,t){return`${e}${t.replace(/^text/,"Text")}`}const tv={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function nv(e){return[At(e,"textFontFamily"),At(e,"textFontSettings"),{type:"row",items:[At(e,"textFontSize"),At(e,"textLineHeight"),At(e,"textLetterSpacing"),At(e,"textWordSpacing")]},At(e,"textTextAlign"),At(e,"textTextAppearance"),`${e}VerticalAlign`]}function iv(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(jo.map(e=>[tv[e],nv(e)]))}}function Br(e,t){const n=i=>{const o=At(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===jn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Zl(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return sn(Zt(n,t))}function Jl(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Ql(e,t,n,i){const o=Br(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:z.scalingValue((r-l)/2,i)}}const xn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ao=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],so=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ov={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},rv=["hover","focus","filled","success","error"],ec=.004,ji=.004,ka=ji,tl=50,Bo=1440,Vo=tl/Bo;function iu(e){const t=typeof e=="number"&&e>0?e:Bo;return tl/t}function av(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Bo}const ou={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Po(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function sv(e,t=1){const n=t/e;return Object.fromEntries(xn.map(i=>[i,n]))}function lv(){return Object.fromEntries([...ro.map(e=>[e,0]),...ao.map(e=>[e,0])])}function cv(){return Object.fromEntries(so.map(e=>[e,0]))}function mr(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:ou[t]]))}function ru(e,t,n){const i=e-Vo,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 Fr(e,t,n){const i=nl(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 dv(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=ro[o],l=ao[o],d=typeof n[r]=="number"?n[r]:0,c=typeof n[l]=="number"?n[l]:0,u=ru(t[o]??0,d,c);u.paddingLeft!==d&&(i[r]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function nl(e,t,n){if(e<=0)return[];const i=xn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Vo;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]-Vo;if(p<=0)continue;const w=Math.min(c,p);d[u]-=w,c-=w}return[...d,i[e-1]]}function uv(e,t,n){if(e<=1)return{};const i=nl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=xn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function tc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...ri]}function pv(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function mv(e,t,n,i){const o=Math.min(i,e.length,xn.length),r={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=xn[c],p=ro[c],w=ao[c],x=so[c],f=xn[l],h=ro[l],y=ao[l],b=so[l],C=n[u],v=n[p],S=n[w],H=n[x];typeof C=="number"&&(r[f]=C),typeof v=="number"&&(r[h]=v),typeof S=="number"&&(r[y]=S),typeof H=="number"&&(r[b]=H)}return r}function au(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 gv(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Po(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...sv(n,o),...lv()};if(r)for(const d of so)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,cv());return au(e,l)?l:e}function hv(e,t,n){const i=Xy(e);i&&(e={...e,...i});const o=iu(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,d=Po(e),c=Po(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:ri.length,w=S=>{if(u)return S;const H=mr({...t,...S}),N=Po(S),U=Fr(p,N,H),O=dv(p,U,{...t,...S});return Object.keys(O).length===0?S:{...S,...O}};if(typeof r=="number"&&r!==l)return e;const x=tc(e),f=tc(t);if(!pv(x,f))return w({...e,...mv(x,f,t,p)});if(d<c&&typeof p=="number"&&!u){const S=mr({...t,...e});return w({...e,...uv(p,d,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return S>H?{...e,textPaddingLR:H}:e}const h=mr({...t,...e}),y=Fr(p,c,mr(t)),C=Fr(p,d,h).some((S,H)=>S<(y[H]??S)),v=xn.some(S=>{const H=e[S],N=t[S];return typeof H=="number"&&typeof N=="number"&&H!==N});return C||v?w(e):e}function fv(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(Vo,i-o-r-Vo)}function yv(e,t){return Math.random()*(t-e)+e}function vv(e){return Object.fromEntries(xn.map(t=>[t,typeof e[t]=="number"?e[t]:ou[t]]))}function Aa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function xv(e,t,n,i,o,r){return e.slice(0,t).map((l,d)=>{const c=ro[d],u=ao[d],p=so[d];return{key:l,textPrefix:ev[l],widthKey:xn[d],width:n[xn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:r[p]}})}function bv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,onUpdateSettings:d}){const{prefix:c}=z.useScopedStyles(),u=!!o,{columns:p,type:w,wrapperWidth:x,entriesCount:f,cellMinHeight:h,dividerWidth:y,showVisibility:b,cut:C,showCut:v,cutCellMinHeight:S,cutLabel:H,imageSize:N,imageOnHover:U,imagePosition:O="cursor",imageInterpolation:R="on",entryHoverEffect:B,entryHoverShowOption:$,rowPaddingTop:M,rowPaddingBottom:_,rowPaddingTopB:A,columnsOrder:m,textPaddingLR:P,textColor:I,backgroundColor:V,dividerColor:ee,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:K}=e,[ce,se]=s.useState(void 0),[k,ae]=s.useState(null),q=s.useRef(null),le=U==="on"&&(!n||i),Z=O==="cursor",xe=Z&&R==="on",{anchorRef:Ne,onShow:ye,onCursorMove:ue,exit:Q}=jy(!!(le&&k!==null),xe),de=(C??0)>0,ne=w==="b",Ee=s.useRef(null),Te=s.useRef(null),[Oe,ve]=s.useState(null),[we,$e]=s.useState(Bo),g=iu(we),G=Math.max(0,((x??0)-g)/2),F=Math.min(P??0,G),X=Math.max(F,ji),me=((x??0)+g)/2;s.useLayoutEffect(()=>{if(!n){$e(Bo);return}const Me=()=>{$e(av(Ee.current))};Me();const Ve=Ee.current;if(!Ve)return;const tt=new ResizeObserver(Me);tt.observe(Ve);let pt=Ve;for(;pt&&!pt.style.getPropertyValue("--cntrl-article-width");)pt=pt.parentElement;return pt&&tt.observe(pt),()=>tt.disconnect()},[n,l]),s.useEffect(()=>{se(void 0)},[C,v,t,f]),s.useEffect(()=>{n&&!i&&se(void 0)},[n,i]);const Y=z.buildColorVars(c,{textColor:I,backgroundColor:V,dividerColor:ee,textHoverColor:T,backgroundHoverColor:j,dividerHoverColor:K},ov,rv),L=r&&r!=="default"?`${c}-state-${r}`:"",oe=`${!n||i?B==="default"?`${c}-entry-hover-default`:B==="blinds"?`${c}-entry-hover-blinds`:B==="reveal"?`${c}-entry-hover-reveal`:"":""} ${L}`.trim(),D=B==="reveal"&&(!n||i),te=(b==null?void 0:b[0])??!1,Ae=(b==null?void 0:b[1])??!1,he=s.useRef(e),J=s.useRef(l);s.useEffect(()=>{if(!d||!n){he.current=e,J.current=l;return}if(J.current!==l){he.current=e,J.current=l;return}const Me=he.current;if(!(Me!==e))return;if(typeof Me.columns=="number"&&typeof e.columns=="number"&&Me.columns!==e.columns){he.current=e;return}const tt=hv(e,Me,{designWidth:we});he.current=e,au(e,tt)&&d(tt)},[e,d,n,l,we]);const Ze=s.useMemo(()=>vv(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Fe=s.useMemo(()=>Aa(e,ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Qe=s.useMemo(()=>Aa(e,ao),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Xe=s.useMemo(()=>Aa(e,so),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),nt=s.useMemo(()=>Array.isArray(m)&&m.length>0?m:[...ri],[m]),et=s.useMemo(()=>xv(nt,p,Ze,Fe,Qe,Xe),[nt,p,Ze,Fe,Qe,Xe]),Be=Po(e),fe=s.useMemo(()=>xn.slice(0,p).map(Me=>Ze[Me]),[p,Ze]),He=s.useMemo(()=>nl(p,Be,Ze),[p,Be,Ze]),ze=s.useMemo(()=>Fr(p,Be,Ze),[p,Be,Ze]),Je=s.useMemo(()=>et.map((Me,Ve)=>ru(ze[Ve]??0,Me.paddingLeft,Me.paddingRight)),[et,ze]),Ce=s.useMemo(()=>{const Me=f===0?1/0:f;return(t??[]).slice(0,Me).map((tt,pt)=>({id:pt,cells:Object.fromEntries(ri.map(bt=>[bt,tt[bt]??""])),image:tt.image,link:tt.link}))},[t,f]),De=de?ce??C:Ce.length,qe=s.useMemo(()=>de?Ce.slice(0,De):Ce,[Ce,de,De]),ge=de&&De<Ce.length,Pe=qe.length>1||ge,je=[te?`${c}-divider-top`:"",Ae||Pe?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Ie=!n||i,be=()=>{if(!Ie)return;const Me=ce??C;if(!v){se(Ce.length);return}se(Math.min(Me+v,Ce.length))},Le=Me=>z.scalingValue(Me,n??!1),Ye=ne?A??0:M??0,_e=_??0,it=h??0,ot=Math.max(_e,ka),rt=Xl(0,qe.length,te,Ae,ge,y??0,n??!1).borderTopWidth,ht=ne?"rowPaddingTopB":"rowPaddingTop",It=et[0],Et=et[et.length-1],dt=Je[0],mt=Je[Je.length-1],$t=It&&dt?Math.max(dt.paddingLeft,ji):0,Tt=Et&&mt?Math.max(mt.paddingRight,ji):0,ft=Be,Ft=(Me,Ve)=>Dy(O,Ee.current,Z?Me:null,Ve),Ht=(Me,Ve)=>{if(!le)return;const tt=Me.image;if(!(tt!=null&&tt.url)){Q(()=>ae(null));return}const pt=(N==null?void 0:N.min)??80,bt=(N==null?void 0:N.max)??320,Mt=(k==null?void 0:k.rowId)===Me.id,yt=Mt?k.widthPx:yv(pt,bt),{x:Gt,y:Nt}=Ft(Ve,yt);if(Mt&&Z){ue(Gt,Nt);return}ae({rowId:Me.id,url:tt.url,objectFit:"contain",isVideo:_y(tt),widthPx:yt}),q.current={x:Gt,y:Nt}},Ot=Me=>{if(!le||!k||!Z)return;const{x:Ve,y:tt}=Ft(Me,k.widthPx);ue(Ve,tt)},Kt=()=>{k&&Q(()=>ae(null))},Ct=Me=>{D&&Gl(Me,c),!(!le||!k)&&Q(()=>ae(null))},Dt=Me=>{D&&ql(Me,c)};s.useLayoutEffect(()=>{if(!k||!q.current)return;const{x:Me,y:Ve}=q.current;q.current=null,ye(Me,Ve)},[k==null?void 0:k.rowId,k==null?void 0:k.url,ye]),s.useLayoutEffect(()=>{if(!u||ne){ve(null);return}const Me=Te.current,Ve=Me==null?void 0:Me.parentElement;if(!Me||!Ve){ve(null);return}const tt=()=>{const bt=Me.querySelector("[data-list-row]");if(!bt){ve(null);return}const Mt=Ve.getBoundingClientRect(),yt=bt.getBoundingClientRect();ve(yt.top-Mt.top+yt.height/2)};tt();const pt=new ResizeObserver(tt);return pt.observe(Me),pt.observe(Ve),()=>pt.disconnect()},[u,ne,qe,Ye,_e,it,t,e,et,ze,we,y,te,Ae,ge]);const tn=s.useMemo(()=>!ne&&Qs.some(Me=>{const Ve=Me.charAt(0),tt=e[`${Me}VerticalAlign`];return nu(tt,e,Ve)}),[ne,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Gt;const Me=Ee.current;if(!Me)return;const Ve=()=>{Me.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const Wt=Nt.querySelector(`.${c}-list-col`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const Xt=Nt.querySelector(`.${c}-list-col-title`);Xt&&(Xt.style.transform="")})};if(ne||!tn){Ve();return}const tt=()=>{const Nt=Array.from(Me.querySelectorAll("[data-list-row]")),Wt=`${c}-list-col`,Xt=`${c}-baseline-probe`;Nt.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(zt=>{zt.style.transform="";const Bt=zt.querySelector(`.${Wt}`);Bt&&(Bt.style.minHeight="",Bt.style.height="");const jt=zt.querySelector(`.${c}-list-col-title`);jt&&(jt.style.transform="")})}),Nt.forEach(Ut=>{const zt=Array.from(Ut.querySelectorAll("[data-list-col]"));Jy(Ut,zt,Wt)}),Me.offsetHeight,Nt.forEach(Ut=>{const zt=Array.from(Ut.querySelectorAll("[data-list-col]")),Bt=Ut.getBoundingClientRect().top,jt=new Map,Lt=zt.map(We=>{const Ge=We.querySelector(`.${c}-list-col-title`),ut={el:We,titleEl:Ge,letter:We.getAttribute("data-col-letter")??"",kind:We.getAttribute("data-valign")??"top",anchor:We.getAttribute("data-valign-anchor")};return jt.set(ut.letter,ut),ut}),W=new Map,Re=(We,Ge)=>{const ut=W.get(We.letter);if(ut!==void 0)return ut;const _t=We.anchor?jt.get(We.anchor):void 0;if(We.kind!=="baseline"||!_t||Ge.has(We.letter)){const rn=Pa(We,Bt,Wt,Xt);return W.set(We.letter,rn),rn}Ge.add(We.letter);const lt=Re(_t,Ge);Ge.delete(We.letter);const wt=Pa(We,Bt,Wt,Xt),Vt=lt-wt;Qy(We.titleEl,Vt);const Pt=Pa(We,Bt,Wt,Xt);return W.set(We.letter,Pt),Pt};Lt.forEach(We=>Re(We,new Set))})};let pt=null;const bt=()=>{pt===null&&(pt=requestAnimationFrame(()=>{pt=null,tt()}))};tt();const Mt=new ResizeObserver(()=>bt());Mt.observe(Me);let yt=!1;return typeof document<"u"&&((Gt=document.fonts)!=null&&Gt.ready)&&document.fonts.ready.then(()=>{yt||bt()}),()=>{yt=!0,pt!==null&&(cancelAnimationFrame(pt),pt=null),Mt.disconnect(),Ve()}},[tn,ne,e,t,we,qe,ze]);const gt=s.useMemo(()=>zy(c),[c]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:Y,children:a.jsxs("div",{ref:Ee,className:`${c}-wrapper ${oe}${je?` ${je}`:""}${ne?` ${c}-type-b`:""}`.trim(),style:{width:z.scalingValue(x??0,n)},onMouseMove:le?Ot:void 0,onMouseLeave:le?Kt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[qe.map((Me,Ve)=>{var Mt;const tt=(((Mt=Me.link)==null?void 0:Mt.length)??0)>0,pt=tt&&(!n||i)?"a":"div",bt=Xl(Ve,qe.length,te,Ae,ge,y??0,n??!1);return a.jsxs(pt,{ref:Ve===0?yt=>{Te.current=yt}:void 0,className:`${c}-list-item${tt||$==="always"?` ${c}-list-item-has-link`:""}${ge&&Ve===qe.length-1?` ${c}-list-item-before-cut`:""}`,...tt?{href:Me.link,target:"_blank"}:{},style:bt,onMouseEnter:yt=>{D&&(tt||$==="always")&&Gl(yt,c),le&&Ht(Me,yt)},onMouseLeave:yt=>{D&&(tt||$==="always")&&ql(yt,c)},children:[Ye>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Le(Ye)}}),a.jsxs("div",{className:`${c}-list-cols-row${ne?"":` ${c}-list-cols-row-h`}${u&&Ve===0&&ne?` ${c}-list-cols-row-controls`:""}`,...ne?{}:{"data-list-row":""},style:ne?void 0:{minHeight:Le(it)},children:[et.map((yt,Gt)=>{const Nt=Gt===et.length-1,Wt=Je[Gt],Xt=yt.paddingBottom,Ut=Ny(Me.cells[yt.key]),zt=ne&&Ut&&Xt>0,Bt=ne?{minHeight:Le(it)}:{width:Le(ze[Gt])},jt=ne?{paddingLeft:Le(F),paddingRight:Le(F)}:{paddingLeft:Le(Wt.paddingLeft),paddingRight:Le(Wt.paddingRight)},Lt=yt.textPrefix.charAt(0),W=ne?qy(e[`${yt.textPrefix}VerticalAlign`]):Gy(e[`${yt.textPrefix}VerticalAlign`],e,Lt),Re=ne&&Ut&&u&&Ve===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":W.kind,...W.kind==="baseline"?{"data-valign-anchor":W.anchorLetter}:{}},children:[a.jsx("div",{className:`${c}-list-col${Nt?` ${c}-list-col-last`:""}`,style:{...jt,...Bt,...ne?{justifyContent:Kl(W.kind)}:{}},"data-test":yt.width,children:a.jsx("span",{className:Jl(e,yt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Zl(Br(e,yt.textPrefix),n),...Ql(e,yt.textPrefix,c,n),...ne?{}:Uy(W.kind)},children:Me.cells[yt.key]??null})}),zt&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Le(Xt)}}),Re&&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:Le(Math.max(Xt,ka))}})]},yt.key)}),u&&Ve===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:Le(X),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:Le(Math.max(X,Be-X)),width:Le(X),height:"100%"}})]})]}),!ne&&_e>0&&a.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Le(_e)}}),u&&Ve===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:Le(ot)}})]},Me.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:Le(Math.max(Ye,ka))}})},"row-padding-handles"),u&&!ne&&It&&Et&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":It.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((dt==null?void 0:dt.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:Le($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(ze[et.length-1]-((mt==null?void 0:mt.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:Le(ft-Tt),width:Le(Tt),height:"100%"}})]},"column-edge-padding-handles"),u&&!ne&&et.slice(0,-1).map((Me,Ve)=>{const tt=et[Ve+1],pt=He.slice(0,Ve+1).reduce((Nt,Wt)=>Nt+Wt,0),bt=Je[Ve],Mt=Je[Ve+1],yt=Math.max(bt.paddingRight,ji),Gt=Math.max(Mt.paddingLeft,ji);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Me.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ve]-bt.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:Le(pt-yt),width:Le(yt),height:"100%"}}),a.jsx("div",{"data-controls":tt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ve+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:Le(pt),width:Le(Gt),height:"100%"}})]},`${Me.paddingRightKey}-padding`)}),u&&!ne&&et.slice(0,-1).map((Me,Ve)=>{const tt=fv(Ve,He,fe,Be),bt=He.slice(0,Ve+1).reduce((Mt,yt)=>Mt+yt,0)-ec/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Me.widthKey,"data-controls-axis":"x","data-controls-min":String(tl),"data-controls-max-fraction":String(tt),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Le(bt),width:Le(ec),height:"calc(100%)",pointerEvents:"auto"}})},`${Me.widthKey}-junction`)})]}),ge&&(()=>{const Me=Br(e,jn),Ve=Yy(e.cutLabelVerticalAlign),tt=Me.textTextAlign==="justify"||ne;return a.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Le(S??0),cursor:Ie?"pointer":"default",...Hy(Ae,y??0,n??!1)},onClick:Ie?be:void 0,onMouseEnter:D||le?Ct:void 0,onMouseLeave:D?Dt:void 0,children:a.jsx("div",{className:`${c}-list-cols-row`,style:{...ne?{paddingLeft:Le(F),paddingRight:Le(F)}:{},justifyContent:Ky(Me.textTextAlign),alignItems:Kl(Ve)},children:a.jsx("span",{className:Jl(e,jn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Zl(Me,n),...Ql(e,jn,c,n),...tt?{width:"100%"}:{}},children:H})})})})(),le&&k&&(()=>{const Me=`${k.widthPx}px`,Ve={width:Me,height:"auto",maxHeight:Me,objectFit:"contain"};return a.jsx("div",{ref:Ne,className:`${c}-hover-media-anchor`,children:a.jsx(Wy,{media:k,className:k.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ve},`${k.rowId}-${k.url}`)})})()]})})]})}const wv=`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
- `,fo=["A","B","C","D","E"],tc=[...cs,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function wv(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Sv(){return Object.fromEntries(fo.map((e,t)=>{const n=oi[t],i=`${e} column`;return[n,wv(i)]}))}function $v(){const e={};for(const t of fo)e[`${t}ColumnWidth`]=gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=gr(`${t} column padding bottom`);return e}function nc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...oi]};for(const r of fo)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 Cv(e){const t={};if(e===Dn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...cs]},enum:[...cs]};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[At(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[At(e,"textFontSettings")]={...gi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[At(e,"textFontSize")]={...gi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[At(e,"textLineHeight")]={...gi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[At(e,"textLetterSpacing")]={...gi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[At(e,"textWordSpacing")]={...gi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[At(e,"textTextAlign")]={...gi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[At(e,"textTextAppearance")]={...gi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Tv=Do.reduce((e,t)=>({...e,...Cv(t)}),{});function Lv(e){return{verticalAlign:e===Dn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Dn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Rv(e,t={}){var n;return{...Lv(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ic=new Set(["textFontFamily","textFontSettings"]);function Iv(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`]=Qs(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[At(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[At(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[At(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[At(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[At(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[At(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[At(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[At(e,"textTextAppearance")]=t.textTextAppearance),o}function _r(e={},t){return Do.reduce((n,i)=>({...n,...Iv(i,Rv(i,e),t)}),{})}const Ev=_r(),Mv=nv();function ru(e){return[At(e,"textFontFamily"),At(e,"textFontSettings"),At(e,"textFontSize"),At(e,"textLineHeight"),At(e,"textLetterSpacing"),At(e,"textWordSpacing"),At(e,"textTextAlign"),At(e,"textTextAppearance"),`${e}VerticalAlign`]}function Pv(){const e=[];return Js.forEach((t,n)=>{const i=oi[n],o=ru(t);for(let r=1;r<oi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(d,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:l,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const kv=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];ru(Dn);const Av=[...fo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],hi=[{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"}],Fv=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:hi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:hi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:hi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:hi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:hi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:hi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:hi[6],link:""}],_v=[...fo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Wv={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:{...Sv(),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:Fv},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"}},...$v(),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"}},...Tv,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",...Ev,..._r({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:nc({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},..._r({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:nc({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},..._r({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Pv(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Av.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}},...fo.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",..._v]},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__",Mv]}],paletteBookmark:{items:[...kv],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Nv={element:xv,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>mv(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Do.map(e=>({path:`${At(e,"textFontFamily")}`}))]},fontRelations:{...Do.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${At(t,"textFontFamily")}`}),{})},schema:Wv,sourceCode:bv},oc=300,qn=.004,Hv={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"},Ov=["hover","focus","filled","success","error"];function Dv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function rc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ac(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:D.scalingValue((o-t)/2,i)}}function jv(e){return`
13405
+ `,vo=["A","B","C","D","E"],nc=[...cs,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Sv(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function $v(){return Object.fromEntries(vo.map((e,t)=>{const n=ri[t],i=`${e} column`;return[n,Sv(i)]}))}function Cv(){const e={};for(const t of vo)e[`${t}ColumnWidth`]=gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=gr(`${t} column padding bottom`);return e}function ic(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...ri]};for(const r of vo)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 Tv(e){const t={};if(e===jn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...cs]},enum:[...cs]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...nc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...nc]}}return t[At(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[At(e,"textFontSettings")]={...hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[At(e,"textFontSize")]={...hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[At(e,"textLineHeight")]={...hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[At(e,"textLetterSpacing")]={...hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[At(e,"textWordSpacing")]={...hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[At(e,"textTextAlign")]={...hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[At(e,"textTextAppearance")]={...hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Lv=jo.reduce((e,t)=>({...e,...Tv(t)}),{});function Rv(e){return{verticalAlign:e===jn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===jn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Iv(e,t={}){var n;return{...Rv(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const oc=new Set(["textFontFamily","textFontSettings"]);function Ev(e,t,n){const i=r=>n===void 0?!0:n==="common"?oc.has(r):!oc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=el(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[At(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[At(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[At(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[At(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[At(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[At(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[At(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[At(e,"textTextAppearance")]=t.textTextAppearance),o}function _r(e={},t){return jo.reduce((n,i)=>({...n,...Ev(i,Iv(i,e),t)}),{})}const Mv=_r(),Pv=iv();function su(e){return[At(e,"textFontFamily"),At(e,"textFontSettings"),At(e,"textFontSize"),At(e,"textLineHeight"),At(e,"textLetterSpacing"),At(e,"textWordSpacing"),At(e,"textTextAlign"),At(e,"textTextAppearance"),`${e}VerticalAlign`]}function kv(){const e=[];return Qs.forEach((t,n)=>{const i=ri[n],o=su(t);for(let r=1;r<ri.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 Av=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];su(jn);const Fv=[...vo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],fi=[{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"}],_v=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:fi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:fi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:fi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:fi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:fi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:fi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:fi[6],link:""}],Wv=[...vo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Nv={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:{...$v(),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:_v},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"}},...Cv(),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"}},...Lv,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",...Mv,..._r({},"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},..._r({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},..._r({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...kv(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Fv.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}},...vo.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",...Wv]},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__",Pv]}],paletteBookmark:{items:[...Av],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Hv={element:bv,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>gv(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:[...jo.map(e=>({path:`${At(e,"textFontFamily")}`}))]},fontRelations:{...jo.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${At(t,"textFontFamily")}`}),{})},schema:Nv,sourceCode:wv},rc=300,Xn=.004,Ov={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"},Dv=["hover","focus","filled","success","error"];function jv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ac(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function sc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:z.scalingValue((o-t)/2,i)}}function zv(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: ${Dv(20)};
13467
+ gap: ${jv(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 ${oc}ms ease;
13495
+ transition: transform ${rc}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 ${oc}ms ease;
13532
+ transition: grid-template-rows ${rc}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 sc(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 zv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=D.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:b="solid",entryHoverEffect:v="default",autoclose:g="off",icon:h,iconMaxWidth:f=.00833,iconPaddingRight:x=0,iconAnimation:S="rotate 45",questionColor:y="#000000",answerColor:w="#000000",dividerColor:H="#0000001F",iconColor:N="#000000",questionHoverColor:U="#666666",iconHoverColor:O="#666666",iconActiveColor:C="#000000",dividerHoverColor:V="#000000",questionFontFamily:$,questionFontSettings:R,questionFontSize:k,questionLineHeight:T,questionLetterSpacing:m,questionWordSpacing:M,questionTextAppearance:E,answerFontFamily:z,answerFontSettings:ne,answerFontSize:I,answerLineHeight:W,answerLetterSpacing:K,answerWordSpacing:ae,answerTextAppearance:de,questionPaddingLeft:A=0,questionPaddingTop:he=0,questionPaddingBottom:q=0,answerPaddingLeft:ce=0,answerPaddingRight:Q=0,answerPaddingTop:be=0,answerPaddingBottom:He=0}=e,xe=t??[],[le,ee]=s.useState(()=>new Set),ue=!n||i;s.useEffect(()=>{ee(new Set)},[g]),s.useEffect(()=>{n&&!o&&!i&&ee(new Set)},[n,o,i]);const oe=Ze=>D.scalingValue(Ze,n??!1),Fe=Math.max(A,qn),Ce=Math.max(he,qn),P=Math.max(q,qn),Y=Math.max(ce,qn),X=Math.max(Q,qn),ie=Math.max(be,qn),j=Math.max(He,qn),B=Math.max(0,(c??1)-x-f),J=Math.max(0,(c??1)-Q),te=Math.max(0,(c??1)-ce),$e=Math.max(x,qn),ye=Math.max(0,(c??1)-A-f),F=s.useMemo(()=>le.size===0?0:Math.min(...le),[le]),ve=s.useCallback(Ze=>le.has(Ze),[le]),pe=ue&&v==="default"?`${l}-entry-hover-default`:"",Z=h??"",me=Z!=="",De=S.replace(/^rotate /,""),ge=`${l}-icon-anim-${De}`,G=sn(Yt(sc($,R,k,T,m,M,E,y),n)),Me=sn(Yt(sc(z,ne,I,W,K,ae,de,w),n)),_e=rc(k,T,`${l}-question`,`${l}-text-tight-leading`),rt=rc(I,W,`${l}-answer-text`,`${l}-text-tight-leading`),Je=ac(k,T,l,n),at=ac(I,W,l,n),it=D.buildColorVars(l,{questionColor:y,answerColor:w,dividerColor:H,iconColor:N,questionHoverColor:U,iconHoverColor:O,iconActiveColor:C,dividerHoverColor:V},Hv,Ov),je=r&&r!=="default"?`${l}-state-${r}`:"",Se=s.useCallback(Ze=>{ue&&ee(Le=>{if(Le.has(Ze)){const se=new Set(Le);return se.delete(Ze),se}if(g==="on")return new Set([Ze]);const Ve=new Set(Le);return Ve.add(Ze),Ve})},[ue,g]),We=s.useMemo(()=>jv(l),[l]),Be={[`--${l}-divider-width`]:D.scalingValue(p,n??!1),[`--${l}-divider-style`]:b,[`--${l}-icon-max-width`]:D.scalingValue(f,n??!1),...u>0?{[`--${l}-question-min-height`]:D.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:We}}),a.jsx("div",{style:it,children:a.jsx("div",{className:yt(`${l}-wrapper`,n&&!i&&`${l}-editor`,pe,je),style:{width:D.scalingValue(c,n??!1),maxWidth:"100%",...Be},children:xe.map((Ze,Le)=>{var Re;const Ve=ve(Le),se=((Re=Ze.question)==null?void 0:Re.trim())??"",Te=Ze.answer,Xe=((Te==null?void 0:Te.length)??0)>0,ze=d&&Le===F;return a.jsxs("div",{className:yt(`${l}-item`,Ve&&`${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:oe(Ce)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(B),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Fe),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(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe($e),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ve,style:{...G,...Je,paddingLeft:oe(A),paddingRight:oe(x)},onClick:()=>Se(Le),children:[he>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(he)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:_e,children:se}),Xe&&(me?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ge}`,"aria-hidden":"true",children:a.jsx(ln,{url:Z,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${ge}`,"aria-hidden":"true"}))]}),q>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(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:oe(P)}})]}),Xe&&Te&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!Ve,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[ze&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(ie)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(J),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Y),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(te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(X),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...Me,...at,paddingLeft:oe(ce),paddingRight:oe(Q)},children:a.jsx("div",{className:rt,children:a.jsx(Ri,{content:Te})})}),He>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(He)}}),ze&&Ve&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(j)}})]})})})]},Le)})})})]})}const Bv=`import { useCallback, useEffect, useMemo, useState } from 'react';
13570
+ `}function lc(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 Bv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=z.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:f="off",icon:h,iconMaxWidth:y=.00833,iconPaddingRight:b=0,iconAnimation:C="rotate 45",questionColor:v="#000000",answerColor:S="#000000",dividerColor:H="#0000001F",iconColor:N="#000000",questionHoverColor:U="#666666",iconHoverColor:O="#666666",iconActiveColor:R="#000000",dividerHoverColor:B="#000000",questionFontFamily:$,questionFontSettings:M,questionFontSize:_,questionLineHeight:A,questionLetterSpacing:m,questionWordSpacing:P,questionTextAppearance:I,answerFontFamily:V,answerFontSettings:ee,answerFontSize:T,answerLineHeight:j,answerLetterSpacing:K,answerWordSpacing:ce,answerTextAppearance:se,questionPaddingLeft:k=0,questionPaddingTop:ae=0,questionPaddingBottom:q=0,answerPaddingLeft:le=0,answerPaddingRight:Z=0,answerPaddingTop:xe=0,answerPaddingBottom:Ne=0}=e,ye=t??[],[ue,Q]=s.useState(()=>new Set),de=!n||i;s.useEffect(()=>{Q(new Set)},[f]),s.useEffect(()=>{n&&!o&&!i&&Q(new Set)},[n,o,i]);const ne=Je=>z.scalingValue(Je,n??!1),Ee=Math.max(k,Xn),Te=Math.max(ae,Xn),Oe=Math.max(q,Xn),ve=Math.max(le,Xn),we=Math.max(Z,Xn),$e=Math.max(xe,Xn),g=Math.max(Ne,Xn),G=Math.max(0,(c??1)-b-y),F=Math.max(0,(c??1)-Z),X=Math.max(0,(c??1)-le),me=Math.max(b,Xn),Y=Math.max(0,(c??1)-k-y),L=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),ie=s.useCallback(Je=>ue.has(Je),[ue]),oe=de&&x==="default"?`${l}-entry-hover-default`:"",D=h??"",te=D!=="",Ae=C.replace(/^rotate /,""),he=`${l}-icon-anim-${Ae}`,J=sn(Zt(lc($,M,_,A,m,P,I,v),n)),Ze=sn(Zt(lc(V,ee,T,j,K,ce,se,S),n)),Fe=ac(_,A,`${l}-question`,`${l}-text-tight-leading`),Qe=ac(T,j,`${l}-answer-text`,`${l}-text-tight-leading`),Xe=sc(_,A,l,n),nt=sc(T,j,l,n),et=z.buildColorVars(l,{questionColor:v,answerColor:S,dividerColor:H,iconColor:N,questionHoverColor:U,iconHoverColor:O,iconActiveColor:R,dividerHoverColor:B},Ov,Dv),Be=r&&r!=="default"?`${l}-state-${r}`:"",fe=s.useCallback(Je=>{de&&Q(Ce=>{if(Ce.has(Je)){const qe=new Set(Ce);return qe.delete(Je),qe}if(f==="on")return new Set([Je]);const De=new Set(Ce);return De.add(Je),De})},[de,f]),He=s.useMemo(()=>zv(l),[l]),ze={[`--${l}-divider-width`]:z.scalingValue(p,n??!1),[`--${l}-divider-style`]:w,[`--${l}-icon-max-width`]:z.scalingValue(y,n??!1),...u>0?{[`--${l}-question-min-height`]:z.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:et,children:a.jsx("div",{className:xt(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,Be),style:{width:z.scalingValue(c,n??!1),maxWidth:"100%",...ze},children:ye.map((Je,Ce)=>{var Ie;const De=ie(Ce),qe=((Ie=Je.question)==null?void 0:Ie.trim())??"",ge=Je.answer,Pe=((ge==null?void 0:ge.length)??0)>0,je=d&&Ce===L;return a.jsxs("div",{className:xt(`${l}-item`,De&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[je&&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(G),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ne(Ee),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:{...J,...Xe,paddingLeft:ne(k),paddingRight:ne(b)},onClick:()=>fe(Ce),children:[ae>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ne(ae)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Fe,children:qe}),Pe&&(te?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${he}`,"aria-hidden":"true",children:a.jsx(ln,{url:D,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"})]}),je&&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)}})]}),Pe&&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:[je&&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(F),"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(X),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ne(we),height:"100%"}})]}),xe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(xe)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ze,...nt,paddingLeft:ne(le),paddingRight:ne(Z)},children:a.jsx("div",{className:Qe,children:a.jsx(Ii,{content:ge})})}),Ne>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ne(Ne)}}),je&&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(g)}})]})})})]},Ce)})})})]})}const Vv=`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 Xn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const lc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vv=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Gv={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:Xn("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:{...lc.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:{...lc.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:Xn("Question Padding Left"),questionPaddingTop:Xn("Question Padding Top"),questionPaddingBottom:Xn("Question Padding Bottom"),answerPaddingLeft:Xn("Answer Padding Left"),answerPaddingRight:Xn("Answer Padding Right"),answerPaddingTop:Xn("Answer Padding Top"),answerPaddingBottom:Xn("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:[...Vv],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},qv={element:zv,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:Gv,sourceCode:Bv},jn=e=>e.display==="cover",ca=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},cc=100,Xv=.2,dc=8,au=({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"?cc:Math.max(cc,window.innerHeight*Xv),[]),b=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),g=s.useCallback($=>{const R=typeof window<"u"?window.innerHeight:800,k=Math.max(.88,1-$/R*.12);return`translateY(${$}px) scale(${k})`},[]),h=s.useCallback(()=>{c.current=null},[]),f=s.useCallback(()=>{d(!0),r(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),x=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;d(!0),r($),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),S=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(c.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),y=s.useCallback($=>{const R=c.current;if(!e||!R||$.pointerType!=="touch"||R.pointerId!==$.pointerId)return;const k=$.clientX-R.startX,T=$.clientY-R.startY;if(R.isLocked===null){if(Math.abs(k)<dc&&Math.abs(T)<dc)return;if(T>0&&T>Math.abs(k))R.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{R.isLocked=!1,h();return}}if(!R.isLocked)return;$.preventDefault();const m=Math.max(0,T);u.current=m,r(m)},[e,h]),w=s.useCallback($=>{const R=c.current;if(!e||!R||$.pointerType!=="touch"||R.pointerId!==$.pointerId)return;const k=R.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!k){h();return}$.clientY-R.startY>=p?x():f()},[p,x,e,h,f]),H=s.useCallback($=>{w($)},[w]),N=s.useCallback($=>{w($)},[w]),U=o>0,O=l?`transform ${n}ms ease`:"none",C=l?`opacity ${n}ms ease`:"none",V=o>0||l;return{isSwipeDragging:U,backdropStyle:{opacity:b(o),transition:C},mediaAreaStyle:{transform:g(o),transition:O,touchAction:U?"none":void 0,willChange:U?"transform":void 0},overlayContentStyle:V?{opacity:v(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:S,onPointerMove:y,onPointerUp:H,onPointerCancel:N}:{},dismissAreaStyle:e?{touchAction:U?"none":"pan-x"}:void 0}},Uv="[data-lightbox-scrollable]",su=()=>{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(Uv)||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"})}},[])},Yv=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Kv=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Zv=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Jv=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,f)=>{Kv(t),e.scrollLeft=h,f&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,b=0;const v=()=>{t.removeEventListener("transitionend",g),clearTimeout(b)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",g),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${c}px, 0, 0)`,b=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-Zv(t),!1))}},Po=300,Qv=900,e0=1500,t0="cubic-bezier(0.16, 1, 0.3, 1)",n0=3e3,i0=2,o0=16,r0=.05,a0=1,hr=.3,s0=50,l0=20,Ai=.004,ao=["title1","title2","title3"],c0={title1:"1",title2:"2",title3:"3"},d0={title1:"title1Color",title2:"title2Color",title3:"title3Color"},u0={title1:.02,title2:.02,title3:.02},fr=e=>`max(${e}, ${l0}px)`,p0=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]}},m0=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=p0(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,g0=e=>[Gt(e,"fontFamily"),Gt(e,"fontSettings"),{type:"row",items:[Gt(e,"fontSize"),Gt(e,"lineHeight"),Gt(e,"letterSpacing"),Gt(e,"wordSpacing")]},Gt(e,"textAlign"),Gt(e,"textAppearance")],h0=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ao.map(e=>[c0[e],g0(e)]))}),nl=(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},lu=(e,t)=>nl(e,t),yr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},uc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:nl(e.length,n),effective:lu(e.length,n)}},f0=(e,t,n,i,o,r,l)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},Fa=(e,t)=>{const n=i=>{const o=Gt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[d0[t]]}},y0=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),_a=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??u0[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Yt(i,n)},v0=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:b,closeIcon:v,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:f,thumbnailTrigger:x,thumbnailVisibility:S,thumbnailObjectFit:y,thumbnailActive:w,thumbnailActiveColor:H,title1Width:N,title2Width:U,title3Width:O,title1MarginLeft:C=0,title2MarginLeft:V=0,title3MarginLeft:$=0,titleRowMarginBottom:R=0,titleHeaderLayout:k="desktop",contentMarginTop:T,iconMarginLeft:m}=n,M=L=>D.scalingValue(L,i??!1),E=c??n.thumnailSize??.03,z=M(E),ne=M(u),I=M(p??.02),W=M(b??0),K=M(T??0),ae=fr(K),de=M(m??0),[A,he]=s.useState(0),q=s.useRef(A);q.current=A;const ce=t[A],{title1:Q,title2:be,title3:He}=m0(ce),xe=_a("title1",Fa(n,"title1"),i),le=_a("title2",Fa(n,"title2"),i),ee=_a("title3",Fa(n,"title3"),i),ue=k==="mobile",oe=!o&&(!i||r),Fe=oe,Ce=oe,P=oe,Y=jn(y),X=Y?{"--image-aspect-ratio":ca(y)}:void 0,ie=!!(Q||be||He),j=s.useMemo(()=>f0(e,Q,be,He,xe,le,ee),[e,A,Q,be,He,xe,le,ee]),B=s.useMemo(()=>({title1Width:N,title2Width:U,title3Width:O}),[N,U,O]),J=s.useMemo(()=>j.map(L=>B[L.widthKey]),[j,B]),te=s.useMemo(()=>nl(j.length,J),[j.length,J]),$e=s.useMemo(()=>lu(j.length,J),[j.length,J]),ye=s.useMemo(()=>j.filter(L=>L.prefix==="title1"),[j]),F=s.useMemo(()=>j.filter(L=>L.prefix==="title2"||L.prefix==="title3"),[j]),ve=s.useMemo(()=>uc(ye,B),[ye,B]),pe=s.useMemo(()=>uc(F,B),[F,B]),Z=s.useCallback((L,re)=>{const fe=j.indexOf(L);if(!ue||re==="single-row")return{effectiveWidth:$e[fe]??0,resolvedWidth:te[fe]??0,maxWidth:yr(fe,te)};if(re==="two-row-top"){const Ue=ye.indexOf(L);return{effectiveWidth:ve.effective[Ue]??0,resolvedWidth:ve.resolved[Ue]??0,maxWidth:yr(Ue,ve.resolved)}}const ke=F.indexOf(L);return{effectiveWidth:pe.effective[ke]??0,resolvedWidth:pe.resolved[ke]??0,maxWidth:yr(ke,pe.resolved)}},[F,pe,$e,te,j,ye,ve,ue]),me=s.useCallback(L=>D.scalingValue(L,i??!1),[i]),De=me(R??0),ge=s.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:V,title3MarginLeft:$}),[C,V,$]),G=s.useCallback(L=>j.slice(0,L+1).reduce((re,fe,ke)=>re+(fe!=null&&fe.marginLeftKey?ge[fe.marginLeftKey]??0:0)+(te[ke]??0),0)+(ue?0:C??0),[j,ge,te,ue,C]),Me=s.useCallback(()=>ue?0:C??0,[ue,C]),_e=s.useCallback(L=>F.slice(0,L).reduce((re,fe,ke)=>re+(fe.marginLeftKey?ge[fe.marginLeftKey]??0:0)+(pe.resolved[ke]??0),0),[F,pe.resolved,ge]),rt=s.useCallback(L=>{const re=F[L];return _e(L)+(re.marginLeftKey?ge[re.marginLeftKey]??0:0)+(pe.resolved[L]??0)},[F,pe.resolved,_e,ge]),Je=(L,re)=>{const fe=L.marginLeftKey?ge[L.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ue,maxWidth:ot}=Z(L,re),St=o&&re==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":L.prefix,style:{...re==="single-row"?{gridArea:L.prefix}:{},width:me(ke),...fe>0?{marginLeft:me(fe)}:{}},children:[a.jsx("p",{className:L.className,style:L.style,children:L.text}),St&&L.marginLeftKey&&a.jsx("div",{"data-controls":L.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:me(-fe),width:`max(${me(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),St&&a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:me(-Ai/2),width:me(Ai),height:"100%",pointerEvents:"auto"}})]},L.className)},at=()=>{const L=ue?-1:j.findIndex(ke=>ke.prefix==="title1"),re=!ue&&(o||(C??0)>0)?(()=>{const ke=C??0,Ue=L>=0?te[L]:N??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:0,width:`max(${me(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,fe=j.flatMap((ke,Ue)=>{if(!ke.marginLeftKey)return[];const ot=ge[ke.marginLeftKey]??0,St=y0(j,te,ge,Ue)+Me();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(te[Ue]),style:{position:"absolute",top:0,left:me(St),width:`max(${me(ot)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return re?[re,...fe]:fe},it=()=>j.map((L,re)=>{const fe=yr(re,te),Ue=G(re)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:me(Ue),width:me(Ai),height:"100%",pointerEvents:"auto"}})},`${L.widthKey}-junction`)}),je=()=>F.flatMap((L,re)=>{if(!L.marginLeftKey)return[];const fe=ge[L.marginLeftKey]??0,ke=_e(re),{resolvedWidth:Ue}=Z(L,"two-row-bottom");return a.jsx("div",{"data-controls":L.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:me(ke),width:`max(${me(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}},L.marginLeftKey)}),Se=()=>F.map((L,re)=>{const{maxWidth:fe}=Z(L,"two-row-bottom"),Ue=rt(re)-Ai/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":L.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:me(Ue),width:me(Ai),height:"100%",pointerEvents:"auto"}})},`${L.widthKey}-junction`)}),We=s.useRef(null),Be=s.useRef(null),Ze=s.useRef(null),Le=s.useRef(null),Ve=s.useRef([]),se=s.useRef([]),Te=s.useRef(0),Xe=s.useRef(null),ze=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Re=s.useRef(null),Pe=s.useRef(null),Ae=s.useRef(0),Ke=s.useRef("forward"),Oe=s.useRef(0),Qe=s.useRef(null),tt=s.useRef(!1),nt=t.length>1&&(!o||!!r),xt=nt?3:1,It=s.useMemo(()=>Array.from({length:xt},()=>t).flat(),[t,xt]),[Tt,ut]=s.useState(!1),[ft,Et]=s.useState(!1),[Lt,bt]=s.useState(!0),Nt=s.useRef(null),Bt=s.useRef(null),Zt=s.useRef(!1),en=s.useRef(!1),Rt=s.useRef(null),Ot=s.useRef(null),nn=Fe&&!Lt,pt=s.useCallback(()=>{Fe&&(bt(!0),Ot.current&&clearTimeout(Ot.current),Ot.current=setTimeout(()=>{ze.current.isActive||bt(!1)},n0))},[Fe]),Ee=s.useCallback(()=>{o||en.current||(en.current=!0,Et(!1),Rt.current=setTimeout(()=>{l()},Po))},[o,l]),qe=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:D.scalingValue(g??0,i),height:D.scalingValue(g??0,i),marginRight:de,"--close-icon-hover-color":f},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ee,"aria-label":"Close",children:a.jsx(ln,{url:v,fill:h,hoverFill:i&&!r?h:f,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:de,height:"100%",pointerEvents:"auto"}})]}),st=(L="two-row")=>a.jsx("div",{...L==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:me(C??0),flexShrink:0,...L==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...L==="two-row"&&o?{pointerEvents:"auto"}:{}}}),mt=()=>{const L=j.find(ke=>ke.prefix==="title1"),re=j.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),fe=re.length>0||o||(R??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?st():null,L&&Je(L,"two-row-top"),v&&qe()]}),fe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[re.map(ke=>Je(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[je(),Se()]})]}):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:De,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},vt=()=>a.jsxs(a.Fragment,{children:[(C??0)>0||o?st("single-row"):null,j.map(L=>Je(L,"single-row")),o?a.jsxs(a.Fragment,{children:[at(),it()]}):null,v?qe():null]}),Mt=s.useCallback(L=>!!(L.closest("[data-controls]")||L.closest(`.${e}-thumbnails`)||L.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:gt,backdropStyle:Vt,mediaAreaStyle:Wt,overlayContentStyle:_t,swipeHandlers:qt,dismissAreaStyle:Xt}=au({enabled:oe??!1,onClose:Ee,animMs:Po,isBlockedTarget:Mt}),Dt=()=>{if(!nt||t.length===0)return Te.current=0,0;const L=se.current[0],re=se.current[t.length];if(!L||!re)return Te.current;const fe=re.offsetLeft-L.offsetLeft;return fe>0&&(Te.current=fe),Te.current},jt=(L=!1)=>{if(!nt)return;const re=Be.current,fe=Dt();!re||fe<=0||fe<re.clientWidth*.25||(re.scrollLeft<=0?(re.scrollLeft+=fe,L&&(ze.current.scrollLeft+=fe),tt.current&&(Oe.current+=fe)):re.scrollLeft>=fe*2&&(re.scrollLeft-=fe,L&&(ze.current.scrollLeft-=fe),tt.current&&(Oe.current-=fe)))},Ht=(L,re=(fe=>(fe=Be.current)==null?void 0:fe.scrollLeft)()??0)=>{if(!nt)return L;let ke=t.length+L,Ue=1/0;for(let ot=0;ot<xt;ot++){const St=ot*t.length+L,kt=se.current[St];if(!kt)continue;const tn=Math.abs(kt.offsetLeft-re);tn<Ue&&(Ue=tn,ke=St)}return ke},$t=L=>{const re=Be.current;return!L||!re?!1:L.offsetWidth>re.clientWidth+1},_=L=>{const re=Be.current;if(!L||!re||!$t(L))return!1;const fe=L.offsetLeft,ke=fe+L.offsetWidth;return re.scrollLeft>=fe-1&&re.scrollLeft+re.clientWidth<=ke+1},Ie=(L=(re=>(re=Be.current)==null?void 0:re.scrollLeft)()??0)=>{for(let ke=0;ke<se.current.length;ke+=1){const Ue=se.current[ke];if(Ue&&_(Ue))return ke}let fe={flatIndex:0,distance:1/0};return se.current.forEach((ke,Ue)=>{if(!ke)return;const ot=Math.abs(ke.offsetLeft-L);ot<fe.distance&&(fe={flatIndex:Ue,distance:ot})}),fe.flatIndex},Ne=L=>{Be.current&&se.current.forEach(re=>{re&&(re.style.scrollSnapAlign=$t(re)&&L==="backward"?"end":"start")})},Ge=(L,re,fe)=>{const ke=L-re,Ue=Ie(re),ot=se.current[Ue];if(_(ot))return Ie(L)%t.length;const St=se.current[Ue+1],kt=ot?St?St.offsetLeft-ot.offsetLeft:ot.offsetWidth:0,tn=kt>0?ke>kt*hr?1:ke<-kt*hr?-1:0:0;return tn===0?fe:nt?(fe+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,fe+tn))},dt=s.useCallback((L=!1)=>{if(S!=="on"||o)return;const re=Le.current,fe=q.current,ke=Ve.current[fe];if(!re||!ke||re.scrollWidth<=re.clientWidth)return;const Ue=re.scrollLeft,ot=Ue+re.clientWidth,St=ke.offsetLeft,kt=St+ke.offsetWidth;if(St>=Ue&&kt<=ot)return;const tn=re.scrollWidth-re.clientWidth;let Jt=Ue;if(!L&&Nt.current===null){const Mi=Ve.current[fe-1],yo=Ve.current[fe+1],rr=Mi?ke.offsetLeft-Mi.offsetLeft:yo?yo.offsetLeft-ke.offsetLeft:ke.offsetWidth;kt>ot?Jt+=rr:St<Ue&&(Jt-=rr)}else kt>ot?Jt=kt-re.clientWidth:Jt=St;re.scrollLeft=Math.max(0,Math.min(tn,Jt))},[o,S]),Ft=s.useCallback((L=!1)=>{L&&(Zt.current=!0),Bt.current===null&&(Bt.current=requestAnimationFrame(()=>{Bt.current=null;const re=Zt.current;Zt.current=!1,dt(re)}))},[dt]),lt=s.useCallback(L=>{if(L===q.current)return;const re=q.current;q.current=L;const fe=Math.abs(L-re)>1,ke=nt&&t.length>1&&(re===t.length-1&&L===0||re===0&&L===t.length-1);he(L),Ft(fe||ke)},[t.length,nt,Ft]),wt=()=>{if(!Be.current||t.length===0||Nt.current!==null||ze.current.isActive&&ze.current.hasMoved)return;const L=Be.current.scrollLeft,re=Ie(L)%t.length;re!==q.current&&lt(re)},zt=()=>{Nt.current=null},Pt=L=>{const re=Be.current;re&&(re.style.scrollSnapType=L?"":"none")},on=()=>{var L;(L=Pe.current)==null||L.call(Pe),Pe.current=null},pn=()=>{Qe.current!==null&&(cancelAnimationFrame(Qe.current),Qe.current=null),tt.current=!1},ci=()=>{const L=Be.current;if(!L){Qe.current=null,tt.current=!1;return}const re=Oe.current-L.scrollLeft;if(Math.abs(re)<.5){L.scrollLeft=Oe.current,jt(),wt(),Qe.current=null,tt.current=!1;return}L.scrollLeft+=re*r0,jt(),wt(),pt(),Qe.current=requestAnimationFrame(ci)},di=()=>{const L=Ze.current;L&&(L.style.transition="",L.style.transform="",L.style.willChange="")},tr=(L,re,fe,ke)=>{di(),L.scrollLeft=re,Ae.current=L.scrollLeft,jt(),fe!==void 0?(q.current=fe,he(fe)):wt(),Pt(!0),ke==null||ke()},nr=(L,{behavior:re="smooth",activeIndex:fe,onComplete:ke}={})=>{const Ue=Be.current,ot=Ze.current;if(!Ue||!ot)return;if(pn(),on(),Pt(!1),re==="auto"){tr(Ue,L,fe,ke);return}const St=Math.abs(L-Ue.scrollLeft),kt=Yv(St,Qv,e0,Ue.clientWidth*.55);Pe.current=Jv(Ue,ot,L,{duration:kt,easing:t0,onComplete:()=>{Pe.current=null,tr(Ue,L,fe,ke)}})},ua=(L="smooth")=>{const re=Be.current;if(!re||t.length===0)return;const fe=Ie()%t.length,ke=Ht(fe,re.scrollLeft),Ue=se.current[ke];Ue&&nr(Ue.offsetLeft,{behavior:L,activeIndex:fe})},pa=(L,re="smooth",fe,ke)=>{const Ue=Be.current;if(!Ue||t.length===0)return;const ot=(ke??Ue.scrollLeft)-L,St=Ie(L),kt=se.current[St];if(_(kt)){Pt(!0),wt();return}const tn=se.current[St+1],Jt=kt?tn?tn.offsetLeft-kt.offsetLeft:kt.offsetWidth:0;if((Jt>0?ot>Jt*hr?1:ot<-Jt*hr?-1:0:0)!==0){const Nu=fe??St%t.length,Hu=Ge(ke??Ue.scrollLeft,L,Nu);Tn(Hu,re);return}const yo=ke??Ue.scrollLeft,rr=Ie(yo),al=se.current[rr];if(al&&Math.abs(al.offsetLeft-yo)<1){Pt(!0),wt();return}ua("auto")},Tn=(L,re="smooth")=>{const fe=Be.current;if(!fe||t.length===0)return;const ke=Ht(L,fe.scrollLeft),Ue=se.current[ke];Ue&&(re==="smooth"?Nt.current=L:Nt.current=null,q.current=L,he(L),Ft(!0),nr(Ue.offsetLeft,{behavior:re,activeIndex:L,onComplete:re==="smooth"?zt:void 0}))},Ei=()=>{Re.current&&(window.removeEventListener("pointerup",Re.current),window.removeEventListener("pointercancel",Re.current),Re.current=null)},ir=(L,re,fe,ke,Ue)=>{const ot=fe-L,St=ke-re,kt=Math.abs(ot),tn=Math.abs(St);if(kt<s0||kt<=tn)return!1;const Jt=ot<0?1:-1,Mi=nt?(Ue+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ue+Jt));return Mi===Ue?!1:(Tn(Mi),!0)},ui=L=>{if(!ze.current.isActive)return;Ei();const re=Be.current;if(!re)return;const{scrollLeft:fe,startActiveIndex:ke,hasMoved:Ue}=ze.current,ot=re.scrollLeft;jt(!0),ze.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ut(!1),L!==void 0&&re.hasPointerCapture(L)&&re.releasePointerCapture(L),Ue?pa(fe,"smooth",ke,ot):(Pt(!0),wt()),pt()},or=(L,re)=>{const fe=Xe.current;Xe.current=null,fe&&(ir(fe.startX,fe.startY,L,re,fe.startActiveIndex),pt())},ma=L=>{if(!Ce)return;if(L.pointerType==="touch"){if(pn(),Pt(!0),Mt(L.target))return;Xe.current={startX:L.clientX,startY:L.clientY,startActiveIndex:q.current};return}if(L.pointerType!=="mouse"||L.button!==0||Mt(L.target))return;const re=Be.current;if(!re)return;pn(),on(),di(),Nt.current=null,ze.current={isActive:!0,startX:L.clientX,scrollLeft:re.scrollLeft,startActiveIndex:q.current,hasMoved:!1},Pt(!1),pt(),re.setPointerCapture(L.pointerId),Ei();const fe=ke=>{ke.pointerType==="mouse"&&ui(ke.pointerId)};Re.current=fe,window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},ga=L=>{if(!Ce||L.pointerType!=="mouse")return;const re=Be.current;if(!re||!ze.current.isActive)return;if(L.buttons===0){ui(L.pointerId);return}const fe=L.clientX-ze.current.startX;Math.abs(fe)>a0&&(ze.current.hasMoved=!0,ut(!0)),ze.current.hasMoved&&(L.preventDefault(),re.scrollLeft=ze.current.scrollLeft-fe,jt(!0),wt(),pt())},we=L=>{if(Ce){if(L.pointerType==="touch"){L.type==="pointerup"?or(L.clientX,L.clientY):Xe.current=null;return}L.pointerType==="mouse"&&ui(L.pointerId)}},Ye=L=>{!Ce||L.pointerType!=="mouse"||ui(L.pointerId)};return su(),s.useEffect(()=>{const L=requestAnimationFrame(()=>Et(!0));return()=>{cancelAnimationFrame(L),on(),Ei(),Bt.current!==null&&(cancelAnimationFrame(Bt.current),Bt.current=null),Rt.current&&clearTimeout(Rt.current),Ot.current&&clearTimeout(Ot.current)}},[]),s.useEffect(()=>{if(!Fe){bt(!0);return}pt();const L=()=>pt();return document.addEventListener("pointermove",L,{passive:!0}),document.addEventListener("pointerdown",L,{passive:!0}),()=>{document.removeEventListener("pointermove",L),document.removeEventListener("pointerdown",L),Ot.current&&clearTimeout(Ot.current)}},[Fe,pt]),s.useEffect(()=>{const L=re=>{re.key==="Escape"&&Ee()};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[Ee]),s.useLayoutEffect(()=>{Dt()},[W,t.length,nt]),s.useLayoutEffect(()=>{o||Tn(q.current,"auto")},[W,o]),s.useLayoutEffect(()=>{Tn(0,"auto")},[t.length,nt]),s.useEffect(()=>{const L=Be.current;if(!L||o||!oe)return;const re=fe=>{if(fe.preventDefault(),Math.abs(fe.deltaY)<=Math.abs(fe.deltaX))return;const ke=fe.deltaMode===1?o0:fe.deltaMode===2?L.clientHeight:1,Ue=fe.deltaY*ke*i0;if(Ue!==0){if(on(),tt.current||(tt.current=!0,Oe.current=L.scrollLeft,Nt.current=null,Pt(!1)),Oe.current+=Ue,!nt){const ot=L.scrollWidth-L.clientWidth;Oe.current=Math.max(0,Math.min(ot,Oe.current))}pt(),Qe.current===null&&(Qe.current=requestAnimationFrame(ci))}};return L.addEventListener("wheel",re,{passive:!1}),()=>{L.removeEventListener("wheel",re),pn()}},[o,oe,nt]),s.useEffect(()=>{const L=Be.current;if(!L)return;const re=()=>{jt(ze.current.isActive);const ke=L.scrollLeft,Ue=ke-Ae.current;Ae.current=ke;const ot=Te.current>0?Te.current*.5:1/0;if(Ue!==0&&Math.abs(Ue)<ot){const St=Ue>0?"forward":"backward";St!==Ke.current&&(Ke.current=St,Ne(St))}ze.current.isActive&&ze.current.hasMoved||wt()};L.addEventListener("scroll",re,{passive:!0});const fe=new ResizeObserver(()=>{Dt(),jt(ze.current.isActive),Ne(Ke.current),wt()});return fe.observe(L),()=>{on(),L.removeEventListener("scroll",re),fe.disconnect()}},[t.length,nt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{gt||Ee()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:ft?1:0,transition:`opacity ${Po}ms ease`,pointerEvents:ft?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Vt}}),a.jsxs("div",{ref:We,className:`${e}-lightbox-dismiss-area`,style:Xt,...qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Wt,onClick:L=>L.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ce&&t.length>0?"true":"false","data-mouse-dragging":Tt?"true":"false",onPointerDown:ma,onPointerMove:ga,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:W},children:It.map((L,re)=>{const fe=L.image.objectFit??"contain",ke=re%t.length,Ue=Math.floor(re/t.length),ot=fr(W),St=`calc(-0.5 * (${ot} + ${W}))`;return a.jsxs("div",{ref:kt=>se.current[re]=kt,className:`${e}-strip-item`,style:{height:k==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:L.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:fe}}),o&&ke<t.length-1&&Ue===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:St,width:ot,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ue}-${L.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:_t,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:ae,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${ue?` ${e}-lightbox-content-area-stacked`:""}`,children:(ie||v)&&a.jsx("div",{className:`${e}-header ${ue?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ue?mt():ie||v?vt():null})})})]}),t.length>1&&S==="on"&&(()=>{const L=fr(I),re=`calc(-0.5 * (${I} + ${L}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:I},children:a.jsx("div",{ref:Le,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:fe=>fe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:ne,"--thumbnail-active-color":H},children:[t.map((fe,ke)=>{const Ue=fr(ne),ot=`calc(-0.5 * (${Ue} + ${ne}))`;return a.jsxs("div",{ref:St=>{Ve.current[ke]=St},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":A===ke?"true":"false",onClick:()=>oe&&x==="click"&&Tn(ke),onMouseEnter:()=>P&&x==="hover"&&Tn(ke),"aria-label":fe.image.name?`View ${fe.image.name}`:`View image ${ke+1}`,"aria-current":A===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Y?` ${e}-thumb-image-cover`:""}`,src:fe.image.url,alt:"",draggable:!1,style:{...X,maxWidth:z,maxHeight:z,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.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:ot,width:Ue,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${fe.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:re,height:L,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function x0(e){return`
14318
+ `;function Un(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const cc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Gv=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],qv={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:Un("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:{...cc.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:{...cc.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:Un("Question Padding Left"),questionPaddingTop:Un("Question Padding Top"),questionPaddingBottom:Un("Question Padding Bottom"),answerPaddingLeft:Un("Answer Padding Left"),answerPaddingRight:Un("Answer Padding Right"),answerPaddingTop:Un("Answer Padding Top"),answerPaddingBottom:Un("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:[...Gv],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Xv={element:Bv,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:qv,sourceCode:Vv},zn=e=>e.display==="cover",ca=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},dc=100,Uv=.2,uc=8,lu=({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"?dc:Math.max(dc,window.innerHeight*Uv),[]),w=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),x=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),f=s.useCallback($=>{const M=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-$/M*.12);return`translateY(${$}px) scale(${_})`},[]),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]),v=s.useCallback($=>{const M=c.current;if(!e||!M||$.pointerType!=="touch"||M.pointerId!==$.pointerId)return;const _=$.clientX-M.startX,A=$.clientY-M.startY;if(M.isLocked===null){if(Math.abs(_)<uc&&Math.abs(A)<uc)return;if(A>0&&A>Math.abs(_))M.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{M.isLocked=!1,h();return}}if(!M.isLocked)return;$.preventDefault();const m=Math.max(0,A);u.current=m,r(m)},[e,h]),S=s.useCallback($=>{const M=c.current;if(!e||!M||$.pointerType!=="touch"||M.pointerId!==$.pointerId)return;const _=M.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!_){h();return}$.clientY-M.startY>=p?b():y()},[p,b,e,h,y]),H=s.useCallback($=>{S($)},[S]),N=s.useCallback($=>{S($)},[S]),U=o>0,O=l?`transform ${n}ms ease`:"none",R=l?`opacity ${n}ms ease`:"none",B=o>0||l;return{isSwipeDragging:U,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:f(o),transition:O,touchAction:U?"none":void 0,willChange:U?"transform":void 0},overlayContentStyle:B?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:C,onPointerMove:v,onPointerUp:H,onPointerCancel:N}:{},dismissAreaStyle:e?{touchAction:U?"none":"pan-x"}:void 0}},Yv="[data-lightbox-scrollable]",cu=()=>{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(Yv)||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"})}},[])},Kv=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Zv=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Jv=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Qv=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,y)=>{Zv(t),e.scrollLeft=h,y&&(r==null||r())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,w=0;const x=()=>{t.removeEventListener("transitionend",f),clearTimeout(w)},f=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",f),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)`,w=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Jv(t),!1))}},ko=300,e0=900,t0=1500,n0="cubic-bezier(0.16, 1, 0.3, 1)",i0=3e3,o0=2,r0=16,a0=.05,s0=1,hr=.3,l0=50,c0=20,Fi=.004,lo=["title1","title2","title3"],d0={title1:"1",title2:"2",title3:"3"},u0={title1:"title1Color",title2:"title2Color",title3:"title3Color"},p0={title1:.02,title2:.02,title3:.02},fr=e=>`max(${e}, ${c0}px)`,m0=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]}},g0=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=m0(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},qt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,h0=e=>[qt(e,"fontFamily"),qt(e,"fontSettings"),{type:"row",items:[qt(e,"fontSize"),qt(e,"lineHeight"),qt(e,"letterSpacing"),qt(e,"wordSpacing")]},qt(e,"textAlign"),qt(e,"textAppearance")],f0=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(lo.map(e=>[d0[e],h0(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},du=(e,t)=>il(e,t),yr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},pc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:il(e.length,n),effective:du(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},Fa=(e,t)=>{const n=i=>{const o=qt(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]]}},v0=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),_a=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??p0[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Zt(i,n)},x0=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:w,closeIcon:x,closeIconMaxWidth:f,closeIconColor:h,closeIconHoverColor:y,thumbnailTrigger:b,thumbnailVisibility:C,thumbnailObjectFit:v,thumbnailActive:S,thumbnailActiveColor:H,title1Width:N,title2Width:U,title3Width:O,title1MarginLeft:R=0,title2MarginLeft:B=0,title3MarginLeft:$=0,titleRowMarginBottom:M=0,titleHeaderLayout:_="desktop",contentMarginTop:A,iconMarginLeft:m}=n,P=E=>z.scalingValue(E,i??!1),I=c??n.thumnailSize??.03,V=P(I),ee=P(u),T=P(p??.02),j=P(w??0),K=P(A??0),ce=fr(K),se=P(m??0),[k,ae]=s.useState(0),q=s.useRef(k);q.current=k;const le=t[k],{title1:Z,title2:xe,title3:Ne}=g0(le),ye=_a("title1",Fa(n,"title1"),i),ue=_a("title2",Fa(n,"title2"),i),Q=_a("title3",Fa(n,"title3"),i),de=_==="mobile",ne=!o&&(!i||r),Ee=ne,Te=ne,Oe=ne,ve=zn(v),we=ve?{"--image-aspect-ratio":ca(v)}:void 0,$e=!!(Z||xe||Ne),g=s.useMemo(()=>y0(e,Z,xe,Ne,ye,ue,Q),[e,k,Z,xe,Ne,ye,ue,Q]),G=s.useMemo(()=>({title1Width:N,title2Width:U,title3Width:O}),[N,U,O]),F=s.useMemo(()=>g.map(E=>G[E.widthKey]),[g,G]),X=s.useMemo(()=>il(g.length,F),[g.length,F]),me=s.useMemo(()=>du(g.length,F),[g.length,F]),Y=s.useMemo(()=>g.filter(E=>E.prefix==="title1"),[g]),L=s.useMemo(()=>g.filter(E=>E.prefix==="title2"||E.prefix==="title3"),[g]),ie=s.useMemo(()=>pc(Y,G),[Y,G]),oe=s.useMemo(()=>pc(L,G),[L,G]),D=s.useCallback((E,re)=>{const pe=g.indexOf(E);if(!de||re==="single-row")return{effectiveWidth:me[pe]??0,resolvedWidth:X[pe]??0,maxWidth:yr(pe,X)};if(re==="two-row-top"){const Ue=Y.indexOf(E);return{effectiveWidth:ie.effective[Ue]??0,resolvedWidth:ie.resolved[Ue]??0,maxWidth:yr(Ue,ie.resolved)}}const ke=L.indexOf(E);return{effectiveWidth:oe.effective[ke]??0,resolvedWidth:oe.resolved[ke]??0,maxWidth:yr(ke,oe.resolved)}},[L,oe,me,X,g,Y,ie,de]),te=s.useCallback(E=>z.scalingValue(E,i??!1),[i]),Ae=te(M??0),he=s.useMemo(()=>({title1MarginLeft:R,title2MarginLeft:B,title3MarginLeft:$}),[R,B,$]),J=s.useCallback(E=>g.slice(0,E+1).reduce((re,pe,ke)=>re+(pe!=null&&pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(X[ke]??0),0)+(de?0:R??0),[g,he,X,de,R]),Ze=s.useCallback(()=>de?0:R??0,[de,R]),Fe=s.useCallback(E=>L.slice(0,E).reduce((re,pe,ke)=>re+(pe.marginLeftKey?he[pe.marginLeftKey]??0:0)+(oe.resolved[ke]??0),0),[L,oe.resolved,he]),Qe=s.useCallback(E=>{const re=L[E];return Fe(E)+(re.marginLeftKey?he[re.marginLeftKey]??0:0)+(oe.resolved[E]??0)},[L,oe.resolved,Fe,he]),Xe=(E,re)=>{const pe=E.marginLeftKey?he[E.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ue,maxWidth:st}=D(E,re),St=o&&re==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":E.prefix,style:{...re==="single-row"?{gridArea:E.prefix}:{},width:te(ke),...pe>0?{marginLeft:te(pe)}:{}},children:[a.jsx("p",{className:E.className,style:E.style,children:E.text}),St&&E.marginLeftKey&&a.jsx("div",{"data-controls":E.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:te(-pe),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),St&&a.jsx("div",{"data-controls":E.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(-Fi/2),width:te(Fi),height:"100%",pointerEvents:"auto"}})]},E.className)},nt=()=>{const E=de?-1:g.findIndex(ke=>ke.prefix==="title1"),re=!de&&(o||(R??0)>0)?(()=>{const ke=R??0,Ue=E>=0?X[E]:N??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:0,width:`max(${te(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,pe=g.flatMap((ke,Ue)=>{if(!ke.marginLeftKey)return[];const st=he[ke.marginLeftKey]??0,St=v0(g,X,he,Ue)+Ze();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(X[Ue]),style:{position:"absolute",top:0,left:te(St),width:`max(${te(st)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return re?[re,...pe]:pe},et=()=>g.map((E,re)=>{const pe=yr(re,X),Ue=J(re)-Fi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":E.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(Ue),width:te(Fi),height:"100%",pointerEvents:"auto"}})},`${E.widthKey}-junction`)}),Be=()=>L.flatMap((E,re)=>{if(!E.marginLeftKey)return[];const pe=he[E.marginLeftKey]??0,ke=Fe(re),{resolvedWidth:Ue}=D(E,"two-row-bottom");return a.jsx("div",{"data-controls":E.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:te(ke),width:`max(${te(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},E.marginLeftKey)}),fe=()=>L.map((E,re)=>{const{maxWidth:pe}=D(E,"two-row-bottom"),Ue=Qe(re)-Fi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":E.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(Ue),width:te(Fi),height:"100%",pointerEvents:"auto"}})},`${E.widthKey}-junction`)}),He=s.useRef(null),ze=s.useRef(null),Je=s.useRef(null),Ce=s.useRef(null),De=s.useRef([]),qe=s.useRef([]),ge=s.useRef(0),Pe=s.useRef(null),je=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Ie=s.useRef(null),be=s.useRef(null),Le=s.useRef(0),Ye=s.useRef("forward"),_e=s.useRef(0),it=s.useRef(null),ot=s.useRef(!1),rt=t.length>1&&(!o||!!r),ht=rt?3:1,It=s.useMemo(()=>Array.from({length:ht},()=>t).flat(),[t,ht]),[Et,dt]=s.useState(!1),[mt,$t]=s.useState(!1),[Tt,ft]=s.useState(!0),Ft=s.useRef(null),Ht=s.useRef(null),Ot=s.useRef(!1),Kt=s.useRef(!1),Ct=s.useRef(null),Dt=s.useRef(null),tn=Ee&&!Tt,gt=s.useCallback(()=>{Ee&&(ft(!0),Dt.current&&clearTimeout(Dt.current),Dt.current=setTimeout(()=>{je.current.isActive||ft(!1)},i0))},[Ee]),Me=s.useCallback(()=>{o||Kt.current||(Kt.current=!0,$t(!1),Ct.current=setTimeout(()=>{l()},ko))},[o,l]),Ve=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":tn?"true":"false",style:{width:z.scalingValue(f??0,i),height:z.scalingValue(f??0,i),marginRight:se,"--close-icon-hover-color":y},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Me,"aria-label":"Close",children:a.jsx(ln,{url:x,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"}})]}),tt=(E="two-row")=>a.jsx("div",{...E==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:te(R??0),flexShrink:0,...E==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...E==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const E=g.find(ke=>ke.prefix==="title1"),re=g.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),pe=re.length>0||o||(M??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(R??0)>0||o?tt():null,E&&Xe(E,"two-row-top"),x&&Ve()]}),pe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[re.map(ke=>Xe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Be(),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]})},bt=()=>a.jsxs(a.Fragment,{children:[(R??0)>0||o?tt("single-row"):null,g.map(E=>Xe(E,"single-row")),o?a.jsxs(a.Fragment,{children:[nt(),et()]}):null,x?Ve():null]}),Mt=s.useCallback(E=>!!(E.closest("[data-controls]")||E.closest(`.${e}-thumbnails`)||E.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:yt,backdropStyle:Gt,mediaAreaStyle:Nt,overlayContentStyle:Wt,swipeHandlers:Xt,dismissAreaStyle:Ut}=lu({enabled:ne??!1,onClose:Me,animMs:ko,isBlockedTarget:Mt}),zt=()=>{if(!rt||t.length===0)return ge.current=0,0;const E=qe.current[0],re=qe.current[t.length];if(!E||!re)return ge.current;const pe=re.offsetLeft-E.offsetLeft;return pe>0&&(ge.current=pe),ge.current},Bt=(E=!1)=>{if(!rt)return;const re=ze.current,pe=zt();!re||pe<=0||pe<re.clientWidth*.25||(re.scrollLeft<=0?(re.scrollLeft+=pe,E&&(je.current.scrollLeft+=pe),ot.current&&(_e.current+=pe)):re.scrollLeft>=pe*2&&(re.scrollLeft-=pe,E&&(je.current.scrollLeft-=pe),ot.current&&(_e.current-=pe)))},jt=(E,re=(pe=>(pe=ze.current)==null?void 0:pe.scrollLeft)()??0)=>{if(!rt)return E;let ke=t.length+E,Ue=1/0;for(let st=0;st<ht;st++){const St=st*t.length+E,kt=qe.current[St];if(!kt)continue;const nn=Math.abs(kt.offsetLeft-re);nn<Ue&&(Ue=nn,ke=St)}return ke},Lt=E=>{const re=ze.current;return!E||!re?!1:E.offsetWidth>re.clientWidth+1},W=E=>{const re=ze.current;if(!E||!re||!Lt(E))return!1;const pe=E.offsetLeft,ke=pe+E.offsetWidth;return re.scrollLeft>=pe-1&&re.scrollLeft+re.clientWidth<=ke+1},Re=(E=(re=>(re=ze.current)==null?void 0:re.scrollLeft)()??0)=>{for(let ke=0;ke<qe.current.length;ke+=1){const Ue=qe.current[ke];if(Ue&&W(Ue))return ke}let pe={flatIndex:0,distance:1/0};return qe.current.forEach((ke,Ue)=>{if(!ke)return;const st=Math.abs(ke.offsetLeft-E);st<pe.distance&&(pe={flatIndex:Ue,distance:st})}),pe.flatIndex},We=E=>{ze.current&&qe.current.forEach(re=>{re&&(re.style.scrollSnapAlign=Lt(re)&&E==="backward"?"end":"start")})},Ge=(E,re,pe)=>{const ke=E-re,Ue=Re(re),st=qe.current[Ue];if(W(st))return Re(E)%t.length;const St=qe.current[Ue+1],kt=st?St?St.offsetLeft-st.offsetLeft:st.offsetWidth:0,nn=kt>0?ke>kt*hr?1:ke<-kt*hr?-1:0:0;return nn===0?pe:rt?(pe+nn+t.length)%t.length:Math.max(0,Math.min(t.length-1,pe+nn))},ut=s.useCallback((E=!1)=>{if(C!=="on"||o)return;const re=Ce.current,pe=q.current,ke=De.current[pe];if(!re||!ke||re.scrollWidth<=re.clientWidth)return;const Ue=re.scrollLeft,st=Ue+re.clientWidth,St=ke.offsetLeft,kt=St+ke.offsetWidth;if(St>=Ue&&kt<=st)return;const nn=re.scrollWidth-re.clientWidth;let Qt=Ue;if(!E&&Ft.current===null){const Pi=De.current[pe-1],bo=De.current[pe+1],rr=Pi?ke.offsetLeft-Pi.offsetLeft:bo?bo.offsetLeft-ke.offsetLeft:ke.offsetWidth;kt>st?Qt+=rr:St<Ue&&(Qt-=rr)}else kt>st?Qt=kt-re.clientWidth:Qt=St;re.scrollLeft=Math.max(0,Math.min(nn,Qt))},[o,C]),_t=s.useCallback((E=!1)=>{E&&(Ot.current=!0),Ht.current===null&&(Ht.current=requestAnimationFrame(()=>{Ht.current=null;const re=Ot.current;Ot.current=!1,ut(re)}))},[ut]),lt=s.useCallback(E=>{if(E===q.current)return;const re=q.current;q.current=E;const pe=Math.abs(E-re)>1,ke=rt&&t.length>1&&(re===t.length-1&&E===0||re===0&&E===t.length-1);ae(E),_t(pe||ke)},[t.length,rt,_t]),wt=()=>{if(!ze.current||t.length===0||Ft.current!==null||je.current.isActive&&je.current.hasMoved)return;const E=ze.current.scrollLeft,re=Re(E)%t.length;re!==q.current&&lt(re)},Vt=()=>{Ft.current=null},Pt=E=>{const re=ze.current;re&&(re.style.scrollSnapType=E?"":"none")},rn=()=>{var E;(E=be.current)==null||E.call(be),be.current=null},pn=()=>{it.current!==null&&(cancelAnimationFrame(it.current),it.current=null),ot.current=!1},di=()=>{const E=ze.current;if(!E){it.current=null,ot.current=!1;return}const re=_e.current-E.scrollLeft;if(Math.abs(re)<.5){E.scrollLeft=_e.current,Bt(),wt(),it.current=null,ot.current=!1;return}E.scrollLeft+=re*a0,Bt(),wt(),gt(),it.current=requestAnimationFrame(di)},ui=()=>{const E=Je.current;E&&(E.style.transition="",E.style.transform="",E.style.willChange="")},tr=(E,re,pe,ke)=>{ui(),E.scrollLeft=re,Le.current=E.scrollLeft,Bt(),pe!==void 0?(q.current=pe,ae(pe)):wt(),Pt(!0),ke==null||ke()},nr=(E,{behavior:re="smooth",activeIndex:pe,onComplete:ke}={})=>{const Ue=ze.current,st=Je.current;if(!Ue||!st)return;if(pn(),rn(),Pt(!1),re==="auto"){tr(Ue,E,pe,ke);return}const St=Math.abs(E-Ue.scrollLeft),kt=Kv(St,e0,t0,Ue.clientWidth*.55);be.current=Qv(Ue,st,E,{duration:kt,easing:n0,onComplete:()=>{be.current=null,tr(Ue,E,pe,ke)}})},ua=(E="smooth")=>{const re=ze.current;if(!re||t.length===0)return;const pe=Re()%t.length,ke=jt(pe,re.scrollLeft),Ue=qe.current[ke];Ue&&nr(Ue.offsetLeft,{behavior:E,activeIndex:pe})},pa=(E,re="smooth",pe,ke)=>{const Ue=ze.current;if(!Ue||t.length===0)return;const st=(ke??Ue.scrollLeft)-E,St=Re(E),kt=qe.current[St];if(W(kt)){Pt(!0),wt();return}const nn=qe.current[St+1],Qt=kt?nn?nn.offsetLeft-kt.offsetLeft:kt.offsetWidth:0;if((Qt>0?st>Qt*hr?1:st<-Qt*hr?-1:0:0)!==0){const Hu=pe??St%t.length,Ou=Ge(ke??Ue.scrollLeft,E,Hu);Tn(Ou,re);return}const bo=ke??Ue.scrollLeft,rr=Re(bo),sl=qe.current[rr];if(sl&&Math.abs(sl.offsetLeft-bo)<1){Pt(!0),wt();return}ua("auto")},Tn=(E,re="smooth")=>{const pe=ze.current;if(!pe||t.length===0)return;const ke=jt(E,pe.scrollLeft),Ue=qe.current[ke];Ue&&(re==="smooth"?Ft.current=E:Ft.current=null,q.current=E,ae(E),_t(!0),nr(Ue.offsetLeft,{behavior:re,activeIndex:E,onComplete:re==="smooth"?Vt:void 0}))},Mi=()=>{Ie.current&&(window.removeEventListener("pointerup",Ie.current),window.removeEventListener("pointercancel",Ie.current),Ie.current=null)},ir=(E,re,pe,ke,Ue)=>{const st=pe-E,St=ke-re,kt=Math.abs(st),nn=Math.abs(St);if(kt<l0||kt<=nn)return!1;const Qt=st<0?1:-1,Pi=rt?(Ue+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ue+Qt));return Pi===Ue?!1:(Tn(Pi),!0)},pi=E=>{if(!je.current.isActive)return;Mi();const re=ze.current;if(!re)return;const{scrollLeft:pe,startActiveIndex:ke,hasMoved:Ue}=je.current,st=re.scrollLeft;Bt(!0),je.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},dt(!1),E!==void 0&&re.hasPointerCapture(E)&&re.releasePointerCapture(E),Ue?pa(pe,"smooth",ke,st):(Pt(!0),wt()),gt()},or=(E,re)=>{const pe=Pe.current;Pe.current=null,pe&&(ir(pe.startX,pe.startY,E,re,pe.startActiveIndex),gt())},ma=E=>{if(!Te)return;if(E.pointerType==="touch"){if(pn(),Pt(!0),Mt(E.target))return;Pe.current={startX:E.clientX,startY:E.clientY,startActiveIndex:q.current};return}if(E.pointerType!=="mouse"||E.button!==0||Mt(E.target))return;const re=ze.current;if(!re)return;pn(),rn(),ui(),Ft.current=null,je.current={isActive:!0,startX:E.clientX,scrollLeft:re.scrollLeft,startActiveIndex:q.current,hasMoved:!1},Pt(!1),gt(),re.setPointerCapture(E.pointerId),Mi();const pe=ke=>{ke.pointerType==="mouse"&&pi(ke.pointerId)};Ie.current=pe,window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)},ga=E=>{if(!Te||E.pointerType!=="mouse")return;const re=ze.current;if(!re||!je.current.isActive)return;if(E.buttons===0){pi(E.pointerId);return}const pe=E.clientX-je.current.startX;Math.abs(pe)>s0&&(je.current.hasMoved=!0,dt(!0)),je.current.hasMoved&&(E.preventDefault(),re.scrollLeft=je.current.scrollLeft-pe,Bt(!0),wt(),gt())},Se=E=>{if(Te){if(E.pointerType==="touch"){E.type==="pointerup"?or(E.clientX,E.clientY):Pe.current=null;return}E.pointerType==="mouse"&&pi(E.pointerId)}},Ke=E=>{!Te||E.pointerType!=="mouse"||pi(E.pointerId)};return cu(),s.useEffect(()=>{const E=requestAnimationFrame(()=>$t(!0));return()=>{cancelAnimationFrame(E),rn(),Mi(),Ht.current!==null&&(cancelAnimationFrame(Ht.current),Ht.current=null),Ct.current&&clearTimeout(Ct.current),Dt.current&&clearTimeout(Dt.current)}},[]),s.useEffect(()=>{if(!Ee){ft(!0);return}gt();const E=()=>gt();return document.addEventListener("pointermove",E,{passive:!0}),document.addEventListener("pointerdown",E,{passive:!0}),()=>{document.removeEventListener("pointermove",E),document.removeEventListener("pointerdown",E),Dt.current&&clearTimeout(Dt.current)}},[Ee,gt]),s.useEffect(()=>{const E=re=>{re.key==="Escape"&&Me()};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[Me]),s.useLayoutEffect(()=>{zt()},[j,t.length,rt]),s.useLayoutEffect(()=>{o||Tn(q.current,"auto")},[j,o]),s.useLayoutEffect(()=>{Tn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const E=ze.current;if(!E||o||!ne)return;const re=pe=>{if(pe.preventDefault(),Math.abs(pe.deltaY)<=Math.abs(pe.deltaX))return;const ke=pe.deltaMode===1?r0:pe.deltaMode===2?E.clientHeight:1,Ue=pe.deltaY*ke*o0;if(Ue!==0){if(rn(),ot.current||(ot.current=!0,_e.current=E.scrollLeft,Ft.current=null,Pt(!1)),_e.current+=Ue,!rt){const st=E.scrollWidth-E.clientWidth;_e.current=Math.max(0,Math.min(st,_e.current))}gt(),it.current===null&&(it.current=requestAnimationFrame(di))}};return E.addEventListener("wheel",re,{passive:!1}),()=>{E.removeEventListener("wheel",re),pn()}},[o,ne,rt]),s.useEffect(()=>{const E=ze.current;if(!E)return;const re=()=>{Bt(je.current.isActive);const ke=E.scrollLeft,Ue=ke-Le.current;Le.current=ke;const st=ge.current>0?ge.current*.5:1/0;if(Ue!==0&&Math.abs(Ue)<st){const St=Ue>0?"forward":"backward";St!==Ye.current&&(Ye.current=St,We(St))}je.current.isActive&&je.current.hasMoved||wt()};E.addEventListener("scroll",re,{passive:!0});const pe=new ResizeObserver(()=>{zt(),Bt(je.current.isActive),We(Ye.current),wt()});return pe.observe(E),()=>{rn(),E.removeEventListener("scroll",re),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||Me()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:mt?1:0,transition:`opacity ${ko}ms ease`,pointerEvents:mt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Gt}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:Ut,...Xt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Nt,onClick:E=>E.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Te&&t.length>0?"true":"false","data-mouse-dragging":Et?"true":"false",onPointerDown:ma,onPointerMove:ga,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:Ke,children:a.jsx("div",{ref:Je,className:`${e}-lightbox-strip-track`,style:{gap:j},children:It.map((E,re)=>{const pe=E.image.objectFit??"contain",ke=re%t.length,Ue=Math.floor(re/t.length),st=fr(j),St=`calc(-0.5 * (${st} + ${j}))`;return a.jsxs("div",{ref:kt=>qe.current[re]=kt,className:`${e}-strip-item`,style:{height:_==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:E.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:pe}}),o&&ke<t.length-1&&Ue===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:St,width:st,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ue}-${E.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":tn?"true":"false",style:Wt,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:ce,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||x)&&a.jsx("div",{className:`${e}-header ${de?`${e}-header-two-row`:`${e}-header-single-row`}`,children:de?pt():$e||x?bt():null})})})]}),t.length>1&&C==="on"&&(()=>{const E=fr(T),re=`calc(-0.5 * (${T} + ${E}))`;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":S,style:{gap:ee,"--thumbnail-active-color":H},children:[t.map((pe,ke)=>{const Ue=fr(ee),st=`calc(-0.5 * (${Ue} + ${ee}))`;return a.jsxs("div",{ref:St=>{De.current[ke]=St},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"&&Tn(ke),onMouseEnter:()=>Oe&&b==="hover"&&Tn(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:{...we,maxWidth:V,maxHeight:V,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.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:Ue,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:re,height:E,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function b0(e){return`
14319
14319
  .${e}-wrapper {
14320
14320
  position: relative;
14321
14321
  width: 100%;
@@ -14546,7 +14546,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14546
14546
  background-color: transparent;
14547
14547
  padding: 0;
14548
14548
  opacity: 1;
14549
- transition: opacity ${Po}ms ease;
14549
+ transition: opacity ${ko}ms ease;
14550
14550
  }
14551
14551
 
14552
14552
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -14659,7 +14659,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14659
14659
  display: flex;
14660
14660
  flex-direction: column;
14661
14661
  opacity: 1;
14662
- transition: opacity ${Po}ms ease;
14662
+ transition: opacity ${ko}ms ease;
14663
14663
  }
14664
14664
 
14665
14665
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -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 b0=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=D.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,b]=s.useState(!1),v=t??[],g=p&&v.length>0,h=()=>{v.length!==0&&b(!0)};return s.useEffect(()=>{!n||i||o||b(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:x0(l)}}),d&&a.jsx("div",{className:`${l}-cover ${jn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...jn(c)?{"--image-aspect-ratio":ca(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${jn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),g&&typeof document<"u"&&(()=>{const f=(r?document.getElementById(r):null)??document.body;return Vn.createPortal(a.jsx(v0,{prefix:l,images:v,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>b(!1)}),f)})()]})},w0=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14703
+ `}const w0=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=z.useScopedStyles(),{cover:d,coverFit:c}=e,u=s.useRef(null),[p,w]=s.useState(!1),x=t??[],f=p&&x.length>0,h=()=>{x.length!==0&&w(!0)};return s.useEffect(()=>{!n||i||o||w(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:b0(l)}}),d&&a.jsx("div",{className:`${l}-cover ${zn(c)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...zn(c)?{"--image-aspect-ratio":ca(c)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${zn(c)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:d,alt:"cover"})})]}),f&&typeof document<"u"&&(()=>{const y=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(x0,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>w(!1)}),y)})()]})},S0=`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
- `,S0="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 $0(e){const t={};return t[Gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSettings")]={...fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Gt(e,"fontSize")]={...fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Gt(e,"lineHeight")]={...fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Gt(e,"letterSpacing")]={...fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Gt(e,"wordSpacing")]={...fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Gt(e,"textAlign")]={...fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Gt(e,"textAppearance")]={...fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const C0=ao.reduce((e,t)=>({...e,...$0(t)}),{}),T0=ao.reduce((e,t)=>({...e,[Gt(t,"fontFamily")]:"Goudy Bookletter 1911",[Gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Gt(t,"letterSpacing")]:0,[Gt(t,"wordSpacing")]:0,[Gt(t,"textAlign")]:"left",[Gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wa(e){return ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Gt(n,"fontSize")]=i),o!==void 0&&(t[Gt(n,"lineHeight")]=o),t},{})}const L0=h0(),R0={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"}},...C0,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:S0,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...T0},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,...Wa({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,...Wa({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,...Wa({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:[L0]}],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"}]}},I0={element:b0,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:R0,sourceCode:w0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ao.map(e=>({path:`${Gt(e,"fontFamily")}`}))]},fontRelations:{...ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Gt(t,"fontFamily")}`}),{})}},E0=({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:b,coverFit:v,backgroundColor:g,imageGap:h,maxWidth:f,maxHeight:x,textTransition:S,title1Width:y,title2Width:w,title3Width:H,title1MarginLeft:N=0,title2MarginLeft:U=0,title3MarginLeft:O=0,titleRowMarginBottom:C=0,titleHeaderLayout:V="single-row",countCloseGap:$=0,closeIcon:R,closeIconMaxWidth:k,closeIconColor:T,closeIconHoverColor:m,contentMarginTop:M=0,iconMarginRight:E=0}=n,z=s.useCallback(we=>D.scalingValue(we,i??!1),[i]),ne=z(h??0),I=`${f}%`,W=`${x}%`,K=z($),ae=z(M),de=z(E),A=wi("title1",bi(n,"title1"),i),he=wi("title2",bi(n,"title2"),i),q=wi("title3",bi(n,"title3"),i),ce=wi("count",bi(n,"count"),i),Q=V==="mobile",be=!i||!!r,He=!o&&(!i||!!r),xe=s.useMemo(()=>Ar(t,b),[t,b]),[le,ee]=s.useState(l),ue=xe[le],oe=ue==null?void 0:ue.entry,[Fe,Ce]=s.useState(!1),[P,Y]=s.useState(null),[X,ie]=s.useState(!1),[j,B]=s.useState(null),[J,te]=s.useState(!1),[$e,ye]=s.useState(0),[F,ve]=s.useState(),[pe,Z]=s.useState(),[me,De]=s.useState(null),ge=s.useRef(null),G=s.useRef(0),Me=s.useRef(0),_e=s.useRef(0),rt=s.useRef(!1),Je=s.useRef(null),at=s.useRef(null),it=s.useRef(null),je=s.useRef(null),Se=s.useRef(null),We=s.useRef(null),Be=s.useRef(null),Ze=s.useCallback(()=>{const we=at.current;if(!we)return;const Ye=we.closest(`.${e}-lightbox-content-area`);if(!Ye)return we.getBoundingClientRect().width;const L=Array.from(Ye.children).reduce((re,fe)=>!(fe instanceof HTMLElement)||fe.contains(we)?re:re+fe.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-L},[e]),Le=s.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null)},[]),Ve=s.useCallback(we=>{we===G.current&&(B(null),te(!1))},[]),se=s.useCallback(()=>{o||rt.current||(rt.current=!0,u==null||u(),Ce(!1),Je.current=setTimeout(()=>{p()},300))},[o,u,p]),Te=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Xe,backdropStyle:ze,mediaAreaStyle:Re,overlayContentStyle:Pe,swipeHandlers:Ae,dismissAreaStyle:Ke}=au({enabled:He,onClose:se,animMs:300,isBlockedTarget:Te}),Oe=s.useCallback(we=>{d&&zd(we+1,c,!0)},[d,c]),Qe=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),tt=s.useCallback(we=>{if(xe.length===0)return;const Ye=(we%xe.length+xe.length)%xe.length;if(Ye===le)return;const L=xe[le],re=xe[Ye];G.current+=1;const fe=G.current,ke=S==="fade"&&Dl(L==null?void 0:L.entry)!==Dl(re==null?void 0:re.entry),Ue=Qe(it.current),ot=ke?(()=>{const kt=Ze();Vn.flushSync(()=>{De(re.entry)}),it.current&&kt&&(it.current.style.width=`${kt}px`);const tn=Qe(it.current);return it.current&&(it.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:kt}})():void 0,St=Math.max(Ue??0,(ot==null?void 0:ot.measuredIncomingTitlesHeight)??0)||void 0;ye(fe),B(le),te(!0),ee(Ye),Oe(Ye),_e.current=Ye,ke?(Le(),St&&ve(St),ot!=null&&ot.incomingTitlesMeasureWidth&&Z(ot.incomingTitlesMeasureWidth),Y((L==null?void 0:L.entryIndex)??null),ie(!0),Me.current=re.entryIndex,ge.current=setTimeout(()=>{Y(null),ie(!1),ve(void 0),Z(void 0),De(null),ge.current=null},400)):(Le(),Y(null),ie(!1),ve(void 0),Z(void 0),De(null),Me.current=re.entryIndex)},[le,Le,Ze,Qe,xe,Oe,S]),nt=s.useCallback(()=>{Be.current=null},[]),xt=s.useCallback(we=>{!be||xe.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,xe.length]),It=s.useCallback(we=>{var kt;if(!be||xe.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(Xe){nt();return}const Ye=Be.current;if(!Ye||Ye.pointerId!==we.pointerId||(nt(),we.target.closest("[data-controls]")))return;const re=we.clientX-Ye.startX,fe=we.clientY-Ye.startY,ke=Math.abs(re),Ue=Math.abs(fe);if(ke>=jf&&ke>Ue){tt(re>0?le-1:le+1);return}if(ke>Wl||Ue>Wl)return;const ot=(kt=je.current)==null?void 0:kt.getBoundingClientRect(),St=ot?ot.left+ot.width/2:window.innerWidth/2;tt(we.clientX<St?le-1:le+1)},[le,be,tt,Xe,nt,xe.length]),Tt=s.useCallback(we=>{const Ye=Be.current;(Ye==null?void 0:Ye.pointerId)===we.pointerId&&nt()},[nt]);su(),s.useEffect(()=>{We.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Se.current?Se.current.focus():je.current&&je.current.focus()})});return()=>{cancelAnimationFrame(we),Je.current&&clearTimeout(Je.current),ge.current&&clearTimeout(ge.current);const Ye=We.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;S!=="fade"&&(Me.current=((we=xe[le])==null?void 0:we.entryIndex)??0,Le(),Y(null),ie(!1),ve(void 0),Z(void 0))},[le,Le,xe,S]),s.useEffect(()=>{const we=Ye=>{if(Ye.key==="Escape"){se();return}if(Ye.key==="ArrowLeft"&&xe.length>1){tt(le-1);return}if(Ye.key==="ArrowRight"&&xe.length>1){tt(le+1);return}if(Ye.key==="Tab"&&je.current){const L=je.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),re=Array.from(L).filter(ot=>!ot.closest('[aria-hidden="true"]'));if(re.length===0)return;const fe=re[0],ke=re[re.length-1],Ue=document.activeElement;Ye.shiftKey?(Ue===fe||!je.current.contains(Ue))&&(Ye.preventDefault(),ke.focus()):(Ue===ke||!je.current.contains(Ue))&&(Ye.preventDefault(),fe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[tt,se,le,xe.length]),s.useLayoutEffect(()=>{Le(),G.current=0,ye(0),B(null),te(!1),Y(null),ie(!1),ve(void 0),Z(void 0),De(null),ee(we=>{const Ye=Math.max(0,xe.length-1);return Math.min(we,Ye)})},[Le,t.length,b,xe.length]),s.useLayoutEffect(()=>{var L;const we=Math.max(0,xe.length-1),Ye=Math.min(Math.max(0,l),we);_e.current=Ye,Me.current=((L=xe[Ye])==null?void 0:L.entryIndex)??0,ee(Ye)},[l]);const ut=P!==null?t[P]:null,ft=j!==null?xe[j]:null,Et=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(ut==null?void 0:ut.title1)||(ut==null?void 0:ut.title2)||(ut==null?void 0:ut.title3),Lt=Yf(b,xe,t),bt=R!==null,Nt=Et||Lt||bt,Bt=Lt&&bt?{gap:K}:void 0,Zt=`${e}-titles-stack${Q?` ${e}-titles-stack-stacked`:""}`,en=`${e}-titles-layer-out${Q?` ${e}-titles-layer-out-stacked`:""}`,Rt=`${e}-titles-layer-out`,Ot=(N??0)>0||o,nn=z(C),pt=s.useMemo(()=>({title1Width:y??Xi.title1Width,title2Width:w??Xi.title2Width,title3Width:H??Xi.title3Width}),[y,w,H]),Ee=s.useMemo(()=>({title2MarginLeft:U,title3MarginLeft:O}),[U,O]),qe=s.useMemo(()=>oe?Jn(e,oe,A,he,q):[],[e,oe,A,he,q]),st=s.useMemo(()=>qe.map(we=>pt[we.widthKey]),[qe,pt]),mt=s.useMemo(()=>eo(qe.length,st),[qe.length,st]),vt=s.useMemo(()=>Oo(qe.length,st),[qe.length,st]),Mt=s.useMemo(()=>qe.filter(we=>we.prefix==="title1"),[qe]),gt=s.useMemo(()=>qe.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[qe]),Vt=s.useMemo(()=>Qn(Mt,pt),[Mt,pt]),Wt=s.useMemo(()=>Qn(gt,pt),[gt,pt]),_t=s.useCallback((we,Ye)=>{const L=qe.findIndex(fe=>fe.prefix===we.prefix);if(!Q||Ye==="single-row")return{effectiveWidth:vt[L]??0,resolvedWidth:mt[L]??0,maxWidth:dn(L,mt)};if(Ye==="two-row-top"){const fe=Mt.findIndex(ke=>ke.prefix===we.prefix);return{effectiveWidth:Vt.effective[fe]??0,resolvedWidth:Vt.resolved[fe]??0,maxWidth:dn(fe,Vt.resolved)}}const re=gt.findIndex(fe=>fe.prefix===we.prefix);return{effectiveWidth:Wt.effective[re]??0,resolvedWidth:Wt.resolved[re]??0,maxWidth:dn(re,Wt.resolved)}},[qe,gt,Wt,vt,mt,Mt,Vt,Q]),qt=s.useCallback(we=>qd(qe,mt,Ee,we)+(Q?0:N??0),[qe,mt,Ee,Q,N]),Xt=s.useCallback(()=>Q?0:N??0,[Q,N]),Dt=s.useCallback(we=>gt.slice(0,we).reduce((Ye,L,re)=>Ye+(L.marginLeftKey?Ee[L.marginLeftKey]??0:0)+(Wt.resolved[re]??0),0),[gt,Wt.resolved,Ee]),jt=s.useCallback(we=>{const Ye=gt[we];return Dt(we)+(Ye.marginLeftKey?Ee[Ye.marginLeftKey]??0:0)+(Wt.resolved[we]??0)},[gt,Wt.resolved,Dt,Ee]),Ht=s.useCallback((we,Ye,L)=>{if(!Q||L==="single-row"){const ot=we.findIndex(Jt=>Jt.prefix===Ye.prefix),St=we.map(Jt=>pt[Jt.widthKey]),kt=eo(we.length,St);return{effectiveWidth:Oo(we.length,St)[ot]??0,resolvedWidth:kt[ot]??0,maxWidth:dn(ot,kt)}}if(L==="two-row-top"){const ot=we.filter(Jt=>Jt.prefix==="title1"),St=ot.findIndex(Jt=>Jt.prefix===Ye.prefix),{resolved:kt,effective:tn}=Qn(ot,pt);return{effectiveWidth:tn[St]??0,resolvedWidth:kt[St]??0,maxWidth:dn(St,kt)}}const re=we.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),fe=re.findIndex(ot=>ot.prefix===Ye.prefix),{resolved:ke,effective:Ue}=Qn(re,pt);return{effectiveWidth:Ue[fe]??0,resolvedWidth:ke[fe]??0,maxWidth:dn(fe,ke)}},[pt,Q]),$t=(we,Ye,L)=>{const re=we.marginLeftKey?Ee[we.marginLeftKey]??0:0,{effectiveWidth:fe,resolvedWidth:ke,maxWidth:Ue}=L??_t(we,Ye),ot=Math.max(re,Zn),St=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:z(fe),...re>0?{marginLeft:z(re)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),St&&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:z(-re),width:z(ot),height:"100%",pointerEvents:"auto"}}):null,St?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-yn/2),width:z(yn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},_=(we="two-row")=>{const Ye=qe.findIndex(fe=>fe.prefix==="title1"),L=Ye>=0?mt[Ye]:pt.title1Width,re=we==="two-row"&&o;return a.jsx("div",{...re?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(L)}:{},style:{width:z(N??0),flexShrink:0,alignSelf:"stretch",...re?{pointerEvents:"auto"}:{}}})},Ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:A,"aria-hidden":"true",children:" "}),Ne=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ce,"aria-live":"polite","aria-atomic":"true",children:Uf(xe,le,b,t)}),Ge=()=>Lt?o&&bt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Ne(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${La(K)} + ${K}))`,width:La(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Ne():null,dt=()=>!Lt&&!bt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Bt,children:[Ge(),bt?wt():null]}),Ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Lt||Et?Ie():null,Ot?_("single-row"):null,Pt(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),dt(),Tn()]}),lt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Lt||Et?Ie():null,Ot?_("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:X&&F?{minHeight:F}:void 0,children:[a.jsx("div",{ref:it,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:di(me||oe)}),a.jsxs("div",{ref:at,className:Zt,style:{position:X?"absolute":"relative",inset:X?0:void 0,width:"100%",...X&&pe?{width:pe,maxWidth:"100%"}:void 0},children:[ut&&X?a.jsx("div",{className:`${en} ${e}-titles-fade-out`,children:di(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${X?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:di(oe)})]})]}),dt(),Tn()]}),wt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:D.scalingValue(k??0,i),height:D.scalingValue(k??0,i),marginRight:de,"--close-icon-hover-color":m},children:[a.jsx("button",{ref:Se,type:"button",className:`${e}-close-icon-inner`,onClick:se,"aria-label":"Close",children:a.jsx(ln,{url:R??"",fill:T,hoverFill:i&&!r?T:m,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:de,height:"100%",pointerEvents:"auto"}})]}),zt=(we,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Lt||Et?Ie():null,Ot?_("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"})]}),dt()]}),Pt=we=>{if(!we)return null;const Ye=Jn(e,we,A,he,q);return a.jsx(a.Fragment,{children:Ye.map(L=>$t(L,"single-row",Ht(Ye,L,"single-row")))})},on=we=>{if(!we)return null;const Ye=Jn(e,we,A,he,q),L=Ye.find(re=>re.prefix==="title1");return L?$t(L,"two-row-top",Ht(Ye,L,"two-row-top")):null},pn=(we,Ye=!1)=>{const L=we?Jn(e,we,A,he,q):[],re=L.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),fe=o&&Ye;return re.length>0||fe||(C??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[re.map(Ue=>$t(Ue,"two-row-bottom",Ht(L,Ue,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[ua(),pa()]}):null]}):null,(C??0)>0||fe?a.jsx("div",{"data-controls":fe?"titleRowMarginBottom":void 0,"data-controls-axis":fe?"y":void 0,"data-controls-reverse":fe?"":void 0,className:fe?`${e}-control`:void 0,style:{height:nn,width:"100%",flexShrink:0,pointerEvents:fe?"auto":"none"}}):null]}):null},ci=(we,Ye=!1)=>a.jsxs(a.Fragment,{children:[zt(on(we)),pn(we,Ye)]}),di=we=>Q?a.jsx("div",{className:`${e}-titles-row-two-row`,children:ci(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Pt(we)}):null,tr=()=>{const we=Q?-1:qe.findIndex(re=>re.prefix==="title1"),Ye=!Q&&(o||(N??0)>0)?(()=>{const re=N??0,fe=we>=0?mt[we]:pt.title1Width,ke=Math.max(re,Zn);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(fe),style:{position:"absolute",top:0,left:0,width:z(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,L=qe.flatMap((re,fe)=>{if(!re.marginLeftKey)return[];const ke=Ee[re.marginLeftKey]??0,Ue=Gd(qe,mt,Ee,fe)+Xt(),ot=Math.max(ke,Zn);return a.jsx("div",{"data-controls":re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(mt[fe]),style:{position:"absolute",top:0,left:z(Ue),width:z(ot),height:"100%",pointerEvents:"auto"}},re.marginLeftKey)});return Ye?[Ye,...L]:L},nr=()=>qe.map((we,Ye)=>{const L=dn(Ye,mt),fe=qt(Ye)-yn/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(L),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(fe),width:z(yn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),ua=()=>gt.flatMap((we,Ye)=>{if(!we.marginLeftKey)return[];const L=Ee[we.marginLeftKey]??0,re=Dt(Ye),fe=Math.max(L,Zn),{resolvedWidth:ke}=_t(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:z(re),width:z(fe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),pa=()=>gt.map((we,Ye)=>{const{maxWidth:L}=_t(we,"two-row-bottom"),fe=jt(Ye)-yn/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(L),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:z(fe),width:z(yn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),Tn=()=>!o||Q?null:a.jsxs(a.Fragment,{children:[tr(),nr()]}),Ei=we=>{const Ye=!we.objectFit&&jn(v);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:I,maxHeight:W,...Ye?{"--image-aspect-ratio":ca(v)}:{}}}},ir=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:jn(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ui=we=>{if(we.length===0)return null;const Ye=we.length>1,L=La(ne),re=`calc(-0.5 * (${L} + ${ne}))`;if(we.length===1){const fe=we[0];return a.jsx("div",{...Ei(fe),children:a.jsx("img",{...ir(fe),src:fe.url,alt:fe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:ne}:void 0,children:we.map((fe,ke)=>a.jsxs("div",{...Ei(fe),children:[a.jsx("img",{...ir(fe),src:fe.url,alt:fe.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:re,width:L,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${fe.url}-${ke}`))})},or=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||ut!=null&&ut.title2||ut!=null&&ut.title3||(C??0)>0||o),ma=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:it,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ci(me||oe)}),a.jsxs("div",{ref:at,className:`${e}-titles-row-two-row`,style:{...X&&F?{minHeight:F}:void 0,...X&&pe?{width:pe,maxWidth:"100%"}:void 0},children:[zt(a.jsxs("div",{className:Zt,style:{position:X?"absolute":"relative",inset:X?0:void 0,width:"100%"},children:[ut&&X?a.jsx("div",{className:`${Rt} ${e}-titles-fade-out`,children:on(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${X?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(oe)})]}),X&&F?F:void 0),or?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ut&&X?a.jsx("div",{className:`${en} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:pn(ut)}):null,a.jsx("div",{className:`${e}-titles-layer-in${X?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Q?` ${e}-titles-layer-in-stacked`:""}`,children:pn(oe,!0)})]}):null]})]}),ga=()=>{const we=or;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:ci(oe,!0)}),Tn()]})};return a.jsxs("div",{ref:je,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Xe||se()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:bt?void 0:-1,style:{opacity:Fe?1:0,transition:"opacity 300ms ease",pointerEvents:Fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...ze}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ke,...Ae,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&&xe.length>1?"true":"false",onPointerDown:be?xt:void 0,onPointerUp:be?It:void 0,onPointerCancel:be?Tt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[ft&&J?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&Ve($e)},children:a.jsx("div",{className:`${e}-slide-area`,children:ui(ft.images)})},`slide-out-${$e}`):null,a.jsx("div",{className:`${e}-slide-layer-in${J?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:ue?ui(ue.images):null})},`slide-in-${$e}-${le}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Pe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ae,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Q?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:Nt&&a.jsx("div",{className:`${e}-text-bar-cell${Q?` ${e}-text-bar-cell-stacked`:""}`,style:Q?void 0:{flex:1,minWidth:0,width:"100%"},children:Q?S==="fade"?ma():ga():S==="fade"?lt():Ft()})})})]})]})]})};function M0(e){return`
15249
+ `,$0="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>'),yi={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 C0(e){const t={};return t[qt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[qt(e,"fontSettings")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[qt(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[qt(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[qt(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[qt(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[qt(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[qt(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const T0=lo.reduce((e,t)=>({...e,...C0(t)}),{}),L0=lo.reduce((e,t)=>({...e,[qt(t,"fontFamily")]:"Goudy Bookletter 1911",[qt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[qt(t,"letterSpacing")]:0,[qt(t,"wordSpacing")]:0,[qt(t,"textAlign")]:"left",[qt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Wa(e){return lo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[qt(n,"fontSize")]=i),o!==void 0&&(t[qt(n,"lineHeight")]=o),t},{})}const R0=f0(),I0={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"}},...T0,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:$0,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...L0},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,...Wa({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,...Wa({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,...Wa({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:[R0]}],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"}]}},E0={element:w0,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:I0,sourceCode:S0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...lo.map(e=>({path:`${qt(e,"fontFamily")}`}))]},fontRelations:{...lo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${qt(t,"fontFamily")}`}),{})}},M0=({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:w,coverFit:x,backgroundColor:f,imageGap:h,maxWidth:y,maxHeight:b,textTransition:C,title1Width:v,title2Width:S,title3Width:H,title1MarginLeft:N=0,title2MarginLeft:U=0,title3MarginLeft:O=0,titleRowMarginBottom:R=0,titleHeaderLayout:B="single-row",countCloseGap:$=0,closeIcon:M,closeIconMaxWidth:_,closeIconColor:A,closeIconHoverColor:m,contentMarginTop:P=0,iconMarginRight:I=0}=n,V=s.useCallback(Se=>z.scalingValue(Se,i??!1),[i]),ee=V(h??0),T=`${y}%`,j=`${b}%`,K=V($),ce=V(P),se=V(I),k=Si("title1",wi(n,"title1"),i),ae=Si("title2",wi(n,"title2"),i),q=Si("title3",wi(n,"title3"),i),le=Si("count",wi(n,"count"),i),Z=B==="mobile",xe=!i||!!r,Ne=!o&&(!i||!!r),ye=s.useMemo(()=>Ar(t,w),[t,w]),[ue,Q]=s.useState(l),de=ye[ue],ne=de==null?void 0:de.entry,[Ee,Te]=s.useState(!1),[Oe,ve]=s.useState(null),[we,$e]=s.useState(!1),[g,G]=s.useState(null),[F,X]=s.useState(!1),[me,Y]=s.useState(0),[L,ie]=s.useState(),[oe,D]=s.useState(),[te,Ae]=s.useState(null),he=s.useRef(null),J=s.useRef(0),Ze=s.useRef(0),Fe=s.useRef(0),Qe=s.useRef(!1),Xe=s.useRef(null),nt=s.useRef(null),et=s.useRef(null),Be=s.useRef(null),fe=s.useRef(null),He=s.useRef(null),ze=s.useRef(null),Je=s.useCallback(()=>{const Se=nt.current;if(!Se)return;const Ke=Se.closest(`.${e}-lightbox-content-area`);if(!Ke)return Se.getBoundingClientRect().width;const E=Array.from(Ke.children).reduce((re,pe)=>!(pe instanceof HTMLElement)||pe.contains(Se)?re:re+pe.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-E},[e]),Ce=s.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),De=s.useCallback(Se=>{Se===J.current&&(G(null),X(!1))},[]),qe=s.useCallback(()=>{o||Qe.current||(Qe.current=!0,u==null||u(),Te(!1),Xe.current=setTimeout(()=>{p()},300))},[o,u,p]),ge=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Pe,backdropStyle:je,mediaAreaStyle:Ie,overlayContentStyle:be,swipeHandlers:Le,dismissAreaStyle:Ye}=lu({enabled:Ne,onClose:qe,animMs:300,isBlockedTarget:ge}),_e=s.useCallback(Se=>{d&&Vd(Se+1,c,!0)},[d,c]),it=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),ot=s.useCallback(Se=>{if(ye.length===0)return;const Ke=(Se%ye.length+ye.length)%ye.length;if(Ke===ue)return;const E=ye[ue],re=ye[Ke];J.current+=1;const pe=J.current,ke=C==="fade"&&jl(E==null?void 0:E.entry)!==jl(re==null?void 0:re.entry),Ue=it(et.current),st=ke?(()=>{const kt=Je();Gn.flushSync(()=>{Ae(re.entry)}),et.current&&kt&&(et.current.style.width=`${kt}px`);const nn=it(et.current);return et.current&&(et.current.style.width=""),{measuredIncomingTitlesHeight:nn,incomingTitlesMeasureWidth:kt}})():void 0,St=Math.max(Ue??0,(st==null?void 0:st.measuredIncomingTitlesHeight)??0)||void 0;Y(pe),G(ue),X(!0),Q(Ke),_e(Ke),Fe.current=Ke,ke?(Ce(),St&&ie(St),st!=null&&st.incomingTitlesMeasureWidth&&D(st.incomingTitlesMeasureWidth),ve((E==null?void 0:E.entryIndex)??null),$e(!0),Ze.current=re.entryIndex,he.current=setTimeout(()=>{ve(null),$e(!1),ie(void 0),D(void 0),Ae(null),he.current=null},400)):(Ce(),ve(null),$e(!1),ie(void 0),D(void 0),Ae(null),Ze.current=re.entryIndex)},[ue,Ce,Je,it,ye,_e,C]),rt=s.useCallback(()=>{ze.current=null},[]),ht=s.useCallback(Se=>{!xe||ye.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(ze.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[xe,ye.length]),It=s.useCallback(Se=>{var kt;if(!xe||ye.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(Pe){rt();return}const Ke=ze.current;if(!Ke||Ke.pointerId!==Se.pointerId||(rt(),Se.target.closest("[data-controls]")))return;const re=Se.clientX-Ke.startX,pe=Se.clientY-Ke.startY,ke=Math.abs(re),Ue=Math.abs(pe);if(ke>=zf&&ke>Ue){ot(re>0?ue-1:ue+1);return}if(ke>Nl||Ue>Nl)return;const st=(kt=Be.current)==null?void 0:kt.getBoundingClientRect(),St=st?st.left+st.width/2:window.innerWidth/2;ot(Se.clientX<St?ue-1:ue+1)},[ue,xe,ot,Pe,rt,ye.length]),Et=s.useCallback(Se=>{const Ke=ze.current;(Ke==null?void 0:Ke.pointerId)===Se.pointerId&&rt()},[rt]);cu(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{Te(!0),requestAnimationFrame(()=>{fe.current?fe.current.focus():Be.current&&Be.current.focus()})});return()=>{cancelAnimationFrame(Se),Xe.current&&clearTimeout(Xe.current),he.current&&clearTimeout(he.current);const Ke=He.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;C!=="fade"&&(Ze.current=((Se=ye[ue])==null?void 0:Se.entryIndex)??0,Ce(),ve(null),$e(!1),ie(void 0),D(void 0))},[ue,Ce,ye,C]),s.useEffect(()=>{const Se=Ke=>{if(Ke.key==="Escape"){qe();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"&&Be.current){const E=Be.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),re=Array.from(E).filter(st=>!st.closest('[aria-hidden="true"]'));if(re.length===0)return;const pe=re[0],ke=re[re.length-1],Ue=document.activeElement;Ke.shiftKey?(Ue===pe||!Be.current.contains(Ue))&&(Ke.preventDefault(),ke.focus()):(Ue===ke||!Be.current.contains(Ue))&&(Ke.preventDefault(),pe.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[ot,qe,ue,ye.length]),s.useLayoutEffect(()=>{Ce(),J.current=0,Y(0),G(null),X(!1),ve(null),$e(!1),ie(void 0),D(void 0),Ae(null),Q(Se=>{const Ke=Math.max(0,ye.length-1);return Math.min(Se,Ke)})},[Ce,t.length,w,ye.length]),s.useLayoutEffect(()=>{var E;const Se=Math.max(0,ye.length-1),Ke=Math.min(Math.max(0,l),Se);Fe.current=Ke,Ze.current=((E=ye[Ke])==null?void 0:E.entryIndex)??0,Q(Ke)},[l]);const dt=Oe!==null?t[Oe]:null,mt=g!==null?ye[g]:null,$t=(ne==null?void 0:ne.title1)||(ne==null?void 0:ne.title2)||(ne==null?void 0:ne.title3)||(dt==null?void 0:dt.title1)||(dt==null?void 0:dt.title2)||(dt==null?void 0:dt.title3),Tt=Kf(w,ye,t),ft=M!==null,Ft=$t||Tt||ft,Ht=Tt&&ft?{gap:K}:void 0,Ot=`${e}-titles-stack${Z?` ${e}-titles-stack-stacked`:""}`,Kt=`${e}-titles-layer-out${Z?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Dt=(N??0)>0||o,tn=V(R),gt=s.useMemo(()=>({title1Width:v??Yi.title1Width,title2Width:S??Yi.title2Width,title3Width:H??Yi.title3Width}),[v,S,H]),Me=s.useMemo(()=>({title2MarginLeft:U,title3MarginLeft:O}),[U,O]),Ve=s.useMemo(()=>ne?Qn(e,ne,k,ae,q):[],[e,ne,k,ae,q]),tt=s.useMemo(()=>Ve.map(Se=>gt[Se.widthKey]),[Ve,gt]),pt=s.useMemo(()=>no(Ve.length,tt),[Ve.length,tt]),bt=s.useMemo(()=>Do(Ve.length,tt),[Ve.length,tt]),Mt=s.useMemo(()=>Ve.filter(Se=>Se.prefix==="title1"),[Ve]),yt=s.useMemo(()=>Ve.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ve]),Gt=s.useMemo(()=>ei(Mt,gt),[Mt,gt]),Nt=s.useMemo(()=>ei(yt,gt),[yt,gt]),Wt=s.useCallback((Se,Ke)=>{const E=Ve.findIndex(pe=>pe.prefix===Se.prefix);if(!Z||Ke==="single-row")return{effectiveWidth:bt[E]??0,resolvedWidth:pt[E]??0,maxWidth:dn(E,pt)};if(Ke==="two-row-top"){const pe=Mt.findIndex(ke=>ke.prefix===Se.prefix);return{effectiveWidth:Gt.effective[pe]??0,resolvedWidth:Gt.resolved[pe]??0,maxWidth:dn(pe,Gt.resolved)}}const re=yt.findIndex(pe=>pe.prefix===Se.prefix);return{effectiveWidth:Nt.effective[re]??0,resolvedWidth:Nt.resolved[re]??0,maxWidth:dn(re,Nt.resolved)}},[Ve,yt,Nt,bt,pt,Mt,Gt,Z]),Xt=s.useCallback(Se=>Ud(Ve,pt,Me,Se)+(Z?0:N??0),[Ve,pt,Me,Z,N]),Ut=s.useCallback(()=>Z?0:N??0,[Z,N]),zt=s.useCallback(Se=>yt.slice(0,Se).reduce((Ke,E,re)=>Ke+(E.marginLeftKey?Me[E.marginLeftKey]??0:0)+(Nt.resolved[re]??0),0),[yt,Nt.resolved,Me]),Bt=s.useCallback(Se=>{const Ke=yt[Se];return zt(Se)+(Ke.marginLeftKey?Me[Ke.marginLeftKey]??0:0)+(Nt.resolved[Se]??0)},[yt,Nt.resolved,zt,Me]),jt=s.useCallback((Se,Ke,E)=>{if(!Z||E==="single-row"){const st=Se.findIndex(Qt=>Qt.prefix===Ke.prefix),St=Se.map(Qt=>gt[Qt.widthKey]),kt=no(Se.length,St);return{effectiveWidth:Do(Se.length,St)[st]??0,resolvedWidth:kt[st]??0,maxWidth:dn(st,kt)}}if(E==="two-row-top"){const st=Se.filter(Qt=>Qt.prefix==="title1"),St=st.findIndex(Qt=>Qt.prefix===Ke.prefix),{resolved:kt,effective:nn}=ei(st,gt);return{effectiveWidth:nn[St]??0,resolvedWidth:kt[St]??0,maxWidth:dn(St,kt)}}const re=Se.filter(st=>st.prefix==="title2"||st.prefix==="title3"),pe=re.findIndex(st=>st.prefix===Ke.prefix),{resolved:ke,effective:Ue}=ei(re,gt);return{effectiveWidth:Ue[pe]??0,resolvedWidth:ke[pe]??0,maxWidth:dn(pe,ke)}},[gt,Z]),Lt=(Se,Ke,E)=>{const re=Se.marginLeftKey?Me[Se.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:ke,maxWidth:Ue}=E??Wt(Se,Ke),st=Math.max(re,Jn),St=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:V(pe),...re>0?{marginLeft:V(re)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),St&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:V(-re),width:V(st),height:"100%",pointerEvents:"auto"}}):null,St?a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:V(-yn/2),width:V(yn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},W=(Se="two-row")=>{const Ke=Ve.findIndex(pe=>pe.prefix==="title1"),E=Ke>=0?pt[Ke]:gt.title1Width,re=Se==="two-row"&&o;return a.jsx("div",{...re?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(E)}:{},style:{width:V(N??0),flexShrink:0,alignSelf:"stretch",...re?{pointerEvents:"auto"}:{}}})},Re=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),We=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:Yf(ye,ue,w,t)}),Ge=()=>Tt?o&&ft?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[We(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${La(K)} + ${K}))`,width:La(K),height:"100%",pointerEvents:"auto",zIndex:3}})]}):We():null,ut=()=>!Tt&&!ft?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ht,children:[Ge(),ft?wt():null]}),_t=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Re():null,Dt?W("single-row"):null,Pt(ne),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ut(),Tn()]}),lt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Tt||$t?Re():null,Dt?W("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:we&&L?{minHeight:L}:void 0,children:[a.jsx("div",{ref:et,className:Ot,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ui(te||ne)}),a.jsxs("div",{ref:nt,className:Ot,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%",...we&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[dt&&we?a.jsx("div",{className:`${Kt} ${e}-titles-fade-out`,children:ui(dt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ui(ne)})]})]}),ut(),Tn()]}),wt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:z.scalingValue(_??0,i),height:z.scalingValue(_??0,i),marginRight:se,"--close-icon-hover-color":m},children:[a.jsx("button",{ref:fe,type:"button",className:`${e}-close-icon-inner`,onClick:qe,"aria-label":"Close",children:a.jsx(ln,{url:M??"",fill:A,hoverFill:i&&!r?A:m,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"}})]}),Vt=(Se,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Tt||$t?Re():null,Dt?W("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ut()]}),Pt=Se=>{if(!Se)return null;const Ke=Qn(e,Se,k,ae,q);return a.jsx(a.Fragment,{children:Ke.map(E=>Lt(E,"single-row",jt(Ke,E,"single-row")))})},rn=Se=>{if(!Se)return null;const Ke=Qn(e,Se,k,ae,q),E=Ke.find(re=>re.prefix==="title1");return E?Lt(E,"two-row-top",jt(Ke,E,"two-row-top")):null},pn=(Se,Ke=!1)=>{const E=Se?Qn(e,Se,k,ae,q):[],re=E.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),pe=o&&Ke;return re.length>0||pe||(R??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[re.map(Ue=>Lt(Ue,"two-row-bottom",jt(E,Ue,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[ua(),pa()]}):null]}):null,(R??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:tn,width:"100%",flexShrink:0,pointerEvents:pe?"auto":"none"}}):null]}):null},di=(Se,Ke=!1)=>a.jsxs(a.Fragment,{children:[Vt(rn(Se)),pn(Se,Ke)]}),ui=Se=>Z?a.jsx("div",{className:`${e}-titles-row-two-row`,children:di(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Pt(Se)}):null,tr=()=>{const Se=Z?-1:Ve.findIndex(re=>re.prefix==="title1"),Ke=!Z&&(o||(N??0)>0)?(()=>{const re=N??0,pe=Se>=0?pt[Se]:gt.title1Width,ke=Math.max(re,Jn);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:V(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,E=Ve.flatMap((re,pe)=>{if(!re.marginLeftKey)return[];const ke=Me[re.marginLeftKey]??0,Ue=Xd(Ve,pt,Me,pe)+Ut(),st=Math.max(ke,Jn);return a.jsx("div",{"data-controls":re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[pe]),style:{position:"absolute",top:0,left:V(Ue),width:V(st),height:"100%",pointerEvents:"auto"}},re.marginLeftKey)});return Ke?[Ke,...E]:E},nr=()=>Ve.map((Se,Ke)=>{const E=dn(Ke,pt),pe=Xt(Ke)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(E),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(pe),width:V(yn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),ua=()=>yt.flatMap((Se,Ke)=>{if(!Se.marginLeftKey)return[];const E=Me[Se.marginLeftKey]??0,re=zt(Ke),pe=Math.max(E,Jn),{resolvedWidth:ke}=Wt(Se,"two-row-bottom");return a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:V(re),width:V(pe),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),pa=()=>yt.map((Se,Ke)=>{const{maxWidth:E}=Wt(Se,"two-row-bottom"),pe=Bt(Ke)-yn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(E),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:V(pe),width:V(yn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),Tn=()=>!o||Z?null:a.jsxs(a.Fragment,{children:[tr(),nr()]}),Mi=Se=>{const Ke=!Se.objectFit&&zn(x);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:T,maxHeight:j,...Ke?{"--image-aspect-ratio":ca(x)}:{}}}},ir=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:zn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},pi=Se=>{if(Se.length===0)return null;const Ke=Se.length>1,E=La(ee),re=`calc(-0.5 * (${E} + ${ee}))`;if(Se.length===1){const pe=Se[0];return a.jsx("div",{...Mi(pe),children:a.jsx("img",{...ir(pe),src:pe.url,alt:pe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:ee}:void 0,children:Se.map((pe,ke)=>a.jsxs("div",{...Mi(pe),children:[a.jsx("img",{...ir(pe),src:pe.url,alt:pe.name??"",draggable:!1}),o&&Ke&&ke<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:re,width:E,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${pe.url}-${ke}`))})},or=!!(ne!=null&&ne.title2||ne!=null&&ne.title3||dt!=null&&dt.title2||dt!=null&&dt.title3||(R??0)>0||o),ma=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:et,className:Ot,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:di(te||ne)}),a.jsxs("div",{ref:nt,className:`${e}-titles-row-two-row`,style:{...we&&L?{minHeight:L}:void 0,...we&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[Vt(a.jsxs("div",{className:Ot,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%"},children:[dt&&we?a.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:rn(dt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:rn(ne)})]}),we&&L?L:void 0),or?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[dt&&we?a.jsx("div",{className:`${Kt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:pn(dt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Z?` ${e}-titles-layer-in-stacked`:""}`,children:pn(ne,!0)})]}):null]})]}),ga=()=>{const Se=or;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Se?void 0:{flex:"0 0 auto",height:"auto"},children:di(ne,!0)}),Tn()]})};return a.jsxs("div",{ref:Be,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Pe||qe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:Ee?1:0,transition:"opacity 300ms ease",pointerEvents:Ee?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:f,...je}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ye,...Le,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ie,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&ye.length>1?"true":"false",onPointerDown:xe?ht:void 0,onPointerUp:xe?It:void 0,onPointerCancel:xe?Et:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[mt&&F?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&De(me)},children:a.jsx("div",{className:`${e}-slide-area`,children:pi(mt.images)})},`slide-out-${me}`):null,a.jsx("div",{className:`${e}-slide-layer-in${F?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:de?pi(de.images):null})},`slide-in-${me}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:be,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ce,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Z?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${Z?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&a.jsx("div",{className:`${e}-text-bar-cell${Z?` ${e}-text-bar-cell-stacked`:""}`,style:Z?void 0:{flex:1,minWidth:0,width:"100%"},children:Z?C==="fade"?ma():ga():C==="fade"?lt():_t()})})})]})]})]})};function P0(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 P0=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=D.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:b}=e,v=s.useRef(null),[g,h]=s.useState(!1),[f,x]=s.useState(0),S=s.useRef(!1),y=s.useRef(!1),w=s.useRef(!1),H=s.useMemo(()=>(t??[]).filter($=>Qi($).length>0),[t]),N=g&&H.length>0,U=!n,O=s.useCallback(()=>{U&&(w.current=!0,Bf(y.current,c),y.current=!1)},[U,c]),C=($=0)=>{if(H.length===0||n&&!i&&!o)return;const R=Ar(H,b),k=Math.max(0,Math.min($,R.length-1));if(x(k),U){const T=Bd();zd(k+1,c,T),y.current=!T}h(!0)},V=s.useCallback(()=>{h(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!U||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[U]),s.useEffect(()=>{if(!U||S.current)return;S.current=!0;const $=Hl(c);if(!$)return;const R=Ol($,Ar(H,b).length);R<0||(x(R),h(!0))},[H,c,U,b]),s.useEffect(()=>{if(!U)return;const $=()=>{if(w.current){w.current=!1,h(!1);return}const R=Hl(c);if(!R){h(!1);return}const k=Ol(R,Ar(H,b).length);if(k<0){h(!1);return}y.current=!1,x(k),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[H,c,U,b]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M0(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${jn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>C(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...jn(p)?{"--image-aspect-ratio":ca(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${jn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),N&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Vn.createPortal(a.jsx(E0,{prefix:d,entries:H,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:U,journalItemId:c,onBeforeClose:O,onClose:V}),$)})()]})},k0=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15771
+ `}const k0=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:d}=z.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:w}=e,x=s.useRef(null),[f,h]=s.useState(!1),[y,b]=s.useState(0),C=s.useRef(!1),v=s.useRef(!1),S=s.useRef(!1),H=s.useMemo(()=>(t??[]).filter($=>to($).length>0),[t]),N=f&&H.length>0,U=!n,O=s.useCallback(()=>{U&&(S.current=!0,Vf(v.current,c),v.current=!1)},[U,c]),R=($=0)=>{if(H.length===0||n&&!i&&!o)return;const M=Ar(H,w),_=Math.max(0,Math.min($,M.length-1));if(b(_),U){const A=Gd();Vd(_+1,c,A),v.current=!A}h(!0)},B=s.useCallback(()=>{h(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!U||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[U]),s.useEffect(()=>{if(!U||C.current)return;C.current=!0;const $=Ol(c);if(!$)return;const M=Dl($,Ar(H,w).length);M<0||(b(M),h(!0))},[H,c,U,w]),s.useEffect(()=>{if(!U)return;const $=()=>{if(S.current){S.current=!1,h(!1);return}const M=Ol(c);if(!M){h(!1);return}const _=Dl(M,Ar(H,w).length);if(_<0){h(!1);return}v.current=!1,b(_),h(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[H,c,U,w]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P0(d)}}),u?a.jsx("button",{type:"button",className:`${d}-cover ${zn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...zn(p)?{"--image-aspect-ratio":ca(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${d}-cover-image ${zn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),N&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(M0,{prefix:d,entries:H,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:U,journalItemId:c,onBeforeClose:O,onClose:B}),$)})()]})},A0=`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
- `,A0="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>'),yi={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 F0(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _0=ii.reduce((e,t)=>({...e,...F0(t)}),{}),W0=ii.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Na(e){return ii.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const N0=Kf(),H0={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"}},..._0,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:A0,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...W0,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,...Na({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,...Na({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,...Na({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:[N0]}],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"}]}]}},O0={element:P0,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:H0,sourceCode:k0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...ii.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...ii.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})}},D0={sizeType:"custom",value:700,min:400,max:700};function Vr(e,t){return{widthPx:e,heightPx:e*t}}function ds(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 pc(e,t,n,i){const{heightPx:o}=Vr(n,i);return ds(e/2,t/2,e,t,n,o)}function cu(e,t,n){for(const i of n){const{heightPx:o}=Vr(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 j0(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":cu(e,t,n)||r==="area"?l??"none":d??"none"}function mc(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 z0(e){return`
16536
+ `,F0="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),vi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function _0(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...vi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...vi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...vi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...vi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...vi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...vi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const W0=oi.reduce((e,t)=>({...e,..._0(t)}),{}),N0=oi.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Goudy Bookletter 1911",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Na(e){return oi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const H0=Zf(),O0={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"}},...W0,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:F0,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...N0,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,...Na({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,...Na({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,...Na({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:[H0]}],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"}]}]}},D0={element:k0,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:O0,sourceCode:A0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...oi.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{...oi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})}},j0={sizeType:"custom",value:700,min:400,max:700};function Vr(e,t){return{widthPx:e,heightPx:e*t}}function ds(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 mc(e,t,n,i){const{heightPx:o}=Vr(n,i);return ds(e/2,t/2,e,t,n,o)}function uu(e,t,n){for(const i of n){const{heightPx:o}=Vr(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 z0(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":uu(e,t,n)||r==="area"?l??"none":d??"none"}function gc(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 B0(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 B0(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 V0(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await B0(i)]));return new Map(n)}function G0({settings:e,content:t=[],isEditor:n}){const{prefix:i}=D.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[b,v]=s.useState({x:0,y:0}),[g,h]=s.useState("none"),f=s.useRef({x:0,y:0}),[x,S]=s.useState(!1),[y,w]=s.useState(!1),H=s.useRef(new Map),{imageSize:N=D0,cursor:U="system",target:O="area",position:C="random",visible:V="all",defaultCursor:$=null,hoverCursor:R=null}=e,k=t.filter(I=>{var W;return!!((W=I==null?void 0:I.image)!=null&&W.url)}),T=s.useMemo(()=>z0(i),[i]),m=s.useCallback((I,W,K=l)=>{if(!o)return;const ae=o.getBoundingClientRect(),de=I-ae.left,A=W-ae.top;v({x:de,y:A}),h(j0(de,A,K,o,U,O,R,$))},[o,l,U,O,R,$]);s.useEffect(()=>{const I=[...k.map(K=>K.image.url),$,R].filter(K=>!!K);if(I.length===0){H.current=new Map,w(!0);return}let W=!1;return w(!1),V0(I).then(K=>{W||(H.current=K,w(!0))}),()=>{W=!0}},[t,$,R]),s.useEffect(()=>{if(!o)return;const I=K=>{K.stopPropagation(),f.current={x:K.clientX,y:K.clientY},m(K.clientX,K.clientY)},W=()=>{x&&m(f.current.x,f.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",W,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",W,!0)}},[o,x,m]),s.useEffect(()=>{!o||!x||m(f.current.x,f.current.y)},[l,o,x,m]),s.useEffect(()=>{x||h("none")},[x]);const M=(I,W,K,ae={})=>{var Q,be;if(!((Q=I==null?void 0:I.image)!=null&&Q.url))return null;const de=((be=H.current.get(I.image.url))==null?void 0:be.aspectRatio)??1,A=mc(I.image.url,N,H.current),{heightPx:he}=Vr(A,de);let q=0,ce=0;return C==="same"?{x:q,y:ce}=pc(W,K,A,de):(q=ae.x??Math.random()*W,ce=ae.y??Math.random()*K,{x:q,y:ce}=ds(q,ce,W,K,A,he)),{id:p.current++,url:I.image.url,link:I.link,name:I.image.name,x:q,y:ce,xRatio:q/W,yRatio:ce/K,aspectRatio:de,widthPx:A}},E=()=>{if(!o)return;const I=o.getBoundingClientRect(),W=I.width,K=I.height;W===0||K===0||d(ae=>ae.length===0?ae:ae.map(de=>{const A=N.sizeType==="random"?de.widthPx:mc(de.url,N,H.current),{heightPx:he}=Vr(A,de.aspectRatio);if(C==="same"){const{x:Q,y:be}=pc(W,K,A,de.aspectRatio);return{...de,x:Q,y:be,widthPx:A}}const{x:q,y:ce}=ds(de.xRatio*W,de.yRatio*K,W,K,A,he);return{...de,x:q,y:ce,widthPx:A}}))};s.useEffect(()=>{if(!o||k.length===0||!y)return;const I=o.getBoundingClientRect(),W=I.width,K=I.height,ae=M(k[0],W,K);ae&&(d([ae]),u(k.length>1?1:0))},[N,C,o,t,y]),s.useEffect(()=>{if(!o)return;E();const I=new ResizeObserver(E);return I.observe(o),window.addEventListener("resize",E),()=>{I.disconnect(),window.removeEventListener("resize",E)}},[o,C,N,l.length]),s.useEffect(()=>{V==="last One"&&d(I=>I.length>0?[I[I.length-1]]:[])},[V]);const z=I=>{if(!o||k.length===0||!y)return;const W=o.getBoundingClientRect(),K=I.clientX-W.left,ae=I.clientY-W.top;if(O==="image"&&!cu(K,ae,l))return;let de=0,A=0;C==="on Click"?(de=K,A=ae):C==="same"?(de=W.width/2,A=W.height/2):(de=Math.random()*W.width,A=Math.random()*W.height);const he=k[c%k.length],q=M(he,W.width,W.height,{x:de,y:A});if(!q)return;const ce=V==="all"?[...l,q]:[q];d(ce),u(Q=>(Q+1)%k.length),m(I.clientX,I.clientY,ce)},ne=U==="custom"&&g!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:T}}),a.jsxs("div",{ref:r,onClick:z,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:`${i}-root`,style:{cursor:ne?"none":"default"},children:[l.map(I=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${I.y}px`,left:`${I.x}px`,width:`${I.widthPx}px`,cursor:ne?"none":"default"},children:O==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})}):a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})},I.id)),x&&ne&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${b.x}px`,top:`${b.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const q0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16571
+ `}function V0(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 G0(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await V0(i)]));return new Map(n)}function q0({settings:e,content:t=[],isEditor:n}){const{prefix:i}=z.useScopedStyles(),[o,r]=s.useState(null),[l,d]=s.useState([]),[c,u]=s.useState(0),p=s.useRef(0),[w,x]=s.useState({x:0,y:0}),[f,h]=s.useState("none"),y=s.useRef({x:0,y:0}),[b,C]=s.useState(!1),[v,S]=s.useState(!1),H=s.useRef(new Map),{imageSize:N=j0,cursor:U="system",target:O="area",position:R="random",visible:B="all",defaultCursor:$=null,hoverCursor:M=null}=e,_=t.filter(T=>{var j;return!!((j=T==null?void 0:T.image)!=null&&j.url)}),A=s.useMemo(()=>B0(i),[i]),m=s.useCallback((T,j,K=l)=>{if(!o)return;const ce=o.getBoundingClientRect(),se=T-ce.left,k=j-ce.top;x({x:se,y:k}),h(z0(se,k,K,o,U,O,M,$))},[o,l,U,O,M,$]);s.useEffect(()=>{const T=[..._.map(K=>K.image.url),$,M].filter(K=>!!K);if(T.length===0){H.current=new Map,S(!0);return}let j=!1;return S(!1),G0(T).then(K=>{j||(H.current=K,S(!0))}),()=>{j=!0}},[t,$,M]),s.useEffect(()=>{if(!o)return;const T=K=>{K.stopPropagation(),y.current={x:K.clientX,y:K.clientY},m(K.clientX,K.clientY)},j=()=>{b&&m(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,m]),s.useEffect(()=>{!o||!b||m(y.current.x,y.current.y)},[l,o,b,m]),s.useEffect(()=>{b||h("none")},[b]);const P=(T,j,K,ce={})=>{var Z,xe;if(!((Z=T==null?void 0:T.image)!=null&&Z.url))return null;const se=((xe=H.current.get(T.image.url))==null?void 0:xe.aspectRatio)??1,k=gc(T.image.url,N,H.current),{heightPx:ae}=Vr(k,se);let q=0,le=0;return R==="same"?{x:q,y:le}=mc(j,K,k,se):(q=ce.x??Math.random()*j,le=ce.y??Math.random()*K,{x:q,y:le}=ds(q,le,j,K,k,ae)),{id:p.current++,url:T.image.url,link:T.link,name:T.image.name,x:q,y:le,xRatio:q/j,yRatio:le/K,aspectRatio:se,widthPx:k}},I=()=>{if(!o)return;const T=o.getBoundingClientRect(),j=T.width,K=T.height;j===0||K===0||d(ce=>ce.length===0?ce:ce.map(se=>{const k=N.sizeType==="random"?se.widthPx:gc(se.url,N,H.current),{heightPx:ae}=Vr(k,se.aspectRatio);if(R==="same"){const{x:Z,y:xe}=mc(j,K,k,se.aspectRatio);return{...se,x:Z,y:xe,widthPx:k}}const{x:q,y:le}=ds(se.xRatio*j,se.yRatio*K,j,K,k,ae);return{...se,x:q,y:le,widthPx:k}}))};s.useEffect(()=>{if(!o||_.length===0||!v)return;const T=o.getBoundingClientRect(),j=T.width,K=T.height,ce=P(_[0],j,K);ce&&(d([ce]),u(_.length>1?1:0))},[N,R,o,t,v]),s.useEffect(()=>{if(!o)return;I();const T=new ResizeObserver(I);return T.observe(o),window.addEventListener("resize",I),()=>{T.disconnect(),window.removeEventListener("resize",I)}},[o,R,N,l.length]),s.useEffect(()=>{B==="last One"&&d(T=>T.length>0?[T[T.length-1]]:[])},[B]);const V=T=>{if(!o||_.length===0||!v)return;const j=o.getBoundingClientRect(),K=T.clientX-j.left,ce=T.clientY-j.top;if(O==="image"&&!uu(K,ce,l))return;let se=0,k=0;R==="on Click"?(se=K,k=ce):R==="same"?(se=j.width/2,k=j.height/2):(se=Math.random()*j.width,k=Math.random()*j.height);const ae=_[c%_.length],q=P(ae,j.width,j.height,{x:se,y:k});if(!q)return;const le=B==="all"?[...l,q]:[q];d(le),u(Z=>(Z+1)%_.length),m(T.clientX,T.clientY,le)},ee=U==="custom"&&f!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),a.jsxs("div",{ref:r,onClick:V,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:`${i}-root`,style:{cursor:ee?"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:ee?"none":"default"},children:O==="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&&ee&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${w.x}px`,top:`${w.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const X0=`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
- `,X0={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"]}]}]},U0={element:G0,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:X0,sourceCode:q0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Y0=100,K0=70,Un="cubic-bezier(0.86, 0, 0.07, 1)";function Z0(e){return`
17101
+ `,U0={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"]}]}]},Y0={element:q0,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:U0,sourceCode:X0,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},K0=100,Z0=70,Yn="cubic-bezier(0.86, 0, 0.07, 1)";function J0(e){return`
17102
17102
  .${e}-wrapper {
17103
17103
  position: relative;
17104
17104
  width: 100%;
@@ -17133,34 +17133,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17133
17133
  }
17134
17134
  .${e}-incoming-next {
17135
17135
  z-index: 4;
17136
- transition: transform var(--${e}-transition-ms) ${Un};
17136
+ transition: transform var(--${e}-transition-ms) ${Yn};
17137
17137
  }
17138
17138
  .${e}-incoming-prev {
17139
17139
  z-index: 4;
17140
- transition: transform var(--${e}-transition-ms) ${Un};
17140
+ transition: transform var(--${e}-transition-ms) ${Yn};
17141
17141
  }
17142
17142
  .${e}-outgoing {
17143
17143
  will-change: transform;
17144
17144
  }
17145
17145
  .${e}-outgoing-next {
17146
17146
  z-index: 3;
17147
- transition: transform var(--${e}-transition-ms) ${Un};
17147
+ transition: transform var(--${e}-transition-ms) ${Yn};
17148
17148
  }
17149
17149
  .${e}-outgoing-prev {
17150
17150
  z-index: 3;
17151
- transition: transform var(--${e}-transition-ms) ${Un};
17151
+ transition: transform var(--${e}-transition-ms) ${Yn};
17152
17152
  }
17153
17153
  .${e}-outgoing-next .${e}-effect-image {
17154
- transition: filter var(--${e}-transition-ms) ${Un};
17154
+ transition: filter var(--${e}-transition-ms) ${Yn};
17155
17155
  }
17156
17156
  .${e}-outgoing-prev .${e}-effect-image {
17157
- transition: filter var(--${e}-transition-ms) ${Un};
17157
+ transition: filter var(--${e}-transition-ms) ${Yn};
17158
17158
  }
17159
17159
  .${e}-incoming .${e}-effect-image {
17160
- transition: filter var(--${e}-transition-ms) ${Un};
17160
+ transition: filter var(--${e}-transition-ms) ${Yn};
17161
17161
  }
17162
17162
  .${e}-background .${e}-effect-image {
17163
- transition: filter var(--${e}-transition-ms) ${Un};
17163
+ transition: filter var(--${e}-transition-ms) ${Yn};
17164
17164
  }
17165
17165
  .${e}-snap .${e}-incoming,
17166
17166
  .${e}-snap .${e}-outgoing,
@@ -17208,7 +17208,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17208
17208
  display: block;
17209
17209
  pointer-events: none;
17210
17210
  }
17211
- `}function J0(e){return e==="blur"?K0:e==="greyscale"?Y0:0}function bo(e,t=1,n=1){const i=J0(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 gc(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Q0(e,t){return t<=1?0:(e-1+t)%t}function ex(e,t=1){return!e||e.height===0?t:e.width/e.height}function tx(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 hc(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 du(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function fc(e,t,n){return{...du(e),[`--${n}-stage-scale`]:t}}function nx(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 ix({settings:e,content:t,isEditor:n,isPreviewMode:i}){var ie,j,B,J,te,$e,ye;const{prefix:o}=D.useScopedStyles(),r=s.useMemo(()=>Z0(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,b=t??[],v=gc(b.length),[g,h]=s.useState(v.activeIndex),[f,x]=s.useState(v.backgroundIndex),[S,y]=s.useState(!1),[w,H]=s.useState(!1),[N,U]=s.useState(null),[O,C]=s.useState(null),[V,$]=s.useState(0),[R,k]=s.useState(1),[T,m]=s.useState("none"),[M,E]=s.useState("next"),[z,ne]=s.useState({}),[I,W]=s.useState({width:0,height:0}),K=s.useRef(null),ae=s.useRef(null),de=!n||!!i,A=l??60,he=Math.max(10,Math.min(100,d??A)),q=Math.max(10,Math.min(100,c??A)),ce=Math.max(100,u),Q=bo(p),be=s.useCallback(F=>{const ve=ex(F?z[F]:void 0);return tx(I.width,I.height,ve,he,q)},[I.height,I.width,z,q,he]);s.useEffect(()=>{const F=ae.current;if(!F)return;const ve=new ResizeObserver(([pe])=>{const{width:Z,height:me}=pe.contentRect;W({width:Z,height:me})});return ve.observe(F),()=>ve.disconnect()},[]),s.useEffect(()=>{const F=(t??[]).map(ve=>{var pe;return(pe=ve.image)==null?void 0:pe.url}).filter(ve=>!!ve);nx(F,(ve,pe)=>{ne(Z=>{var me,De;return((me=Z[ve])==null?void 0:me.width)===pe.width&&((De=Z[ve])==null?void 0:De.height)===pe.height?Z:{...Z,[ve]:pe}})})},[t]),s.useEffect(()=>{const{backgroundIndex:F,activeIndex:ve}=gc(b.length);h(ve),x(F),y(!1),H(!1),U(null),C(null),$(0),k(1),m("none"),E("next")},[b.length,t]),s.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const He=s.useCallback(F=>{var ge,G,Me,_e;if(!de||S||b.length<=1)return;const ve=F==="next"?(g+1)%b.length:(g-1+b.length)%b.length,pe=be((G=(ge=b[g])==null?void 0:ge.image)==null?void 0:G.url),Z=be((_e=(Me=b[ve])==null?void 0:Me.image)==null?void 0:_e.url),me=hc(I.width,I.height,pe),De=hc(I.width,I.height,Z);K.current&&clearTimeout(K.current),E(F),H(!0),y(!0),F==="next"?(U(g),C(ve),$(0),k(1),m(bo(p,0,1))):(x(Q0(ve,b.length)),U(ve),C(g),$(1),k(De),m(bo(p,1,De))),requestAnimationFrame(()=>{H(!1),requestAnimationFrame(()=>{F==="next"?($(1),k(me),m(bo(p,1,me))):($(0),k(1),m(bo(p,0,1)))})}),K.current=setTimeout(()=>{F==="next"&&x(g),h(ve),U(null),C(null),y(!1)},ce)},[g,p,I.height,I.width,be,S,de,b,ce]),xe=b[g],le=f!==null?b[f]:null,ee=N!==null?b[N]:null,ue=O!==null?b[O]:null,oe=b.length<=1?0:(g-1+b.length)%b.length,Fe=b.length<=1?0:(g+1)%b.length,Ce=be((ie=xe==null?void 0:xe.image)==null?void 0:ie.url),P=be((j=ee==null?void 0:ee.image)==null?void 0:j.url),Y=be((B=ue==null?void 0:ue.image)==null?void 0:B.url),X={[`--${o}-transition-ms`]:`${ce}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ae,className:yt(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:X,"aria-label":"Zoom gallery",children:[((J=le==null?void 0:le.image)==null?void 0:J.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:le.image.url,alt:"",style:{filter:Q}})}),S&&((te=ee==null?void 0:ee.image)==null?void 0:te.url)&&a.jsx("div",{className:yt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${M}`),style:fc(P,R,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ee.image.url,alt:"",style:{filter:T}})}),S&&(($e=ue==null?void 0:ue.image)==null?void 0:$e.url)&&a.jsx("div",{className:yt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${M}`),style:fc(Y,V,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:ue.image.url,alt:""})}),!S&&((ye=xe==null?void 0:xe.image)==null?void 0:ye.url)&&a.jsx("div",{className:yt(`${o}-stage`,`${o}-foreground`),style:du(Ce),children:a.jsx("img",{className:`${o}-image`,src:xe.image.url,alt:xe.image.name??""})}),de&&b.length>1&&!S&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:yt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>He("prev"),"aria-label":`Show previous image (${oe+1} of ${b.length})`}),a.jsx("button",{type:"button",className:yt(`${o}-nav`,`${o}-nav-next`),onClick:()=>He("next"),"aria-label":`Show next image (${Fe+1} of ${b.length})`})]})]})]})}const ox=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17211
+ `}function Q0(e){return e==="blur"?Z0:e==="greyscale"?K0:0}function $o(e,t=1,n=1){const i=Q0(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 ex(e,t){return t<=1?0:(e-1+t)%t}function tx(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 fc(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 pu(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function yc(e,t,n){return{...pu(e),[`--${n}-stage-scale`]:t}}function ix(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 ox({settings:e,content:t,isEditor:n,isPreviewMode:i}){var $e,g,G,F,X,me,Y;const{prefix:o}=z.useScopedStyles(),r=s.useMemo(()=>J0(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,w=t??[],x=hc(w.length),[f,h]=s.useState(x.activeIndex),[y,b]=s.useState(x.backgroundIndex),[C,v]=s.useState(!1),[S,H]=s.useState(!1),[N,U]=s.useState(null),[O,R]=s.useState(null),[B,$]=s.useState(0),[M,_]=s.useState(1),[A,m]=s.useState("none"),[P,I]=s.useState("next"),[V,ee]=s.useState({}),[T,j]=s.useState({width:0,height:0}),K=s.useRef(null),ce=s.useRef(null),se=!n||!!i,k=l??60,ae=Math.max(10,Math.min(100,d??k)),q=Math.max(10,Math.min(100,c??k)),le=Math.max(100,u),Z=$o(p),xe=s.useCallback(L=>{const ie=tx(L?V[L]:void 0);return nx(T.width,T.height,ie,ae,q)},[T.height,T.width,V,q,ae]);s.useEffect(()=>{const L=ce.current;if(!L)return;const ie=new ResizeObserver(([oe])=>{const{width:D,height:te}=oe.contentRect;j({width:D,height:te})});return ie.observe(L),()=>ie.disconnect()},[]),s.useEffect(()=>{const L=(t??[]).map(ie=>{var oe;return(oe=ie.image)==null?void 0:oe.url}).filter(ie=>!!ie);ix(L,(ie,oe)=>{ee(D=>{var te,Ae;return((te=D[ie])==null?void 0:te.width)===oe.width&&((Ae=D[ie])==null?void 0:Ae.height)===oe.height?D:{...D,[ie]:oe}})})},[t]),s.useEffect(()=>{const{backgroundIndex:L,activeIndex:ie}=hc(w.length);h(ie),b(L),v(!1),H(!1),U(null),R(null),$(0),_(1),m("none"),I("next")},[w.length,t]),s.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]);const Ne=s.useCallback(L=>{var he,J,Ze,Fe;if(!se||C||w.length<=1)return;const ie=L==="next"?(f+1)%w.length:(f-1+w.length)%w.length,oe=xe((J=(he=w[f])==null?void 0:he.image)==null?void 0:J.url),D=xe((Fe=(Ze=w[ie])==null?void 0:Ze.image)==null?void 0:Fe.url),te=fc(T.width,T.height,oe),Ae=fc(T.width,T.height,D);K.current&&clearTimeout(K.current),I(L),H(!0),v(!0),L==="next"?(U(f),R(ie),$(0),_(1),m($o(p,0,1))):(b(ex(ie,w.length)),U(ie),R(f),$(1),_(Ae),m($o(p,1,Ae))),requestAnimationFrame(()=>{H(!1),requestAnimationFrame(()=>{L==="next"?($(1),_(te),m($o(p,1,te))):($(0),_(1),m($o(p,0,1)))})}),K.current=setTimeout(()=>{L==="next"&&b(f),h(ie),U(null),R(null),v(!1)},le)},[f,p,T.height,T.width,xe,C,se,w,le]),ye=w[f],ue=y!==null?w[y]:null,Q=N!==null?w[N]:null,de=O!==null?w[O]:null,ne=w.length<=1?0:(f-1+w.length)%w.length,Ee=w.length<=1?0:(f+1)%w.length,Te=xe(($e=ye==null?void 0:ye.image)==null?void 0:$e.url),Oe=xe((g=Q==null?void 0:Q.image)==null?void 0:g.url),ve=xe((G=de==null?void 0:de.image)==null?void 0:G.url),we={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ce,className:xt(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:we,"aria-label":"Zoom gallery",children:[((F=ue==null?void 0:ue.image)==null?void 0:F.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:Z}})}),C&&((X=Q==null?void 0:Q.image)==null?void 0:X.url)&&a.jsx("div",{className:xt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${P}`),style:yc(Oe,M,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Q.image.url,alt:"",style:{filter:A}})}),C&&((me=de==null?void 0:de.image)==null?void 0:me.url)&&a.jsx("div",{className:xt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${P}`),style:yc(ve,B,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:xt(`${o}-stage`,`${o}-foreground`),style:pu(Te),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),se&&w.length>1&&!C&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:xt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ne("prev"),"aria-label":`Show previous image (${ne+1} of ${w.length})`}),a.jsx("button",{type:"button",className:xt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ne("next"),"aria-label":`Show next image (${Ee+1} of ${w.length})`})]})]})]})}const rx=`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
- `,rx={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:""}}]}},ax={element:ix,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:rx,sourceCode:ox,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},sx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},lx=["hover","active"],Ha={left:"flex-start",center:"center",right:"flex-end"};function cx(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 dx(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){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}`,b=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,v=`.${e}-button:hover, ${b}`,g=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17730
+ `,ax={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:""}}]}},sx={element:ox,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:ax,sourceCode:rx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},lx={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},cx=["hover","active"],Ha={left:"flex-start",center:"center",right:"flex-end"};function dx(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 px(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}`,w=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${w}`,f=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
  }
@@ -17759,11 +17759,11 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17759
17759
  .${e}-wrapper.${e}-editing .${e}-button {
17760
17760
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
17761
17761
  }
17762
- ${g("scale-up")},
17762
+ ${f("scale-up")},
17763
17763
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-scale-up {
17764
17764
  transform: scale(1.05);
17765
17765
  }
17766
- ${g("lift")},
17766
+ ${f("lift")},
17767
17767
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-lift {
17768
17768
  transform: translateY(-2px);
17769
17769
  box-shadow: ${p};
@@ -17825,9 +17825,9 @@ a:focus-visible .${e}-hover-effect-swipe::before,
17825
17825
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe::before {
17826
17826
  transform: translateX(0);
17827
17827
  }
17828
- ${g("reveal")},
17828
+ ${f("reveal")},
17829
17829
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-reveal,
17830
- ${g("swipe")},
17830
+ ${f("swipe")},
17831
17831
  .${e}-wrapper.${e}-state-hover .${e}-hover-effect-swipe {
17832
17832
  background-color: var(--${e}-background-color);
17833
17833
  }
@@ -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
+ ${x} {
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 Oa(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 yc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(ln,{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=D.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 px({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=D.useScopedStyles(),l=s.useMemo(()=>ux(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:b,order:v="text-icon",gap:g=0,iconSize:h=0,iconWidthC:f=0,dimensions:x=!1,padding:S={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:H="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:U="rgba(0, 0, 0, 0)",stroke:O=0,blur:C=0,backgroundColor:V="#000000",textColor:$="#ffffff",borderColor:R="#ffffff",iconColor:k="#ffffff",hoverEffect:T="none",fontFamily:m,fontSettings:M,fontSize:E,lineHeight:z,letterSpacing:ne=0,wordSpacing:I=0,textAppearance:W,stateOverrides:K,minWidth:ae=0,minHeight:de=0,width:A=0,height:he=0}=e,q=D.buildColorVars(r,{backgroundColor:V,textColor:$,borderColor:R,iconColor:k,boxShadowColor:H,innerBoxShadowColor:U},sx,lx,K),ce=i&&i!=="default"?`${r}-state-${i}`:"",Q=t&&!n?`${r}-editing`:"",be=T!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${T}`:"",He=T==="reveal"||T==="swipe",xe=T==="content-roll",le=T==="reveal"&&(!t||n),ee=x===!0,oe=d==="a"?b??p:p,Fe=d==="c",Ce=d!=="b",P={fontSettings:{fontFamily:m,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:E??.01,lineHeight:z,letterSpacing:ne,wordSpacing:I,textAppearance:W,color:$},X={...Ce?sn(Yt(P,t)):{},[`--${r}-box-shadow-x`]:D.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:D.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:D.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:D.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:D.scalingValue(N.left,t),[`--${r}-inner-box-shadow-y`]:D.scalingValue(N.top,t),[`--${r}-inner-box-shadow-blur`]:D.scalingValue(N.right,t),[`--${r}-inner-box-shadow-spread`]:D.scalingValue(N.bottom,t),[`--${r}-backdrop-blur`]:C>0?`blur(${D.scalingValue(C,t)})`:void 0,paddingTop:D.scalingValue(S.top,t),paddingRight:D.scalingValue(S.right,t),paddingBottom:D.scalingValue(S.bottom,t),paddingLeft:D.scalingValue(S.left,t),borderRadius:D.scalingValue(y,t),borderWidth:D.scalingValue(O,t),...Fe?{}:{justifyContent:Ha[oe],textAlign:oe},...Fe&&!xe?{gap:D.scalingValue(g,t)}:{},...ee?{width:D.scalingValue(A,t),height:D.scalingValue(he,t)}:{minWidth:D.scalingValue(ae,t),minHeight:D.scalingValue(de,t),...Fe?{width:"100%"}:{}}};let ie;const j={display:"inline-flex",alignItems:"center",justifyContent:Fe?Ha[oe]:Ha[d==="a"?oe:"center"],gap:Fe?D.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:oe}:{}};if(d==="b"){const te=()=>yc(r,u,h>0?"fixed":"fill",100,h,t);ie=xe?Oa(r,te,`${r}-icon-roll`,void 0,j):te()}else if(d==="c"){const te=()=>{const $e=a.jsx("span",{className:`${r}-text`,style:{textAlign:oe},children:c}),ye=yc(r,u,f>0?"fixed":"fill",100,f,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[ye,$e]}):a.jsxs(a.Fragment,{children:[$e,ye]})};ie=xe?Oa(r,te,`${r}-icon-text-roll`,void 0,j):te()}else ie=xe?Oa(r,()=>c,`${r}-label-roll`,void 0,j):He?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const B=le?te=>cx(te,r):void 0,J=le?te=>dx(te,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} ${Q}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:X,onMouseEnter:B,onMouseLeave:J,role:"button",tabIndex:o||t&&!n?void 0:0,children:ie})})})]})}const mx=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17972
+ `}function Oa(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 vc(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(ln,{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=z.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 mx({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=z.useScopedStyles(),l=s.useMemo(()=>px(r),[r]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:w,order:x="text-icon",gap:f=0,iconSize:h=0,iconWidthC:y=0,dimensions:b=!1,padding:C={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:H="rgba(0, 0, 0, 0)",innerBoxShadow:N={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:U="rgba(0, 0, 0, 0)",stroke:O=0,blur:R=0,backgroundColor:B="#000000",textColor:$="#ffffff",borderColor:M="#ffffff",iconColor:_="#ffffff",hoverEffect:A="none",fontFamily:m,fontSettings:P,fontSize:I,lineHeight:V,letterSpacing:ee=0,wordSpacing:T=0,textAppearance:j,stateOverrides:K,minWidth:ce=0,minHeight:se=0,width:k=0,height:ae=0}=e,q=z.buildColorVars(r,{backgroundColor:B,textColor:$,borderColor:M,iconColor:_,boxShadowColor:H,innerBoxShadowColor:U},lx,cx,K),le=i&&i!=="default"?`${r}-state-${i}`:"",Z=t&&!n?`${r}-editing`:"",xe=A!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${A}`:"",Ne=A==="reveal"||A==="swipe",ye=A==="content-roll",ue=A==="reveal"&&(!t||n),Q=b===!0,ne=d==="a"?w??p:p,Ee=d==="c",Te=d!=="b",Oe={fontSettings:{fontFamily:m,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:I??.01,lineHeight:V,letterSpacing:ee,wordSpacing:T,textAppearance:j,color:$},we={...Te?sn(Zt(Oe,t)):{},[`--${r}-box-shadow-x`]:z.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:z.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:z.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:z.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:z.scalingValue(N.left,t),[`--${r}-inner-box-shadow-y`]:z.scalingValue(N.top,t),[`--${r}-inner-box-shadow-blur`]:z.scalingValue(N.right,t),[`--${r}-inner-box-shadow-spread`]:z.scalingValue(N.bottom,t),[`--${r}-backdrop-blur`]:R>0?`blur(${z.scalingValue(R,t)})`:void 0,paddingTop:z.scalingValue(C.top,t),paddingRight:z.scalingValue(C.right,t),paddingBottom:z.scalingValue(C.bottom,t),paddingLeft:z.scalingValue(C.left,t),borderRadius:z.scalingValue(v,t),borderWidth:z.scalingValue(O,t),...Ee?{}:{justifyContent:Ha[ne],textAlign:ne},...Ee&&!ye?{gap:z.scalingValue(f,t)}:{},...Q?{width:z.scalingValue(k,t),height:z.scalingValue(ae,t)}:{minWidth:z.scalingValue(ce,t),minHeight:z.scalingValue(se,t),...Ee?{width:"100%"}:{}}};let $e;const g={display:"inline-flex",alignItems:"center",justifyContent:Ee?Ha[ne]:Ha[d==="a"?ne:"center"],gap:Ee?z.scalingValue(f,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:ne}:{}};if(d==="b"){const X=()=>vc(r,u,h>0?"fixed":"fill",100,h,t);$e=ye?Oa(r,X,`${r}-icon-roll`,void 0,g):X()}else if(d==="c"){const X=()=>{const me=a.jsx("span",{className:`${r}-text`,style:{textAlign:ne},children:c}),Y=vc(r,u,y>0?"fixed":"fill",100,y,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[Y,me]}):a.jsxs(a.Fragment,{children:[me,Y]})};$e=ye?Oa(r,X,`${r}-icon-text-roll`,void 0,g):X()}else $e=ye?Oa(r,()=>c,`${r}-label-roll`,void 0,g):Ne?a.jsx("span",{className:`${r}-button-inner`,children:c}):c;const G=ue?X=>dx(X,r):void 0,F=ue?X=>ux(X,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 ${le} ${Z}`.trim(),children:a.jsx("div",{className:`${r}-button ${xe}`.trim(),style:we,onMouseEnter:G,onMouseLeave:F,role:"button",tabIndex:o||t&&!n?void 0:0,children:$e})})})]})}const gx=`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
- `,gx={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},hx=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],fx={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:{...gx.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:[...hx],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"]},yx={element:px,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:fx,sourceCode:mx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function vx(e){return`
18604
+ `,hx={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},fx=["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:{...hx.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:[...fx],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"]},vx={element:mx,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:gx,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function xx(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 Rn=500,wo=650,gn="cubic-bezier(0.22, 1, 0.36, 1)",xx=72,bx=50,wx=1e4,Sx=650,$x=500;function Cx(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 uu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=jr(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 Tx(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?uu(i,n):null}function Lx(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 Lo(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 vc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Lo(e,i,n)}const Rx=.03;function pu(e){return e.width*Rx}const Da={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function vr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function xc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ix(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function us(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 Ex(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:us(e,t.width,t.height)}function Mx(e,t){if(da(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Px(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 kx({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>da(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function so(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:d}=n,c=pu(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 Gr(e,t,n){const i=so(e,t,n);return{...i,left:2*i.left-e.left}}function Ax(e,t,n){const{left:i,width:o}=n,r=pu(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 mu(e,t,n,i){const o=so(e,"left",i),r=so(e,"right",i),l=Gr(e,"left",i),d=Gr(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 Fx(e,t,n,i){const{start:o,end:r}=mu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function _x(e,t,n){const i=so(e,t,n),o=Gr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function da(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Wx({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 xr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return da(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Nx({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:b,sourceRect:v,resolveCloseSourceRect:g,onClose:h,onPrev:f,onNext:x}){const S=s.useRef(null),y=s.useRef(null),w=s.useRef(null),H=s.useRef(new Map),[N,U]=s.useState(0),O=s.useRef(null),C=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),R=s.useRef(!1),k=s.useRef(!1),T=s.useRef(!1),m=s.useRef(null),M=s.useRef(null),E=s.useRef(null),z=s.useRef(()=>{}),ne=s.useRef(null),I=s.useRef(null),W=s.useRef(null),K=s.useRef(!1),[ae,de]=s.useState(null),[A,he]=s.useState(Da),[q,ce]=s.useState(0),[Q,be]=s.useState("opening"),[He,xe]=s.useState(0),[le,ee]=s.useState(0),[ue,oe]=s.useState(!1),[Fe,Ce]=s.useState(null),[P,Y]=s.useState(null),[X,ie]=s.useState(null),[j,B]=s.useState(!1),[J,te]=s.useState(null),[$e,ye]=s.useState(!1),F=s.useRef(!1),[ve,pe]=s.useState(!1),[Z,me]=s.useState(!1),De=s.useRef(n),ge=s.useRef(void 0),G=t[n],Me=G?da(G):!1,_e=le!==0||ue,rt=!l&&(!r||!!d),Je=c&&!l,at=u.length>1,it=s.useCallback((_,Ie)=>t.length<=1?null:t[(_+Ie+t.length)%t.length]??null,[t]),je=at?Lo(u,p,-1):it(n,-1),Se=at?Lo(u,p,1):it(n,1),We=Fe===-1&&_e?at&&P!==null?Lo(u,P,-1):X!==null?it(X,-1):null:null,Be=Fe===1&&_e?at&&P!==null?Lo(u,P,1):X!==null?it(X,1):null:null,Ze=We&&We.url!==(je==null?void 0:je.url)?We:null,Le=Be&&Be.url!==(Se==null?void 0:Se.url)?Be:null,Ve=je&&Je?(()=>{const _=at?vc(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return _&&_.url!==je.url?_:null})():null,se=Se&&Je?(()=>{const _=at?vc(u,p,1):t.length>2?it((n+1)%t.length,1):null;return _&&_.url!==Se.url?_:null})():null,Te=Ze??Ve,Xe=Le??se,ze=s.useCallback((_,Ie,Ne)=>{if(!_||!Ie||!Ne)return;const Ge=H.current,dt=Ge.get(_);(dt==null?void 0:dt.width)===Ie&&(dt==null?void 0:dt.height)===Ne||(Ge.set(_,{width:Ie,height:Ne}),U(Ft=>Ft+1))},[]),Re=s.useCallback(_=>{if(!(_!=null&&_.url))return null;const Ie=H.current.get(_.url);return Ex(y.current,Ie)},[N,q]),Pe=s.useCallback(()=>{if(!G)return;const _=Re(G);if(_){de(_);return}const Ie=y.current;Ie&&de(xc(Ie))},[G,Re]),Ae=s.useCallback(_=>{if(at){const Ie=u.length;Y((p+_+Ie)%Ie),ie(null);return}t.length>1&&(ie((n+_+t.length)%t.length),Y(null))},[at,u.length,p,t.length,n]),Ke=s.useCallback(_=>{T.current=_,oe(_)},[]),Oe=s.useCallback(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),Qe=s.useCallback(()=>{Oe(),m.current=window.setTimeout(()=>{Oe(),Ke(!1)},wo+32)},[Oe,Ke]),tt=s.useCallback(()=>{const _=S.current;if(!_){he({left:0,top:0,width:typeof window<"u"?window.innerWidth:Da.width,height:typeof window<"u"?window.innerHeight:Da.height});return}const Ie=_.getBoundingClientRect();he({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),nt=s.useCallback((_,Ie)=>{if(_e){if(ve&&!ue)return`translate(${le}px, 0px)`;if(ue&&Fe!==null){const Ne=Re(_);if(!Ne)return;const{x:Ge,y:dt}=Fx(Ne,Ie,Fe,A);return`translate(${Ge}px, ${dt}px)`}if(ue)return"translate(0px, 0px)"}},[_e,ve,ue,le,Fe,A,Re]),xt=s.useCallback(()=>{const _=M.current;M.current=null,Oe(),Ke(!1),Ce(null),Y(null),ie(null),ee(0),pe(!1),R.current=!1,V.current=0,$.current="none",_===-1?f():_===1&&x()},[Oe,Ke,f,x]),It=s.useCallback(()=>{Oe(),m.current=window.setTimeout(()=>{M.current!==null&&xt()},wo+32)},[Oe,xt]),Tt=s.useCallback(()=>{Oe(),M.current=null,Ke(!1),Ce(null),Y(null),ie(null),ee(0),pe(!1),R.current=!1,V.current=0,$.current="none"},[Oe,Ke]),ut=s.useCallback(_=>{if(!(!Je||!ae)){if(T.current){if(M.current===_){E.current=_,xt();return}Tt()}Oe(),Ae(_),M.current=_,Ce(_),Ke(!0),It()}},[Je,ae,xt,Tt,Oe,Ae,Ke,It]);z.current=ut;const ft=s.useCallback(()=>{ne.current=null,K.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),W.current!==null&&(window.clearTimeout(W.current),W.current=null)},[]),Et=s.useCallback(_=>{I.current!==null&&window.clearInterval(I.current);const Ie=K.current?$x:Sx;I.current=window.setInterval(()=>{z.current(_)},Ie)},[]),Lt=s.useCallback(_=>{ne.current!==_&&(ft(),ne.current=_,K.current=!1,z.current(_),Et(_),W.current=window.setTimeout(()=>{W.current=null,ne.current===_&&(K.current=!0,Et(_))},wx))},[ft,Et]),bt=s.useCallback(()=>{const _=y.current;if(!_)return;const Ie=G==null?void 0:G.url,Ne=Ie?H.current.get(Ie):void 0;if(Ne!=null&&Ne.width&&(Ne!=null&&Ne.height)){de(us(_,Ne.width,Ne.height));return}const Ge=w.current;if(Ge&&Ie&&(Ge.src===Ie||Ge.currentSrc===Ie)){const{width:Ft,height:lt}=Ix(Ge);if(Ft&&lt){ze(Ie,Ft,lt),de(us(_,Ft,lt));return}}const dt=xc(_);!dt.width||!dt.height||de(dt)},[G==null?void 0:G.url,ze]),Nt=s.useCallback(_=>{if(w.current=_,!!_){if(_ instanceof HTMLVideoElement){_.readyState>=1&&_.videoWidth>0&&bt();return}_.complete&&_.naturalWidth>0&&bt()}},[bt]),Bt=s.useCallback(()=>{tt(),bt(),ce(_=>_+1)},[tt,bt]);s.useEffect(()=>{Bt();const _=y.current,Ie=S.current,Ne=new ResizeObserver(()=>Bt());return _&&Ne.observe(_),Ie&&Ne.observe(Ie),window.addEventListener("resize",Bt),()=>{Ne.disconnect(),window.removeEventListener("resize",Bt)}},[Bt,n,b]),s.useLayoutEffect(()=>{if(!G)return;const _=w.current;if(_){if(_ instanceof HTMLImageElement&&_.complete&&_.naturalWidth>0){bt();return}_ instanceof HTMLVideoElement&&_.readyState>=1&&_.videoWidth>0&&bt()}},[G==null?void 0:G.url,n,bt]),s.useEffect(()=>{Pe()},[Pe,N]),s.useEffect(()=>{const _=new Set,Ie=[],Ne=Ge=>{!(Ge!=null&&Ge.url)||_.has(Ge.url)||(_.add(Ge.url),Ie.push(Ge))};t.forEach(Ne),u.forEach(Ge=>Ge.items.forEach(Ne)),Ie.forEach(Ge=>{H.current.has(Ge.url)||Mx(Ge,ze)})},[t,u,ze]),s.useEffect(()=>{if(Q!=="opening"||!ae)return;if(!v){be("open");return}B(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{B(!0),be("open")})});return()=>cancelAnimationFrame(_)},[Q,ae,v]),s.useEffect(()=>{if(Q!=="closing")return;const _=setTimeout(()=>h(),Rn);return()=>clearTimeout(_)},[Q,h]),s.useEffect(()=>()=>{Oe()},[Oe]),s.useLayoutEffect(()=>{De.current===n&&ge.current===(G==null?void 0:G.url)||(Oe(),M.current=null,Ce(null),Y(null),ie(null),xe(0),ee(0),Ke(!1),me(!1),pe(!1),C.current=0,V.current=0,$.current="none",R.current=!1,O.current=null,k.current=!1,w.current=null,Pe(),De.current=n,ge.current=G==null?void 0:G.url)},[n,G==null?void 0:G.url,Ke,Oe,Pe]),s.useLayoutEffect(()=>{const _=E.current;_!==null&&(E.current=null,requestAnimationFrame(()=>{z.current(_)}))},[n,p,G==null?void 0:G.url]),s.useLayoutEffect(()=>{if(Q==="opening"){F.current=!1,ye(!1);return}if(Q!=="open"||F.current)return;if(!je&&!Se){F.current=!0;return}ye(!1);const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ye(!0),F.current=!0})});return()=>cancelAnimationFrame(_)},[Q,je==null?void 0:je.url,Se==null?void 0:Se.url]),s.useEffect(()=>{if(Q!=="open")return;const _=()=>{const lt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Ie=lt=>{const wt=lt<0?1:-1;Oe(),Ae(wt),M.current=wt,Ce(wt),Ke(!0),It()},Ne=lt=>{if(Math.abs(lt)>bx&&Je){Ie(lt);return}M.current=null,Ce(null),Y(null),ie(null),Ke(!0),ee(0),Qe()},Ge=lt=>{if(lt.touches.length!==1||T.current)return;const wt=lt.touches[0];k.current=!0,O.current={x:wt.clientX,y:wt.clientY},$.current="none",V.current=0,R.current=!1},dt=lt=>{if(!O.current||lt.touches.length!==1||T.current)return;const wt=lt.touches[0],zt=wt.clientX-O.current.x,Pt=wt.clientY-O.current.y;if($.current==="none"){if(Math.abs(zt)<10&&Math.abs(Pt)<10)return;if(Math.abs(zt)>Math.abs(Pt)){if(!Je)return;$.current="horizontal"}else if(Pt>0){if(!rt)return;$.current="vertical"}else return}if($.current==="horizontal"){R.current=!0,pe(!0),V.current=zt,ee(zt),lt.preventDefault();return}$.current==="vertical"&&(R.current=!0,pe(!0),C.current=Pt,xe(Pt),lt.preventDefault())},Ft=()=>{if(!O.current)return;const lt=$.current,wt=R.current;if(wt&&lt==="horizontal")Ne(V.current),_();else if(wt&&lt==="vertical"){const zt=C.current;if(rt&&zt>xx){const Pt=window.innerHeight;C.current=Pt,me(!0),xe(Pt),be("closing")}else C.current=0,xe(0);_()}else lt==="horizontal"&&Math.abs(V.current)>0&&(Ne(V.current),_());O.current=null,$.current="none",V.current=0,R.current=!1,pe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",dt,{passive:!1}),document.addEventListener("touchend",Ft),document.addEventListener("touchcancel",Ft),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",dt),document.removeEventListener("touchend",Ft),document.removeEventListener("touchcancel",Ft)}},[Q,Je,Ke,Qe,Oe,rt,It,Ae]);const Zt=s.useCallback(()=>{const _=(g==null?void 0:g())??v??null;_&&ae&&(te(_),B(!0)),be("closing")},[g,v,ae]);s.useEffect(()=>{const _=Ge=>{if(Ge.key==="Escape"){if(r&&d||Q==="closing")return;ft(),Zt();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||Q!=="open"||!Je)return;Ge.preventDefault();const dt=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&ne.current===dt||Lt(dt)},Ie=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const dt=Ge.key==="ArrowLeft"?-1:1;ne.current===dt&&ft()},Ne=()=>{ft()};return window.addEventListener("keydown",_),window.addEventListener("keyup",Ie),window.addEventListener("blur",Ne),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",Ne),ft()}},[Q,r,d,Zt,Je,Lt,ft]),s.useEffect(()=>{Q!=="open"&&ft()},[Q,ft]);const en=()=>{Q==="closing"||l||Zt()},Rt=Q==="open",Ot=Q==="closing",nn=He>0?Math.max(0,1-He/500):1,pt=He>0?Math.max(.35,1-He/500):1,Ee=s.useCallback(_=>{if(!(_.propertyName!=="transform"||!T.current)){if(M.current!==null){xt();return}Oe(),Ke(!1)}},[Oe,Ke,xt]),qe=Q==="closing"?J??v:v,st=qe&&ae&&(Q==="opening"||Ot)?Cx(qe,ae):void 0,mt=_e&&G?nt(G,"center"):He>0?`translateY(${He}px)`:st,vt=ae?vr(ae,A):null,Mt=!!(qe&&ae),gt=Mt&&(Q==="closing"||Q==="open"&&j),Vt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:mt,opacity:He>0?pt:Mt?1:Q==="opening"||Ot?0:1,transition:ve&&!ue?"none":ue?`transform ${wo}ms ${gn}`:Z?`transform ${Rn}ms ${gn}, opacity ${Rn}ms ${gn}`:gt?`transform ${Rn}ms ${gn}`:Q==="opening"||Ot?`opacity ${Rn}ms ${gn}`:"none",pointerEvents:Me&&Rt&&!_e?"auto":"none",touchAction:Me&&Rt?"none":void 0,zIndex:1,overflow:Me?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!_e?"auto":"none"},_t=(_,Ie,Ne="adjacent")=>{const Ge=Re(_);if(!Ge)return{display:"none"};const dt=Ne==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Ft}=Fe!==null?mu(Ge,dt,Fe,A):{start:Ne==="far"?Gr(Ge,Ie,A):so(Ge,Ie,A)},lt=vr(Ft,A),wt=nt(_,dt),zt=!_e&&Ne==="adjacent"&&Rt&&!$e?_x(Ge,Ie,A):null,Pt=Ne==="far"&&_e&&Fe===(Ie==="left"?-1:1),on=ve&&!ue?!1:ue,pn=Ne==="adjacent"&&Rt&&$e&&!_e;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:wt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Ne==="far"?Rt&&Pt?1:0:Rt?1:0,transition:on?Ne==="far"?`transform ${wo}ms ${gn}`:`transform ${wo}ms ${gn}, opacity ${Rn}ms ${gn}`:pn?`transform ${Rn}ms ${gn}`:Q==="opening"||Ot?`opacity ${Rn}ms ${gn}`:"none",pointerEvents:"none",zIndex:1}},qt=(_,Ie)=>{const Ne=Re(_);return Ne?Ax(so(Ne,Ie,A),Ie,A):null},Xt=_=>Ie=>{if(!l){if(k.current){k.current=!1;return}Ie.stopPropagation(),ut(_)}},Dt=je?qt(je,"left"):null,jt=Se?qt(Se,"right"):null,Ht=Dt?vr(Dt,A):null,$t=jt?vr(jt,A):null;return a.jsxs("div",{ref:S,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:en,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?nn:0,transition:ve?"none":`opacity ${Rn}ms ${gn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ve?"none":`opacity ${Rn}ms ${gn}`,pointerEvents:"none"},children:a.jsx(Xd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Rt&&Te&&a.jsx(xr,{media:Te,style:_t(Te,"left","far"),onMeasure:ze,onTransitionEnd:Ee},`far-prev-${Te.url}`),Rt&&je&&a.jsxs(a.Fragment,{children:[a.jsx(xr,{media:je,style:_t(je,"left"),onMeasure:ze,onTransitionEnd:Ee},`prev-${je.url}`),Ht&&a.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||ve?"default":"pointer",pointerEvents:l||ve?"none":"auto",zIndex:3},onClick:Xt(-1)})]}),Rt&&Se&&a.jsxs(a.Fragment,{children:[a.jsx(xr,{media:Se,style:_t(Se,"right"),onMeasure:ze,onTransitionEnd:Ee},`next-${Se.url}`),$t&&a.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||ve?"default":"pointer",pointerEvents:l||ve?"none":"auto",zIndex:3},onClick:Xt(1)})]}),Rt&&Xe&&a.jsx(xr,{media:Xe,style:_t(Xe,"right","far"),onMeasure:ze,onTransitionEnd:Ee},`far-next-${Xe.url}`),ae&&G&&(Me?a.jsx(Wx,{src:G.url,phase:Q,onMediaElement:Nt,wrapperStyle:Vt,videoStyle:Wt,onLoadedMetadata:bt,onTransitionEnd:Ee},`${n}-${G.url}`):a.jsx("img",{ref:Nt,src:G.url,alt:G.name,onLoad:bt,onTransitionEnd:Ee,style:Vt},`${n}-${G.url}`))]})}const Hx=20,Ox=.18;function Dx(e){return`
18802
+ `}const Rn=500,Co=650,gn="cubic-bezier(0.22, 1, 0.36, 1)",bx=72,wx=50,Sx=1e4,$x=650,Cx=500;function Tx(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 mu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=jr(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 Lx(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?mu(i,n):null}function Rx(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function Ro(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function xc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return Ro(e,i,n)}const Ix=.03;function gu(e){return e.width*Ix}const Da={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function vr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function bc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ex(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function us(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 Mx(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:us(e,t.width,t.height)}function Px(e,t){if(da(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function kx(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 Ax({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>da(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function co(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 Gr(e,t,n){const i=co(e,t,n);return{...i,left:2*i.left-e.left}}function Fx(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 hu(e,t,n,i){const o=co(e,"left",i),r=co(e,"right",i),l=Gr(e,"left",i),d=Gr(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 _x(e,t,n,i){const{start:o,end:r}=hu(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Wx(e,t,n){const i=co(e,t,n),o=Gr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function da(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Nx({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 xr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return da(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Hx({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:w,sourceRect:x,resolveCloseSourceRect:f,onClose:h,onPrev:y,onNext:b}){const C=s.useRef(null),v=s.useRef(null),S=s.useRef(null),H=s.useRef(new Map),[N,U]=s.useState(0),O=s.useRef(null),R=s.useRef(0),B=s.useRef(0),$=s.useRef("none"),M=s.useRef(!1),_=s.useRef(!1),A=s.useRef(!1),m=s.useRef(null),P=s.useRef(null),I=s.useRef(null),V=s.useRef(()=>{}),ee=s.useRef(null),T=s.useRef(null),j=s.useRef(null),K=s.useRef(!1),[ce,se]=s.useState(null),[k,ae]=s.useState(Da),[q,le]=s.useState(0),[Z,xe]=s.useState("opening"),[Ne,ye]=s.useState(0),[ue,Q]=s.useState(0),[de,ne]=s.useState(!1),[Ee,Te]=s.useState(null),[Oe,ve]=s.useState(null),[we,$e]=s.useState(null),[g,G]=s.useState(!1),[F,X]=s.useState(null),[me,Y]=s.useState(!1),L=s.useRef(!1),[ie,oe]=s.useState(!1),[D,te]=s.useState(!1),Ae=s.useRef(n),he=s.useRef(void 0),J=t[n],Ze=J?da(J):!1,Fe=ue!==0||de,Qe=!l&&(!r||!!d),Xe=c&&!l,nt=u.length>1,et=s.useCallback((W,Re)=>t.length<=1?null:t[(W+Re+t.length)%t.length]??null,[t]),Be=nt?Ro(u,p,-1):et(n,-1),fe=nt?Ro(u,p,1):et(n,1),He=Ee===-1&&Fe?nt&&Oe!==null?Ro(u,Oe,-1):we!==null?et(we,-1):null:null,ze=Ee===1&&Fe?nt&&Oe!==null?Ro(u,Oe,1):we!==null?et(we,1):null:null,Je=He&&He.url!==(Be==null?void 0:Be.url)?He:null,Ce=ze&&ze.url!==(fe==null?void 0:fe.url)?ze:null,De=Be&&Xe?(()=>{const W=nt?xc(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return W&&W.url!==Be.url?W:null})():null,qe=fe&&Xe?(()=>{const W=nt?xc(u,p,1):t.length>2?et((n+1)%t.length,1):null;return W&&W.url!==fe.url?W:null})():null,ge=Je??De,Pe=Ce??qe,je=s.useCallback((W,Re,We)=>{if(!W||!Re||!We)return;const Ge=H.current,ut=Ge.get(W);(ut==null?void 0:ut.width)===Re&&(ut==null?void 0:ut.height)===We||(Ge.set(W,{width:Re,height:We}),U(_t=>_t+1))},[]),Ie=s.useCallback(W=>{if(!(W!=null&&W.url))return null;const Re=H.current.get(W.url);return Mx(v.current,Re)},[N,q]),be=s.useCallback(()=>{if(!J)return;const W=Ie(J);if(W){se(W);return}const Re=v.current;Re&&se(bc(Re))},[J,Ie]),Le=s.useCallback(W=>{if(nt){const Re=u.length;ve((p+W+Re)%Re),$e(null);return}t.length>1&&($e((n+W+t.length)%t.length),ve(null))},[nt,u.length,p,t.length,n]),Ye=s.useCallback(W=>{A.current=W,ne(W)},[]),_e=s.useCallback(()=>{m.current!==null&&(window.clearTimeout(m.current),m.current=null)},[]),it=s.useCallback(()=>{_e(),m.current=window.setTimeout(()=>{_e(),Ye(!1)},Co+32)},[_e,Ye]),ot=s.useCallback(()=>{const W=C.current;if(!W){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:Da.width,height:typeof window<"u"?window.innerHeight:Da.height});return}const Re=W.getBoundingClientRect();ae({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),rt=s.useCallback((W,Re)=>{if(Fe){if(ie&&!de)return`translate(${ue}px, 0px)`;if(de&&Ee!==null){const We=Ie(W);if(!We)return;const{x:Ge,y:ut}=_x(We,Re,Ee,k);return`translate(${Ge}px, ${ut}px)`}if(de)return"translate(0px, 0px)"}},[Fe,ie,de,ue,Ee,k,Ie]),ht=s.useCallback(()=>{const W=P.current;P.current=null,_e(),Ye(!1),Te(null),ve(null),$e(null),Q(0),oe(!1),M.current=!1,B.current=0,$.current="none",W===-1?y():W===1&&b()},[_e,Ye,y,b]),It=s.useCallback(()=>{_e(),m.current=window.setTimeout(()=>{P.current!==null&&ht()},Co+32)},[_e,ht]),Et=s.useCallback(()=>{_e(),P.current=null,Ye(!1),Te(null),ve(null),$e(null),Q(0),oe(!1),M.current=!1,B.current=0,$.current="none"},[_e,Ye]),dt=s.useCallback(W=>{if(!(!Xe||!ce)){if(A.current){if(P.current===W){I.current=W,ht();return}Et()}_e(),Le(W),P.current=W,Te(W),Ye(!0),It()}},[Xe,ce,ht,Et,_e,Le,Ye,It]);V.current=dt;const mt=s.useCallback(()=>{ee.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(W=>{T.current!==null&&window.clearInterval(T.current);const Re=K.current?Cx:$x;T.current=window.setInterval(()=>{V.current(W)},Re)},[]),Tt=s.useCallback(W=>{ee.current!==W&&(mt(),ee.current=W,K.current=!1,V.current(W),$t(W),j.current=window.setTimeout(()=>{j.current=null,ee.current===W&&(K.current=!0,$t(W))},Sx))},[mt,$t]),ft=s.useCallback(()=>{const W=v.current;if(!W)return;const Re=J==null?void 0:J.url,We=Re?H.current.get(Re):void 0;if(We!=null&&We.width&&(We!=null&&We.height)){se(us(W,We.width,We.height));return}const Ge=S.current;if(Ge&&Re&&(Ge.src===Re||Ge.currentSrc===Re)){const{width:_t,height:lt}=Ex(Ge);if(_t&&lt){je(Re,_t,lt),se(us(W,_t,lt));return}}const ut=bc(W);!ut.width||!ut.height||se(ut)},[J==null?void 0:J.url,je]),Ft=s.useCallback(W=>{if(S.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&ft();return}W.complete&&W.naturalWidth>0&&ft()}},[ft]),Ht=s.useCallback(()=>{ot(),ft(),le(W=>W+1)},[ot,ft]);s.useEffect(()=>{Ht();const W=v.current,Re=C.current,We=new ResizeObserver(()=>Ht());return W&&We.observe(W),Re&&We.observe(Re),window.addEventListener("resize",Ht),()=>{We.disconnect(),window.removeEventListener("resize",Ht)}},[Ht,n,w]),s.useLayoutEffect(()=>{if(!J)return;const W=S.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){ft();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&ft()}},[J==null?void 0:J.url,n,ft]),s.useEffect(()=>{be()},[be,N]),s.useEffect(()=>{const W=new Set,Re=[],We=Ge=>{!(Ge!=null&&Ge.url)||W.has(Ge.url)||(W.add(Ge.url),Re.push(Ge))};t.forEach(We),u.forEach(Ge=>Ge.items.forEach(We)),Re.forEach(Ge=>{H.current.has(Ge.url)||Px(Ge,je)})},[t,u,je]),s.useEffect(()=>{if(Z!=="opening"||!ce)return;if(!x){xe("open");return}G(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),xe("open")})});return()=>cancelAnimationFrame(W)},[Z,ce,x]),s.useEffect(()=>{if(Z!=="closing")return;const W=setTimeout(()=>h(),Rn);return()=>clearTimeout(W)},[Z,h]),s.useEffect(()=>()=>{_e()},[_e]),s.useLayoutEffect(()=>{Ae.current===n&&he.current===(J==null?void 0:J.url)||(_e(),P.current=null,Te(null),ve(null),$e(null),ye(0),Q(0),Ye(!1),te(!1),oe(!1),R.current=0,B.current=0,$.current="none",M.current=!1,O.current=null,_.current=!1,S.current=null,be(),Ae.current=n,he.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,Ye,_e,be]),s.useLayoutEffect(()=>{const W=I.current;W!==null&&(I.current=null,requestAnimationFrame(()=>{V.current(W)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Z==="opening"){L.current=!1,Y(!1);return}if(Z!=="open"||L.current)return;if(!Be&&!fe){L.current=!0;return}Y(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),L.current=!0})});return()=>cancelAnimationFrame(W)},[Z,Be==null?void 0:Be.url,fe==null?void 0:fe.url]),s.useEffect(()=>{if(Z!=="open")return;const W=()=>{const lt=wt=>{wt.stopPropagation(),wt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Re=lt=>{const wt=lt<0?1:-1;_e(),Le(wt),P.current=wt,Te(wt),Ye(!0),It()},We=lt=>{if(Math.abs(lt)>wx&&Xe){Re(lt);return}P.current=null,Te(null),ve(null),$e(null),Ye(!0),Q(0),it()},Ge=lt=>{if(lt.touches.length!==1||A.current)return;const wt=lt.touches[0];_.current=!0,O.current={x:wt.clientX,y:wt.clientY},$.current="none",B.current=0,M.current=!1},ut=lt=>{if(!O.current||lt.touches.length!==1||A.current)return;const wt=lt.touches[0],Vt=wt.clientX-O.current.x,Pt=wt.clientY-O.current.y;if($.current==="none"){if(Math.abs(Vt)<10&&Math.abs(Pt)<10)return;if(Math.abs(Vt)>Math.abs(Pt)){if(!Xe)return;$.current="horizontal"}else if(Pt>0){if(!Qe)return;$.current="vertical"}else return}if($.current==="horizontal"){M.current=!0,oe(!0),B.current=Vt,Q(Vt),lt.preventDefault();return}$.current==="vertical"&&(M.current=!0,oe(!0),R.current=Pt,ye(Pt),lt.preventDefault())},_t=()=>{if(!O.current)return;const lt=$.current,wt=M.current;if(wt&&lt==="horizontal")We(B.current),W();else if(wt&&lt==="vertical"){const Vt=R.current;if(Qe&&Vt>bx){const Pt=window.innerHeight;R.current=Pt,te(!0),ye(Pt),xe("closing")}else R.current=0,ye(0);W()}else lt==="horizontal"&&Math.abs(B.current)>0&&(We(B.current),W());O.current=null,$.current="none",B.current=0,M.current=!1,oe(!1)};return document.addEventListener("touchstart",Ge,{passive:!0}),document.addEventListener("touchmove",ut,{passive:!1}),document.addEventListener("touchend",_t),document.addEventListener("touchcancel",_t),()=>{document.removeEventListener("touchstart",Ge),document.removeEventListener("touchmove",ut),document.removeEventListener("touchend",_t),document.removeEventListener("touchcancel",_t)}},[Z,Xe,Ye,it,_e,Qe,It,Le]);const Ot=s.useCallback(()=>{const W=(f==null?void 0:f())??x??null;W&&ce&&(X(W),G(!0)),xe("closing")},[f,x,ce]);s.useEffect(()=>{const W=Ge=>{if(Ge.key==="Escape"){if(r&&d||Z==="closing")return;mt(),Ot();return}if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight"||Z!=="open"||!Xe)return;Ge.preventDefault();const ut=Ge.key==="ArrowLeft"?-1:1;Ge.repeat&&ee.current===ut||Tt(ut)},Re=Ge=>{if(Ge.key!=="ArrowLeft"&&Ge.key!=="ArrowRight")return;const ut=Ge.key==="ArrowLeft"?-1:1;ee.current===ut&&mt()},We=()=>{mt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Re),window.addEventListener("blur",We),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Re),window.removeEventListener("blur",We),mt()}},[Z,r,d,Ot,Xe,Tt,mt]),s.useEffect(()=>{Z!=="open"&&mt()},[Z,mt]);const Kt=()=>{Z==="closing"||l||Ot()},Ct=Z==="open",Dt=Z==="closing",tn=Ne>0?Math.max(0,1-Ne/500):1,gt=Ne>0?Math.max(.35,1-Ne/500):1,Me=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!A.current)){if(P.current!==null){ht();return}_e(),Ye(!1)}},[_e,Ye,ht]),Ve=Z==="closing"?F??x:x,tt=Ve&&ce&&(Z==="opening"||Dt)?Tx(Ve,ce):void 0,pt=Fe&&J?rt(J,"center"):Ne>0?`translateY(${Ne}px)`:tt,bt=ce?vr(ce,k):null,Mt=!!(Ve&&ce),yt=Mt&&(Z==="closing"||Z==="open"&&g),Gt={position:"absolute",top:bt==null?void 0:bt.top,left:bt==null?void 0:bt.left,width:bt==null?void 0:bt.width,height:bt==null?void 0:bt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:Ne>0?gt:Mt?1:Z==="opening"||Dt?0:1,transition:ie&&!de?"none":de?`transform ${Co}ms ${gn}`:D?`transform ${Rn}ms ${gn}, opacity ${Rn}ms ${gn}`:yt?`transform ${Rn}ms ${gn}`:Z==="opening"||Dt?`opacity ${Rn}ms ${gn}`:"none",pointerEvents:Ze&&Ct&&!Fe?"auto":"none",touchAction:Ze&&Ct?"none":void 0,zIndex:1,overflow:Ze?"hidden":void 0},Nt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Fe?"auto":"none"},Wt=(W,Re,We="adjacent")=>{const Ge=Ie(W);if(!Ge)return{display:"none"};const ut=We==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:_t}=Ee!==null?hu(Ge,ut,Ee,k):{start:We==="far"?Gr(Ge,Re,k):co(Ge,Re,k)},lt=vr(_t,k),wt=rt(W,ut),Vt=!Fe&&We==="adjacent"&&Ct&&!me?Wx(Ge,Re,k):null,Pt=We==="far"&&Fe&&Ee===(Re==="left"?-1:1),rn=ie&&!de?!1:de,pn=We==="adjacent"&&Ct&&me&&!Fe;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:wt??(Vt?`translate(${Vt.x}px, ${Vt.y}px)`:void 0),opacity:We==="far"?Ct&&Pt?1:0:Ct?1:0,transition:rn?We==="far"?`transform ${Co}ms ${gn}`:`transform ${Co}ms ${gn}, opacity ${Rn}ms ${gn}`:pn?`transform ${Rn}ms ${gn}`:Z==="opening"||Dt?`opacity ${Rn}ms ${gn}`:"none",pointerEvents:"none",zIndex:1}},Xt=(W,Re)=>{const We=Ie(W);return We?Fx(co(We,Re,k),Re,k):null},Ut=W=>Re=>{if(!l){if(_.current){_.current=!1;return}Re.stopPropagation(),dt(W)}},zt=Be?Xt(Be,"left"):null,Bt=fe?Xt(fe,"right"):null,jt=zt?vr(zt,k):null,Lt=Bt?vr(Bt,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:Z==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?tn:0,transition:ie?"none":`opacity ${Rn}ms ${gn}`,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:v,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 ${Rn}ms ${gn}`,pointerEvents:"none"},children:a.jsx(Yd,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:d,onClose:Kt})})]}),Ct&&ge&&a.jsx(xr,{media:ge,style:Wt(ge,"left","far"),onMeasure:je,onTransitionEnd:Me},`far-prev-${ge.url}`),Ct&&Be&&a.jsxs(a.Fragment,{children:[a.jsx(xr,{media:Be,style:Wt(Be,"left"),onMeasure:je,onTransitionEnd:Me},`prev-${Be.url}`),jt&&a.jsx("div",{style:{position:"absolute",top:jt.top,left:jt.left,width:jt.width,height:jt.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(xr,{media:fe,style:Wt(fe,"right"),onMeasure:je,onTransitionEnd:Me},`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&&Pe&&a.jsx(xr,{media:Pe,style:Wt(Pe,"right","far"),onMeasure:je,onTransitionEnd:Me},`far-next-${Pe.url}`),ce&&J&&(Ze?a.jsx(Nx,{src:J.url,phase:Z,onMediaElement:Ft,wrapperStyle:Gt,videoStyle:Nt,onLoadedMetadata:ft,onTransitionEnd:Me},`${n}-${J.url}`):a.jsx("img",{ref:Ft,src:J.url,alt:J.name,onLoad:ft,onTransitionEnd:Me,style:Gt},`${n}-${J.url}`))]})}const Ox=20,Dx=.18;function jx(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
- ${vx(e)}
18890
- `}function jx(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 zx(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 Bx(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:D.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:D.scalingValue(i*Ox,n??!1),[`--${t}-image-aspect`]:jx(e)}}function Vx(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 Yt(n,t)}function Gx(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 qx(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?uu(d,o):void 0)}}function Xx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=D.useScopedStyles(),c=s.useMemo(()=>Dx(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",b=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=D.scalingValue(v,n??!1),h=`max(${g}, ${Hx}px)`,{objectFitMode:f,imageStyle:x}=Gx(e),S=Vx(e,n),y=s.useRef(null),[w,H]=s.useState(!1),[N,U]=s.useState([]),[O,C]=s.useState(0),[V,$]=s.useState(0),[R,k]=s.useState(null),[T,m]=s.useState({title1:"",title2:"",title3:""}),M=(!n||i)&&!w,E=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},z=E.sizeType??"none",ne=M&&z!=="none"?`${d}-item-image-hover-${z}`:void 0,I=(E.value??120)/100,W=s.useCallback(le=>{!le||z!=="scale"||(le.style.transformOrigin=Bg(le))},[z]),K=s.useCallback(le=>{if(le){if(f==="contain"){const ee=zx(le);if(ee){const ue=le.closest(`.${d}-item-image`);ue instanceof HTMLElement&&ue.style.setProperty(`--${d}-item-media-aspect`,String(ee))}}W(le)}},[d,W,f]),ae={width:D.scalingValue(b,n??!1),...S,...Bx(e,d,n),[`--${d}-image-hover-scale`]:String(I)},de=(()=>{const le={},ee=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return ee&&(le["--cntrl-article-width"]=ee),le})(),A=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),he=s.useMemo(()=>Lx(u),[u]),q=s.useMemo(()=>Px(u),[u]),ce=(le,ee)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ue=he.findIndex(Fe=>Fe.gridIndex===le);if(ue<0)return;const oe=he[ue];$(ue),U(oe.items),C(0),m(oe.entry),k(ee??null),H(!0)},Q=s.useCallback(()=>{H(!1),k(null)},[]),be=s.useCallback(()=>{const le=he[V];return!le||!y.current?R:Tx(y.current,le.gridIndex,f)??R},[he,V,R,f]),He=s.useCallback(le=>{if(he.length>1){const ee=he.length,ue=(V+le+ee)%ee,oe=he[ue];$(ue),U(oe.items),C(0),m(oe.entry);return}C(ee=>(ee+le+N.length)%N.length)},[he,V,N.length]),xe=he.length>1||N.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const le=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=le}},[w]),s.useEffect(()=>{!n||o||i||H(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&H(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(kx,{mediaList:q}),a.jsx("div",{ref:y,className:`${d}-wrapper ${d}-type-${p}`,style:ae,children:u.map((le,ee)=>{var Fe,Ce;const ue=!!((Fe=le.image)!=null&&Fe.url),oe=qx(!!A,ue,ee,d,f,ce);return a.jsxs("div",{className:`${d}-item`,children:[le.title?a.jsx("span",{className:`${d}-item-title`,onClick:oe,style:oe?{cursor:"pointer"}:void 0,children:le.title}):null,(Ce=le.image)!=null&&Ce.url?a.jsx("span",{className:[`${d}-item-image`,f==="contain"?`${d}-item-image-fit`:void 0,ne].filter(Boolean).join(" "),children:le.image.type==="video"?a.jsx("video",{ref:K,src:le.image.url,"data-waterfall-index":ee,style:x,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:oe,onLoadedData:P=>K(P.currentTarget)}):a.jsx("img",{ref:K,src:le.image.url,alt:le.image.name??"","data-waterfall-index":ee,style:x,onClick:oe,onLoad:P=>K(P.currentTarget)})}):null,ee<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},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 le=(l?document.getElementById(l):null)??document.body;return Vn.createPortal(a.jsx("div",{style:de,"data-selection":"none",children:a.jsx(Nx,{prefix:d,items:N,index:O,entry:T,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:xe,lightboxEntries:he,entryIdx:V,layoutId:r,sourceRect:R,resolveCloseSourceRect:be,onClose:Q,onPrev:()=>He(-1),onNext:()=>He(1)})}),le)})()]})}const Ux=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18889
+ ${xx(e)}
18890
+ `}function zx(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 Bx(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 Vx(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:z.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:z.scalingValue(i*Dx,n??!1),[`--${t}-image-aspect`]:zx(e)}}function Gx(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 Zt(n,t)}function qx(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 Xx(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?mu(d,o):void 0)}}function Ux({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:d}=z.useScopedStyles(),c=s.useMemo(()=>jx(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",w=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,f=z.scalingValue(x,n??!1),h=`max(${f}, ${Ox}px)`,{objectFitMode:y,imageStyle:b}=qx(e),C=Gx(e,n),v=s.useRef(null),[S,H]=s.useState(!1),[N,U]=s.useState([]),[O,R]=s.useState(0),[B,$]=s.useState(0),[M,_]=s.useState(null),[A,m]=s.useState({title1:"",title2:"",title3:""}),P=(!n||i)&&!S,I=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},V=I.sizeType??"none",ee=P&&V!=="none"?`${d}-item-image-hover-${V}`:void 0,T=(I.value??120)/100,j=s.useCallback(ue=>{!ue||V!=="scale"||(ue.style.transformOrigin=Vg(ue))},[V]),K=s.useCallback(ue=>{if(ue){if(y==="contain"){const Q=Bx(ue);if(Q){const de=ue.closest(`.${d}-item-image`);de instanceof HTMLElement&&de.style.setProperty(`--${d}-item-media-aspect`,String(Q))}}j(ue)}},[d,j,y]),ce={width:z.scalingValue(w,n??!1),...C,...Vx(e,d,n),[`--${d}-image-hover-scale`]:String(T)},se=(()=>{const ue={},Q=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return Q&&(ue["--cntrl-article-width"]=Q),ue})(),k=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ae=s.useMemo(()=>Rx(u),[u]),q=s.useMemo(()=>kx(u),[u]),le=(ue,Q)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const de=ae.findIndex(Ee=>Ee.gridIndex===ue);if(de<0)return;const ne=ae[de];$(de),U(ne.items),R(0),m(ne.entry),_(Q??null),H(!0)},Z=s.useCallback(()=>{H(!1),_(null)},[]),xe=s.useCallback(()=>{const ue=ae[B];return!ue||!v.current?M:Lx(v.current,ue.gridIndex,y)??M},[ae,B,M,y]),Ne=s.useCallback(ue=>{if(ae.length>1){const Q=ae.length,de=(B+ue+Q)%Q,ne=ae[de];$(de),U(ne.items),R(0),m(ne.entry);return}R(Q=>(Q+ue+N.length)%N.length)},[ae,B,N.length]),ye=ae.length>1||N.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[S]),s.useEffect(()=>{!n||o||i||H(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&H(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx(Ax,{mediaList:q}),a.jsx("div",{ref:v,className:`${d}-wrapper ${d}-type-${p}`,style:ce,children:u.map((ue,Q)=>{var Ee,Te;const de=!!((Ee=ue.image)!=null&&Ee.url),ne=Xx(!!k,de,Q,d,y,le);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,ee].filter(Boolean).join(" "),children:ue.image.type==="video"?a.jsx("video",{ref:K,src:ue.image.url,"data-waterfall-index":Q,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":Q,style:b,onClick:ne,onLoad:Oe=>K(Oe.currentTarget)})}):null,Q<u.length-1&&a.jsx("div",{className:`${d}-item-gap-host`,style:{width:f},children:o&&!S&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},Q)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(Hx,{prefix:d,items:N,index:O,entry:A,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:ae,entryIdx:B,layoutId:r,sourceRect:M,resolveCloseSourceRect:xe,onClose:Z,onPrev:()=>Ne(-1),onNext:()=>Ne(1)})}),ue)})()]})}const Yx=`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
- `,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>'),Yn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Kx(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...Yn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...Yn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...Yn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...Yn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...Yn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...Yn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...Yn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const lo=ii.filter(e=>e!=="count"),Zx=lo.reduce((e,t)=>({...e,...Kx(t)}),{}),Jx=lo.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Arial",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ja(e){return lo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const Qx={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(lo.map(e=>[Us[e],Ys(e)]))},br={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},eb=[{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"}}],tb={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:eb},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Yn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...Zx},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:Yx,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Jx},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,...ja({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,...ja({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,...ja({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:[Qx]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},nb={element:Xx,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"},...lo.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...lo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})},schema:tb,sourceCode:Ux},Ui=500,gu="cubic-bezier(0.25, 1, 0.5, 1)",ib=300,ob=5,rb=.15,ab=.4,sb=100,Fi=100,bc={color:"#000000",hover:"#cccccc"},So={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},lb={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},za={offset:{x:0,y:0},linkColor:"#cccccc"},wc={sizeType:"drag",value:3},cb="left";function db(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:cb,color:(e==null?void 0:e.titleColor)??"#000000"};return Yt(n,t)}function _i(e,t,n){return`${e}: ${D.scalingValue(t/1440,n)};`}function Ro(e,t){return t<=0?0:(e%t+t)%t}function ub(e,t,n,i){if(!i)return{position:Ro(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 pb(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function mb(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,b)=>{n.style.transform=`translate(${p}px, ${b}px)`;const v=n.getBoundingClientRect();return{x:v.left,y:v.top}},o=i(0,0),r=i(Fi,0),l=i(0,Fi);e.removeChild(n);const d={x:(r.x-o.x)/Fi,y:(r.y-o.y)/Fi},c={x:(l.x-o.x)/Fi,y:(l.y-o.y)/Fi},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function gb(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 hb(e,t){return`
19404
+ `,Kx="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>'),Kn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Zx(e){const t={};return t[ct(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ct(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ct(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ct(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ct(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ct(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ct(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const uo=oi.filter(e=>e!=="count"),Jx=uo.reduce((e,t)=>({...e,...Zx(t)}),{}),Qx=uo.reduce((e,t)=>({...e,[ct(t,"fontFamily")]:"Arial",[ct(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ct(t,"letterSpacing")]:0,[ct(t,"wordSpacing")]:0,[ct(t,"textAlign")]:"left",[ct(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ja(e){return uo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ct(n,"fontSize")]=i),o!==void 0&&(t[ct(n,"lineHeight")]=o),t},{})}const eb={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(uo.map(e=>[Ys[e],Ks(e)]))},br={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},tb=[{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:tb},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:{...Kn.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"]}}},...Jx},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:Kx,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Qx},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,...ja({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,...ja({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,...ja({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:[eb]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},ib={element:Ux,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"},...uo.map(e=>({path:`${ct(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...uo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ct(t,"fontFamily")}`}),{})},schema:nb,sourceCode:Yx},Ki=500,fu="cubic-bezier(0.25, 1, 0.5, 1)",ob=300,rb=5,ab=.15,sb=.4,lb=100,_i=100,wc={color:"#000000",hover:"#cccccc"},To={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},cb={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},za={offset:{x:0,y:0},linkColor:"#cccccc"},Sc={sizeType:"drag",value:3},db="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:db,color:(e==null?void 0:e.titleColor)??"#000000"};return Zt(n,t)}function Wi(e,t,n){return`${e}: ${z.scalingValue(t/1440,n)};`}function Io(e,t){return t<=0?0:(e%t+t)%t}function pb(e,t,n,i){if(!i)return{position:Io(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 mb(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function gb(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,w)=>{n.style.transform=`translate(${p}px, ${w}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(_i,0),l=i(0,_i);e.removeChild(n);const d={x:(r.x-o.x)/_i,y:(r.y-o.y)/_i},c={x:(l.x-o.x)/_i,y:(l.y-o.y)/_i},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function hb(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 fb(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 ${Ui}ms ${gu};
19476
+ transition: opacity ${Ki}ms ${fu};
19477
19477
  }
19478
19478
  .${e}-list-fade .${e}-slide.${e}-is-active {
19479
19479
  opacity: 1;
@@ -19500,29 +19500,29 @@ export function Waterfall({
19500
19500
  top: 50%;
19501
19501
  z-index: 1;
19502
19502
  padding: 0;
19503
- ${_i("width",30,t)}
19504
- ${_i("height",30,t)}
19503
+ ${Wi("width",30,t)}
19504
+ ${Wi("height",30,t)}
19505
19505
  transition: opacity 0.15s ease-in-out;
19506
19506
  }
19507
19507
  .${e}-arrow-prev {
19508
- ${_i("left",-20,t)}
19508
+ ${Wi("left",-20,t)}
19509
19509
  transform: translate3d(-50%, -50%, 0);
19510
19510
  }
19511
19511
  .${e}-arrow-next {
19512
19512
  left: unset;
19513
- ${_i("right",-20,t)}
19513
+ ${Wi("right",-20,t)}
19514
19514
  transform: translate3d(50%, -50%, 0);
19515
19515
  }
19516
19516
  .${e}-arrow-prev-vertical {
19517
19517
  left: 50%;
19518
- ${_i("top",-20,t)}
19518
+ ${Wi("top",-20,t)}
19519
19519
  transform: translate3d(-50%, -50%, 0);
19520
19520
  }
19521
19521
  .${e}-arrow-next-vertical {
19522
19522
  left: 50%;
19523
19523
  right: unset;
19524
19524
  top: unset;
19525
- ${_i("bottom",-20,t)}
19525
+ ${Wi("bottom",-20,t)}
19526
19526
  transform: translate3d(-50%, 50%, 0);
19527
19527
  }
19528
19528
  .${e}-arrow-hidden {
@@ -19658,10 +19658,10 @@ export function Waterfall({
19658
19658
  object-fit: cover;
19659
19659
  }
19660
19660
  .${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
19661
- animation: ${e}-reveal-horizontal ${Ui}ms ease;
19661
+ animation: ${e}-reveal-horizontal ${Ki}ms ease;
19662
19662
  }
19663
19663
  .${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
19664
- animation: ${e}-reveal-vertical ${Ui}ms ease;
19664
+ animation: ${e}-reveal-vertical ${Ki}ms ease;
19665
19665
  }
19666
19666
  @keyframes ${e}-reveal-horizontal {
19667
19667
  from { clip-path: inset(0 100% 0 0); }
@@ -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 fb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=D.useScopedStyles(),l=db(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??wc,p=u.sizeType??"drag",b=u.value??wc.value,v=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",f=(e==null?void 0:e.navSize)??"m",x=lb[f],S=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=Se=>D.scalingValue(Se*S,n),w=(e==null?void 0:e.show)??"always",H=(e==null?void 0:e.controls)??null,N=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,U=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,O=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,C=(e==null?void 0:e.controlsColor)??bc.color,V=(e==null?void 0:e.controlsHoverColor)??bc.hover,$=(e==null?void 0:e.navColor)??So.colors.inactive,R=(e==null?void 0:e.navPaginationColor)??So.colors.pagination,k=(e==null?void 0:e.navBackgroundColor)??So.colors.background,T=(e==null?void 0:e.linkColor)??za.linkColor,m=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,M=v==="horizontal",E=p==="click",z=p==="drag",ne=p==="auto"&&(!n||!!i),I=!n,W=g==="slide",K=h==="classic",ae=w!=="never"&&N>0,de=w==="on hover",A=D.scalingValue(N,n),he={width:A,height:A,maxWidth:A},q=W&&c>1,[ce,Q]=s.useState(0),[be,He]=s.useState(q?1:0),[xe,le]=s.useState(!1),[ee,ue]=s.useState(!1),[oe,Fe]=s.useState(!1),[Ce,P]=s.useState(0),[Y,X]=s.useState(!1),[ie,j]=s.useState(!1),B=s.useRef(!1),J=s.useRef(be);J.current=be;const te=s.useRef(null),$e=s.useRef(0),ye=s.useRef(null),F=s.useRef(null),ve=s.useRef(null),pe=s.useRef(null),Z=s.useCallback(Se=>{B.current=Se,le(Se)},[]),me=s.useCallback(Se=>{if(c<2||Se===0)return;const We=Se>0?1:-1,Be=Math.abs(Se);if(X(!0),Z(!0),!W){Q(Xe=>Ro(Xe+Se,c));return}let Ze=J.current;const Le=q&&(Ze===0||Ze===c+1),Ve=Le?ce+1:null;Le&&(Ze=ce+1);let se=Be;for(;se>0;){const Xe=ub(Ze,We,c,q);if(Ze=Xe.position,se-=1,Xe.hitBoundary){$e.current=se*We;break}}const Te=Be-se;if(Te>0&&Q(Xe=>Ro(Xe+Te*We,c)),J.current=Ze,Ve!==null){if(J.current=Ve,Ze===Ve){ue(!0),He(Ze);return}te.current=Ze,ue(!0),He(Ve);return}ue(!1),He(Ze)},[ce,c,q,W,Z]),De=s.useCallback(Se=>{me(Se)},[me]),ge=s.useCallback(Se=>{if(c<2)return;const We=Ro(Se,c);if(!(We===ce&&!B.current)&&(X(!0),Z(!0),Q(We),W)){const Be=We+(q?1:0);te.current=null,$e.current=0,J.current=Be,ue(!1),He(Be)}},[ce,c,q,W,Z]);s.useEffect(()=>{if(!xe)return;const Se=window.setTimeout(()=>{if(q&&(be===0||be===c+1)){te.current=null,ue(!0),He(ce+1);return}Z(!1)},Ui);return()=>window.clearTimeout(Se)},[ce,c,q,xe,Z,be]),s.useEffect(()=>{if(!ee)return;let Se=0;const We=requestAnimationFrame(()=>{Se=requestAnimationFrame(()=>{const Be=te.current;te.current=null;const Ze=$e.current;if($e.current=0,ue(!1),Be!==null){J.current=Be,He(Be);return}if(Ze!==0){me(Ze);return}Z(!1)})});return()=>{cancelAnimationFrame(We),cancelAnimationFrame(Se)}},[me,Z,ee]);const G=`${q}:${c}`,Me=s.useRef(G);s.useEffect(()=>{if(Me.current===G)return;Me.current=G;const Se=c>0?Math.min(ce,c-1):0;ve.current=null,pe.current=null,Fe(!1),P(0),Q(Se),ue(!0),He(Se+(q?1:0))},[ce,c,q,G]),s.useEffect(()=>{if(!Y)return;const Se=window.setTimeout(()=>X(!1),ib);return()=>window.clearTimeout(Se)},[Y,ce]),s.useEffect(()=>{if(!ne||c<2)return;const Se=Math.max(b,.1)*1e3,We=window.setInterval(()=>{I&&ie||De(1)},Se);return()=>window.clearInterval(We)},[b,c,De,ne,ie,I]);const _e=s.useCallback(Se=>{const We=ve.current;if(!We||We.pointerId!==Se.pointerId)return;ve.current=null,pe.current=null;const Be=ye.current;if(Be!=null&&Be.hasPointerCapture(Se.pointerId)&&Be.releasePointerCapture(Se.pointerId),!We.isActive){W&&P(0);return}const Le=!(Se.timeStamp-We.lastTime>sb)&&Math.abs(We.velocity)>ab,Ve=We.size>0&&Math.abs(We.offset-We.baseOffset)>We.size*rb;if(Fe(!1),!Le&&!Ve){P(0);return}const se=Ve?We.offset-We.baseOffset:We.velocity;let Te=1;Ve&&We.size>0&&(Te=Math.max(1,Math.round(Math.abs(se)/We.size))),P(0),me(se<0?Te:-Te)},[me,W]);s.useEffect(()=>{const Se=We=>{pe.current===null||We.pointerId!==pe.current||_e(We)};return window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),()=>{window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se)}},[_e]);const rt=Se=>{const We=ye.current;if(!z||c<2||!We||Se.pointerType==="mouse"&&Se.button!==0)return;te.current=null,$e.current=0,B.current&&Z(!1);let Be=0;const Ze=F.current;if(W&&Ze){const Le=M?Ze.offsetWidth:Ze.offsetHeight;if(Le>0){const Ve=pb(Ze,M);let se=J.current;q&&(se===0||se===c+1)?(se=ce+1,J.current=se,ue(!0),He(se),Be=0):Be=Ve+se*Le,P(Be)}}We.setPointerCapture(Se.pointerId),pe.current=Se.pointerId,ve.current={pointerId:Se.pointerId,startClientX:Se.clientX,startClientY:Se.clientY,axes:mb(We,`${r}-axis-probe`),size:M?We.offsetWidth:We.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:Se.timeStamp,velocity:0}},Je=Se=>{const We=ve.current;if(!We||We.pointerId!==Se.pointerId)return;if(Se.pointerType==="mouse"&&Se.buttons===0){_e(Se);return}const Be=Se.clientX-We.startClientX,Ze=Se.clientY-We.startClientY,Le=We.axes?gb(We.axes,Be,Ze):{x:Be,y:Ze},Ve=M?Le.x:Le.y,se=M?Le.y:Le.x,Te=We.baseOffset+Ve;if(!We.isActive){if(Math.max(Math.abs(Ve),Math.abs(se))<ob)return;if(Math.abs(se)>Math.abs(Ve)){const ze=ye.current;ze!=null&&ze.hasPointerCapture(We.pointerId)&&ze.releasePointerCapture(We.pointerId),ve.current=null,pe.current=null,W&&P(0);return}We.isActive=!0,Fe(!0)}const Xe=Se.timeStamp-We.lastTime;Xe>0&&(We.velocity=(Te-We.offset)/Xe,We.lastTime=Se.timeStamp),We.offset=Te,W&&P(Te)},at=Se=>{_e(Se)},it=M?`translate3d(calc(${-be*100}% + ${Ce}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${Ce}px), 0)`,je=q?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hb(r,n)}}),a.jsxs("div",{className:yt(`${r}-wrapper`,{[`${r}-transition-reveal`]:g==="reveal",[`${r}-transition-reveal-vertical`]:g==="reveal"&&!M}),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:ye,className:yt(`${r}-track`,{[`${r}-track-draggable`]:z,[`${r}-track-draggable-vertical`]:z&&!M}),onPointerDown:rt,onPointerMove:Je,onPointerUp:at,onPointerCancel:at,onLostPointerCapture:Se=>{pe.current===Se.pointerId&&_e(Se)},children:a.jsx("div",{ref:F,className:yt(`${r}-list`,{[`${r}-list-slide`]:W,[`${r}-list-slide-vertical`]:W&&!M,[`${r}-list-fade`]:!W}),style:W?{transform:it,transition:oe||ee?"none":`transform ${Ui}ms ${gu}`}:void 0,children:je.map((Se,We)=>{const Be=q?Ro(We-1,c):We,Le=q&&(We===0||We===c+1)?`clone-${We===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:yt(`${r}-slide`,{[`${r}-is-active`]:!W&&Be===ce}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:yt(`${r}-slider-image`,{[`${r}-contain`]:Se.image.objectFit==="contain",[`${r}-cover`]:Se.image.objectFit==="cover"}),src:Se.image.url,alt:Se.image.name??"",draggable:!1})})})},Le)})})}),ae&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:yt(`${r}-arrow`,{[`${r}-arrow-prev`]:M,[`${r}-arrow-prev-vertical`]:!M,[`${r}-hover-arrow`]:de}),style:{color:C,"--arrow-hover-color":V,...he},children:a.jsxs("button",{onClick:Se=>{Se.stopPropagation(),De(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${D.scalingValue(U,n)}, ${D.scalingValue(O*(M?1:-1),n)}) rotate(${M?"0deg":"90deg"})`},children:[H&&a.jsx(ln,{url:H,fill:C,hoverFill:V,className:yt(`${r}-arrow-img`,`${r}-mirror`),style:he}),!H&&a.jsx(Sc,{color:C,className:yt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:yt(`${r}-arrow`,{[`${r}-arrow-next`]:M,[`${r}-arrow-next-vertical`]:!M,[`${r}-hover-arrow`]:de}),style:{color:C,"--arrow-hover-color":V,...he},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:Se=>{Se.stopPropagation(),De(1)},style:{transform:`translate(${D.scalingValue(U*(M?-1:1),n)}, ${D.scalingValue(O,n)}) rotate(${M?"0deg":"90deg"})`},children:[H&&a.jsx(ln,{url:H,fill:C,hoverFill:V,className:`${r}-arrow-img`,style:he}),!H&&a.jsx(Sc,{color:C,className:yt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),E&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>De(1)}),K&&a.jsx("div",{className:yt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:M,[`${r}-pagination-inside-left`]:!M}),style:M?{bottom:y(x.inset)}:{left:y(x.inset)},children:a.jsx("div",{className:yt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!M,[`${r}-animate-dots`]:Y}),style:{backgroundColor:k,gap:y(x.gapInactive-x.activeDot+x.dot),...M?{height:y(x.activeDot+x.paddingY*2),paddingTop:y(x.paddingY),paddingBottom:y(x.paddingY),paddingLeft:y(x.paddingActive),paddingRight:y(x.paddingActive)}:{width:y(x.activeDot+x.paddingY*2),paddingLeft:y(x.paddingY),paddingRight:y(x.paddingY),paddingTop:y(x.paddingActive),paddingBottom:y(x.paddingActive)},borderRadius:y(x.borderRadius),transform:`translate(${D.scalingValue(So.offset.x,n)}, ${D.scalingValue(So.offset.y,n)})`},children:d.map((Se,We)=>{const Be=We===ce,Ze=Be?x.activeDot:x.dot;return a.jsx("button",{onClick:()=>ge(We),className:`${r}-pagination-item`,style:{width:y(x.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?R:$,width:y(Ze)}})},We)})},`${f}-${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:D.scalingValue(m,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((Se,We)=>a.jsx("div",{className:yt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:We===ce&&n,[`${r}-active`]:We===ce}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Ui/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":T,"--link-hover-color":T,position:"relative",top:D.scalingValue(za.offset.y,n),left:D.scalingValue(za.offset.x,n)},children:a.jsx(Ri,{content:Se.imageCaption})})},We))})]})]})]})}function Sc({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 yb=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19674
+ `}function yb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=z.useScopedStyles(),l=ub(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Sc,p=u.sizeType??"drag",w=u.value??Sc.value,x=(e==null?void 0:e.direction)??"horizontal",f=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",y=(e==null?void 0:e.navSize)??"m",b=cb[y],C=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=fe=>z.scalingValue(fe*C,n),S=(e==null?void 0:e.show)??"always",H=(e==null?void 0:e.controls)??null,N=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,U=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,O=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,R=(e==null?void 0:e.controlsColor)??wc.color,B=(e==null?void 0:e.controlsHoverColor)??wc.hover,$=(e==null?void 0:e.navColor)??To.colors.inactive,M=(e==null?void 0:e.navPaginationColor)??To.colors.pagination,_=(e==null?void 0:e.navBackgroundColor)??To.colors.background,A=(e==null?void 0:e.linkColor)??za.linkColor,m=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,P=x==="horizontal",I=p==="click",V=p==="drag",ee=p==="auto"&&(!n||!!i),T=!n,j=f==="slide",K=h==="classic",ce=S!=="never"&&N>0,se=S==="on hover",k=z.scalingValue(N,n),ae={width:k,height:k,maxWidth:k},q=j&&c>1,[le,Z]=s.useState(0),[xe,Ne]=s.useState(q?1:0),[ye,ue]=s.useState(!1),[Q,de]=s.useState(!1),[ne,Ee]=s.useState(!1),[Te,Oe]=s.useState(0),[ve,we]=s.useState(!1),[$e,g]=s.useState(!1),G=s.useRef(!1),F=s.useRef(xe);F.current=xe;const X=s.useRef(null),me=s.useRef(0),Y=s.useRef(null),L=s.useRef(null),ie=s.useRef(null),oe=s.useRef(null),D=s.useCallback(fe=>{G.current=fe,ue(fe)},[]),te=s.useCallback(fe=>{if(c<2||fe===0)return;const He=fe>0?1:-1,ze=Math.abs(fe);if(we(!0),D(!0),!j){Z(Pe=>Io(Pe+fe,c));return}let Je=F.current;const Ce=q&&(Je===0||Je===c+1),De=Ce?le+1:null;Ce&&(Je=le+1);let qe=ze;for(;qe>0;){const Pe=pb(Je,He,c,q);if(Je=Pe.position,qe-=1,Pe.hitBoundary){me.current=qe*He;break}}const ge=ze-qe;if(ge>0&&Z(Pe=>Io(Pe+ge*He,c)),F.current=Je,De!==null){if(F.current=De,Je===De){de(!0),Ne(Je);return}X.current=Je,de(!0),Ne(De);return}de(!1),Ne(Je)},[le,c,q,j,D]),Ae=s.useCallback(fe=>{te(fe)},[te]),he=s.useCallback(fe=>{if(c<2)return;const He=Io(fe,c);if(!(He===le&&!G.current)&&(we(!0),D(!0),Z(He),j)){const ze=He+(q?1:0);X.current=null,me.current=0,F.current=ze,de(!1),Ne(ze)}},[le,c,q,j,D]);s.useEffect(()=>{if(!ye)return;const fe=window.setTimeout(()=>{if(q&&(xe===0||xe===c+1)){X.current=null,de(!0),Ne(le+1);return}D(!1)},Ki);return()=>window.clearTimeout(fe)},[le,c,q,ye,D,xe]),s.useEffect(()=>{if(!Q)return;let fe=0;const He=requestAnimationFrame(()=>{fe=requestAnimationFrame(()=>{const ze=X.current;X.current=null;const Je=me.current;if(me.current=0,de(!1),ze!==null){F.current=ze,Ne(ze);return}if(Je!==0){te(Je);return}D(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(fe)}},[te,D,Q]);const J=`${q}:${c}`,Ze=s.useRef(J);s.useEffect(()=>{if(Ze.current===J)return;Ze.current=J;const fe=c>0?Math.min(le,c-1):0;ie.current=null,oe.current=null,Ee(!1),Oe(0),Z(fe),de(!0),Ne(fe+(q?1:0))},[le,c,q,J]),s.useEffect(()=>{if(!ve)return;const fe=window.setTimeout(()=>we(!1),ob);return()=>window.clearTimeout(fe)},[ve,le]),s.useEffect(()=>{if(!ee||c<2)return;const fe=Math.max(w,.1)*1e3,He=window.setInterval(()=>{T&&$e||Ae(1)},fe);return()=>window.clearInterval(He)},[w,c,Ae,ee,$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 ze=Y.current;if(ze!=null&&ze.hasPointerCapture(fe.pointerId)&&ze.releasePointerCapture(fe.pointerId),!He.isActive){j&&Oe(0);return}const Ce=!(fe.timeStamp-He.lastTime>lb)&&Math.abs(He.velocity)>sb,De=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*ab;if(Ee(!1),!Ce&&!De){Oe(0);return}const qe=De?He.offset-He.baseOffset:He.velocity;let ge=1;De&&He.size>0&&(ge=Math.max(1,Math.round(Math.abs(qe)/He.size))),Oe(0),te(qe<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 Qe=fe=>{const He=Y.current;if(!V||c<2||!He||fe.pointerType==="mouse"&&fe.button!==0)return;X.current=null,me.current=0,G.current&&D(!1);let ze=0;const Je=L.current;if(j&&Je){const Ce=P?Je.offsetWidth:Je.offsetHeight;if(Ce>0){const De=mb(Je,P);let qe=F.current;q&&(qe===0||qe===c+1)?(qe=le+1,F.current=qe,de(!0),Ne(qe),ze=0):ze=De+qe*Ce,Oe(ze)}}He.setPointerCapture(fe.pointerId),oe.current=fe.pointerId,ie.current={pointerId:fe.pointerId,startClientX:fe.clientX,startClientY:fe.clientY,axes:gb(He,`${r}-axis-probe`),size:P?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:fe.timeStamp,velocity:0}},Xe=fe=>{const He=ie.current;if(!He||He.pointerId!==fe.pointerId)return;if(fe.pointerType==="mouse"&&fe.buttons===0){Fe(fe);return}const ze=fe.clientX-He.startClientX,Je=fe.clientY-He.startClientY,Ce=He.axes?hb(He.axes,ze,Je):{x:ze,y:Je},De=P?Ce.x:Ce.y,qe=P?Ce.y:Ce.x,ge=He.baseOffset+De;if(!He.isActive){if(Math.max(Math.abs(De),Math.abs(qe))<rb)return;if(Math.abs(qe)>Math.abs(De)){const je=Y.current;je!=null&&je.hasPointerCapture(He.pointerId)&&je.releasePointerCapture(He.pointerId),ie.current=null,oe.current=null,j&&Oe(0);return}He.isActive=!0,Ee(!0)}const Pe=fe.timeStamp-He.lastTime;Pe>0&&(He.velocity=(ge-He.offset)/Pe,He.lastTime=fe.timeStamp),He.offset=ge,j&&Oe(ge)},nt=fe=>{Fe(fe)},et=P?`translate3d(calc(${-xe*100}% + ${Te}px), 0, 0)`:`translate3d(0, calc(${-xe*100}% + ${Te}px), 0)`,Be=q?[d[c-1],...d,d[0]]:d;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:fb(r,n)}}),a.jsxs("div",{className:xt(`${r}-wrapper`,{[`${r}-transition-reveal`]:f==="reveal",[`${r}-transition-reveal-vertical`]:f==="reveal"&&!P}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:Y,className:xt(`${r}-track`,{[`${r}-track-draggable`]:V,[`${r}-track-draggable-vertical`]:V&&!P}),onPointerDown:Qe,onPointerMove:Xe,onPointerUp:nt,onPointerCancel:nt,onLostPointerCapture:fe=>{oe.current===fe.pointerId&&Fe(fe)},children:a.jsx("div",{ref:L,className:xt(`${r}-list`,{[`${r}-list-slide`]:j,[`${r}-list-slide-vertical`]:j&&!P,[`${r}-list-fade`]:!j}),style:j?{transform:et,transition:ne||Q?"none":`transform ${Ki}ms ${fu}`}:void 0,children:Be.map((fe,He)=>{const ze=q?Io(He-1,c):He,Ce=q&&(He===0||He===c+1)?`clone-${He===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:xt(`${r}-slide`,{[`${r}-is-active`]:!j&&ze===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:xt(`${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)})})}),ce&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:xt(`${r}-arrow`,{[`${r}-arrow-prev`]:P,[`${r}-arrow-prev-vertical`]:!P,[`${r}-hover-arrow`]:se}),style:{color:R,"--arrow-hover-color":B,...ae},children:a.jsxs("button",{onClick:fe=>{fe.stopPropagation(),Ae(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${z.scalingValue(U,n)}, ${z.scalingValue(O*(P?1:-1),n)}) rotate(${P?"0deg":"90deg"})`},children:[H&&a.jsx(ln,{url:H,fill:R,hoverFill:B,className:xt(`${r}-arrow-img`,`${r}-mirror`),style:ae}),!H&&a.jsx($c,{color:R,className:xt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:xt(`${r}-arrow`,{[`${r}-arrow-next`]:P,[`${r}-arrow-next-vertical`]:!P,[`${r}-hover-arrow`]:se}),style:{color:R,"--arrow-hover-color":B,...ae},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:fe=>{fe.stopPropagation(),Ae(1)},style:{transform:`translate(${z.scalingValue(U*(P?-1:1),n)}, ${z.scalingValue(O,n)}) rotate(${P?"0deg":"90deg"})`},children:[H&&a.jsx(ln,{url:H,fill:R,hoverFill:B,className:`${r}-arrow-img`,style:ae}),!H&&a.jsx($c,{color:R,className:xt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),I&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ae(1)}),K&&a.jsx("div",{className:xt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:P,[`${r}-pagination-inside-left`]:!P}),style:P?{bottom:v(b.inset)}:{left:v(b.inset)},children:a.jsx("div",{className:xt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!P,[`${r}-animate-dots`]:ve}),style:{backgroundColor:_,gap:v(b.gapInactive-b.activeDot+b.dot),...P?{height:v(b.activeDot+b.paddingY*2),paddingTop:v(b.paddingY),paddingBottom:v(b.paddingY),paddingLeft:v(b.paddingActive),paddingRight:v(b.paddingActive)}:{width:v(b.activeDot+b.paddingY*2),paddingLeft:v(b.paddingY),paddingRight:v(b.paddingY),paddingTop:v(b.paddingActive),paddingBottom:v(b.paddingActive)},borderRadius:v(b.borderRadius),transform:`translate(${z.scalingValue(To.offset.x,n)}, ${z.scalingValue(To.offset.y,n)})`},children:d.map((fe,He)=>{const ze=He===le,Je=ze?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>he(He),className:`${r}-pagination-item`,style:{width:v(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?M:$,width:v(Je)}})},He)})},`${y}-${x}`)})]}),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:z.scalingValue(m,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:d.map((fe,He)=>a.jsx("div",{className:xt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===le&&n,[`${r}-active`]:He===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Ki/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":A,"--link-hover-color":A,position:"relative",top:z.scalingValue(za.offset.y,n),left:z.scalingValue(za.offset.x,n)},children:a.jsx(Ii,{content:fe.imageCaption})})},He))})]})]})]})}function $c({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 vb=`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
- `,vb={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"}]}]}]}},xb={element:fb,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:vb,sourceCode:yb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},Di=300/1440,bb=8/1440,xi=.004;function wb(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $c(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:D.scalingValue((o-t)/2,i)}}function Sb(e){return`
20855
+ `,xb={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"}]}]}]}},bb={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:xb,sourceCode:vb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},zi=300/1440,wb=8/1440,bi=.004;function Sb(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Tc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:z.scalingValue((o-t)/2,i)}}function $b(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: ${wb(48)};
20862
+ min-height: ${Sb(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 $b="rgba(28,31,34,0.9)",_n=500,vi="cubic-bezier(0.22, 1, 0.36, 1)",Cb=72,Tb=50,Lb={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},Rb=[];function Ib(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 Eb(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Mb(e){const[t]=e.media;return t!=null&&t.url?t:null}function Pb(e){if(!Array.isArray(e)||e.length===0)return[];if(Ib(e)){const t=[];for(const n of e){const i=Eb(n);if(!i)continue;const o=Mb(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 ps(e){return e.type==="video"}function kb(e){e.pause(),e.removeAttribute("src"),e.load()}function wr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ab(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const Fb=1140/1440;function _b(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Wb(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function Nb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Hb({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()=>{kb(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 Ob({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const b=i==="cover",v=s.useRef(null),g=s.useRef(null),h=s.useRef(null),f=s.useRef(0),x=s.useRef(0),S=s.useRef("none"),y=s.useRef(!1),w=s.useRef(!1),H=s.useRef(!1),N=s.useRef(null),[U,O]=s.useState(null),[C,V]=s.useState("opening"),[$,R]=s.useState(0),[k,T]=s.useState(0),[m,M]=s.useState(!1),[E,z]=s.useState(!1),[ne,I]=s.useState(!1),W=s.useRef(n),K=t[n],ae=K?ps(K):!1,de=k!==0||m,A=s.useCallback(Y=>{H.current=Y,M(Y)},[]),he=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),q=s.useCallback(()=>{he(),N.current=window.setTimeout(()=>{he(),A(!1)},_n+32)},[he,A]),ce=s.useCallback(()=>{const Y=v.current,X=g.current;if(!Y)return;const ie=Y.getBoundingClientRect(),j=ie.width,B=ie.height;if(!j||!B)return;if(i==="cover"){O({width:j,height:B,left:ie.left,top:ie.top});return}if(!X){O(wr(Y));return}const{width:J,height:te}=Ab(X);if(!J||!te){O(wr(Y));return}const $e=J/te,ye=j/B;if($e>ye){const F=j/$e;O({width:j,height:F,left:ie.left,top:ie.top+(B-F)/2})}else{const F=B*$e;O({width:F,height:B,left:ie.left+(j-F)/2,top:ie.top})}},[i]);s.useEffect(()=>{ce();const Y=v.current;if(!Y)return;const X=new ResizeObserver(()=>ce());return X.observe(Y),()=>X.disconnect()},[ce,n]),s.useEffect(()=>{C==="opening"&&U&&V("open")},[C,U]),s.useEffect(()=>{if(C!=="closing")return;const Y=setTimeout(()=>r(),_n);return()=>clearTimeout(Y)},[C,r]),s.useEffect(()=>()=>{he()},[he]),s.useLayoutEffect(()=>{if(W.current===n)return;he(),R(0),T(0),A(!1),I(!1),z(!1),f.current=0,x.current=0,S.current="none",y.current=!1,h.current=null,w.current=!1;const Y=v.current;Y&&O(wr(Y)),W.current=n},[n,A,he]),s.useEffect(()=>{if(C!=="open")return;let Y=null;const X=()=>{Y&&(document.removeEventListener("click",Y,!0),Y=null)},ie=()=>{X(),Y=ye=>{ye.stopPropagation(),ye.preventDefault(),X()},document.addEventListener("click",Y,!0)},j=ye=>{he(),H.current=!1,M(!1),T(0),z(!1),y.current=!1,x.current=0,S.current="none";const F=v.current;F&&O(wr(F)),ye<0?d():l()},B=ye=>{if(Math.abs(ye)>Tb&&t.length>1){j(ye);return}A(!0),T(0),q()},J=ye=>{if(ye.touches.length!==1||H.current)return;const F=ye.touches[0];w.current=!0,h.current={x:F.clientX,y:F.clientY},S.current="none",x.current=0,y.current=!1},te=ye=>{if(!h.current||ye.touches.length!==1||H.current)return;const F=ye.touches[0],ve=F.clientX-h.current.x,pe=F.clientY-h.current.y;if(S.current==="none"){if(Math.abs(ve)<10&&Math.abs(pe)<10)return;if(Math.abs(ve)>Math.abs(pe)){if(t.length<=1)return;S.current="horizontal"}else if(pe>0)S.current="vertical";else return}if(S.current==="horizontal"){y.current=!0,z(!0),x.current=ve,T(ve),ye.preventDefault();return}S.current==="vertical"&&(y.current=!0,z(!0),f.current=pe,R(pe),ye.preventDefault())},$e=()=>{if(!h.current)return;const ye=S.current,F=y.current;if(F&&ye==="horizontal")B(x.current),ie();else if(F&&ye==="vertical")if(f.current>Cb){const pe=window.innerHeight;f.current=pe,I(!0),R(pe),V("closing")}else f.current=0,R(0),ie();else ye==="horizontal"&&Math.abs(x.current)>0&&(B(x.current),ie());h.current=null,S.current="none",x.current=0,y.current=!1,z(!1)};return document.addEventListener("touchstart",J,{passive:!0}),document.addEventListener("touchmove",te,{passive:!1}),document.addEventListener("touchend",$e),document.addEventListener("touchcancel",$e),()=>{document.removeEventListener("touchstart",J),document.removeEventListener("touchmove",te),document.removeEventListener("touchend",$e),document.removeEventListener("touchcancel",$e),X()}},[C,t.length,d,l,A,q,he]),s.useEffect(()=>{const Y=X=>{X.key==="Escape"&&(X.preventDefault(),X.stopPropagation(),C!=="closing"&&V("closing"))};return window.addEventListener("keydown",Y,!0),()=>window.removeEventListener("keydown",Y,!0)},[C]);const Q=()=>{C!=="closing"&&V("closing")},be=C==="open",He=C==="closing",xe=$>0?Math.max(0,1-$/500):1,le=$>0?Math.max(.35,1-$/500):1,ee=Y=>{if(Y.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const X=Y.currentTarget.getBoundingClientRect(),ie=Y.clientY-X.top,j=Math.min(52,X.height*.2);if(!(ie>X.height-j)){if(Y.clientX-X.left<X.width/2){l();return}d()}},ue=Y=>{if(t.length<=1)return;const X=Y.currentTarget.getBoundingClientRect(),ie=Y.clientX-X.left,j=Y.clientY-X.top,B=Math.min(52,X.height*.2);if(j>X.height-B){Y.currentTarget.style.cursor="default";return}Y.currentTarget.style.cursor=ie<X.width/2?"w-resize":"e-resize"},oe=s.useCallback(Y=>{Y.propertyName!=="transform"||!H.current||(he(),A(!1))},[he,A]),Fe=de?`translateX(${k}px)`:$>0?`translateY(${$}px)`:void 0,Ce={position:"fixed",top:U==null?void 0:U.top,left:U==null?void 0:U.left,width:U==null?void 0:U.width,height:U==null?void 0:U.height,objectFit:i==="cover"?"cover":"contain",transform:Fe,opacity:$>0?le:C==="opening"||He?0:1,transition:E&&!m?"none":m?`transform ${_n}ms ${vi}`:ne?`transform ${_n}ms ${vi}, opacity ${_n}ms ${vi}`:C==="opening"||He?`opacity ${_n}ms ${vi}`:"none",pointerEvents:ae&&be&&!de?"auto":"none",touchAction:ae&&be?"none":void 0,zIndex:9998},P=U?{position:"fixed",top:U.top,height:U.height,width:U.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:C==="open"?"none":void 0},onClick:Q,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?xe:0,transition:E?"none":`opacity ${_n}ms ${vi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:b?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 ${_n}ms ${vi}`,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 ${_n}ms ${vi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),U&&K&&(ae?a.jsx(Hb,{src:K.url,phase:C,mediaRef:g,mediaStyle:Ce,onLoadedMetadata:ce,onClick:ee,onMouseMove:ue,onTransitionEnd:oe},`${n}-${K.url}`):a.jsx("img",{ref:g,src:K.url,alt:K.name,onLoad:ce,onTransitionEnd:oe,style:Ce},`${n}-${K.url}`)),be&&P&&t.length>1&&!ae&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...P,left:U.left,cursor:"w-resize",pointerEvents:de?"none":"auto"},onClick:Y=>{if(w.current){w.current=!1;return}Y.stopPropagation(),l()}}),a.jsx("div",{style:{...P,left:U.left+U.width/2,cursor:"e-resize",pointerEvents:de?"none":"auto"},onClick:Y=>{if(w.current){w.current=!1;return}Y.stopPropagation(),d()}})]})]})}function Tc({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 b=`${e}-gallery-${ps(t)?"video":"image"}`,v=r.display==="cover",g=Wb(r),h=C=>D.scalingValue(C,l??!1),f=n??Di,x=o?{width:"100%",maxWidth:"100%"}:{width:h(f),maxWidth:"100%"},S=i?{borderRadius:h(i)}:{},y={...x,...v?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...S},w={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(f)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:S},N={className:b,style:w,onClick:p?C=>{C.stopPropagation(),p()}:void 0},U=Math.max(d,xi),O=ps(t)?a.jsx("video",{...N,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...N,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:y,children:O}):O,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(U)}})]})}function Db({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const b=t==="a"?i:t==="c"?o:0,v=b>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(b)},"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(b)},"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 jb(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Lc({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 Rc({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 Ba({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),[b,v]=s.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return s.useLayoutEffect(()=>{if(!h)return;const f=p.current;if(!f||typeof ResizeObserver>"u")return;const x=()=>v(f.offsetHeight);x();const S=new ResizeObserver(x);return S.observe(f),()=>S.disconnect()},[g,h]),a.jsx("div",{ref:f=>{p.current=f,i(f)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${b}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:g})})]})})}const Ic=45;function Ec(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 zb(e){const t=Ec(e,"--cntrl-viewport-height",window.innerHeight),n=Ec(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function Bb(e,t,n){const{top:i,centerY:o}=zb(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 Vb(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=Bb(u,n,c);return Math.exp(-(p*p)/(2*Ic*Ic))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function Gb(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(Vb(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 qb(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 Xb({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var Qe;const{prefix:l}=D.useScopedStyles(),d=s.useMemo(()=>Sb(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",b=(e==null?void 0:e.imgWidth)??Di,v=(e==null?void 0:e.titleWidth)??Fb,g=_b(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??bb,f=(e==null?void 0:e.position)??"center",x=(e==null?void 0:e.titleTopPadding)??0,S=(e==null?void 0:e.titleLeftPadding)??0,y=(e==null?void 0:e.titleRightPadding)??0,w=jb(e==null?void 0:e.transition),H=(e==null?void 0:e.lightbox)??"on",N=p==="b",U=w==="fade"||w==="retype",{setTitleRef:O,dominantIndex:C}=Gb(c.length,U,f),V=((Qe=c[C])==null?void 0:Qe.title)??"",$=qb(V,w==="retype"),R=w==="fade"||w==="retype",k=w==="retype"?$:V,T=N?void 0:{width:D.scalingValue(b,n??!1)},m=H==="on"&&(!n||i||o),M=o??!1,E=(e==null?void 0:e.galleryPaddingRight)??0,z=(e==null?void 0:e.galleryPaddingLeft)??0,ne=(e==null?void 0:e.galleryPaddingBetween)??0,I=tt=>D.scalingValue(tt,n??!1),K={width:I(v)},ae=p==="a"?E:z,de=N?{width:"100%"}:{width:`calc(100% - ${I(b)} - ${I(ae)})`,...p==="c"?{marginLeft:"auto"}:{}},A=Math.max(E,xi),he=Math.max(z,xi),q=Math.max(ne,xi),ce=Math.max(x,xi),Q=Math.max(S,xi),be=Math.max(y,xi),He=Math.max(0,(u??1)-(b??Di)),xe=p==="a"?Math.max(0,(u??1)-(b??Di)-E):p==="c"?Math.max(0,(u??1)-(b??Di)-z):p==="b"?u??1:1,le=M&&(p==="a"||p==="b"||p==="c")&&f==="top",ee=M&&((p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")),ue=M&&((p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"),oe=c.length>1,Fe=N?void 0:I((p==="c"?z:E)+(b??Di)),Ce=p==="c"&&Fe?{left:Fe}:void 0,P=p==="a"&&Fe?{right:Fe}:void 0,Y=N?{left:0,width:"100%"}:p==="a"?{right:I(E),width:I(b)}:{left:I(z),width:I(b)},{titleColor:X,titleFontFamily:ie,titleFontSettings:j,titleFontSize:B,titleLineHeight:J,titleLetterSpacing:te,titleWordSpacing:$e,titleAlign:ye,titleTextAppearance:F,lightboxCounterColor:ve,lightboxCounterFontFamily:pe,lightboxCounterFontSettings:Z,lightboxCounterFontSize:me,lightboxCounterLineHeight:De,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:G,lightboxCounterTextAppearance:Me}=e??{},_e={fontSettings:{fontFamily:ie,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:B??.01,lineHeight:J,letterSpacing:te??0,wordSpacing:$e??0,textAlign:ye??"left",textAppearance:F,color:X??"#000000"},Je=sn(Yt(_e,n)),at=K,it=Cc(B,J,l,n),je=$c(B,J,`${l}-title`,`${l}-text-tight-leading`),Se={fontSettings:{fontFamily:pe,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:me??.01,lineHeight:De,letterSpacing:ge??0,wordSpacing:G??0,textAppearance:Me,color:ve??"#DEDDDD"},Be={...sn(Yt(Se,n)),...Cc(me,De,l,n)},Ze=$c(me,De,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Le=D.buildColorVars(l,{titleColor:X??"#000000",lightboxCounterColor:ve??"#DEDDDD"},Lb,Rb),Ve=s.useRef(null),[se,Te]=s.useState(!1),[Xe,ze]=s.useState([]),[Re,Pe]=s.useState(0),Ae=s.useCallback((tt,nt)=>{m&&(ze(tt),Pe(nt),Te(!0))},[m]),Ke=s.useCallback(()=>{Te(!1)},[]),Oe=s.useMemo(()=>{const tt={...Le},nt=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return nt&&(tt["--cntrl-article-width"]=nt),tt},[Le,se]);return s.useEffect(()=>{if(!se||H!=="on"||typeof document>"u")return;const tt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=tt}},[se,H]),s.useEffect(()=>{!n||o||i||Te(!1)},[n,o,i]),s.useEffect(()=>{H==="off"&&Te(!1)},[H]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{style:Le,children:a.jsxs("div",{ref:Ve,className:`${l}-wrapper`,style:{width:D.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&f==="top"?I(x):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(f==="left"||f==="top")||p==="c"&&(f==="left"||f==="top")?I(S):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&f==="right"||p==="a"&&f==="right"?I(y):void 0},children:[R&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ba,{P:l,title:k,position:f,titleRef:()=>{},titleClassName:`${je} ${l}-single-title`,titleContainerStyle:{...it,...de},titleTextBoxStyle:at,titleStyle:Je,showTextBoxOutline:M,topPaddingControl:le?Lc({P:l,scaled:I,height:ce,paired:!1}):void 0})}),c.map((tt,nt)=>{const xt=Pb(tt.gallery),It=nt<c.length-1,Tt=xt.filter(ft=>ft.lightboxMedia).map(ft=>ft.lightboxMedia),ut={P:l,position:f,titleRef:O(nt),titleClassName:je,titleContainerStyle:it,titleTextBoxStyle:R?{maxWidth:"100%"}:at,titleStyle:Je,showTextBoxOutline:M&&!R,topPaddingControl:le&&!R?Lc({P:l,scaled:I,height:ce,paired:oe}):void 0};return a.jsxs("div",{"data-item-index":nt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:It?I(ne):void 0},children:[ee&&Rc({P:l,controlKey:"titleLeftPadding",scaled:I,width:Q,maxFraction:xe,side:"left",paired:oe,anchorStyle:Ce}),ue&&Rc({P:l,controlKey:"titleRightPadding",scaled:I,width:be,maxFraction:xe,side:"right",paired:oe,anchorStyle:P}),M&&It&&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:I(q),...Y}}),N?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:xt.map(({displayMedia:ft,lightboxMedia:Et},Lt)=>{const bt=Et?Tt.findIndex(Nt=>Nt.url===Et.url):-1;return a.jsx(Tc,{P:l,media:ft,imgWidth:b||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Lt<xt.length-1,showControls:M,onMediaClick:m&&bt>=0?()=>Ae(Tt,bt):void 0},`${ft.url}-${Lt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ba,{...ut,title:R?"":tt.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ba,{...ut,title:R?"":tt.title}),xt.length>0&&a.jsx(Db,{P:l,layoutType:p,galleryWidthStyle:T,galleryPaddingRight:E,galleryPaddingLeft:z,galleryPaddingRightWidth:A,galleryPaddingLeftWidth:he,galleryPaddingMaxFraction:He,showControls:M,scaled:I,children:xt.map(({displayMedia:ft,lightboxMedia:Et},Lt)=>{const bt=Et?Tt.findIndex(Nt=>Nt.url===Et.url):-1;return a.jsx(Tc,{P:l,media:ft,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Lt<xt.length-1,showControls:M,onMediaClick:m&&bt>=0?()=>Ae(Tt,bt):void 0},`${ft.url}-${Lt}`)})})]})]},nt)})]})}),se&&H==="on"&&typeof document<"u"&&e&&(()=>{const tt=(r?document.getElementById(r):null)??document.body;return Vn.createPortal(a.jsx("div",{style:Oe,"data-selection":"none",children:a.jsx(Ob,{prefix:l,items:Xe,index:Re,imageDisplay:Nb(e.lightboxImageDisplay),isEditor:n,onClose:Ke,onPrev:()=>Pe(nt=>(nt-1+Xe.length)%Xe.length),onNext:()=>Pe(nt=>(nt+1)%Xe.length),counterClassName:Ze,counterStyle:Be,backgroundColor:e.backgroundColor??$b})}),tt)})()]})}const Ub=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21072
+ `}const Cb="rgba(28,31,34,0.9)",Wn=500,xi="cubic-bezier(0.22, 1, 0.36, 1)",Tb=72,Lb=50,Rb={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},Ib=[];function Eb(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 Mb(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Pb(e){const[t]=e.media;return t!=null&&t.url?t:null}function kb(e){if(!Array.isArray(e)||e.length===0)return[];if(Eb(e)){const t=[];for(const n of e){const i=Mb(n);if(!i)continue;const o=Pb(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 ps(e){return e.type==="video"}function Ab(e){e.pause(),e.removeAttribute("src"),e.load()}function wr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Fb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const _b=1140/1440;function Wb(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Nb(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function Hb(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ob({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()=>{Ab(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 Db({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const w=i==="cover",x=s.useRef(null),f=s.useRef(null),h=s.useRef(null),y=s.useRef(0),b=s.useRef(0),C=s.useRef("none"),v=s.useRef(!1),S=s.useRef(!1),H=s.useRef(!1),N=s.useRef(null),[U,O]=s.useState(null),[R,B]=s.useState("opening"),[$,M]=s.useState(0),[_,A]=s.useState(0),[m,P]=s.useState(!1),[I,V]=s.useState(!1),[ee,T]=s.useState(!1),j=s.useRef(n),K=t[n],ce=K?ps(K):!1,se=_!==0||m,k=s.useCallback(ve=>{H.current=ve,P(ve)},[]),ae=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),q=s.useCallback(()=>{ae(),N.current=window.setTimeout(()=>{ae(),k(!1)},Wn+32)},[ae,k]),le=s.useCallback(()=>{const ve=x.current,we=f.current;if(!ve)return;const $e=ve.getBoundingClientRect(),g=$e.width,G=$e.height;if(!g||!G)return;if(i==="cover"){O({width:g,height:G,left:$e.left,top:$e.top});return}if(!we){O(wr(ve));return}const{width:F,height:X}=Fb(we);if(!F||!X){O(wr(ve));return}const me=F/X,Y=g/G;if(me>Y){const L=g/me;O({width:g,height:L,left:$e.left,top:$e.top+(G-L)/2})}else{const L=G*me;O({width:L,height:G,left:$e.left+(g-L)/2,top:$e.top})}},[i]);s.useEffect(()=>{le();const ve=x.current;if(!ve)return;const we=new ResizeObserver(()=>le());return we.observe(ve),()=>we.disconnect()},[le,n]),s.useEffect(()=>{R==="opening"&&U&&B("open")},[R,U]),s.useEffect(()=>{if(R!=="closing")return;const ve=setTimeout(()=>r(),Wn);return()=>clearTimeout(ve)},[R,r]),s.useEffect(()=>()=>{ae()},[ae]),s.useLayoutEffect(()=>{if(j.current===n)return;ae(),M(0),A(0),k(!1),T(!1),V(!1),y.current=0,b.current=0,C.current="none",v.current=!1,h.current=null,S.current=!1;const ve=x.current;ve&&O(wr(ve)),j.current=n},[n,k,ae]),s.useEffect(()=>{if(R!=="open")return;let ve=null;const we=()=>{ve&&(document.removeEventListener("click",ve,!0),ve=null)},$e=()=>{we(),ve=Y=>{Y.stopPropagation(),Y.preventDefault(),we()},document.addEventListener("click",ve,!0)},g=Y=>{ae(),H.current=!1,P(!1),A(0),V(!1),v.current=!1,b.current=0,C.current="none";const L=x.current;L&&O(wr(L)),Y<0?d():l()},G=Y=>{if(Math.abs(Y)>Lb&&t.length>1){g(Y);return}k(!0),A(0),q()},F=Y=>{if(Y.touches.length!==1||H.current)return;const L=Y.touches[0];S.current=!0,h.current={x:L.clientX,y:L.clientY},C.current="none",b.current=0,v.current=!1},X=Y=>{if(!h.current||Y.touches.length!==1||H.current)return;const L=Y.touches[0],ie=L.clientX-h.current.x,oe=L.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"){v.current=!0,V(!0),b.current=ie,A(ie),Y.preventDefault();return}C.current==="vertical"&&(v.current=!0,V(!0),y.current=oe,M(oe),Y.preventDefault())},me=()=>{if(!h.current)return;const Y=C.current,L=v.current;if(L&&Y==="horizontal")G(b.current),$e();else if(L&&Y==="vertical")if(y.current>Tb){const oe=window.innerHeight;y.current=oe,T(!0),M(oe),B("closing")}else y.current=0,M(0),$e();else Y==="horizontal"&&Math.abs(b.current)>0&&(G(b.current),$e());h.current=null,C.current="none",b.current=0,v.current=!1,V(!1)};return document.addEventListener("touchstart",F,{passive:!0}),document.addEventListener("touchmove",X,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me),()=>{document.removeEventListener("touchstart",F),document.removeEventListener("touchmove",X),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),we()}},[R,t.length,d,l,k,q,ae]),s.useEffect(()=>{const ve=we=>{we.key==="Escape"&&(we.preventDefault(),we.stopPropagation(),R!=="closing"&&B("closing"))};return window.addEventListener("keydown",ve,!0),()=>window.removeEventListener("keydown",ve,!0)},[R]);const Z=()=>{R!=="closing"&&B("closing")},xe=R==="open",Ne=R==="closing",ye=$>0?Math.max(0,1-$/500):1,ue=$>0?Math.max(.35,1-$/500):1,Q=ve=>{if(ve.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const we=ve.currentTarget.getBoundingClientRect(),$e=ve.clientY-we.top,g=Math.min(52,we.height*.2);if(!($e>we.height-g)){if(ve.clientX-we.left<we.width/2){l();return}d()}},de=ve=>{if(t.length<=1)return;const we=ve.currentTarget.getBoundingClientRect(),$e=ve.clientX-we.left,g=ve.clientY-we.top,G=Math.min(52,we.height*.2);if(g>we.height-G){ve.currentTarget.style.cursor="default";return}ve.currentTarget.style.cursor=$e<we.width/2?"w-resize":"e-resize"},ne=s.useCallback(ve=>{ve.propertyName!=="transform"||!H.current||(ae(),k(!1))},[ae,k]),Ee=se?`translateX(${_}px)`:$>0?`translateY(${$}px)`:void 0,Te={position:"fixed",top:U==null?void 0:U.top,left:U==null?void 0:U.left,width:U==null?void 0:U.width,height:U==null?void 0:U.height,objectFit:i==="cover"?"cover":"contain",transform:Ee,opacity:$>0?ue:R==="opening"||Ne?0:1,transition:I&&!m?"none":m?`transform ${Wn}ms ${xi}`:ee?`transform ${Wn}ms ${xi}, opacity ${Wn}ms ${xi}`:R==="opening"||Ne?`opacity ${Wn}ms ${xi}`:"none",pointerEvents:ce&&xe&&!se?"auto":"none",touchAction:ce&&xe?"none":void 0,zIndex:9998},Oe=U?{position:"fixed",top:U.top,height:U.height,width:U.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:R==="open"?"none":void 0},onClick:Z,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:xe?ye:0,transition:I?"none":`opacity ${Wn}ms ${xi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:w?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,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:xe?1:0,transition:`opacity ${Wn}ms ${xi}`,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:xe?1:0,transition:`opacity ${Wn}ms ${xi}`},children:t.length>1&&a.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),U&&K&&(ce?a.jsx(Ob,{src:K.url,phase:R,mediaRef:f,mediaStyle:Te,onLoadedMetadata:le,onClick:Q,onMouseMove:de,onTransitionEnd:ne},`${n}-${K.url}`):a.jsx("img",{ref:f,src:K.url,alt:K.name,onLoad:le,onTransitionEnd:ne,style:Te},`${n}-${K.url}`)),xe&&Oe&&t.length>1&&!ce&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Oe,left:U.left,cursor:"w-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(S.current){S.current=!1;return}ve.stopPropagation(),l()}}),a.jsx("div",{style:{...Oe,left:U.left+U.width/2,cursor:"e-resize",pointerEvents:se?"none":"auto"},onClick:ve=>{if(S.current){S.current=!1;return}ve.stopPropagation(),d()}})]})]})}function Lc({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 w=`${e}-gallery-${ps(t)?"video":"image"}`,x=r.display==="cover",f=Nb(r),h=R=>z.scalingValue(R,l??!1),y=n??zi,b=o?{width:"100%",maxWidth:"100%"}:{width:h(y),maxWidth:"100%"},C=i?{borderRadius:h(i)}:{},v={...b,...x?{aspectRatio:f,height:"auto",overflow:"hidden"}:{},...C},S={...x?{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"}:{},...x?{}:C},N={className:w,style:S,onClick:p?R=>{R.stopPropagation(),p()}:void 0},U=Math.max(d,bi),O=ps(t)?a.jsx("video",{...N,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...N,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:O}):O,c&&d>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(U)}})]})}function jb({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const w=t==="a"?i:t==="c"?o:0,x=w>0||c;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(w)},"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"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(w)},"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 zb(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Rc({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 Ic({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 Ba({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),[w,x]=s.useState(0),f=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=()=>x(y.offsetHeight);b();const C=new ResizeObserver(b);return C.observe(y),()=>C.disconnect()},[f,h]),a.jsx("div",{ref:y=>{p.current=y,i(y)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${w}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:f})})]})})}const Ec=45;function Mc(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 Bb(e){const t=Mc(e,"--cntrl-viewport-height",window.innerHeight),n=Mc(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function Vb(e,t,n){const{top:i,centerY:o}=Bb(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 Gb(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=Vb(u,n,c);return Math.exp(-(p*p)/(2*Ec*Ec))});let o=0,r=-1;return i.forEach((l,d)=>{l>r&&(r=l,o=d)}),{opacities:i,dominantIndex:o}}function qb(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(Gb(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 Xb(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 Ub({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var it;const{prefix:l}=z.useScopedStyles(),d=s.useMemo(()=>$b(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",w=(e==null?void 0:e.imgWidth)??zi,x=(e==null?void 0:e.titleWidth)??_b,f=Wb(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??wb,y=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleLeftPadding)??0,v=(e==null?void 0:e.titleRightPadding)??0,S=zb(e==null?void 0:e.transition),H=(e==null?void 0:e.lightbox)??"on",N=p==="b",U=S==="fade"||S==="retype",{setTitleRef:O,dominantIndex:R}=qb(c.length,U,y),B=((it=c[R])==null?void 0:it.title)??"",$=Xb(B,S==="retype"),M=S==="fade"||S==="retype",_=S==="retype"?$:B,A=N?void 0:{width:z.scalingValue(w,n??!1)},m=H==="on"&&(!n||i||o),P=o??!1,I=(e==null?void 0:e.galleryPaddingRight)??0,V=(e==null?void 0:e.galleryPaddingLeft)??0,ee=(e==null?void 0:e.galleryPaddingBetween)??0,T=ot=>z.scalingValue(ot,n??!1),K={width:T(x)},ce=p==="a"?I:V,se=N?{width:"100%"}:{width:`calc(100% - ${T(w)} - ${T(ce)})`,...p==="c"?{marginLeft:"auto"}:{}},k=Math.max(I,bi),ae=Math.max(V,bi),q=Math.max(ee,bi),le=Math.max(b,bi),Z=Math.max(C,bi),xe=Math.max(v,bi),Ne=Math.max(0,(u??1)-(w??zi)),ye=p==="a"?Math.max(0,(u??1)-(w??zi)-I):p==="c"?Math.max(0,(u??1)-(w??zi)-V):p==="b"?u??1:1,ue=P&&(p==="a"||p==="b"||p==="c")&&y==="top",Q=P&&((p==="a"||p==="b")&&(y==="left"||y==="top")||p==="c"&&(y==="left"||y==="top")),de=P&&((p==="c"||p==="b")&&y==="right"||p==="a"&&y==="right"),ne=c.length>1,Ee=N?void 0:T((p==="c"?V:I)+(w??zi)),Te=p==="c"&&Ee?{left:Ee}:void 0,Oe=p==="a"&&Ee?{right:Ee}:void 0,ve=N?{left:0,width:"100%"}:p==="a"?{right:T(I),width:T(w)}:{left:T(V),width:T(w)},{titleColor:we,titleFontFamily:$e,titleFontSettings:g,titleFontSize:G,titleLineHeight:F,titleLetterSpacing:X,titleWordSpacing:me,titleAlign:Y,titleTextAppearance:L,lightboxCounterColor:ie,lightboxCounterFontFamily:oe,lightboxCounterFontSettings:D,lightboxCounterFontSize:te,lightboxCounterLineHeight:Ae,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:J,lightboxCounterTextAppearance:Ze}=e??{},Fe={fontSettings:{fontFamily:$e,fontWeight:(g==null?void 0:g.fontWeight)??400,fontStyle:(g==null?void 0:g.fontStyle)??"normal"},fontSize:G??.01,lineHeight:F,letterSpacing:X??0,wordSpacing:me??0,textAlign:Y??"left",textAppearance:L,color:we??"#000000"},Xe=sn(Zt(Fe,n)),nt=K,et=Tc(G,F,l,n),Be=Cc(G,F,`${l}-title`,`${l}-text-tight-leading`),fe={fontSettings:{fontFamily:oe,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:te??.01,lineHeight:Ae,letterSpacing:he??0,wordSpacing:J??0,textAppearance:Ze,color:ie??"#DEDDDD"},ze={...sn(Zt(fe,n)),...Tc(te,Ae,l,n)},Je=Cc(te,Ae,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ce=z.buildColorVars(l,{titleColor:we??"#000000",lightboxCounterColor:ie??"#DEDDDD"},Rb,Ib),De=s.useRef(null),[qe,ge]=s.useState(!1),[Pe,je]=s.useState([]),[Ie,be]=s.useState(0),Le=s.useCallback((ot,rt)=>{m&&(je(ot),be(rt),ge(!0))},[m]),Ye=s.useCallback(()=>{ge(!1)},[]),_e=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,qe]);return s.useEffect(()=>{if(!qe||H!=="on"||typeof document>"u")return;const ot=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ot}},[qe,H]),s.useEffect(()=>{!n||o||i||ge(!1)},[n,o,i]),s.useEffect(()=>{H==="off"&&ge(!1)},[H]),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:z.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(v):void 0},children:[M&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ba,{P:l,title:_,position:y,titleRef:()=>{},titleClassName:`${Be} ${l}-single-title`,titleContainerStyle:{...et,...se},titleTextBoxStyle:nt,titleStyle:Xe,showTextBoxOutline:P,topPaddingControl:ue?Rc({P:l,scaled:T,height:le,paired:!1}):void 0})}),c.map((ot,rt)=>{const ht=kb(ot.gallery),It=rt<c.length-1,Et=ht.filter(mt=>mt.lightboxMedia).map(mt=>mt.lightboxMedia),dt={P:l,position:y,titleRef:O(rt),titleClassName:Be,titleContainerStyle:et,titleTextBoxStyle:M?{maxWidth:"100%"}:nt,titleStyle:Xe,showTextBoxOutline:P&&!M,topPaddingControl:ue&&!M?Rc({P:l,scaled:T,height:le,paired:ne}):void 0};return a.jsxs("div",{"data-item-index":rt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:It?T(ee):void 0},children:[Q&&Ic({P:l,controlKey:"titleLeftPadding",scaled:T,width:Z,maxFraction:ye,side:"left",paired:ne,anchorStyle:Te}),de&&Ic({P:l,controlKey:"titleRightPadding",scaled:T,width:xe,maxFraction:ye,side:"right",paired:ne,anchorStyle:Oe}),P&&It&&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}}),N?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:ht.map(({displayMedia:mt,lightboxMedia:$t},Tt)=>{const ft=$t?Et.findIndex(Ft=>Ft.url===$t.url):-1;return a.jsx(Lc,{P:l,media:mt,imgWidth:w||void 0,cornerRadius:h||void 0,imageDisplay:f,isEditor:n,galleryPaddingBetween:ee,showPaddingAfter:Tt<ht.length-1,showControls:P,onMediaClick:m&&ft>=0?()=>Le(Et,ft):void 0},`${mt.url}-${Tt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ba,{...dt,title:M?"":ot.title})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ba,{...dt,title:M?"":ot.title}),ht.length>0&&a.jsx(jb,{P:l,layoutType:p,galleryWidthStyle:A,galleryPaddingRight:I,galleryPaddingLeft:V,galleryPaddingRightWidth:k,galleryPaddingLeftWidth:ae,galleryPaddingMaxFraction:Ne,showControls:P,scaled:T,children:ht.map(({displayMedia:mt,lightboxMedia:$t},Tt)=>{const ft=$t?Et.findIndex(Ft=>Ft.url===$t.url):-1;return a.jsx(Lc,{P:l,media:mt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:f,isEditor:n,galleryPaddingBetween:ee,showPaddingAfter:Tt<ht.length-1,showControls:P,onMediaClick:m&&ft>=0?()=>Le(Et,ft):void 0},`${mt.url}-${Tt}`)})})]})]},rt)})]})}),qe&&H==="on"&&typeof document<"u"&&e&&(()=>{const ot=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx("div",{style:_e,"data-selection":"none",children:a.jsx(Db,{prefix:l,items:Pe,index:Ie,imageDisplay:Hb(e.lightboxImageDisplay),isEditor:n,onClose:Ye,onPrev:()=>be(rt=>(rt-1+Pe.length)%Pe.length),onNext:()=>be(rt=>(rt+1)%Pe.length),counterClassName:Je,counterStyle:ze,backgroundColor:e.backgroundColor??Cb})}),ot)})()]})}const Yb=`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 Wi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Va={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Yb={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:Wi("Gallery Padding Right"),galleryPaddingLeft:Wi("Gallery Padding Left"),galleryPaddingBetween:Wi("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:Wi("Title Top Padding"),titleLeftPadding:Wi("Title Left Padding"),titleRightPadding:Wi("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Va.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Va.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Va.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Kb={element:Xb,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:Yb,sourceCode:Ub,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Mc=48,Zb=10,Jb=400,Qb=1,ew=1120/1440,tw=140/1440,nw=550/1440,iw=13,ow=4,rw=38/100,aw=28/100,hu=2.8,sw=.9,fu=.22,lw=.5,cw=1,dw=1.5,uw=0,pw=.85;function mw(e,t){return`
23122
+ `;function Ni(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Va={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Kb={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:Ni("Gallery Padding Right"),galleryPaddingLeft:Ni("Gallery Padding Left"),galleryPaddingBetween:Ni("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right","top"]}},titleTopPadding:Ni("Title Top Padding"),titleLeftPadding:Ni("Title Left Padding"),titleRightPadding:Ni("Title Right Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Va.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Va.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Va.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,cornerRadius:8/375,position:"left",titleFontSize:30/375,titleLineHeight:25/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleLeftPadding:0,titleRightPadding:0,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Zb={element:Ub,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:Kb,sourceCode:Yb,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Pc=48,Jb=10,Qb=400,ew=1,tw=1120/1440,nw=140/1440,iw=550/1440,ow=13,rw=4,aw=38/100,sw=28/100,yu=2.8,lw=.9,vu=.22,cw=.5,dw=1,uw=1.5,pw=0,mw=.85;function gw(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 Qo(e){return Number(e.toFixed(4))}function Pc(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ga(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function gw(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 hw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function fw(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 yw(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 vw(e,t){return e?1:1+fu*(.35+t)}function xw(e,t,n,i){const o=t*vw(n,i);return Math.max(0,(e-o)/2)}function vu(e,t,n){const i=yu(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function xu(e,t,n){return e/2+t*n}function bw(e,t,n){return e(t-n/2)}function ww(e,t){return e*t}function bu(e){return Math.round(e*1e3)}function wu(e,t,n){const i=Math.cos(e),o=Math.cos(pw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Qo(t+(n-t)*r)}function Su(e){return wu(e,lw,cw)}function Sw(e){return wu(e,dw,uw)}function $u(e,t){if(!t)return"none";const n=Sw(e);return n<=0?"none":`blur(${n}px)`}function $w(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=vu(i,o,r*Math.PI*2),p=r*Math.PI*2,b=xu(t,n,c),v=Qo(u),g=`calc(${e(b)} - var(--helix-base-w) * ${v} / 2)`,h=`calc(var(--helix-base-w) * ${v})`,f=l?`height: calc(var(--helix-base-h) * ${v});`:"";return`left: ${g}; width: ${h}; ${f} z-index: ${bu(u)}; transform: translateY(-50%); opacity: ${Su(p)}; filter: ${$u(p,d)};`}function Cw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=Mc;u+=1){const p=u/Mc;c.push(` ${Qo(p*100)}% { ${$w(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23167
+ `}function er(e){return Number(e.toFixed(4))}function kc(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ga(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function hw(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 fw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function yw(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 xu(e,t){return(1-e)/(1-e*Math.cos(t))}function vw(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)*xu(e,i)))}return t||1}function xw(e,t){return e?1:1+vu*(.35+t)}function bw(e,t,n,i){const o=t*xw(n,i);return Math.max(0,(e-o)/2)}function bu(e,t,n){const i=xu(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function wu(e,t,n){return e/2+t*n}function ww(e,t,n){return e(t-n/2)}function Sw(e,t){return e*t}function Su(e){return Math.round(e*1e3)}function $u(e,t,n){const i=Math.cos(e),o=Math.cos(mw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return er(t+(n-t)*r)}function Cu(e){return $u(e,cw,dw)}function $w(e){return $u(e,uw,pw)}function Tu(e,t){if(!t)return"none";const n=$w(e);return n<=0?"none":`blur(${n}px)`}function Cw(e,t,n,i,o,r,l,d){const{offset:c,scale:u}=bu(i,o,r*Math.PI*2),p=r*Math.PI*2,w=wu(t,n,c),x=er(u),f=`calc(${e(w)} - var(--helix-base-w) * ${x} / 2)`,h=`calc(var(--helix-base-w) * ${x})`,y=l?`height: calc(var(--helix-base-h) * ${x});`:"";return`left: ${f}; width: ${h}; ${y} z-index: ${Su(u)}; transform: translateY(-50%); opacity: ${Cu(p)}; filter: ${Tu(p,d)};`}function Tw(e,t,n,i,o,r,l,d){const c=[];for(let u=0;u<=Pc;u+=1){const p=u/Pc;c.push(` ${er(p*100)}% { ${Cw(t,n,i,o,r,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23168
23168
  ${c.join(`
23169
23169
  `)}
23170
- }`}function Cu(e,t){return(e%t+t)%t}function Tw(e,t){return il(e,t)/t}function il(e,t){return Cu(e,t)}function Lw(e,t){return Math.floor(e/t)}function Rw(e,t,n,i){return Lw(e,t)*n+il(e,t)*i}function Iw(e,t,n){const i=n==="left"?1-e:e;return`${Qo(-i*t)}s`}function kc(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function Tu(e){const t=e%1;return t<0?t+1:t}function Ew(e,t,n){const i=t/hu,o=n==="left"?-e*i:e*i;return Tu(o)}function Mw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=D.useScopedStyles(),r=s.useRef(null),l=Ga((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),ew),d=Ga(e==null?void 0:e.imageWidth,tw),c=Ga(e==null?void 0:e.turnHeight,nw),u=Pc(e==null?void 0:e.itemsPerTurn,iw,3,40),p=Pc(e==null?void 0:e.turns,ow,1,30),b=Math.min(sw,Math.max(0,rw)),v=Math.min(1,Math.max(0,aw)),g=Math.max(0,(e==null?void 0:e.speed)??hu),h=(e==null?void 0:e.direction)==="left"?"left":"right",f=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",x=(e==null?void 0:e.cornerRadius)??0,S=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>gw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=y.display==="cover",H=de=>D.scalingValue(de,n??!1),N=s.useMemo(()=>yw(b),[b]),U=s.useMemo(()=>xw(l,d,w,v),[l,d,w,v]),O=s.useMemo(()=>mw(o,Cw(o,H,l,U,b,N,w,S)),[o,l,U,b,N,w,S,n]),C=s.useMemo(()=>(t??[]).filter(de=>{var A;return!!((A=de.image)!=null&&A.url)}),[t]),V=c/u,$=d*hw(y),R=Math.min(Jb,p*u),k=Qb*u,T=R+k*2,M=Math.max(0,p-1)*c+(u-1)*V,E=g>0,z=f==="scroll"&&E,ne=f==="autoplay"&&E&&(n?!!i:!0),[I,W]=s.useState(0);s.useEffect(()=>{if(!z)return;const de=r.current;if(!de)return;const A=()=>{const q=de.getBoundingClientRect(),ce=window.innerHeight||document.documentElement.clientHeight,Q=ce+q.height;Q<=0||W(Math.min(1,Math.max(0,(ce-q.top)/Q)))};A(),window.addEventListener("scroll",A,{passive:!0}),window.addEventListener("resize",A);const he=new ResizeObserver(A);return he.observe(de),()=>{window.removeEventListener("scroll",A),window.removeEventListener("resize",A),he.disconnect()}},[z]);const K=z?Ew(I,g,h):0,ae=E&&f==="autoplay"?360/(g*Zb):0;return C.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:H(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:H(l),height:H(M),marginInline:"auto"},children:Array.from({length:T},(de,A)=>{const he=A-k,ce=C[Cu(he,C.length)].image,Q=il(he,u),be=Tw(he,u),He=z?Tu(be+K):be,xe=Rw(he,u,c,V),le=v===0?0:(kc(Q+7.3)-.5)*v*V,ee=w?1:1+(kc(Q+3.1)-.5)*2*fu*(.35+v),ue=He*Math.PI*2,{offset:oe,scale:Fe}=vu(b,N,ue),Ce=d*ee,P=ww(Ce,Fe),Y=xu(l,U,oe),X={"--helix-base-w":H(Ce),...w?{"--helix-base-h":H($)}:{}},ie={top:H(xe+le),transform:"translateY(-50%)",...X,...ne?{animationDuration:`${Qo(ae)}s`,animationDelay:Iw(be,ae,h),animationDirection:h==="left"?"reverse":"normal"}:{left:bw(H,Y,P),width:H(P),...w?{height:H($*Fe)}:{},zIndex:bu(Fe),opacity:Su(ue),filter:$u(ue,S)}},j=x>0?{borderRadius:H(x)}:{},B=w?{...j,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:j,J=fw(ce)?a.jsx("video",{className:`${o}-media`,style:B,src:ce.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:B,src:ce.url,alt:ce.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:ne?`${o}-item`:`${o}-item ${o}-item-static`,style:ie,children:w?a.jsx("div",{className:`${o}-cover`,style:j,children:J}):J},`${p}-${u}-${he}`)})})]})}const Pw=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23170
+ }`}function Lu(e,t){return(e%t+t)%t}function Lw(e,t){return ol(e,t)/t}function ol(e,t){return Lu(e,t)}function Rw(e,t){return Math.floor(e/t)}function Iw(e,t,n,i){return Rw(e,t)*n+ol(e,t)*i}function Ew(e,t,n){const i=n==="left"?1-e:e;return`${er(-i*t)}s`}function Ac(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function Ru(e){const t=e%1;return t<0?t+1:t}function Mw(e,t,n){const i=t/yu,o=n==="left"?-e*i:e*i;return Ru(o)}function Pw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=z.useScopedStyles(),r=s.useRef(null),l=Ga((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),tw),d=Ga(e==null?void 0:e.imageWidth,nw),c=Ga(e==null?void 0:e.turnHeight,iw),u=kc(e==null?void 0:e.itemsPerTurn,ow,3,40),p=kc(e==null?void 0:e.turns,rw,1,30),w=Math.min(lw,Math.max(0,aw)),x=Math.min(1,Math.max(0,sw)),f=Math.max(0,(e==null?void 0:e.speed)??yu),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",v=s.useMemo(()=>hw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=v.display==="cover",H=se=>z.scalingValue(se,n??!1),N=s.useMemo(()=>vw(w),[w]),U=s.useMemo(()=>bw(l,d,S,x),[l,d,S,x]),O=s.useMemo(()=>gw(o,Tw(o,H,l,U,w,N,S,C)),[o,l,U,w,N,S,C,n]),R=s.useMemo(()=>(t??[]).filter(se=>{var k;return!!((k=se.image)!=null&&k.url)}),[t]),B=c/u,$=d*fw(v),M=Math.min(Qb,p*u),_=ew*u,A=M+_*2,P=Math.max(0,p-1)*c+(u-1)*B,I=f>0,V=y==="scroll"&&I,ee=y==="autoplay"&&I&&(n?!!i:!0),[T,j]=s.useState(0);s.useEffect(()=>{if(!V)return;const se=r.current;if(!se)return;const k=()=>{const q=se.getBoundingClientRect(),le=window.innerHeight||document.documentElement.clientHeight,Z=le+q.height;Z<=0||j(Math.min(1,Math.max(0,(le-q.top)/Z)))};k(),window.addEventListener("scroll",k,{passive:!0}),window.addEventListener("resize",k);const ae=new ResizeObserver(k);return ae.observe(se),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k),ae.disconnect()}},[V]);const K=V?Mw(T,f,h):0,ce=I&&y==="autoplay"?360/(f*Jb):0;return R.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:H(l),marginInline:"auto"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:H(l),height:H(P),marginInline:"auto"},children:Array.from({length:A},(se,k)=>{const ae=k-_,le=R[Lu(ae,R.length)].image,Z=ol(ae,u),xe=Lw(ae,u),Ne=V?Ru(xe+K):xe,ye=Iw(ae,u,c,B),ue=x===0?0:(Ac(Z+7.3)-.5)*x*B,Q=S?1:1+(Ac(Z+3.1)-.5)*2*vu*(.35+x),de=Ne*Math.PI*2,{offset:ne,scale:Ee}=bu(w,N,de),Te=d*Q,Oe=Sw(Te,Ee),ve=wu(l,U,ne),we={"--helix-base-w":H(Te),...S?{"--helix-base-h":H($)}:{}},$e={top:H(ye+ue),transform:"translateY(-50%)",...we,...ee?{animationDuration:`${er(ce)}s`,animationDelay:Ew(xe,ce,h),animationDirection:h==="left"?"reverse":"normal"}:{left:ww(H,ve,Oe),width:H(Oe),...S?{height:H($*Ee)}:{},zIndex:Su(Ee),opacity:Cu(de),filter:Tu(de,C)}},g=b>0?{borderRadius:H(b)}:{},G=S?{...g,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:g,F=yw(le)?a.jsx("video",{className:`${o}-media`,style:G,src:le.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:G,src:le.url,alt:le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{className:ee?`${o}-item`:`${o}-item ${o}-item-static`,style:$e,children:S?a.jsx("div",{className:`${o}-cover`,style:g,children:F}):F},`${p}-${u}-${ae}`)})})]})}const kw=`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
- `,kw=["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"],Aw={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:kw.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"]}]}]},Fw={element:Mw,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:Aw,sourceCode:Pw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Ac=120,Fc=3,_w=.12,ol={x:0,y:0,width:100,height:100};function Yi(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function qr(e){return e<0?0:e>1?1:e}function _c(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 Ww(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,b=u.y*t.height;p<n&&(n=p),p>o&&(o=p),b<i&&(i=b),b>r&&(r=b)}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 Nw(e){return e.map(([t,n])=>({x:t,y:n}))}function qa(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 Hw(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=qr(n[o]),l=qr(n[o+1]);l>r&&i.push({x0:r,x1:l})}return Ow(i)}function Ow(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 Dw(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 jw(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 zw(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 Bw(e,t,n,i){let o=null;for(let r=0;r<Fc;r+=1){const l=qr(t+(n-t)*r/Math.max(1,Fc-1)),d=Hw(e,l),c=i==="avoid"?jw(d):d;if(o=o===null?c:Dw(o,c),o.length===0)return[]}return o??[]}function Wc(e,t="stretch",n=ol){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ri(i),d=Vo(l);if(d.length)return t==="viewbox"?Yi(d,n):qa(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(b=>b.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const b of c){const v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",b),u.appendChild(v);let g=0;try{g=v.getTotalLength()}catch{g=0}if(!g)continue;const h=[];for(let f=0;f<Ac;f+=1){const x=v.getPointAtLength(f/Ac*g);h.push({x:x.x,y:x.y})}p.push(h)}return p.length?t==="viewbox"?Yi(p,n):qa(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"?Yi([r],n):qa([r])}const rl={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"},ms="0 0 100 100",Xr=100,gs=16,Vw=12,Gw=16,Xa=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,qw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Nc=Math.PI/4,Xw=8,Uw=Math.PI/18,Yw=8,zi=24,Bi=[];function Kw(){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 Ua(e,t){return an(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function Zw(e){const t=ei(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:an(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function Jw(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 an(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Hc(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Ua(t,i);else{const d=e.trim();if(d&&/^[Mm]/.test(d)){const c=ri(d);c.length&&(l=n==="viewbox"?Ua(c,i):Zw(c))}if(!l.length){const c=o!=="custom"?rl[o]:void 0;c?l=Ua(ri(c),ol):l=Kw()}}return o==="circle"?Jw(l,r):l}function Oc(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":co(an(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function hs(e){const t=e==="rectangle"||e==="custom"?void 0:rl[e];return t?Yi(Vo(ri(t)),ol):[Nw([[0,0],[1,0],[1,1],[0,1]])]}function Qw(e){const t=e.match(qw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function hn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function fs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function rn(e){return{x:e.x,y:e.y}}function eS(e){return{p:rn(e.p),in:e.in?rn(e.in):null,out:e.out?rn(e.out):null}}function Mn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(eS)}))}function an(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 Dc(e,t,n,i=n){return an(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function tS(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:rn(e),c2:rn(l),p:rn(l)}];const u=i*Math.PI/180,p=Math.cos(u),b=Math.sin(u),v=(e.x-l.x)/2,g=(e.y-l.y)/2,h=p*v+b*g,f=-b*v+p*g,x=h*h/(d*d)+f*f/(c*c);if(x>1){const ne=Math.sqrt(x);d*=ne,c*=ne}const S=o===r?-1:1,y=d*d*f*f+c*c*h*h,w=Math.max(0,d*d*c*c-y),H=y===0?0:S*Math.sqrt(w/y),N=H*d*f/c,U=-H*c*h/d,O=p*N-b*U+(e.x+l.x)/2,C=b*N+p*U+(e.y+l.y)/2,V=Math.atan2((f-U)/c,(h-N)/d);let R=Math.atan2((-f-U)/c,(-h-N)/d)-V;!r&&R>0&&(R-=Math.PI*2),r&&R<0&&(R+=Math.PI*2);const k=Math.max(1,Math.ceil(Math.abs(R)/(Math.PI/2))),T=R/k,m=4/3*Math.tan(T/4),M=(ne,I)=>({x:O+p*d*ne-b*c*I,y:C+b*d*ne+p*c*I}),E=[];let z=V;for(let ne=0;ne<k;ne+=1){const I=z+T,W=Math.cos(z),K=Math.sin(z),ae=Math.cos(I),de=Math.sin(I);E.push({c1:M(W-m*K,K+m*W),c2:M(ae+m*de,de-m*ae),p:ne===k-1?rn(l):M(ae,de)}),z=I}return E}function ri(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 g=i[0],h=i[i.length-1];Math.abs(g.p.x-h.p.x)<1e-6&&Math.abs(g.p.y-h.p.y)<1e-6&&(g.in=h.in??g.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(g,h)=>{i.push({p:g,in:An(h??null,g),out:null}),r=g},b=g=>{if(!i.length)return;const h=i[i.length-1];h.out=An(g,h.p)};Xa.lastIndex=0;let v=Xa.exec(t);for(;v!==null;){const g=v[1],h=g.toUpperCase(),f=g!==h,x=Qw(v[2]),S=y=>f?{x:r.x+x[y],y:r.y+x[y+1]}:{x:x[y],y:x[y+1]};if(h==="Z")o=!0,u(),r=rn(l),d=null,c=null;else if(h==="M"){for(let y=0;y+1<x.length;y+=2){const w=S(y);y===0&&(u(),l=rn(w)),p(w)}d=null,c=null}else if(h==="L"){for(let y=0;y+1<x.length;y+=2)p(S(y));d=null,c=null}else if(h==="H"){for(const y of x)p({x:f?r.x+y:y,y:r.y});d=null,c=null}else if(h==="V"){for(const y of x)p({x:r.x,y:f?r.y+y:y});d=null,c=null}else if(h==="C"){for(let y=0;y+5<x.length;y+=6){const w=S(y),H=S(y+2),N=S(y+4);b(w),p(N,H),d=H}c=null}else if(h==="S"){for(let y=0;y+3<x.length;y+=4){const w=d?fs(d,r):rn(r),H=S(y),N=S(y+2);b(w),p(N,H),d=H}c=null}else if(h==="Q")for(let y=0;y+3<x.length;y+=4){const w=S(y),H=S(y+2);b(hn(r,w,2/3)),p(H,hn(H,w,2/3)),c=w,d=null}else if(h==="T")for(let y=0;y+1<x.length;y+=2){const w=c?fs(c,r):rn(r),H=S(y);b(hn(r,w,2/3)),p(H,hn(H,w,2/3)),c=w,d=null}else if(h==="A")for(let y=0;y+6<x.length;y+=7){const w=f?{x:r.x+x[y+5],y:r.y+x[y+6]}:{x:x[y+5],y:x[y+6]};for(const H of tS(r,x[y],x[y+1],x[y+2],x[y+3]!==0,x[y+4]!==0,w))b(H.c1),p(H.p,H.c2);d=null,c=null}v=Xa.exec(t)}return u(),n}function In(e){return`${Number(e.toFixed(2))}`}function An(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Lu(e){return!!(An(e.in,e.p)||An(e.out,e.p))}function er(e,t){return!An(e.out,e.p)&&!An(t.in,t.p)}function jc(e,t){if(er(e,t))return`L${In(t.p.x)},${In(t.p.y)}`;const n=An(e.out,e.p)??e.p,i=An(t.in,t.p)??t.p;return`C${In(n.x)},${In(n.y)} ${In(i.x)},${In(i.y)} ${In(t.p.x)},${In(t.p.y)}`}function co(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${In(i.p.x)},${In(i.p.y)}`);let r=i;for(const l of o)t.push(jc(r,l)),r=l;if(n.closed){const l=jc(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Ru(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 ys(e,t,n){if(er(e,t))return hn(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 Vo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Ru(n)){if(er(o.from,o.to)){i.push(rn(o.from.p));continue}for(let r=0;r<gs;r+=1)i.push(ys(o.from,o.to,r/gs))}n.closed||i.push(rn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function ei(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of Vo(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 nS(e){const t=ei(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 Iu(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 Eu(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Vw)return{closed:!0,nodes:t.map(r=>({p:rn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/Gw)),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:rn(r),...Iu(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Mu(e,t,n=1){if(!e.length)return!1;const i=ei(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 iS(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:an(e,u=>{const p=i+(u.x-t.x)*r,b=o+(u.y-t.y)*l;return{x:t.x+p/d,y:t.y+b/c}})}function oS(e,t){if(!e.length)return e;const n=ei(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 an(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Pu(e){const t={x:0,y:0,width:Xr,height:Xr},n=e!=="custom"?rl[e]:void 0,i=n?an(ri(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):an(Eu(hs("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=oS(i,t);return{shape:e,customPath:co(o),pathFit:"viewbox",pathViewBox:ms}}function Sr(e,t){return t>0?Math.round(e/t)*t:e}function rS(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=Mn(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 zc(e,t,n,i){var r;if(!t.length)return e;const o=Mn(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 aS(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=ku(i,r,d)}),i}function sS(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Mn(e),c=d[t].nodes[n];if(c[i]=rn(o),r){const p=i==="in"?"out":"in";c[p]=fs(o,c.p)}return d}function lS(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=Mn(e);return r[t].nodes[n][i]=null,r}function cS(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=Mn(e),c=d[t].nodes,u=n+1;if(er(r,l))return c.splice(u,0,{p:hn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,b=l.in??l.p,v=hn(r.p,p,i),g=hn(p,b,i),h=hn(b,l.p,i),f=hn(v,g,i),x=hn(g,h,i),S=hn(f,x,i),y=(n+1)%o.nodes.length;return c[n].out=v,c[y].in=h,c.splice(u,0,{p:S,in:f,out:x}),{contours:d,nodeIndex:u}}function ku(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Mn(e);return o[t].nodes.splice(n,1),o}function Bc(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Mn(e),l=r[t].nodes,d=l[n],c=l.length,u=(n-1+c)%c,p=(n+1)%c,b=!!An(l[u].out,l[u].p),v=!!An(l[p].in,l[p].p);if(Lu(d)||b||v)return d.in=null,d.out=null,l[u].out=null,l[p].in=null,r;const g=Iu(l[u].p,d.p,l[p].p);return d.in=g.in,d.out=g.out,r}function dS(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),d={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-d.x,e.y-d.y)}}function uS(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Ru(i)){const l=er(r.from,r.to)?1:gs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=dS(t,ys(r.from,r.to,c),ys(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:c+(u-c)*p.t,distance:p.distance})}}}),n}function pS(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 Vc(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 Gc(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 mS(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 gS(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function vs(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 hS(e,t){const n=vs(e,t);return n?{kind:"align",a:{x:e.x-n.x*zi,y:e.y-n.y*zi},b:{x:t.x+n.x*zi,y:t.y+n.y*zi}}:{kind:"align",a:e,b:t}}function xs(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 qc(e,t,n,i,o){if(e.axis===null)return hS(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return xs(o(r)[t],t,i)}function fS(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(qc(t,"x",l,i,o)),n&&e.y===n.value&&r.push(qc(n,"y",l,i,o)),r}function yS(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 vs(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 vs(i(p),r)}function vS(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,b=Math.hypot(u,p);if(b<1e-6)return{point:e,guides:Bi};const v=Math.atan2(p,u),g=Math.round(v/Nc)*Nc;let h=o?g:null,f=!1;if(!o){const U=[];n&&U.push({angle:Math.atan2(n.y,n.x),smooth:!0}),U.push({angle:g,smooth:!1});for(const O of U){const C=gS(O.angle-v);if(!(Math.abs(C)>Uw)&&!(Math.abs(Math.sin(C))*b>Xw)){h=O.angle,f=O.smooth;break}}}const x=i!==null&&i>0&&Math.abs(b-i)<=Yw;if(h===null&&!x)return{point:e,guides:Bi};const S=h??v,y=x?i:b,w={x:Math.cos(S),y:Math.sin(S)},H=y+(h===null?0:zi),N=x?y:f?zi:0;return{point:l({x:d.x+w.x*y,y:d.y+w.y*y}),guides:[{kind:"angle",a:{x:d.x-w.x*N,y:d.y-w.y*N},b:{x:d.x+w.x*H,y:d.y+w.y*H}}]}}const bs=.1,ws=8,xS=4,Xc=10,Ur=(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}}},Au=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},Ss=(e,t)=>{const n=Ur(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Xc,y:n.y+o*Xc}},$s=(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),Si=(e,t,n)=>{const i=$s(e,t)*n;return{width:t.width*i,height:t.height*i}},En=(e,t,n)=>(e-t)*n,Vi=(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)<xS?.5:qr(r)},bS=(e,t,n,i,o,r)=>{const l=Si(e,n,r),d=e.x+En(e.width,l.width,i),c=e.y+En(e.height,l.height,o),u=$s(e,n),p=$s(t,n),b=Math.min(ws,Math.max(bs,p>0?r*(u/p):r)),v=Si(t,n,b);return{focalX:Vi(t.width,v.width,d-t.x,{clamp:!1}),focalY:Vi(t.height,v.height,c-t.y,{clamp:!1}),scale:b}},Uc=1.08,$r=14,Cr=8;function wS({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:b,onCommit:v}){const g=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,f=s.useRef(null),x=s.useRef(null),S=s.useRef({focalX:c,focalY:u,scale:p});S.current={focalX:c,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var T;y&&((T=g.current)==null||T.focus({preventScroll:!0}))},[y]);const w=s.useCallback((T,m)=>{var E;const M=(E=g.current)==null?void 0:E.getBoundingClientRect();return!M||M.width<=0||M.height<=0?{x:0,y:0}:{x:(T-M.left)/M.width*t.width,y:(m-M.top)/M.height*t.height}},[t.width,t.height]),H=T=>{var M,E;if(!i)return;T.stopPropagation(),T.preventDefault(),(M=g.current)==null||M.focus({preventScroll:!0});const m=Si(n,i,p);f.current={pointerId:T.pointerId,origin:w(T.clientX,T.clientY),startX:En(n.width,m.width,c),startY:En(n.height,m.height,u),width:m.width,height:m.height,moved:!1},(E=g.current)==null||E.setPointerCapture(T.pointerId)},N=(T,m)=>{var ae,de;if(!i)return;T.stopPropagation(),T.preventDefault(),(ae=g.current)==null||ae.focus({preventScroll:!0});const M=Si(n,i,p),E=En(n.width,M.width,c),z=En(n.height,M.height,u),ne={minX:E,minY:z,maxX:E+M.width,maxY:z+M.height},I=Ur(ne,Au(m)),W=Ur(ne,m),K=Math.hypot(W.x-I.x,W.y-I.y);!isFinite(K)||K<=0||(x.current={pointerId:T.pointerId,anchor:I,startDistance:K,startScale:p,startX:E,startY:z,moved:!1},(de=g.current)==null||de.setPointerCapture(T.pointerId))},U=T=>{if(!i)return;const m=x.current;if(m&&T.pointerId===m.pointerId){T.stopPropagation(),T.preventDefault();const E=w(T.clientX,T.clientY),z={x:E.x-n.x,y:E.y-n.y},ne=Math.hypot(z.x-m.anchor.x,z.y-m.anchor.y),I=Math.min(ws,Math.max(bs,m.startScale*(ne/m.startDistance)));if(!m.moved&&Math.abs(I-m.startScale)<1e-4)return;m.moved=!0;const W=I/m.startScale,K=m.anchor.x+(m.startX-m.anchor.x)*W,ae=m.anchor.y+(m.startY-m.anchor.y)*W,de=Si(n,i,I);b({focalX:Vi(n.width,de.width,K),focalY:Vi(n.height,de.height,ae),scale:I});return}const M=f.current;if(M&&T.pointerId===M.pointerId){T.stopPropagation(),T.preventDefault();const E=w(T.clientX,T.clientY),z=E.x-M.origin.x,ne=E.y-M.origin.y;if(!M.moved&&z===0&&ne===0)return;M.moved=!0,b({focalX:Vi(n.width,M.width,M.startX+z),focalY:Vi(n.height,M.height,M.startY+ne),scale:p})}},O=T=>{var E,z;const m=f.current;if(m&&T.pointerId===m.pointerId){f.current=null,T.stopPropagation(),(E=g.current)!=null&&E.hasPointerCapture(m.pointerId)&&g.current.releasePointerCapture(m.pointerId),m.moved&&v(S.current);return}const M=x.current;M&&T.pointerId===M.pointerId&&(x.current=null,T.stopPropagation(),(z=g.current)!=null&&z.hasPointerCapture(M.pointerId)&&g.current.releasePointerCapture(M.pointerId),M.moved&&v(S.current))},C=T=>{if(T.key==="Escape"){T.stopPropagation(),d("none");return}if(T.key==="="||T.key==="+"||T.key==="-"||T.key==="_"){T.preventDefault(),T.stopPropagation();const m=T.key==="="||T.key==="+",M=Math.min(ws,Math.max(bs,p*(m?Uc:1/Uc))),E={focalX:c,focalY:u,scale:M};b(E),v(E)}},V=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},R=s.useMemo(()=>{const T=i??{width:n.width,height:n.height},m=Si(n,T,p);return!(m.width>0)||!(m.height>0)?null:{x:n.x+En(n.width,m.width,c),y:n.y+En(n.height,m.height,u),width:m.width,height:m.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),k=R?{minX:R.x,minY:R.y,maxX:R.x+R.width,maxY:R.y+R.height}:$;return a.jsxs("svg",{ref:g,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:C,onPointerMove:U,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),y&&o&&R&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:R.x,y:R.y,width:R.width,height:R.height,children:[a.jsx("rect",{x:R.x,y:R.y,width:R.width,height:R.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:R.x,y:R.y,width:R.width,height:R.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:R.x,y:R.y,width:R.width,height:R.height})]}),y&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:H}),V.map(T=>{const m=Ss(k,T),M=T==="ne"||T==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:m.x-Cr/2,y:m.y-Cr/2,width:Cr,height:Cr}),a.jsx("rect",{className:`${e}-editor-scale-grab${M?` ${e}-editor-scale-grab-nesw`:""}`,x:m.x-$r/2,y:m.y-$r/2,width:$r,height:$r,onPointerDown:E=>N(E,T)})]},T)})]})]})}const Fu=10,SS=Fu*2,$o=7,$S=4,Co=9,CS=3.5,Yc=1.08,TS=.05,Tr=14,LS=1,Lr=14,Rr=8;function RS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:d,onStageChange:c,onSelectionChange:u,onChange:p,onCommit:b}){const v=s.useRef(null),g=s.useRef(null),h=s.useRef(i);h.current=i;const f=s.useRef(null),x=s.useRef(null),S=s.useRef(null),y=s.useRef(null),[w,H]=s.useState([]),[N,U]=s.useState(Bi),O=s.useCallback(P=>{U(Y=>mS(Y,P)?Y:P)},[]),C=d==="shape";s.useEffect(()=>{var P;C&&((P=v.current)==null||P.focus({preventScroll:!0}))},[C]),s.useEffect(()=>{C||H(P=>P.length?[]:P)},[C]);const V=w.length>0;s.useEffect(()=>{u==null||u(V)},[V,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const $=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,k=Math.min($,R),T=r&&l?k:$,m=r&&l?k:R,M=r&&l?(t.width-n.width*k)/2:0,E=r&&l?(t.height-n.height*k)/2:0,z=s.useCallback(P=>r?{x:M+(P.x-n.x)*T,y:E+(P.y-n.y)*m}:{x:P.x-n.x,y:P.y-n.y},[r,n,T,m,M,E]),ne=s.useCallback(P=>r?{x:n.x+(T>0?(P.x-M)/T:0),y:n.y+(m>0?(P.y-E)/m:0)}:{x:n.x+P.x,y:n.y+P.y},[r,n,T,m,M,E]),I=s.useMemo(()=>ne({x:t.width/2,y:t.height/2}),[ne,t.width,t.height]),W=s.useCallback((P,Y)=>{var ie;const X=(ie=v.current)==null?void 0:ie.getBoundingClientRect();if(!X||X.width<=0||X.height<=0)return{x:0,y:0};if(r){const j=(P-X.left)/X.width*t.width,B=(Y-X.top)/X.height*t.height;return{x:n.x+(T>0?(j-M)/T:0),y:n.y+(m>0?(B-E)/m:0)}}return{x:n.x+(P-X.left),y:n.y+(Y-X.top)}},[r,n,t.width,t.height,T,m,M,E]),K=s.useCallback((P,Y)=>{var ie;const X=(ie=v.current)==null?void 0:ie.getBoundingClientRect();return!X||X.width<=0||X.height<=0?{x:0,y:0}:{x:(P-X.left)/X.width*t.width,y:(Y-X.top)/X.height*t.height}},[t.width,t.height]),ae=s.useCallback((P,Y)=>{const X=l&&!(Y!=null&&Y.preserveShape)?iS(P,n,t,M,E,T,m):P;b(X,Y)},[b,l,n,t,M,E,T,m]),de=P=>{var De;const Y=P.metaKey||P.ctrlKey,X=S.current;if(X&&P.pointerId===X.pointerId){if(P.stopPropagation(),P.preventDefault(),X.startDistance<=0)return;const ge=W(P.clientX,P.clientY),G=Math.hypot(ge.x-X.origin.x,ge.y-X.origin.y),Me=Math.max(TS,G/X.startDistance);if(!X.moved&&Math.abs(Me-1)<1e-4)return;X.moved=!0,p(Dc(X.startContours,X.origin,Me));return}const ie=x.current;if(ie&&P.pointerId===ie.pointerId){P.stopPropagation(),P.preventDefault();const ge=W(P.clientX,P.clientY),{bbox:G}=ie,Me=G.maxX-G.minX,_e=G.maxY-G.minY,rt=ge.x-ie.origin.x,Je=ge.y-ie.origin.y;let at=rt,it=Je;if(isFinite(Me)&&isFinite(_e))if(r){let Se=n.x,We=n.x+n.width,Be=n.y,Ze=n.y+n.height;l&&(T>0&&(Se=n.x+(0-M)/T,We=n.x+(t.width-M)/T),m>0&&(Be=n.y+(0-E)/m,Ze=n.y+(t.height-E)/m));const Le=Math.min(Se,We-Me),Ve=Math.max(Se,We-Me),se=Math.min(Be,Ze-_e),Te=Math.max(Be,Ze-_e),Xe=Math.min(Ve,Math.max(Le,G.minX+rt)),ze=Math.min(Te,Math.max(se,G.minY+Je));at=Xe-G.minX,it=ze-G.minY}else{const Se=G.minX-n.x,We=G.minY-n.y,Be=Math.min(0,t.width-Me),Ze=Math.max(0,t.width-Me),Le=Math.min(0,t.height-_e),Ve=Math.max(0,t.height-_e),se=Math.min(Ze,Math.max(Be,Se+rt)),Te=Math.min(Ve,Math.max(Le,We+Je));at=se-Se,it=Te-We}const je=[];if(!Y&&isFinite(Me)&&isFinite(_e)){const Se=z({x:G.minX+Me/2+at,y:G.minY+_e/2+it}),We={x:t.width/2,y:t.height/2};Math.abs(Se.x-We.x)<=Tr&&(at=I.x-G.minX-Me/2,je.push(xs(We.x,"x",t))),Math.abs(Se.y-We.y)<=Tr&&(it=I.y-G.minY-_e/2,je.push(xs(We.y,"y",t)))}if(!ie.moved&&at===0&&it===0)return;ie.moved=!0,O(je.length?je:Bi),p(an(ie.startContours,Se=>({x:Se.x+at,y:Se.y+it})),{carryImage:!0});return}const j=y.current;if(j&&P.pointerId===j.pointerId){P.stopPropagation(),P.preventDefault();const ge=W(P.clientX,P.clientY);let G=ge.x-j.origin.x,Me=ge.y-j.origin.y;if(P.shiftKey&&(Math.abs(G)>Math.abs(Me)?Me=0:G=0),!j.moved&&G===0&&Me===0)return;j.moved=!0,p(zc(j.startContours,j.selection,G,Me));return}const B=f.current;if(!B||P.pointerId!==B.pointerId)return;P.stopPropagation(),P.preventDefault();const J=W(P.clientX,P.clientY);if(B.kind==="anchor"){const ge={x:B.anchor.x+(J.x-B.origin.x),y:B.anchor.y+(J.y-B.origin.y)},G=Y?[]:pS(h.current,{contour:B.contour,node:B.node}),Me=Y||!B.center?[]:[B.center],_e=Gc(Vc(G,Me.map(at=>at.x),"x"),ge,"x",z,Tr),rt=Gc(Vc(G,Me.map(at=>at.y),"y"),ge,"y",z,Tr),Je=Y?ge:{x:(_e==null?void 0:_e.value)??Sr(ge.x,o),y:(rt==null?void 0:rt.value)??Sr(ge.y,o)};if(P.shiftKey&&(Math.abs(Je.x-B.anchor.x)>Math.abs(Je.y-B.anchor.y)?Je.y=B.anchor.y:Je.x=B.anchor.x),!B.moved&&Je.x===B.anchor.x&&Je.y===B.anchor.y)return;B.moved=!0,O(fS(Je,_e,rt,t,z)),p(rS(h.current,B.contour,B.node,Je));return}const te=(De=h.current[B.contour])==null?void 0:De.nodes[B.node],$e=B.mirror&&!P.altKey,ye=$e||Y?null:B.kind==="in"?te==null?void 0:te.out:te==null?void 0:te.in,F=te?z(te.p):null,ve=ye?z(ye):null,pe=te&&(!Y||P.shiftKey)?vS(J,te.p,$e||Y?null:yS(h.current[B.contour],B.node,B.kind,z),F&&ve?Math.hypot(ve.x-F.x,ve.y-F.y):null,P.shiftKey,z,ne):{point:J,guides:Bi},Z=pe.guides.length?pe.point:Y?J:{x:Sr(J.x,o),y:Sr(J.y,o)},me=B.kind==="in"?te==null?void 0:te.in:te==null?void 0:te.out;!B.moved&&me&&Z.x===me.x&&Z.y===me.y||(B.moved=!0,O(pe.guides),p(sS(h.current,B.contour,B.node,B.kind,Z,$e)))},A=P=>{O(Bi);const Y=S.current;if(Y&&P.pointerId===Y.pointerId){S.current=null,P.stopPropagation();const ye=v.current;ye!=null&&ye.hasPointerCapture(Y.pointerId)&&ye.releasePointerCapture(Y.pointerId),Y.moved&&ae(h.current,{preserveShape:!0});return}const X=x.current;if(X&&P.pointerId===X.pointerId){x.current=null,P.stopPropagation();const ye=v.current;ye!=null&&ye.hasPointerCapture(X.pointerId)&&ye.releasePointerCapture(X.pointerId),X.moved?ae(h.current,{preserveShape:!0}):H([]);return}const ie=y.current;if(ie&&P.pointerId===ie.pointerId){y.current=null,P.stopPropagation();const ye=v.current;ye!=null&&ye.hasPointerCapture(ie.pointerId)&&ye.releasePointerCapture(ie.pointerId),ie.moved&&ae(h.current);return}const j=f.current;if(!j||P.pointerId!==j.pointerId)return;f.current=null,P.stopPropagation();const B=v.current;B!=null&&B.hasPointerCapture(j.pointerId)&&B.releasePointerCapture(j.pointerId);const J=Math.hypot(P.clientX-j.clientOrigin.x,P.clientY-j.clientOrigin.y);if(j.moved||J>$S){j.moved&&ae(h.current);return}if(!j.toggleOnRelease||P.type!=="pointerup")return;const $e=Bc(h.current,j.contour,j.node);$e!==h.current&&(p($e),ae($e))},he=P=>{P.stopPropagation()},q=P=>{var Y,X;P.stopPropagation(),P.preventDefault(),(Y=v.current)==null||Y.focus({preventScroll:!0}),x.current={pointerId:P.pointerId,origin:W(P.clientX,P.clientY),startContours:Mn(i),bbox:ei(i),moved:!1},(X=v.current)==null||X.setPointerCapture(P.pointerId)},ce=(P,Y)=>{var J,te;P.stopPropagation(),P.preventDefault(),(J=v.current)==null||J.focus({preventScroll:!0}),H([]),c("shape");const X=ei(i),ie=Ur(X,Au(Y)),j=Ss(X,Y),B=Math.hypot(j.x-ie.x,j.y-ie.y);!isFinite(B)||B<=0||(S.current={pointerId:P.pointerId,corner:Y,origin:ie,startDistance:B,startContours:Mn(i),moved:!1},(te=v.current)==null||te.setPointerCapture(P.pointerId))},Q=(P,Y,X,ie)=>{var J,te,$e,ye;P.stopPropagation(),P.preventDefault(),(J=v.current)==null||J.focus({preventScroll:!0});const j=(te=i[X])==null?void 0:te.nodes[ie];if(!j)return;if(P.altKey){const F=Y==="anchor"?ku(i,X,ie):lS(i,X,ie,Y);if(F===i)return;H(Y==="anchor"?[]:[{contour:X,node:ie}]),p(F),ae(F);return}const B=P.metaKey||P.ctrlKey;if(Y==="anchor"&&P.shiftKey&&!B){H(F=>F.some(ve=>ve.contour===X&&ve.node===ie)?F.filter(ve=>!(ve.contour===X&&ve.node===ie)):[...F,{contour:X,node:ie}]);return}if(Y==="anchor"&&!B&&w.length>1&&w.some(F=>F.contour===X&&F.node===ie)){y.current={pointerId:P.pointerId,origin:W(P.clientX,P.clientY),startContours:Mn(i),selection:w,moved:!1},($e=v.current)==null||$e.setPointerCapture(P.pointerId);return}H([{contour:X,node:ie}]),f.current={kind:Y,contour:X,node:ie,pointerId:P.pointerId,origin:W(P.clientX,P.clientY),clientOrigin:{x:P.clientX,y:P.clientY},anchor:j.p,center:nS(i),mirror:Y!=="anchor"&&!!(j.in&&j.out),toggleOnRelease:B,moved:!1},(ye=v.current)==null||ye.setPointerCapture(P.pointerId)},be=P=>{P.stopPropagation(),P.preventDefault();const Y=an(i,z),X=uS(Y,K(P.clientX,P.clientY));if(!X||X.distance>Fu)return;const{contours:ie,nodeIndex:j}=cS(i,X.contour,X.segment,X.t);j<0||(H([{contour:X.contour,node:j}]),p(ie),ae(ie))},He=P=>{if(P.key==="="||P.key==="+"||P.key==="-"||P.key==="_"){P.preventDefault(),P.stopPropagation();const B=ei(i);if(!isFinite(B.minX)||!isFinite(B.maxX))return;const J={x:(B.minX+B.maxX)/2,y:(B.minY+B.maxY)/2},$e=P.key==="="||P.key==="+"?Yc:1/Yc,ye=Dc(i,J,$e);p(ye),ae(ye,{preserveShape:!0});return}if(P.key==="Escape"){P.stopPropagation(),H([]),c("none");return}if(!w.length)return;if(P.key==="Backspace"||P.key==="Delete"){P.preventDefault(),P.stopPropagation();const B=aS(i,w);if(B===i)return;H([]),p(B),ae(B);return}const Y=o>0?o:LS,X=P.shiftKey?Y*10:Y,ie={ArrowLeft:[-X,0],ArrowRight:[X,0],ArrowUp:[0,-X],ArrowDown:[0,X]}[P.key];if(!ie)return;P.preventDefault(),P.stopPropagation();const j=zc(i,w,ie[0],ie[1]);p(j),ae(j)},xe=s.useMemo(()=>co(an(i,z)),[i,z]),le=s.useMemo(()=>ei(i),[i]),ee=z({x:le.minX,y:le.minY}),ue={width:z({x:le.maxX,y:le.minY}).x-ee.x,height:z({x:le.minX,y:le.maxY}).y-ee.y},oe=C&&w.length===0&&isFinite(le.minX)&&isFinite(le.maxX)&&le.maxX>le.minX&&le.maxY>le.minY,Fe=w.length>0||C,Ce=Fe;return a.jsxs("svg",{ref:v,className:`${e}-editor${Fe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:He,onPointerDown:()=>{var P;return(P=v.current)==null?void 0:P.focus({preventScroll:!0})},onPointerMove:de,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:A,onContextMenu:P=>{P.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{H([]),c("none")},onClick:be}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:xe}),Ce&&N.map((P,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${P.kind}`,x1:P.a.x,y1:P.a.y,x2:P.b.x,y2:P.b.y},`${P.kind}-${Y}`)),a.jsx("path",{ref:g,className:`${e}-editor-body`,d:xe,fillRule:"evenodd",onPointerDown:q,onClick:be}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:xe,style:{strokeWidth:SS},onClick:be}),Ce&&i.map((P,Y)=>P.nodes.map((X,ie)=>{const j=w.some(J=>J.contour===Y&&J.node===ie),B=z(X.p);return a.jsxs("g",{children:[j&&w.length===1&&["in","out"].map(J=>{const te=X[J];if(!te)return null;const $e=z(te);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:B.x,y1:B.y,x2:$e.x,y2:$e.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:$e.x,cy:$e.y,r:CS}),a.jsx("circle",{className:`${e}-editor-grab`,cx:$e.x,cy:$e.y,r:Co,onPointerDown:ye=>Q(ye,J,Y,ie),onClick:he})]},J)}),a.jsx("rect",{className:`${e}-editor-anchor${j?` ${e}-editor-anchor-selected`:""}`,x:B.x-$o/2,y:B.y-$o/2,width:$o,height:$o,rx:Lu(X)?$o/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:B.x-Co,y:B.y-Co,width:Co*2,height:Co*2,onPointerDown:J=>Q(J,"anchor",Y,ie),onClick:he,onDoubleClick:J=>{J.stopPropagation(),J.preventDefault();const te=Bc(i,Y,ie);p(te),ae(te)}})]},`${Y}-${ie}`)})),oe&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:ee.x,y:ee.y,width:ue.width,height:ue.height}),["nw","ne","se","sw"].map(P=>{const Y=z(Ss(le,P)),X=P==="ne"||P==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-Rr/2,y:Y.y-Rr/2,width:Rr,height:Rr}),a.jsx("rect",{className:`${e}-editor-scale-grab${X?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-Lr/2,y:Y.y-Lr/2,width:Lr,height:Lr,onPointerDown:ie=>ce(ie,P),onClick:he})]},P)})]})]})}const IS=4e3,ES=/^(?:https?:|mailto:|tel:)/i;function _u(e){return!!e&&typeof e=="object"&&e.type==="link"}function MS(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!ES.test(t)))return t}function PS(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(_u(c)){o(c.children??[],MS(c.value),c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const b of p.split(/\s+/))b&&t.push({text:b,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Kc(e){return{...e.fontFamily&&{fontFamily:go(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 kS(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(_u(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Zc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:b}=e,v=e.lineHeight*l,g=e.spaceWidth*l,h=[];if(!t.length||d<=0||v<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const f=Math.max(1,g*.5),x=v*_w;let S=0,y=0,w=0,H=t[0].para,N=0,U=0,O=null;for(;S<t.length&&w<IS;){const C=y+v>c;if(C&&!u)break;const V=t[S].para;if(V>H+1){y+=v*(V-H-1),H=V-1,w+=1;continue}let $=C?[{x0:0,x1:d}]:Bw(i,(y+x)/c,(y+v-x)/c,o).map(k=>({x0:k.x0*d,x1:k.x1*d}));p>0&&b>0&&!C&&$.length&&(O===null&&(O=w,N=$[0].x0,U=y),w-O<b&&($=zw($,{x0:N,x1:N+p})));const R=$.reduce((k,T)=>Math.max(k,T.x1-T.x0),0);for(const k of $){const T=k.x1-k.x0;if(T<f)continue;if(S>=t.length||t[S].para!==V)break;const m=S;let M=0;for(;S<t.length&&t[S].para===V;){const E=n[S]*l,z=S===m?E:g+E;if(M+z>T&&!(S===m&&T>=R-.5&&E>d-.5))break;M+=z,S+=1}if(S>m){const E=S>=t.length||t[S].para!==V;h.push({top:y,left:k.x0,width:T,from:m,to:S,justify:r==="justify"&&!E})}if(S>=t.length||t[S].para!==V)break}H=V,y+=v,w+=1}return{segments:h,placed:S,height:h.length?y:0,capLeft:N,capTop:U}}const AS=.12,FS=2,_S=10,Ya=.25,WS=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},NS=(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,HS=(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=WS(e);(!r||!NS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ka=(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})))},Ir=typeof window>"u"?s.useEffect:s.useLayoutEffect;function OS(){return typeof document>"u"?null:document.body}function DS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:b,dropCapLines:v,dropCapSize:g,showGuides:h,typography:f,imageUrl:x,imageFocalX:S,imageFocalY:y,imageScale:w,imageCustomPath:H,pathDragActive:N,pathCarryImage:U,onCarryImageConsumed:O,pathEditor:C,imageEditor:V}){var Le,Ve;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[R,k]=s.useState(null),T=s.useRef(null),[m,M]=s.useState({width:0,height:0}),[E,z]=s.useState(null),[ne,I]=s.useState(0),[W,K]=s.useState("none");s.useEffect(()=>{!C&&!V&&K("none")},[C,V]);const[ae,de]=s.useState(null);s.useEffect(()=>{if(!x||typeof Image>"u"){de(null);return}let se=!1;const Te=new Image;return Te.onload=()=>{se||de({width:Te.naturalWidth,height:Te.naturalHeight})},Te.src=x,()=>{se=!0}},[x]);const A=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),he=s.useMemo(()=>PS(A),[A]),q=s.useMemo(()=>kS(A),[A]),ce=v>0&&g>1?((Ve=(Le=he[0])==null?void 0:Le.text)==null?void 0:Ve.charAt(0))??"":"",Q=(C==null?void 0:C.contours)??null,be=s.useMemo(()=>{let se=[];if(Q){const Te=Vo(Q);Te.length&&(se=Yi(Te,r))}if(!se.length){const Te=i.trim(),Xe=Te?Wc(Te,o,r):null;Xe&&Xe.length?se=Xe:se=hs(n==="custom"?"rectangle":n)}return n==="circle"?Ka(se,m):se},[Q,n,i,o,r,m.width,m.height]),He=C==null?void 0:C.onConvert,xe=(C==null?void 0:C.needsConversion)??!1,le=s.useMemo(()=>{if(n==="circle")return!1;const se=Q??(i.trim()?ri(i):null);return!!(se&&Mu(se,r))},[Q,i,r,n]),[ee,ue]=s.useState(null);Ir(()=>{if(!le){ee&&ue(null);return}!ee&&m.width>0&&m.height>0&&ue({width:m.width,height:m.height})},[le,m.width,m.height,ee]);const oe=s.useMemo(()=>{if(!le||m.width<=0||m.height<=0)return be;const se=ee??m,Te=r.width/se.width,Xe=r.height/se.height;return be.map(ze=>ze.map(Re=>({x:Re.x*Te,y:Re.y*Xe})))},[be,le,ee,r.width,r.height,m.width,m.height]),Fe=s.useMemo(()=>{if(Q){const ze=Vo(Q);if(ze.length){const Re=Yi(ze,r);return n==="circle"?Ka(Re,m):Re}}const se=H.trim(),Te=se?Wc(se,o,r):null,Xe=Te&&Te.length?Te:hs(n==="custom"?"rectangle":n);return n==="circle"?Ka(Xe,m):Xe},[Q,n,H,o,r,m.width,m.height]),Ce=s.useMemo(()=>{if(!le||m.width<=0||m.height<=0)return Fe;const se=ee??m,Te=r.width/se.width,Xe=r.height/se.height;return Fe.map(ze=>ze.map(Re=>({x:Re.x*Te,y:Re.y*Xe})))},[Fe,le,ee,r.width,r.height,m.width,m.height]),P=s.useRef(null),Y=s.useRef(!1);s.useEffect(()=>{if(!(!He||m.width<=0||m.height<=0)){if(le){if(P.current===i)return;const se=Q??(i.trim()?ri(i):null);if(!(se!=null&&se.length))return;const Te=an(se,Xe=>({x:r.x+(Xe.x-r.x)/m.width*r.width,y:r.y+(Xe.y-r.y)/m.height*r.height}));P.current=co(Te),He(Te);return}!xe||!be.length||Y.current||(Y.current=!0,He(an(Eu(be),se=>({x:se.x*Xr,y:se.y*Xr}))))}},[xe,le,He,be,Q,i,r,m.width,m.height]),Ir(()=>{const se=R;if(!se||typeof ResizeObserver>"u")return;const Te=()=>{const ze=se.getBoundingClientRect();M(Re=>Math.abs(Re.width-ze.width)<.5&&Math.abs(Re.height-ze.height)<.5?Re:{width:ze.width,height:ze.height})};Te();const Xe=new ResizeObserver(Te);return Xe.observe(se),()=>Xe.disconnect()},[R]),s.useEffect(()=>{const se=typeof document<"u"?document.fonts:void 0;se!=null&&se.ready&&se.ready.then(()=>{I(Te=>Te+1)})},[]),Ir(()=>{const se=T.current;if(!se)return;if(!he.length){z(null);return}const Te=[],Xe=document.createDocumentFragment();for(const It of he){const Tt=document.createElement("span");Object.assign(Tt.style,Kc(It.leaf)),Tt.textContent=It.text,Xe.appendChild(Tt),Te.push(Tt)}const ze=document.createElement("span");ze.textContent=" ",Xe.appendChild(ze);const Re=document.createElement("span");Re.textContent=ce||"H",Re.style.lineHeight="1",Xe.appendChild(Re),se.replaceChildren(Xe);const Pe=window.getComputedStyle(se),Ae=parseFloat(Pe.fontSize)||16,Ke=parseFloat(Pe.lineHeight),Oe=Number.isNaN(Ke)?Ae*1.2:Ke,Qe=Math.max(Oe,Ae);Re.style.fontSize=`${Qe*g}px`;const tt=Te.map(It=>It.getBoundingClientRect().width),nt=ze.getBoundingClientRect().width,xt=ce?Re.getBoundingClientRect().width:0;se.replaceChildren(),z({widths:tt,spaceWidth:nt,lineHeight:Qe,capWidth:xt})},[he,f,ce,v,g,ne,m.width]);const X=E&&ce?E.capWidth+E.lineHeight*AS:0,ie=Math.max(v,Math.ceil(g)),j=s.useMemo(()=>{if(!E||!he.length||m.width<=0||m.height<=0||!u)return 1;const se=ze=>Zc({tokens:he,widths:E.widths,spaceWidth:E.spaceWidth,lineHeight:E.lineHeight,width:m.width,height:m.height,rings:oe,mode:l,align:d,scale:ze,allowOverflow:!1,capInset:X*ze,capLines:ce?ie:0});if(se(1).placed>=he.length)return 1;if(se(Ya).placed<he.length)return Ya;let Te=Ya,Xe=1;for(let ze=0;ze<_S;ze+=1){const Re=(Te+Xe)/2;se(Re).placed>=he.length?Te=Re:Xe=Re}return Te},[E,he,m.width,m.height,oe,l,d,u,X,ce,ie]);s.useEffect(()=>{b(j)},[j,b]);const B=u?Math.min(p,j):1,J=s.useMemo(()=>!E||!he.length||m.width<=0||m.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Zc({tokens:he,widths:E.widths,spaceWidth:E.spaceWidth,lineHeight:E.lineHeight,width:m.width,height:m.height,rings:oe,mode:l,align:d,scale:B,allowOverflow:c,capInset:X*B,capLines:ce?ie:0}),[E,he,m.width,m.height,oe,l,d,B,c,X,ce,ie]),te=E?E.lineHeight*B:0,$e=d==="justify"?"left":d,ye=!!(C&&Q&&m.width>0&&m.height>0),F=!!V,ve=(ye||F)&&m.width>0&&m.height>0,pe=HS(R,ve),Z=ve&&pe?OS():null,me=s.useRef(!1),De=s.useCallback(se=>{me.current=se},[]);s.useEffect(()=>{if(!ye&&!F)return;const se=Te=>{const Xe=R;if(!Xe)return;const ze=Xe.getBoundingClientRect();Te.clientX>=ze.left&&Te.clientX<=ze.right&&Te.clientY>=ze.top&&Te.clientY<=ze.bottom&&(Te.preventDefault(),Te.stopPropagation(),K(Pe=>Pe==="shape"&&me.current?Pe:Pe==="shape"&&F?"image":ye?"shape":"image"))};return document.addEventListener("dblclick",se,!0),()=>document.removeEventListener("dblclick",se,!0)},[ye,F,R]);const ge=s.useMemo(()=>x&&m.width>0&&m.height>0?Ww(Ce,m):null,[x,Ce,m.width,m.height]),G=s.useRef(null),Me=(()=>{const se=G.current;return U||!V||!ae||!ge||!se||H===se.customPath||se.shape!==n&&n!=="custom"?null:bS(se.bounds,ge,ae,se.focalX,se.focalY,se.scale)})();Ir(()=>{if(N||!V||!ae||!ge)return;const se=G.current,Te=!!(se&&H!==se.customPath);Te&&Me&&V.onCommit(Me),Te&&U&&(O==null||O()),G.current={rings:Ce,bounds:ge,focalX:(Me==null?void 0:Me.focalX)??S,focalY:(Me==null?void 0:Me.focalY)??y,scale:(Me==null?void 0:Me.scale)??w,customPath:H,shape:n}},[N,U,H,n,Ce,ge,V,ae,S,y,w,Me,O]);const _e=G.current,rt=!!(N&&!U&&_e&&!Me),Je=rt&&_e?_e.focalX:(Me==null?void 0:Me.focalX)??S,at=rt&&_e?_e.focalY:(Me==null?void 0:Me.focalY)??y,it=rt&&_e?_e.scale:(Me==null?void 0:Me.scale)??w,je=rt&&_e?_e.bounds:ge,Se=s.useMemo(()=>{if(!(m.width>0)||!(m.height>0))return"";let se=Hc(i,Q,o,r,n,m);if(le){const Te=ee??m,Xe=r.width/Te.width,ze=r.height/Te.height;se=an(se,Re=>({x:Re.x*Xe,y:Re.y*ze}))}return Oc(se,m)||_c(oe,m)},[i,Q,o,r,n,m.width,m.height,le,ee,oe]),We=s.useMemo(()=>{if(!x||!(m.width>0)||!(m.height>0))return"";let se=Hc(H,Q,o,r,n,m);if(le){const Te=ee??m,Xe=r.width/Te.width,ze=r.height/Te.height;se=an(se,Re=>({x:Re.x*Xe,y:Re.y*ze}))}return Oc(se,m)||_c(Ce,m)},[x,H,Q,o,r,n,m.width,m.height,le,ee,Ce]),Be=`${$}-clip`,Ze=s.useMemo(()=>{if(!je)return null;const se=ae??{width:je.width,height:je.height},Te=Si(je,se,it);return{x:En(je.width,Te.width,Je),y:En(je.height,Te.height,at),width:Te.width,height:Te.height}},[je,ae,Je,at,it]);return a.jsxs("div",{className:`${e}-column`,ref:k,children:[Se?a.jsxs("svg",{className:`${e}-shape-fill`,viewBox:`0 0 ${m.width} ${m.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Se,fillRule:"evenodd"}),x&&We&&je&&Ze?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Be,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:We,fillRule:"evenodd"})})}),a.jsx("image",{href:x,x:je.x+Ze.x,y:je.y+Ze.y,width:Ze.width,height:Ze.height,preserveAspectRatio:"none",clipPath:`url(#${Be})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${c?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:B},children:[a.jsx("div",{className:`${e}-measure`,ref:T,style:f,"aria-hidden":!0}),J.segments.map((se,Te)=>{const Xe=he.slice(se.from,se.to),ze=Te===0;return a.jsx("div",{className:`${e}-line${se.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${se.top}px`,left:`${se.left}px`,width:`${se.width}px`,textAlign:se.justify?void 0:$e},children:Xe.map((Re,Pe)=>{const Ke=ce&&ze&&se.from===0&&Pe===0?Re.text.slice(1):Re.text,Oe=Kc(Re.leaf),Qe=Re.href?a.jsx("a",{className:`${e}-link`,href:Re.href,target:Re.target,rel:Re.target?"noopener noreferrer":void 0,style:Oe,children:Ke}):a.jsx("span",{style:Oe,children:Ke});return a.jsxs("span",{children:[!se.justify&&Pe>0?" ":null,Qe]},Pe)})},`${se.from}-${se.to}-${Te}`)}),h&&!Q&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:oe.map((se,Te)=>a.jsx("polygon",{points:se.map(Xe=>`${Xe.x},${Xe.y}`).join(" ")},Te))})]}),ce&&E&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${J.capTop}px`,left:`${J.capLeft}px`,fontSize:`${te*g}px`,lineHeight:`${te*g}px`},children:ce}),Z&&pe&&(Q&&C||V)&&Vn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:pe.top,left:pe.left,width:pe.width,height:pe.height,zIndex:FS,pointerEvents:"none"},children:[Q&&C&&a.jsx(RS,{P:e,box:{width:pe.width,height:pe.height},viewBox:r,contours:Q,snap:C.snap,stretchToBox:!le,uniformStretch:n==="circle",stage:W,onStageChange:K,onSelectionChange:De,onChange:C.onChange,onCommit:C.onCommit}),V&&je&&a.jsx(wS,{P:e,box:{width:pe.width,height:pe.height},bounds:je,natural:ae,imageUrl:x,maskPath:We,stage:W,onStageChange:K,focalX:Je,focalY:at,scale:it,onChange:V.onChange,onCommit:V.onCommit})]}),Z),a.jsx("div",{className:`${e}-a11y`,children:q.map((se,Te)=>a.jsx("p",{children:se},Te))})]})}const Wu=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],jS={x:0,y:0,width:100,height:100},zS=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?jS:{x:t[0],y:t[1],width:t[2],height:t[3]}},BS=e=>`
23708
+ `,Aw=["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"],Fw={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:Aw.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"]}]}]},_w={element:Pw,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:Fw,sourceCode:kw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Fc=120,_c=3,Ww=.12,rl={x:0,y:0,width:100,height:100};function Zi(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function qr(e){return e<0?0:e>1?1:e}function Wc(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 Nw(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,w=u.y*t.height;p<n&&(n=p),p>o&&(o=p),w<i&&(i=w),w>r&&(r=w)}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 Hw(e){return e.map(([t,n])=>({x:t,y:n}))}function qa(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 Ow(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=qr(n[o]),l=qr(n[o+1]);l>r&&i.push({x0:r,x1:l})}return Dw(i)}function Dw(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 jw(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 zw(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 Bw(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 Vw(e,t,n,i){let o=null;for(let r=0;r<_c;r+=1){const l=qr(t+(n-t)*r/Math.max(1,_c-1)),d=Ow(e,l),c=i==="avoid"?zw(d):d;if(o=o===null?c:jw(o,c),o.length===0)return[]}return o??[]}function Nc(e,t="stretch",n=rl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ai(i),d=Go(l);if(d.length)return t==="viewbox"?Zi(d,n):qa(d);if(typeof document>"u")return null;const c=i.split(/(?=[Mm])/).map(w=>w.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const w of c){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",w),u.appendChild(x);let f=0;try{f=x.getTotalLength()}catch{f=0}if(!f)continue;const h=[];for(let y=0;y<Fc;y+=1){const b=x.getPointAtLength(y/Fc*f);h.push({x:b.x,y:b.y})}p.push(h)}return p.length?t==="viewbox"?Zi(p,n):qa(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"?Zi([r],n):qa([r])}const al={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"},ms="0 0 100 100",Xr=100,gs=16,Gw=12,qw=16,Xa=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,Xw=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Hc=Math.PI/4,Uw=8,Yw=Math.PI/18,Kw=8,Vi=24,Gi=[];function Zw(){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 Ua(e,t){return on(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function Jw(e){const t=ti(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:on(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function Qw(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 on(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Oc(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Ua(t,i);else{const d=e.trim();if(d&&/^[Mm]/.test(d)){const c=ai(d);c.length&&(l=n==="viewbox"?Ua(c,i):Jw(c))}if(!l.length){const c=o!=="custom"?al[o]:void 0;c?l=Ua(ai(c),rl):l=Zw()}}return o==="circle"?Qw(l,r):l}function Dc(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":po(on(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function hs(e){const t=e==="rectangle"||e==="custom"?void 0:al[e];return t?Zi(Go(ai(t)),rl):[Hw([[0,0],[1,0],[1,1],[0,1]])]}function eS(e){const t=e.match(Xw);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function hn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function fs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function an(e){return{x:e.x,y:e.y}}function tS(e){return{p:an(e.p),in:e.in?an(e.in):null,out:e.out?an(e.out):null}}function Pn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(tS)}))}function on(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 jc(e,t,n,i=n){return on(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function nS(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:an(e),c2:an(l),p:an(l)}];const u=i*Math.PI/180,p=Math.cos(u),w=Math.sin(u),x=(e.x-l.x)/2,f=(e.y-l.y)/2,h=p*x+w*f,y=-w*x+p*f,b=h*h/(d*d)+y*y/(c*c);if(b>1){const ee=Math.sqrt(b);d*=ee,c*=ee}const C=o===r?-1:1,v=d*d*y*y+c*c*h*h,S=Math.max(0,d*d*c*c-v),H=v===0?0:C*Math.sqrt(S/v),N=H*d*y/c,U=-H*c*h/d,O=p*N-w*U+(e.x+l.x)/2,R=w*N+p*U+(e.y+l.y)/2,B=Math.atan2((y-U)/c,(h-N)/d);let M=Math.atan2((-y-U)/c,(-h-N)/d)-B;!r&&M>0&&(M-=Math.PI*2),r&&M<0&&(M+=Math.PI*2);const _=Math.max(1,Math.ceil(Math.abs(M)/(Math.PI/2))),A=M/_,m=4/3*Math.tan(A/4),P=(ee,T)=>({x:O+p*d*ee-w*c*T,y:R+w*d*ee+p*c*T}),I=[];let V=B;for(let ee=0;ee<_;ee+=1){const T=V+A,j=Math.cos(V),K=Math.sin(V),ce=Math.cos(T),se=Math.sin(T);I.push({c1:P(j-m*K,K+m*j),c2:P(ce+m*se,se-m*ce),p:ee===_-1?an(l):P(ce,se)}),V=T}return I}function ai(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 f=i[0],h=i[i.length-1];Math.abs(f.p.x-h.p.x)<1e-6&&Math.abs(f.p.y-h.p.y)<1e-6&&(f.in=h.in??f.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(f,h)=>{i.push({p:f,in:Fn(h??null,f),out:null}),r=f},w=f=>{if(!i.length)return;const h=i[i.length-1];h.out=Fn(f,h.p)};Xa.lastIndex=0;let x=Xa.exec(t);for(;x!==null;){const f=x[1],h=f.toUpperCase(),y=f!==h,b=eS(x[2]),C=v=>y?{x:r.x+b[v],y:r.y+b[v+1]}:{x:b[v],y:b[v+1]};if(h==="Z")o=!0,u(),r=an(l),d=null,c=null;else if(h==="M"){for(let v=0;v+1<b.length;v+=2){const S=C(v);v===0&&(u(),l=an(S)),p(S)}d=null,c=null}else if(h==="L"){for(let v=0;v+1<b.length;v+=2)p(C(v));d=null,c=null}else if(h==="H"){for(const v of b)p({x:y?r.x+v:v,y:r.y});d=null,c=null}else if(h==="V"){for(const v of b)p({x:r.x,y:y?r.y+v:v});d=null,c=null}else if(h==="C"){for(let v=0;v+5<b.length;v+=6){const S=C(v),H=C(v+2),N=C(v+4);w(S),p(N,H),d=H}c=null}else if(h==="S"){for(let v=0;v+3<b.length;v+=4){const S=d?fs(d,r):an(r),H=C(v),N=C(v+2);w(S),p(N,H),d=H}c=null}else if(h==="Q")for(let v=0;v+3<b.length;v+=4){const S=C(v),H=C(v+2);w(hn(r,S,2/3)),p(H,hn(H,S,2/3)),c=S,d=null}else if(h==="T")for(let v=0;v+1<b.length;v+=2){const S=c?fs(c,r):an(r),H=C(v);w(hn(r,S,2/3)),p(H,hn(H,S,2/3)),c=S,d=null}else if(h==="A")for(let v=0;v+6<b.length;v+=7){const S=y?{x:r.x+b[v+5],y:r.y+b[v+6]}:{x:b[v+5],y:b[v+6]};for(const H of nS(r,b[v],b[v+1],b[v+2],b[v+3]!==0,b[v+4]!==0,S))w(H.c1),p(H.p,H.c2);d=null,c=null}x=Xa.exec(t)}return u(),n}function En(e){return`${Number(e.toFixed(2))}`}function Fn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Iu(e){return!!(Fn(e.in,e.p)||Fn(e.out,e.p))}function xo(e,t){return!Fn(e.out,e.p)&&!Fn(t.in,t.p)}function zc(e,t){if(xo(e,t))return`L${En(t.p.x)},${En(t.p.y)}`;const n=Fn(e.out,e.p)??e.p,i=Fn(t.in,t.p)??t.p;return`C${En(n.x)},${En(n.y)} ${En(i.x)},${En(i.y)} ${En(t.p.x)},${En(t.p.y)}`}function po(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${En(i.p.x)},${En(i.p.y)}`);let r=i;for(const l of o)t.push(zc(r,l)),r=l;if(n.closed){const l=zc(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Eu(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 ys(e,t,n){if(xo(e,t))return hn(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 Go(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Eu(n)){if(xo(o.from,o.to)){i.push(an(o.from.p));continue}for(let r=0;r<gs;r+=1)i.push(ys(o.from,o.to,r/gs))}n.closed||i.push(an(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function ti(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of Go(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 iS(e){const t=ti(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 Mu(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 Pu(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Gw)return{closed:!0,nodes:t.map(r=>({p:an(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/qw)),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:an(r),...Mu(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function ku(e,t,n=1){if(!e.length)return!1;const i=ti(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 oS(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:on(e,u=>{const p=i+(u.x-t.x)*r,w=o+(u.y-t.y)*l;return{x:t.x+p/d,y:t.y+w/c}})}function rS(e,t){if(!e.length)return e;const n=ti(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 on(e,u=>({x:d+(u.x-n.minX)*l,y:c+(u.y-n.minY)*l}))}function Au(e){const t={x:0,y:0,width:Xr,height:Xr},n=e!=="custom"?al[e]:void 0,i=n?on(ai(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):on(Pu(hs("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=rS(i,t);return{shape:e,customPath:po(o),pathFit:"viewbox",pathViewBox:ms}}function Sr(e,t){return t>0?Math.round(e/t)*t:e}function aS(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,d=Pn(e),c=d[t].nodes[n];return c.p={x:o.p.x+r,y:o.p.y+l},c.in&&(c.in={x:c.in.x+r,y:c.in.y+l}),c.out&&(c.out={x:c.out.x+r,y:c.out.y+l}),d}function Bc(e,t,n,i){var r;if(!t.length)return e;const o=Pn(e);for(const{contour:l,node:d}of t){const c=(r=o[l])==null?void 0:r.nodes[d];c&&(c.p={x:c.p.x+n,y:c.p.y+i},c.in&&(c.in={x:c.in.x+n,y:c.in.y+i}),c.out&&(c.out={x:c.out.x+n,y:c.out.y+i}))}return o}function sS(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=Fu(i,r,d)}),i}function lS(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const d=Pn(e),c=d[t].nodes[n];if(c[i]=an(o),r){const p=i==="in"?"out":"in";c[p]=fs(o,c.p)}return d}function cS(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Pn(e);return r[t].nodes[n][i]=null,r}function dS(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const d=Pn(e),c=d[t].nodes,u=n+1;if(xo(r,l))return c.splice(u,0,{p:hn(r.p,l.p,i),in:null,out:null}),{contours:d,nodeIndex:u};const p=r.out??r.p,w=l.in??l.p,x=hn(r.p,p,i),f=hn(p,w,i),h=hn(w,l.p,i),y=hn(x,f,i),b=hn(f,h,i),C=hn(y,b,i),v=(n+1)%o.nodes.length;return c[n].out=x,c[v].in=h,c.splice(u,0,{p:C,in:y,out:b}),{contours:d,nodeIndex:u}}function Fu(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Pn(e);return o[t].nodes.splice(n,1),o}function Vc(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Pn(e),l=r[t].nodes,d=l[n],c=l.length,u=(n-1+c)%c,p=(n+1)%c,w=!!Fn(l[u].out,l[u].p),x=!!Fn(l[p].in,l[p].p);if(Iu(d)||w||x)return d.in=null,d.out=null,l[u].out=null,l[p].in=null,r;const f=Mu(l[u].p,d.p,l[p].p);return d.in=f.in,d.out=f.out,r}function uS(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 Gc(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Eu(i)){const l=xo(r.from,r.to)?1:gs;for(let d=0;d<l;d+=1){const c=d/l,u=(d+1)/l,p=uS(t,ys(r.from,r.to,c),ys(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 pS(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 qc(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 Xc(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 mS(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 gS(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function vs(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 hS(e,t){const n=vs(e,t);return n?{kind:"align",a:{x:e.x-n.x*Vi,y:e.y-n.y*Vi},b:{x:t.x+n.x*Vi,y:t.y+n.y*Vi}}:{kind:"align",a:e,b:t}}function xs(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 Uc(e,t,n,i,o){if(e.axis===null)return hS(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return xs(o(r)[t],t,i)}function fS(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Uc(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Uc(n,"y",l,i,o)),r}function yS(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 vs(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 vs(i(p),r)}function vS(e,t,n,i,o,r,l){const d=r(t),c=r(e),u=c.x-d.x,p=c.y-d.y,w=Math.hypot(u,p);if(w<1e-6)return{point:e,guides:Gi};const x=Math.atan2(p,u),f=Math.round(x/Hc)*Hc;let h=o?f:null,y=!1;if(!o){const U=[];n&&U.push({angle:Math.atan2(n.y,n.x),smooth:!0}),U.push({angle:f,smooth:!1});for(const O of U){const R=gS(O.angle-x);if(!(Math.abs(R)>Yw)&&!(Math.abs(Math.sin(R))*w>Uw)){h=O.angle,y=O.smooth;break}}}const b=i!==null&&i>0&&Math.abs(w-i)<=Kw;if(h===null&&!b)return{point:e,guides:Gi};const C=h??x,v=b?i:w,S={x:Math.cos(C),y:Math.sin(C)},H=v+(h===null?0:Vi),N=b?v:y?Vi:0;return{point:l({x:d.x+S.x*v,y:d.y+S.y*v}),guides:[{kind:"angle",a:{x:d.x-S.x*N,y:d.y-S.y*N},b:{x:d.x+S.x*H,y:d.y+S.y*H}}]}}const bs=.1,ws=8,xS=4,Yc=10,Ur=(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}}},_u=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},Ss=(e,t)=>{const n=Ur(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Yc,y:n.y+o*Yc}},$s=(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),$i=(e,t,n)=>{const i=$s(e,t)*n;return{width:t.width*i,height:t.height*i}},Mn=(e,t,n)=>(e-t)*n,qi=(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)<xS?.5:qr(r)},bS=(e,t,n,i,o,r)=>{const l=$i(e,n,r),d=e.x+Mn(e.width,l.width,i),c=e.y+Mn(e.height,l.height,o),u=$s(e,n),p=$s(t,n),w=Math.min(ws,Math.max(bs,p>0?r*(u/p):r)),x=$i(t,n,w);return{focalX:qi(t.width,x.width,d-t.x,{clamp:!1}),focalY:qi(t.height,x.height,c-t.y,{clamp:!1}),scale:w}},Kc=1.08,$r=14,Cr=8;function wS({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:d,focalX:c,focalY:u,scale:p,onChange:w,onCommit:x}){const f=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 v=l==="image";s.useEffect(()=>{var A;v&&((A=f.current)==null||A.focus({preventScroll:!0}))},[v]);const S=s.useCallback((A,m)=>{var I;const P=(I=f.current)==null?void 0:I.getBoundingClientRect();return!P||P.width<=0||P.height<=0?{x:0,y:0}:{x:(A-P.left)/P.width*t.width,y:(m-P.top)/P.height*t.height}},[t.width,t.height]),H=A=>{var P,I;if(!i)return;A.stopPropagation(),A.preventDefault(),(P=f.current)==null||P.focus({preventScroll:!0});const m=$i(n,i,p);y.current={pointerId:A.pointerId,origin:S(A.clientX,A.clientY),startX:Mn(n.width,m.width,c),startY:Mn(n.height,m.height,u),width:m.width,height:m.height,moved:!1},(I=f.current)==null||I.setPointerCapture(A.pointerId)},N=(A,m)=>{var ce,se;if(!i)return;A.stopPropagation(),A.preventDefault(),(ce=f.current)==null||ce.focus({preventScroll:!0});const P=$i(n,i,p),I=Mn(n.width,P.width,c),V=Mn(n.height,P.height,u),ee={minX:I,minY:V,maxX:I+P.width,maxY:V+P.height},T=Ur(ee,_u(m)),j=Ur(ee,m),K=Math.hypot(j.x-T.x,j.y-T.y);!isFinite(K)||K<=0||(b.current={pointerId:A.pointerId,anchor:T,startDistance:K,startScale:p,startX:I,startY:V,moved:!1},(se=f.current)==null||se.setPointerCapture(A.pointerId))},U=A=>{if(!i)return;const m=b.current;if(m&&A.pointerId===m.pointerId){A.stopPropagation(),A.preventDefault();const I=S(A.clientX,A.clientY),V={x:I.x-n.x,y:I.y-n.y},ee=Math.hypot(V.x-m.anchor.x,V.y-m.anchor.y),T=Math.min(ws,Math.max(bs,m.startScale*(ee/m.startDistance)));if(!m.moved&&Math.abs(T-m.startScale)<1e-4)return;m.moved=!0;const j=T/m.startScale,K=m.anchor.x+(m.startX-m.anchor.x)*j,ce=m.anchor.y+(m.startY-m.anchor.y)*j,se=$i(n,i,T);w({focalX:qi(n.width,se.width,K),focalY:qi(n.height,se.height,ce),scale:T});return}const P=y.current;if(P&&A.pointerId===P.pointerId){A.stopPropagation(),A.preventDefault();const I=S(A.clientX,A.clientY),V=I.x-P.origin.x,ee=I.y-P.origin.y;if(!P.moved&&V===0&&ee===0)return;P.moved=!0,w({focalX:qi(n.width,P.width,P.startX+V),focalY:qi(n.height,P.height,P.startY+ee),scale:p})}},O=A=>{var I,V;const m=y.current;if(m&&A.pointerId===m.pointerId){y.current=null,A.stopPropagation(),(I=f.current)!=null&&I.hasPointerCapture(m.pointerId)&&f.current.releasePointerCapture(m.pointerId),m.moved&&x(C.current);return}const P=b.current;P&&A.pointerId===P.pointerId&&(b.current=null,A.stopPropagation(),(V=f.current)!=null&&V.hasPointerCapture(P.pointerId)&&f.current.releasePointerCapture(P.pointerId),P.moved&&x(C.current))},R=A=>{if(A.key==="Escape"){A.stopPropagation(),d("none");return}if(A.key==="="||A.key==="+"||A.key==="-"||A.key==="_"){A.preventDefault(),A.stopPropagation();const m=A.key==="="||A.key==="+",P=Math.min(ws,Math.max(bs,p*(m?Kc:1/Kc))),I={focalX:c,focalY:u,scale:P};w(I),x(I)}},B=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},M=s.useMemo(()=>{const A=i??{width:n.width,height:n.height},m=$i(n,A,p);return!(m.width>0)||!(m.height>0)?null:{x:n.x+Mn(n.width,m.width,c),y:n.y+Mn(n.height,m.height,u),width:m.width,height:m.height}},[i,n.x,n.y,n.width,n.height,c,u,p]),_=M?{minX:M.x,minY:M.y,maxX:M.x+M.width,maxY:M.y+M.height}:$;return a.jsxs("svg",{ref:f,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:R,onPointerMove:U,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>d("none")}),v&&o&&M&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:M.x,y:M.y,width:M.width,height:M.height,children:[a.jsx("rect",{x:M.x,y:M.y,width:M.width,height:M.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:M.x,y:M.y,width:M.width,height:M.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:M.x,y:M.y,width:M.width,height:M.height})]}),v&&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:H}),B.map(A=>{const m=Ss(_,A),P=A==="ne"||A==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:m.x-Cr/2,y:m.y-Cr/2,width:Cr,height:Cr}),a.jsx("rect",{className:`${e}-editor-scale-grab${P?` ${e}-editor-scale-grab-nesw`:""}`,x:m.x-$r/2,y:m.y-$r/2,width:$r,height:$r,onPointerDown:I=>N(I,A)})]},A)})]})]})}const Cs=10,SS=Cs*2,In=7,$S=4,Hi=9,CS=3.5,Zc=1.08,TS=.05,Tr=14,LS=1,Lr=14,Rr=8;function RS({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:d,onStageChange:c,onSelectionChange:u,onChange:p,onCommit:w}){const x=s.useRef(null),f=s.useRef(null),h=s.useRef(i);h.current=i;const y=s.useRef(null),b=s.useRef(null),C=s.useRef(null),v=s.useRef(null),[S,H]=s.useState([]),[N,U]=s.useState(Gi),[O,R]=s.useState(null),B=s.useCallback(g=>{U(G=>mS(G,g)?G:g)},[]),$=d==="shape";s.useEffect(()=>{var g;$&&((g=x.current)==null||g.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||H(g=>g.length?[]:g)},[$]);const M=S.length>0;s.useEffect(()=>{u==null||u(M)},[M,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const _=n.width>0?t.width/n.width:1,A=n.height>0?t.height/n.height:1,m=Math.min(_,A),P=r&&l?m:_,I=r&&l?m:A,V=r&&l?(t.width-n.width*m)/2:0,ee=r&&l?(t.height-n.height*m)/2:0,T=s.useCallback(g=>r?{x:V+(g.x-n.x)*P,y:ee+(g.y-n.y)*I}:{x:g.x-n.x,y:g.y-n.y},[r,n,P,I,V,ee]),j=s.useCallback(g=>r?{x:n.x+(P>0?(g.x-V)/P:0),y:n.y+(I>0?(g.y-ee)/I:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,P,I,V,ee]),K=s.useMemo(()=>j({x:t.width/2,y:t.height/2}),[j,t.width,t.height]),ce=s.useCallback((g,G)=>{var X;const F=(X=x.current)==null?void 0:X.getBoundingClientRect();if(!F||F.width<=0||F.height<=0)return{x:0,y:0};if(r){const me=(g-F.left)/F.width*t.width,Y=(G-F.top)/F.height*t.height;return{x:n.x+(P>0?(me-V)/P:0),y:n.y+(I>0?(Y-ee)/I:0)}}return{x:n.x+(g-F.left),y:n.y+(G-F.top)}},[r,n,t.width,t.height,P,I,V,ee]),se=s.useCallback((g,G)=>{var X;const F=(X=x.current)==null?void 0:X.getBoundingClientRect();return!F||F.width<=0||F.height<=0?{x:0,y:0}:{x:(g-F.left)/F.width*t.width,y:(G-F.top)/F.height*t.height}},[t.width,t.height]),k=s.useCallback((g,G)=>{const F=l&&!(G!=null&&G.preserveShape)?oS(g,n,t,V,ee,P,I):g;w(F,G)},[w,l,n,t,V,ee,P,I]),ae=s.useCallback(()=>{R(null)},[]),q=s.useCallback((g,G,F)=>{if(!F||y.current||b.current||C.current||v.current){ae();return}const X=se(g,G),me=on(h.current,T);for(const te of me)for(const Ae of te.nodes)if(Math.hypot(Ae.p.x-X.x,Ae.p.y-X.y)<=Hi){ae();return}const Y=Gc(me,X);if(!Y||Y.distance>Cs){ae();return}const L=me[Y.contour],ie=L==null?void 0:L.nodes[Y.segment],oe=L==null?void 0:L.nodes[(Y.segment+1)%((L==null?void 0:L.nodes.length)??1)],D=!!(ie&&oe&&!xo(ie,oe));R(te=>te&&te.curved===D&&Math.hypot(te.point.x-Y.point.x,te.point.y-Y.point.y)<.25?te:{point:Y.point,curved:D})},[se,T,ae]),le=g=>{var Fe;const G=g.metaKey||g.ctrlKey,F=C.current;if(F&&g.pointerId===F.pointerId){if(g.stopPropagation(),g.preventDefault(),F.startDistance<=0)return;const Qe=ce(g.clientX,g.clientY),Xe=Math.hypot(Qe.x-F.origin.x,Qe.y-F.origin.y),nt=Math.max(TS,Xe/F.startDistance);if(!F.moved&&Math.abs(nt-1)<1e-4)return;F.moved=!0,p(jc(F.startContours,F.origin,nt));return}const X=b.current;if(X&&g.pointerId===X.pointerId){g.stopPropagation(),g.preventDefault();const Qe=ce(g.clientX,g.clientY),{bbox:Xe}=X,nt=Xe.maxX-Xe.minX,et=Xe.maxY-Xe.minY,Be=Qe.x-X.origin.x,fe=Qe.y-X.origin.y;let He=Be,ze=fe;if(isFinite(nt)&&isFinite(et))if(r){let Ce=n.x,De=n.x+n.width,qe=n.y,ge=n.y+n.height;l&&(P>0&&(Ce=n.x+(0-V)/P,De=n.x+(t.width-V)/P),I>0&&(qe=n.y+(0-ee)/I,ge=n.y+(t.height-ee)/I));const Pe=Math.min(Ce,De-nt),je=Math.max(Ce,De-nt),Ie=Math.min(qe,ge-et),be=Math.max(qe,ge-et),Le=Math.min(je,Math.max(Pe,Xe.minX+Be)),Ye=Math.min(be,Math.max(Ie,Xe.minY+fe));He=Le-Xe.minX,ze=Ye-Xe.minY}else{const Ce=Xe.minX-n.x,De=Xe.minY-n.y,qe=Math.min(0,t.width-nt),ge=Math.max(0,t.width-nt),Pe=Math.min(0,t.height-et),je=Math.max(0,t.height-et),Ie=Math.min(ge,Math.max(qe,Ce+Be)),be=Math.min(je,Math.max(Pe,De+fe));He=Ie-Ce,ze=be-De}const Je=[];if(!G&&isFinite(nt)&&isFinite(et)){const Ce=T({x:Xe.minX+nt/2+He,y:Xe.minY+et/2+ze}),De={x:t.width/2,y:t.height/2};Math.abs(Ce.x-De.x)<=Tr&&(He=K.x-Xe.minX-nt/2,Je.push(xs(De.x,"x",t))),Math.abs(Ce.y-De.y)<=Tr&&(ze=K.y-Xe.minY-et/2,Je.push(xs(De.y,"y",t)))}if(!X.moved&&He===0&&ze===0)return;X.moved=!0,B(Je.length?Je:Gi),p(on(X.startContours,Ce=>({x:Ce.x+He,y:Ce.y+ze})),{carryImage:!0});return}const me=v.current;if(me&&g.pointerId===me.pointerId){g.stopPropagation(),g.preventDefault();const Qe=ce(g.clientX,g.clientY);let Xe=Qe.x-me.origin.x,nt=Qe.y-me.origin.y;if(g.shiftKey&&(Math.abs(Xe)>Math.abs(nt)?nt=0:Xe=0),!me.moved&&Xe===0&&nt===0)return;me.moved=!0,p(Bc(me.startContours,me.selection,Xe,nt));return}const Y=y.current;if(!Y||g.pointerId!==Y.pointerId){q(g.clientX,g.clientY,S.length>0||$);return}ae(),g.stopPropagation(),g.preventDefault();const L=ce(g.clientX,g.clientY);if(Y.kind==="anchor"){const Qe={x:Y.anchor.x+(L.x-Y.origin.x),y:Y.anchor.y+(L.y-Y.origin.y)},Xe=G?[]:pS(h.current,{contour:Y.contour,node:Y.node}),nt=G||!Y.center?[]:[Y.center],et=Xc(qc(Xe,nt.map(He=>He.x),"x"),Qe,"x",T,Tr),Be=Xc(qc(Xe,nt.map(He=>He.y),"y"),Qe,"y",T,Tr),fe=G?Qe:{x:(et==null?void 0:et.value)??Sr(Qe.x,o),y:(Be==null?void 0:Be.value)??Sr(Qe.y,o)};if(g.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,B(fS(fe,et,Be,t,T)),p(aS(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&&!g.altKey,D=oe||G?null:Y.kind==="in"?ie==null?void 0:ie.out:ie==null?void 0:ie.in,te=ie?T(ie.p):null,Ae=D?T(D):null,he=ie&&(!G||g.shiftKey)?vS(L,ie.p,oe||G?null:yS(h.current[Y.contour],Y.node,Y.kind,T),te&&Ae?Math.hypot(Ae.x-te.x,Ae.y-te.y):null,g.shiftKey,T,j):{point:L,guides:Gi},J=he.guides.length?he.point:G?L:{x:Sr(L.x,o),y:Sr(L.y,o)},Ze=Y.kind==="in"?ie==null?void 0:ie.in:ie==null?void 0:ie.out;!Y.moved&&Ze&&J.x===Ze.x&&J.y===Ze.y||(Y.moved=!0,B(he.guides),p(lS(h.current,Y.contour,Y.node,Y.kind,J,oe)))},Z=g=>{B(Gi);const G=C.current;if(G&&g.pointerId===G.pointerId){C.current=null,g.stopPropagation();const D=x.current;D!=null&&D.hasPointerCapture(G.pointerId)&&D.releasePointerCapture(G.pointerId),G.moved&&k(h.current,{preserveShape:!0});return}const F=b.current;if(F&&g.pointerId===F.pointerId){b.current=null,g.stopPropagation();const D=x.current;D!=null&&D.hasPointerCapture(F.pointerId)&&D.releasePointerCapture(F.pointerId),F.moved?k(h.current,{preserveShape:!0}):H([]);return}const X=v.current;if(X&&g.pointerId===X.pointerId){v.current=null,g.stopPropagation();const D=x.current;D!=null&&D.hasPointerCapture(X.pointerId)&&D.releasePointerCapture(X.pointerId),X.moved&&k(h.current);return}const me=y.current;if(!me||g.pointerId!==me.pointerId)return;y.current=null,g.stopPropagation();const Y=x.current;Y!=null&&Y.hasPointerCapture(me.pointerId)&&Y.releasePointerCapture(me.pointerId);const L=Math.hypot(g.clientX-me.clientOrigin.x,g.clientY-me.clientOrigin.y);if(me.moved||L>$S){me.moved&&k(h.current);return}if(!me.toggleOnRelease||g.type!=="pointerup")return;const oe=Vc(h.current,me.contour,me.node);oe!==h.current&&(p(oe),k(oe))},xe=g=>{g.stopPropagation()},Ne=g=>{var G,F;g.stopPropagation(),g.preventDefault(),ae(),(G=x.current)==null||G.focus({preventScroll:!0}),b.current={pointerId:g.pointerId,origin:ce(g.clientX,g.clientY),startContours:Pn(i),bbox:ti(i),moved:!1},(F=x.current)==null||F.setPointerCapture(g.pointerId)},ye=(g,G)=>{var L,ie;g.stopPropagation(),g.preventDefault(),ae(),(L=x.current)==null||L.focus({preventScroll:!0}),H([]),c("shape");const F=ti(i),X=Ur(F,_u(G)),me=Ss(F,G),Y=Math.hypot(me.x-X.x,me.y-X.y);!isFinite(Y)||Y<=0||(C.current={pointerId:g.pointerId,corner:G,origin:X,startDistance:Y,startContours:Pn(i),moved:!1},(ie=x.current)==null||ie.setPointerCapture(g.pointerId))},ue=(g,G,F,X)=>{var L,ie,oe,D;g.stopPropagation(),g.preventDefault(),ae(),(L=x.current)==null||L.focus({preventScroll:!0});const me=(ie=i[F])==null?void 0:ie.nodes[X];if(!me)return;if(g.altKey){const te=G==="anchor"?Fu(i,F,X):cS(i,F,X,G);if(te===i)return;H(G==="anchor"?[]:[{contour:F,node:X}]),p(te),k(te);return}const Y=g.metaKey||g.ctrlKey;if(G==="anchor"&&g.shiftKey&&!Y){H(te=>te.some(Ae=>Ae.contour===F&&Ae.node===X)?te.filter(Ae=>!(Ae.contour===F&&Ae.node===X)):[...te,{contour:F,node:X}]);return}if(G==="anchor"&&!Y&&S.length>1&&S.some(te=>te.contour===F&&te.node===X)){v.current={pointerId:g.pointerId,origin:ce(g.clientX,g.clientY),startContours:Pn(i),selection:S,moved:!1},(oe=x.current)==null||oe.setPointerCapture(g.pointerId);return}H([{contour:F,node:X}]),y.current={kind:G,contour:F,node:X,pointerId:g.pointerId,origin:ce(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:me.p,center:iS(i),mirror:G!=="anchor"&&!!(me.in&&me.out),toggleOnRelease:Y,moved:!1},(D=x.current)==null||D.setPointerCapture(g.pointerId)},Q=g=>{g.stopPropagation(),g.preventDefault(),ae();const G=on(i,T),F=Gc(G,se(g.clientX,g.clientY));if(!F||F.distance>Cs)return;const{contours:X,nodeIndex:me}=dS(i,F.contour,F.segment,F.t);me<0||(H([{contour:F.contour,node:me}]),p(X),k(X))},de=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const Y=ti(i);if(!isFinite(Y.minX)||!isFinite(Y.maxX))return;const L={x:(Y.minX+Y.maxX)/2,y:(Y.minY+Y.maxY)/2},oe=g.key==="="||g.key==="+"?Zc:1/Zc,D=jc(i,L,oe);p(D),k(D,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),H([]),c("none");return}if(!S.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const Y=sS(i,S);if(Y===i)return;H([]),p(Y),k(Y);return}const G=o>0?o:LS,F=g.shiftKey?G*10:G,X={ArrowLeft:[-F,0],ArrowRight:[F,0],ArrowUp:[0,-F],ArrowDown:[0,F]}[g.key];if(!X)return;g.preventDefault(),g.stopPropagation();const me=Bc(i,S,X[0],X[1]);p(me),k(me)},ne=s.useMemo(()=>po(on(i,T)),[i,T]),Ee=s.useMemo(()=>ti(i),[i]),Te=T({x:Ee.minX,y:Ee.minY}),Oe={width:T({x:Ee.maxX,y:Ee.minY}).x-Te.x,height:T({x:Ee.minX,y:Ee.maxY}).y-Te.y},ve=$&&S.length===0&&isFinite(Ee.minX)&&isFinite(Ee.maxX)&&Ee.maxX>Ee.minX&&Ee.maxY>Ee.minY,we=S.length>0||$,$e=we;return a.jsxs("svg",{ref:x,className:`${e}-editor${we?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:de,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:ae,onPointerUp:Z,onPointerCancel:Z,onLostPointerCapture:Z,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{H([]),c("none")},onClick:Q}),$e&&a.jsx("path",{className:`${e}-editor-outline`,d:ne}),$e&&N.map((g,G)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${G}`)),a.jsx("path",{ref:f,className:`${e}-editor-body`,d:ne,fillRule:"evenodd",onPointerDown:Ne,onClick:Q}),$e&&a.jsx("path",{className:`${e}-editor-hit`,d:ne,style:{strokeWidth:SS},onClick:Q}),$e&&O&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:O.point.x-In/2,y:O.point.y-In/2,width:In,height:In,rx:O.curved?In/2:0}),$e&&i.map((g,G)=>g.nodes.map((F,X)=>{const me=S.some(L=>L.contour===G&&L.node===X),Y=T(F.p);return a.jsxs("g",{children:[me&&S.length===1&&["in","out"].map(L=>{const ie=F[L];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:CS}),a.jsx("circle",{className:`${e}-editor-grab`,cx:oe.x,cy:oe.y,r:Hi,onPointerDown:D=>ue(D,L,G,X),onClick:xe})]},L)}),a.jsx("rect",{className:`${e}-editor-anchor${me?` ${e}-editor-anchor-selected`:""}`,x:Y.x-In/2,y:Y.y-In/2,width:In,height:In,rx:Iu(F)?In/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:Y.x-Hi,y:Y.y-Hi,width:Hi*2,height:Hi*2,onPointerDown:L=>ue(L,"anchor",G,X),onClick:xe,onDoubleClick:L=>{L.stopPropagation(),L.preventDefault();const ie=Vc(i,G,X);p(ie),k(ie)}})]},`${G}-${X}`)})),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(g=>{const G=T(Ss(Ee,g)),F=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:G.x-Rr/2,y:G.y-Rr/2,width:Rr,height:Rr}),a.jsx("rect",{className:`${e}-editor-scale-grab${F?` ${e}-editor-scale-grab-nesw`:""}`,x:G.x-Lr/2,y:G.y-Lr/2,width:Lr,height:Lr,onPointerDown:X=>ye(X,g),onClick:xe})]},g)})]})]})}const IS=4e3,ES=/^(?:https?:|mailto:|tel:)/i;function Wu(e){return!!e&&typeof e=="object"&&e.type==="link"}function MS(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!ES.test(t)))return t}function PS(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,d)=>{for(const c of r){if(Wu(c)){o(c.children??[],MS(c.value),c.target);continue}const u=c,p=(u==null?void 0:u.text)??"";if(p.trim())for(const w of p.split(/\s+/))w&&t.push({text:w,leaf:u,href:l,target:d,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Jc(e){return{...e.fontFamily&&{fontFamily:fo(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 kS(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Wu(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function Qc(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:d,height:c,allowOverflow:u,capInset:p,capLines:w}=e,x=e.lineHeight*l,f=e.spaceWidth*l,h=[];if(!t.length||d<=0||x<=0)return{segments:h,placed:0,height:0,capLeft:0,capTop:0};const y=Math.max(1,f*.5),b=x*Ww;let C=0,v=0,S=0,H=t[0].para,N=0,U=0,O=null;for(;C<t.length&&S<IS;){const R=v+x>c;if(R&&!u)break;const B=t[C].para;if(B>H+1){v+=x*(B-H-1),H=B-1,S+=1;continue}let $=R?[{x0:0,x1:d}]:Vw(i,(v+b)/c,(v+x-b)/c,o).map(_=>({x0:_.x0*d,x1:_.x1*d}));p>0&&w>0&&!R&&$.length&&(O===null&&(O=S,N=$[0].x0,U=v),S-O<w&&($=Bw($,{x0:N,x1:N+p})));const M=$.reduce((_,A)=>Math.max(_,A.x1-A.x0),0);for(const _ of $){const A=_.x1-_.x0;if(A<y)continue;if(C>=t.length||t[C].para!==B)break;const m=C;let P=0;for(;C<t.length&&t[C].para===B;){const I=n[C]*l,V=C===m?I:f+I;if(P+V>A&&!(C===m&&A>=M-.5&&I>d-.5))break;P+=V,C+=1}if(C>m){const I=C>=t.length||t[C].para!==B;h.push({top:v,left:_.x0,width:A,from:m,to:C,justify:r==="justify"&&!I})}if(C>=t.length||t[C].para!==B)break}H=B,v+=x,S+=1}return{segments:h,placed:C,height:h.length?v:0,capLeft:N,capTop:U}}const AS=.12,FS=2,_S=10,Ya=.25,WS=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},NS=(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,HS=(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=WS(e);(!r||!NS(r,d))&&(r=d,i(d)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ka=(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})))},Ir=typeof window>"u"?s.useEffect:s.useLayoutEffect;function OS(){return typeof document>"u"?null:document.body}function DS({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:d,allowOverflow:c,fitEnabled:u,scale:p,onFitScale:w,dropCapLines:x,dropCapSize:f,showGuides:h,typography:y,imageUrl:b,imageFocalX:C,imageFocalY:v,imageScale:S,imageCustomPath:H,pathDragActive:N,pathCarryImage:U,onCarryImageConsumed:O,pathEditor:R,imageEditor:B}){var De,qe;const $=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[M,_]=s.useState(null),A=s.useRef(null),[m,P]=s.useState({width:0,height:0}),[I,V]=s.useState(null),[ee,T]=s.useState(0),[j,K]=s.useState("none");s.useEffect(()=>{!R&&!B&&K("none")},[R,B]);const[ce,se]=s.useState(null);s.useEffect(()=>{if(!b||typeof Image>"u"){se(null);return}let ge=!1;const Pe=new Image;return Pe.onload=()=>{ge||se({width:Pe.naturalWidth,height:Pe.naturalHeight})},Pe.src=b,()=>{ge=!0}},[b]);const k=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),ae=s.useMemo(()=>PS(k),[k]),q=s.useMemo(()=>kS(k),[k]),le=x>0&&f>1?((qe=(De=ae[0])==null?void 0:De.text)==null?void 0:qe.charAt(0))??"":"",Z=(R==null?void 0:R.contours)??null,xe=s.useMemo(()=>{let ge=[];if(Z){const Pe=Go(Z);Pe.length&&(ge=Zi(Pe,r))}if(!ge.length){const Pe=i.trim(),je=Pe?Nc(Pe,o,r):null;je&&je.length?ge=je:ge=hs(n==="custom"?"rectangle":n)}return n==="circle"?Ka(ge,m):ge},[Z,n,i,o,r,m.width,m.height]),Ne=R==null?void 0:R.onConvert,ye=(R==null?void 0:R.needsConversion)??!1,ue=s.useMemo(()=>{if(n==="circle")return!1;const ge=Z??(i.trim()?ai(i):null);return!!(ge&&ku(ge,r))},[Z,i,r,n]),[Q,de]=s.useState(null);Ir(()=>{if(!ue){Q&&de(null);return}!Q&&m.width>0&&m.height>0&&de({width:m.width,height:m.height})},[ue,m.width,m.height,Q]);const ne=s.useMemo(()=>{if(!ue||m.width<=0||m.height<=0)return xe;const ge=Q??m,Pe=r.width/ge.width,je=r.height/ge.height;return xe.map(Ie=>Ie.map(be=>({x:be.x*Pe,y:be.y*je})))},[xe,ue,Q,r.width,r.height,m.width,m.height]),Ee=s.useMemo(()=>{if(Z){const Ie=Go(Z);if(Ie.length){const be=Zi(Ie,r);return n==="circle"?Ka(be,m):be}}const ge=H.trim(),Pe=ge?Nc(ge,o,r):null,je=Pe&&Pe.length?Pe:hs(n==="custom"?"rectangle":n);return n==="circle"?Ka(je,m):je},[Z,n,H,o,r,m.width,m.height]),Te=s.useMemo(()=>{if(!ue||m.width<=0||m.height<=0)return Ee;const ge=Q??m,Pe=r.width/ge.width,je=r.height/ge.height;return Ee.map(Ie=>Ie.map(be=>({x:be.x*Pe,y:be.y*je})))},[Ee,ue,Q,r.width,r.height,m.width,m.height]),Oe=s.useRef(null),ve=s.useRef(!1);s.useEffect(()=>{if(!(!Ne||m.width<=0||m.height<=0)){if(ue){if(Oe.current===i)return;const ge=Z??(i.trim()?ai(i):null);if(!(ge!=null&&ge.length))return;const Pe=on(ge,je=>({x:r.x+(je.x-r.x)/m.width*r.width,y:r.y+(je.y-r.y)/m.height*r.height}));Oe.current=po(Pe),Ne(Pe);return}!ye||!xe.length||ve.current||(ve.current=!0,Ne(on(Pu(xe),ge=>({x:ge.x*Xr,y:ge.y*Xr}))))}},[ye,ue,Ne,xe,Z,i,r,m.width,m.height]),Ir(()=>{const ge=M;if(!ge||typeof ResizeObserver>"u")return;const Pe=()=>{const Ie=ge.getBoundingClientRect();P(be=>Math.abs(be.width-Ie.width)<.5&&Math.abs(be.height-Ie.height)<.5?be:{width:Ie.width,height:Ie.height})};Pe();const je=new ResizeObserver(Pe);return je.observe(ge),()=>je.disconnect()},[M]),s.useEffect(()=>{const ge=typeof document<"u"?document.fonts:void 0;ge!=null&&ge.ready&&ge.ready.then(()=>{T(Pe=>Pe+1)})},[]),Ir(()=>{const ge=A.current;if(!ge)return;if(!ae.length){V(null);return}const Pe=[],je=document.createDocumentFragment();for(const tt of ae){const pt=document.createElement("span");Object.assign(pt.style,Jc(tt.leaf)),pt.textContent=tt.text,je.appendChild(pt),Pe.push(pt)}const Ie=document.createElement("span");Ie.textContent=" ",je.appendChild(Ie);const be=le||"H",Le=document.createElement("span");Le.textContent=be,Le.style.lineHeight="1",je.appendChild(Le),ge.replaceChildren(je);const Ye=window.getComputedStyle(ge),_e=parseFloat(Ye.fontSize)||16,it=parseFloat(Ye.lineHeight),ot=Number.isNaN(it)?_e*1.2:it,rt=Math.max(ot,_e),ht=document.createElement("span");ht.textContent=be,ht.style.lineHeight=`${rt}px`;const It=document.createElement("span");It.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ht.appendChild(It),ge.appendChild(ht);const Et=ht.getBoundingClientRect().top,dt=It.getBoundingClientRect().top,mt=Math.max(1,dt-Et);ht.remove();let $t=mt*.8;const ft=document.createElement("canvas").getContext("2d"),Ft=tt=>`${Ye.fontStyle} ${Ye.fontWeight} ${tt}px ${Ye.fontFamily}`;if(ft){ft.font=Ft(_e);const tt=ft.measureText(be).actualBoundingBoxAscent;tt>0&&($t=tt)}const Ht=f>1?(f-1)*rt+$t:$t;let Ot=_e*(Ht/$t);if(ft){ft.font=Ft(Ot);const tt=ft.measureText(be).actualBoundingBoxAscent;tt>0&&(Ot=Ot*(Ht/tt))}Le.style.fontSize=`${Ot}px`,Le.style.lineHeight=`${Ot}px`;const Kt=document.createElement("span");Kt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Le.appendChild(Kt);const Ct=Math.max(1,Kt.getBoundingClientRect().top-Le.getBoundingClientRect().top);Kt.remove();const tn=(f-1)*rt+mt-Ct,gt=Pe.map(tt=>tt.getBoundingClientRect().width),Me=Ie.getBoundingClientRect().width,Ve=le?Le.getBoundingClientRect().width:0;ge.replaceChildren(),V({widths:gt,spaceWidth:Me,lineHeight:rt,capWidth:Ve,dropCapFontSize:Ot,dropCapTopAdjust:tn})},[ae,y,le,x,f,ee,m.width]);const we=I&&le?I.capWidth+I.lineHeight*AS:0,$e=Math.max(x,Math.ceil(f)),g=s.useMemo(()=>{if(!I||!ae.length||m.width<=0||m.height<=0||!u)return 1;const ge=Ie=>Qc({tokens:ae,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:m.width,height:m.height,rings:ne,mode:l,align:d,scale:Ie,allowOverflow:!1,capInset:we*Ie,capLines:le?$e:0});if(ge(1).placed>=ae.length)return 1;if(ge(Ya).placed<ae.length)return Ya;let Pe=Ya,je=1;for(let Ie=0;Ie<_S;Ie+=1){const be=(Pe+je)/2;ge(be).placed>=ae.length?Pe=be:je=be}return Pe},[I,ae,m.width,m.height,ne,l,d,u,we,le,$e]);s.useEffect(()=>{w(g)},[g,w]);const G=u?Math.min(p,g):1,F=s.useMemo(()=>!I||!ae.length||m.width<=0||m.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0}:Qc({tokens:ae,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:m.width,height:m.height,rings:ne,mode:l,align:d,scale:G,allowOverflow:c,capInset:we*G,capLines:le?$e:0}),[I,ae,m.width,m.height,ne,l,d,G,c,we,le,$e]),X=I?I.dropCapFontSize*G:0,me=I?I.dropCapTopAdjust*G:0,Y=d==="justify"?"left":d,L=!!(R&&Z&&m.width>0&&m.height>0),ie=!!B,oe=(L||ie)&&m.width>0&&m.height>0,D=HS(M,oe),te=oe&&D?OS():null,Ae=s.useRef(!1),he=s.useCallback(ge=>{Ae.current=ge},[]);s.useEffect(()=>{if(!L&&!ie)return;const ge=Pe=>{const je=M;if(!je)return;const Ie=je.getBoundingClientRect();Pe.clientX>=Ie.left&&Pe.clientX<=Ie.right&&Pe.clientY>=Ie.top&&Pe.clientY<=Ie.bottom&&(Pe.preventDefault(),Pe.stopPropagation(),K(Le=>Le==="shape"&&Ae.current?Le:Le==="shape"&&ie?"image":L?"shape":"image"))};return document.addEventListener("dblclick",ge,!0),()=>document.removeEventListener("dblclick",ge,!0)},[L,ie,M]);const J=s.useMemo(()=>b&&m.width>0&&m.height>0?Nw(Te,m):null,[b,Te,m.width,m.height]),Ze=s.useRef(null),Fe=(()=>{const ge=Ze.current;return U||!B||!ce||!J||!ge||H===ge.customPath||ge.shape!==n&&n!=="custom"?null:bS(ge.bounds,J,ce,ge.focalX,ge.focalY,ge.scale)})();Ir(()=>{if(N||!B||!ce||!J)return;const ge=Ze.current,Pe=!!(ge&&H!==ge.customPath);Pe&&Fe&&B.onCommit(Fe),Pe&&U&&(O==null||O()),Ze.current={rings:Te,bounds:J,focalX:(Fe==null?void 0:Fe.focalX)??C,focalY:(Fe==null?void 0:Fe.focalY)??v,scale:(Fe==null?void 0:Fe.scale)??S,customPath:H,shape:n}},[N,U,H,n,Te,J,B,ce,C,v,S,Fe,O]);const Qe=Ze.current,Xe=!!(N&&!U&&Qe&&!Fe),nt=Xe&&Qe?Qe.focalX:(Fe==null?void 0:Fe.focalX)??C,et=Xe&&Qe?Qe.focalY:(Fe==null?void 0:Fe.focalY)??v,Be=Xe&&Qe?Qe.scale:(Fe==null?void 0:Fe.scale)??S,fe=Xe&&Qe?Qe.bounds:J,He=s.useMemo(()=>{if(!(m.width>0)||!(m.height>0))return"";let ge=Oc(i,Z,o,r,n,m);if(ue){const Pe=Q??m,je=r.width/Pe.width,Ie=r.height/Pe.height;ge=on(ge,be=>({x:be.x*je,y:be.y*Ie}))}return Dc(ge,m)||Wc(ne,m)},[i,Z,o,r,n,m.width,m.height,ue,Q,ne]),ze=s.useMemo(()=>{if(!b||!(m.width>0)||!(m.height>0))return"";let ge=Oc(H,Z,o,r,n,m);if(ue){const Pe=Q??m,je=r.width/Pe.width,Ie=r.height/Pe.height;ge=on(ge,be=>({x:be.x*je,y:be.y*Ie}))}return Dc(ge,m)||Wc(Te,m)},[b,H,Z,o,r,n,m.width,m.height,ue,Q,Te]),Je=`${$}-clip`,Ce=s.useMemo(()=>{if(!fe)return null;const ge=ce??{width:fe.width,height:fe.height},Pe=$i(fe,ge,Be);return{x:Mn(fe.width,Pe.width,nt),y:Mn(fe.height,Pe.height,et),width:Pe.width,height:Pe.height}},[fe,ce,nt,et,Be]);return a.jsxs("div",{className:`${e}-column`,ref:_,children:[He?a.jsxs("svg",{className:`${e}-shape-fill`,viewBox:`0 0 ${m.width} ${m.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:He,fillRule:"evenodd"}),b&&ze&&fe&&Ce?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Je,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ze,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"]:G},children:[a.jsx("div",{className:`${e}-measure`,ref:A,style:y,"aria-hidden":!0}),F.segments.map((ge,Pe)=>{const je=ae.slice(ge.from,ge.to),Ie=Pe===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:je.map((be,Le)=>{const _e=le&&Ie&&ge.from===0&&Le===0?be.text.slice(1):be.text,it=Jc(be.leaf),ot=be.href?a.jsx("a",{className:`${e}-link`,href:be.href,target:be.target,rel:be.target?"noopener noreferrer":void 0,style:it,children:_e}):a.jsx("span",{style:it,children:_e});return a.jsxs("span",{children:[!ge.justify&&Le>0?" ":null,ot]},Le)})},`${ge.from}-${ge.to}-${Pe}`)}),h&&!Z&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((ge,Pe)=>a.jsx("polygon",{points:ge.map(je=>`${je.x},${je.y}`).join(" ")},Pe))})]}),le&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...y,top:`${F.capTop+me}px`,left:`${F.capLeft}px`,fontSize:`${X}px`,lineHeight:`${X}px`},children:le}),te&&D&&(Z&&R||B)&&Gn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:D.top,left:D.left,width:D.width,height:D.height,zIndex:FS,pointerEvents:"none"},children:[Z&&R&&a.jsx(RS,{P:e,box:{width:D.width,height:D.height},viewBox:r,contours:Z,snap:R.snap,stretchToBox:!ue,uniformStretch:n==="circle",stage:j,onStageChange:K,onSelectionChange:he,onChange:R.onChange,onCommit:R.onCommit}),B&&fe&&a.jsx(wS,{P:e,box:{width:D.width,height:D.height},bounds:fe,natural:ce,imageUrl:b,maskPath:ze,stage:j,onStageChange:K,focalX:nt,focalY:et,scale:Be,onChange:B.onChange,onCommit:B.onCommit})]}),te),a.jsx("div",{className:`${e}-a11y`,children:q.map((ge,Pe)=>a.jsx("p",{children:ge},Pe))})]})}const Nu=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],jS={x:0,y:0,width:100,height:100},zS=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?jS:{x:t[0],y:t[1],width:t[2],height:t[3]}},BS=e=>`
23709
23709
  .${e}-wrapper {
23710
23710
  box-sizing: border-box;
23711
23711
  display: flex;
@@ -23815,11 +23815,17 @@ export function Helix({
23815
23815
  fill: none;
23816
23816
  stroke: transparent;
23817
23817
  pointer-events: none;
23818
- cursor: copy;
23819
23818
  }
23820
23819
  .${e}-editor-armed .${e}-editor-hit {
23821
23820
  pointer-events: stroke;
23822
23821
  }
23822
+ .${e}-editor-add-preview {
23823
+ fill: #FFFFFF;
23824
+ stroke: #FF5C02;
23825
+ stroke-width: 1.5;
23826
+ pointer-events: none;
23827
+ opacity: 0.85;
23828
+ }
23823
23829
  .${e}-editor-grab {
23824
23830
  fill: transparent;
23825
23831
  stroke: none;
@@ -23925,7 +23931,7 @@ export function Helix({
23925
23931
  clip-path: inset(50%);
23926
23932
  white-space: nowrap;
23927
23933
  }
23928
- `,VS=1;function GS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=D.useScopedStyles(),c=s.useMemo(()=>BS(d),[d]),u=n??!1,p=!!r||!!o,b=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),v=(e==null?void 0:e.shape)??"custom",g=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",f=s.useMemo(()=>zS(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),x=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",S=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",w=((e==null?void 0:e.fitText)??"off")==="on",H=(e==null?void 0:e.dropCapSize)??VS,N=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??H)),U=u&&p&&!i,[O,C]=s.useState(!1);s.useEffect(()=>{if(!u||!p){C(!1);return}const J=()=>C(!0),te=()=>C(!1),$e=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ye=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const F of $e)window.addEventListener(F,J);for(const F of ye)window.addEventListener(F,te);return()=>{for(const F of $e)window.removeEventListener(F,J);for(const F of ye)window.removeEventListener(F,te)}},[u,p]);const V=u&&p&&!i&&typeof l=="function",$=!O,R=Math.max(0,(e==null?void 0:e.pathSnap)??0),k=s.useRef(e??{}),T=s.useRef(""),m=[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(m!==T.current)T.current=m,k.current=e??{};else if(e){const{customPath:J,shape:te,pathFit:$e,pathViewBox:ye,imageScale:F,imageFocalX:ve,imageFocalY:pe,image:Z,...me}=e,De=k.current;for(const ge of Object.keys(me))if(De[ge]!==me[ge]){k.current={...De,...me};break}}const[M,E]=s.useState(null),[z,ne]=s.useState(!1),[I,W]=s.useState(!1),K=s.useCallback(()=>W(!1),[]),ae=k.current.shape??v,de=s.useMemo(()=>!M||M.serialized===g?g:M.serialized,[M,g]);s.useEffect(()=>{V||(ne(!1),W(!1))},[V]),s.useEffect(()=>{!M||z||M.serialized===g&&E(null)},[M,g,z]);const A=s.useMemo(()=>{if(!V)return null;if(M&&(M.base===g||M.serialized===g))return M.contours;const J=ri(g);return J.length?J:null},[V,M,g]),he=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===ms&&A&&(v==="circle"||!Mu(A,f))),q=s.useCallback((J,te,$e)=>{const ye=co(J);if(E(F=>({base:F&&(F.base===g||F.serialized===g)?F.base:g,serialized:ye,contours:J})),te){const F=k.current,ve=$e!=null&&$e.preserveShape?F.shape:"custom",pe={...F,shape:ve,customPath:ye};k.current=pe,l==null||l(pe)}},[g,l]),ce=s.useMemo(()=>V?{contours:he?A:null,snap:R,needsConversion:!he,onConvert:J=>{const te=co(J);E({base:te,serialized:te,contours:J});const $e={...k.current,pathFit:"viewbox",pathViewBox:ms,customPath:te};k.current=$e,l==null||l($e)},onChange:(J,te)=>{ne(!0),W(!!(te!=null&&te.carryImage)),q(J,!1)},onCommit:(J,te)=>{q(J,!0,te),ne(!1)}}:null,[V,he,A,R,l,q]),Q=x==="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]),[He,xe]=s.useState(null),le=He??be,ee=s.useCallback(J=>xe(J),[]),ue=s.useCallback(J=>{xe(J);const te={...k.current,imageFocalX:J.focalX,imageFocalY:J.focalY,imageScale:J.scale};k.current=te,l==null||l(te)},[l]);s.useEffect(()=>{He&&Math.abs(He.focalX-be.focalX)<1e-9&&Math.abs(He.focalY-be.focalY)<1e-9&&Math.abs(He.scale-be.scale)<1e-9&&xe(null)},[He,be]);const oe=s.useMemo(()=>!V||!Q?null:{onChange:ee,onCommit:ue},[V,Q,ee,ue]),[Fe,Ce]=s.useState(void 0),P=s.useRef(void 0),Y=s.useCallback(J=>{const te=P.current;te!==void 0&&Math.abs(te-J)<.005||(P.current=J,Ce(J))},[]),X=s.useMemo(()=>w&&typeof Fe=="number"?Fe:1,[Fe,w]),ie=J=>`calc(${J} * var(--${d}-fit, 1))`,j=s.useMemo(()=>{var $e,ye,F,ve,pe;const J=(e==null?void 0:e.textFontSize)??.012,te=Math.max((e==null?void 0:e.textLineHeight)??J,J);return{fontFamily:go(e==null?void 0:e.textFontFamily),fontWeight:($e=e==null?void 0:e.textFontSettings)==null?void 0:$e.fontWeight,fontStyle:(ye=e==null?void 0:e.textFontSettings)==null?void 0:ye.fontStyle,fontSize:ie(D.scalingValue(J,u)),lineHeight:ie(D.scalingValue(te,u)),letterSpacing:ie(D.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ie(D.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(F=e==null?void 0:e.textTextAppearance)==null?void 0:F.textTransform,textDecoration:(ve=e==null?void 0:e.textTextAppearance)==null?void 0:ve.textDecoration,fontVariant:(pe=e==null?void 0:e.textTextAppearance)==null?void 0:pe.fontVariant}},[e,u,d]),B={[`--${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:{...B},children:a.jsx(DS,{P:d,item:b,shape:ae,customPath:g,pathFit:h,viewBox:f,mode:x,align:S,allowOverflow:y,fitEnabled:w,scale:X,onFitScale:Y,dropCapLines:N,dropCapSize:H,showGuides:(U||V)&&$,typography:j,imageUrl:x==="avoid"?e==null?void 0:e.image:null,imageFocalX:le.focalX,imageFocalY:le.focalY,imageScale:le.scale,imageCustomPath:de,pathDragActive:z,pathCarryImage:I,onCarryImageConsumed:K,pathEditor:$?ce:null,imageEditor:$?oe:null})})]})}const qS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
23934
+ `,VS=1;function GS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:d}=z.useScopedStyles(),c=s.useMemo(()=>BS(d),[d]),u=n??!1,p=!!r||!!o,w=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",f=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",y=s.useMemo(()=>zS(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",v=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",H=(e==null?void 0:e.dropCapSize)??VS,N=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??H)),U=u&&p&&!i,[O,R]=s.useState(!1);s.useEffect(()=>{if(!u||!p){R(!1);return}const F=()=>R(!0),X=()=>R(!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 L of me)window.addEventListener(L,F);for(const L of Y)window.addEventListener(L,X);return()=>{for(const L of me)window.removeEventListener(L,F);for(const L of Y)window.removeEventListener(L,X)}},[u,p]);const B=u&&p&&!i&&typeof l=="function",$=!O,M=Math.max(0,(e==null?void 0:e.pathSnap)??0),_=s.useRef(e??{}),A=s.useRef(""),m=[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(m!==A.current)A.current=m,_.current=e??{};else if(e){const{customPath:F,shape:X,pathFit:me,pathViewBox:Y,imageScale:L,imageFocalX:ie,imageFocalY:oe,image:D,...te}=e,Ae=_.current;for(const he of Object.keys(te))if(Ae[he]!==te[he]){_.current={...Ae,...te};break}}const[P,I]=s.useState(null),[V,ee]=s.useState(!1),[T,j]=s.useState(!1),K=s.useCallback(()=>j(!1),[]),ce=_.current.shape??x,se=s.useMemo(()=>!P||P.serialized===f?f:P.serialized,[P,f]);s.useEffect(()=>{B||(ee(!1),j(!1))},[B]),s.useEffect(()=>{!P||V||P.serialized===f&&I(null)},[P,f,V]);const k=s.useMemo(()=>{if(!B)return null;if(P&&(P.base===f||P.serialized===f))return P.contours;const F=ai(f);return F.length?F:null},[B,P,f]),ae=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===ms&&k&&(x==="circle"||!ku(k,y))),q=s.useCallback((F,X,me)=>{const Y=po(F);if(I(L=>({base:L&&(L.base===f||L.serialized===f)?L.base:f,serialized:Y,contours:F})),X){const L=_.current,ie=me!=null&&me.preserveShape?L.shape:"custom",oe={...L,shape:ie,customPath:Y};_.current=oe,l==null||l(oe)}},[f,l]),le=s.useMemo(()=>B?{contours:ae?k:null,snap:M,needsConversion:!ae,onConvert:F=>{const X=po(F);I({base:X,serialized:X,contours:F});const me={..._.current,pathFit:"viewbox",pathViewBox:ms,customPath:X};_.current=me,l==null||l(me)},onChange:(F,X)=>{ee(!0),j(!!(X!=null&&X.carryImage)),q(F,!1)},onCommit:(F,X)=>{q(F,!0,X),ee(!1)}}:null,[B,ae,k,M,l,q]),Z=b==="avoid"&&!!(e!=null&&e.image),xe=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]),[Ne,ye]=s.useState(null),ue=Ne??xe,Q=s.useCallback(F=>ye(F),[]),de=s.useCallback(F=>{ye(F);const X={..._.current,imageFocalX:F.focalX,imageFocalY:F.focalY,imageScale:F.scale};_.current=X,l==null||l(X)},[l]);s.useEffect(()=>{Ne&&Math.abs(Ne.focalX-xe.focalX)<1e-9&&Math.abs(Ne.focalY-xe.focalY)<1e-9&&Math.abs(Ne.scale-xe.scale)<1e-9&&ye(null)},[Ne,xe]);const ne=s.useMemo(()=>!B||!Z?null:{onChange:Q,onCommit:de},[B,Z,Q,de]),[Ee,Te]=s.useState(void 0),Oe=s.useRef(void 0),ve=s.useCallback(F=>{const X=Oe.current;X!==void 0&&Math.abs(X-F)<.005||(Oe.current=F,Te(F))},[]),we=s.useMemo(()=>S&&typeof Ee=="number"?Ee:1,[Ee,S]),$e=F=>`calc(${F} * var(--${d}-fit, 1))`,g=s.useMemo(()=>{var me,Y,L,ie,oe;const F=(e==null?void 0:e.textFontSize)??.012,X=Math.max((e==null?void 0:e.textLineHeight)??F,F);return{fontFamily:fo(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(z.scalingValue(F,u)),lineHeight:$e(z.scalingValue(X,u)),letterSpacing:$e(z.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:$e(z.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(L=e==null?void 0:e.textTextAppearance)==null?void 0:L.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]),G={[`--${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:{...G},children:a.jsx(DS,{P:d,item:w,shape:ce,customPath:f,pathFit:h,viewBox:y,mode:b,align:C,allowOverflow:v,fitEnabled:S,scale:we,onFitScale:ve,dropCapLines:N,dropCapSize:H,showGuides:(U||B)&&$,typography:g,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:ue.focalX,imageFocalY:ue.focalY,imageScale:ue.scale,imageCustomPath:se,pathDragActive:V,pathCarryImage:T,onCarryImageConsumed:K,pathEditor:$?le:null,imageEditor:$?ne:null})})]})}const qS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
23929
23935
  import type React from 'react';
23930
23936
  import { CommonComponentProps } from '../props';
23931
23937
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -24108,6 +24114,8 @@ export type ColumnMetrics = {
24108
24114
  spaceWidth: number;
24109
24115
  lineHeight: number;
24110
24116
  capWidth: number;
24117
+ dropCapFontSize: number;
24118
+ dropCapTopAdjust: number;
24111
24119
  };
24112
24120
 
24113
24121
  export type ColumnProps = {
@@ -24304,11 +24312,17 @@ const getCSS = (P: string): string => \`
24304
24312
  fill: none;
24305
24313
  stroke: transparent;
24306
24314
  pointer-events: none;
24307
- cursor: copy;
24308
24315
  }
24309
24316
  .\${P}-editor-armed .\${P}-editor-hit {
24310
24317
  pointer-events: stroke;
24311
24318
  }
24319
+ .\${P}-editor-add-preview {
24320
+ fill: #FFFFFF;
24321
+ stroke: #FF5C02;
24322
+ stroke-width: 1.5;
24323
+ pointer-events: none;
24324
+ opacity: 0.85;
24325
+ }
24312
24326
  .\${P}-editor-grab {
24313
24327
  fill: transparent;
24314
24328
  stroke: none;
@@ -24728,4 +24742,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
24728
24742
  </>
24729
24743
  );
24730
24744
  }
24731
- `,Jc=[...Wu],XS={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},US={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Jc},enum:Jc},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:.5,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:{...XS.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:{...Pu("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."}]}]}]}},YS={element:GS,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Wu.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Pu(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:US,sourceCode:qS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},KS=[Um,tg,U0,Xg,nh,ph,Ph,ef,lf,hf,Df,Ay,Nv,qv,I0,O0,ax,nb,yx,xb,Kb,Fw,YS];exports.components=KS;exports.isSchemaV1=Ou;
24745
+ `,ed=[...Nu],XS={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},US={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:ed},enum:ed},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:{...XS.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:{...Au("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."}]}]}]}},YS={element:GS,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Nu.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Au(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:US,sourceCode:qS,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},KS=[Ym,ng,Y0,Ug,ih,mh,kh,tf,cf,ff,jf,Fy,Hv,Xv,E0,D0,sx,ib,vx,bb,Zb,_w,YS];exports.components=KS;exports.isSchemaV1=Du;