@cntrl-site/components 1.0.19-alpha.0 → 1.0.19-alpha.2
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/Components/LightboxStrip/utils.d.ts +2 -2
- package/dist/index.js +58 -34
- package/dist/index.mjs +2449 -2412
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Ge=require("classnames"),L=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",Al="ControlSlider-module__middleRightAlignment___wEbfX",_l="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Se={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:Al,bottomLeftAlignment:_l,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(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 Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",si=1,Bl=2,ui=3,bi=4,Hi=5,so=6,yo=7,Ol={CREATED:si,MOUNTED:Bl,IDLE:ui,MOVING:bi,SCROLLING:Hi,DRAGGING:so,DESTROYED:yo};function Sn(e){e.length=0}function Bn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ft(e){return e.bind.apply(e,[null].concat(Bn(arguments,1)))}var Ya=setTimeout,or=function(){};function Gr(e){return requestAnimationFrame(e)}function Co(e,t){return typeof t===e}function Ei(e){return!yr(e)&&Co("object",e)}var fr=Array.isArray,Ja=ft(Co,"function"),Fn=ft(Co,"string"),Bi=ft(Co,"undefined");function yr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Oi(e){return fr(e)?e:[e]}function Qt(e,t){Oi(e).forEach(t)}function vr(e,t){return e.indexOf(t)>-1}function lo(e,t){return e.push.apply(e,Oi(t)),e}function yn(e,t,n){e&&Qt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function dn(e,t){yn(e,Fn(t)?t.split(" "):t,!0)}function ji(e,t){Qt(t,e.appendChild.bind(e))}function br(e,t){Qt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Pi(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Bn(e.children):[];return t?n.filter(function(i){return Pi(i,t)}):n}function zi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ii=Object.keys;function Gn(e,t,n){return e&&(n?Ii(e).reverse():Ii(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ai(e){return Bn(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function Wn(e){return Bn(arguments,1).forEach(function(t){Gn(t,function(n,i){fr(n)?e[i]=n.slice():Ei(n)?e[i]=Wn({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){Qt(t||Ii(e),function(n){delete e[n]})}function un(e,t){Qt(e,function(n){Qt(t,function(i){n&&n.removeAttribute(i)})})}function je(e,t,n){Ei(t)?Gn(t,function(i,o){je(e,o,i)}):Qt(e,function(i){yr(n)||n===""?un(i,t):i.setAttribute(t,String(n))})}function li(e,t,n){var i=document.createElement(e);return t&&(Fn(t)?dn(i,t):je(i,t)),n&&ji(n,i),i}function rn(e,t,n){if(Bi(n))return getComputedStyle(e)[t];yr(n)||(e.style[t]=""+n)}function _i(e,t){rn(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function an(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Xt(e){return e.getBoundingClientRect()}function Xn(e){Qt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function fn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function xr(e,t){return t?Bn(e.querySelectorAll(t)):[]}function vn(e,t){yn(e,t,!1)}function rr(e){return e.timeStamp}function zn(e){return Fn(e)?e:e?e+"px":""}var Vi="splide",wr="data-"+Vi;function Ci(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Nn=Math.min,vo=Math.max,bo=Math.floor,Ri=Math.ceil,Dt=Math.abs;function is(e,t,n){return Dt(e-t)<n}function co(e,t,n,i){var o=Nn(t,n),s=vo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function oi(e,t,n){var i=Nn(t,n),o=vo(t,n);return Nn(vo(i,e),o)}function ar(e){return+(e>0)-+(e<0)}function sr(e,t){return Qt(t,function(n){e=e.replace("%s",""+n)}),e}function Sr(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+Sr(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){Qt(a,function(p){p&&Qt(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),Sn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var On="mounted",lr="ready",$n="move",xi="moved",$r="click",rs="active",as="inactive",ss="visible",ls="hidden",Et="refresh",Ht="updated",pi="resize",To="resized",cs="drag",ds="dragging",us="dragged",Lo="scroll",Jn="scrolled",zl="overflow",Cr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Tr="navigation:mounted",Lr="autoplay:play",fs="autoplay:playing",Er="autoplay:pause",Pr="lazyload:loaded",ys="sk",vs="sh",xo="ei";function xt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Oi(s).join(" "),function(d){a.apply(a,fr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Bn(arguments,1))}return e&&e.event.on(Cr,n.destroy),Ai(n,{bus:t,on:i,off:ft(n.unbind,t),emit:o})}function Eo(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?Nn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function f($){e=$}function E(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:f,isPaused:E}}function Vl(e){var t=e;function n(o){t=o}function i(o){return vr(Oi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=Eo(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ii(o).sort(function(f,E){return m?+f-+E:+E-+f}).forEach(function(f){u(o[f],"("+(m?"min":"max")+"-width:"+f+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,f){var E=matchMedia(f);a.bind(E,"change",w),d.push([m,E])}function w(){var m=i.is(yo),f=n.direction,E=d.reduce(function($,C){return Wn($,C[1].matches?C[0]:{})},{});Xr(n),v(E),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):f!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?Wn(n,s):Xr(n,Ii(s)))}function v(m,f,E){Wn(n,m),f&&Wn(Object.getPrototypeOf(n),m),(E||!i.is(si))&&e.emit(Ht,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Po="Arrow",Io=Po+"Left",Ao=Po+"Right",bs=Po+"Up",xs=Po+"Down",Zr="rtl",_o="ttb",Oo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,Ao],ArrowRight:[xs,Io]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===_o?0:-1;return Oo[s]&&Oo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=Oo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var bn="role",ci="tabindex",Ul="disabled",ln="aria-",Di=ln+"controls",ws=ln+"current",Qr=ln+"selected",Yt=ln+"label",Ir=ln+"labelledby",Ss=ln+"hidden",Ar=ln+"orientation",ki=ln+"roledescription",ea=ln+"live",ta=ln+"busy",na=ln+"atomic",_r=[bn,ci,Ul,Di,ws,Yt,Ir,Ss,Ar,ki],pn=Vi+"__",jn="is-",jo=Vi,ia=pn+"track",Gl=pn+"list",Ro=pn+"slide",$s=Ro+"--clone",Xl=Ro+"__container",Rr=pn+"arrows",ko=pn+"arrow",Cs=ko+"--prev",Ts=ko+"--next",Mo=pn+"pagination",Ls=Mo+"__page",Yl=pn+"progress",Jl=Yl+"__bar",Zl=pn+"toggle",Ql=pn+"spinner",ec=pn+"sr",tc=jn+"initialized",Yn=jn+"active",Es=jn+"prev",Ps=jn+"next",cr=jn+"visible",dr=jn+"loading",Is=jn+"focus-in",As=jn+"overflow",nc=[Yn,cr,Es,Ps,dr,Is,As],ic={slide:Ro,clone:$s,arrows:Rr,arrow:ko,prev:Cs,next:Ts,pagination:Mo,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Pi(n,t);)n=n.parentElement;return n}var rc=5,oa=200,_s="touchstart mousedown",zo="touchmove mousemove",Vo="touchend touchcancel mouseup click";function ac(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function f(){S(),M(),C()}function E(){o(Et,$),o(Et,f),o(Ht,C),s(document,_s+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){yn(a,Is,!!m)})}function $(b){var R=_r.concat("style");Sn(p),vn(a,u),vn(x,w),un([x,v],R),un(a,b?R:["style",ki])}function C(){vn(a,u),vn(x,w),u=W(jo),w=W(ia),dn(a,u),dn(x,w),je(a,Yt,n.label),je(a,Ir,n.labelledby)}function S(){x=P("."+ia),v=zi(x,"."+Gl),Ci(x&&v,"A track/list element is missing."),lo(p,Qa(v,"."+Ro+":not(."+$s+")")),Gn({arrows:Rr,pagination:Mo,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=P("."+b)}),Ai(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Vi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!an(a,bn)&&a.tagName!=="SECTION"&&R&&je(a,bn,R),je(a,ki,d.carousel),je(v,bn,"presentation")}function P(b){var R=ns(a,b);return R&&oc(R,"."+jo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===jo&&Yn]}return Ai(l,{setup:f,mount:E,destroy:$})}var mi="slide",wi="loop",qi="fade";function sc(e,t,n,i){var o=xt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,f=u.slideFocus,E=l.Direction.resolve,$=an(i,"style"),C=an(i,Yt),S=n>-1,M=zi(i,"."+Xl),P;function W(){S||(i.id=p.id+"-slide"+Sr(t+1),je(i,bn,m?"tabpanel":"group"),je(i,ki,v.slide),je(i,Yt,C||sr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",ft(a,$r,X)),d(i,"keydown",ft(a,ys,X)),s([xi,vs,Jn],T),s(Tr,V),x&&s($n,g)}function R(){P=!0,o.destroy(),vn(i,nc),un(i,_r),je(i,"style",$),je(i,Yt,C||"")}function V(){var q=e.splides.map(function(B){var Y=B.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");je(i,Yt,sr(v.slideX,(S?n:t)+1)),je(i,Di,q),je(i,bn,f?"button":""),f&&un(i,ki)}function g(){P||T()}function T(){if(!P){var q=e.index;_(),H(),yn(i,Es,t===q-1),yn(i,Ps,t===q+1)}}function _(){var q=se();q!==Yr(i,Yn)&&(yn(i,Yn,q),je(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),B=!q&&(!se()||S);if(e.state.is([bi,Hi])||je(i,Ss,B||""),je(xr(i,u.focusableNodes||""),ci,B?-1:""),f&&je(i,ci,B?-1:0),q!==Yr(i,cr)&&(yn(i,cr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function K(q,B,Y){rn(Y&&M||i,q,B)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(qi))return se();var q=Xt(l.Elements.track),B=Xt(i),Y=E("left",!0),ne=E("right",!0);return bo(q[Y])<=Ri(B[Y])&&bo(B[ne])<=Ri(q[ne])}function k(q,B){var Y=Dt(q-t);return!S&&(u.rewind||e.is(wi))&&(Y=Nn(Y,e.length-Y)),Y<=B}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:T,style:K,isWithin:k};return X}function lc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(Et,v),o(Et,x)}function x(){l.forEach(function(T,_){f(T,_,-1)})}function v(){P(function(T){T.destroy()}),Sn(u)}function m(){P(function(T){T.update()})}function f(T,_,H){var K=sc(e,_,H,T);K.mount(),u.push(K),u.sort(function(se,j){return se.index-j.index})}function E(T){return T?W(function(_){return!_.isClone}):u}function $(T){var _=t.Controller,H=_.toIndex(T),K=_.hasFocus()?1:n.perPage;return W(function(se){return co(se.index,H,H+K-1)})}function C(T){return W(T)[0]}function S(T,_){Qt(T,function(H){if(Fn(H)&&(H=ts(H)),Za(H)){var K=l[_];K?br(H,K):ji(p,H),dn(H,n.classes.slide),R(H,ft(s,pi))}}),s(Et)}function M(T){Xn(W(T).map(function(_){return _.slide})),s(Et)}function P(T,_){E(_).forEach(T)}function W(T){return u.filter(Ja(T)?T:function(_){return Fn(T)?Pi(_.slide,T):vr(Oi(T),_.index)})}function b(T,_,H){P(function(K){K.style(T,_,H)})}function R(T,_){var H=xr(T,"img"),K=H.length;K?H.forEach(function(se){a(se,"load error",function(){--K||_()})}):_()}function V(T){return T?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:f,get:E,getIn:$,getAt:C,add:S,remove:M,forEach:P,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,f,E,$;function C(){S(),s(window,"resize load",Dl(ft(a,pi))),o([Ht,Et],S),o(pi,M)}function S(){f=n.direction===_o,rn(u,"maxWidth",zn(n.width)),rn(w,l("paddingLeft"),P(!1)),rn(w,l("paddingRight"),P(!0)),M(!0)}function M(X){var q=Xt(u);(X||E.width!==q.width||E.height!==q.height)&&(rn(w,"height",W()),m(l("marginRight"),zn(n.gap)),m("width",R()),m("height",V(),!0),E=q,a(To),$!==($=k())&&(yn(u,As,$),a(zl,$)))}function P(X){var q=n.padding,B=l(X?"right":"left");return q&&zn(q[B]||(Ei(q)?0:q))||"0px"}function W(){var X="";return f&&(X=b(),Ci(X,"height or heightRatio is missing."),X="calc("+X+" - "+P(!1)+" - "+P(!0)+")"),X}function b(){return zn(n.height||Xt(x).width*n.heightRatio)}function R(){return n.autoWidth?null:zn(n.fixedWidth)||(f?"":g())}function V(){return zn(n.fixedHeight)||(f?n.autoHeight?null:g():b())}function g(){var X=zn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function T(){return Xt(x)[l("width")]}function _(X,q){var B=v(X||0);return B?Xt(B.slide)[l("width")]+(q?0:se()):0}function H(X,q){var B=v(X);if(B){var Y=Xt(B.slide)[l("right")],ne=Xt(x)[l("left")];return Dt(Y-ne)+(q?0:se())}return 0}function K(X){return H(e.length-1)-H(0)+_(0,X)}function se(){var X=v(0);return X&&parseFloat(rn(X.slide,l("marginRight")))||0}function j(X){return parseFloat(rn(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(qi)||K(!0)>T()}return{mount:C,resize:M,listSize:T,slideSize:_,sliderSize:K,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=xt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(Et,w),o([Ht,pi],v),(p=E())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Xn(l),Sn(l),i.destroy()}function v(){var $=E();p!==$&&(p<$||!$)&&i.emit(Et)}function m($){var C=a.get().slice(),S=C.length;if(S){for(;C.length<$;)lo(C,C);lo(C.slice(-$),C.slice(0,$)).forEach(function(M,P){var W=P<$,b=f(M.slide,P);W?br(b,C[0].slide):ji(s.list,b),lo(l,b),a.register(b,P-$+(W?0:S),M.index)})}}function f($,C){var S=$.cloneNode(!0);return dn(S,n.classes.clone),S.id=e.root.id+"-clone"+Sr(C+1),S}function E(){var $=n.clones;if(!e.is(wi))$=0;else if(Bi($)){var C=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=C&&Ri(Xt(s.track)[d("width")]/C);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,f=v.orient,E=t.Elements,$=E.list,C=E.track,S;function M(){S=t.Transition,o([On,To,Ht,Et],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(B,Y,ne,oe){B!==Y&&X(B>ne)&&(T(),R(g(K(),B>ne),!0)),a(bi),s($n,Y,ne,B),S.start(Y,function(){a(ui),s(xi,Y,ne,B),oe&&oe()})}function b(B){R(H(B,!0))}function R(B,Y){if(!e.is(qi)){var ne=Y?B:V(B);rn($,"transform","translate"+m("X")+"("+ne+"px)"),B!==ne&&s(vs)}}function V(B){if(e.is(wi)){var Y=_(B),ne=Y>t.Controller.getEnd(),oe=Y<0;(oe||ne)&&(B=g(B,ne))}return B}function g(B,Y){var ne=B-k(Y),oe=x();return B-=f(oe*(Ri(Dt(ne)/oe)||1))*(Y?1:-1),B}function T(){R(K(),!0),S.cancel()}function _(B){for(var Y=t.Slides.get(),ne=0,oe=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,h=Dt(H(ae,!0)-B);if(h<=oe)oe=h,ne=ae;else break}return ne}function H(B,Y){var ne=f(u(B-1)-j(B));return Y?se(ne):ne}function K(){var B=m("left");return Xt($)[B]-Xt(C)[B]+f(p(!1))}function se(B){return n.trimSpace&&e.is(mi)&&(B=oi(B,0,f(x(!0)-w()))),B}function j(B){var Y=n.focus;return Y==="center"?(w()-l(B,!0))/2:+Y*l(B)||0}function k(B){return H(B?t.Controller.getEnd():0,!!n.trimSpace)}function X(B){var Y=f(g(K(),B));return B?Y>=0:Y<=$[m("scrollWidth")]-Xt(C)[m("width")]}function q(B,Y){Y=Bi(Y)?K():Y;var ne=B!==!0&&f(Y)<f(k(!1)),oe=B!==!1&&f(Y)>f(k(!0));return ne||oe}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:T,toIndex:_,toPosition:H,getPosition:K,getLimit:k,exceededLimit:q,reposition:P}}function mc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(wi),f=e.is(mi),E=ft(K,!1),$=ft(K,!0),C=n.start||0,S,M=C,P,W,b;function R(){V(),o([Ht,Et,xo],V),o(To,g)}function V(){P=x(!0),W=n.perMove,b=n.perPage,S=X();var h=oi(C,0,v?S:P-1);h!==C&&(C=h,a.reposition())}function g(){S!==X()&&s(xo)}function T(h,ie,ge){if(!ae()){var he=H(h),Me=k(he);Me>-1&&(ie||Me!==C)&&(ne(Me),a.move(he,Me,M,ge))}}function _(h,ie,ge,he){t.Scroll.scroll(h,ie,ge,function(){var Me=k(a.toIndex(d()));ne(v?Nn(Me,S):Me),he&&he()})}function H(h){var ie=C;if(Fn(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],he=ge[1],Me=ge[2];he==="+"||he==="-"?ie=se(C+ +(""+he+(+Me||1)),C):he===">"?ie=Me?q(+Me):E(!0):he==="<"&&(ie=$(!0))}else ie=m?h:oi(h,0,S);return ie}function K(h,ie){var ge=W||(F()?1:b),he=se(C+ge*(h?-1:1),C,!(W||F()));return he===-1&&f&&!is(d(),l(!h),1)?h?0:S:ie?he:k(he)}function se(h,ie,ge){if(w()||F()){var he=j(h);he!==h&&(ie=h,h=he,ge=!1),h<0||h>S?!W&&(co(0,h,ie,!0)||co(S,ie,h,!0))?h=q(B(h)):m?h=ge?h<0?-(P%b||b):P:h:n.rewind?h=h<0?S:0:h=-1:ge&&h!==ie&&(h=q(B(ie)+(h<ie?-1:1)))}else h=-1;return h}function j(h){if(f&&n.trimSpace==="move"&&h!==C)for(var ie=d();ie===p(h,!0)&&co(h,0,e.length-1,!n.rewind);)h<C?--h:++h;return h}function k(h){return m?(h+P)%P||0:h}function X(){for(var h=P-(F()||m&&W?1:b);v&&h-- >0;)if(p(P-1,!0)!==p(h,!0)){h++;break}return oi(h,0,P-1)}function q(h){return oi(F()?h:b*h,0,S)}function B(h){return F()?Nn(h,S):bo((h>=S?P-1:h)/b)}function Y(h){var ie=a.toIndex(h);return f?oi(ie,0,S):ie}function ne(h){h!==C&&(M=C,C=h)}function oe(h){return h?M:C}function F(){return!Bi(n.focus)||n.isNavigation}function ae(){return e.state.is([bi,Hi])&&!!n.waitForTransition}return{mount:R,go:T,scroll:_,getNext:E,getPrev:$,getAdjacent:K,getEnd:X,setIndex:ne,getIndex:oe,toIndex:q,toPage:B,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Gi=40;function fc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,f=p.next,E,$,C={};function S(){P(),o(Ht,M)}function M(){W(),S()}function P(){var _=n.arrows;_&&!(m&&f)&&V(),m&&f&&(Ai(C,{prev:m,next:f}),_i(v,_?"":"none"),dn(v,$=Rr+"--"+n.direction),_&&(b(),T(),je([m,f],Di,x.id),a(ps,m,f)))}function W(){i.destroy(),vn(v,$),E?(Xn(w?[m,f]:v),m=f=null):un([m,f],_r)}function b(){o([On,xi,Et,Jn,xo],T),s(f,"click",ft(R,">")),s(m,"click",ft(R,"<"))}function R(_){u.go(_,!0)}function V(){v=w||li("div",d.arrows),m=g(!0),f=g(!1),E=!0,ji(v,[m,f]),!w&&br(v,x)}function g(_){var H='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Gi+" "+Gi+'" width="'+Gi+'" height="'+Gi+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function T(){if(m&&f){var _=e.index,H=u.getPrev(),K=u.getNext(),se=H>-1&&_<H?l.last:l.prev,j=K>-1&&_>K?l.first:l.next;m.disabled=H<0,f.disabled=K<0,je(m,Yt,se),je(f,Yt,j),a(ms,m,f,H,K)}}return{arrows:C,mount:S,destroy:W,update:T}}var yc=wr+"-interval";function vc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.emit,d=Eo(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,f,E=v==="pause";function $(){v&&(C(),x&&je(x,Di,p.track.id),E||S(),W())}function C(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",P()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){f=V.type==="focusin",P()}),x&&s(x,"click",function(){E?S():M(!0)}),o([$n,Lo,Et],d.rewind),o($n,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=m=E=!1,W(),a(Lr))}function M(V){V===void 0&&(V=!0),E=!!V,W(),l()||(d.pause(),a(Er))}function P(){E||(m||f?M(!1):S())}function W(){x&&(yn(x,Yn,!E),je(x,Yt,n.i18n[E?"play":"pause"]))}function b(V){var g=p.bar;g&&rn(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+an(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=xt(e),o=i.on;function s(){n.cover&&(o(Pr,ft(d,!0)),o([On,Ht,Et],ft(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=zi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),_i(p,l?"none":"")}return{mount:s,destroy:ft(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(mi),v,m,f=1;function E(){o($n,M),o([Ht,Et],P)}function $(b,R,V,g,T){var _=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),K=ar(b)*H*bo(Dt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+K}var se=is(_,b,1);f=1,R=se?0:R||vo(Dt(b-_)/$c,Cc),m=g,v=Eo(R,C,ft(S,_,b,T),1),a(Hi),s(Lo),v.start()}function C(){a(ui),m&&m(),s(Jn)}function S(b,R,V,g){var T=l(),_=b+(R-b)*W(g),H=(_-T)*f;w(T+H),x&&!V&&u()&&(f*=Sc,Dt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function P(){v&&!v.isPaused()&&(M(),C())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:E,destroy:M,scroll:$,cancel:P}}var ri={passive:!1,capture:!0};function Lc(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,f=m.resolve,E=m.orient,$=p.getPosition,C=p.exceededLimit,S,M,P,W,b,R=!1,V,g,T;function _(){a(x,zo,or,ri),a(x,Vo,or,ri),a(x,_s,K,ri),a(x,"click",k,{capture:!0}),a(x,"dragstart",fn),o([On,Ht],H)}function H(){var U=n.drag;le(!U),W=U==="free"}function K(U){if(V=!1,!g){var O=Me(U);he(U.target)&&(O||!U.button)&&(w.isBusy()?fn(U,!0):(T=O?x:window,b=l.is([bi,Hi]),P=null,a(T,zo,se,ri),a(T,Vo,j,ri),p.cancel(),u.cancel(),X(U)))}}function se(U){if(l.is(so)||(l.set(so),s(cs)),U.cancelable)if(b){p.translate(S+ge(F(U)));var O=ae(U)>oa,N=R!==(R=C());(O||N)&&X(U),V=!0,s(ds),fn(U)}else Y(U)&&(b=B(U),fn(U))}function j(U){l.is(so)&&(l.set(ui),s(us)),b&&(q(U),fn(U)),d(T,zo,se),d(T,Vo,j),b=!1}function k(U){!g&&V&&fn(U,!0)}function X(U){P=M,M=U,S=$()}function q(U){var O=ne(U),N=oe(O),pe=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(qi)?w.go(E(ar(O))<0?pe?"<":"-":pe?">":"+"):e.is(mi)&&R&&pe?w.go(C(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function B(U){var O=n.dragMinThreshold,N=Ei(O),pe=N&&O.mouse||0,we=(N?O.touch:+O)||10;return Dt(F(U))>(Me(U)?we:pe)}function Y(U){return Dt(F(U))>Dt(F(U,!0))}function ne(U){if(e.is(wi)||!R){var O=ae(U);if(O&&O<oa)return F(U)/O}return 0}function oe(U){return $()+ar(U)*Nn(Dt(U)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(U,O){return ie(U,O)-ie(h(U),O)}function ae(U){return rr(U)-rr(h(U))}function h(U){return M===U&&P||M}function ie(U,O){return(Me(U)?U.changedTouches[0]:U)["page"+f(O?"Y":"X")]}function ge(U){return U/(R&&e.is(mi)?rc:1)}function he(U){var O=n.noDrag;return!Pi(U,"."+Ls+", ."+ko)&&(!O||!Pi(U,O))}function Me(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function Z(){return b}function le(U){g=U}return{mount:_,disable:le,isDragging:Z}}var Ec={Spacebar:" ",Right:Ao,Left:Io,Up:bs,Down:xs};function kr(e){return e=Fn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=xt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(Ht,v),o(Ht,x),o($n,f)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,E))}function v(){a(p,ra)}function m($){u=$}function f(){var $=u;u=!0,Ya(function(){u=$})}function E($){if(!u){var C=kr($);C===l(Io)?e.go("<"):C===l(Ao)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var Ti=wr+"-lazy",uo=Ti+"-srcset",Ic="["+Ti+"], ["+uo+"]";function Ac(e,t,n){var i=xt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[xi,Jn],u=[];function w(){n.lazyLoad&&(x(),o(Et,x))}function x(){Sn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(C){xr(C.slide,Ic).forEach(function(S){var M=an(S,Ti),P=an(S,uo);if(M!==S.src||P!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=zi(b,"."+W)||li("span",W,b);u.push([S,C,R]),S.src||_i(S,"none")}})})}function m(){u=u.filter(function(C){var S=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,S)?f(C):!0}),u.length||s(p)}function f(C){var S=C[0];dn(C[1].slide,dr),a(S,"load error",ft(E,C)),je(S,"src",an(S,Ti)),je(S,"srcset",an(S,uo)),un(S,Ti),un(S,uo)}function E(C,S){var M=C[0],P=C[1];vn(P.slide,dr),S.type!=="error"&&(Xn(C[2]),_i(M,""),d(Pr,M,P),d(pi)),l&&$()}function $(){u.length&&f(u.shift())}return{mount:w,destroy:ft(Sn,u),check:m}}function _c(e,t,n){var i=xt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,f=[],E,$;function C(){S(),o([Ht,Et,xo],C);var g=n.pagination;m&&_i(m,g?"":"none"),g&&(o([$n,Lo,Jn],V),M(),V(),s(gs,{list:E,items:f},R(e.index)))}function S(){E&&(Xn(m?Bn(E.children):E),vn(E,$),Sn(f),E=null),i.destroy()}function M(){var g=e.length,T=n.classes,_=n.i18n,H=n.perPage,K=u()?p.getEnd()+1:Ri(g/H);E=m||li("ul",T.pagination,l.track.parentElement),dn(E,$=Mo+"--"+b()),je(E,bn,"tablist"),je(E,Yt,_.select),je(E,Ar,b()===_o?"vertical":"");for(var se=0;se<K;se++){var j=li("li",null,E),k=li("button",{class:T.page,type:"button"},j),X=d.getIn(se).map(function(B){return B.slide.id}),q=!u()&&H>1?_.pageX:_.slideX;a(k,"click",ft(P,se)),n.paginationKeyboard&&a(k,"keydown",ft(W,se)),je(j,bn,"presentation"),je(k,bn,"tab"),je(k,Di,X.join(" ")),je(k,Yt,sr(q,se+1)),je(k,ci,-1),f.push({li:j,button:k,page:se})}}function P(g){x(">"+g,!0)}function W(g,T){var _=f.length,H=kr(T),K=b(),se=-1;H===v(Ao,!1,K)?se=++g%_:H===v(Io,!1,K)?se=(--g+_)%_:H==="Home"?se=0:H==="End"&&(se=_-1);var j=f[se];j&&(es(j.button),x(">"+se),fn(T,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return f[p.toPage(g)]}function V(){var g=R(w(!0)),T=R(w());if(g){var _=g.button;vn(_,Yn),un(_,Qr),je(_,ci,-1)}if(T){var H=T.button;dn(H,Yn),je(H,Qr,!0),je(H,ci,"")}s(hs,{list:E,items:f},g,T)}return{items:f,mount:C,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),Sn(s)}function l(){d(),a()}function p(m,f){var E=xt(m);E.on($n,function($,C,S){f.go(f.is(wi)?S:$)}),s.push(E)}function u(){var m=xt(e),f=m.on;f($r,x),f(ys,v),f([On,Ht],w),s.push(m),m.emit(Tr,e.splides)}function w(){je(t.Elements.list,Ar,n.direction===_o?"vertical":"")}function x(m){e.go(m.index)}function v(m,f){vr(Rc,kr(f))&&(x(m),fn(f))}return{setup:ft(t.Media.set,{slideFocus:Bi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=xt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ri)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=rr(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&fn(p)}}function l(p){return!n.releaseWheel||e.state.is(bi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=xt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=li("span",ec),l=Eo(Wc,ft(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),je(s,na,!0),d.textContent="…",o(Lr,ft(x,!0)),o(Er,ft(x,!1)),o([xi,Jn],ft(u,!0)))}function u(v){je(s,ta,v),v?(ji(s,d),l.start()):(Xn(d),l.cancel())}function w(){un(s,[ea,na,ta]),Xn(d)}function x(v){a&&je(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:Ac,Pagination:_c,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Bc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Oc(e,t,n){var i=t.Slides;function o(){xt(e).on([On,Et],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:or}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=ft(rn,a,"transition"),l;function p(){xt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var f=i.toPosition(v,!0),E=i.getPosition(),$=x(v);Dt(f-E)>=1&&$>=1?n.useScroll?s.scroll(f,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(f,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(mi)&&m){var f=o.getIndex(!0),E=o.getEnd();if(f===0&&v>=E||f>=E&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=xt(),this.Components={},this.state=Vl(si),this.splides=[],this._o={},this._E={};var o=Fn(n)?ns(document,n):n;Ci(o,o+" is invalid."),this.root=o,i=Wn({label:an(o,Yt)||"",labelledby:an(o,Ir)||""},Bc,e.defaults,i||{});try{Wn(i,JSON.parse(an(o,wr)))}catch{Ci(!1,"Invalid JSON")}this._o=Object.create(Wn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ci(a.is([si,yo]),"Already mounted!"),a.set(si),this._C=d,this._T=o||this._T||(this.is(qi)?Oc:jc),this._E=i||this._E;var l=Ai({},Nc,this._E,{Transition:this._T});return Gn(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Gn(d,function(p){p.mount&&p.mount()}),this.emit(On),dn(this.root,tc),a.set(ui),this.emit(lr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ui)&&(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(Bn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Et),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(si)?xt(this).on(lr,this.destroy.bind(this,i)):(Gn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Cr),o.destroy(),i&&Sn(this.splides),s.set(yo)),this},Hl(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})(),Mr=zc;Mr.defaults={};Mr.STATES=Ol;var aa=[[On,"onMounted"],[lr,"onReady"],[$n,"onMove"],[xi,"onMoved"],[$r,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[Et,"onRefresh"],[Ht,"onUpdated"],[pi,"onResize"],[To,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Lo,"onScroll"],[Jn,"onScrolled"],[Cr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Tr,"onNavigationMounted"],[Lr,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Er,"onAutoplayPause"],[Pr,"onLazyLoadLoaded"]];function Wr(...e){return e.filter(Boolean).join(" ")}function wo(e){return e!==null&&typeof e=="object"}function ur(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!ur(n,t[i]));if(wo(e)&&wo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ur(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(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 pr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():wo(i)?n[o]=pr(wo(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Wr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Fr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Mr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=pr({},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&&!ur(this.options,e)&&(this.splide.options=e,this.options=pr({},e));const t=this.getSlides();Vc(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){aa.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return c.createElement(t,{className:Wr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Nr=({children:e,className:t,...n})=>c.createElement("li",{className:Wr("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Xe=require("classnames"),L=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",Al="ControlSlider-module__middleRightAlignment___wEbfX",_l="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Ee={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:Al,bottomLeftAlignment:_l,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(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 Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",si=1,Ol=2,ui=3,bi=4,Hi=5,lo=6,vo=7,Bl={CREATED:si,MOUNTED:Ol,IDLE:ui,MOVING:bi,SCROLLING:Hi,DRAGGING:lo,DESTROYED:vo};function Cn(e){e.length=0}function Nn(e,t,n){return Array.prototype.slice.call(e,t,n)}function mt(e){return e.bind.apply(e,[null].concat(Nn(arguments,1)))}var Ya=setTimeout,rr=function(){};function Gr(e){return requestAnimationFrame(e)}function To(e,t){return typeof t===e}function Ei(e){return!vr(e)&&To("object",e)}var yr=Array.isArray,Ja=mt(To,"function"),Mn=mt(To,"string"),Oi=mt(To,"undefined");function vr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return yr(e)?e:[e]}function en(e,t){Bi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function co(e,t){return e.push.apply(e,Bi(t)),e}function bn(e,t,n){e&&en(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function dn(e,t){bn(e,Mn(t)?t.split(" "):t,!0)}function ji(e,t){en(t,e.appendChild.bind(e))}function xr(e,t){en(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Pi(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Nn(e.children):[];return t?n.filter(function(i){return Pi(i,t)}):n}function zi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ii=Object.keys;function Gn(e,t,n){return e&&(n?Ii(e).reverse():Ii(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ai(e){return Nn(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function kn(e){return Nn(arguments,1).forEach(function(t){Gn(t,function(n,i){yr(n)?e[i]=n.slice():Ei(n)?e[i]=kn({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){en(t||Ii(e),function(n){delete e[n]})}function un(e,t){en(e,function(n){en(t,function(i){n&&n.removeAttribute(i)})})}function je(e,t,n){Ei(t)?Gn(t,function(i,o){je(e,o,i)}):en(e,function(i){vr(n)||n===""?un(i,t):i.setAttribute(t,String(n))})}function li(e,t,n){var i=document.createElement(e);return t&&(Mn(t)?dn(i,t):je(i,t)),n&&ji(n,i),i}function rn(e,t,n){if(Oi(n))return getComputedStyle(e)[t];vr(n)||(e.style[t]=""+n)}function _i(e,t){rn(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function an(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Yt(e){return e.getBoundingClientRect()}function Xn(e){en(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function vn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Nn(e.querySelectorAll(t)):[]}function xn(e,t){bn(e,t,!1)}function ar(e){return e.timeStamp}function zn(e){return Mn(e)?e:e?e+"px":""}var Vi="splide",Sr="data-"+Vi;function Ci(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Wn=Math.min,bo=Math.max,xo=Math.floor,Ri=Math.ceil,Kt=Math.abs;function is(e,t,n){return Kt(e-t)<n}function uo(e,t,n,i){var o=Wn(t,n),s=bo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function oi(e,t,n){var i=Wn(t,n),o=bo(t,n);return Wn(bo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function lr(e,t){return en(t,function(n){e=e.replace("%s",""+n)}),e}function $r(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+$r(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){en(a,function(p){p&&en(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),Cn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Hn="mounted",cr="ready",Tn="move",xi="moved",Cr="click",rs="active",as="inactive",ss="visible",ls="hidden",Pt="refresh",jt="updated",pi="resize",Lo="resized",cs="drag",ds="dragging",us="dragged",Eo="scroll",Jn="scrolled",zl="overflow",Tr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Lr="navigation:mounted",Er="autoplay:play",fs="autoplay:playing",Pr="autoplay:pause",Ir="lazyload:loaded",ys="sk",vs="sh",wo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Bi(s).join(" "),function(d){a.apply(a,yr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Nn(arguments,1))}return e&&e.event.on(Tr,n.destroy),Ai(n,{bus:t,on:i,off:mt(n.unbind,t),emit:o})}function Po(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?Wn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function f($){e=$}function E(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:f,isPaused:E}}function Vl(e){var t=e;function n(o){t=o}function i(o){return br(Bi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=Po(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ii(o).sort(function(f,E){return m?+f-+E:+E-+f}).forEach(function(f){u(o[f],"("+(m?"min":"max")+"-width:"+f+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,f){var E=matchMedia(f);a.bind(E,"change",w),d.push([m,E])}function w(){var m=i.is(vo),f=n.direction,E=d.reduce(function($,C){return kn($,C[1].matches?C[0]:{})},{});Xr(n),v(E),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):f!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?kn(n,s):Xr(n,Ii(s)))}function v(m,f,E){kn(n,m),f&&kn(Object.getPrototypeOf(n),m),(E||!i.is(si))&&e.emit(jt,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Io="Arrow",Ao=Io+"Left",_o=Io+"Right",bs=Io+"Up",xs=Io+"Down",Zr="rtl",Ro="ttb",jo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,_o],ArrowRight:[xs,Ao]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===Ro?0:-1;return jo[s]&&jo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=jo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var wn="role",ci="tabindex",Ul="disabled",ln="aria-",Di=ln+"controls",ws=ln+"current",Qr=ln+"selected",Jt=ln+"label",Ar=ln+"labelledby",Ss=ln+"hidden",_r=ln+"orientation",ki=ln+"roledescription",ea=ln+"live",ta=ln+"busy",na=ln+"atomic",Rr=[wn,ci,Ul,Di,ws,Jt,Ar,Ss,_r,ki],pn=Vi+"__",On="is-",zo=Vi,ia=pn+"track",Gl=pn+"list",ko=pn+"slide",$s=ko+"--clone",Xl=ko+"__container",kr=pn+"arrows",Mo=pn+"arrow",Cs=Mo+"--prev",Ts=Mo+"--next",Wo=pn+"pagination",Ls=Wo+"__page",Yl=pn+"progress",Jl=Yl+"__bar",Zl=pn+"toggle",Ql=pn+"spinner",ec=pn+"sr",tc=On+"initialized",Yn=On+"active",Es=On+"prev",Ps=On+"next",dr=On+"visible",ur=On+"loading",Is=On+"focus-in",As=On+"overflow",nc=[Yn,dr,Es,Ps,ur,Is,As],ic={slide:ko,clone:$s,arrows:kr,arrow:Mo,prev:Cs,next:Ts,pagination:Wo,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Pi(n,t);)n=n.parentElement;return n}var rc=5,oa=200,_s="touchstart mousedown",Vo="touchmove mousemove",Do="touchend touchcancel mouseup click";function ac(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function f(){S(),M(),C()}function E(){o(Pt,$),o(Pt,f),o(jt,C),s(document,_s+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){bn(a,Is,!!m)})}function $(b){var R=Rr.concat("style");Cn(p),xn(a,u),xn(x,w),un([x,v],R),un(a,b?R:["style",ki])}function C(){xn(a,u),xn(x,w),u=W(zo),w=W(ia),dn(a,u),dn(x,w),je(a,Jt,n.label),je(a,Ar,n.labelledby)}function S(){x=I("."+ia),v=zi(x,"."+Gl),Ci(x&&v,"A track/list element is missing."),co(p,Qa(v,"."+ko+":not(."+$s+")")),Gn({arrows:kr,pagination:Wo,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=I("."+b)}),Ai(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Vi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!an(a,wn)&&a.tagName!=="SECTION"&&R&&je(a,wn,R),je(a,ki,d.carousel),je(v,wn,"presentation")}function I(b){var R=ns(a,b);return R&&oc(R,"."+zo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===zo&&Yn]}return Ai(l,{setup:f,mount:E,destroy:$})}var mi="slide",wi="loop",qi="fade";function sc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,f=u.slideFocus,E=l.Direction.resolve,$=an(i,"style"),C=an(i,Jt),S=n>-1,M=zi(i,"."+Xl),I;function W(){S||(i.id=p.id+"-slide"+$r(t+1),je(i,wn,m?"tabpanel":"group"),je(i,ki,v.slide),je(i,Jt,C||lr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",mt(a,Cr,X)),d(i,"keydown",mt(a,ys,X)),s([xi,vs,Jn],T),s(Lr,V),x&&s(Tn,g)}function R(){I=!0,o.destroy(),xn(i,nc),un(i,Rr),je(i,"style",$),je(i,Jt,C||"")}function V(){var q=e.splides.map(function(O){var Y=O.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");je(i,Jt,lr(v.slideX,(S?n:t)+1)),je(i,Di,q),je(i,wn,f?"button":""),f&&un(i,ki)}function g(){I||T()}function T(){if(!I){var q=e.index;_(),H(),bn(i,Es,t===q-1),bn(i,Ps,t===q+1)}}function _(){var q=se();q!==Yr(i,Yn)&&(bn(i,Yn,q),je(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),O=!q&&(!se()||S);if(e.state.is([bi,Hi])||je(i,Ss,O||""),je(wr(i,u.focusableNodes||""),ci,O?-1:""),f&&je(i,ci,O?-1:0),q!==Yr(i,dr)&&(bn(i,dr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function K(q,O,Y){rn(Y&&M||i,q,O)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(qi))return se();var q=Yt(l.Elements.track),O=Yt(i),Y=E("left",!0),te=E("right",!0);return xo(q[Y])<=Ri(O[Y])&&xo(O[te])<=Ri(q[te])}function k(q,O){var Y=Kt(q-t);return!S&&(u.rewind||e.is(wi))&&(Y=Wn(Y,e.length-Y)),Y<=O}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:T,style:K,isWithin:k};return X}function lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(Pt,v),o(Pt,x)}function x(){l.forEach(function(T,_){f(T,_,-1)})}function v(){I(function(T){T.destroy()}),Cn(u)}function m(){I(function(T){T.update()})}function f(T,_,H){var K=sc(e,_,H,T);K.mount(),u.push(K),u.sort(function(se,j){return se.index-j.index})}function E(T){return T?W(function(_){return!_.isClone}):u}function $(T){var _=t.Controller,H=_.toIndex(T),K=_.hasFocus()?1:n.perPage;return W(function(se){return uo(se.index,H,H+K-1)})}function C(T){return W(T)[0]}function S(T,_){en(T,function(H){if(Mn(H)&&(H=ts(H)),Za(H)){var K=l[_];K?xr(H,K):ji(p,H),dn(H,n.classes.slide),R(H,mt(s,pi))}}),s(Pt)}function M(T){Xn(W(T).map(function(_){return _.slide})),s(Pt)}function I(T,_){E(_).forEach(T)}function W(T){return u.filter(Ja(T)?T:function(_){return Mn(T)?Pi(_.slide,T):br(Bi(T),_.index)})}function b(T,_,H){I(function(K){K.style(T,_,H)})}function R(T,_){var H=wr(T,"img"),K=H.length;K?H.forEach(function(se){a(se,"load error",function(){--K||_()})}):_()}function V(T){return T?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:f,get:E,getIn:$,getAt:C,add:S,remove:M,forEach:I,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,f,E,$;function C(){S(),s(window,"resize load",Dl(mt(a,pi))),o([jt,Pt],S),o(pi,M)}function S(){f=n.direction===Ro,rn(u,"maxWidth",zn(n.width)),rn(w,l("paddingLeft"),I(!1)),rn(w,l("paddingRight"),I(!0)),M(!0)}function M(X){var q=Yt(u);(X||E.width!==q.width||E.height!==q.height)&&(rn(w,"height",W()),m(l("marginRight"),zn(n.gap)),m("width",R()),m("height",V(),!0),E=q,a(Lo),$!==($=k())&&(bn(u,As,$),a(zl,$)))}function I(X){var q=n.padding,O=l(X?"right":"left");return q&&zn(q[O]||(Ei(q)?0:q))||"0px"}function W(){var X="";return f&&(X=b(),Ci(X,"height or heightRatio is missing."),X="calc("+X+" - "+I(!1)+" - "+I(!0)+")"),X}function b(){return zn(n.height||Yt(x).width*n.heightRatio)}function R(){return n.autoWidth?null:zn(n.fixedWidth)||(f?"":g())}function V(){return zn(n.fixedHeight)||(f?n.autoHeight?null:g():b())}function g(){var X=zn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function T(){return Yt(x)[l("width")]}function _(X,q){var O=v(X||0);return O?Yt(O.slide)[l("width")]+(q?0:se()):0}function H(X,q){var O=v(X);if(O){var Y=Yt(O.slide)[l("right")],te=Yt(x)[l("left")];return Kt(Y-te)+(q?0:se())}return 0}function K(X){return H(e.length-1)-H(0)+_(0,X)}function se(){var X=v(0);return X&&parseFloat(rn(X.slide,l("marginRight")))||0}function j(X){return parseFloat(rn(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(qi)||K(!0)>T()}return{mount:C,resize:M,listSize:T,slideSize:_,sliderSize:K,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(Pt,w),o([jt,pi],v),(p=E())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Xn(l),Cn(l),i.destroy()}function v(){var $=E();p!==$&&(p<$||!$)&&i.emit(Pt)}function m($){var C=a.get().slice(),S=C.length;if(S){for(;C.length<$;)co(C,C);co(C.slice(-$),C.slice(0,$)).forEach(function(M,I){var W=I<$,b=f(M.slide,I);W?xr(b,C[0].slide):ji(s.list,b),co(l,b),a.register(b,I-$+(W?0:S),M.index)})}}function f($,C){var S=$.cloneNode(!0);return dn(S,n.classes.clone),S.id=e.root.id+"-clone"+$r(C+1),S}function E(){var $=n.clones;if(!e.is(wi))$=0;else if(Oi($)){var C=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=C&&Ri(Yt(s.track)[d("width")]/C);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,f=v.orient,E=t.Elements,$=E.list,C=E.track,S;function M(){S=t.Transition,o([Hn,Lo,jt,Pt],I)}function I(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(O,Y,te,oe){O!==Y&&X(O>te)&&(T(),R(g(K(),O>te),!0)),a(bi),s(Tn,Y,te,O),S.start(Y,function(){a(ui),s(xi,Y,te,O),oe&&oe()})}function b(O){R(H(O,!0))}function R(O,Y){if(!e.is(qi)){var te=Y?O:V(O);rn($,"transform","translate"+m("X")+"("+te+"px)"),O!==te&&s(vs)}}function V(O){if(e.is(wi)){var Y=_(O),te=Y>t.Controller.getEnd(),oe=Y<0;(oe||te)&&(O=g(O,te))}return O}function g(O,Y){var te=O-k(Y),oe=x();return O-=f(oe*(Ri(Kt(te)/oe)||1))*(Y?1:-1),O}function T(){R(K(),!0),S.cancel()}function _(O){for(var Y=t.Slides.get(),te=0,oe=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,h=Kt(H(ae,!0)-O);if(h<=oe)oe=h,te=ae;else break}return te}function H(O,Y){var te=f(u(O-1)-j(O));return Y?se(te):te}function K(){var O=m("left");return Yt($)[O]-Yt(C)[O]+f(p(!1))}function se(O){return n.trimSpace&&e.is(mi)&&(O=oi(O,0,f(x(!0)-w()))),O}function j(O){var Y=n.focus;return Y==="center"?(w()-l(O,!0))/2:+Y*l(O)||0}function k(O){return H(O?t.Controller.getEnd():0,!!n.trimSpace)}function X(O){var Y=f(g(K(),O));return O?Y>=0:Y<=$[m("scrollWidth")]-Yt(C)[m("width")]}function q(O,Y){Y=Oi(Y)?K():Y;var te=O!==!0&&f(Y)<f(k(!1)),oe=O!==!1&&f(Y)>f(k(!0));return te||oe}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:T,toIndex:_,toPosition:H,getPosition:K,getLimit:k,exceededLimit:q,reposition:I}}function mc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(wi),f=e.is(mi),E=mt(K,!1),$=mt(K,!0),C=n.start||0,S,M=C,I,W,b;function R(){V(),o([jt,Pt,wo],V),o(Lo,g)}function V(){I=x(!0),W=n.perMove,b=n.perPage,S=X();var h=oi(C,0,v?S:I-1);h!==C&&(C=h,a.reposition())}function g(){S!==X()&&s(wo)}function T(h,ie,he){if(!ae()){var fe=H(h),We=k(fe);We>-1&&(ie||We!==C)&&(te(We),a.move(fe,We,M,he))}}function _(h,ie,he,fe){t.Scroll.scroll(h,ie,he,function(){var We=k(a.toIndex(d()));te(v?Wn(We,S):We),fe&&fe()})}function H(h){var ie=C;if(Mn(h)){var he=h.match(/([+\-<>])(\d+)?/)||[],fe=he[1],We=he[2];fe==="+"||fe==="-"?ie=se(C+ +(""+fe+(+We||1)),C):fe===">"?ie=We?q(+We):E(!0):fe==="<"&&(ie=$(!0))}else ie=m?h:oi(h,0,S);return ie}function K(h,ie){var he=W||(F()?1:b),fe=se(C+he*(h?-1:1),C,!(W||F()));return fe===-1&&f&&!is(d(),l(!h),1)?h?0:S:ie?fe:k(fe)}function se(h,ie,he){if(w()||F()){var fe=j(h);fe!==h&&(ie=h,h=fe,he=!1),h<0||h>S?!W&&(uo(0,h,ie,!0)||uo(S,ie,h,!0))?h=q(O(h)):m?h=he?h<0?-(I%b||b):I:h:n.rewind?h=h<0?S:0:h=-1:he&&h!==ie&&(h=q(O(ie)+(h<ie?-1:1)))}else h=-1;return h}function j(h){if(f&&n.trimSpace==="move"&&h!==C)for(var ie=d();ie===p(h,!0)&&uo(h,0,e.length-1,!n.rewind);)h<C?--h:++h;return h}function k(h){return m?(h+I)%I||0:h}function X(){for(var h=I-(F()||m&&W?1:b);v&&h-- >0;)if(p(I-1,!0)!==p(h,!0)){h++;break}return oi(h,0,I-1)}function q(h){return oi(F()?h:b*h,0,S)}function O(h){return F()?Wn(h,S):xo((h>=S?I-1:h)/b)}function Y(h){var ie=a.toIndex(h);return f?oi(ie,0,S):ie}function te(h){h!==C&&(M=C,C=h)}function oe(h){return h?M:C}function F(){return!Oi(n.focus)||n.isNavigation}function ae(){return e.state.is([bi,Hi])&&!!n.waitForTransition}return{mount:R,go:T,scroll:_,getNext:E,getPrev:$,getAdjacent:K,getEnd:X,setIndex:te,getIndex:oe,toIndex:q,toPage:O,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Xi=40;function fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,f=p.next,E,$,C={};function S(){I(),o(jt,M)}function M(){W(),S()}function I(){var _=n.arrows;_&&!(m&&f)&&V(),m&&f&&(Ai(C,{prev:m,next:f}),_i(v,_?"":"none"),dn(v,$=kr+"--"+n.direction),_&&(b(),T(),je([m,f],Di,x.id),a(ps,m,f)))}function W(){i.destroy(),xn(v,$),E?(Xn(w?[m,f]:v),m=f=null):un([m,f],Rr)}function b(){o([Hn,xi,Pt,Jn,wo],T),s(f,"click",mt(R,">")),s(m,"click",mt(R,"<"))}function R(_){u.go(_,!0)}function V(){v=w||li("div",d.arrows),m=g(!0),f=g(!1),E=!0,ji(v,[m,f]),!w&&xr(v,x)}function g(_){var H='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Xi+" "+Xi+'" width="'+Xi+'" height="'+Xi+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function T(){if(m&&f){var _=e.index,H=u.getPrev(),K=u.getNext(),se=H>-1&&_<H?l.last:l.prev,j=K>-1&&_>K?l.first:l.next;m.disabled=H<0,f.disabled=K<0,je(m,Jt,se),je(f,Jt,j),a(ms,m,f,H,K)}}return{arrows:C,mount:S,destroy:W,update:T}}var yc=Sr+"-interval";function vc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=Po(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,f,E=v==="pause";function $(){v&&(C(),x&&je(x,Di,p.track.id),E||S(),W())}function C(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",I()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){f=V.type==="focusin",I()}),x&&s(x,"click",function(){E?S():M(!0)}),o([Tn,Eo,Pt],d.rewind),o(Tn,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=m=E=!1,W(),a(Er))}function M(V){V===void 0&&(V=!0),E=!!V,W(),l()||(d.pause(),a(Pr))}function I(){E||(m||f?M(!1):S())}function W(){x&&(bn(x,Yn,!E),je(x,Jt,n.i18n[E?"play":"pause"]))}function b(V){var g=p.bar;g&&rn(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+an(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Ir,mt(d,!0)),o([Hn,jt,Pt],mt(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=zi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),_i(p,l?"none":"")}return{mount:s,destroy:mt(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(mi),v,m,f=1;function E(){o(Tn,M),o([jt,Pt],I)}function $(b,R,V,g,T){var _=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),K=sr(b)*H*xo(Kt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+K}var se=is(_,b,1);f=1,R=se?0:R||bo(Kt(b-_)/$c,Cc),m=g,v=Po(R,C,mt(S,_,b,T),1),a(Hi),s(Eo),v.start()}function C(){a(ui),m&&m(),s(Jn)}function S(b,R,V,g){var T=l(),_=b+(R-b)*W(g),H=(_-T)*f;w(T+H),x&&!V&&u()&&(f*=Sc,Kt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function I(){v&&!v.isPaused()&&(M(),C())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:E,destroy:M,scroll:$,cancel:I}}var ri={passive:!1,capture:!0};function Lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,f=m.resolve,E=m.orient,$=p.getPosition,C=p.exceededLimit,S,M,I,W,b,R=!1,V,g,T;function _(){a(x,Vo,rr,ri),a(x,Do,rr,ri),a(x,_s,K,ri),a(x,"click",k,{capture:!0}),a(x,"dragstart",vn),o([Hn,jt],H)}function H(){var U=n.drag;le(!U),W=U==="free"}function K(U){if(V=!1,!g){var B=We(U);fe(U.target)&&(B||!U.button)&&(w.isBusy()?vn(U,!0):(T=B?x:window,b=l.is([bi,Hi]),I=null,a(T,Vo,se,ri),a(T,Do,j,ri),p.cancel(),u.cancel(),X(U)))}}function se(U){if(l.is(lo)||(l.set(lo),s(cs)),U.cancelable)if(b){p.translate(S+he(F(U)));var B=ae(U)>oa,N=R!==(R=C());(B||N)&&X(U),V=!0,s(ds),vn(U)}else Y(U)&&(b=O(U),vn(U))}function j(U){l.is(lo)&&(l.set(ui),s(us)),b&&(q(U),vn(U)),d(T,Vo,se),d(T,Do,j),b=!1}function k(U){!g&&V&&vn(U,!0)}function X(U){I=M,M=U,S=$()}function q(U){var B=te(U),N=oe(B),me=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(qi)?w.go(E(sr(B))<0?me?"<":"-":me?">":"+"):e.is(mi)&&R&&me?w.go(C(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function O(U){var B=n.dragMinThreshold,N=Ei(B),me=N&&B.mouse||0,we=(N?B.touch:+B)||10;return Kt(F(U))>(We(U)?we:me)}function Y(U){return Kt(F(U))>Kt(F(U,!0))}function te(U){if(e.is(wi)||!R){var B=ae(U);if(B&&B<oa)return F(U)/B}return 0}function oe(U){return $()+sr(U)*Wn(Kt(U)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(U,B){return ie(U,B)-ie(h(U),B)}function ae(U){return ar(U)-ar(h(U))}function h(U){return M===U&&I||M}function ie(U,B){return(We(U)?U.changedTouches[0]:U)["page"+f(B?"Y":"X")]}function he(U){return U/(R&&e.is(mi)?rc:1)}function fe(U){var B=n.noDrag;return!Pi(U,"."+Ls+", ."+Mo)&&(!B||!Pi(U,B))}function We(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function Z(){return b}function le(U){g=U}return{mount:_,disable:le,isDragging:Z}}var Ec={Spacebar:" ",Right:_o,Left:Ao,Up:bs,Down:xs};function Mr(e){return e=Mn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(jt,v),o(jt,x),o(Tn,f)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,E))}function v(){a(p,ra)}function m($){u=$}function f(){var $=u;u=!0,Ya(function(){u=$})}function E($){if(!u){var C=Mr($);C===l(Ao)?e.go("<"):C===l(_o)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var Ti=Sr+"-lazy",po=Ti+"-srcset",Ic="["+Ti+"], ["+po+"]";function Ac(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[xi,Jn],u=[];function w(){n.lazyLoad&&(x(),o(Pt,x))}function x(){Cn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(C){wr(C.slide,Ic).forEach(function(S){var M=an(S,Ti),I=an(S,po);if(M!==S.src||I!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=zi(b,"."+W)||li("span",W,b);u.push([S,C,R]),S.src||_i(S,"none")}})})}function m(){u=u.filter(function(C){var S=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,S)?f(C):!0}),u.length||s(p)}function f(C){var S=C[0];dn(C[1].slide,ur),a(S,"load error",mt(E,C)),je(S,"src",an(S,Ti)),je(S,"srcset",an(S,po)),un(S,Ti),un(S,po)}function E(C,S){var M=C[0],I=C[1];xn(I.slide,ur),S.type!=="error"&&(Xn(C[2]),_i(M,""),d(Ir,M,I),d(pi)),l&&$()}function $(){u.length&&f(u.shift())}return{mount:w,destroy:mt(Cn,u),check:m}}function _c(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,f=[],E,$;function C(){S(),o([jt,Pt,wo],C);var g=n.pagination;m&&_i(m,g?"":"none"),g&&(o([Tn,Eo,Jn],V),M(),V(),s(gs,{list:E,items:f},R(e.index)))}function S(){E&&(Xn(m?Nn(E.children):E),xn(E,$),Cn(f),E=null),i.destroy()}function M(){var g=e.length,T=n.classes,_=n.i18n,H=n.perPage,K=u()?p.getEnd()+1:Ri(g/H);E=m||li("ul",T.pagination,l.track.parentElement),dn(E,$=Wo+"--"+b()),je(E,wn,"tablist"),je(E,Jt,_.select),je(E,_r,b()===Ro?"vertical":"");for(var se=0;se<K;se++){var j=li("li",null,E),k=li("button",{class:T.page,type:"button"},j),X=d.getIn(se).map(function(O){return O.slide.id}),q=!u()&&H>1?_.pageX:_.slideX;a(k,"click",mt(I,se)),n.paginationKeyboard&&a(k,"keydown",mt(W,se)),je(j,wn,"presentation"),je(k,wn,"tab"),je(k,Di,X.join(" ")),je(k,Jt,lr(q,se+1)),je(k,ci,-1),f.push({li:j,button:k,page:se})}}function I(g){x(">"+g,!0)}function W(g,T){var _=f.length,H=Mr(T),K=b(),se=-1;H===v(_o,!1,K)?se=++g%_:H===v(Ao,!1,K)?se=(--g+_)%_:H==="Home"?se=0:H==="End"&&(se=_-1);var j=f[se];j&&(es(j.button),x(">"+se),vn(T,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return f[p.toPage(g)]}function V(){var g=R(w(!0)),T=R(w());if(g){var _=g.button;xn(_,Yn),un(_,Qr),je(_,ci,-1)}if(T){var H=T.button;dn(H,Yn),je(H,Qr,!0),je(H,ci,"")}s(hs,{list:E,items:f},g,T)}return{items:f,mount:C,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),Cn(s)}function l(){d(),a()}function p(m,f){var E=wt(m);E.on(Tn,function($,C,S){f.go(f.is(wi)?S:$)}),s.push(E)}function u(){var m=wt(e),f=m.on;f(Cr,x),f(ys,v),f([Hn,jt],w),s.push(m),m.emit(Lr,e.splides)}function w(){je(t.Elements.list,_r,n.direction===Ro?"vertical":"")}function x(m){e.go(m.index)}function v(m,f){br(Rc,Mr(f))&&(x(m),vn(f))}return{setup:mt(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ri)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=ar(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Kt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&vn(p)}}function l(p){return!n.releaseWheel||e.state.is(bi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=li("span",ec),l=Po(Wc,mt(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),je(s,na,!0),d.textContent="…",o(Er,mt(x,!0)),o(Pr,mt(x,!1)),o([xi,Jn],mt(u,!0)))}function u(v){je(s,ta,v),v?(ji(s,d),l.start()):(Xn(d),l.cancel())}function w(){un(s,[ea,na,ta]),Xn(d)}function x(v){a&&je(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:Ac,Pagination:_c,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Oc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bc(e,t,n){var i=t.Slides;function o(){wt(e).on([Hn,Pt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:rr}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=mt(rn,a,"transition"),l;function p(){wt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var f=i.toPosition(v,!0),E=i.getPosition(),$=x(v);Kt(f-E)>=1&&$>=1?n.useScroll?s.scroll(f,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(f,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(mi)&&m){var f=o.getIndex(!0),E=o.getEnd();if(f===0&&v>=E||f>=E&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Vl(si),this.splides=[],this._o={},this._E={};var o=Mn(n)?ns(document,n):n;Ci(o,o+" is invalid."),this.root=o,i=kn({label:an(o,Jt)||"",labelledby:an(o,Ar)||""},Oc,e.defaults,i||{});try{kn(i,JSON.parse(an(o,Sr)))}catch{Ci(!1,"Invalid JSON")}this._o=Object.create(kn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ci(a.is([si,vo]),"Already mounted!"),a.set(si),this._C=d,this._T=o||this._T||(this.is(qi)?Bc:jc),this._E=i||this._E;var l=Ai({},Nc,this._E,{Transition:this._T});return Gn(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Gn(d,function(p){p.mount&&p.mount()}),this.emit(Hn),dn(this.root,tc),a.set(ui),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ui)&&(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(Nn(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(Pt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(si)?wt(this).on(cr,this.destroy.bind(this,i)):(Gn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Tr),o.destroy(),i&&Cn(this.splides),s.set(vo)),this},Hl(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})(),Wr=zc;Wr.defaults={};Wr.STATES=Bl;var aa=[[Hn,"onMounted"],[cr,"onReady"],[Tn,"onMove"],[xi,"onMoved"],[Cr,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[Pt,"onRefresh"],[jt,"onUpdated"],[pi,"onResize"],[Lo,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Eo,"onScroll"],[Jn,"onScrolled"],[Tr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Lr,"onNavigationMounted"],[Er,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Pr,"onAutoplayPause"],[Ir,"onLazyLoadLoaded"]];function Fr(...e){return e.filter(Boolean).join(" ")}function So(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(So(e)&&So(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function mr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():So(i)?n[o]=mr(So(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Fr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Nr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Vc(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){aa.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return c.createElement(t,{className:Fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Hr=({children:e,className:t,...n})=>c.createElement("li",{className:Fr("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 Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Wo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Jt(e){const{color:t,...n}=e;return n}function _t(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Wo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:L.scalingValue(e.letterSpacing,t),wordSpacing:L.scalingValue(e.wordSpacing,t),fontSize:L.scalingValue(n,t),lineHeight:i!==void 0?L.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const gi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(e){return{...e.fontFamily&&{fontFamily:Wo(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 Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Ge(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ge(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Se.topLeftAlignment,"top-center":Se.topCenterAlignment,"top-right":Se.topRightAlignment,"middle-left":Se.middleLeftAlignment,"middle-center":Se.middleCenterAlignment,"middle-right":Se.middleRightAlignment,"bottom-left":Se.bottomLeftAlignment,"bottom-center":Se.bottomCenterAlignment,"bottom-right":Se.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,f]=c.useState(void 0),[E,$]=c.useState(null),[C,S]=c.useState(0),[M,P]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:T}=e,_=c.useRef(b.type),{x:H,y:K}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!E)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;f({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(E),()=>j.unobserve(E)},[E]),c.useEffect(()=>{!o||_.current===b.type||(P(j=>j+1),_.current=b.type)},[b.type]),r.jsx("div",{className:Ge(Se.wrapper,{[Se.editor]:i}),ref:$,children:r.jsxs("div",{className:Se.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ge(Se.captionBlock),children:r.jsx("div",{className:Se.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Ge(Se.captionText,ed[g.alignment],{[Se.withPointerEvents]:k===C&&i,[Se.active]:k===C}),style:{fontFamily:Wo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":L.scalingValue(a.width,i),letterSpacing:L.scalingValue(l,i),wordSpacing:L.scalingValue(u,i),textAlign:p,fontSize:L.scalingValue(w.fontSize,i),lineHeight:L.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Se.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:L.scalingValue(g.offset.y,i),left:L.scalingValue(g.offset.x,i)},children:r.jsx(gi,{content:j.imageCaption})})},k))})}),r.jsx(Fr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Nr,{children:r.jsx("div",{className:Se.sliderItem,children:r.jsx("div",{className:Se.imgWrapper,children:r.jsx("img",{className:Ge(Se.sliderImage,{[Se.contain]:j.image.objectFit==="contain",[Se.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(Se.arrow,{[Se.arrowVertical]:W==="vert",[Se.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Se.arrowInner,style:{transform:`translate(${L.scalingValue(H,i)}, ${L.scalingValue(K*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ge(Se.arrowImg,Se.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Se.arrowIcon,Se.arrowImg,Se.mirror)})]})}),r.jsx("div",{className:Ge(Se.arrow,Se.nextArrow,{[Se.arrowVertical]:W==="vert",[Se.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Se.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${L.scalingValue(H*(W==="horiz"?-1:1),i)}, ${L.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Se.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Se.arrowIcon,Se.arrowImg)})]})})]}),T.triggersList.click&&r.jsx("div",{className:Se.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Ge(Se.pagination,{[Se.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Se.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Se.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Se.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Se.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Se.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Se.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Se.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Se.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Se.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${L.scalingValue(V.offset.x,i)}, ${L.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Ge(Se.paginationItem),children:r.jsx("div",{className:Ge(Se.dot,{[Se.activeDot]:k===C}),style:{backgroundColor:k===C?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nd={element:td,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"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",ti={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Do(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await Do(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await Do(e);s=a.height/a.width*o}else{const a=await Do(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,f]=c.useState("none"),E=c.useRef({x:0,y:0}),[$,C]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:P}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:T,hoverCursorScale:_,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,B)=>{const Y=i.getBoundingClientRect(),ne=q-Y.left,oe=B-Y.top;if(w({x:ne,y:oe}),R==="system"){f("none"),v(1);return}const F=ne,ae=oe,h=document.elementFromPoint(Y.left+F,Y.top+ae);if(h&&h.closest("a")){f("none"),v(1);return}const ie=ca(F,ae,s)||V==="area"?{img:H??"none",scale:_}:{img:T??"none",scale:g};f(ie.img),v(ie.scale)},k=q=>{q.stopPropagation(),E.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(E.current.x,E.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,T,_,g,s]),c.useEffect(()=>{$||(f("none"),v(0))},[$]);const K=async(j,k,X,q={})=>{const{width:B,height:Y,finalWidth:ne}=await sd(j.image.url,S,M,P);let oe=0,F=0;W==="same"?(oe=k/2,F=X/2):(oe=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(oe,B/2),k-B/2),h=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:h,width:ne}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],ne=await K(Y,k,X);q.push(ne),a(q),l(1)})()},[S,M,P,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let B=0,Y=0;W==="on Click"?(B=X,Y=q):W==="same"?(B=k.width/2,Y=k.height/2):(B=Math.random()*k.width,Y=Math.random()*k.height);const ne=t[d],oe=await K(ne,k.width,k.height,{x:B,y:Y});a(F=>b==="all"?[...F,oe]:[oe]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:ti.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:ti.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:ti.link,children:r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)},j.id)),$&&r.jsx("div",{className:ti.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",Ad="LightBox-module__thumbsContainerVertical___wttk5",_d="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Bd="LightBox-module__slideInRight___S-pPp",Od="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",ue={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:Ad,thumbsContainer:_d,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Bd,slideInTop:Od,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Xi=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), calc(-50% + ${L.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${L.scalingValue(t.x,n)}, calc(-50% + ${L.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), ${L.scalingValue(t.y,n)})`:i.transform=`translate(${L.scalingValue(t.x,n)}, ${L.scalingValue(t.y,n)})`,i};function Rs(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 da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return ue.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ue.fadeIn;if(e==="slide in")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ue.fadeOut;if(e==="slide in")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})(),s=(()=>{if(e==="fade in")return ue.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:ue.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var We;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:f}=i.imageCaption??{},[E,$]=c.useState(0),[C,S]=c.useState(0),[M,P]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),T=c.useRef(null),_=c.useRef(null),H=c.useRef(!1),K=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[B,Y]=c.useState(!1),{appear:ne,triggers:oe,slider:F,thumbnail:ae,controls:h,area:ie,caption:ge,layout:he}=o.lightboxBlock,{appearClass:Me,backdropAppearClass:Z,backdropDisappearClass:le,disappearClass:U}=Gd(ne.type,ne.direction),O=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var I,J;(J=(I=g.current)==null?void 0:I.splide)==null||J.refresh()},16)},de=()=>{S(I=>I+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",de),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",de)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const de=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};de();const I=new ResizeObserver(de);return I.observe(z),()=>I.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,de=pa(ie.color);z&&!a&&de>.9&&(document.body.style.backgroundColor=""),P(!0),H.current=!0;const I=J=>{J.target===K.current&&J.animationName&&(K.current&&se.current&&K.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),P(!1))};K.current&&(se.current=I,K.current.addEventListener("animationend",I))},[t,ie.color,a]),pe=(z,de,I)=>{var J,D;if(z){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&E===n.length-1?N():(J=g.current)==null||J.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const Q=z.getBoundingClientRect(),me=de-Q.left,be=I-Q.top,De=Q.width,$e=Q.height;let Ae;F.direction==="horiz"?Ae=me<De/2?"-1":"+1":Ae=be<$e/2?"-1":"+1",(D=g.current)==null||D.go(Ae)}}},we=z=>{if(X.current){X.current=!1;return}const de=n[E],I=(de==null?void 0:de.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let Q;if(I&&_.current){const me=ua(_.current);Q=J>=me.left&&J<=me.right&&D>=me.top&&D<=me.bottom}else{const me=_.current?da(_.current):null;if(!me){z.target===z.currentTarget&&N();return}Q=J>=me.x&&J<=me.x+me.width&&D>=me.y&&D<=me.y+me.height}Q?pe(_.current,J,D):N()},Ne=z=>{const de=z.target;(de.classList.contains(ue.thumbsWrapper)||de.classList.contains(ue.thumbsContainer))&&we(z)};c.useEffect(()=>{if(!e)return;const z=de=>{var I,J;if(de.key==="Escape"){N();return}if(de.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(I=g.current)==null||I.go("+1");return}de.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(de=>de+1),H.current=!1,P(!1),b(!1),V({}),!O)return;const z=new CustomEvent("page-overlay",{detail:{itemId:O}});window.dispatchEvent(z)}return()=>{K.current&&se.current&&(K.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,O]),c.useEffect(()=>{T.current!==null&&T.current!==F.type&&S(z=>z+1),T.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,de=window.matchMedia("(max-width: 768px)").matches,I=pa(ie.color);document.body.style.overflow="hidden",b(!1);const J=Q=>{Q.target===K.current&&!H.current&&Q.animationName&&(de&&!a&&I>.9&&(document.body.style.backgroundColor=ie.color),b(!0),K.current&&j.current&&K.current.removeEventListener("animationend",j.current),j.current=null)};K.current&&(j.current=J,K.current.addEventListener("animationend",J));const D=Q=>{const me=Q.target;me&&(me.closest(`.${ue.thumbsWrapper}`)||me.closest(`.${ue.thumbsContainer}`))||F.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),K.current&&j.current&&(K.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,ie.color,F.type]),c.useEffect(()=>{if(!e)return;const z=de=>{var J,D;if(H.current){de.stopPropagation();return}if(X.current){X.current=!1;return}const I=de.target;if(!(I&&(I.closest(`.${ue.thumbsContainer}`)||I.closest(`.${ue.thumbItem}`)||I.closest(`.${ue.arrow}`)||I.closest(`.${ue.closeButton}`)||I.closest(`.${ue.caption}`)))){if(F.type==="slide"&&oe.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const Q=g.current.splide.root;if(I&&(Q.contains(I)||Q===I))return}if(de.touches.length===0&&de.changedTouches.length>0){const Q=n[E],me=(Q==null?void 0:Q.image.objectFit)==="cover",be=de.changedTouches[0];let De;if(me&&_.current){const $e=ua(_.current);De=be.clientX>=$e.left&&be.clientX<=$e.right&&be.clientY>=$e.top&&be.clientY<=$e.bottom}else{const $e=_.current?da(_.current):null;if(!$e)return;De=be.clientX>=$e.x&&be.clientX<=$e.x+$e.width&&be.clientY>=$e.y&&be.clientY<=$e.y+$e.height}if(!De){de.stopPropagation(),H.current=!0;const $e=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),document.removeEventListener("click",$e,!0)};document.addEventListener("click",$e,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,E,n]);const Ie=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&oe.type==="drag";c.useEffect(()=>{var Ae,Ue;if(!e||!Ie||!((Ue=(Ae=g.current)==null?void 0:Ae.splide)!=null&&Ue.root))return;const z=g.current.splide.root,de=30,I=(ce,Re)=>{if(k.current){const ze=Math.abs(ce-k.current.x),Ce=Math.abs(Re-k.current.y);(ze>0||Ce>0)&&(X.current=!0)}},J=ce=>{k.current&&(ce.preventDefault(),I(ce.clientX,ce.clientY))},D=ce=>{k.current&&ce.touches.length>0&&(ce.preventDefault(),I(ce.touches[0].clientX,ce.touches[0].clientY))},Q=(ce,Re)=>{if(!k.current||!g.current){k.current=null;return}const ze=Math.abs(ce-k.current.x),Ce=Math.abs(Re-k.current.y);Ce>de&&Ce>ze&&g.current.go(Re<k.current.y?"+1":"-1"),k.current=null},me=ce=>{k.current&&Q(ce.clientX,ce.clientY),document.removeEventListener("pointerup",me),document.removeEventListener("pointercancel",me),document.removeEventListener("pointermove",J)},be=ce=>{if(k.current){if(ce.changedTouches.length>0){const Re=ce.changedTouches[0];Q(Re.clientX,Re.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",D)}},De=ce=>{k.current={x:ce.clientX,y:ce.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",me),document.addEventListener("pointercancel",me)},$e=ce=>{ce.touches.length>0&&(k.current={x:ce.touches[0].clientX,y:ce.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",$e),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",$e),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",me),document.removeEventListener("pointercancel",me),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),k.current=null,X.current=!1}},[e,Ie,C]);const ve={backgroundColor:ie.color,backdropFilter:`blur(${ie.blur}px)`,animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:K,className:Ge(ue.background,M?le:Z,{[ue.editor]:a},{[ue.hidden]:!e}),style:{...ve,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?K:null,className:Ge(ue.contentStyle,M?U:Me,{[ue.editor]:a},{[ue.hidden]:!e}),style:{animationDuration:`${parseInt(ne.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Fr,{onMove:z=>$(z.index),ref:g,className:ue.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!Ie,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,de)=>{const I=Xi(he.position,he.offset,a),J=`${L.scalingValue(he.padding.top,a)} ${L.scalingValue(he.padding.right,a)} ${L.scalingValue(he.padding.bottom,a)} ${L.scalingValue(he.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:Q,...me}=I;return{...me,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Q||"none"}})():{...I,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Nr,{children:r.jsx("div",{className:ue.imgWrapper,onClick:we,children:r.jsx("img",{ref:de===E?_:null,className:Ge(ue.imageStyle,{[ue.contain]:z.image.objectFit==="contain",[ue.cover]:z.image.objectFit==="cover",[ue.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},de)})},C),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(ue.arrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x,a)}, ${L.scalingValue(h.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ge(ue.arrowImg,ue.mirror)}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Ge(ue.arrowIcon,ue.arrowImg,ue.mirror)})]})}),r.jsx("div",{className:Ge(ue.arrow,ue.nextArrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x*(F.direction==="horiz"?-1:1),a)}, ${L.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ue.arrowImg}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Ge(ue.arrowIcon,ue.arrowImg)})]})})]}),ie.closeIconUrl&&(()=>{const z=Xi(ie.closeIconAlign,ie.closeIconOffset,a),de=`scale(${ie.closeIconScale})`,I=z.transform?`${z.transform} ${de}`:de;return r.jsx("button",{className:ue.closeButton,style:{...z,transform:I},onClick:N,"aria-label":"Close lightbox",children:r.jsx(sn,{url:ie.closeIconUrl,fill:ie.closeIconColor??"#000000",hoverFill:ie.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&i.imageCaption&&((We=n[E])==null?void 0:We.imageCaption)&&r.jsx("div",{className:ue.caption,style:{...Xi(ge.alignment,ge.offset,a),fontFamily:Wo(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":L.scalingValue(l.width,a),letterSpacing:L.scalingValue(u,a),wordSpacing:L.scalingValue(x,a),textAlign:w,fontSize:L.scalingValue(v.fontSize,a),lineHeight:L.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:f},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ue.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:r.jsx(gi,{content:n[E].imageCaption})})}),ae.isActive&&(()=>{const[z,de]=ae.position.split("-"),I=F.direction==="horiz"?`${z}-left`:ae.position,J=Xi(I,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(de==="left")return"flex-start";if(de==="center")return"center";if(de==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:ue.thumbsWrapper,onClick:Q=>Ne(Q),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ge(ue.thumbsContainer,{[ue.thumbsContainerVertical]:F.direction==="vert",[ue.thumbsAlignStart]:ae.align==="start",[ue.thumbsAlignCenter]:ae.align==="center",[ue.thumbsAlignEnd]:ae.align==="end"}),style:{gap:L.scalingValue(ae.grid.gap,a),justifyContent:B?"flex-start":D()},children:n.map((Q,me)=>{const be=me===E,De=R[me],Ae=ae.grid.size*(be?ae.activeState.scale:1),Ue=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:L.scalingValue(Ae,a)}:{width:L.scalingValue(Ae,a)};const ce=De.width/De.height;if(F.direction==="horiz"){const Re=Ae,ze=Re*ce;return{width:L.scalingValue(ze,a),height:L.scalingValue(Re,a)}}else{const Re=Ae,ze=Re/ce;return{width:L.scalingValue(Re,a),height:L.scalingValue(ze,a)}}};return r.jsx("button",{className:ue.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:L.scalingValue(Ae,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:L.scalingValue(Ae,a)}:{},...ae.fit==="cover"?{width:L.scalingValue(Ae,a),height:L.scalingValue(Ae,a)}:{},...Ue(),transition:be?"all 0.25s ease-out":"none",opacity:be?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:ce=>{var Re;ce.stopPropagation(),$(me),(Re=g.current)==null||Re.go(me)},onMouseEnter:()=>{var ce;ae.triggers==="hov"&&((ce=g.current)==null||ce.go(me))},children:r.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:ce=>{const Re=ce.currentTarget;Re.naturalWidth&&Re.naturalHeight&&V(ze=>({...ze,[me]:{width:Re.naturalWidth,height:Re.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${me}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Jd={element:Xd,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 Yi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(e){return`
|
|
6
|
+
*/const Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Fo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Zt(e){const{color:t,...n}=e;return n}function _t(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Fo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:L.scalingValue(e.letterSpacing,t),wordSpacing:L.scalingValue(e.wordSpacing,t),fontSize:L.scalingValue(n,t),lineHeight:i!==void 0?L.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const gi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(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 Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Xe(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Xe(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Ee.topLeftAlignment,"top-center":Ee.topCenterAlignment,"top-right":Ee.topRightAlignment,"middle-left":Ee.middleLeftAlignment,"middle-center":Ee.middleCenterAlignment,"middle-right":Ee.middleRightAlignment,"bottom-left":Ee.bottomLeftAlignment,"bottom-center":Ee.bottomCenterAlignment,"bottom-right":Ee.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,f]=c.useState(void 0),[E,$]=c.useState(null),[C,S]=c.useState(0),[M,I]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:T}=e,_=c.useRef(b.type),{x:H,y:K}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!E)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;f({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(E),()=>j.unobserve(E)},[E]),c.useEffect(()=>{!o||_.current===b.type||(I(j=>j+1),_.current=b.type)},[b.type]),r.jsx("div",{className:Xe(Ee.wrapper,{[Ee.editor]:i}),ref:$,children:r.jsxs("div",{className:Ee.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Xe(Ee.captionBlock),children:r.jsx("div",{className:Ee.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Xe(Ee.captionText,ed[g.alignment],{[Ee.withPointerEvents]:k===C&&i,[Ee.active]:k===C}),style:{fontFamily:Fo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":L.scalingValue(a.width,i),letterSpacing:L.scalingValue(l,i),wordSpacing:L.scalingValue(u,i),textAlign:p,fontSize:L.scalingValue(w.fontSize,i),lineHeight:L.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Ee.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:L.scalingValue(g.offset.y,i),left:L.scalingValue(g.offset.x,i)},children:r.jsx(gi,{content:j.imageCaption})})},k))})}),r.jsx(Nr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Hr,{children:r.jsx("div",{className:Ee.sliderItem,children:r.jsx("div",{className:Ee.imgWrapper,children:r.jsx("img",{className:Xe(Ee.sliderImage,{[Ee.contain]:j.image.objectFit==="contain",[Ee.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(Ee.arrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Ee.arrowInner,style:{transform:`translate(${L.scalingValue(H,i)}, ${L.scalingValue(K*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Xe(Ee.arrowImg,Ee.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Xe(Ee.arrowIcon,Ee.arrowImg,Ee.mirror)})]})}),r.jsx("div",{className:Xe(Ee.arrow,Ee.nextArrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Ee.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${L.scalingValue(H*(W==="horiz"?-1:1),i)}, ${L.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ee.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Xe(Ee.arrowIcon,Ee.arrowImg)})]})})]}),T.triggersList.click&&r.jsx("div",{className:Ee.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Xe(Ee.pagination,{[Ee.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Ee.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Ee.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Ee.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Ee.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Ee.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Ee.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Ee.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Ee.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Ee.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${L.scalingValue(V.offset.x,i)}, ${L.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Xe(Ee.paginationItem),children:r.jsx("div",{className:Xe(Ee.dot,{[Ee.activeDot]:k===C}),style:{backgroundColor:k===C?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nd={element:td,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"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",ti={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await qo(e);s=a.height/a.width*o}else{const a=await qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,f]=c.useState("none"),E=c.useRef({x:0,y:0}),[$,C]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:I}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:T,hoverCursorScale:_,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,O)=>{const Y=i.getBoundingClientRect(),te=q-Y.left,oe=O-Y.top;if(w({x:te,y:oe}),R==="system"){f("none"),v(1);return}const F=te,ae=oe,h=document.elementFromPoint(Y.left+F,Y.top+ae);if(h&&h.closest("a")){f("none"),v(1);return}const ie=ca(F,ae,s)||V==="area"?{img:H??"none",scale:_}:{img:T??"none",scale:g};f(ie.img),v(ie.scale)},k=q=>{q.stopPropagation(),E.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(E.current.x,E.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,T,_,g,s]),c.useEffect(()=>{$||(f("none"),v(0))},[$]);const K=async(j,k,X,q={})=>{const{width:O,height:Y,finalWidth:te}=await sd(j.image.url,S,M,I);let oe=0,F=0;W==="same"?(oe=k/2,F=X/2):(oe=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(oe,O/2),k-O/2),h=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:h,width:te}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],te=await K(Y,k,X);q.push(te),a(q),l(1)})()},[S,M,I,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let O=0,Y=0;W==="on Click"?(O=X,Y=q):W==="same"?(O=k.width/2,Y=k.height/2):(O=Math.random()*k.width,Y=Math.random()*k.height);const te=t[d],oe=await K(te,k.width,k.height,{x:O,y:Y});a(F=>b==="all"?[...F,oe]:[oe]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:ti.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:ti.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:ti.link,children:r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)},j.id)),$&&r.jsx("div",{className:ti.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",Ad="LightBox-module__thumbsContainerVertical___wttk5",_d="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Od="LightBox-module__slideInRight___S-pPp",Bd="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",ue={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:Ad,thumbsContainer:_d,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Od,slideInTop:Bd,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Yi=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), calc(-50% + ${L.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${L.scalingValue(t.x,n)}, calc(-50% + ${L.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), ${L.scalingValue(t.y,n)})`:i.transform=`translate(${L.scalingValue(t.x,n)}, ${L.scalingValue(t.y,n)})`,i};function Rs(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 da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return ue.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ue.fadeIn;if(e==="slide in")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ue.fadeOut;if(e==="slide in")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})(),s=(()=>{if(e==="fade in")return ue.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:ue.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Fe;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:f}=i.imageCaption??{},[E,$]=c.useState(0),[C,S]=c.useState(0),[M,I]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),T=c.useRef(null),_=c.useRef(null),H=c.useRef(!1),K=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[O,Y]=c.useState(!1),{appear:te,triggers:oe,slider:F,thumbnail:ae,controls:h,area:ie,caption:he,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:Z,backdropDisappearClass:le,disappearClass:U}=Gd(te.type,te.direction),B=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var A,J;(J=(A=g.current)==null?void 0:A.splide)==null||J.refresh()},16)},de=()=>{S(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",de),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",de)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const de=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};de();const A=new ResizeObserver(de);return A.observe(z),()=>A.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,de=pa(ie.color);z&&!a&&de>.9&&(document.body.style.backgroundColor=""),I(!0),H.current=!0;const A=J=>{J.target===K.current&&J.animationName&&(K.current&&se.current&&K.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),I(!1))};K.current&&(se.current=A,K.current.addEventListener("animationend",A))},[t,ie.color,a]),me=(z,de,A)=>{var J,D;if(z){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&E===n.length-1?N():(J=g.current)==null||J.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const ee=z.getBoundingClientRect(),ge=de-ee.left,be=A-ee.top,De=ee.width,Pe=ee.height;let Re;F.direction==="horiz"?Re=ge<De/2?"-1":"+1":Re=be<Pe/2?"-1":"+1",(D=g.current)==null||D.go(Re)}}},we=z=>{if(X.current){X.current=!1;return}const de=n[E],A=(de==null?void 0:de.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let ee;if(A&&_.current){const ge=ua(_.current);ee=J>=ge.left&&J<=ge.right&&D>=ge.top&&D<=ge.bottom}else{const ge=_.current?da(_.current):null;if(!ge){z.target===z.currentTarget&&N();return}ee=J>=ge.x&&J<=ge.x+ge.width&&D>=ge.y&&D<=ge.y+ge.height}ee?me(_.current,J,D):N()},Oe=z=>{const de=z.target;(de.classList.contains(ue.thumbsWrapper)||de.classList.contains(ue.thumbsContainer))&&we(z)};c.useEffect(()=>{if(!e)return;const z=de=>{var A,J;if(de.key==="Escape"){N();return}if(de.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(A=g.current)==null||A.go("+1");return}de.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(de=>de+1),H.current=!1,I(!1),b(!1),V({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{K.current&&se.current&&(K.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,B]),c.useEffect(()=>{T.current!==null&&T.current!==F.type&&S(z=>z+1),T.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,de=window.matchMedia("(max-width: 768px)").matches,A=pa(ie.color);document.body.style.overflow="hidden",b(!1);const J=ee=>{ee.target===K.current&&!H.current&&ee.animationName&&(de&&!a&&A>.9&&(document.body.style.backgroundColor=ie.color),b(!0),K.current&&j.current&&K.current.removeEventListener("animationend",j.current),j.current=null)};K.current&&(j.current=J,K.current.addEventListener("animationend",J));const D=ee=>{const ge=ee.target;ge&&(ge.closest(`.${ue.thumbsWrapper}`)||ge.closest(`.${ue.thumbsContainer}`))||F.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),K.current&&j.current&&(K.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,ie.color,F.type]),c.useEffect(()=>{if(!e)return;const z=de=>{var J,D;if(H.current){de.stopPropagation();return}if(X.current){X.current=!1;return}const A=de.target;if(!(A&&(A.closest(`.${ue.thumbsContainer}`)||A.closest(`.${ue.thumbItem}`)||A.closest(`.${ue.arrow}`)||A.closest(`.${ue.closeButton}`)||A.closest(`.${ue.caption}`)))){if(F.type==="slide"&&oe.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const ee=g.current.splide.root;if(A&&(ee.contains(A)||ee===A))return}if(de.touches.length===0&&de.changedTouches.length>0){const ee=n[E],ge=(ee==null?void 0:ee.image.objectFit)==="cover",be=de.changedTouches[0];let De;if(ge&&_.current){const Pe=ua(_.current);De=be.clientX>=Pe.left&&be.clientX<=Pe.right&&be.clientY>=Pe.top&&be.clientY<=Pe.bottom}else{const Pe=_.current?da(_.current):null;if(!Pe)return;De=be.clientX>=Pe.x&&be.clientX<=Pe.x+Pe.width&&be.clientY>=Pe.y&&be.clientY<=Pe.y+Pe.height}if(!De){de.stopPropagation(),H.current=!0;const Pe=Re=>{Re.stopPropagation(),Re.preventDefault(),document.removeEventListener("click",Pe,!0)};document.addEventListener("click",Pe,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,E,n]);const _e=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&oe.type==="drag";c.useEffect(()=>{var Re,qe;if(!e||!_e||!((qe=(Re=g.current)==null?void 0:Re.splide)!=null&&qe.root))return;const z=g.current.splide.root,de=30,A=(ce,ke)=>{if(k.current){const ze=Math.abs(ce-k.current.x),Te=Math.abs(ke-k.current.y);(ze>0||Te>0)&&(X.current=!0)}},J=ce=>{k.current&&(ce.preventDefault(),A(ce.clientX,ce.clientY))},D=ce=>{k.current&&ce.touches.length>0&&(ce.preventDefault(),A(ce.touches[0].clientX,ce.touches[0].clientY))},ee=(ce,ke)=>{if(!k.current||!g.current){k.current=null;return}const ze=Math.abs(ce-k.current.x),Te=Math.abs(ke-k.current.y);Te>de&&Te>ze&&g.current.go(ke<k.current.y?"+1":"-1"),k.current=null},ge=ce=>{k.current&&ee(ce.clientX,ce.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",J)},be=ce=>{if(k.current){if(ce.changedTouches.length>0){const ke=ce.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",D)}},De=ce=>{k.current={x:ce.clientX,y:ce.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},Pe=ce=>{ce.touches.length>0&&(k.current={x:ce.touches[0].clientX,y:ce.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",Pe),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",Pe),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),k.current=null,X.current=!1}},[e,_e,C]);const Se={backgroundColor:ie.color,backdropFilter:`blur(${ie.blur}px)`,animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:K,className:Xe(ue.background,M?le:Z,{[ue.editor]:a},{[ue.hidden]:!e}),style:{...Se,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?K:null,className:Xe(ue.contentStyle,M?U:We,{[ue.editor]:a},{[ue.hidden]:!e}),style:{animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Nr,{onMove:z=>$(z.index),ref:g,className:ue.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,de)=>{const A=Yi(fe.position,fe.offset,a),J=`${L.scalingValue(fe.padding.top,a)} ${L.scalingValue(fe.padding.right,a)} ${L.scalingValue(fe.padding.bottom,a)} ${L.scalingValue(fe.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:ee,...ge}=A;return{...ge,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{...A,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Hr,{children:r.jsx("div",{className:ue.imgWrapper,onClick:we,children:r.jsx("img",{ref:de===E?_:null,className:Xe(ue.imageStyle,{[ue.contain]:z.image.objectFit==="contain",[ue.cover]:z.image.objectFit==="cover",[ue.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},de)})},C),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(ue.arrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x,a)}, ${L.scalingValue(h.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Xe(ue.arrowImg,ue.mirror)}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Xe(ue.arrowIcon,ue.arrowImg,ue.mirror)})]})}),r.jsx("div",{className:Xe(ue.arrow,ue.nextArrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x*(F.direction==="horiz"?-1:1),a)}, ${L.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ue.arrowImg}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Xe(ue.arrowIcon,ue.arrowImg)})]})})]}),ie.closeIconUrl&&(()=>{const z=Yi(ie.closeIconAlign,ie.closeIconOffset,a),de=`scale(${ie.closeIconScale})`,A=z.transform?`${z.transform} ${de}`:de;return r.jsx("button",{className:ue.closeButton,style:{...z,transform:A},onClick:N,"aria-label":"Close lightbox",children:r.jsx(sn,{url:ie.closeIconUrl,fill:ie.closeIconColor??"#000000",hoverFill:ie.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&i.imageCaption&&((Fe=n[E])==null?void 0:Fe.imageCaption)&&r.jsx("div",{className:ue.caption,style:{...Yi(he.alignment,he.offset,a),fontFamily:Fo(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":L.scalingValue(l.width,a),letterSpacing:L.scalingValue(u,a),wordSpacing:L.scalingValue(x,a),textAlign:w,fontSize:L.scalingValue(v.fontSize,a),lineHeight:L.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:f},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ue.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:r.jsx(gi,{content:n[E].imageCaption})})}),ae.isActive&&(()=>{const[z,de]=ae.position.split("-"),A=F.direction==="horiz"?`${z}-left`:ae.position,J=Yi(A,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(de==="left")return"flex-start";if(de==="center")return"center";if(de==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:ue.thumbsWrapper,onClick:ee=>Oe(ee),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Xe(ue.thumbsContainer,{[ue.thumbsContainerVertical]:F.direction==="vert",[ue.thumbsAlignStart]:ae.align==="start",[ue.thumbsAlignCenter]:ae.align==="center",[ue.thumbsAlignEnd]:ae.align==="end"}),style:{gap:L.scalingValue(ae.grid.gap,a),justifyContent:O?"flex-start":D()},children:n.map((ee,ge)=>{const be=ge===E,De=R[ge],Re=ae.grid.size*(be?ae.activeState.scale:1),qe=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:L.scalingValue(Re,a)}:{width:L.scalingValue(Re,a)};const ce=De.width/De.height;if(F.direction==="horiz"){const ke=Re,ze=ke*ce;return{width:L.scalingValue(ze,a),height:L.scalingValue(ke,a)}}else{const ke=Re,ze=ke/ce;return{width:L.scalingValue(ke,a),height:L.scalingValue(ze,a)}}};return r.jsx("button",{className:ue.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:L.scalingValue(Re,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:L.scalingValue(Re,a)}:{},...ae.fit==="cover"?{width:L.scalingValue(Re,a),height:L.scalingValue(Re,a)}:{},...qe(),transition:be?"all 0.25s ease-out":"none",opacity:be?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:ce=>{var ke;ce.stopPropagation(),$(ge),(ke=g.current)==null||ke.go(ge)},onMouseEnter:()=>{var ce;ae.triggers==="hov"&&((ce=g.current)==null||ce.go(ge))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:ce=>{const ke=ce.currentTarget;ke.naturalWidth&&ke.naturalHeight&&V(ze=>({...ze,[ge]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ge}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Jd={element:Xd,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 Ji(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${Ji(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
|
|
14
14
|
.${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
min-width: 0;
|
|
33
33
|
}
|
|
34
34
|
.${e}-field-group.${e}-labeled {
|
|
35
|
-
gap: ${
|
|
35
|
+
gap: ${Ji(4)};
|
|
36
36
|
}
|
|
37
37
|
.${e}-field-label {
|
|
38
38
|
white-space: nowrap;
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
outline: none;
|
|
129
129
|
}
|
|
130
130
|
.${e}-success {
|
|
131
|
-
margin-top: ${
|
|
131
|
+
margin-top: ${Ji(8)};
|
|
132
132
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
133
133
|
}
|
|
134
134
|
.${e}-error {
|
|
135
|
-
margin-top: ${
|
|
135
|
+
margin-top: ${Ji(8)};
|
|
136
136
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
137
137
|
}
|
|
138
138
|
.${e}-overlay-anchor {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
pointer-events: auto;
|
|
156
156
|
z-index: 10;
|
|
157
157
|
}
|
|
158
|
-
`}function Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=L.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:f,buttonStroke:E,buttonPadding:$,isButtonFullWidth:C,inputCorners:S,inputStroke:M,inputPadding:
|
|
158
|
+
`}function Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=L.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:f,buttonStroke:E,buttonPadding:$,isButtonFullWidth:C,inputCorners:S,inputStroke:M,inputPadding:I,inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V,buttonColor:g,buttonTextColor:T,buttonBorderColor:_,labelTextColor:H,successColor:K,errorColor:se,fontFamily:j,inputFontSettings:k,inputFontSize:X,inputLineHeight:q,inputLetterSpacing:O,inputWordSpacing:Y,inputTextAppearance:te,buttonFontSettings:oe,buttonFontSize:F,buttonLineHeight:ae,buttonLetterSpacing:h,buttonWordSpacing:ie,buttonTextAppearance:he,labelFontSettings:fe,labelFontSize:We,labelLineHeight:Z,labelLetterSpacing:le,labelWordSpacing:U,labelTextAppearance:B,statusFontSettings:N,statusFontSize:me,statusLineHeight:we,statusLetterSpacing:Oe,statusWordSpacing:_e,statusTextAppearance:Se,successMessage:Fe,errorMessage:z,stateOverrides:de}=e,A=p==="B",J=w.slice(0,Math.min(u,w.length)),D={fontSettings:{fontFamily:j,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:X??.01,lineHeight:q,letterSpacing:O??0,wordSpacing:Y??0,textAppearance:te,color:b},ee=Zt(_t(D,t)),ge=L.scalingValue(M??0,t),be=L.scalingValue((q??X??.01)+((I==null?void 0:I.top)??0)+((I==null?void 0:I.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),De={...ee,borderStyle:"solid",borderRadius:p==="C"?0:L.scalingValue(S??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:L.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:L.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:L.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:L.scalingValue((I==null?void 0:I.left)??0,t),height:be,minHeight:be},Pe={fontSettings:{fontFamily:j,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ae,letterSpacing:h??0,wordSpacing:ie??0,textAppearance:he,color:T},Re=Zt(_t(Pe,t)),qe=L.scalingValue(E??0,t),ce={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:Z,letterSpacing:le??0,wordSpacing:U??0,textAppearance:B,color:H},ke=_t(ce,t),ze={fontSettings:{fontFamily:j,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:me??.01,lineHeight:we,letterSpacing:Oe??0,wordSpacing:_e??0,textAppearance:Se,color:K},Te=Zt(_t(ze,t)),rt=L.buildColorVars(l,{inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:g,buttonTextColor:T,buttonBorderColor:_,labelTextColor:H,successColor:K,errorColor:se},eu,tu,de),[nt,vt]=c.useState(()=>Object.fromEntries(J.map(He=>[He.name,""]))),[Ue,at]=c.useState("idle"),[Rt,It]=c.useState(null),bt=s==="success"?"success":s==="error"?"error":Ue,ve=s==="error"?z:Rt,Be=s==="filled",Ze=c.useMemo(()=>{if(!Be)return nt;let He=null;for(const Lt of J)(nt[Lt.name]??"").trim().length>0||(He=He??{...nt},He[Lt.name]="Filled");return He??nt},[nt,Be,J]),Ke=bt==="error"?L.getFormFieldValidationError(J,Ze):null,Ht=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),Ft=o==null?void 0:o.submitUrl,zt=(He,Lt)=>{vt(st=>({...st,[He]:Lt}))},cn=async He=>{if(He.preventDefault(),!d)return;const Lt=Object.fromEntries(J.map(Qe=>{var gt;return[Qe.name,((gt=nt[Qe.name])==null?void 0:gt.trim())??""]}).filter(([,Qe])=>Qe));if(!Ft){at("error"),It("No integrations were found for this form.");return}if(Object.keys(Lt).length===0)return;const st=L.getFormFieldValidationError(J,nt);if(st){at("error"),It(st);return}at("submitting"),It(null);try{const Qe=await fetch(Ft,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Lt)});if(!Qe.ok){const gt=await Qe.text();throw new Error(gt||`Request failed: ${Qe.status}`)}at("success"),vt(Object.fromEntries(J.map(gt=>[gt.name,""])))}catch(Qe){at("error"),It(Qe instanceof Error?Qe.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${l}-type-${p} ${Ht}`.trim(),style:rt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zd(l)}}),r.jsxs("form",{onSubmit:cn,className:`${l}-form`,children:[r.jsx("div",{className:`${l}-fields`,children:J.map((He,Lt)=>r.jsxs(c.Fragment,{children:[Lt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${l}-control`:void 0,style:{height:L.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${l}-field-group${A?` ${l}-labeled`:""}`,children:[A&&r.jsx("span",{className:`${l}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:He.label||He.name}),He.type==="textarea"?r.jsx("textarea",{name:He.name,autoComplete:"off",value:Ze[He.name]??"",onChange:st=>zt(He.name,st.target.value),placeholder:He.placeholder,className:`${l}-input`,style:De,rows:1,"data-filled":Be||(Ze[He.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:He.type==="phone"?"tel":He.type==="email"?"email":"text",name:He.name,autoComplete:"off",value:Ze[He.name]??"",onChange:st=>zt(He.name,st.target.value),placeholder:He.placeholder,required:He.isRequired??He.type==="email",className:`${l}-input`,style:De,"data-filled":Be||(Ze[He.name]??"").trim().length>0})]})]},Lt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${l}-control`:void 0,style:{height:L.scalingValue(v??0,t)}}),r.jsx("div",{className:`${l}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${l}-button`,style:{borderStyle:"solid",borderRadius:L.scalingValue(f??0,t),borderWidth:qe,paddingTop:L.scalingValue(($==null?void 0:$.top)??0,t),paddingRight:L.scalingValue(($==null?void 0:$.right)??0,t),paddingBottom:L.scalingValue(($==null?void 0:$.bottom)??0,t),paddingLeft:L.scalingValue(($==null?void 0:$.left)??0,t),pointerEvents:d?"auto":void 0,...Re,...C?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${l}-overlay-anchor`,style:C?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ue==="submitting"?"...":x})})})]}),bt==="success"&&r.jsx("p",{className:`${l}-success`,style:{...Te},children:Fe}),bt==="error"&&r.jsx("p",{className:`${l}-error`,style:{...Te},role:"alert",children:Ke??ve??z})]})}const eu={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"},tu=["hover","focus","filled","success","error"],nu=`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
|
-
`,iu=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Ji={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ou=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Ji.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ji.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Ji.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Ji.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:iu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ou],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"]},au={element:Qd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:ru,sourceCode:nu};function Zi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function su(e){return`
|
|
792
|
+
`,iu=[{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"}],Zi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ou=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ru={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:{...Zi.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:{...Zi.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:{...Zi.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:{...Zi.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:iu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ou],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"]},au={element:Qd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:ru,sourceCode:nu};function Qi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function su(e){return`
|
|
793
793
|
.${e}-wrapper {
|
|
794
794
|
display: flex;
|
|
795
795
|
flex-direction: column;
|
|
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
971
971
|
align-items: center;
|
|
972
972
|
}
|
|
973
973
|
.${e}-success {
|
|
974
|
-
margin-top: ${
|
|
975
|
-
font-size: ${
|
|
974
|
+
margin-top: ${Qi(8)};
|
|
975
|
+
font-size: ${Qi(14)};
|
|
976
976
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
977
977
|
}
|
|
978
978
|
.${e}-error {
|
|
979
|
-
margin-top: ${
|
|
980
|
-
font-size: ${
|
|
979
|
+
margin-top: ${Qi(8)};
|
|
980
|
+
font-size: ${Qi(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=L.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:f,inputWordSpacing:E,inputTextAppearance:$,buttonFontSettings:C,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:
|
|
983
|
+
`}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=L.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:f,inputWordSpacing:E,inputTextAppearance:$,buttonFontSettings:C,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:I,buttonWordSpacing:W,buttonTextAppearance:b,statusFontSettings:R,statusFontSize:V,statusLineHeight:g,statusLetterSpacing:T,statusWordSpacing:_,statusTextAppearance:H,iconMaxWidth:K,minHeight:se,corners:j,stroke:k,stateOverrides:X,inputPadding:q,buttonPadding:O,successMessage:Y="Thanks for subscribing!",errorMessage:te="Please, fill all required fields."}=e,oe=d.slice(0,Math.min(u,d.length)),[F,ae]=c.useState(()=>Object.fromEntries(oe.map(ce=>[ce.name,""]))),[h,ie]=c.useState("idle"),[he,fe]=c.useState(null),We=o==="success"?"success":o==="error"?"error":h,Z=o==="error"?te:he,le=o==="filled",U=c.useMemo(()=>{if(!le)return F;let ce=null;for(const ke of oe)(F[ke.name]??"").trim().length>0||(ce=ce??{...F},ce[ke.name]="Filled");return ce??F},[le,F,oe]),B=We==="error"?L.getFormFieldValidationError(oe,U):null,N=o&&o!=="default"?`${s}-state-${o}`:"",me=oe.some(ce=>(U[ce.name]??"").trim().length>0),we=N!==`${s}-state-filled`&&me?`${s}-state-filled`:"",Oe=`${N} ${we}`.trim(),_e=i==null?void 0:i.submitUrl,Se=p??"",Fe=(l==null?void 0:l.icon)??"",z=(l==null?void 0:l.mode)==="On",de=Se||"Submit",A={fontSettings:{fontFamily:w,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:v??.01,lineHeight:m,letterSpacing:f??0,wordSpacing:E??0,textAppearance:$,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:w,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:S??.01,lineHeight:M,letterSpacing:I??0,wordSpacing:W??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},D={fontSettings:{fontFamily:w,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:V??.01,lineHeight:g,letterSpacing:T??0,wordSpacing:_??0,textAppearance:H,color:e.successColor??"#22c55e"},ee=Zt(_t(A,t)),ge=Zt(_t(J,t)),be=Zt(_t(D,t)),De=L.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(A==null?void 0:A.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},cu,du,X),Pe={borderRadius:L.scalingValue(j,t),borderWidth:L.scalingValue(k,t),borderStyle:"solid"},Re={borderLeftWidth:L.scalingValue(k,t)},qe=async ce=>{if(ce.preventDefault(),!a)return;const ke=Object.fromEntries(oe.map(Te=>{var rt;return[Te.name,((rt=F[Te.name])==null?void 0:rt.trim())??""]}).filter(([,Te])=>Te));if(!_e){ie("error"),fe("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const ze=L.getFormFieldValidationError(oe,F);if(ze){ie("error"),fe(ze);return}ie("submitting"),fe(null);try{const Te=await fetch(_e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Te.ok){const rt=await Te.text();throw new Error(rt||`Request failed: ${Te.status}`)}ie("success"),ae(Object.fromEntries(oe.map(rt=>[rt.name,""])))}catch(Te){ie("error"),fe(Te instanceof Error?Te.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Oe}`.trim(),style:De,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:su(s)}}),r.jsxs("form",{onSubmit:qe,className:`${s}-form`,style:{...Pe,height:L.scalingValue(se,t),minHeight:L.scalingValue(se,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(ce=>r.jsx("input",{type:ce.type==="email"?"email":ce.type==="phone"?"tel":"text",name:ce.name,autoComplete:"off",value:U[ce.name]??"",onChange:ke=>ae(ze=>({...ze,[ce.name]:ke.target.value})),placeholder:ce.placeholder,required:ce.isRequired??ce.type==="email",className:`${s}-input`,style:{...ee,paddingRight:L.scalingValue(q.right,t),paddingLeft:L.scalingValue(q.left,t),paddingTop:L.scalingValue(q.top,t),paddingBottom:L.scalingValue(q.bottom,t)}},ce.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":de,style:{...ge,...Re,paddingRight:L.scalingValue(O.right,t),paddingLeft:L.scalingValue(O.left,t),paddingTop:L.scalingValue(O.top,t),paddingBottom:L.scalingValue(O.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":z?Fe&&r.jsx(sn,{url:Fe,className:`${s}-submitBtnIcon`,style:{maxWidth:L.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Se})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...be},children:Y}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...be},role:"alert",children:B??Z??te})]})},cu={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"},du=["hover","focus","filled","success","error"],uu=`import React, { useMemo, useState } from 'react';
|
|
984
984
|
import { CommonComponentProps } from '../props';
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1557
1557
|
};
|
|
1558
1558
|
|
|
1559
1559
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1560
|
-
`,pu="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>'),mu=[{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."}],qo={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},gu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],hu={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:{...qo.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:{...qo.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:{...qo.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:mu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:pu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...gu],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"]},fu={element:lu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:hu,sourceCode:uu};function yu(e){return`
|
|
1560
|
+
`,pu="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>'),mu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Ko={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},gu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],hu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Ko.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ko.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...Ko.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:mu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:pu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...gu],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"]},fu={element:lu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:hu,sourceCode:uu};function yu(e){return`
|
|
1561
1561
|
.${e}-marquee-wrapper {
|
|
1562
1562
|
overflow: hidden;
|
|
1563
1563
|
width: 100%;
|
|
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover img {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const vu=30,bu=20,
|
|
1692
|
+
`}const vu=30,bu=20,Uo=2,xu=2,wu=(e,t)=>Array.from({length:t},()=>e).flat(),Su=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},$u=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Su(i,e))},Cu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:l})=>{var b,R,V;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!a)return;const g=p.current;g!=null&&g.complete&&(l==null||l())},[a,(b=e.image)==null?void 0:b.url,l]);const u=n.display==="cover",w=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=w.split(":").map(Number),$=(x?m:v)/(x?v:m);let C=i,S=C/$;S>o&&(S=o,C=S*$);const M=d(C),I=d(S),W=((R=e.image)==null?void 0:R.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?l:void 0,onError:a?l:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:I,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Xe(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:W}):W})})},Tu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=c.useMemo(()=>yu(s),[s]),{speed:d,direction:l,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,f=!!o,E=!n||!!i,$=E&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,C=n?!!i:!0,M=((t==null?void 0:t.length)??0)>0&&(C||!!n),I=Math.max(0,d)*vu,W=B=>L.scalingValue(B,n??!1),b=c.useRef(null),R=c.useRef(null),V=c.useRef(null),[g,T]=c.useState(0),[_,H]=c.useState(0),K=C&&p==="on",[se,j]=c.useState(!1),[k,X]=c.useState({}),q=c.useRef(k);q.current=k;const O=c.useRef(null),Y=c.useRef(0),te=c.useRef(null),oe=c.useMemo(()=>(t??[]).map(B=>{var N;return((N=B.image)==null?void 0:N.url)??""}).join("\0"),[t]),[F,ae]=c.useState(Uo),h=c.useMemo(()=>{const B=t??[];return!C||B.length===0?B:wu(B,F)},[t,C,F]),ie=c.useMemo(()=>h.filter(B=>{var N;return!!((N=B.image)!=null&&N.url)}).length,[h]),he=M?xu:1;c.useLayoutEffect(()=>{Y.current=0,X({}),O.current=null,ae(Uo),T(0)},[oe]),c.useEffect(()=>{if(!E||m!=="randomize")return;const B=b.current;if(!B)return;const N=_e=>{X(Se=>{let Fe=null;for(const z of _e)z in Se&&($u(B,z)||(Fe||(Fe={...Se}),delete Fe[z]));return Fe??Se})},me=new IntersectionObserver(_e=>{const Se=new Set;for(const Fe of _e){const z=Fe.target.dataset.marqueeItemIndex,de=z!==void 0?Number(z):NaN;Number.isNaN(de)||Se.add(de)}Se.size>0&&N(Se)},{root:B,threshold:0});Object.keys(k).forEach(_e=>{const Se=Number(_e);B.querySelectorAll(`[data-marquee-item-index="${Se}"]`).forEach(Fe=>me.observe(Fe))});let we=0;const Oe=()=>{const _e=Object.keys(q.current);_e.length!==0&&(N(_e.map(Number)),we=requestAnimationFrame(Oe))};return Object.keys(q.current).length>0&&(we=requestAnimationFrame(Oe)),()=>{cancelAnimationFrame(we),me.disconnect()}},[m,k,E]),c.useLayoutEffect(()=>{if(!M)return;const B=b.current,N=V.current;if(!B||!N)return;let me=0;const we=()=>{const Se=B.getBoundingClientRect().width,Fe=N.getBoundingClientRect().width,z=O.current,de=typeof z=="number"&&Math.abs(z-Fe)<=.25;if(O.current=Fe,C&&Fe>0&&F>0){const A=Fe/F;if(A>0&&Se>0){const J=Math.max(Uo,Math.ceil(Se/A)+1);if(J!==F){ae(J);return}}}if(Fe>0&&g<=0){T(Fe);return}de&&Fe!==g?T(Fe):!de&&g<=0&&(cancelAnimationFrame(me),me=requestAnimationFrame(we))},Oe=()=>{cancelAnimationFrame(me),me=requestAnimationFrame(we)};te.current=Oe,Oe();const _e=new ResizeObserver(Oe);return _e.observe(B),_e.observe(N),()=>{te.current=null,cancelAnimationFrame(me),_e.disconnect()}},[C,M,g,oe,F]),c.useLayoutEffect(()=>{const B=R.current;if(!M||!B)return;const N=g>0?g:0,me=N>0&&I>0?N/I*1e3:0,we=`${Math.max(0,me)/1e3}s`;B.style.setProperty("--marquee-distance",`${N}px`),B.style.setProperty("--marquee-duration",we)},[C,M,I,g]),c.useLayoutEffect(()=>{if(!M){H(0);return}if(g<=0){H(0);return}const B=R.current;if(!B)return;const N=()=>{const we=B.getBoundingClientRect().height;H(we>0?we:0)};N();const me=new ResizeObserver(N);return me.observe(B),()=>me.disconnect()},[M,he,h,n,u,w,x,g,v,k]);const fe=()=>{K&&j(!0)},We=()=>{K&&j(!1)},Z=c.useCallback(()=>{var B;Y.current=Math.min(ie,Y.current+1),(B=te.current)==null||B.call(te)},[ie]),le=c.useCallback((B,N)=>{X(me=>{const we=me[B]??N,Oe=(t??[]).filter(Se=>Se!==we);if(Oe.length===0)return me;const _e=Oe[Math.floor(Math.random()*Oe.length)];return{...me,[B]:_e}})},[t]),U=(B,N,me,we)=>{const Oe=E&&m==="randomize"&&v.display==="cover"?k[me]??B:B,_e=`max(${W(u)}, ${bu}px)`,Se=`calc(-0.5 * (${_e} + ${W(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:E&&m==="randomize"&&v.display==="cover"?()=>le(me,B):void 0,children:[r.jsx(Cu,{item:Oe,prefix:s,imageFit:v,imageMaxWidth:w,imageMaxHeight:x,imageHoverClass:$,isEditor:n,isFirstSet:we,scaled:W,onFirstSetImageDone:Z}),f&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Se,width:_e,height:"100%"}})]},`${N}-${me}`)};if(M){const B=C?K&&se?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:g>0&&_>0?{height:_}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:R,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:fe,onMouseLeave:We,style:{"--marquee-play-state":B},children:Array.from({length:he},(N,me)=>r.jsx("div",{ref:me===0?V:void 0,className:Xe(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(u),paddingRight:W(u)},"aria-hidden":me>0,children:h.map((we,Oe)=>U(we,me,Oe,me===0))},`set-${me}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Xe(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,N)=>U(B,0,N))},"marquee-static")]})},Lu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1693
1693
|
import cn from 'classnames';
|
|
1694
1694
|
import { CommonComponentProps } from '../props';
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
|
|
|
2407
2407
|
pointer-events: auto;
|
|
2408
2408
|
z-index: 10;
|
|
2409
2409
|
}
|
|
2410
|
-
`}const Iu=30,ha=2,Au=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),{align:a,speed:d,direction:l,pauseOnHover:p,gap:u,cardWidth:w,corners:x,stroke:v,strokeColor:m,bgColor:f,padding:E,logoMarginTop:$,logoWidth:C,logoHeight:S,captionMarginTop:M}=e,
|
|
2410
|
+
`}const Iu=30,ha=2,Au=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),{align:a,speed:d,direction:l,pauseOnHover:p,gap:u,cardWidth:w,corners:x,stroke:v,strokeColor:m,bgColor:f,padding:E,logoMarginTop:$,logoWidth:C,logoHeight:S,captionMarginTop:M}=e,I=!!o,W=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),R=W&&(b||n),V=Math.max(0,d)*Iu,g=A=>L.scalingValue(A,n??!1),T=c.useRef(null),_=c.useRef(null),H=c.useRef(null),[K,se]=c.useState(0),[j,k]=c.useState(0),[X,q]=c.useState(0),O=b&&p==="on",[Y,te]=c.useState(!1),oe=c.useRef(null),[F,ae]=c.useState(0),[h,ie]=c.useState(0),he=c.useRef(null),fe=A=>{var D,ee,ge,be,De;return{fontSettings:{fontFamily:(e==null?void 0:e[`${A}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${A}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${A}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((De=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:De.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${A}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${A}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${A}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${A}LineHeight`])??.01,color:(e==null?void 0:e[`${A}Color`])??"#000000"}},We=fe("text"),Z=fe("caption"),le=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(A=>{var J,D;return(((J=A.text)==null?void 0:J.length)??0)>0||(((D=A.caption)==null?void 0:D.length)??0)>0}),[t]),U=c.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:j<=0||K<=0?ha:Math.max(ha,Math.ceil(K/j)+1),[R,t==null?void 0:t.length,j,K]);c.useLayoutEffect(()=>{if(!R)return;const A=T.current,J=H.current;if(!A||!J)return;let D=0;const ee=()=>{const De=A.getBoundingClientRect().width,Pe=J.getBoundingClientRect().width,Re=he.current,qe=typeof Re=="number"&&Math.abs(Re-Pe)<=.25;if(he.current=Pe,se(De),typeof Pe=="number"&&Pe>0&&j<=0){k(Pe);return}qe&&Pe!==j?k(Pe):!qe&&j<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(ee))},ge=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(ee)};ge();const be=new ResizeObserver(ge);return be.observe(A),be.observe(J),()=>{cancelAnimationFrame(D),be.disconnect()}},[b,R,j]),c.useLayoutEffect(()=>{const A=_.current;if(!R||!A)return;const J=j>0?j:0,D=J>0&&V>0?J/V*1e3:0,ee=`${Math.max(0,D)/1e3}s`;A.style.setProperty("--marquee-distance",`${J}px`),A.style.setProperty("--marquee-duration",ee)},[b,R,V,j]),c.useLayoutEffect(()=>{if(!R){q(0);return}const A=H.current,J=_.current;if(!A||!J)return;const D=()=>{let ge=0;for(let be=0;be<A.children.length;be++){const Pe=A.children[be].firstElementChild;Pe&&(ge=Math.max(ge,Pe.offsetHeight))}ge<=0&&(ge=J.offsetHeight),q(ge>0?ge:0)};D();const ee=new ResizeObserver(D);return ee.observe(A),ee.observe(J),()=>{ee.disconnect()}},[R,U,t,n,u,w,E,v,x,C,S,F,h]);const B=()=>{O&&te(!0)},N=()=>{O&&te(!1)},me=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),we=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Oe=c.useCallback((A,J,D,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":I?"y":void 0,className:I?`${s}-control`:void 0,style:{height:g((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{..._t(A,n),textAlign:we,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(gi,{content:J})})]},D),[me,we,n,I,s,g]),_e=c.useCallback((A,J,D)=>{var ee,ge,be;return r.jsxs("div",{style:{padding:`${g(E.top)} ${g(E.right)} ${g(E.bottom)} ${g(E.left)}`,width:g(w+v*2),height:"100%",borderRadius:g(x),border:`${g(v)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:f}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:me,textAlign:we},children:[A.text&&Oe(We,A.text,"text",D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(D==null?void 0:D.textMinHeightPx)=="number"&&D.textMinHeightPx>0?{minHeightPx:D.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I&&!(D!=null&&D.dataMeasureAttrs)?"logoMarginTop":void 0,className:I&&!(D!=null&&D.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:g($)}}),r.jsx("div",{style:{width:g(C),height:g(S)},children:((ee=A.logo)==null?void 0:ee.url)&&r.jsx("img",{src:A.logo.url,alt:((ge=A.logo)==null?void 0:ge.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=A.logo)==null?void 0:be.objectFit)||"contain"}})})]}),A.caption&&Oe(Z,A.caption,"caption",{...D!=null&&D.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(D==null?void 0:D.captionMinHeightPx)=="number"&&D.captionMinHeightPx>0?{minHeightPx:D.captionMinHeightPx}:{}})]})]},J)},[f,M,Z,w,x,S,$,C,me,we,E.bottom,E.left,E.right,E.top,Oe,v,m,We,n,I,s]),Se=c.useCallback(A=>{ae(A.maxTextPx),ie(A.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!le){Se({maxTextPx:0,maxCaptionPx:0});return}const A=oe.current;if(!A)return;const J=()=>{L.readTestimonialTextMeasure(A,Se)};J();const D=new ResizeObserver(J);return D.observe(A),()=>{D.disconnect()}},[le,Se,t,_e]);const Fe=le?{textMinHeightPx:F,captionMinHeightPx:h}:void 0,z=le?r.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((A,J)=>_e(A,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,de=(A,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[_e(A,`card-${J}`,Fe),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${g(u)})`,width:g(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(R){const A=b?O&&Y?"paused":"running":"paused";return r.jsxs("div",{ref:T,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...X>0?{height:X}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{ref:_,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:B,onMouseLeave:N,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":A},children:Array.from({length:U},(J,D)=>r.jsx("div",{ref:D===0?H:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:g(u),paddingRight:g(u)},"aria-hidden":D>0,children:t==null?void 0:t.map((ee,ge)=>de(ee,`${D}-${ge}`))},`set-${D}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{style:{gap:g(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((A,J)=>de(A,J))})]})},_u=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2411
2411
|
import cn from 'classnames';
|
|
2412
2412
|
import { CommonComponentProps } from '../props';
|
|
2413
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
|
|
|
3146
3146
|
width: 100%;
|
|
3147
3147
|
height: 100%;
|
|
3148
3148
|
}
|
|
3149
|
-
`}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:f,controlsColor:E,controlsHoverColor:$}=e,C=d>0&&(!n||!!i),[S,M]=c.useState(0),[
|
|
3149
|
+
`}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:f,controlsColor:E,controlsHoverColor:$}=e,C=d>0&&(!n||!!i),[S,M]=c.useState(0),[I,W]=c.useState(null),[b,R]=c.useState(!1),V=c.useRef(null),g=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),T=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);c.useEffect(()=>{M(0),W(null),R(!1)},[a.length]);const _=a[S],H=I===null?null:a[I],K=Z=>{var U,B,N,me,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((N=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:N.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},se=K("text"),j=K("caption"),k=a.length>1&&a.some(Z=>{var le,U;return(((le=Z.text)==null?void 0:le.length)??0)>0||(((U=Z.caption)==null?void 0:U.length)??0)>0}),X=c.useRef(null),[q,O]=c.useState(0),[Y,te]=c.useState(0),oe=e.controls??{mode:"Off",icon:null},F=a.length>1,ae=c.useCallback((Z,le)=>!F||le===Z?Z:(V.current&&window.clearTimeout(V.current),W(Z),R(!0),V.current=window.setTimeout(()=>{W(null),R(!1),V.current=null},300),le),[F]),h=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z-1+a.length)%a.length))},[F,ae,a.length]),ie=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z+1)%a.length))},[F,ae,a.length]);c.useEffect(()=>{if(!C||!F)return;const Z=Math.max(300,Wu/d),le=window.setInterval(()=>{M(U=>ae(U,(U+1)%a.length))},Z);return()=>{window.clearInterval(le)}},[C,F,ae,a.length,d]),c.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const he=(Z,le)=>{var we,Oe,_e,Se;const U=le==null?void 0:le.textMinHeightPx,B=le==null?void 0:le.captionMinHeightPx,N=le==null?void 0:le.dataMeasureAttrs,me=o&&!(le!=null&&le.dataMeasureAttrs)&&!(le!=null&&le.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"textMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(w??0,n??!1)}}),r.jsx("div",{...N&&{"data-testimonial-measure":"text"},style:{..._t(se,n),...U&&U>0?{minHeight:U}:{},textAlign:T,pointerEvents:"auto"},children:r.jsx(gi,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"imageMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:L.scalingValue(v??0,n??!1),height:L.scalingValue(m??0,n??!1)},children:((we=Z.image)==null?void 0:we.url)&&r.jsx("img",{src:(Oe=Z.image)==null?void 0:Oe.url,alt:((_e=Z.image)==null?void 0:_e.name)??"",className:`${s}-icon`,style:{objectFit:((Se=Z.image)==null?void 0:Se.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"captionMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(x??0,n??!1)}}),r.jsx("div",{...N?{"data-testimonial-measure":"caption"}:{},style:{..._t(j,n),...B&&B>0?{minHeight:B}:{},textAlign:T,pointerEvents:"auto"},children:r.jsx(gi,{content:Z.caption})})]})]})},fe=c.useCallback(Z=>{O(Z.maxTextPx),te(Z.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!k){fe({maxTextPx:0,maxCaptionPx:0});return}const Z=X.current;if(!Z)return;const le=()=>{L.readTestimonialTextMeasure(Z,fe)};le();const U=new ResizeObserver(le);return U.observe(Z),()=>{U.disconnect()}},[k,fe,t]),!_)return r.jsx(r.Fragment,{});const We=k?{textMinHeightPx:q,captionMinHeightPx:Y}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Mu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:L.scalingValue(p??0,n??!1),alignItems:g},children:[k&&r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,le)=>r.jsx("div",{style:{width:"100%"},children:he(Z,{dataMeasureAttrs:!0})},le))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[H&&b&&r.jsx("div",{className:Xe(`${s}-fade-item-prev`,`${s}-fade-out`),children:he(H,{...We,hideControls:!0})}),r.jsx("div",{className:Xe(`${s}-fade-item-current`,b?`${s}-fade-in`:void 0),children:he(_,We)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:L.scalingValue(f??.02,n??!1),height:L.scalingValue(f??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!F,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(sn,{url:oe.icon,fill:E,hoverFill:$,className:Xe(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Xe(`${s}-arrow`,`${s}-next-arrow`),style:{width:L.scalingValue(f??.02,n??!1),height:L.scalingValue(f??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ie,disabled:!F,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(sn,{url:oe.icon,fill:E,hoverFill:$,className:`${s}-arrow-img`})})})]})]})})},Nu=`import cn from 'classnames';
|
|
3150
3150
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3151
3151
|
import { CommonComponentProps } from '../props';
|
|
3152
3152
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {
|
|
|
3642
3642
|
icon?: string | null;
|
|
3643
3643
|
};
|
|
3644
3644
|
};
|
|
3645
|
-
`,Hu="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>'),ya={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},
|
|
3645
|
+
`,Hu="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>'),ya={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ou={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Hu},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Bu={element:Fu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Ou,sourceCode:Nu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ju(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function va(e){return((e==null?void 0:e.trim().length)??0)>0}function Go(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xo(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((o-t)/2,i)}}function zu(e){return`
|
|
3646
3646
|
.${e}-wrapper {
|
|
3647
3647
|
display: grid;
|
|
3648
3648
|
align-items: start;
|
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const hn=500,Vu=750,_n="cubic-bezier(0.22, 1, 0.36, 1)";function Mn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return Mn(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[f,E]=c.useState(i?"opening":"open"),[$,C]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,T=x.current;if(!g||!T)return;const _=g.getBoundingClientRect(),H=_.width,K=_.height,se=T.naturalWidth,j=T.naturalHeight;if(!H||!K||!se||!j)return;if(n==="cover"){m({width:H,height:K,left:_.left,top:_.top});return}const k=se/j,X=H/K;if(k>X){const q=H/k;m({width:H,height:q,left:_.left,top:_.top+(K-q)/2})}else{const q=K*k;m({width:q,height:K,left:_.left+(H-q)/2,top:_.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const T=new ResizeObserver(()=>M());return T.observe(g),()=>T.disconnect()},[M,t]),c.useEffect(()=>{f==="opening"&&v&&E("open")},[f,v]),c.useEffect(()=>{if(f!=="closing")return;const g=setTimeout(()=>s(),hn);return()=>clearTimeout(g)},[f,s]),c.useEffect(()=>{S.current!==t&&C(!1),S.current=t},[t]),c.useEffect(()=>{const g=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),f!=="closing"&&E("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[f]);const P=()=>{f!=="closing"&&E("closing")},W=f==="open",b=f==="closing",R=b&&o&&!!i,V=f==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:P,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${hn}ms ${_n}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${hn}ms ${_n}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${hn}ms ${_n}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${hn}ms ${_n}`:R||$?`top ${hn}ms ${_n}, left ${hn}ms ${_n}, width ${hn}ms ${_n}, height ${hn}ms ${_n}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=L.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:f,lightboxImageDisplay:E,slider:$,sliderTiming:C,direction:S,transition:M,titleMarginTop:P,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:T,titleFontSize:_,titleLineHeight:H,titleLetterSpacing:K,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:B,subtitleLetterSpacing:Y,subtitleWordSpacing:ne,subtitleTextAppearance:oe,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:h,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:he,lightboxCounterTextAppearance:Me,showText:Z="always",alignEntries:le="off"}=e,U={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:_??.01,lineHeight:H,letterSpacing:K??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Jt(_t(U,n))},pe={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:B,letterSpacing:Y??0,wordSpacing:ne??0,textAppearance:oe,color:R},Ne={...Jt(_t(pe,n))},Ie={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ie,letterSpacing:ge??0,wordSpacing:he??0,textAppearance:Me,color:V},We={...Jt(_t(Ie,n)),...Go(h,ie,l,n)},z=Uo(_,H,`${l}-item-title`,`${l}-text-tight-leading`),de=Uo(q,B,`${l}-item-subtitle`,`${l}-text-tight-leading`),I=Go(_,H,l,n),J=Go(q,B,l,n),D=Uo(h,ie,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Q=L.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),$e=v===0?1/0:v,Ae=(t??[]).slice(0,$e),Ue=u.entryWidth??.2,ce=(f==null?void 0:f.display)==="cover",Re=(f==null?void 0:f.ratioValue)??"1:1",ze=(f==null?void 0:f.reversed)??!1,[Ce,rt]=Re.split(":").map(Number),Xe=`${ze?rt:Ce} / ${ze?Ce:rt}`,st=L.scalingValue(Ue??0,n),Rt=!ce&&$!=="off",Pt={width:st,...ce?{aspectRatio:Xe,height:"auto",overflow:"hidden"}:{height:"auto"}},bt=`${l}-item-image-wrapper${Rt?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ye=p==="c",He=ye&&le==="on",qe=`calc(${L.scalingValue(Ue??0,n)} * (${w} / 100))`,lt=L.scalingValue(Ue*w/100,n),Wt=ce?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Bt,kt]=c.useState("ltr"),[Ot,cn]=c.useState(0),Be=c.useRef(null);c.useEffect(()=>{const Fe=Be.current;if(!Fe)return;const It=new ResizeObserver(At=>{cn(Math.round(At[0].contentRect.width))});return It.observe(Fe),()=>It.disconnect()},[]);const wt=(()=>{const Fe={...Q},It=Be.current?getComputedStyle(Be.current).getPropertyValue("--cntrl-article-width").trim():"";return It&&(Fe["--cntrl-article-width"]=It),Fe})(),[ct,Ye]=c.useState(!1),[St,jt]=c.useState([]),[Cn,Kt]=c.useState(0),[Je,en]=c.useState(null),Ft=(Fe,It,At)=>{if(n&&!i||m==="off")return;const ee=Fe.currentTarget.getBoundingClientRect();en({top:ee.top,left:ee.left,width:ee.width,height:ee.height}),jt(It),Kt(At),Ye(!0)};c.useEffect(()=>{if(!ct||m!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[ct,m]),c.useEffect(()=>{!n||i||(Ye(!1),en(null))},[n,i]);const Nt=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Nt}}),r.jsx("div",{style:Q,children:r.jsx("div",{ref:Be,className:`${l}-wrapper ${l}-type-${p}${He?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:L.scalingValue(x??0,n),columnGap:L.scalingValue(u.horizontalGap??0,n),width:L.scalingValue(u.wrapperWidth??0,n),...He?{[`--${l}-align-entries-row-gap`]:L.scalingValue(x??0,n)}:{}},children:Ae.map((Fe,It)=>{var et,at;const At=va(Fe.title),ee=va(Fe.subtitle),xe=(((et=Fe.link)==null?void 0:et.length)??0)>0&&m==="off"?Fe.link:void 0,ke=Math.floor(It/u.columnsCount)===Math.ceil(Ae.length/u.columnsCount)-1,_e=ye?r.jsxs("div",{className:`${l}-item-text-block`,children:[At&&r.jsx("p",{className:z,style:{width:qe,...N,...I},children:Fe.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(P??0,n),width:lt}}),ee&&r.jsx("p",{className:de,style:{width:qe,...Ne,...J},children:Fe.subtitle}),ee&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:lt}})]}):null,Ze=ye?r.jsxs("div",{className:`${l}-item-title-row`,children:[At&&r.jsx("p",{className:z,style:{width:qe,...N,...I},children:Fe.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(P??0,n),width:lt}})]}):null,Ve=ye?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[ee&&r.jsx("p",{className:de,style:{width:qe,...Ne,...J},children:Fe.subtitle}),ee&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:lt}})]}):null,Oe=xe?r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-text-link`,children:[Ze,Ve]}):r.jsxs(r.Fragment,{children:[Ze,Ve]}),yt=r.jsx("div",{className:bt,style:Pt,children:(((at=Fe.image)==null?void 0:at.length)??0)===0?null:$==="off"?(()=>{const Ke=Fe.image[0],Lt=Fe.image.filter(pt=>!Mn(pt)).map(pt=>pt.url);return r.jsx(ba,{media:Ke,className:`${l}-item-${Mn(Ke)?"video":"image"}`.trim(),style:Wt,onImageClick:Mn(Ke)?void 0:pt=>Ft(pt,Lt,0)})})():r.jsxs(r.Fragment,{children:[Rt&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Fe.image.map(Ke=>Mn(Ke)?r.jsx("video",{src:Ke.url,muted:!0,playsInline:!0},`sizer-${Ke.url}`):r.jsx("img",{src:Ke.url,alt:""},`sizer-${Ke.url}`))}),r.jsx(Fr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Bt},onMoved:Ke=>{if(S!=="random"||M==="fade")return;const ut=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";kt(ut),setTimeout(()=>{Ke.refresh()},0)},children:Fe.image.map((Ke,ut)=>{const Lt=Fe.image.filter(it=>!Mn(it)),pt=Lt.map(it=>it.url),tn=Lt.findIndex(it=>it.url===Ke.url);return r.jsx(Nr,{children:r.jsx(ba,{media:Ke,className:`${l}-item-${Mn(Ke)?"video":"image"}`.trim(),style:Wt,onImageClick:Mn(Ke)?void 0:it=>Ft(it,pt,tn)})},ut)})},`${M}-${Ue}-${S}-${C}-${Ot}-${d}`)]})}),Tt=ye?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&At?"titleMarginTop":void 0,className:o&&At?`${l}-control`:void 0,style:{height:At?L.scalingValue(P??0,n):0,width:lt}}),r.jsx("p",{className:z,style:{width:qe,...N,...I},children:Fe.title}),r.jsx("div",{"data-controls":o&&ee?"subtitleMarginTop":void 0,className:o&&ee?`${l}-control`:void 0,style:{height:ee?L.scalingValue(W??0,n):0,width:lt}}),r.jsx("p",{className:de,style:{width:qe,...Ne,...J},children:Fe.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${He&&ke?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${L.scalingValue(Ue??0,n)} * (${w} / 100))`:L.scalingValue(Ue??0,n)},children:He?r.jsxs(r.Fragment,{children:[Oe,r.jsx("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:yt})]}):r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:[_e,yt,Tt]})})},It)})})}),(!n||i)&&ct&&typeof document<"u"&&m==="on"&&Ni.createPortal(r.jsx("div",{style:wt,"data-selection":"none",children:r.jsx(Du,{images:St,index:Cn,imageDisplay:qu(E),originRect:Je,reverseClose:$==="off",onClose:()=>Ye(!1),onPrev:()=>Kt(Fe=>(Fe-1+St.length)%St.length),onNext:()=>Kt(Fe=>(Fe+1)%St.length),counterClassName:D,counterStyle:We})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3848
|
+
`}const yn=500,Vu=750,In="cubic-bezier(0.22, 1, 0.36, 1)";function Rn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return Rn(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[f,E]=c.useState(i?"opening":"open"),[$,C]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,T=x.current;if(!g||!T)return;const _=g.getBoundingClientRect(),H=_.width,K=_.height,se=T.naturalWidth,j=T.naturalHeight;if(!H||!K||!se||!j)return;if(n==="cover"){m({width:H,height:K,left:_.left,top:_.top});return}const k=se/j,X=H/K;if(k>X){const q=H/k;m({width:H,height:q,left:_.left,top:_.top+(K-q)/2})}else{const q=K*k;m({width:q,height:K,left:_.left+(H-q)/2,top:_.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const T=new ResizeObserver(()=>M());return T.observe(g),()=>T.disconnect()},[M,t]),c.useEffect(()=>{f==="opening"&&v&&E("open")},[f,v]),c.useEffect(()=>{if(f!=="closing")return;const g=setTimeout(()=>s(),yn);return()=>clearTimeout(g)},[f,s]),c.useEffect(()=>{S.current!==t&&C(!1),S.current=t},[t]),c.useEffect(()=>{const g=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),f!=="closing"&&E("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[f]);const I=()=>{f!=="closing"&&E("closing")},W=f==="open",b=f==="closing",R=b&&o&&!!i,V=f==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:I,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${yn}ms ${In}`:R||$?`top ${yn}ms ${In}, left ${yn}ms ${In}, width ${yn}ms ${In}, height ${yn}ms ${In}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=L.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:f,lightboxImageDisplay:E,slider:$,sliderTiming:C,direction:S,transition:M,titleMarginTop:I,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:T,titleFontSize:_,titleLineHeight:H,titleLetterSpacing:K,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:O,subtitleLetterSpacing:Y,subtitleWordSpacing:te,subtitleTextAppearance:oe,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:h,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:fe,lightboxCounterTextAppearance:We,showText:Z="always",alignEntries:le="off"}=e,U={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:_??.01,lineHeight:H,letterSpacing:K??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Zt(_t(U,n))},me={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:te??0,textAppearance:oe,color:R},Oe={...Zt(_t(me,n))},_e={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ie,letterSpacing:he??0,wordSpacing:fe??0,textAppearance:We,color:V},Fe={...Zt(_t(_e,n)),...Xo(h,ie,l,n)},z=Go(_,H,`${l}-item-title`,`${l}-text-tight-leading`),de=Go(q,O,`${l}-item-subtitle`,`${l}-text-tight-leading`),A=Xo(_,H,l,n),J=Xo(q,O,l,n),D=Go(h,ie,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ee=L.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),Pe=v===0?1/0:v,Re=(t??[]).slice(0,Pe),qe=u.entryWidth??.2,ce=(f==null?void 0:f.display)==="cover",ke=(f==null?void 0:f.ratioValue)??"1:1",ze=(f==null?void 0:f.reversed)??!1,[Te,rt]=ke.split(":").map(Number),Ue=`${ze?rt:Te} / ${ze?Te:rt}`,at=L.scalingValue(qe??0,n),Rt=!ce&&$!=="off",It={width:at,...ce?{aspectRatio:Ue,height:"auto",overflow:"hidden"}:{height:"auto"}},bt=`${l}-item-image-wrapper${Rt?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",Be=ve&&le==="on",Ze=`calc(${L.scalingValue(qe??0,n)} * (${w} / 100))`,Ke=L.scalingValue(qe*w/100,n),Wt=ce?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ht,Ft]=c.useState("ltr"),[zt,cn]=c.useState(0),He=c.useRef(null);c.useEffect(()=>{const Ne=He.current;if(!Ne)return;const ft=new ResizeObserver(At=>{cn(Math.round(At[0].contentRect.width))});return ft.observe(Ne),()=>ft.disconnect()},[]);const Lt=(()=>{const Ne={...ee},ft=He.current?getComputedStyle(He.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(Ne["--cntrl-article-width"]=ft),Ne})(),[st,Qe]=c.useState(!1),[gt,Vt]=c.useState([]),[Ut,tn]=c.useState(0),[mn,Ge]=c.useState(null),nn=(Ne,ft,At)=>{if(n&&!i||m==="off")return;const ne=Ne.currentTarget.getBoundingClientRect();Ge({top:ne.top,left:ne.left,width:ne.width,height:ne.height}),Vt(ft),tn(At),Qe(!0)};c.useEffect(()=>{if(!st||m!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[st,m]),c.useEffect(()=>{!n||i||(Qe(!1),Ge(null))},[n,i]);const Ot=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ot}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:He,className:`${l}-wrapper ${l}-type-${p}${Be?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Be?0:L.scalingValue(x??0,n),columnGap:L.scalingValue(u.horizontalGap??0,n),width:L.scalingValue(u.wrapperWidth??0,n),...Be?{[`--${l}-align-entries-row-gap`]:L.scalingValue(x??0,n)}:{}},children:Re.map((Ne,ft)=>{var yt,lt;const At=va(Ne.title),ne=va(Ne.subtitle),xe=(((yt=Ne.link)==null?void 0:yt.length)??0)>0&&m==="off"?Ne.link:void 0,Ae=Math.floor(ft/u.columnsCount)===Math.ceil(Re.length/u.columnsCount)-1,Ve=ve?r.jsxs("div",{className:`${l}-item-text-block`,children:[At&&r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(I??0,n),width:Ke}}),ne&&r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle}),ne&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:Ke}})]}):null,Ye=ve?r.jsxs("div",{className:`${l}-item-title-row`,children:[At&&r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(I??0,n),width:Ke}})]}):null,et=ve?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[ne&&r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle}),ne&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:Ke}})]}):null,$e=xe?r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-text-link`,children:[Ye,et]}):r.jsxs(r.Fragment,{children:[Ye,et]}),Et=r.jsx("div",{className:bt,style:It,children:(((lt=Ne.image)==null?void 0:lt.length)??0)===0?null:$==="off"?(()=>{const Me=Ne.image[0],ct=Ne.image.filter($t=>!Rn($t)).map($t=>$t.url);return r.jsx(ba,{media:Me,className:`${l}-item-${Rn(Me)?"video":"image"}`.trim(),style:Wt,onImageClick:Rn(Me)?void 0:$t=>nn($t,ct,0)})})():r.jsxs(r.Fragment,{children:[Rt&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ne.image.map(Me=>Rn(Me)?r.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):r.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),r.jsx(Nr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ht},onMoved:Me=>{if(S!=="random"||M==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ft(xt),setTimeout(()=>{Me.refresh()},0)},children:Ne.image.map((Me,xt)=>{const ct=Ne.image.filter(St=>!Rn(St)),$t=ct.map(St=>St.url),kt=ct.findIndex(St=>St.url===Me.url);return r.jsx(Hr,{children:r.jsx(ba,{media:Me,className:`${l}-item-${Rn(Me)?"video":"image"}`.trim(),style:Wt,onImageClick:Rn(Me)?void 0:St=>nn(St,$t,kt)})},xt)})},`${M}-${qe}-${S}-${C}-${zt}-${d}`)]})}),ht=ve?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&At?"titleMarginTop":void 0,className:o&&At?`${l}-control`:void 0,style:{height:At?L.scalingValue(I??0,n):0,width:Ke}}),r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),r.jsx("div",{"data-controls":o&&ne?"subtitleMarginTop":void 0,className:o&&ne?`${l}-control`:void 0,style:{height:ne?L.scalingValue(W??0,n):0,width:Ke}}),r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${Be&&Ae?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${L.scalingValue(qe??0,n)} * (${w} / 100))`:L.scalingValue(qe??0,n)},children:Be?r.jsxs(r.Fragment,{children:[$e,r.jsx("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:Et})]}):r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:[Ve,Et,ht]})})},ft)})})}),(!n||i)&&st&&typeof document<"u"&&m==="on"&&Ni.createPortal(r.jsx("div",{style:Lt,"data-selection":"none",children:r.jsx(Du,{images:gt,index:Ut,imageDisplay:qu(E),originRect:mn,reverseClose:$==="off",onClose:()=>Qe(!1),onPrev:()=>tn(Ne=>(Ne-1+gt.length)%gt.length),onNext:()=>tn(Ne=>(Ne+1)%gt.length),counterClassName:D,counterStyle:Fe})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';
|
|
3850
3850
|
import { CommonComponentProps } from '../props';
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -5014,11 +5014,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
5014
5014
|
};
|
|
5015
5015
|
|
|
5016
5016
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
5017
|
-
`,Xo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yu=["titleColor","subtitleColor","lightboxCounterColor"],Ju={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Yu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zu={element:Ku,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ju,sourceCode:Xu},xa=12;function Qu(e,t="50%"){const n={position:"absolute",width:xa,height:xa,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Mt({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Qu(n,i)})})}function ep(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 tp({media:e,className:t,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function po(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function np(e){return String(e??"").trim().length>0}function wa(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 Sa(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 $a(e,t,n,i,o,s,a){const d=L.scalingValue(s,a),l=L.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:l,borderBottomWidth:!u||i?d:l}}function ip(e,t,n){const i=L.scalingValue(t,n),o=L.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ca=10;function op(e){return`
|
|
5017
|
+
`,Yo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yu=["titleColor","subtitleColor","lightboxCounterColor"],Ju={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Yo.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:{...Yo.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:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Yu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zu={element:Ku,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ju,sourceCode:Xu},xa=12;function Qu(e,t="50%"){const n={position:"absolute",width:xa,height:xa,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Mt({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Qu(n,i)})})}function ep(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 tp({media:e,className:t,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function np(e){return String(e??"").trim().length>0}function wa(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 Sa(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 $a(e,t,n,i,o,s,a){const d=L.scalingValue(s,a),l=L.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:l,borderBottomWidth:!u||i?d:l}}function ip(e,t,n){const i=L.scalingValue(t,n),o=L.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ca=10;function op(e){return`
|
|
5018
5018
|
.${e}-wrapper {
|
|
5019
5019
|
display: grid;
|
|
5020
5020
|
align-items: start;
|
|
5021
|
-
min-height: ${
|
|
5021
|
+
min-height: ${mo(48)};
|
|
5022
5022
|
position: relative;
|
|
5023
5023
|
overflow: visible;
|
|
5024
5024
|
box-sizing: border-box;
|
|
@@ -5140,7 +5140,7 @@ a.${e}-list-item {
|
|
|
5140
5140
|
flex-shrink: 0;
|
|
5141
5141
|
overflow: visible;
|
|
5142
5142
|
box-sizing: border-box;
|
|
5143
|
-
min-width: ${
|
|
5143
|
+
min-width: ${mo(50)};
|
|
5144
5144
|
position: relative;
|
|
5145
5145
|
display: flex;
|
|
5146
5146
|
align-items: flex-start;
|
|
@@ -5148,7 +5148,7 @@ a.${e}-list-item {
|
|
|
5148
5148
|
|
|
5149
5149
|
.${e}-list-col-last {
|
|
5150
5150
|
flex: 1 1 auto;
|
|
5151
|
-
min-width: ${
|
|
5151
|
+
min-width: ${mo(50)};
|
|
5152
5152
|
}
|
|
5153
5153
|
|
|
5154
5154
|
.${e}-list-col-title {
|
|
@@ -5445,7 +5445,7 @@ a.${e}-list-item {
|
|
|
5445
5445
|
overflow-wrap: anywhere;
|
|
5446
5446
|
word-break: break-word;
|
|
5447
5447
|
}
|
|
5448
|
-
`}const Hn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Hr=["AColumn","BColumn","CColumn","DColumn","EColumn"],xn="cutLabel",Br=[...Hr,xn],Fo=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const mr=["Top","Center","Bottom"];function Or(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Fo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=Or(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Fo.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function Mi(e){const t=Or(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Fo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return Mi(e);const i=Mi(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=Mi(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?Mi(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of Fo){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=Mi(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function Yo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qe(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),{type:"row",items:[Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing")]},Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function So(e,t){const n=i=>{const o=Qe(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===xn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(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 Jt(_t(n,t))}function Ea(e,t,n,i){const o=So(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=So(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((s-a)/2,i)}}const Zt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],yi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ai=.004,Jo=ai,jr=50,Wi=1440,Fi=jr/Wi;function Fs(e){const t=typeof e=="number"&&e>0?e:Wi;return jr/t}function Sp(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 Wi}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Li(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Zt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...hi.map(e=>[e,0]),...fi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(yi.map(e=>[e,0]))}function Qi(e){return Object.fromEntries(Zt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Fi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function mo(e,t,n){const i=zr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=hi[o],a=fi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function zr(e,t,n){if(e<=0)return[];const i=Zt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Fi;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Fi;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=zr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Zt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Aa(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Hn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Zt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Zt[l],u=hi[l],w=fi[l],x=yi[l],v=Zt[a],m=hi[a],f=fi[a],E=yi[a],$=n[p],C=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof C=="number"&&(s[m]=C),typeof S=="number"&&(s[f]=S),typeof M=="number"&&(s[E]=M)}return s}function Bs(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 Ap(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Li(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of yi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Bs(e,a)?a:e}function _p(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Li(e),l=Li(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Hn.length,w=S=>{if(p)return S;const M=Qi({...t,...S}),P=Li(S),W=mo(u,P,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=Aa(e),v=Aa(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=Qi({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=Qi({...t,...e}),f=mo(u,l,Qi(t)),$=mo(u,d,m).some((S,M)=>S<(f[M]??S)),C=Zt.some(S=>{const M=e[S],P=t[S];return typeof M=="number"&&typeof P=="number"&&M!==P});return $||C?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Fi,i-o-s-Fi)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Zt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Zo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=hi[d],p=fi[d],u=yi[d];return{key:a,textPrefix:fp[a],widthKey:Zt[d],width:n[Zt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=L.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:f,showVisibility:E,cut:$,showCut:C,cutCellMinHeight:S,cutLabel:M,imageSize:P,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:T,columnsOrder:_,textPaddingLR:H,textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[B,Y]=c.useState(void 0),[ne,oe]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,h=w==="b",ie=c.useRef(null),ge=c.useRef(null),[he,Me]=c.useState(null),[Z,le]=c.useState(Wi),U=Fs(Z),O=Math.max(0,((x??0)-U)/2),N=Math.min(H??0,O),pe=Math.max(N,ai),we=((x??0)+U)/2;c.useLayoutEffect(()=>{if(!n){le(Wi);return}const ee=()=>{le(Sp(ie.current))};ee();const xe=ie.current;if(!xe)return;const ke=new ResizeObserver(ee);ke.observe(xe);let _e=xe;for(;_e&&!_e.style.getPropertyValue("--cntrl-article-width");)_e=_e.parentElement;return _e&&ke.observe(_e),()=>ke.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,C,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Ne=L.buildColorVars(l,{textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),Ie=s&&s!=="default"?`${l}-state-${s}`:"",We=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${Ie}`.trim(),z=b==="reveal"&&(!n||i),de=(E==null?void 0:E[0])??!1,I=(E==null?void 0:E[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const ee=J.current;if(!(ee!==e))return;if(typeof ee.columns=="number"&&typeof e.columns=="number"&&ee.columns!==e.columns){J.current=e;return}const ke=_p(e,ee,{designWidth:Z});J.current=e,Bs(e,ke)&&d(ke)},[e,d,n,a,Z]);const Q=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),me=c.useMemo(()=>Zo(e,hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=c.useMemo(()=>Zo(e,fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Zo(e,yi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Hn],[_]),Ae=c.useMemo(()=>Wp($e,u,Q,me,be,De),[$e,u,Q,me,be,De]),Ue=Li(e),ce=c.useMemo(()=>Zt.slice(0,u).map(ee=>Q[ee]),[u,Q]),Re=c.useMemo(()=>zr(u,Ue,Q),[u,Ue,Q]),ze=c.useMemo(()=>mo(u,Ue,Q),[u,Ue,Q]),Ce=c.useMemo(()=>Ae.map((ee,xe)=>Hs(ze[xe]??0,ee.paddingLeft,ee.paddingRight)),[Ae,ze]),rt=c.useMemo(()=>{const ee=v===0?1/0:v;return(t??[]).slice(0,ee).map((ke,_e)=>({id:_e,cells:Object.fromEntries(Hn.map(Ze=>[Ze,ke[Ze]??""])),image:ke.image,link:ke.link}))},[t,v]),nt=ae?B??$:rt.length,vt=c.useMemo(()=>ae?rt.slice(0,nt):rt,[rt,ae,nt]),Xe=ae&&nt<rt.length,st=vt.length>1||Xe,Rt=[de?`${l}-divider-top`:"",I||st?`${l}-divider-bottom`:""].filter(Boolean).join(" "),Pt=!n||i,bt=()=>{if(!Pt)return;const ee=B??$;if(!C){Y(rt.length);return}Y(Math.min(ee+C,rt.length))},ye=ee=>L.scalingValue(ee,n??!1),He=h?T??0:V??0,qe=g??0,lt=m??0,Wt=He+lt/2,Bt=Math.max(qe,Jo),kt=$a(0,vt.length,de,I,Xe,f??0,n??!1).borderTopWidth,Ot=he!=null?`${he}px`:`calc(${kt} + ${ye(Wt)})`,cn=h?"rowPaddingTopB":"rowPaddingTop",Be=Ae[0],wt=Ae[Ae.length-1],ct=Ce[0],Ye=Ce[Ce.length-1],St=Be&&ct?Math.max(ct.paddingLeft,ai):0,jt=wt&&Ye?Math.max(Ye.paddingRight,ai):0,Cn=Ue,Kt=ee=>{const xe=ie.current;if(!xe)return{x:0,y:0};const ke=xe.getBoundingClientRect();return{x:ee.clientX-ke.left+Ca,y:ee.clientY-ke.top+Ca}},Je=(ee,xe)=>{if(!F)return;const ke=ee.image;if(!(ke!=null&&ke.url)){oe(null);return}const{x:_e,y:Ze}=Kt(xe),Ve=(P==null?void 0:P.min)??80,Oe=(P==null?void 0:P.max)??320,yt=(ne==null?void 0:ne.rowId)===ee.id?ne.widthPx:kp(Ve,Oe);oe({rowId:ee.id,url:ke.url,objectFit:"contain",isVideo:ep(ke),widthPx:yt,x:_e,y:Ze})},en=ee=>{if(!F||!ne)return;const{x:xe,y:ke}=Kt(ee);oe(_e=>!_e||_e.x===xe&&_e.y===ke?_e:{..._e,x:xe,y:ke})},Ft=()=>{oe(null)},Nt=ee=>{z&&wa(ee,l),F&&oe(null)},Fe=ee=>{z&&Sa(ee,l)};c.useLayoutEffect(()=>{if(!p||h){Me(null);return}const ee=ge.current,xe=ee==null?void 0:ee.parentElement;if(!ee||!xe){Me(null);return}const ke=()=>{const Ze=ee.querySelector("[data-list-row]");if(!Ze){Me(null);return}const Ve=xe.getBoundingClientRect(),Oe=Ze.getBoundingClientRect();Me(Oe.top-Ve.top+Oe.height/2)};ke();const _e=new ResizeObserver(ke);return _e.observe(ee),_e.observe(xe),()=>_e.disconnect()},[p,h,vt,He,qe,lt,t,e,Ae,ze,Z,f,de,I,Xe]);const It=c.useMemo(()=>!h&&Hr.some(ee=>{const xe=ee.charAt(0),ke=e[`${ee}VerticalAlign`];return Ws(ke,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var yt;const ee=ie.current;if(!ee)return;const xe=()=>{ee.querySelectorAll("[data-list-col]").forEach(Tt=>{Tt.style.transform="";const et=Tt.querySelector(`.${l}-list-col`);et&&(et.style.minHeight="",et.style.height="");const at=Tt.querySelector(`.${l}-list-col-title`);at&&(at.style.transform="")})};if(h||!It){xe();return}const ke=()=>{const Tt=Array.from(ee.querySelectorAll("[data-list-row]")),et=`${l}-list-col`,at=`${l}-baseline-probe`;Tt.forEach(Ke=>{Ke.querySelectorAll("[data-list-col]").forEach(ut=>{ut.style.transform="";const Lt=ut.querySelector(`.${et}`);Lt&&(Lt.style.minHeight="",Lt.style.height="");const pt=ut.querySelector(`.${l}-list-col-title`);pt&&(pt.style.transform="")})}),Tt.forEach(Ke=>{const ut=Array.from(Ke.querySelectorAll("[data-list-col]"));gp(Ke,ut,et)}),ee.offsetHeight,Tt.forEach(Ke=>{const ut=Array.from(Ke.querySelectorAll("[data-list-col]")),Lt=Ke.getBoundingClientRect().top,pt=new Map,tn=ut.map(tt=>{const qt=tt.querySelector(`.${l}-list-col-title`),Gt={el:tt,titleEl:qt,letter:tt.getAttribute("data-col-letter")??"",kind:tt.getAttribute("data-valign")??"top",anchor:tt.getAttribute("data-valign-anchor")};return pt.set(Gt.letter,Gt),Gt}),it=new Map,Ut=(tt,qt)=>{const Gt=it.get(tt.letter);if(Gt!==void 0)return Gt;const Tn=tt.anchor?pt.get(tt.anchor):void 0;if(tt.kind!=="baseline"||!Tn||qt.has(tt.letter)){const En=Yo(tt,Lt,et,at);return it.set(tt.letter,En),En}qt.add(tt.letter);const Ln=Ut(Tn,qt);qt.delete(tt.letter);const Zn=Yo(tt,Lt,et,at),$i=Ln-Zn;hp(tt.titleEl,$i);const nn=Yo(tt,Lt,et,at);return it.set(tt.letter,nn),nn};tn.forEach(tt=>Ut(tt,new Set))})};let _e=null;const Ze=()=>{_e===null&&(_e=requestAnimationFrame(()=>{_e=null,ke()}))};ke();const Ve=new ResizeObserver(()=>Ze());Ve.observe(ee);let Oe=!1;return typeof document<"u"&&((yt=document.fonts)!=null&&yt.ready)&&document.fonts.ready.then(()=>{Oe||Ze()}),()=>{Oe=!0,_e!==null&&(cancelAnimationFrame(_e),_e=null),Ve.disconnect(),xe()}},[It,h,e,t,Z,vt,ze]);const At=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),r.jsx("div",{style:Ne,children:r.jsxs("div",{ref:ie,className:`${l}-wrapper ${We}${Rt?` ${Rt}`:""}${h?` ${l}-type-b`:""}`.trim(),style:{width:L.scalingValue(x??0,n),...!h&&p?{[`--${l}-first-entry-handle-top`]:Ot}:{}},onMouseMove:F?en:void 0,onMouseLeave:F?Ft:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((ee,xe)=>{var Ve;const ke=(((Ve=ee.link)==null?void 0:Ve.length)??0)>0,_e=ke&&(!n||i)?"a":"div",Ze=$a(xe,vt.length,de,I,Xe,f??0,n??!1);return r.jsxs(_e,{ref:xe===0?Oe=>{ge.current=Oe}:void 0,className:`${l}-list-item${ke||R==="always"?` ${l}-list-item-has-link`:""}`,...ke?{href:ee.link,target:"_blank"}:{},style:Ze,onMouseEnter:Oe=>{z&&(ke||R==="always")&&wa(Oe,l),F&&Je(ee,Oe)},onMouseLeave:Oe=>{z&&(ke||R==="always")&&Sa(Oe,l)},children:[He>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ye(He)}}),r.jsxs("div",{className:`${l}-list-cols-row${h?"":` ${l}-list-cols-row-h`}${p&&xe===0&&h?` ${l}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:ye(lt)},children:[Ae.map((Oe,yt)=>{const Tt=yt===Ae.length-1,et=Ce[yt],at=Oe.paddingBottom,Ke=np(ee.cells[Oe.key]),ut=h&&Ke&&at>0,Lt=h?{minHeight:ye(lt)}:{width:ye(ze[yt])},pt=h?{paddingLeft:ye(N),paddingRight:ye(N)}:{paddingLeft:ye(et.paddingLeft),paddingRight:ye(et.paddingRight)},tn=Oe.textPrefix.charAt(0),it=h?lp(e[`${Oe.textPrefix}VerticalAlign`]):sp(e[`${Oe.textPrefix}VerticalAlign`],e,tn),Ut=h&&Ke&&p&&xe===0;return r.jsxs("div",{className:h?`${l}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":tn,"data-valign":it.kind,...it.kind==="baseline"?{"data-valign-anchor":it.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${Tt?` ${l}-list-col-last`:""}`,style:{...pt,...Lt,...h?{justifyContent:Ta(it.kind)}:{}},"data-test":Oe.width,children:r.jsx("span",{className:Ea(e,Oe.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La(So(e,Oe.textPrefix),n),...Pa(e,Oe.textPrefix,l,n),...h?{}:dp(it.kind)},children:ee.cells[Oe.key]??null})}),ut&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ye(at)}}),Ut&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(Math.max(at,Jo))}})]},Oe.key)}),p&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ye(pe),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ye(Math.max(pe,Ue-pe)),width:ye(pe),height:"100%"}})]})]}),!h&&qe>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ye(qe)}}),p&&xe===0&&!h&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(Bt)}})]},ee.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":cn,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:kt,left:0,width:"100%",height:ye(Math.max(He,Jo))}})},"row-padding-handles"),p&&!h&&Be&&wt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Be.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((ct==null?void 0:ct.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ye(St),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":wt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ae.length-1]-((Ye==null?void 0:Ye.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(Cn-jt),width:ye(jt),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&Ae.slice(0,-1).map((ee,xe)=>{const ke=Ae[xe+1],_e=Re.slice(0,xe+1).reduce((Tt,et)=>Tt+et,0),Ze=Ce[xe],Ve=Ce[xe+1],Oe=Math.max(Ze.paddingRight,ai),yt=Math.max(Ve.paddingLeft,ai);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":ee.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[xe]-Ze.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(_e-Oe),width:ye(Oe),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":ke.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[xe+1]-Ve.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(_e),width:ye(yt),height:"100%"}})]},`${ee.paddingRightKey}-padding`)}),p&&!h&&Ae.slice(0,-1).map((ee,xe)=>{const ke=Rp(xe,Re,ce,Ue),Ze=Re.slice(0,xe+1).reduce((Ve,Oe)=>Ve+Oe,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ee.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(jr),"data-controls-max-fraction":String(ke),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ye(Ze),width:ye(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${ee.widthKey}-junction`)})]}),Xe&&(()=>{const ee=So(e,xn),xe=up(e.cutLabelVerticalAlign),ke=ee.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ye(S??0),cursor:Pt?"pointer":"default",...ip(I,f??0,n??!1)},onClick:Pt?bt:void 0,onMouseEnter:z||F?Nt:void 0,onMouseLeave:z?Fe:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...h?{paddingLeft:ye(N),paddingRight:ye(N)}:{},justifyContent:pp(ee.textTextAlign),alignItems:Ta(xe)},children:r.jsx("span",{className:Ea(e,xn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(ee,n),...Pa(e,xn,l,n),...ke?{width:"100%"}:{}},children:M})})})})(),F&&ne&&(()=>{const ee=po(ne.widthPx),xe={width:ee,height:"auto",maxHeight:ee,objectFit:"contain",left:ne.x,top:ne.y,position:"absolute"};return r.jsx(tp,{media:ne,className:ne.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:xe},`${ne.rowId}-${ne.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
5448
|
+
`}const Fn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],Sn="cutLabel",Br=[...Or,Sn],No=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return No.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return No.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function Mi(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return No.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return Mi(e);const i=Mi(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=Mi(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?Mi(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of No){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=Mi(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function Jo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function $o(e,t){const n=i=>{const o=Je(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Sn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(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 Zt(_t(n,t))}function Ea(e,t,n,i){const o=$o(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=$o(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((s-a)/2,i)}}const Qt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],yi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ai=.004,Zo=ai,zr=50,Wi=1440,Fi=zr/Wi;function Fs(e){const t=typeof e=="number"&&e>0?e:Wi;return zr/t}function Sp(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 Wi}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Li(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Qt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...hi.map(e=>[e,0]),...fi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(yi.map(e=>[e,0]))}function eo(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Fi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function go(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=hi[o],a=fi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=Qt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Fi;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Fi;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Qt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Aa(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Fn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Qt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Qt[l],u=hi[l],w=fi[l],x=yi[l],v=Qt[a],m=hi[a],f=fi[a],E=yi[a],$=n[p],C=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof C=="number"&&(s[m]=C),typeof S=="number"&&(s[f]=S),typeof M=="number"&&(s[E]=M)}return s}function Os(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 Ap(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Li(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of yi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Os(e,a)?a:e}function _p(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Li(e),l=Li(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Fn.length,w=S=>{if(p)return S;const M=eo({...t,...S}),I=Li(S),W=go(u,I,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=Aa(e),v=Aa(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=eo({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=eo({...t,...e}),f=go(u,l,eo(t)),$=go(u,d,m).some((S,M)=>S<(f[M]??S)),C=Qt.some(S=>{const M=e[S],I=t[S];return typeof M=="number"&&typeof I=="number"&&M!==I});return $||C?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Fi,i-o-s-Fi)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Qo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=hi[d],p=fi[d],u=yi[d];return{key:a,textPrefix:fp[a],widthKey:Qt[d],width:n[Qt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=L.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:f,showVisibility:E,cut:$,showCut:C,cutCellMinHeight:S,cutLabel:M,imageSize:I,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:T,columnsOrder:_,textPaddingLR:H,textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[O,Y]=c.useState(void 0),[te,oe]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,h=w==="b",ie=c.useRef(null),he=c.useRef(null),[fe,We]=c.useState(null),[Z,le]=c.useState(Wi),U=Fs(Z),B=Math.max(0,((x??0)-U)/2),N=Math.min(H??0,B),me=Math.max(N,ai),we=((x??0)+U)/2;c.useLayoutEffect(()=>{if(!n){le(Wi);return}const ne=()=>{le(Sp(ie.current))};ne();const xe=ie.current;if(!xe)return;const Ae=new ResizeObserver(ne);Ae.observe(xe);let Ve=xe;for(;Ve&&!Ve.style.getPropertyValue("--cntrl-article-width");)Ve=Ve.parentElement;return Ve&&Ae.observe(Ve),()=>Ae.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,C,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Oe=L.buildColorVars(l,{textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),_e=s&&s!=="default"?`${l}-state-${s}`:"",Fe=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${_e}`.trim(),z=b==="reveal"&&(!n||i),de=(E==null?void 0:E[0])??!1,A=(E==null?void 0:E[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const ne=J.current;if(!(ne!==e))return;if(typeof ne.columns=="number"&&typeof e.columns=="number"&&ne.columns!==e.columns){J.current=e;return}const Ae=_p(e,ne,{designWidth:Z});J.current=e,Os(e,Ae)&&d(Ae)},[e,d,n,a,Z]);const ee=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Qo(e,hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=c.useMemo(()=>Qo(e,fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Qo(e,yi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Pe=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Fn],[_]),Re=c.useMemo(()=>Wp(Pe,u,ee,ge,be,De),[Pe,u,ee,ge,be,De]),qe=Li(e),ce=c.useMemo(()=>Qt.slice(0,u).map(ne=>ee[ne]),[u,ee]),ke=c.useMemo(()=>Vr(u,qe,ee),[u,qe,ee]),ze=c.useMemo(()=>go(u,qe,ee),[u,qe,ee]),Te=c.useMemo(()=>Re.map((ne,xe)=>Hs(ze[xe]??0,ne.paddingLeft,ne.paddingRight)),[Re,ze]),rt=c.useMemo(()=>{const ne=v===0?1/0:v;return(t??[]).slice(0,ne).map((Ae,Ve)=>({id:Ve,cells:Object.fromEntries(Fn.map(Ye=>[Ye,Ae[Ye]??""])),image:Ae.image,link:Ae.link}))},[t,v]),nt=ae?O??$:rt.length,vt=c.useMemo(()=>ae?rt.slice(0,nt):rt,[rt,ae,nt]),Ue=ae&&nt<rt.length,at=vt.length>1||Ue,Rt=[de?`${l}-divider-top`:"",A||at?`${l}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,bt=()=>{if(!It)return;const ne=O??$;if(!C){Y(rt.length);return}Y(Math.min(ne+C,rt.length))},ve=ne=>L.scalingValue(ne,n??!1),Be=h?T??0:V??0,Ze=g??0,Ke=m??0,Wt=Be+Ke/2,Ht=Math.max(Ze,Zo),Ft=$a(0,vt.length,de,A,Ue,f??0,n??!1).borderTopWidth,zt=fe!=null?`${fe}px`:`calc(${Ft} + ${ve(Wt)})`,cn=h?"rowPaddingTopB":"rowPaddingTop",He=Re[0],Lt=Re[Re.length-1],st=Te[0],Qe=Te[Te.length-1],gt=He&&st?Math.max(st.paddingLeft,ai):0,Vt=Lt&&Qe?Math.max(Qe.paddingRight,ai):0,Ut=qe,tn=ne=>{const xe=ie.current;if(!xe)return{x:0,y:0};const Ae=xe.getBoundingClientRect();return{x:ne.clientX-Ae.left+Ca,y:ne.clientY-Ae.top+Ca}},mn=(ne,xe)=>{if(!F)return;const Ae=ne.image;if(!(Ae!=null&&Ae.url)){oe(null);return}const{x:Ve,y:Ye}=tn(xe),et=(I==null?void 0:I.min)??80,$e=(I==null?void 0:I.max)??320,Et=(te==null?void 0:te.rowId)===ne.id?te.widthPx:kp(et,$e);oe({rowId:ne.id,url:Ae.url,objectFit:"contain",isVideo:ep(Ae),widthPx:Et,x:Ve,y:Ye})},Ge=ne=>{if(!F||!te)return;const{x:xe,y:Ae}=tn(ne);oe(Ve=>!Ve||Ve.x===xe&&Ve.y===Ae?Ve:{...Ve,x:xe,y:Ae})},nn=()=>{oe(null)},Ot=ne=>{z&&wa(ne,l),F&&oe(null)},Ne=ne=>{z&&Sa(ne,l)};c.useLayoutEffect(()=>{if(!p||h){We(null);return}const ne=he.current,xe=ne==null?void 0:ne.parentElement;if(!ne||!xe){We(null);return}const Ae=()=>{const Ye=ne.querySelector("[data-list-row]");if(!Ye){We(null);return}const et=xe.getBoundingClientRect(),$e=Ye.getBoundingClientRect();We($e.top-et.top+$e.height/2)};Ae();const Ve=new ResizeObserver(Ae);return Ve.observe(ne),Ve.observe(xe),()=>Ve.disconnect()},[p,h,vt,Be,Ze,Ke,t,e,Re,ze,Z,f,de,A,Ue]);const ft=c.useMemo(()=>!h&&Or.some(ne=>{const xe=ne.charAt(0),Ae=e[`${ne}VerticalAlign`];return Ws(Ae,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var Et;const ne=ie.current;if(!ne)return;const xe=()=>{ne.querySelectorAll("[data-list-col]").forEach(ht=>{ht.style.transform="";const yt=ht.querySelector(`.${l}-list-col`);yt&&(yt.style.minHeight="",yt.style.height="");const lt=ht.querySelector(`.${l}-list-col-title`);lt&&(lt.style.transform="")})};if(h||!ft){xe();return}const Ae=()=>{const ht=Array.from(ne.querySelectorAll("[data-list-row]")),yt=`${l}-list-col`,lt=`${l}-baseline-probe`;ht.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(xt=>{xt.style.transform="";const ct=xt.querySelector(`.${yt}`);ct&&(ct.style.minHeight="",ct.style.height="");const $t=xt.querySelector(`.${l}-list-col-title`);$t&&($t.style.transform="")})}),ht.forEach(Me=>{const xt=Array.from(Me.querySelectorAll("[data-list-col]"));gp(Me,xt,yt)}),ne.offsetHeight,ht.forEach(Me=>{const xt=Array.from(Me.querySelectorAll("[data-list-col]")),ct=Me.getBoundingClientRect().top,$t=new Map,kt=xt.map(it=>{const Bt=it.querySelector(`.${l}-list-col-title`),Gt={el:it,titleEl:Bt,letter:it.getAttribute("data-col-letter")??"",kind:it.getAttribute("data-valign")??"top",anchor:it.getAttribute("data-valign-anchor")};return $t.set(Gt.letter,Gt),Gt}),St=new Map,Nt=(it,Bt)=>{const Gt=St.get(it.letter);if(Gt!==void 0)return Gt;const Ln=it.anchor?$t.get(it.anchor):void 0;if(it.kind!=="baseline"||!Ln||Bt.has(it.letter)){const on=Jo(it,ct,yt,lt);return St.set(it.letter,on),on}Bt.add(it.letter);const Bn=Nt(Ln,Bt);Bt.delete(it.letter);const En=Jo(it,ct,yt,lt),Zn=Bn-En;hp(it.titleEl,Zn);const Qn=Jo(it,ct,yt,lt);return St.set(it.letter,Qn),Qn};kt.forEach(it=>Nt(it,new Set))})};let Ve=null;const Ye=()=>{Ve===null&&(Ve=requestAnimationFrame(()=>{Ve=null,Ae()}))};Ae();const et=new ResizeObserver(()=>Ye());et.observe(ne);let $e=!1;return typeof document<"u"&&((Et=document.fonts)!=null&&Et.ready)&&document.fonts.ready.then(()=>{$e||Ye()}),()=>{$e=!0,Ve!==null&&(cancelAnimationFrame(Ve),Ve=null),et.disconnect(),xe()}},[ft,h,e,t,Z,vt,ze]);const At=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),r.jsx("div",{style:Oe,children:r.jsxs("div",{ref:ie,className:`${l}-wrapper ${Fe}${Rt?` ${Rt}`:""}${h?` ${l}-type-b`:""}`.trim(),style:{width:L.scalingValue(x??0,n),...!h&&p?{[`--${l}-first-entry-handle-top`]:zt}:{}},onMouseMove:F?Ge:void 0,onMouseLeave:F?nn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((ne,xe)=>{var et;const Ae=(((et=ne.link)==null?void 0:et.length)??0)>0,Ve=Ae&&(!n||i)?"a":"div",Ye=$a(xe,vt.length,de,A,Ue,f??0,n??!1);return r.jsxs(Ve,{ref:xe===0?$e=>{he.current=$e}:void 0,className:`${l}-list-item${Ae||R==="always"?` ${l}-list-item-has-link`:""}`,...Ae?{href:ne.link,target:"_blank"}:{},style:Ye,onMouseEnter:$e=>{z&&(Ae||R==="always")&&wa($e,l),F&&mn(ne,$e)},onMouseLeave:$e=>{z&&(Ae||R==="always")&&Sa($e,l)},children:[Be>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Be)}}),r.jsxs("div",{className:`${l}-list-cols-row${h?"":` ${l}-list-cols-row-h`}${p&&xe===0&&h?` ${l}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:ve(Ke)},children:[Re.map(($e,Et)=>{const ht=Et===Re.length-1,yt=Te[Et],lt=$e.paddingBottom,Me=np(ne.cells[$e.key]),xt=h&&Me&<>0,ct=h?{minHeight:ve(Ke)}:{width:ve(ze[Et])},$t=h?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(yt.paddingLeft),paddingRight:ve(yt.paddingRight)},kt=$e.textPrefix.charAt(0),St=h?lp(e[`${$e.textPrefix}VerticalAlign`]):sp(e[`${$e.textPrefix}VerticalAlign`],e,kt),Nt=h&&Me&&p&&xe===0;return r.jsxs("div",{className:h?`${l}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":kt,"data-valign":St.kind,...St.kind==="baseline"?{"data-valign-anchor":St.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${ht?` ${l}-list-col-last`:""}`,style:{...$t,...ct,...h?{justifyContent:Ta(St.kind)}:{}},"data-test":$e.width,children:r.jsx("span",{className:Ea(e,$e.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La($o(e,$e.textPrefix),n),...Pa(e,$e.textPrefix,l,n),...h?{}:dp(St.kind)},children:ne.cells[$e.key]??null})}),xt&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(lt)}}),Nt&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":$e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(lt,Zo))}})]},$e.key)}),p&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(me),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(me,qe-me)),width:ve(me),height:"100%"}})]})]}),!h&&Ze>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Ze)}}),p&&xe===0&&!h&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Ht)}})]},ne.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":cn,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Ft,left:0,width:"100%",height:ve(Math.max(Be,Zo))}})},"row-padding-handles"),p&&!h&&He&&Lt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":He.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((st==null?void 0:st.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(gt),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Lt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Re.length-1]-((Qe==null?void 0:Qe.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ut-Vt),width:ve(Vt),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&Re.slice(0,-1).map((ne,xe)=>{const Ae=Re[xe+1],Ve=ke.slice(0,xe+1).reduce((ht,yt)=>ht+yt,0),Ye=Te[xe],et=Te[xe+1],$e=Math.max(Ye.paddingRight,ai),Et=Math.max(et.paddingLeft,ai);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":ne.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[xe]-Ye.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ve-$e),width:ve($e),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Ae.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[xe+1]-et.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ve),width:ve(Et),height:"100%"}})]},`${ne.paddingRightKey}-padding`)}),p&&!h&&Re.slice(0,-1).map((ne,xe)=>{const Ae=Rp(xe,ke,ce,qe),Ye=ke.slice(0,xe+1).reduce((et,$e)=>et+$e,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ne.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Ye),width:ve(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${ne.widthKey}-junction`)})]}),Ue&&(()=>{const ne=$o(e,Sn),xe=up(e.cutLabelVerticalAlign),Ae=ne.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ve(S??0),cursor:It?"pointer":"default",...ip(A,f??0,n??!1)},onClick:It?bt:void 0,onMouseEnter:z||F?Ot:void 0,onMouseLeave:z?Ne:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...h?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:pp(ne.textTextAlign),alignItems:Ta(xe)},children:r.jsx("span",{className:Ea(e,Sn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(ne,n),...Pa(e,Sn,l,n),...Ae?{width:"100%"}:{}},children:M})})})})(),F&&te&&(()=>{const ne=mo(te.widthPx),xe={width:ne,height:"auto",maxHeight:ne,objectFit:"contain",left:te.x,top:te.y,position:"absolute"};return r.jsx(tp,{media:te,className:te.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:xe},`${te.rowId}-${te.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
5449
5449
|
import { CommonComponentProps } from '../props';
|
|
5450
5450
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
5451
5451
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -8402,7 +8402,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8402
8402
|
</>
|
|
8403
8403
|
);
|
|
8404
8404
|
}
|
|
8405
|
-
`,Si=["A","B","C","D","E"],_a=[...mr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Vn={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 Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function eo(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Bp(){return Object.fromEntries(Si.map((e,t)=>{const n=Hn[t],i=`${e} column`;return[n,Hp(i)]}))}function Op(){const e={};for(const t of Si)e[`${t}ColumnWidth`]=eo(`${t} column width`),e[`${t}ColumnPaddingLeft`]=eo(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=eo(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=eo(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Hn]};for(const s of Si)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===xn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...mr]},enum:[...mr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[..._a],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[..._a]}}return t[Qe(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qe(e,"textFontSettings")]={...Vn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qe(e,"textFontSize")]={...Vn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qe(e,"textLineHeight")]={...Vn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qe(e,"textLetterSpacing")]={...Vn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qe(e,"textWordSpacing")]={...Vn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qe(e,"textTextAlign")]={...Vn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qe(e,"textTextAppearance")]={...Vn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===xn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===xn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Or(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qe(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qe(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qe(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qe(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qe(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qe(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qe(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qe(e,"textTextAppearance")]=t.textTextAppearance),o}function go(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=go(),Up=bp();function Os(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing"),Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Hr.forEach((t,n)=>{const i=Hn[n],o=Os(t);for(let s=1;s<Hn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Os(xn);const Yp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Dn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Dn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Dn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Dn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Dn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Dn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Dn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Dn[6],link:""}],Zp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Bp(),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:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Op(),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"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...go({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...go({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...go({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.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}},...Si.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ap(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,Rn=.004,tm={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"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:L.scalingValue((o-t)/2,i)}}function om(e){return`
|
|
8405
|
+
`,Si=["A","B","C","D","E"],_a=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Vn={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 Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function to(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Op(){return Object.fromEntries(Si.map((e,t)=>{const n=Fn[t],i=`${e} column`;return[n,Hp(i)]}))}function Bp(){const e={};for(const t of Si)e[`${t}ColumnWidth`]=to(`${t} column width`),e[`${t}ColumnPaddingLeft`]=to(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=to(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=to(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Fn]};for(const s of Si)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===Sn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[..._a],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[..._a]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...Vn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...Vn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...Vn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...Vn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...Vn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...Vn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...Vn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===Sn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Sn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function ho(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=ho(),Up=bp();function Bs(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=Fn[n],o=Bs(t);for(let s=1;s<Fn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Bs(Sn);const Yp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Dn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Dn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Dn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Dn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Dn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Dn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Dn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Dn[6],link:""}],Zp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Op(),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:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bp(),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"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...ho({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({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},...ho({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({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},...ho({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.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}},...Si.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ap(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,An=.004,tm={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"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:L.scalingValue((o-t)/2,i)}}function om(e){return`
|
|
8406
8406
|
.${e}-wrapper {
|
|
8407
8407
|
box-sizing: border-box;
|
|
8408
8408
|
display: flex;
|
|
@@ -8595,7 +8595,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8595
8595
|
left: 20px;
|
|
8596
8596
|
transform: translateY(-50%);
|
|
8597
8597
|
}
|
|
8598
|
-
`}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=L.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:f=.00833,iconPaddingRight:E=0,iconAnimation:$="rotate 45",questionColor:C="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:
|
|
8598
|
+
`}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=L.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:f=.00833,iconPaddingRight:E=0,iconAnimation:$="rotate 45",questionColor:C="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:I="#000000",questionHoverColor:W="#666666",iconHoverColor:b="#666666",iconActiveColor:R="#000000",dividerHoverColor:V="#000000",questionFontFamily:g,questionFontSettings:T,questionFontSize:_,questionLineHeight:H,questionLetterSpacing:K,questionWordSpacing:se,questionTextAppearance:j,answerFontFamily:k,answerFontSettings:X,answerFontSize:q,answerLineHeight:O,answerLetterSpacing:Y,answerWordSpacing:te,answerTextAppearance:oe,questionPaddingLeft:F=0,questionPaddingTop:ae=0,questionPaddingBottom:h=0,answerPaddingLeft:ie=0,answerPaddingRight:he=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,Z=t??[],[le,U]=c.useState(()=>new Set),B=!n||i;c.useEffect(()=>{U(new Set)},[v]),c.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const N=ve=>L.scalingValue(ve,n??!1),me=Math.max(F,An),we=Math.max(ae,An),Oe=Math.max(h,An),_e=Math.max(ie,An),Se=Math.max(he,An),Fe=Math.max(fe,An),z=Math.max(We,An),de=Math.max(0,(l??1)-E-f),A=Math.max(0,(l??1)-he),J=Math.max(0,(l??1)-ie),D=Math.max(E,An),ee=Math.max(0,(l??1)-F-f),ge=c.useMemo(()=>le.size===0?0:Math.min(...le),[le]),be=c.useCallback(ve=>le.has(ve),[le]),De=B&&x==="default"?`${a}-entry-hover-default`:"",Pe=m??"",Re=Pe!=="",qe=$.replace(/^rotate /,""),ce=`${a}-icon-anim-${qe}`,ke=Zt(_t(Na(g,T,_,H,K,se,j,C),n)),ze=Zt(_t(Na(k,X,q,O,Y,te,oe,S),n)),Te=Wa(_,H,`${a}-question`,`${a}-text-tight-leading`),rt=Wa(q,O,`${a}-answer-text`,`${a}-text-tight-leading`),nt=Fa(_,H,a,n),vt=Fa(q,O,a,n),Ue=L.buildColorVars(a,{questionColor:C,answerColor:S,dividerColor:M,iconColor:I,questionHoverColor:W,iconHoverColor:b,iconActiveColor:R,dividerHoverColor:V},tm,nm),at=s&&s!=="default"?`${a}-state-${s}`:"",Rt=c.useCallback(ve=>{B&&U(Be=>{if(Be.has(ve)){const Ke=new Set(Be);return Ke.delete(ve),Ke}if(v==="on")return new Set([ve]);const Ze=new Set(Be);return Ze.add(ve),Ze})},[B,v]),It=c.useMemo(()=>om(a),[a]),bt={[`--${a}-divider-width`]:L.scalingValue(u,n??!1),[`--${a}-divider-style`]:w,[`--${a}-icon-max-width`]:L.scalingValue(f,n??!1),...p>0?{[`--${a}-question-min-height`]:L.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:It}}),r.jsx("div",{style:Ue,children:r.jsx("div",{className:Xe(`${a}-wrapper`,n&&!i&&`${a}-editor`,De,at),style:{width:L.scalingValue(l,n??!1),maxWidth:"100%",...bt},children:Z.map((ve,Be)=>{var zt;const Ze=be(Be),Ke=((zt=ve.question)==null?void 0:zt.trim())??"",Wt=ve.answer,Ht=((Wt==null?void 0:Wt.length)??0)>0,Ft=d&&Be===ge;return r.jsxs("div",{className:Xe(`${a}-item`,Ze&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Ft&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(we),zIndex:2}}),r.jsx(Mt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(de),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(me),height:"100%",zIndex:2}}),r.jsx(Mt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(D),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ze,style:{...ke,...nt,paddingLeft:N(F),paddingRight:N(E)},onClick:()=>Rt(Be),children:[ae>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Te,children:Ke}),Ht&&(Re?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ce}`,"aria-hidden":"true",children:r.jsx(sn,{url:Pe,fill:I,hoverFill:b,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ce}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(h)},"aria-hidden":"true"})]}),Ft&&r.jsx(Mt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(Oe),zIndex:2}})]}),Ht&&Wt&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ze,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Ft&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Fe),zIndex:2}}),r.jsx(Mt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(A),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(_e),height:"100%",zIndex:2}}),r.jsx(Mt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(Se),height:"100%",zIndex:2}})]}),fe>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(fe)}}),r.jsx("div",{className:`${a}-answer`,style:{...ze,...vt,paddingLeft:N(ie),paddingRight:N(he)},children:r.jsx("div",{className:rt,children:r.jsx(gi,{content:Wt})})}),We>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(We)}}),Ft&&r.jsx(Mt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(z),zIndex:2}})]})})})]},Be)})})})]})}const am=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8599
8599
|
import cn from 'classnames';
|
|
8600
8600
|
import { CommonComponentProps } from '../props';
|
|
8601
8601
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -9392,7 +9392,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9392
9392
|
</>
|
|
9393
9393
|
);
|
|
9394
9394
|
}
|
|
9395
|
-
`;function kn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:kn("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:{...Ha.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:{...Ha.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:kn("Question Padding Left"),questionPaddingTop:kn("Question Padding Top"),questionPaddingBottom:kn("Question Padding Bottom"),answerPaddingLeft:kn("Answer Padding Left"),answerPaddingRight:kn("Answer Padding Right"),answerPaddingTop:kn("Answer Padding Top"),answerPaddingBottom:kn("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,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"}]},schema:lm,sourceCode:am},wn=e=>e.display==="cover",No=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ba=100,dm=.2,Oa=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Ba:Math.max(Ba,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const T=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-g/T*.12);return`translateY(${g}px) scale(${_})`},[]),m=c.useCallback(()=>{l.current=null},[]),f=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),E=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),C=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=g.clientX-T.startX,H=g.clientY-T.startY;if(T.isLocked===null){if(Math.abs(_)<Oa&&Math.abs(H)<Oa)return;if(H>0&&H>Math.abs(_))T.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{T.isLocked=!1,m();return}}if(!T.isLocked)return;g.preventDefault();const K=Math.max(0,H);p.current=K,s(K)},[e,m]),S=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=T.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!_){m();return}g.clientY-T.startY>=u?E():f()},[u,E,e,m,f]),M=c.useCallback(g=>{S(g)},[S]),P=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:C,onPointerUp:M,onPointerCancel:P}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,f)=>{mm(t),e.scrollLeft=m,f&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},di=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,ho=42,xm=2,wm=16,Sm=.05,$m=1,ja=.15,Cm=20,ni=.004,Ki=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},Qo=e=>`max(${e}, ${Cm}px)`,Pm=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]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Am=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")],_m=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Tm[e],Am(e)]))}),Vr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Vr(e,t),to=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},er=(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[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:f,thumbnailVisibility:E,thumbnailObjectFit:$,thumbnailActive:C,thumbnailActiveColor:S,title1Width:M,title2Width:P,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:T="desktop",contentMarginTop:_,iconMarginLeft:H}=n,K=y=>L.scalingValue(y,i??!1),se=K(l),j=K(p??.02),k=K(u??0),X=K(_??0),q=K(H??0),{title1:B,title2:Y,title3:ne}=Im(t),oe=tr("title1",er(n,"title1"),i),F=tr("title2",er(n,"title2"),i),ae=tr("title3",er(n,"title3"),i),h=T==="mobile",ie=!o&&(!i||s),ge=ie,he=ie,Me=ie,Z=wn($),le=Z?{"--image-aspect-ratio":No($)}:void 0,U=!!(B||Y||ne),O=c.useMemo(()=>Rm(e,B,Y,ne,oe,F,ae),[e,B,Y,ne,oe,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:P,title3Width:W}),[M,P,W]),pe=c.useMemo(()=>O.map(y=>N[y.widthKey]),[O,N]),we=c.useMemo(()=>Vr(O.length,pe),[O.length,pe]),Ne=c.useMemo(()=>Vs(O.length,pe),[O.length,pe]),Ie=c.useMemo(()=>O.filter(y=>y.prefix==="title1"),[O]),ve=c.useMemo(()=>O.filter(y=>y.prefix==="title2"||y.prefix==="title3"),[O]),We=c.useMemo(()=>za(Ie,N),[Ie,N]),z=c.useMemo(()=>za(ve,N),[ve,N]),de=c.useCallback((y,G)=>{const te=O.indexOf(y);if(!h||G==="single-row")return{effectiveWidth:Ne[te]??0,resolvedWidth:we[te]??0,maxWidth:to(te,we)};if(G==="two-row-top"){const Le=Ie.indexOf(y);return{effectiveWidth:We.effective[Le]??0,resolvedWidth:We.resolved[Le]??0,maxWidth:to(Le,We.resolved)}}const fe=ve.indexOf(y);return{effectiveWidth:z.effective[fe]??0,resolvedWidth:z.resolved[fe]??0,maxWidth:to(fe,z.resolved)}},[ve,z,Ne,we,O,Ie,We,h]),I=c.useCallback(y=>L.scalingValue(y,i??!1),[i]),J=I(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),Q=c.useCallback(y=>O.slice(0,y+1).reduce((G,te,fe)=>G+(te!=null&&te.marginLeftKey?D[te.marginLeftKey]??0:0)+(we[fe]??0),0)+(h?0:b??0),[O,D,we,h,b]),me=c.useCallback(()=>h?0:b??0,[h,b]),be=c.useCallback(y=>ve.slice(0,y).reduce((G,te,fe)=>G+(te.marginLeftKey?D[te.marginLeftKey]??0:0)+(z.resolved[fe]??0),0),[ve,z.resolved,D]),De=c.useCallback(y=>{const G=ve[y];return be(y)+(G.marginLeftKey?D[G.marginLeftKey]??0:0)+(z.resolved[y]??0)},[ve,z.resolved,be,D]),$e=(y,G)=>{const te=y.marginLeftKey?D[y.marginLeftKey]??0:0,{effectiveWidth:fe,resolvedWidth:Le,maxWidth:dt}=de(y,G),$t=o&&G==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":y.prefix,style:{...G==="single-row"?{gridArea:y.prefix}:{},width:I(fe),...te>0?{marginLeft:I(te)}:{}},children:[r.jsx("p",{className:y.className,style:y.style,children:y.text}),$t&&y.marginLeftKey&&r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:I(-te),width:`max(${I(te)}, 10px)`,height:"100%",pointerEvents:"auto"}}),$t&&r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:I(-ni/2),width:I(ni),height:"100%",pointerEvents:"auto"}})]},y.className)},Ae=()=>{const y=h?-1:O.findIndex(fe=>fe.prefix==="title1"),G=!h&&(o||(b??0)>0)?(()=>{const fe=b??0,Le=y>=0?we[y]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:0,width:`max(${I(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,te=O.flatMap((fe,Le)=>{if(!fe.marginLeftKey)return[];const dt=D[fe.marginLeftKey]??0,$t=km(O,we,D,Le)+me();return r.jsx("div",{"data-controls":fe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we[Le]),style:{position:"absolute",top:0,left:I($t),width:`max(${I(dt)}, 10px)`,height:"100%",pointerEvents:"auto"}},fe.marginLeftKey)});return G?[G,...te]:te},Ue=()=>O.map((y,G)=>{const te=to(G,we),Le=Q(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(te),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:I(Le),width:I(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ce=()=>ve.flatMap((y,G)=>{if(!y.marginLeftKey)return[];const te=D[y.marginLeftKey]??0,fe=be(G),{resolvedWidth:Le}=de(y,"two-row-bottom");return r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Le),style:{position:"absolute",top:0,left:I(fe),width:`max(${I(te)}, 10px)`,height:"100%",pointerEvents:"auto"}},y.marginLeftKey)}),Re=()=>ve.map((y,G)=>{const{maxWidth:te}=de(y,"two-row-bottom"),Le=De(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(te),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:I(Le),width:I(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ze=c.useRef(null),Ce=c.useRef(null),rt=c.useRef(null),nt=c.useRef([]),vt=c.useRef(0),Xe=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),st=c.useRef(null),Rt=c.useRef(0),Pt=c.useRef("forward"),bt=c.useRef(0),ye=c.useRef(null),He=c.useRef(!1),qe=t.length>1&&(!o||!!s),lt=qe?3:1,Wt=c.useMemo(()=>Array.from({length:lt},()=>t).flat(),[t,lt]),[Bt,kt]=c.useState(!1),[Ot,cn]=c.useState(!1),[Be,wt]=c.useState(!0),[ct,Ye]=c.useState(0),St=c.useRef(ct);St.current=ct;const jt=c.useRef(null),Cn=c.useRef(!1),Kt=c.useRef(null),Je=c.useRef(null),en=ge&&!Be,Ft=c.useCallback(()=>{ge&&(wt(!0),Je.current&&clearTimeout(Je.current),Je.current=setTimeout(()=>{Xe.current.isActive||wt(!1)},bm))},[ge]),Nt=c.useCallback(()=>{o||Cn.current||(Cn.current=!0,cn(!1),Kt.current=setTimeout(()=>{a()},di))},[o,a]),Fe=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":en?"true":"false",style:{width:L.scalingValue(x??0,i),height:L.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Nt,"aria-label":"Close",children:r.jsx(sn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),It=(y="two-row")=>r.jsx("div",{...y==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:I(b??0),flexShrink:0,...y==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...y==="two-row"&&o?{pointerEvents:"auto"}:{}}}),At=()=>{const y=O.find(fe=>fe.prefix==="title1"),G=O.filter(fe=>fe.prefix==="title2"||fe.prefix==="title3"),te=G.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?It():null,y&&$e(y,"two-row-top"),w&&Fe()]}),te?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[G.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[G.map(fe=>$e(fe,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ce(),Re()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ee=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?It("single-row"):null,O.map(y=>$e(y,"single-row")),o?r.jsxs(r.Fragment,{children:[Ae(),Ue()]}):null,w?Fe():null]}),xe=c.useCallback(y=>!!(y.closest("[data-controls]")||y.closest(`.${e}-thumbnails`)||y.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ke,backdropStyle:_e,mediaAreaStyle:Ze,overlayContentStyle:Ve,swipeHandlers:Oe,dismissAreaStyle:yt}=js({enabled:ie??!1,onClose:Nt,animMs:di,isBlockedTarget:xe}),Tt=()=>{if(!qe||t.length===0)return vt.current=0,0;const y=nt.current[0],G=nt.current[t.length];if(!y||!G)return vt.current;const te=G.offsetLeft-y.offsetLeft;return te>0&&(vt.current=te),vt.current},et=(y=!1)=>{if(!qe)return;const G=Ce.current,te=Tt();!G||te<=0||(G.scrollLeft<=0?(G.scrollLeft+=te,y&&(Xe.current.scrollLeft+=te),He.current&&(bt.current+=te)):G.scrollLeft>=te*2&&(G.scrollLeft-=te,y&&(Xe.current.scrollLeft-=te),He.current&&(bt.current-=te)))},at=(y=(G=>(G=Ce.current)==null?void 0:G.scrollLeft)()??0)=>{var $t;const te=(($t=Ce.current)==null?void 0:$t.clientWidth)??0,fe=y+te/2;let Le=-1,dt={flatIndex:0,distance:1/0};return nt.current.forEach((zt,In)=>{if(!zt)return;const An=zt.offsetLeft,mn=An+zt.offsetWidth;Le===-1&&fe>=An&&fe<mn&&(Le=In);const A=Math.abs(An-y);A<dt.distance&&(dt={flatIndex:In,distance:A})}),Le!==-1?Le:dt.flatIndex},Ke=y=>{const G=Ce.current;return!y||!G?!1:y.offsetWidth>G.clientWidth+1},ut=y=>{Ce.current&&nt.current.forEach(G=>{G&&(G.style.scrollSnapAlign=Ke(G)&&y==="backward"?"end":"start")})},Lt=y=>{const G=Ce.current;if(!y||!G||!Ke(y))return!1;const te=y.offsetLeft,fe=te+y.offsetWidth;return G.scrollLeft>=te-1&&G.scrollLeft+G.clientWidth<=fe+1},pt=()=>{!Ce.current||t.length===0||jt.current===null&&Ye(at()%t.length)},tn=()=>{jt.current=null},it=y=>{const G=Ce.current;G&&(G.style.scrollSnapType=y?"":"none")},Ut=()=>{var y;(y=st.current)==null||y.call(st),st.current=null},tt=()=>{ye.current!==null&&(cancelAnimationFrame(ye.current),ye.current=null),He.current=!1},qt=()=>{const y=Ce.current;if(!y){ye.current=null,He.current=!1;return}const G=bt.current-y.scrollLeft;if(Math.abs(G)<.5){y.scrollLeft=bt.current,et(),pt(),ye.current=null,He.current=!1;return}y.scrollLeft+=G*Sm,et(),pt(),Ft(),ye.current=requestAnimationFrame(qt)},Gt=()=>{const y=rt.current;y&&(y.style.transition="",y.style.transform="",y.style.willChange="")},Tn=(y,G,te,fe)=>{Gt(),y.scrollLeft=G,Rt.current=y.scrollLeft,et(),te!==void 0?Ye(te):pt(),it(!0),fe==null||fe()},Ln=(y,{behavior:G="smooth",activeIndex:te,onComplete:fe}={})=>{const Le=Ce.current,dt=rt.current;if(!Le||!dt)return;if(tt(),Ut(),it(!1),G==="auto"){Tn(Le,y,te,fe);return}const $t=Math.abs(y-Le.scrollLeft),zt=pm($t,fm,ym,Le.clientWidth*.55);st.current=hm(Le,dt,y,{duration:zt,easing:vm,onComplete:()=>{st.current=null,Tn(Le,y,te,fe)}})},Zn=(y="smooth")=>{if(!Ce.current||t.length===0)return;const te=at(),fe=nt.current[te];fe&&Ln(fe.offsetLeft,{behavior:y,activeIndex:te%t.length})},$i=(y,G="smooth")=>{const te=Ce.current;if(!te||t.length===0)return;const fe=te.scrollLeft-y,Le=at(te.scrollLeft),dt=nt.current[Le];if(Lt(dt)){it(!0),pt();return}const $t=nt.current[Le+1],zt=dt?$t?$t.offsetLeft-dt.offsetLeft:dt.offsetWidth:0,In=zt>0?fe>zt*ja?1:fe<-zt*ja?-1:0:0,An=qe?Le+In:Math.max(0,Math.min(Wt.length-1,Le+In)),mn=nt.current[An];if(!mn){Zn(G);return}const re=fe<0&&Ke(mn)?mn.offsetLeft+mn.offsetWidth-te.clientWidth:mn.offsetLeft,Ee=An%t.length;G==="smooth"&&(jt.current=Ee),Ye(Ee),Ln(re,{behavior:G,activeIndex:Ee,onComplete:G==="smooth"?tn:void 0})},nn=(y,G="smooth")=>{const te=Ce.current,fe=qe?t.length+y:y,Le=nt.current[fe];!te||!Le||(G==="smooth"?jt.current=y:jt.current=null,Ye(y),Ln(Le.offsetLeft,{behavior:G,activeIndex:y,onComplete:G==="smooth"?tn:void 0}))},En=y=>{if(!he)return;if(y.pointerType==="touch"){tt(),it(!0);return}if(y.pointerType!=="mouse"||y.button!==0||xe(y.target))return;const G=Ce.current;G&&(tt(),Ut(),Gt(),jt.current=null,Xe.current={isActive:!0,startX:y.clientX,scrollLeft:G.scrollLeft,hasMoved:!1},it(!1),Ft(),G.setPointerCapture(y.pointerId))},Qn=y=>{if(!he||y.pointerType!=="mouse")return;const G=Ce.current;if(!G||!Xe.current.isActive)return;const te=y.clientX-Xe.current.startX;Math.abs(te)>$m&&(Xe.current.hasMoved=!0,kt(!0)),Xe.current.hasMoved&&(y.preventDefault(),G.scrollLeft=Xe.current.scrollLeft-te,et(!0),pt(),Ft())},Pn=y=>{if(!he||y.pointerType!=="mouse")return;const G=Ce.current;if(!G)return;const te=Xe.current.hasMoved,fe=Xe.current.scrollLeft;Xe.current.isActive=!1,kt(!1),G.hasPointerCapture(y.pointerId)&&G.releasePointerCapture(y.pointerId),et(),te?$i(fe):(it(!0),pt()),Ft()};return zs(),c.useEffect(()=>{const y=requestAnimationFrame(()=>cn(!0));return()=>{cancelAnimationFrame(y),Ut(),Kt.current&&clearTimeout(Kt.current),Je.current&&clearTimeout(Je.current)}},[]),c.useEffect(()=>{if(!ge){wt(!0);return}Ft();const y=ze.current;if(!y)return;const G=()=>Ft();return y.addEventListener("pointermove",G),y.addEventListener("pointerdown",G),()=>{y.removeEventListener("pointermove",G),y.removeEventListener("pointerdown",G),Je.current&&clearTimeout(Je.current)}},[ge,Ft]),c.useEffect(()=>{const y=G=>{G.key==="Escape"&&Nt()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[Nt]),c.useLayoutEffect(()=>{Tt()},[k,t.length,qe]),c.useLayoutEffect(()=>{o||nn(St.current,"auto")},[k,o]),c.useLayoutEffect(()=>{nn(0,"auto")},[t.length,qe]),c.useEffect(()=>{const y=Ce.current;if(!y||o||!ie)return;const G=te=>{if(te.preventDefault(),Math.abs(te.deltaY)<=Math.abs(te.deltaX))return;const fe=te.deltaMode===1?wm:te.deltaMode===2?y.clientHeight:1,Le=te.deltaY*fe*xm;if(Le!==0){if(Ut(),He.current||(He.current=!0,bt.current=y.scrollLeft,jt.current=null,it(!1)),bt.current+=Le,!qe){const dt=y.scrollWidth-y.clientWidth;bt.current=Math.max(0,Math.min(dt,bt.current))}Ft(),ye.current===null&&(ye.current=requestAnimationFrame(qt))}};return y.addEventListener("wheel",G,{passive:!1}),()=>{y.removeEventListener("wheel",G),tt()}},[o,ie,qe]),c.useEffect(()=>{const y=Ce.current;if(!y)return;const G=()=>{et();const fe=y.scrollLeft,Le=fe-Rt.current;Rt.current=fe;const dt=vt.current>0?vt.current*.5:1/0;if(Le!==0&&Math.abs(Le)<dt){const $t=Le>0?"forward":"backward";$t!==Pt.current&&(Pt.current=$t,ut($t))}pt()};y.addEventListener("scroll",G,{passive:!0});const te=new ResizeObserver(()=>{Tt(),et(),ut(Pt.current),pt()});return te.observe(y),()=>{Ut(),y.removeEventListener("scroll",G),te.disconnect()}},[t.length,qe]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ke||Nt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Ot?1:0,transition:`opacity ${di}ms ease`,pointerEvents:Ot?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,..._e}}),r.jsxs("div",{ref:ze,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...yt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ze,onClick:y=>y.stopPropagation(),children:r.jsx("div",{ref:Ce,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":he&&t.length>0?"true":"false","data-mouse-dragging":Bt?"true":"false",onPointerDown:En,onPointerMove:Qn,onPointerUp:Pn,onPointerCancel:Pn,children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Wt.map((y,G)=>{const te=y.image.objectFit??"contain",fe=G%t.length,Le=Math.floor(G/t.length),dt=Qo(k),$t=`calc(-0.5 * (${dt} + ${k}))`;return r.jsxs("div",{ref:zt=>nt.current[G]=zt,className:`${e}-strip-item`,style:{height:T==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:y.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:te}}),o&&fe<t.length-1&&Le===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:$t,width:dt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Le}-${y.image.url}-${fe}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":en?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...Ve},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${h?` ${e}-lightbox-content-area-stacked`:""}`,children:(U||w)&&r.jsx("div",{className:`${e}-header ${h?`${e}-header-two-row`:`${e}-header-single-row`}`,children:h?At():U||w?ee():null})})})]}),t.length>1&&E==="on"&&(()=>{const y=Qo(j),G=`calc(-0.5 * (${j} + ${y}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":C,"data-overlay-content-hidden":en?"true":"false",onClick:te=>te.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...Ve},children:[t.map((te,fe)=>{const Le=Qo(se),dt=`calc(-0.5 * (${Le} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":ct===fe?"true":"false",onClick:()=>ie&&f==="click"&&nn(fe),onMouseEnter:()=>Me&&f==="hover"&&nn(fe),"aria-label":te.image.name?`View ${te.image.name}`:`View image ${fe+1}`,"aria-current":ct===fe?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:te.image.url,alt:"",draggable:!1,style:{...le,...$.display==="cover"?{width:ho}:{width:"100%"}}})}),o&&fe<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:dt,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${te.image.url}-${fe}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:G,height:y,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
|
|
9395
|
+
`;function _n(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:_n("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:{...Ha.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:{...Ha.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:_n("Question Padding Left"),questionPaddingTop:_n("Question Padding Top"),questionPaddingBottom:_n("Question Padding Bottom"),answerPaddingLeft:_n("Answer Padding Left"),answerPaddingRight:_n("Answer Padding Right"),answerPaddingTop:_n("Answer Padding Top"),answerPaddingBottom:_n("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,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"}]},schema:lm,sourceCode:am},$n=e=>e.display==="cover",Ho=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Oa=100,dm=.2,Ba=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Oa:Math.max(Oa,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const T=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-g/T*.12);return`translateY(${g}px) scale(${_})`},[]),m=c.useCallback(()=>{l.current=null},[]),f=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),E=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),C=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=g.clientX-T.startX,H=g.clientY-T.startY;if(T.isLocked===null){if(Math.abs(_)<Ba&&Math.abs(H)<Ba)return;if(H>0&&H>Math.abs(_))T.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{T.isLocked=!1,m();return}}if(!T.isLocked)return;g.preventDefault();const K=Math.max(0,H);p.current=K,s(K)},[e,m]),S=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=T.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!_){m();return}g.clientY-T.startY>=u?E():f()},[u,E,e,m,f]),M=c.useCallback(g=>{S(g)},[S]),I=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:C,onPointerUp:M,onPointerCancel:I}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,f)=>{mm(t),e.scrollLeft=m,f&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},di=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,fo=50,xm=2,wm=16,Sm=.05,$m=1,ja=.5,Cm=20,ni=.004,Ki=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},er=e=>`max(${e}, ${Cm}px)`,Pm=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]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},ut=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Am=e=>[ut(e,"fontFamily"),ut(e,"fontSettings"),{type:"row",items:[ut(e,"fontSize"),ut(e,"lineHeight"),ut(e,"letterSpacing"),ut(e,"wordSpacing")]},ut(e,"textAlign"),ut(e,"textAppearance")],_m=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Tm[e],Am(e)]))}),Dr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Dr(e,t),no=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Dr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},tr=(e,t)=>{const n=i=>{const o=ut(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[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),nr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:f,thumbnailVisibility:E,thumbnailObjectFit:$,thumbnailActive:C,thumbnailActiveColor:S,title1Width:M,title2Width:I,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:T="desktop",contentMarginTop:_,iconMarginLeft:H}=n,K=y=>L.scalingValue(y,i??!1),se=K(l),j=K(p??.02),k=K(u??0),X=K(_??0),q=K(H??0),{title1:O,title2:Y,title3:te}=Im(t),oe=nr("title1",tr(n,"title1"),i),F=nr("title2",tr(n,"title2"),i),ae=nr("title3",tr(n,"title3"),i),h=T==="mobile",ie=!o&&(!i||s),he=ie,fe=ie,We=ie,Z=$n($),le=Z?{"--image-aspect-ratio":Ho($)}:void 0,U=!!(O||Y||te),B=c.useMemo(()=>Rm(e,O,Y,te,oe,F,ae),[e,O,Y,te,oe,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:I,title3Width:W}),[M,I,W]),me=c.useMemo(()=>B.map(y=>N[y.widthKey]),[B,N]),we=c.useMemo(()=>Dr(B.length,me),[B.length,me]),Oe=c.useMemo(()=>Vs(B.length,me),[B.length,me]),_e=c.useMemo(()=>B.filter(y=>y.prefix==="title1"),[B]),Se=c.useMemo(()=>B.filter(y=>y.prefix==="title2"||y.prefix==="title3"),[B]),Fe=c.useMemo(()=>za(_e,N),[_e,N]),z=c.useMemo(()=>za(Se,N),[Se,N]),de=c.useCallback((y,G)=>{const Q=B.indexOf(y);if(!h||G==="single-row")return{effectiveWidth:Oe[Q]??0,resolvedWidth:we[Q]??0,maxWidth:no(Q,we)};if(G==="two-row-top"){const ye=_e.indexOf(y);return{effectiveWidth:Fe.effective[ye]??0,resolvedWidth:Fe.resolved[ye]??0,maxWidth:no(ye,Fe.resolved)}}const pe=Se.indexOf(y);return{effectiveWidth:z.effective[pe]??0,resolvedWidth:z.resolved[pe]??0,maxWidth:no(pe,z.resolved)}},[Se,z,Oe,we,B,_e,Fe,h]),A=c.useCallback(y=>L.scalingValue(y,i??!1),[i]),J=A(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),ee=c.useCallback(y=>B.slice(0,y+1).reduce((G,Q,pe)=>G+(Q!=null&&Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(we[pe]??0),0)+(h?0:b??0),[B,D,we,h,b]),ge=c.useCallback(()=>h?0:b??0,[h,b]),be=c.useCallback(y=>Se.slice(0,y).reduce((G,Q,pe)=>G+(Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(z.resolved[pe]??0),0),[Se,z.resolved,D]),De=c.useCallback(y=>{const G=Se[y];return be(y)+(G.marginLeftKey?D[G.marginLeftKey]??0:0)+(z.resolved[y]??0)},[Se,z.resolved,be,D]),Pe=(y,G)=>{const Q=y.marginLeftKey?D[y.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:ye,maxWidth:tt}=de(y,G),Ct=o&&G==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":y.prefix,style:{...G==="single-row"?{gridArea:y.prefix}:{},width:A(pe),...Q>0?{marginLeft:A(Q)}:{}},children:[r.jsx("p",{className:y.className,style:y.style,children:y.text}),Ct&&y.marginLeftKey&&r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(-Q),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ct&&r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(tt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A(-ni/2),width:A(ni),height:"100%",pointerEvents:"auto"}})]},y.className)},Re=()=>{const y=h?-1:B.findIndex(pe=>pe.prefix==="title1"),G=!h&&(o||(b??0)>0)?(()=>{const pe=b??0,ye=y>=0?we[y]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:`max(${A(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Q=B.flatMap((pe,ye)=>{if(!pe.marginLeftKey)return[];const tt=D[pe.marginLeftKey]??0,Ct=km(B,we,D,ye)+ge();return r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we[ye]),style:{position:"absolute",top:0,left:A(Ct),width:`max(${A(tt)}, 10px)`,height:"100%",pointerEvents:"auto"}},pe.marginLeftKey)});return G?[G,...Q]:Q},qe=()=>B.map((y,G)=>{const Q=no(G,we),ye=ee(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ce=()=>Se.flatMap((y,G)=>{if(!y.marginLeftKey)return[];const Q=D[y.marginLeftKey]??0,pe=be(G),{resolvedWidth:ye}=de(y,"two-row-bottom");return r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(pe),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}},y.marginLeftKey)}),ke=()=>Se.map((y,G)=>{const{maxWidth:Q}=de(y,"two-row-bottom"),ye=De(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ze=c.useRef(null),Te=c.useRef(null),rt=c.useRef(null),nt=c.useRef([]),vt=c.useRef(0),Ue=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),at=c.useRef(null),Rt=c.useRef(0),It=c.useRef("forward"),bt=c.useRef(0),ve=c.useRef(null),Be=c.useRef(!1),Ze=c.useRef(null),Ke=t.length>1&&(!o||!!s),Wt=Ke?3:1,Ht=c.useMemo(()=>Array.from({length:Wt},()=>t).flat(),[t,Wt]),[Ft,zt]=c.useState(!1),[cn,He]=c.useState(!1),[Lt,st]=c.useState(!0),[Qe,gt]=c.useState(0),Vt=c.useRef(Qe);Vt.current=Qe;const Ut=c.useRef(null),tn=c.useRef(!1),mn=c.useRef(null),Ge=c.useRef(null),nn=he&&!Lt,Ot=c.useCallback(()=>{he&&(st(!0),Ge.current&&clearTimeout(Ge.current),Ge.current=setTimeout(()=>{Ue.current.isActive||st(!1)},bm))},[he]),Ne=c.useCallback(()=>{o||tn.current||(tn.current=!0,He(!1),mn.current=setTimeout(()=>{a()},di))},[o,a]),ft=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:L.scalingValue(x??0,i),height:L.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ne,"aria-label":"Close",children:r.jsx(sn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),At=(y="two-row")=>r.jsx("div",{...y==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:A(b??0),flexShrink:0,...y==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...y==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ne=()=>{const y=B.find(pe=>pe.prefix==="title1"),G=B.filter(pe=>pe.prefix==="title2"||pe.prefix==="title3"),Q=G.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?At():null,y&&Pe(y,"two-row-top"),w&&ft()]}),Q?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[G.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[G.map(pe=>Pe(pe,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ce(),ke()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},xe=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?At("single-row"):null,B.map(y=>Pe(y,"single-row")),o?r.jsxs(r.Fragment,{children:[Re(),qe()]}):null,w?ft():null]}),Ae=c.useCallback(y=>!!(y.closest("[data-controls]")||y.closest(`.${e}-thumbnails`)||y.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ve,backdropStyle:Ye,mediaAreaStyle:et,overlayContentStyle:$e,swipeHandlers:Et,dismissAreaStyle:ht}=js({enabled:ie??!1,onClose:Ne,animMs:di,isBlockedTarget:Ae}),yt=()=>{if(!Ke||t.length===0)return vt.current=0,0;const y=nt.current[0],G=nt.current[t.length];if(!y||!G)return vt.current;const Q=G.offsetLeft-y.offsetLeft;return Q>0&&(vt.current=Q),vt.current},lt=(y=!1)=>{if(!Ke)return;const G=Te.current,Q=yt();!G||Q<=0||(G.scrollLeft<=0?(G.scrollLeft+=Q,y&&(Ue.current.scrollLeft+=Q),Be.current&&(bt.current+=Q)):G.scrollLeft>=Q*2&&(G.scrollLeft-=Q,y&&(Ue.current.scrollLeft-=Q),Be.current&&(bt.current-=Q)))},Me=(y=(G=>(G=Te.current)==null?void 0:G.scrollLeft)()??0)=>{var Ct;const Q=((Ct=Te.current)==null?void 0:Ct.clientWidth)??0,pe=y+Q/2;let ye=-1,tt={flatIndex:0,distance:1/0};return nt.current.forEach((Dt,gn)=>{if(!Dt)return;const hn=Dt.offsetLeft,fn=hn+Dt.offsetWidth;ye===-1&&pe>=hn&&pe<fn&&(ye=gn);const P=Math.abs(hn-y);P<tt.distance&&(tt={flatIndex:gn,distance:P})}),ye!==-1?ye:tt.flatIndex},xt=y=>{const G=Te.current;return!y||!G?!1:y.offsetWidth>G.clientWidth+1},ct=y=>{Te.current&&nt.current.forEach(G=>{G&&(G.style.scrollSnapAlign=xt(G)&&y==="backward"?"end":"start")})},$t=y=>{const G=Te.current;if(!y||!G||!xt(y))return!1;const Q=y.offsetLeft,pe=Q+y.offsetWidth;return G.scrollLeft>=Q-1&&G.scrollLeft+G.clientWidth<=pe+1},kt=()=>{!Te.current||t.length===0||Ut.current===null&>(Me()%t.length)},St=()=>{Ut.current=null;const y=Te.current;y&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"L",location:"LightboxOverlay.tsx:releaseActiveIndexLock",message:"index lock released",data:{scrollLeft:y.scrollLeft,nearestIndex:Me()%t.length,activeIndex:Vt.current},timestamp:Date.now()})}).catch(()=>{})},Nt=y=>{const G=Te.current;G&&(G.style.scrollSnapType=y?"":"none")},it=()=>{var y;(y=at.current)==null||y.call(at),at.current=null},Bt=()=>{ve.current!==null&&(cancelAnimationFrame(ve.current),ve.current=null),Be.current=!1},Gt=()=>{const y=Te.current;if(!y){ve.current=null,Be.current=!1;return}const G=bt.current-y.scrollLeft;if(Math.abs(G)<.5){y.scrollLeft=bt.current,lt(),kt(),ve.current=null,Be.current=!1;return}y.scrollLeft+=G*Sm,lt(),kt(),Ot(),ve.current=requestAnimationFrame(Gt)},Ln=()=>{const y=rt.current;y&&(y.style.transition="",y.style.transform="",y.style.willChange="")},Bn=(y,G,Q,pe)=>{Ln(),y.scrollLeft=G,Rt.current=y.scrollLeft,lt(),Q!==void 0?gt(Q):kt();const ye=Q??Me()%t.length,tt=Me()%t.length;fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"K",location:"LightboxOverlay.tsx:finishStripScroll",message:"scroll settled",data:{targetLeft:G,scrollLeft:y.scrollLeft,intendedIndex:ye,actualIndex:tt,indexMismatch:ye!==tt},timestamp:Date.now()})}).catch(()=>{}),Nt(!0),pe==null||pe()},En=(y,{behavior:G="smooth",activeIndex:Q,onComplete:pe}={})=>{const ye=Te.current,tt=rt.current;if(!ye||!tt)return;if(Bt(),it(),Nt(!1),G==="auto"){Bn(ye,y,Q,pe);return}const Ct=Math.abs(y-ye.scrollLeft),Dt=pm(Ct,fm,ym,ye.clientWidth*.55);at.current=hm(ye,tt,y,{duration:Dt,easing:vm,onComplete:()=>{at.current=null,Bn(ye,y,Q,pe)}})},Zn=(y="smooth")=>{if(!Te.current||t.length===0)return;const Q=Me(),pe=nt.current[Q];pe&&En(pe.offsetLeft,{behavior:y,activeIndex:Q%t.length})},Qn=(y,G="smooth")=>{const Q=Te.current;if(!Q||t.length===0)return;const pe=Q.scrollLeft-y,ye=Me(y),tt=nt.current[ye];if($t(tt)){Nt(!0),kt();return}const Ct=nt.current[ye+1],Dt=tt?Ct?Ct.offsetLeft-tt.offsetLeft:tt.offsetWidth:0,gn=Dt>0?pe>Dt*ja?1:pe<-Dt*ja?-1:0:0,hn=Ke?ye+gn:Math.max(0,Math.min(Ht.length-1,ye+gn)),fn=nt.current[hn];if(!fn){Zn(G);return}const re=pe<0&&xt(fn)?fn.offsetLeft+fn.offsetWidth-Q.clientWidth:fn.offsetLeft,Le=hn%t.length,Ce=Me(Q.scrollLeft);fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"B_J",location:"LightboxOverlay.tsx:snapAfterDrag",message:"drag snap decision",data:{startScrollLeft:y,scrollLeft:Q.scrollLeft,scrollDelta:pe,startFlatIndex:ye,endFlatIndex:Ce,scrollAdjustment:gn,targetFlatIndex:hn,startIndex:ye%t.length,endIndex:Ce%t.length,targetIndex:Le,indexDelta:Le-ye%t.length,endMinusStart:Ce-ye},timestamp:Date.now()})}).catch(()=>{}),G==="smooth"&&(Ut.current=Le),gt(Le),En(re,{behavior:G,activeIndex:Le,onComplete:G==="smooth"?St:void 0})},on=(y,G="smooth")=>{const Q=Te.current,pe=Ke?t.length+y:y,ye=nt.current[pe];!Q||!ye||(G==="smooth"?Ut.current=y:Ut.current=null,gt(y),En(ye.offsetLeft,{behavior:G,activeIndex:y,onComplete:G==="smooth"?St:void 0}))},$i=y=>{if(!fe)return;if(y.pointerType==="touch"){Bt(),Nt(!0);return}if(y.pointerType!=="mouse"||y.button!==0||Ae(y.target))return;const G=Te.current;G&&(Bt(),it(),Ln(),Ut.current=null,Ue.current={isActive:!0,startX:y.clientX,scrollLeft:G.scrollLeft,hasMoved:!1},Ze.current=Me(G.scrollLeft)%t.length,Nt(!1),Ot(),G.setPointerCapture(y.pointerId))},ei=y=>{if(!fe||y.pointerType!=="mouse")return;const G=Te.current;if(!G||!Ue.current.isActive)return;const Q=y.clientX-Ue.current.startX;if(Math.abs(Q)>$m&&(Ue.current.hasMoved=!0,zt(!0)),Ue.current.hasMoved){if(y.preventDefault(),G.scrollLeft=Ue.current.scrollLeft-Q,lt(!0),kt(),Ze.current!==null){const pe=Me()%t.length,ye=Math.abs(pe-Ze.current);ye>=2&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"J",location:"LightboxOverlay.tsx:onStripPointerMove",message:"during drag multi-index",data:{startIndex:Ze.current,dragIndex:pe,dragIndexDelta:ye,scrollLeft:G.scrollLeft,deltaX:Q},timestamp:Date.now()})}).catch(()=>{})}Ot()}},Pn=y=>{if(!fe||y.pointerType!=="mouse")return;const G=Te.current;if(!G)return;const Q=Ue.current.hasMoved,pe=Ue.current.scrollLeft;Ue.current.isActive=!1,zt(!1),G.hasPointerCapture(y.pointerId)&&G.releasePointerCapture(y.pointerId),lt(),Q?Qn(pe):(Nt(!0),kt()),Ot()};return zs(),c.useEffect(()=>{const y=requestAnimationFrame(()=>He(!0));return()=>{cancelAnimationFrame(y),it(),mn.current&&clearTimeout(mn.current),Ge.current&&clearTimeout(Ge.current)}},[]),c.useEffect(()=>{if(!he){st(!0);return}Ot();const y=ze.current;if(!y)return;const G=()=>Ot();return y.addEventListener("pointermove",G),y.addEventListener("pointerdown",G),()=>{y.removeEventListener("pointermove",G),y.removeEventListener("pointerdown",G),Ge.current&&clearTimeout(Ge.current)}},[he,Ot]),c.useEffect(()=>{const y=G=>{G.key==="Escape"&&Ne()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[Ne]),c.useLayoutEffect(()=>{yt()},[k,t.length,Ke]),c.useLayoutEffect(()=>{o||on(Vt.current,"auto")},[k,o]),c.useLayoutEffect(()=>{on(0,"auto")},[t.length,Ke]),c.useEffect(()=>{const y=Te.current;if(!y||o||!ie)return;const G=Q=>{if(Q.preventDefault(),Math.abs(Q.deltaY)<=Math.abs(Q.deltaX))return;const pe=Q.deltaMode===1?wm:Q.deltaMode===2?y.clientHeight:1,ye=Q.deltaY*pe*xm;if(ye!==0){if(it(),Be.current||(Be.current=!0,bt.current=y.scrollLeft,Ut.current=null,Nt(!1)),bt.current+=ye,!Ke){const tt=y.scrollWidth-y.clientWidth;bt.current=Math.max(0,Math.min(tt,bt.current))}Ot(),ve.current===null&&(ve.current=requestAnimationFrame(Gt))}};return y.addEventListener("wheel",G,{passive:!1}),()=>{y.removeEventListener("wheel",G),Bt()}},[o,ie,Ke]),c.useEffect(()=>{const y=Te.current;if(!y)return;const G=()=>{lt();const pe=y.scrollLeft,ye=pe-Rt.current;Rt.current=pe;const tt=vt.current>0?vt.current*.5:1/0;if(ye!==0&&Math.abs(ye)<tt){const Ct=ye>0?"forward":"backward";Ct!==It.current&&(It.current=Ct,ct(Ct))}kt()};y.addEventListener("scroll",G,{passive:!0});const Q=new ResizeObserver(()=>{yt(),lt(),ct(It.current),kt()});return Q.observe(y),()=>{it(),y.removeEventListener("scroll",G),Q.disconnect()}},[t.length,Ke]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ve||Ne()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:cn?1:0,transition:`opacity ${di}ms ease`,pointerEvents:cn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Ye}}),r.jsxs("div",{ref:ze,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...ht},...Et,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:et,onClick:y=>y.stopPropagation(),children:r.jsx("div",{ref:Te,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":Ft?"true":"false",onPointerDown:$i,onPointerMove:ei,onPointerUp:Pn,onPointerCancel:Pn,children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Ht.map((y,G)=>{const Q=y.image.objectFit??"contain",pe=G%t.length,ye=Math.floor(G/t.length),tt=er(k),Ct=`calc(-0.5 * (${tt} + ${k}))`;return r.jsxs("div",{ref:Dt=>nt.current[G]=Dt,className:`${e}-strip-item`,style:{height:T==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:y.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Q}}),o&&pe<t.length-1&&ye===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ct,width:tt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye}-${y.image.url}-${pe}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...$e},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${h?` ${e}-lightbox-content-area-stacked`:""}`,children:(U||w)&&r.jsx("div",{className:`${e}-header ${h?`${e}-header-two-row`:`${e}-header-single-row`}`,children:h?ne():U||w?xe():null})})})]}),t.length>1&&E==="on"&&(()=>{const y=er(j),G=`calc(-0.5 * (${j} + ${y}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":C,"data-overlay-content-hidden":nn?"true":"false",onClick:Q=>Q.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...$e},children:[t.map((Q,pe)=>{const ye=er(se),tt=`calc(-0.5 * (${ye} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":Qe===pe?"true":"false",onClick:()=>ie&&f==="click"&&on(pe),onMouseEnter:()=>We&&f==="hover"&&on(pe),"aria-label":Q.image.name?`View ${Q.image.name}`:`View image ${pe+1}`,"aria-current":Qe===pe?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:Q.image.url,alt:"",draggable:!1,style:{...le,...$.display==="cover"?{width:fo}:{width:"100%"}}})}),o&&pe<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:tt,width:ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Q.image.url}-${pe}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:G,height:y,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
|
|
9396
9396
|
.${e}-wrapper {
|
|
9397
9397
|
position: relative;
|
|
9398
9398
|
width: 100%;
|
|
@@ -9528,6 +9528,10 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9528
9528
|
scroll-snap-align: start;
|
|
9529
9529
|
}
|
|
9530
9530
|
|
|
9531
|
+
.${e}-strip-item img {
|
|
9532
|
+
user-select: none;
|
|
9533
|
+
}
|
|
9534
|
+
|
|
9531
9535
|
.${e}-thumbnails {
|
|
9532
9536
|
position: absolute;
|
|
9533
9537
|
left: 50%;
|
|
@@ -9591,15 +9595,15 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9591
9595
|
|
|
9592
9596
|
.${e}-thumb-image {
|
|
9593
9597
|
display: block;
|
|
9594
|
-
height: ${
|
|
9598
|
+
height: ${fo}px;
|
|
9595
9599
|
object-fit: contain;
|
|
9596
9600
|
transition: filter 0.2s ease;
|
|
9597
9601
|
}
|
|
9598
9602
|
|
|
9599
9603
|
.${e}-thumb-image-cover {
|
|
9600
9604
|
aspect-ratio: var(--image-aspect-ratio);
|
|
9601
|
-
max-width: ${
|
|
9602
|
-
max-height: ${
|
|
9605
|
+
max-width: ${fo}px;
|
|
9606
|
+
max-height: ${fo}px;
|
|
9603
9607
|
width: auto;
|
|
9604
9608
|
height: auto;
|
|
9605
9609
|
object-fit: cover;
|
|
@@ -9783,7 +9787,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9783
9787
|
pointer-events: auto;
|
|
9784
9788
|
z-index: 10;
|
|
9785
9789
|
}
|
|
9786
|
-
`}const Fm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=L.useScopedStyles(),{cover:d,coverFit:l}=e,p=c.useRef(null),[u,w]=c.useState(!1),x=t??[],v=u&&x.length>0,m=()=>{x.length!==0&&w(!0)};return c.useEffect(()=>{!n||i||o||w(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${
|
|
9790
|
+
`}const Fm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=L.useScopedStyles(),{cover:d,coverFit:l}=e,p=c.useRef(null),[u,w]=c.useState(!1),x=t??[],v=u&&x.length>0,m=()=>{x.length!==0&&w(!0)};return c.useEffect(()=>{!n||i||o||w(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${$n(l)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...$n(l)?{"--image-aspect-ratio":Ho(l)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${$n(l)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),v&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(Mm,{prefix:a,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>w(!1)}),f)})()]})},Nm=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
|
|
9787
9791
|
import { createPortal } from 'react-dom';
|
|
9788
9792
|
import { CommonComponentProps } from '../props';
|
|
9789
9793
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -9945,6 +9949,10 @@ function getCSS(P: string): string {
|
|
|
9945
9949
|
scroll-snap-align: start;
|
|
9946
9950
|
}
|
|
9947
9951
|
|
|
9952
|
+
.\${P}-strip-item img {
|
|
9953
|
+
user-select: none;
|
|
9954
|
+
}
|
|
9955
|
+
|
|
9948
9956
|
.\${P}-thumbnails {
|
|
9949
9957
|
position: absolute;
|
|
9950
9958
|
left: 50%;
|
|
@@ -10340,7 +10348,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10340
10348
|
</>
|
|
10341
10349
|
);
|
|
10342
10350
|
};
|
|
10343
|
-
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),qn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Bm(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")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[gt(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[gt(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[gt(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[gt(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[gt(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Om=Ki.reduce((e,t)=>({...e,...Bm(t)}),{}),jm=Ki.reduce((e,t)=>({...e,[gt(t,"fontFamily")]:"Arial",[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 Va(e){return Ki.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 zm=_m(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Om,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.02,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${gt(e,"fontSettings")}`}))}},qm=50,Da=10,Dr="cntrl-lightbox-journal",Ho=Dr,gr=`${Dr}-`,Bo=e=>`${Dr}-${e}`,qr=e=>e===Ho||e.startsWith(gr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(Bo(e)));if(i)return i}const n=qa(t.get(Ho));if(n)return n;for(const[i]of t){if(!i.startsWith(gr))continue;const o=i.slice(gr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{qr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Bo(t),String(e)):i.searchParams.set(Ho,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Bo(e)||i===Ho:qr(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)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Bo(e)):[...t.keys()].some(n=>qr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,nr=e=>`max(${e}, ${Gm}px)`,vi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+vi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+vi(s).length,1),i=vi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},fo=(e,t)=>t==="B"?e.flatMap((n,i)=>vi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:vi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ii=.004,no=.004,ir={title1Width:.13,title2Width:.13,title3Width:.14},io=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},$o=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},hr=(e,t)=>$o(e,t),Kn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},oo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:$o(e.length,n),effective:hr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Ui=["title1","title2","title3","count"],ht=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[ht(e,"fontFamily"),ht(e,"fontSettings"),{type:"row",items:[ht(e,"fontSize"),ht(e,"lineHeight"),ht(e,"letterSpacing"),ht(e,"wordSpacing")]},ht(e,"textAlign"),ht(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ui.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},ro=(e,t)=>{const n=i=>{const o=ht(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[rg[t]]}},ao=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:f,maxHeight:E,textTransition:$,title1Width:C,title2Width:S,title3Width:M,title1MarginLeft:P=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:T,closeIconMaxWidth:_,closeIconColor:H,closeIconHoverColor:K,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(A=>L.scalingValue(A,i??!1),[i]),X=k(m??0),q=`${f}%`,B=`${E}%`,Y=k(g),ne=k(se),oe=k(j),F=ao("title1",ro(n,"title1"),i),ae=ao("title2",ro(n,"title2"),i),h=ao("title3",ro(n,"title3"),i),ie=ao("count",ro(n,"count"),i),ge=V==="mobile",he=!i||!!s,Me=!o&&(!i||!!s),Z=c.useMemo(()=>fo(t,w),[t,w]),[le,U]=c.useState(a),O=Z[le],N=O==null?void 0:O.entry,[pe,we]=c.useState(!1),[Ne,Ie]=c.useState(null),[ve,We]=c.useState(!1),[z,de]=c.useState(null),[I,J]=c.useState(!1),[D,Q]=c.useState(0),[me,be]=c.useState(),[De,$e]=c.useState(),[Ae,Ue]=c.useState(null),ce=c.useRef(null),Re=c.useRef(0),ze=c.useRef(0),Ce=c.useRef(0),rt=c.useRef(!1),nt=c.useRef(null),vt=c.useRef(null),Xe=c.useRef(null),st=c.useRef(null),Rt=c.useRef(null),Pt=c.useRef(null),bt=c.useRef(null),ye=c.useCallback(()=>{const A=vt.current;if(!A)return;const re=A.closest(`.${e}-lightbox-content-area`);if(!re)return A.getBoundingClientRect().width;const Ee=Array.from(re.children).reduce((Pe,Te)=>!(Te instanceof HTMLElement)||Te.contains(A)?Pe:Pe+Te.getBoundingClientRect().width,0);return re.getBoundingClientRect().width-Ee},[e]),He=c.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),qe=c.useCallback(A=>{A===Re.current&&(de(null),J(!1))},[]),lt=c.useCallback(()=>{o||rt.current||(rt.current=!0,p==null||p(),we(!1),nt.current=setTimeout(()=>{u()},300))},[o,p,u]),Wt=c.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Bt,backdropStyle:kt,mediaAreaStyle:Ot,overlayContentStyle:cn,swipeHandlers:Be,dismissAreaStyle:wt}=js({enabled:Me,onClose:lt,animMs:300,isBlockedTarget:Wt}),ct=c.useCallback(A=>{d&&Ds(A+1,l,!0)},[d,l]),Ye=c.useCallback(A=>{var on;if(Z.length===0)return;const re=(A%Z.length+Z.length)%Z.length;if(re===le)return;const Ee=Z[le],Pe=Z[re];Re.current+=1;const Te=Re.current,mt=$==="fade"&&Ga(Ee==null?void 0:Ee.entry)!==Ga(Pe==null?void 0:Pe.entry),Ct=(on=vt.current)==null?void 0:on.getBoundingClientRect().height,ot=mt?(()=>{var Kr;const ei=ye();Ni.flushSync(()=>{Ue(Pe.entry)}),Xe.current&&ei&&(Xe.current.style.width=`${ei}px`);const gn=(Kr=Xe.current)==null?void 0:Kr.getBoundingClientRect().height;return Xe.current&&(Xe.current.style.width=""),{measuredIncomingTitlesHeight:gn,incomingTitlesMeasureWidth:ei}})():void 0,Vt=Math.max(Ct??0,(ot==null?void 0:ot.measuredIncomingTitlesHeight)??0)||void 0;Q(Te),de(le),J(!0),U(re),ct(re),Ce.current=re,mt?(He(),Vt&&be(Vt),ot!=null&&ot.incomingTitlesMeasureWidth&&$e(ot.incomingTitlesMeasureWidth),Ie((Ee==null?void 0:Ee.entryIndex)??null),We(!0),ze.current=Pe.entryIndex,ce.current=setTimeout(()=>{Ie(null),We(!1),be(void 0),$e(void 0),Ue(null),ce.current=null},400)):(He(),Ie(null),We(!1),be(void 0),$e(void 0),Ue(null),ze.current=Pe.entryIndex)},[le,He,ye,Z,ct,$]),St=c.useCallback(()=>{bt.current=null},[]),jt=c.useCallback(A=>{!he||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(bt.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[he,Z.length]),Cn=c.useCallback(A=>{var on;if(!he||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(Bt){St();return}const re=bt.current;if(!re||re.pointerId!==A.pointerId||(St(),A.target.closest("[data-controls]")))return;const Pe=A.clientX-re.startX,Te=A.clientY-re.startY,mt=Math.abs(Pe),Ct=Math.abs(Te);if(mt>=qm&&mt>Ct){Ye(Pe>0?le-1:le+1);return}if(mt>Da||Ct>Da)return;const ot=(on=st.current)==null?void 0:on.getBoundingClientRect(),Vt=ot?ot.left+ot.width/2:window.innerWidth/2;Ye(A.clientX<Vt?le-1:le+1)},[le,he,Ye,Bt,St,Z.length]),Kt=c.useCallback(A=>{const re=bt.current;(re==null?void 0:re.pointerId)===A.pointerId&&St()},[St]);zs(),c.useEffect(()=>{Pt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{Rt.current?Rt.current.focus():st.current&&st.current.focus()})});return()=>{cancelAnimationFrame(A),nt.current&&clearTimeout(nt.current),ce.current&&clearTimeout(ce.current);const re=Pt.current;re&&document.contains(re)&&re.focus()}},[]),c.useEffect(()=>{var A;$!=="fade"&&(ze.current=((A=Z[le])==null?void 0:A.entryIndex)??0,He(),Ie(null),We(!1),be(void 0),$e(void 0))},[le,He,Z,$]),c.useEffect(()=>{const A=re=>{if(re.key==="Escape"){lt();return}if(re.key==="ArrowLeft"&&Z.length>1){Ye(le-1);return}if(re.key==="ArrowRight"&&Z.length>1){Ye(le+1);return}if(re.key==="Tab"&&st.current){const Ee=st.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Pe=Array.from(Ee).filter(ot=>!ot.closest('[aria-hidden="true"]'));if(Pe.length===0)return;const Te=Pe[0],mt=Pe[Pe.length-1],Ct=document.activeElement;re.shiftKey?(Ct===Te||!st.current.contains(Ct))&&(re.preventDefault(),mt.focus()):(Ct===mt||!st.current.contains(Ct))&&(re.preventDefault(),Te.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[Ye,lt,le,Z.length]),c.useLayoutEffect(()=>{He(),Re.current=0,Q(0),de(null),J(!1),Ie(null),We(!1),be(void 0),$e(void 0),Ue(null),U(A=>{const re=Math.max(0,Z.length-1);return Math.min(A,re)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var Ee;const A=Math.max(0,Z.length-1),re=Math.min(Math.max(0,a),A);Ce.current=re,ze.current=((Ee=Z[re])==null?void 0:Ee.entryIndex)??0,U(re)},[a]);const Je=Ne!==null?t[Ne]:null,en=z!==null?Z[z]:null,Ft=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Je==null?void 0:Je.title1)||(Je==null?void 0:Je.title2)||(Je==null?void 0:Je.title3),Nt=Qm(w,Z,t),Fe=T!==null,It=Ft||Nt||Fe,At=Nt&&Fe?{gap:Y}:void 0,ee=`${e}-titles-stack${ge?` ${e}-titles-stack-stacked`:""}`,xe=`${e}-titles-layer-out${ge?` ${e}-titles-layer-out-stacked`:""}`,ke=k(R),_e=c.useMemo(()=>({title1Width:C??ir.title1Width,title2Width:S??ir.title2Width,title3Width:M??ir.title3Width}),[C,S,M]),Ze=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ve=c.useMemo(()=>N?io(e,N,F,ae,h):[],[e,N,F,ae,h]),Oe=c.useMemo(()=>Ve.map(A=>_e[A.widthKey]),[Ve,_e]),yt=c.useMemo(()=>$o(Ve.length,Oe),[Ve.length,Oe]),Tt=c.useMemo(()=>hr(Ve.length,Oe),[Ve.length,Oe]),et=c.useMemo(()=>Ve.filter(A=>A.prefix==="title1"),[Ve]),at=c.useMemo(()=>Ve.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[Ve]),Ke=c.useMemo(()=>oo(et,_e),[et,_e]),ut=c.useMemo(()=>oo(at,_e),[at,_e]),Lt=c.useCallback((A,re)=>{const Ee=Ve.findIndex(Te=>Te.prefix===A.prefix);if(!ge||re==="single-row")return{effectiveWidth:Tt[Ee]??0,resolvedWidth:yt[Ee]??0,maxWidth:Kn(Ee,yt)};if(re==="two-row-top"){const Te=et.findIndex(mt=>mt.prefix===A.prefix);return{effectiveWidth:Ke.effective[Te]??0,resolvedWidth:Ke.resolved[Te]??0,maxWidth:Kn(Te,Ke.resolved)}}const Pe=at.findIndex(Te=>Te.prefix===A.prefix);return{effectiveWidth:ut.effective[Pe]??0,resolvedWidth:ut.resolved[Pe]??0,maxWidth:Kn(Pe,ut.resolved)}},[Ve,at,ut,Tt,yt,et,Ke,ge]),pt=c.useCallback(A=>tg(Ve,yt,Ze,A)+(ge?0:P??0),[Ve,yt,Ze,ge,P]),tn=c.useCallback(()=>ge?0:P??0,[ge,P]),it=c.useCallback(A=>at.slice(0,A).reduce((re,Ee,Pe)=>re+(Ee.marginLeftKey?Ze[Ee.marginLeftKey]??0:0)+(ut.resolved[Pe]??0),0),[at,ut.resolved,Ze]),Ut=c.useCallback(A=>{const re=at[A];return it(A)+(re.marginLeftKey?Ze[re.marginLeftKey]??0:0)+(ut.resolved[A]??0)},[at,ut.resolved,it,Ze]),tt=c.useCallback((A,re,Ee)=>{if(!ge||Ee==="single-row"){const ot=A.findIndex(gn=>gn.prefix===re.prefix),Vt=A.map(gn=>_e[gn.widthKey]),on=$o(A.length,Vt);return{effectiveWidth:hr(A.length,Vt)[ot]??0,resolvedWidth:on[ot]??0,maxWidth:Kn(ot,on)}}if(Ee==="two-row-top"){const ot=A.filter(gn=>gn.prefix==="title1"),Vt=ot.findIndex(gn=>gn.prefix===re.prefix),{resolved:on,effective:ei}=oo(ot,_e);return{effectiveWidth:ei[Vt]??0,resolvedWidth:on[Vt]??0,maxWidth:Kn(Vt,on)}}const Pe=A.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),Te=Pe.findIndex(ot=>ot.prefix===re.prefix),{resolved:mt,effective:Ct}=oo(Pe,_e);return{effectiveWidth:Ct[Te]??0,resolvedWidth:mt[Te]??0,maxWidth:Kn(Te,mt)}},[_e,ge]),qt=(A,re,Ee)=>{const Pe=A.marginLeftKey?Ze[A.marginLeftKey]??0:0,{effectiveWidth:Te,resolvedWidth:mt,maxWidth:Ct}=Ee??Lt(A,re),ot=Math.max(Pe,no),Vt=o&&re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:k(Te),...Pe>0?{marginLeft:k(Pe)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),Vt&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(mt),style:{position:"absolute",top:0,left:k(-Pe),width:k(ot),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ct),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ii/2),width:k(ii),height:"100%",pointerEvents:"auto"}}):null]},A.className)},Gt=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(P??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Tn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:ie,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,le,w,t)}),o&&Fe&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${nr(Y)} + ${Y}))`,width:nr(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),Ln=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(_??0,i),height:L.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:Rt,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:r.jsx(sn,{url:T??"",fill:H,hoverFill:i&&!s?H:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Zn=()=>!Nt&&!Fe?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:At,children:[Nt?Tn():null,Fe?Ln():null]}),$i=A=>{if(!A)return null;const re=io(e,A,F,ae,h);return r.jsxs(r.Fragment,{children:[P>0||o?Gt():null,re.map(Ee=>qt(Ee,"single-row",tt(re,Ee,"single-row")))]})},nn=A=>{if(!A)return null;const re=io(e,A,F,ae,h),Ee=re.find(Pe=>Pe.prefix==="title1");return!Ee&&!(P>0||o)?null:r.jsxs(r.Fragment,{children:[P>0||o?Gt():null,Ee?qt(Ee,"two-row-top",tt(re,Ee,"two-row-top")):null]})},En=(A,re=!1)=>{const Ee=A?io(e,A,F,ae,h):[],Pe=Ee.filter(Ct=>Ct.prefix==="title2"||Ct.prefix==="title3"),Te=o&&re;return Pe.length>0||Te||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Pe.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[Pe.map(Ct=>qt(Ct,"two-row-bottom",tt(Ee,Ct,"two-row-bottom"))),re&&o?r.jsxs(r.Fragment,{children:[te(),fe()]}):null]}):null,(R??0)>0||Te?r.jsx("div",{"data-controls":Te?"titleRowMarginBottom":void 0,"data-controls-axis":Te?"y":void 0,"data-controls-reverse":Te?"":void 0,className:Te?`${e}-control`:void 0,style:{height:ke,width:"100%",flexShrink:0,pointerEvents:Te?"auto":"none"}}):null]}):null},Qn=(A,re=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[nn(A),Zn()]}),En(A,re)]}),Pn=A=>ge?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Qn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:$i(A)}):null,y=()=>{const A=ge?-1:Ve.findIndex(Pe=>Pe.prefix==="title1"),re=!ge&&(o||(P??0)>0)?(()=>{const Te=Math.max(P??0,no),mt=A>=0?yt[A]:C;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(mt),style:{position:"absolute",top:0,left:0,width:k(Te),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ee=Ve.flatMap((Pe,Te)=>{if(!Pe.marginLeftKey)return[];const mt=Ze[Pe.marginLeftKey]??0,Ct=eg(Ve,yt,Ze,Te)+tn(),ot=Math.max(mt,no);return r.jsx("div",{"data-controls":Pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[Te]),style:{position:"absolute",top:0,left:k(Ct),width:k(ot),height:"100%",pointerEvents:"auto"}},Pe.marginLeftKey)});return re?[re,...Ee]:Ee},G=()=>Ve.map((A,re)=>{const Ee=Kn(re,yt),Te=pt(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Te),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),te=()=>at.flatMap((A,re)=>{if(!A.marginLeftKey)return[];const Ee=Ze[A.marginLeftKey]??0,Pe=it(re),Te=Math.max(Ee,no),{resolvedWidth:mt}=Lt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(mt),style:{position:"absolute",top:0,left:k(Pe),width:k(Te),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),fe=()=>at.map((A,re)=>{const{maxWidth:Ee}=Lt(A,"two-row-bottom"),Te=Ut(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ee),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Te),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Le=()=>!o||ge?null:r.jsxs(r.Fragment,{children:[y(),G()]}),dt=A=>{const re=!A.objectFit&&wn(x);return{className:`${e}-slide-image-cell${re?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:B,...re?{"--image-aspect-ratio":No(x)}:{}}}},$t=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:wn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},zt=A=>{if(A.length===0)return null;const re=A.length>1,Ee=nr(X),Pe=`calc(-0.5 * (${Ee} + ${X}))`;if(A.length===1){const Te=A[0];return r.jsx("div",{...dt(Te),children:r.jsx("img",{...$t(Te),src:Te.url,alt:Te.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:re?{gap:X}:void 0,children:A.map((Te,mt)=>r.jsxs("div",{...dt(Te),children:[r.jsx("img",{...$t(Te),src:Te.url,alt:Te.name??"",draggable:!1}),o&&re&&mt<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pe,width:Ee,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Te.url}-${mt}`))})},In=!!(N!=null&&N.title2||N!=null&&N.title3||Je!=null&&Je.title2||Je!=null&&Je.title3||(R??0)>0||o),An=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:Xe,className:ee,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Qn(Ae||N)}),r.jsxs("div",{ref:vt,className:`${e}-titles-row-two-row`,style:{...ve&&me?{minHeight:me}:void 0,...ve&&De?{width:De,maxWidth:"100%"}:void 0,...ve?{overflow:"hidden"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:ee,style:{position:"relative",flex:1,minWidth:0},children:[Je&&ve?r.jsx("div",{className:`${xe} ${e}-titles-fade-out`,children:nn(Je)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(N)})]}),Zn()]}),In?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Je&&ve?r.jsx("div",{className:`${xe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:En(Je)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ge?` ${e}-titles-layer-in-stacked`:""}`,children:En(N,!0)})]}):null]})]}),mn=()=>{const A=In;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Qn(N,!0)}),Le()]})};return r.jsxs("div",{ref:st,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Bt||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Fe?void 0:-1,style:{opacity:pe?1:0,transition:"opacity 300ms ease",pointerEvents:pe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...kt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...wt},...Be,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ot,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":he&&Z.length>1?"true":"false",onPointerDown:he?jt:void 0,onPointerUp:he?Cn:void 0,onPointerCancel:he?Kt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[en&&I?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&qe(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:zt(en.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${I?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:O?zt(O.images):null})},`slide-in-${D}-${le}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...cn},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ne,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ge?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${ge?` ${e}-lightbox-content-area-stacked`:""}`,children:[(ge?It:Ft)&&r.jsx("div",{className:`${e}-text-bar-cell${ge?` ${e}-text-bar-cell-stacked`:""}`,children:ge?$==="fade"?An():mn():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:Xe,className:ee,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Pn(Ae||N)}),r.jsxs("div",{ref:vt,className:ee,style:{width:"100%",...ve&&me?{minHeight:me}:void 0,...ve&&De?{width:De,maxWidth:"100%"}:void 0,...ve?{overflow:"hidden"}:void 0},children:[Je&&ve?r.jsx("div",{className:`${xe} ${e}-titles-fade-out`,children:Pn(Je)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(N)}),Le()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[Pn(N),Le()]})}),!ge&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:At,children:[Nt&&Tn(),Fe&&Ln()]})]})})]})]})]})};function lg(e){return`
|
|
10351
|
+
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),qn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Om(e){const t={};return t[ut(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSettings")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ut(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ut(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ut(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ut(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ut(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=Ki.reduce((e,t)=>({...e,...Om(t)}),{}),jm=Ki.reduce((e,t)=>({...e,[ut(t,"fontFamily")]:"Arial",[ut(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ut(t,"letterSpacing")]:0,[ut(t,"wordSpacing")]:0,[ut(t,"textAlign")]:"left",[ut(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ut(n,"fontSize")]=i),o!==void 0&&(t[ut(n,"lineHeight")]=o),t},{})}const zm=_m(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${ut(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Oo=qr,hr=`${qr}-`,Bo=e=>`${qr}-${e}`,Kr=e=>e===Oo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(Bo(e)));if(i)return i}const n=qa(t.get(Oo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Bo(t),String(e)):i.searchParams.set(Oo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Bo(e)||i===Oo:Kr(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)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Bo(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,vi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+vi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+vi(s).length,1),i=vi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},yo=(e,t)=>t==="B"?e.flatMap((n,i)=>vi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:vi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ii=.004,io=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},oo=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Co=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>Co(e,t),Kn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ro=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Co(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Ui=["title1","title2","title3","count"],pt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[pt(e,"fontFamily"),pt(e,"fontSettings"),{type:"row",items:[pt(e,"fontSize"),pt(e,"lineHeight"),pt(e,"letterSpacing"),pt(e,"wordSpacing")]},pt(e,"textAlign"),pt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ui.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},ao=(e,t)=>{const n=i=>{const o=pt(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[rg[t]]}},so=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:f,maxHeight:E,textTransition:$,title1Width:C,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:T,closeIconMaxWidth:_,closeIconColor:H,closeIconHoverColor:K,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(P=>L.scalingValue(P,i??!1),[i]),X=k(m??0),q=`${f}%`,O=`${E}%`,Y=k(g),te=k(se),oe=k(j),F=so("title1",ao(n,"title1"),i),ae=so("title2",ao(n,"title2"),i),h=so("title3",ao(n,"title3"),i),ie=so("count",ao(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>yo(t,w),[t,w]),[le,U]=c.useState(a),B=Z[le],N=B==null?void 0:B.entry,[me,we]=c.useState(!1),[Oe,_e]=c.useState(null),[Se,Fe]=c.useState(!1),[z,de]=c.useState(null),[A,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,be]=c.useState(),[De,Pe]=c.useState(),[Re,qe]=c.useState(null),ce=c.useRef(null),ke=c.useRef(0),ze=c.useRef(0),Te=c.useRef(0),rt=c.useRef(!1),nt=c.useRef(null),vt=c.useRef(null),Ue=c.useRef(null),at=c.useRef(null),Rt=c.useRef(null),It=c.useRef(null),bt=c.useRef(null),ve=c.useCallback(()=>{const P=vt.current;if(!P)return;const re=P.closest(`.${e}-lightbox-content-area`);if(!re)return P.getBoundingClientRect().width;const Le=Array.from(re.children).reduce((Ce,Ie)=>!(Ie instanceof HTMLElement)||Ie.contains(P)?Ce:Ce+Ie.getBoundingClientRect().width,0);return re.getBoundingClientRect().width-Le},[e]),Be=c.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),Ze=c.useCallback(P=>{P===ke.current&&(de(null),J(!1))},[]),Ke=c.useCallback(()=>{o||rt.current||(rt.current=!0,p==null||p(),we(!1),nt.current=setTimeout(()=>{u()},300))},[o,p,u]),Wt=c.useCallback(P=>!!(P.closest("[data-controls]")||P.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Ft,mediaAreaStyle:zt,overlayContentStyle:cn,swipeHandlers:He,dismissAreaStyle:Lt}=js({enabled:We,onClose:Ke,animMs:300,isBlockedTarget:Wt}),st=c.useCallback(P=>{d&&Ds(P+1,l,!0)},[d,l]),Qe=c.useCallback(P=>{if(P)return P.getBoundingClientRect().height},[]),gt=c.useCallback(P=>{if(Z.length===0)return;const re=(P%Z.length+Z.length)%Z.length;if(re===le)return;const Le=Z[le],Ce=Z[re];ke.current+=1;const Ie=ke.current,dt=$==="fade"&&Ga(Le==null?void 0:Le.entry)!==Ga(Ce==null?void 0:Ce.entry),Tt=Qe(Ue.current),ot=dt?(()=>{const Xt=ve();Ni.flushSync(()=>{qe(Ce.entry)}),Ue.current&&Xt&&(Ue.current.style.width=`${Xt}px`);const Gi=Qe(Ue.current);return Ue.current&&(Ue.current.style.width=""),{measuredIncomingTitlesHeight:Gi,incomingTitlesMeasureWidth:Xt}})():void 0,qt=Math.max(Tt??0,(ot==null?void 0:ot.measuredIncomingTitlesHeight)??0)||void 0;ee(Ie),de(le),J(!0),U(re),st(re),Te.current=re,dt?(Be(),qt&&be(qt),ot!=null&&ot.incomingTitlesMeasureWidth&&Pe(ot.incomingTitlesMeasureWidth),_e((Le==null?void 0:Le.entryIndex)??null),Fe(!0),ze.current=Ce.entryIndex,ce.current=setTimeout(()=>{_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),ce.current=null},400)):(Be(),_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),ze.current=Ce.entryIndex)},[le,Be,ve,Qe,Z,st,$]),Vt=c.useCallback(()=>{bt.current=null},[]),Ut=c.useCallback(P=>{!fe||Z.length<=1||P.pointerType==="mouse"&&P.button!==0||P.target.closest("[data-controls]")||(bt.current={startX:P.clientX,startY:P.clientY,pointerId:P.pointerId})},[fe,Z.length]),tn=c.useCallback(P=>{var Xt;if(!fe||Z.length<=1||P.pointerType==="mouse"&&P.button!==0)return;if(Ht){Vt();return}const re=bt.current;if(!re||re.pointerId!==P.pointerId||(Vt(),P.target.closest("[data-controls]")))return;const Ce=P.clientX-re.startX,Ie=P.clientY-re.startY,dt=Math.abs(Ce),Tt=Math.abs(Ie);if(dt>=qm&&dt>Tt){gt(Ce>0?le-1:le+1);return}if(dt>Da||Tt>Da)return;const ot=(Xt=at.current)==null?void 0:Xt.getBoundingClientRect(),qt=ot?ot.left+ot.width/2:window.innerWidth/2;gt(P.clientX<qt?le-1:le+1)},[le,fe,gt,Ht,Vt,Z.length]),mn=c.useCallback(P=>{const re=bt.current;(re==null?void 0:re.pointerId)===P.pointerId&&Vt()},[Vt]);zs(),c.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const P=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{Rt.current?Rt.current.focus():at.current&&at.current.focus()})});return()=>{cancelAnimationFrame(P),nt.current&&clearTimeout(nt.current),ce.current&&clearTimeout(ce.current);const re=It.current;re&&document.contains(re)&&re.focus()}},[]),c.useEffect(()=>{var P;$!=="fade"&&(ze.current=((P=Z[le])==null?void 0:P.entryIndex)??0,Be(),_e(null),Fe(!1),be(void 0),Pe(void 0))},[le,Be,Z,$]),c.useEffect(()=>{const P=re=>{if(re.key==="Escape"){Ke();return}if(re.key==="ArrowLeft"&&Z.length>1){gt(le-1);return}if(re.key==="ArrowRight"&&Z.length>1){gt(le+1);return}if(re.key==="Tab"&&at.current){const Le=at.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Ce=Array.from(Le).filter(ot=>!ot.closest('[aria-hidden="true"]'));if(Ce.length===0)return;const Ie=Ce[0],dt=Ce[Ce.length-1],Tt=document.activeElement;re.shiftKey?(Tt===Ie||!at.current.contains(Tt))&&(re.preventDefault(),dt.focus()):(Tt===dt||!at.current.contains(Tt))&&(re.preventDefault(),Ie.focus())}};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[gt,Ke,le,Z.length]),c.useLayoutEffect(()=>{Be(),ke.current=0,ee(0),de(null),J(!1),_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),U(P=>{const re=Math.max(0,Z.length-1);return Math.min(P,re)})},[Be,t.length,w,Z.length]),c.useLayoutEffect(()=>{var Le;const P=Math.max(0,Z.length-1),re=Math.min(Math.max(0,a),P);Te.current=re,ze.current=((Le=Z[re])==null?void 0:Le.entryIndex)??0,U(re)},[a]);const Ge=Oe!==null?t[Oe]:null,nn=z!==null?Z[z]:null,Ot=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Ge==null?void 0:Ge.title1)||(Ge==null?void 0:Ge.title2)||(Ge==null?void 0:Ge.title3),Ne=Qm(w,Z,t),ft=T!==null,At=Ot||Ne||ft,ne=Ne&&ft?{gap:Y}:void 0,xe=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Ae=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,Ve=k(R),Ye=c.useMemo(()=>({title1Width:C??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[C,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),$e=c.useMemo(()=>N?oo(e,N,F,ae,h):[],[e,N,F,ae,h]),Et=c.useMemo(()=>$e.map(P=>Ye[P.widthKey]),[$e,Ye]),ht=c.useMemo(()=>Co($e.length,Et),[$e.length,Et]),yt=c.useMemo(()=>fr($e.length,Et),[$e.length,Et]),lt=c.useMemo(()=>$e.filter(P=>P.prefix==="title1"),[$e]),Me=c.useMemo(()=>$e.filter(P=>P.prefix==="title2"||P.prefix==="title3"),[$e]),xt=c.useMemo(()=>ro(lt,Ye),[lt,Ye]),ct=c.useMemo(()=>ro(Me,Ye),[Me,Ye]),$t=c.useCallback((P,re)=>{const Le=$e.findIndex(Ie=>Ie.prefix===P.prefix);if(!he||re==="single-row")return{effectiveWidth:yt[Le]??0,resolvedWidth:ht[Le]??0,maxWidth:Kn(Le,ht)};if(re==="two-row-top"){const Ie=lt.findIndex(dt=>dt.prefix===P.prefix);return{effectiveWidth:xt.effective[Ie]??0,resolvedWidth:xt.resolved[Ie]??0,maxWidth:Kn(Ie,xt.resolved)}}const Ce=Me.findIndex(Ie=>Ie.prefix===P.prefix);return{effectiveWidth:ct.effective[Ce]??0,resolvedWidth:ct.resolved[Ce]??0,maxWidth:Kn(Ce,ct.resolved)}},[$e,Me,ct,yt,ht,lt,xt,he]),kt=c.useCallback(P=>tg($e,ht,et,P)+(he?0:I??0),[$e,ht,et,he,I]),St=c.useCallback(()=>he?0:I??0,[he,I]),Nt=c.useCallback(P=>Me.slice(0,P).reduce((re,Le,Ce)=>re+(Le.marginLeftKey?et[Le.marginLeftKey]??0:0)+(ct.resolved[Ce]??0),0),[Me,ct.resolved,et]),it=c.useCallback(P=>{const re=Me[P];return Nt(P)+(re.marginLeftKey?et[re.marginLeftKey]??0:0)+(ct.resolved[P]??0)},[Me,ct.resolved,Nt,et]),Bt=c.useCallback((P,re,Le)=>{if(!he||Le==="single-row"){const ot=P.findIndex(jn=>jn.prefix===re.prefix),qt=P.map(jn=>Ye[jn.widthKey]),Xt=Co(P.length,qt);return{effectiveWidth:fr(P.length,qt)[ot]??0,resolvedWidth:Xt[ot]??0,maxWidth:Kn(ot,Xt)}}if(Le==="two-row-top"){const ot=P.filter(jn=>jn.prefix==="title1"),qt=ot.findIndex(jn=>jn.prefix===re.prefix),{resolved:Xt,effective:Gi}=ro(ot,Ye);return{effectiveWidth:Gi[qt]??0,resolvedWidth:Xt[qt]??0,maxWidth:Kn(qt,Xt)}}const Ce=P.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),Ie=Ce.findIndex(ot=>ot.prefix===re.prefix),{resolved:dt,effective:Tt}=ro(Ce,Ye);return{effectiveWidth:Tt[Ie]??0,resolvedWidth:dt[Ie]??0,maxWidth:Kn(Ie,dt)}},[Ye,he]),Gt=(P,re,Le)=>{const Ce=P.marginLeftKey?et[P.marginLeftKey]??0:0,{effectiveWidth:Ie,resolvedWidth:dt,maxWidth:Tt}=Le??$t(P,re),ot=Math.max(Ce,io),qt=o&&re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":P.prefix,style:{width:k(Ie),...Ce>0?{marginLeft:k(Ce)}:{}},children:[r.jsx("p",{className:P.className,style:P.style,children:P.text}),qt&&P.marginLeftKey?r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:k(-Ce),width:k(ot),height:"100%",pointerEvents:"auto"}}):null,qt?r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Tt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ii/2),width:k(ii),height:"100%",pointerEvents:"auto"}}):null]},P.className)},Ln=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Bn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:ie,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,le,w,t)}),o&&ft&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),En=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(_??0,i),height:L.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:Rt,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:r.jsx(sn,{url:T??"",fill:H,hoverFill:i&&!s?H:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Zn=()=>!Ne&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:ne,children:[Ne?Bn():null,ft?En():null]}),Qn=P=>{if(!P)return null;const re=oo(e,P,F,ae,h);return r.jsxs(r.Fragment,{children:[I>0||o?Ln():null,re.map(Le=>Gt(Le,"single-row",Bt(re,Le,"single-row")))]})},on=P=>{if(!P)return null;const re=oo(e,P,F,ae,h),Le=re.find(Ce=>Ce.prefix==="title1");return!Le&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Ln():null,Le?Gt(Le,"two-row-top",Bt(re,Le,"two-row-top")):null]})},$i=(P,re=!1)=>{const Le=P?oo(e,P,F,ae,h):[],Ce=Le.filter(Tt=>Tt.prefix==="title2"||Tt.prefix==="title3"),Ie=o&&re;return Ce.length>0||Ie||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Ce.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[Ce.map(Tt=>Gt(Tt,"two-row-bottom",Bt(Le,Tt,"two-row-bottom"))),re&&o?r.jsxs(r.Fragment,{children:[Q(),pe()]}):null]}):null,(R??0)>0||Ie?r.jsx("div",{"data-controls":Ie?"titleRowMarginBottom":void 0,"data-controls-axis":Ie?"y":void 0,"data-controls-reverse":Ie?"":void 0,className:Ie?`${e}-control`:void 0,style:{height:Ve,width:"100%",flexShrink:0,pointerEvents:Ie?"auto":"none"}}):null]}):null},ei=(P,re=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[on(P),Zn()]}),$i(P,re)]}),Pn=P=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:ei(P)}):P?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Qn(P)}):null,y=()=>{const P=he?-1:$e.findIndex(Ce=>Ce.prefix==="title1"),re=!he&&(o||(I??0)>0)?(()=>{const Ie=Math.max(I??0,io),dt=P>=0?ht[P]:C;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:0,width:k(Ie),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Le=$e.flatMap((Ce,Ie)=>{if(!Ce.marginLeftKey)return[];const dt=et[Ce.marginLeftKey]??0,Tt=eg($e,ht,et,Ie)+St(),ot=Math.max(dt,io);return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[Ie]),style:{position:"absolute",top:0,left:k(Tt),width:k(ot),height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return re?[re,...Le]:Le},G=()=>$e.map((P,re)=>{const Le=Kn(re,ht),Ie=kt(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Ie),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Q=()=>Me.flatMap((P,re)=>{if(!P.marginLeftKey)return[];const Le=et[P.marginLeftKey]??0,Ce=Nt(re),Ie=Math.max(Le,io),{resolvedWidth:dt}=$t(P,"two-row-bottom");return r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:k(Ce),width:k(Ie),height:"100%",pointerEvents:"auto"}},P.marginLeftKey)}),pe=()=>Me.map((P,re)=>{const{maxWidth:Le}=$t(P,"two-row-bottom"),Ie=it(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Ie),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),ye=()=>!o||he?null:r.jsxs(r.Fragment,{children:[y(),G()]}),tt=P=>{const re=!P.objectFit&&$n(x);return{className:`${e}-slide-image-cell${re?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...re?{"--image-aspect-ratio":Ho(x)}:{}}}},Ct=P=>P.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":P.objectFit}}:$n(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Dt=P=>{if(P.length===0)return null;const re=P.length>1,Le=ir(X),Ce=`calc(-0.5 * (${Le} + ${X}))`;if(P.length===1){const Ie=P[0];return r.jsx("div",{...tt(Ie),children:r.jsx("img",{...Ct(Ie),src:Ie.url,alt:Ie.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:re?{gap:X}:void 0,children:P.map((Ie,dt)=>r.jsxs("div",{...tt(Ie),children:[r.jsx("img",{...Ct(Ie),src:Ie.url,alt:Ie.name??"",draggable:!1}),o&&re&&dt<P.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ce,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ie.url}-${dt}`))})},gn=!!(N!=null&&N.title2||N!=null&&N.title3||Ge!=null&&Ge.title2||Ge!=null&&Ge.title3||(R??0)>0||o),hn=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:Ue,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(Re||N)}),r.jsxs("div",{ref:vt,className:`${e}-titles-row-two-row`,style:{...Se&&ge?{minHeight:ge}:void 0,...Se&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:xe,style:{position:"relative",flex:1,minWidth:0},children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-fade-out`,children:on(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(N)})]}),Zn()]}),gn?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:$i(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:$i(N,!0)})]}):null]})]}),fn=()=>{const P=gn;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...P?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:P?void 0:{flex:"0 0 auto",height:"auto"},children:ei(N,!0)}),ye()]})};return r.jsxs("div",{ref:at,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||Ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Ft}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Lt},...He,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:P=>P.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?Ut:void 0,onPointerUp:fe?tn:void 0,onPointerCancel:fe?mn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[nn&&A?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:P=>{P.target===P.currentTarget&&Ze(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:Dt(nn.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${A?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?Dt(B.images):null})},`slide-in-${D}-${le}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...cn},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:te,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?At:Ot)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?hn():fn():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:Ue,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Pn(Re||N)}),r.jsxs("div",{ref:vt,className:xe,style:{width:"100%",...Se&&ge?{minHeight:ge}:void 0,...Se&&De?{width:De,maxWidth:"100%"}:void 0},children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-fade-out`,children:Pn(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(N)}),ye()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[Pn(N),ye()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:ne,children:[Ne&&Bn(),ft&&En()]})]})})]})]})]})};function lg(e){return`
|
|
10344
10352
|
.${e}-wrapper {
|
|
10345
10353
|
position: relative;
|
|
10346
10354
|
width: 100%;
|
|
@@ -10542,6 +10550,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10542
10550
|
|
|
10543
10551
|
.${e}-slide-image {
|
|
10544
10552
|
display: block;
|
|
10553
|
+
user-select: none;
|
|
10545
10554
|
}
|
|
10546
10555
|
|
|
10547
10556
|
.${e}-slide-image-cover {
|
|
@@ -10725,6 +10734,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10725
10734
|
flex-direction: row;
|
|
10726
10735
|
align-items: flex-start;
|
|
10727
10736
|
z-index: 1;
|
|
10737
|
+
overflow: visible;
|
|
10728
10738
|
}
|
|
10729
10739
|
|
|
10730
10740
|
.${e}-titles-layer-out-stacked {
|
|
@@ -10755,6 +10765,12 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10755
10765
|
position: absolute;
|
|
10756
10766
|
inset: 0;
|
|
10757
10767
|
z-index: 0;
|
|
10768
|
+
overflow: visible;
|
|
10769
|
+
}
|
|
10770
|
+
|
|
10771
|
+
.${e}-titles-fade-in,
|
|
10772
|
+
.${e}-titles-fade-out {
|
|
10773
|
+
overflow: visible;
|
|
10758
10774
|
}
|
|
10759
10775
|
|
|
10760
10776
|
@keyframes ${e}-titles-fade-in {
|
|
@@ -10849,7 +10865,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10849
10865
|
pointer-events: auto;
|
|
10850
10866
|
z-index: 10;
|
|
10851
10867
|
}
|
|
10852
|
-
`}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=L.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[f,E]=c.useState(0),$=c.useRef(!1),C=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>vi(g).length>0),[t]),
|
|
10868
|
+
`}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=L.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[f,E]=c.useState(0),$=c.useRef(!1),C=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>vi(g).length>0),[t]),I=v&&M.length>0,W=!n,b=c.useCallback(()=>{W&&(S.current=!0,Um(C.current,l),C.current=!1)},[W,l]),R=(g=0)=>{if(M.length===0||n&&!i&&!o)return;const T=yo(M,w),_=Math.max(0,Math.min(g,T.length-1));if(E(_),W){const H=qs();Ds(_+1,l,H),C.current=!H}m(!0)},V=c.useCallback(()=>{m(!1),S.current=!1},[]);return c.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),c.useEffect(()=>{if(!W||$.current)return;$.current=!0;const g=Ka(l);if(!g)return;const T=Ua(g,yo(M,w).length);T<0||(E(T),m(!0))},[M,l,W,w]),c.useEffect(()=>{if(!W)return;const g=()=>{if(S.current){S.current=!1,m(!1);return}const T=Ka(l);if(!T){m(!1);return}const _=Ua(T,yo(M,w).length);if(_<0){m(!1);return}C.current=!1,E(_),m(!0)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[M,l,W,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${$n(u)?`${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,...$n(u)?{"--image-aspect-ratio":Ho(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${$n(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),I&&typeof document<"u"&&(()=>{const g=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(sg,{prefix:d,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:W,journalItemId:l,onBeforeClose:b,onClose:V}),g)})()]})},dg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
10853
10869
|
import { createPortal } from 'react-dom';
|
|
10854
10870
|
import { CommonComponentProps } from '../props';
|
|
10855
10871
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -11061,6 +11077,7 @@ function getCSS(P: string): string {
|
|
|
11061
11077
|
|
|
11062
11078
|
.\${P}-slide-image {
|
|
11063
11079
|
display: block;
|
|
11080
|
+
user-select: none;
|
|
11064
11081
|
}
|
|
11065
11082
|
|
|
11066
11083
|
.\${P}-slide-image-cover {
|
|
@@ -11244,6 +11261,7 @@ function getCSS(P: string): string {
|
|
|
11244
11261
|
flex-direction: row;
|
|
11245
11262
|
align-items: flex-start;
|
|
11246
11263
|
z-index: 1;
|
|
11264
|
+
overflow: visible;
|
|
11247
11265
|
}
|
|
11248
11266
|
|
|
11249
11267
|
.\${P}-titles-layer-out-stacked {
|
|
@@ -11274,6 +11292,12 @@ function getCSS(P: string): string {
|
|
|
11274
11292
|
position: absolute;
|
|
11275
11293
|
inset: 0;
|
|
11276
11294
|
z-index: 0;
|
|
11295
|
+
overflow: visible;
|
|
11296
|
+
}
|
|
11297
|
+
|
|
11298
|
+
.\${P}-titles-fade-in,
|
|
11299
|
+
.\${P}-titles-fade-out {
|
|
11300
|
+
overflow: visible;
|
|
11277
11301
|
}
|
|
11278
11302
|
|
|
11279
11303
|
@keyframes \${P}-titles-fade-in {
|
|
@@ -11592,4 +11616,4 @@ export type LightboxJournalSettings = {
|
|
|
11592
11616
|
closeIconColor: string;
|
|
11593
11617
|
closeIconHoverColor: string;
|
|
11594
11618
|
};
|
|
11595
|
-
`,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Un={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 pg(e){const t={};return t[
|
|
11619
|
+
`,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Un={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 pg(e){const t={};return t[pt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSettings")]={...Un.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSize")]={...Un.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[pt(e,"lineHeight")]={...Un.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[pt(e,"letterSpacing")]={...Un.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[pt(e,"wordSpacing")]={...Un.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[pt(e,"textAlign")]={...Un.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[pt(e,"textAppearance")]={...Un.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mg=Ui.reduce((e,t)=>({...e,...pg(t)}),{}),gg=Ui.reduce((e,t)=>({...e,[pt(t,"fontFamily")]:"Arial",[pt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[pt(t,"letterSpacing")]:0,[pt(t,"wordSpacing")]:0,[pt(t,"textAlign")]:"left",[pt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xa(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[pt(n,"fontSize")]=i),o!==void 0&&(t[pt(n,"lineHeight")]=o),t},{})}const hg=og(),fg={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"}},...mg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:ug,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...gg},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Xa({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Xa({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}]}]}},yg={element:cg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:fg,sourceCode:dg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ui.map(e=>({path:`styles.${pt(e,"fontSettings")}`}))}},vg=[nd,cd,Jd,au,fu,Pu,ku,Bu,Zu,em,cm,Dm,yg];exports.components=vg;exports.isSchemaV1=Us;
|