@cntrl-site/components 1.0.19-alpha.6 → 1.0.19-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +306 -115
- package/dist/index.mjs +3704 -3419
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),Pe=require("classnames"),b=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function wa(e){return e.type==="object"&&e.version===1}const Ta="ControlSlider-module__wrapper___sHEkd",La="ControlSlider-module__hoverArrow___A-dOH",Ea="ControlSlider-module__sliderItem___QQSkR",Pa="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Aa="ControlSlider-module__arrowVertical___tBfVN",Ma="ControlSlider-module__nextArrow___-30Yc",Ia="ControlSlider-module__arrowInner___aEra3",Ra="ControlSlider-module__arrowIcon___S4ztF",ka="ControlSlider-module__arrowImg___2dwJW",Fa="ControlSlider-module__mirror___brd6U",Wa="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Na="ControlSlider-module__paginationVertical___zYqKw",Oa="ControlSlider-module__paginationItem___nTRbk",Ba="ControlSlider-module__dot___p1Qun",Va="ControlSlider-module__activeDot___LHFaj",Da="ControlSlider-module__paginationInsideBottom___R3FWn",za="ControlSlider-module__paginationInsideTop___V-qb-",ja="ControlSlider-module__paginationOutsideBottom___14w8D",qa="ControlSlider-module__paginationOutsideTop___SCLqB",Ka="ControlSlider-module__paginationInsideLeft___yOBRZ",Ga="ControlSlider-module__paginationInsideRight___Rtt3o",Ua="ControlSlider-module__paginationOutsideLeft___lahaw",Ya="ControlSlider-module__paginationOutsideRight___EtuQa",Xa="ControlSlider-module__imgWrapper___UjEgB",Za="ControlSlider-module__captionBlock___dJ6-j",Qa="ControlSlider-module__captionTextWrapper___HFlpf",Ja="ControlSlider-module__captionText___uGBVc",es="ControlSlider-module__active___WZK4G",ts="ControlSlider-module__withPointerEvents___t-18M",ns="ControlSlider-module__topLeftAlignment___zjnGM",rs="ControlSlider-module__topCenterAlignment___gD1xW",is="ControlSlider-module__topRightAlignment___NMapS",os="ControlSlider-module__middleLeftAlignment___OnUrY",as="ControlSlider-module__middleCenterAlignment___Tdkl0",ss="ControlSlider-module__middleRightAlignment___wEbfX",ls="ControlSlider-module__bottomLeftAlignment___cTP2-",cs="ControlSlider-module__bottomCenterAlignment___c54fB",ds="ControlSlider-module__bottomRightAlignment___kEwrz",us="ControlSlider-module__clickOverlay___DZA28",ps="ControlSlider-module__contain___pLyq7",ms="ControlSlider-module__cover___KdDat",me={wrapper:Ta,hoverArrow:La,sliderItem:Ea,sliderImage:Pa,arrow:_a,arrowVertical:Aa,nextArrow:Ma,arrowInner:Ia,arrowIcon:Ra,arrowImg:ka,mirror:Fa,pagination:Wa,paginationInner:Ha,paginationVertical:Na,paginationItem:Oa,dot:Ba,activeDot:Va,paginationInsideBottom:Da,paginationInsideTop:za,paginationOutsideBottom:ja,paginationOutsideTop:qa,paginationInsideLeft:Ka,paginationInsideRight:Ga,paginationOutsideLeft:Ua,paginationOutsideRight:Ya,imgWrapper:Xa,captionBlock:Za,captionTextWrapper:Qa,captionText:Ja,active:es,withPointerEvents:ts,topLeftAlignment:ns,topCenterAlignment:rs,topRightAlignment:is,middleLeftAlignment:os,middleCenterAlignment:as,middleRightAlignment:ss,bottomLeftAlignment:ls,bottomCenterAlignment:cs,bottomRightAlignment:ds,clickOverlay:us,contain:ps,cover:ms};function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hs(e,t,n){return t&&gs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",gn=1,fs=2,yn=3,wn=4,zn=5,lr=6,hr=7,ys={CREATED:gn,MOUNTED:fs,IDLE:yn,MOVING:wn,SCROLLING:zn,DRAGGING:lr,DESTROYED:hr};function Bt(e){e.length=0}function Xt(e,t,n){return Array.prototype.slice.call(e,t,n)}function He(e){return e.bind.apply(e,[null].concat(Xt(arguments,1)))}var Ao=setTimeout,Xr=function(){};function Hi(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function Rn(e){return!si(e)&&Cr("object",e)}var ai=Array.isArray,Mo=He(Cr,"function"),Gt=He(Cr,"string"),jn=He(Cr,"undefined");function si(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return ai(e)?e:[e]}function bt(e,t){qn(e).forEach(t)}function li(e,t){return e.indexOf(t)>-1}function cr(e,t){return e.push.apply(e,qn(t)),e}function Ft(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Et(e,t){Ft(e,Gt(t)?t.split(" "):t,!0)}function Kn(e,t){bt(t,e.appendChild.bind(e))}function ci(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function kn(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?Xt(e.children):[];return t?n.filter(function(r){return kn(r,t)}):n}function Gn(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var Fn=Object.keys;function nn(e,t,n){return e&&(n?Fn(e).reverse():Fn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Wn(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Kt(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){ai(n)?e[r]=n.slice():Rn(n)?e[r]=Kt({},Rn(e[r])?e[r]:{},n):e[r]=n})}),e}function Ni(e,t){bt(t||Fn(e),function(n){delete e[n]})}function Pt(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Se(e,t,n){Rn(t)?nn(t,function(r,o){Se(e,o,r)}):bt(e,function(r){si(n)||n===""?Pt(r,t):r.setAttribute(t,String(n))})}function hn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Et(r,t):Se(r,t)),n&&Kn(n,r),r}function $t(e,t,n){if(jn(n))return getComputedStyle(e)[t];si(n)||(e.style[t]=""+n)}function Hn(e,t){$t(e,"display",t)}function ko(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function wt(e,t){return e.getAttribute(t)}function Oi(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function rn(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function di(e,t){return t?Xt(e.querySelectorAll(t)):[]}function Wt(e,t){Ft(e,t,!1)}function Zr(e){return e.timeStamp}function Jt(e){return Gt(e)?e:e?e+"px":""}var Un="splide",ui="data-"+Un;function _n(e,t){if(!e)throw new Error("["+Un+"] "+(t||""))}var Ut=Math.min,fr=Math.max,yr=Math.floor,Nn=Math.ceil,it=Math.abs;function Ho(e,t,n){return it(e-t)<n}function dr(e,t,n,r){var o=Ut(t,n),l=fr(t,n);return r?o<e&&e<l:o<=e&&e<=l}function un(e,t,n){var r=Ut(t,n),o=fr(t,n);return Ut(fr(r,e),o)}function Qr(e){return+(e>0)-+(e<0)}function Jr(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function pi(e){return e<10?"0"+e:""+e}var Bi={};function vs(e){return""+e+pi(Bi[e]=(Bi[e]||0)+1)}function No(){var e=[];function t(i,d,s,p){o(i,d,function(u,T,x){var $="addEventListener"in u,m=$?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);$?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,x,s,m])})}function n(i,d,s){o(i,d,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(i,d,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,s)),i.dispatchEvent(p),p}function o(i,d,s){bt(i,function(p){p&&bt(d,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(i){i[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",ei="ready",Vt="move",Tn="moved",mi="click",Oo="active",Bo="inactive",Vo="visible",Do="hidden",je="refresh",nt="updated",vn="resize",Sr="resized",zo="drag",jo="dragging",qo="dragged",$r="scroll",an="scrolled",bs="overflow",gi="destroy",Ko="arrows:mounted",Go="arrows:updated",Uo="pagination:mounted",Yo="pagination:updated",hi="navigation:mounted",fi="autoplay:play",Xo="autoplay:playing",yi="autoplay:pause",vi="lazyload:loaded",Zo="sk",Qo="sh",vr="ei";function Be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function r(l,i){n.bind(t,qn(l).join(" "),function(d){i.apply(i,ai(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Xt(arguments,1))}return e&&e.event.on(gi,n.destroy),Wn(n,{bus:t,on:r,off:He(n.unbind,t),emit:o})}function wr(e,t,n,r){var o=Date.now,l,i=0,d,s=!0,p=0;function u(){if(!s){if(i=e?Ut((o()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=o(),r&&++p>=r))return x();d=Hi(u)}}function T(y){y||m(),l=o()-(y?i*e:0),s=!1,d=Hi(u)}function x(){s=!0}function $(){l=o(),i=0,n&&n(i)}function m(){d&&cancelAnimationFrame(d),i=0,d=0,s=!0}function h(y){e=y}function C(){return s}return{start:T,rewind:$,pause:x,cancel:m,set:h,isPaused:C}}function xs(e){var t=e;function n(o){t=o}function r(o){return li(qn(o),t)}return{set:n,is:r}}function Cs(e,t){var n=wr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ss(e,t,n){var r=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=No(),d=[];function s(){var m=n.mediaQuery==="min";Fn(o).sort(function(h,C){return m?+h-+C:+C-+h}).forEach(function(h){u(o[h],"("+(m?"min":"max")+"-width:"+h+"px)")}),u(l,Wi),T()}function p(m){m&&i.destroy()}function u(m,h){var C=matchMedia(h);i.bind(C,"change",T),d.push([m,C])}function T(){var m=r.is(hr),h=n.direction,C=d.reduce(function(y,S){return Kt(y,S[1].matches?S[0]:{})},{});Ni(n),$(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):h!==n.direction&&e.refresh()}function x(m){matchMedia(Wi).matches&&(m?Kt(n,l):Ni(n,Fn(l)))}function $(m,h,C){Kt(n,m),h&&Kt(Object.getPrototypeOf(n),m),(C||!r.is(gn))&&e.emit(nt,n)}return{setup:s,destroy:p,reduce:x,set:$}}var Tr="Arrow",Lr=Tr+"Left",Er=Tr+"Right",Jo=Tr+"Up",ea=Tr+"Down",Vi="rtl",Pr="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,Er],ArrowRight:[ea,Lr]};function $s(e,t,n){function r(l,i,d){d=d||n.direction;var s=d===Vi&&!i?1:d===Pr?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Hr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(l){return l*(n.direction===Vi?1:-1)}return{resolve:r,orient:o}}var Ht="role",fn="tabindex",ws="disabled",Tt="aria-",Yn=Tt+"controls",ta=Tt+"current",Di=Tt+"selected",ft=Tt+"label",bi=Tt+"labelledby",na=Tt+"hidden",xi=Tt+"orientation",On=Tt+"roledescription",zi=Tt+"live",ji=Tt+"busy",qi=Tt+"atomic",Ci=[Ht,fn,ws,Yn,ta,ft,bi,na,xi,On],_t=Un+"__",Qt="is-",Nr=Un,Ki=_t+"track",Ts=_t+"list",_r=_t+"slide",ra=_r+"--clone",Ls=_r+"__container",Si=_t+"arrows",Ar=_t+"arrow",ia=Ar+"--prev",oa=Ar+"--next",Mr=_t+"pagination",aa=Mr+"__page",Es=_t+"progress",Ps=Es+"__bar",_s=_t+"toggle",As=_t+"spinner",Ms=_t+"sr",Is=Qt+"initialized",on=Qt+"active",sa=Qt+"prev",la=Qt+"next",ti=Qt+"visible",ni=Qt+"loading",ca=Qt+"focus-in",da=Qt+"overflow",Rs=[on,ti,sa,la,ni,ca,da],ks={slide:_r,clone:ra,arrows:Si,arrow:Ar,prev:ia,next:oa,pagination:Mr,page:aa,spinner:As};function Fs(e,t){if(Mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kn(n,t);)n=n.parentElement;return n}var Ws=5,Gi=200,ua="touchstart mousedown",Or="touchmove mousemove",Br="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=e.root,d=n.i18n,s={},p=[],u=[],T=[],x,$,m;function h(){f(),H(),S()}function C(){o(je,y),o(je,h),o(nt,S),l(document,ua+" keydown",function(v){m=v.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Ft(i,ca,!!m)})}function y(v){var P=Ci.concat("style");Bt(p),Wt(i,u),Wt(x,T),Pt([x,$],P),Pt(i,v?P:["style",On])}function S(){Wt(i,u),Wt(x,T),u=D(Nr),T=D(Ki),Et(i,u),Et(x,T),Se(i,ft,n.label),Se(i,bi,n.labelledby)}function f(){x=E("."+Ki),$=Gn(x,"."+Ts),_n(x&&$,"A track/list element is missing."),cr(p,Ro($,"."+_r+":not(."+ra+")")),nn({arrows:Si,pagination:Mr,prev:ia,next:oa,bar:Ps,toggle:_s},function(v,P){s[P]=E("."+v)}),Wn(s,{root:i,track:x,list:$,slides:p})}function H(){var v=i.id||vs(Un),P=n.role;i.id=v,x.id=x.id||v+"-track",$.id=$.id||v+"-list",!wt(i,Ht)&&i.tagName!=="SECTION"&&P&&Se(i,Ht,P),Se(i,On,d.carousel),Se($,Ht,"presentation")}function E(v){var P=Wo(i,v);return P&&Fs(P,"."+Nr)===i?P:void 0}function D(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===Nr&&on]}return Wn(s,{setup:h,mount:C,destroy:y})}var bn="slide",Ln="loop",Xn="fade";function Ns(e,t,n,r){var o=Be(e),l=o.on,i=o.emit,d=o.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,$=u.i18n,m=u.pagination,h=u.slideFocus,C=s.Direction.resolve,y=wt(r,"style"),S=wt(r,ft),f=n>-1,H=Gn(r,"."+Ls),E;function D(){f||(r.id=p.id+"-slide"+pi(t+1),Se(r,Ht,m?"tabpanel":"group"),Se(r,On,$.slide),Se(r,ft,S||Jr($.slideLabel,[t+1,e.length]))),v()}function v(){d(r,"click",He(i,mi,q)),d(r,"keydown",He(i,Zo,q)),l([Tn,Qo,an],k),l(hi,z),x&&l(Vt,L)}function P(){E=!0,o.destroy(),Wt(r,Rs),Pt(r,Ci),Se(r,"style",y),Se(r,ft,S||"")}function z(){var N=e.splides.map(function(A){var j=A.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Se(r,ft,Jr($.slideX,(f?n:t)+1)),Se(r,Yn,N),Se(r,Ht,h?"button":""),h&&Pt(r,On)}function L(){E||k()}function k(){if(!E){var N=e.index;R(),O(),Ft(r,sa,t===N-1),Ft(r,la,t===N+1)}}function R(){var N=ee();N!==Oi(r,on)&&(Ft(r,on,N),Se(r,ta,T&&N||""),i(N?Oo:Bo,q))}function O(){var N=I(),A=!N&&(!ee()||f);if(e.state.is([wn,zn])||Se(r,na,A||""),Se(di(r,u.focusableNodes||""),fn,A?-1:""),h&&Se(r,fn,A?-1:0),N!==Oi(r,ti)&&(Ft(r,ti,N),i(N?Vo:Do,q)),!N&&document.activeElement===r){var j=s.Slides.getAt(e.index);j&&ko(j.slide)}}function Y(N,A,j){$t(j&&H||r,N,A)}function ee(){var N=e.index;return N===t||u.cloneStatus&&N===n}function I(){if(e.is(Xn))return ee();var N=ht(s.Elements.track),A=ht(r),j=C("left",!0),Q=C("right",!0);return yr(N[j])<=Nn(A[j])&&yr(A[Q])<=Nn(N[Q])}function F(N,A){var j=it(N-t);return!f&&(u.rewind||e.is(Ln))&&(j=Ut(j,e.length-j)),j<=A}var q={index:t,slideIndex:n,slide:r,container:H,isClone:f,mount:D,destroy:P,update:k,style:Y,isWithin:F};return q}function Os(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Elements,s=d.slides,p=d.list,u=[];function T(){x(),o(je,$),o(je,x)}function x(){s.forEach(function(k,R){h(k,R,-1)})}function $(){E(function(k){k.destroy()}),Bt(u)}function m(){E(function(k){k.update()})}function h(k,R,O){var Y=Ns(e,R,O,k);Y.mount(),u.push(Y),u.sort(function(ee,I){return ee.index-I.index})}function C(k){return k?D(function(R){return!R.isClone}):u}function y(k){var R=t.Controller,O=R.toIndex(k),Y=R.hasFocus()?1:n.perPage;return D(function(ee){return dr(ee.index,O,O+Y-1)})}function S(k){return D(k)[0]}function f(k,R){bt(k,function(O){if(Gt(O)&&(O=Fo(O)),Io(O)){var Y=s[R];Y?ci(O,Y):Kn(p,O),Et(O,n.classes.slide),P(O,He(l,vn))}}),l(je)}function H(k){rn(D(k).map(function(R){return R.slide})),l(je)}function E(k,R){C(R).forEach(k)}function D(k){return u.filter(Mo(k)?k:function(R){return Gt(k)?kn(R.slide,k):li(qn(k),R.index)})}function v(k,R,O){E(function(Y){Y.style(k,R,O)})}function P(k,R){var O=di(k,"img"),Y=O.length;Y?O.forEach(function(ee){i(ee,"load error",function(){--Y||R()})}):R()}function z(k){return k?s.length:u.length}function L(){return u.length>n.perPage}return{mount:T,destroy:$,update:m,register:h,get:C,getIn:y,getAt:S,add:f,remove:H,forEach:E,filter:D,style:v,getLength:z,isEnough:L}}function Bs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,$=d.getAt,m=d.style,h,C,y;function S(){f(),l(window,"resize load",Cs(He(i,vn))),o([nt,je],f),o(vn,H)}function f(){h=n.direction===Pr,$t(u,"maxWidth",Jt(n.width)),$t(T,s("paddingLeft"),E(!1)),$t(T,s("paddingRight"),E(!0)),H(!0)}function H(q){var N=ht(u);(q||C.width!==N.width||C.height!==N.height)&&($t(T,"height",D()),m(s("marginRight"),Jt(n.gap)),m("width",P()),m("height",z(),!0),C=N,i(Sr),y!==(y=F())&&(Ft(u,da,y),i(bs,y)))}function E(q){var N=n.padding,A=s(q?"right":"left");return N&&Jt(N[A]||(Rn(N)?0:N))||"0px"}function D(){var q="";return h&&(q=v(),_n(q,"height or heightRatio is missing."),q="calc("+q+" - "+E(!1)+" - "+E(!0)+")"),q}function v(){return Jt(n.height||ht(x).width*n.heightRatio)}function P(){return n.autoWidth?null:Jt(n.fixedWidth)||(h?"":L())}function z(){return Jt(n.fixedHeight)||(h?n.autoHeight?null:L():v())}function L(){var q=Jt(n.gap);return"calc((100%"+(q&&" + "+q)+")/"+(n.perPage||1)+(q&&" - "+q)+")"}function k(){return ht(x)[s("width")]}function R(q,N){var A=$(q||0);return A?ht(A.slide)[s("width")]+(N?0:ee()):0}function O(q,N){var A=$(q);if(A){var j=ht(A.slide)[s("right")],Q=ht(x)[s("left")];return it(j-Q)+(N?0:ee())}return 0}function Y(q){return O(e.length-1)-O(0)+R(0,q)}function ee(){var q=$(0);return q&&parseFloat($t(q.slide,s("marginRight")))||0}function I(q){return parseFloat($t(T,s("padding"+(q?"Right":"Left"))))||0}function F(){return e.is(Xn)||Y(!0)>k()}return{mount:S,resize:H,listSize:k,slideSize:R,sliderSize:Y,totalSize:O,getPadding:I,isOverflow:F}}var Vs=2;function Ds(e,t,n){var r=Be(e),o=r.on,l=t.Elements,i=t.Slides,d=t.Direction.resolve,s=[],p;function u(){o(je,T),o([nt,vn],$),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){rn(s),Bt(s),r.destroy()}function $(){var y=C();p!==y&&(p<y||!y)&&r.emit(je)}function m(y){var S=i.get().slice(),f=S.length;if(f){for(;S.length<y;)cr(S,S);cr(S.slice(-y),S.slice(0,y)).forEach(function(H,E){var D=E<y,v=h(H.slide,E);D?ci(v,S[0].slide):Kn(l.list,v),cr(s,v),i.register(v,E-y+(D?0:f),H.index)})}}function h(y,S){var f=y.cloneNode(!0);return Et(f,n.classes.clone),f.id=e.root.id+"-clone"+pi(S+1),f}function C(){var y=n.clones;if(!e.is(Ln))y=0;else if(jn(y)){var S=n[d("fixedWidth")]&&t.Layout.slideSize(0),f=S&&Nn(ht(l.track)[d("width")]/S);y=f||n[d("autoWidth")]&&e.length||n.perPage*Vs}return y}return{mount:u,destroy:x}}function zs(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Layout,s=d.slideSize,p=d.getPadding,u=d.totalSize,T=d.listSize,x=d.sliderSize,$=t.Direction,m=$.resolve,h=$.orient,C=t.Elements,y=C.list,S=C.track,f;function H(){f=t.Transition,o([Zt,Sr,nt,je],E)}function E(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function D(A,j,Q,te){A!==j&&q(A>Q)&&(k(),P(L(Y(),A>Q),!0)),i(wn),l(Vt,j,Q,A),f.start(j,function(){i(yn),l(Tn,j,Q,A),te&&te()})}function v(A){P(O(A,!0))}function P(A,j){if(!e.is(Xn)){var Q=j?A:z(A);$t(y,"transform","translate"+m("X")+"("+Q+"px)"),A!==Q&&l(Qo)}}function z(A){if(e.is(Ln)){var j=R(A),Q=j>t.Controller.getEnd(),te=j<0;(te||Q)&&(A=L(A,Q))}return A}function L(A,j){var Q=A-F(j),te=x();return A-=h(te*(Nn(it(Q)/te)||1))*(j?1:-1),A}function k(){P(Y(),!0),f.cancel()}function R(A){for(var j=t.Slides.get(),Q=0,te=1/0,w=0;w<j.length;w++){var ae=j[w].index,g=it(O(ae,!0)-A);if(g<=te)te=g,Q=ae;else break}return Q}function O(A,j){var Q=h(u(A-1)-I(A));return j?ee(Q):Q}function Y(){var A=m("left");return ht(y)[A]-ht(S)[A]+h(p(!1))}function ee(A){return n.trimSpace&&e.is(bn)&&(A=un(A,0,h(x(!0)-T()))),A}function I(A){var j=n.focus;return j==="center"?(T()-s(A,!0))/2:+j*s(A)||0}function F(A){return O(A?t.Controller.getEnd():0,!!n.trimSpace)}function q(A){var j=h(L(Y(),A));return A?j>=0:j<=y[m("scrollWidth")]-ht(S)[m("width")]}function N(A,j){j=jn(j)?Y():j;var Q=A!==!0&&h(j)<h(F(!1)),te=A!==!1&&h(j)>h(F(!0));return Q||te}return{mount:H,move:D,jump:v,translate:P,shift:L,cancel:k,toIndex:R,toPosition:O,getPosition:Y,getLimit:F,exceededLimit:N,reposition:E}}function js(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=t.Move,d=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,$=n.omitEnd,m=e.is(Ln),h=e.is(bn),C=He(Y,!1),y=He(Y,!0),S=n.start||0,f,H=S,E,D,v;function P(){z(),o([nt,je,vr],z),o(Sr,L)}function z(){E=x(!0),D=n.perMove,v=n.perPage,f=q();var g=un(S,0,$?f:E-1);g!==S&&(S=g,i.reposition())}function L(){f!==q()&&l(vr)}function k(g,re,he){if(!ae()){var de=O(g),X=F(de);X>-1&&(re||X!==S)&&(Q(X),i.move(de,X,H,he))}}function R(g,re,he,de){t.Scroll.scroll(g,re,he,function(){var X=F(i.toIndex(d()));Q($?Ut(X,f):X),de&&de()})}function O(g){var re=S;if(Gt(g)){var he=g.match(/([+\-<>])(\d+)?/)||[],de=he[1],X=he[2];de==="+"||de==="-"?re=ee(S+ +(""+de+(+X||1)),S):de===">"?re=X?N(+X):C(!0):de==="<"&&(re=y(!0))}else re=m?g:un(g,0,f);return re}function Y(g,re){var he=D||(w()?1:v),de=ee(S+he*(g?-1:1),S,!(D||w()));return de===-1&&h&&!Ho(d(),s(!g),1)?g?0:f:re?de:F(de)}function ee(g,re,he){if(T()||w()){var de=I(g);de!==g&&(re=g,g=de,he=!1),g<0||g>f?!D&&(dr(0,g,re,!0)||dr(f,re,g,!0))?g=N(A(g)):m?g=he?g<0?-(E%v||v):E:g:n.rewind?g=g<0?f:0:g=-1:he&&g!==re&&(g=N(A(re)+(g<re?-1:1)))}else g=-1;return g}function I(g){if(h&&n.trimSpace==="move"&&g!==S)for(var re=d();re===p(g,!0)&&dr(g,0,e.length-1,!n.rewind);)g<S?--g:++g;return g}function F(g){return m?(g+E)%E||0:g}function q(){for(var g=E-(w()||m&&D?1:v);$&&g-- >0;)if(p(E-1,!0)!==p(g,!0)){g++;break}return un(g,0,E-1)}function N(g){return un(w()?g:v*g,0,f)}function A(g){return w()?Ut(g,f):yr((g>=f?E-1:g)/v)}function j(g){var re=i.toIndex(g);return h?un(re,0,f):re}function Q(g){g!==S&&(H=S,S=g)}function te(g){return g?H:S}function w(){return!jn(n.focus)||n.isNavigation}function ae(){return e.state.is([wn,zn])&&!!n.waitForTransition}return{mount:P,go:k,scroll:R,getNext:C,getPrev:y,getAdjacent:Y,getEnd:q,setIndex:Q,getIndex:te,toIndex:N,toPage:A,toDest:j,hasFocus:w,isBusy:ae}}var qs="http://www.w3.org/2000/svg",Ks="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",tr=40;function Gs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,$=T,m=p.prev,h=p.next,C,y,S={};function f(){E(),o(nt,H)}function H(){D(),f()}function E(){var R=n.arrows;R&&!(m&&h)&&z(),m&&h&&(Wn(S,{prev:m,next:h}),Hn($,R?"":"none"),Et($,y=Si+"--"+n.direction),R&&(v(),k(),Se([m,h],Yn,x.id),i(Ko,m,h)))}function D(){r.destroy(),Wt($,y),C?(rn(T?[m,h]:$),m=h=null):Pt([m,h],Ci)}function v(){o([Zt,Tn,je,an,vr],k),l(h,"click",He(P,">")),l(m,"click",He(P,"<"))}function P(R){u.go(R,!0)}function z(){$=T||hn("div",d.arrows),m=L(!0),h=L(!1),C=!0,Kn($,[m,h]),!T&&ci($,x)}function L(R){var O='<button class="'+d.arrow+" "+(R?d.prev:d.next)+'" type="button"><svg xmlns="'+qs+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Ks)+'" />';return Fo(O)}function k(){if(m&&h){var R=e.index,O=u.getPrev(),Y=u.getNext(),ee=O>-1&&R<O?s.last:s.prev,I=Y>-1&&R>Y?s.first:s.next;m.disabled=O<0,h.disabled=Y<0,Se(m,ft,ee),Se(h,ft,I),i(Go,m,h,O,Y)}}return{arrows:S,mount:f,destroy:D,update:k}}var Us=ui+"-interval";function Ys(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=wr(n.interval,e.go.bind(e,">"),v),s=d.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,$=n.autoplay,m,h,C=$==="pause";function y(){$&&(S(),x&&Se(x,Yn,p.track.id),C||f(),D())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(z){m=z.type==="mouseenter",E()}),n.pauseOnFocus&&l(T,"focusin focusout",function(z){h=z.type==="focusin",E()}),x&&l(x,"click",function(){C?f():H(!0)}),o([Vt,$r,je],d.rewind),o(Vt,P)}function f(){s()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),h=m=C=!1,D(),i(fi))}function H(z){z===void 0&&(z=!0),C=!!z,D(),s()||(d.pause(),i(yi))}function E(){C||(m||h?H(!1):f())}function D(){x&&(Ft(x,on,!C),Se(x,ft,n.i18n[C?"play":"pause"]))}function v(z){var L=p.bar;L&&$t(L,"width",z*100+"%"),i(Xo,z)}function P(z){var L=t.Slides.getAt(z);d.set(L&&+wt(L.slide,Us)||n.interval)}return{mount:y,destroy:d.cancel,play:f,pause:H,isPaused:s}}function Xs(e,t,n){var r=Be(e),o=r.on;function l(){n.cover&&(o(vi,He(d,!0)),o([Zt,nt,je],He(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&d(s,u,p)})}function d(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:He(i,!1)}}var Zs=10,Qs=600,Js=.6,el=1.5,tl=800;function nl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Move,s=d.getPosition,p=d.getLimit,u=d.exceededLimit,T=d.translate,x=e.is(bn),$,m,h=1;function C(){o(Vt,H),o([nt,je],E)}function y(v,P,z,L,k){var R=s();if(H(),z&&(!x||!u())){var O=t.Layout.sliderSize(),Y=Qr(v)*O*yr(it(v)/O)||0;v=d.toPosition(t.Controller.toDest(v%O))+Y}var ee=Ho(R,v,1);h=1,P=ee?0:P||fr(it(v-R)/el,tl),m=L,$=wr(P,S,He(f,R,v,k),1),i(zn),l($r),$.start()}function S(){i(yn),m&&m(),l(an)}function f(v,P,z,L){var k=s(),R=v+(P-v)*D(L),O=(R-k)*h;T(k+O),x&&!z&&u()&&(h*=Js,it(O)<Zs&&y(p(u(!0)),Qs,!1,m,!0))}function H(){$&&$.cancel()}function E(){$&&!$.isPaused()&&(H(),S())}function D(v){var P=n.easingFunc;return P?P(v):1-Math.pow(1-v,4)}return{mount:C,destroy:H,scroll:y,cancel:E}}var pn={passive:!1,capture:!0};function rl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,$=t.Media.reduce,m=t.Direction,h=m.resolve,C=m.orient,y=p.getPosition,S=p.exceededLimit,f,H,E,D,v,P=!1,z,L,k;function R(){i(x,Or,Xr,pn),i(x,Br,Xr,pn),i(x,ua,Y,pn),i(x,"click",F,{capture:!0}),i(x,"dragstart",kt),o([Zt,nt],O)}function O(){var M=n.drag;oe(!M),D=M==="free"}function Y(M){if(z=!1,!L){var W=X(M);de(M.target)&&(W||!M.button)&&(T.isBusy()?kt(M,!0):(k=W?x:window,v=s.is([wn,zn]),E=null,i(k,Or,ee,pn),i(k,Br,I,pn),p.cancel(),u.cancel(),q(M)))}}function ee(M){if(s.is(lr)||(s.set(lr),l(zo)),M.cancelable)if(v){p.translate(f+he(w(M)));var W=ae(M)>Gi,B=P!==(P=S());(W||B)&&q(M),z=!0,l(jo),kt(M)}else j(M)&&(v=A(M),kt(M))}function I(M){s.is(lr)&&(s.set(yn),l(qo)),v&&(N(M),kt(M)),d(k,Or,ee),d(k,Br,I),v=!1}function F(M){!L&&z&&kt(M,!0)}function q(M){E=H,H=M,f=y()}function N(M){var W=Q(M),B=te(W),ne=n.rewind&&n.rewindByDrag;$(!1),D?T.scroll(B,0,n.snap):e.is(Xn)?T.go(C(Qr(W))<0?ne?"<":"-":ne?">":"+"):e.is(bn)&&P&&ne?T.go(S(!0)?">":"<"):T.go(T.toDest(B),!0),$(!0)}function A(M){var W=n.dragMinThreshold,B=Rn(W),ne=B&&W.mouse||0,pe=(B?W.touch:+W)||10;return it(w(M))>(X(M)?pe:ne)}function j(M){return it(w(M))>it(w(M,!0))}function Q(M){if(e.is(Ln)||!P){var W=ae(M);if(W&&W<Gi)return w(M)/W}return 0}function te(M){return y()+Qr(M)*Ut(it(M)*(n.flickPower||600),D?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function w(M,W){return re(M,W)-re(g(M),W)}function ae(M){return Zr(M)-Zr(g(M))}function g(M){return H===M&&E||H}function re(M,W){return(X(M)?M.changedTouches[0]:M)["page"+h(W?"Y":"X")]}function he(M){return M/(P&&e.is(bn)?Ws:1)}function de(M){var W=n.noDrag;return!kn(M,"."+aa+", ."+Ar)&&(!W||!kn(M,W))}function X(M){return typeof TouchEvent<"u"&&M instanceof TouchEvent}function G(){return v}function oe(M){L=M}return{mount:R,disable:oe,isDragging:G}}var il={Spacebar:" ",Right:Er,Left:Lr,Up:Jo,Down:ea};function $i(e){return e=Gt(e)?e:e.key,il[e]||e}var Ui="keydown";function ol(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.unbind,d=e.root,s=t.Direction.resolve,p,u;function T(){x(),o(nt,$),o(nt,x),o(Vt,h)}function x(){var y=n.keyboard;y&&(p=y==="global"?window:d,l(p,Ui,C))}function $(){i(p,Ui)}function m(y){u=y}function h(){var y=u;u=!0,Ao(function(){u=y})}function C(y){if(!u){var S=$i(y);S===s(Lr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:$,disable:m}}var An=ui+"-lazy",ur=An+"-srcset",al="["+An+"], ["+ur+"]";function sl(e,t,n){var r=Be(e),o=r.on,l=r.off,i=r.bind,d=r.emit,s=n.lazyLoad==="sequential",p=[Tn,an],u=[];function T(){n.lazyLoad&&(x(),o(je,x))}function x(){Bt(u),$(),s?y():(l(p),o(p,m),m())}function $(){t.Slides.forEach(function(S){di(S.slide,al).forEach(function(f){var H=wt(f,An),E=wt(f,ur);if(H!==f.src||E!==f.srcset){var D=n.classes.spinner,v=f.parentElement,P=Gn(v,"."+D)||hn("span",D,v);u.push([f,S,P]),f.src||Hn(f,"none")}})})}function m(){u=u.filter(function(S){var f=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,f)?h(S):!0}),u.length||l(p)}function h(S){var f=S[0];Et(S[1].slide,ni),i(f,"load error",He(C,S)),Se(f,"src",wt(f,An)),Se(f,"srcset",wt(f,ur)),Pt(f,An),Pt(f,ur)}function C(S,f){var H=S[0],E=S[1];Wt(E.slide,ni),f.type!=="error"&&(rn(S[2]),Hn(H,""),d(vi,H,E),d(vn)),s&&y()}function y(){u.length&&h(u.shift())}return{mount:T,destroy:He(Bt,u),check:m}}function ll(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,$=t.Direction.resolve,m=s.pagination,h=[],C,y;function S(){f(),o([nt,je,vr],S);var L=n.pagination;m&&Hn(m,L?"":"none"),L&&(o([Vt,$r,an],z),H(),z(),l(Uo,{list:C,items:h},P(e.index)))}function f(){C&&(rn(m?Xt(C.children):C),Wt(C,y),Bt(h),C=null),r.destroy()}function H(){var L=e.length,k=n.classes,R=n.i18n,O=n.perPage,Y=u()?p.getEnd()+1:Nn(L/O);C=m||hn("ul",k.pagination,s.track.parentElement),Et(C,y=Mr+"--"+v()),Se(C,Ht,"tablist"),Se(C,ft,R.select),Se(C,xi,v()===Pr?"vertical":"");for(var ee=0;ee<Y;ee++){var I=hn("li",null,C),F=hn("button",{class:k.page,type:"button"},I),q=d.getIn(ee).map(function(A){return A.slide.id}),N=!u()&&O>1?R.pageX:R.slideX;i(F,"click",He(E,ee)),n.paginationKeyboard&&i(F,"keydown",He(D,ee)),Se(I,Ht,"presentation"),Se(F,Ht,"tab"),Se(F,Yn,q.join(" ")),Se(F,ft,Jr(N,ee+1)),Se(F,fn,-1),h.push({li:I,button:F,page:ee})}}function E(L){x(">"+L,!0)}function D(L,k){var R=h.length,O=$i(k),Y=v(),ee=-1;O===$(Er,!1,Y)?ee=++L%R:O===$(Lr,!1,Y)?ee=(--L+R)%R:O==="Home"?ee=0:O==="End"&&(ee=R-1);var I=h[ee];I&&(ko(I.button),x(">"+ee),kt(k,!0))}function v(){return n.paginationDirection||n.direction}function P(L){return h[p.toPage(L)]}function z(){var L=P(T(!0)),k=P(T());if(L){var R=L.button;Wt(R,on),Pt(R,Di),Se(R,fn,-1)}if(k){var O=k.button;Et(O,on),Se(O,Di,!0),Se(O,fn,"")}l(Yo,{list:C,items:h},L,k)}return{items:h,mount:S,destroy:f,getAt:P,update:z}}var cl=[" ","Enter"];function dl(e,t,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function d(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){d(),i()}function p(m,h){var C=Be(m);C.on(Vt,function(y,S,f){h.go(h.is(Ln)?f:y)}),l.push(C)}function u(){var m=Be(e),h=m.on;h(mi,x),h(Zo,$),h([Zt,nt],T),l.push(m),m.emit(hi,e.splides)}function T(){Se(t.Elements.list,xi,n.direction===Pr?"vertical":"")}function x(m){e.go(m.index)}function $(m,h){li(cl,$i(h))&&(x(m),kt(h))}return{setup:He(t.Media.set,{slideFocus:jn(o)?r:o},!0),mount:i,destroy:d,remount:s}}function ul(e,t,n){var r=Be(e),o=r.bind,l=0;function i(){n.wheel&&o(t.Elements.track,"wheel",d,pn)}function d(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),$=n.wheelMinThreshold||0,m=n.wheelSleep||0;it(u)>$&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(wn)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var pl=90;function ml(e,t,n){var r=Be(e),o=r.on,l=t.Elements.track,i=n.live&&!n.isNavigation,d=hn("span",Ms),s=wr(pl,He(u,!1));function p(){i&&(x(!t.Autoplay.isPaused()),Se(l,qi,!0),d.textContent="…",o(fi,He(x,!0)),o(yi,He(x,!1)),o([Tn,an],He(u,!0)))}function u($){Se(l,ji,$),$?(Kn(l,d),s.start()):(rn(d),s.cancel())}function T(){Pt(l,[zi,qi,ji]),rn(d)}function x($){i&&Se(l,zi,$?"off":"polite")}return{mount:p,disable:x,destroy:T}}var gl=Object.freeze({__proto__:null,Media:Ss,Direction:$s,Elements:Hs,Slides:Os,Layout:Bs,Clones:Ds,Move:zs,Controller:js,Arrows:Gs,Autoplay:Ys,Cover:Xs,Scroll:nl,Drag:rl,Keyboard:ol,LazyLoad:sl,Pagination:ll,Sync:dl,Wheel:ul,Live:ml}),hl={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"},fl={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:ks,i18n:hl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function yl(e,t,n){var r=t.Slides;function o(){Be(e).on([Zt,je],l)}function l(){r.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function i(d,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:o,start:i,cancel:Xr}}function vl(e,t,n){var r=t.Move,o=t.Controller,l=t.Scroll,i=t.Elements.list,d=He($t,i,"transition"),s;function p(){Be(e).bind(i,"transitionend",function($){$.target===i&&s&&(T(),s())})}function u($,m){var h=r.toPosition($,!0),C=r.getPosition(),y=x($);it(h-C)>=1&&y>=1?n.useScroll?l.scroll(h,y,!1,m):(d("transform "+y+"ms "+n.easing),r.translate(h,!0),s=m):(r.jump($),m())}function T(){d(""),l.cancel()}function x($){var m=n.rewindSpeed;if(e.is(bn)&&m){var h=o.getIndex(!0),C=o.getEnd();if(h===0&&$>=C||h>=C&&$===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var bl=(function(){function e(n,r){this.event=Be(),this.Components={},this.state=xs(gn),this.splides=[],this._o={},this._E={};var o=Gt(n)?Wo(document,n):n;_n(o,o+" is invalid."),this.root=o,r=Kt({label:wt(o,ft)||"",labelledby:wt(o,bi)||""},fl,e.defaults,r||{});try{Kt(r,JSON.parse(wt(o,ui)))}catch{_n(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,o){var l=this,i=this.state,d=this.Components;_n(i.is([gn,hr]),"Already mounted!"),i.set(gn),this._C=d,this._T=o||this._T||(this.is(Xn)?yl:vl),this._E=r||this._E;var s=Wn({},gl,this._E,{Transition:this._T});return nn(s,function(p,u){var T=p(l,d,l._o);d[u]=T,T.setup&&T.setup()}),nn(d,function(p){p.mount&&p.mount()}),this.emit(Zt),Et(this.root,Is),i.set(yn),this.emit(ei),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(yn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Xt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(je),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(gn)?Be(this).on(ei,this.destroy.bind(this,r)):(nn(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(gi),o.destroy(),r&&Bt(this.splides),l.set(hr)),this},hs(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),wi=bl;wi.defaults={};wi.STATES=ys;var Yi=[[Zt,"onMounted"],[ei,"onReady"],[Vt,"onMove"],[Tn,"onMoved"],[mi,"onClick"],[Oo,"onActive"],[Bo,"onInactive"],[Vo,"onVisible"],[Do,"onHidden"],[je,"onRefresh"],[nt,"onUpdated"],[vn,"onResize"],[Sr,"onResized"],[zo,"onDrag"],[jo,"onDragging"],[qo,"onDragged"],[$r,"onScroll"],[an,"onScrolled"],[gi,"onDestroy"],[Ko,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Uo,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[hi,"onNavigationMounted"],[fi,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[yi,"onAutoplayPause"],[vi,"onLazyLoadLoaded"]];function Ti(...e){return e.filter(Boolean).join(" ")}function br(e){return e!==null&&typeof e=="object"}function ri(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ri(n,t[r]));if(br(e)&&br(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ri(e[o],t[o]))}return e===t}function xl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Cl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function ii(e,t){const n=e;return Cl(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():br(r)?n[o]=ii(br(n[o])?n[o]:{},r):n[o]=r}),n}var Sl=({children:e,className:t,...n})=>c.createElement("div",{className:Ti("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Li=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new wi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ii({},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&&!ri(this.options,e)&&(this.splide.options=e,this.options=ii({},e));const t=this.getSlides();xl(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){Yi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(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:r,...o}=this.props;return c.createElement(t,{className:Ti("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yi.map(l=>l[1])])},n?c.createElement(Sl,null,r):r)}},Ei=({children:e,className:t,...n})=>c.createElement("li",{className:Ti("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),_e=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function Ta(e){return e.type==="object"&&e.version===1}const La="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",Pa="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Ra="ControlSlider-module__arrowVertical___tBfVN",Ma="ControlSlider-module__nextArrow___-30Yc",Ia="ControlSlider-module__arrowInner___aEra3",ka="ControlSlider-module__arrowIcon___S4ztF",Fa="ControlSlider-module__arrowImg___2dwJW",Wa="ControlSlider-module__mirror___brd6U",Na="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Oa="ControlSlider-module__paginationVertical___zYqKw",Ba="ControlSlider-module__paginationItem___nTRbk",Va="ControlSlider-module__dot___p1Qun",Da="ControlSlider-module__activeDot___LHFaj",za="ControlSlider-module__paginationInsideBottom___R3FWn",ja="ControlSlider-module__paginationInsideTop___V-qb-",qa="ControlSlider-module__paginationOutsideBottom___14w8D",Ka="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ua="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Ya="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Qa="ControlSlider-module__captionBlock___dJ6-j",Ja="ControlSlider-module__captionTextWrapper___HFlpf",es="ControlSlider-module__captionText___uGBVc",ts="ControlSlider-module__active___WZK4G",ns="ControlSlider-module__withPointerEvents___t-18M",rs="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",os="ControlSlider-module__topRightAlignment___NMapS",as="ControlSlider-module__middleLeftAlignment___OnUrY",ss="ControlSlider-module__middleCenterAlignment___Tdkl0",ls="ControlSlider-module__middleRightAlignment___wEbfX",cs="ControlSlider-module__bottomLeftAlignment___cTP2-",ds="ControlSlider-module__bottomCenterAlignment___c54fB",us="ControlSlider-module__bottomRightAlignment___kEwrz",ps="ControlSlider-module__clickOverlay___DZA28",ms="ControlSlider-module__contain___pLyq7",gs="ControlSlider-module__cover___KdDat",me={wrapper:La,hoverArrow:Ea,sliderItem:Pa,sliderImage:Aa,arrow:_a,arrowVertical:Ra,nextArrow:Ma,arrowInner:Ia,arrowIcon:ka,arrowImg:Fa,mirror:Wa,pagination:Na,paginationInner:Ha,paginationVertical:Oa,paginationItem:Ba,dot:Va,activeDot:Da,paginationInsideBottom:za,paginationInsideTop:ja,paginationOutsideBottom:qa,paginationOutsideTop:Ka,paginationInsideLeft:Ga,paginationInsideRight:Ua,paginationOutsideLeft:Xa,paginationOutsideRight:Ya,imgWrapper:Za,captionBlock:Qa,captionTextWrapper:Ja,captionText:es,active:ts,withPointerEvents:ns,topLeftAlignment:rs,topCenterAlignment:is,topRightAlignment:os,middleLeftAlignment:as,middleCenterAlignment:ss,middleRightAlignment:ls,bottomLeftAlignment:cs,bottomCenterAlignment:ds,bottomRightAlignment:us,clickOverlay:ps,contain:ms,cover:gs};function hs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fs(e,t,n){return t&&hs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ni="(prefers-reduced-motion: reduce)",gn=1,ys=2,yn=3,$n=4,zn=5,cr=6,fr=7,vs={CREATED:gn,MOUNTED:ys,IDLE:yn,MOVING:$n,SCROLLING:zn,DRAGGING:cr,DESTROYED:fr};function Bt(e){e.length=0}function Yt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Yt(arguments,1)))}var Ro=setTimeout,Zr=function(){};function Hi(e){return requestAnimationFrame(e)}function Sr(e,t){return typeof t===e}function In(e){return!li(e)&&Sr("object",e)}var si=Array.isArray,Mo=Ne(Sr,"function"),Gt=Ne(Sr,"string"),jn=Ne(Sr,"undefined");function li(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return si(e)?e:[e]}function xt(e,t){qn(e).forEach(t)}function ci(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,qn(t)),e}function Ft(e,t,n){e&&xt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Et(e,t){Ft(e,Gt(t)?t.split(" "):t,!0)}function Kn(e,t){xt(t,e.appendChild.bind(e))}function di(e,t){xt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function kn(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?Yt(e.children):[];return t?n.filter(function(r){return kn(r,t)}):n}function Gn(e,t){return t?ko(e,t)[0]:e.firstElementChild}var Fn=Object.keys;function nn(e,t,n){return e&&(n?Fn(e).reverse():Fn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Wn(e){return Yt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Kt(e){return Yt(arguments,1).forEach(function(t){nn(t,function(n,r){si(n)?e[r]=n.slice():In(n)?e[r]=Kt({},In(e[r])?e[r]:{},n):e[r]=n})}),e}function Oi(e,t){xt(t||Fn(e),function(n){delete e[n]})}function Pt(e,t){xt(e,function(n){xt(t,function(r){n&&n.removeAttribute(r)})})}function we(e,t,n){In(t)?nn(t,function(r,o){we(e,o,r)}):xt(e,function(r){li(n)||n===""?Pt(r,t):r.setAttribute(t,String(n))})}function hn(e,t,n){var r=document.createElement(e);return t&&(Gt(t)?Et(r,t):we(r,t)),n&&Kn(n,r),r}function $t(e,t,n){if(jn(n))return getComputedStyle(e)[t];li(n)||(e.style[t]=""+n)}function Nn(e,t){$t(e,"display",t)}function Fo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Tt(e,t){return e.getAttribute(t)}function Bi(e,t){return e&&e.classList.contains(t)}function ft(e){return e.getBoundingClientRect()}function rn(e){xt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Wo(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function No(e,t){return e&&e.querySelector(t)}function ui(e,t){return t?Yt(e.querySelectorAll(t)):[]}function Wt(e,t){Ft(e,t,!1)}function Qr(e){return e.timeStamp}function Jt(e){return Gt(e)?e:e?e+"px":""}var Un="splide",pi="data-"+Un;function An(e,t){if(!e)throw new Error("["+Un+"] "+(t||""))}var Ut=Math.min,yr=Math.max,vr=Math.floor,Hn=Math.ceil,it=Math.abs;function Ho(e,t,n){return it(e-t)<n}function ur(e,t,n,r){var o=Ut(t,n),l=yr(t,n);return r?o<e&&e<l:o<=e&&e<=l}function un(e,t,n){var r=Ut(t,n),o=yr(t,n);return Ut(yr(r,e),o)}function Jr(e){return+(e>0)-+(e<0)}function ei(e,t){return xt(t,function(n){e=e.replace("%s",""+n)}),e}function mi(e){return e<10?"0"+e:""+e}var Vi={};function bs(e){return""+e+mi(Vi[e]=(Vi[e]||0)+1)}function Oo(){var e=[];function t(i,d,s,p){o(i,d,function(u,E,S){var $="addEventListener"in u,g=$?u.removeEventListener.bind(u,E,s,p):u.removeListener.bind(u,s);$?u.addEventListener(E,s,p):u.addListener(s),e.push([u,E,S,s,g])})}function n(i,d,s){o(i,d,function(p,u,E){e=e.filter(function(S){return S[0]===p&&S[1]===u&&S[2]===E&&(!s||S[3]===s)?(S[4](),!1):!0})})}function r(i,d,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,s)),i.dispatchEvent(p),p}function o(i,d,s){xt(i,function(p){p&&xt(d,function(u){u.split(" ").forEach(function(E){var S=E.split(".");s(p,S[0],S[1])})})})}function l(){e.forEach(function(i){i[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",ti="ready",Vt="move",Tn="moved",gi="click",Bo="active",Vo="inactive",Do="visible",zo="hidden",je="refresh",nt="updated",vn="resize",wr="resized",jo="drag",qo="dragging",Ko="dragged",$r="scroll",an="scrolled",xs="overflow",hi="destroy",Go="arrows:mounted",Uo="arrows:updated",Xo="pagination:mounted",Yo="pagination:updated",fi="navigation:mounted",yi="autoplay:play",Zo="autoplay:playing",vi="autoplay:pause",bi="lazyload:loaded",Qo="sk",Jo="sh",br="ei";function Be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Oo();function r(l,i){n.bind(t,qn(l).join(" "),function(d){i.apply(i,si(d.detail)?d.detail:[])})}function o(l){n.dispatch(t,l,Yt(arguments,1))}return e&&e.event.on(hi,n.destroy),Wn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:o})}function Tr(e,t,n,r){var o=Date.now,l,i=0,d,s=!0,p=0;function u(){if(!s){if(i=e?Ut((o()-l)/e,1):1,n&&n(i),i>=1&&(t(),l=o(),r&&++p>=r))return S();d=Hi(u)}}function E(f){f||g(),l=o()-(f?i*e:0),s=!1,d=Hi(u)}function S(){s=!0}function $(){l=o(),i=0,n&&n(i)}function g(){d&&cancelAnimationFrame(d),i=0,d=0,s=!0}function h(f){e=f}function x(){return s}return{start:E,rewind:$,pause:S,cancel:g,set:h,isPaused:x}}function Cs(e){var t=e;function n(o){t=o}function r(o){return ci(qn(o),t)}return{set:n,is:r}}function Ss(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=Oo(),d=[];function s(){var g=n.mediaQuery==="min";Fn(o).sort(function(h,x){return g?+h-+x:+x-+h}).forEach(function(h){u(o[h],"("+(g?"min":"max")+"-width:"+h+"px)")}),u(l,Ni),E()}function p(g){g&&i.destroy()}function u(g,h){var x=matchMedia(h);i.bind(x,"change",E),d.push([g,x])}function E(){var g=r.is(fr),h=n.direction,x=d.reduce(function(f,b){return Kt(f,b[1].matches?b[0]:{})},{});Oi(n),$(x),n.destroy?e.destroy(n.destroy==="completely"):g?(p(!0),e.mount()):h!==n.direction&&e.refresh()}function S(g){matchMedia(Ni).matches&&(g?Kt(n,l):Oi(n,Fn(l)))}function $(g,h,x){Kt(n,g),h&&Kt(Object.getPrototypeOf(n),g),(x||!r.is(gn))&&e.emit(nt,n)}return{setup:s,destroy:p,reduce:S,set:$}}var Lr="Arrow",Er=Lr+"Left",Pr=Lr+"Right",ea=Lr+"Up",ta=Lr+"Down",Di="rtl",Ar="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ea,Pr],ArrowRight:[ta,Er]};function $s(e,t,n){function r(l,i,d){d=d||n.direction;var s=d===Di&&!i?1:d===Ar?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var E=Hr[p.toLowerCase()][s]||p;return u>0?E.charAt(0).toUpperCase()+E.slice(1):E})}function o(l){return l*(n.direction===Di?1:-1)}return{resolve:r,orient:o}}var Nt="role",fn="tabindex",Ts="disabled",Lt="aria-",Xn=Lt+"controls",na=Lt+"current",zi=Lt+"selected",yt=Lt+"label",xi=Lt+"labelledby",ra=Lt+"hidden",Ci=Lt+"orientation",On=Lt+"roledescription",ji=Lt+"live",qi=Lt+"busy",Ki=Lt+"atomic",Si=[Nt,fn,Ts,Xn,na,yt,xi,ra,Ci,On],At=Un+"__",Qt="is-",Or=Un,Gi=At+"track",Ls=At+"list",_r=At+"slide",ia=_r+"--clone",Es=_r+"__container",wi=At+"arrows",Rr=At+"arrow",oa=Rr+"--prev",aa=Rr+"--next",Mr=At+"pagination",sa=Mr+"__page",Ps=At+"progress",As=Ps+"__bar",_s=At+"toggle",Rs=At+"spinner",Ms=At+"sr",Is=Qt+"initialized",on=Qt+"active",la=Qt+"prev",ca=Qt+"next",ni=Qt+"visible",ri=Qt+"loading",da=Qt+"focus-in",ua=Qt+"overflow",ks=[on,ni,la,ca,ri,da,ua],Fs={slide:_r,clone:ia,arrows:wi,arrow:Rr,prev:oa,next:aa,pagination:Mr,page:sa,spinner:Rs};function Ws(e,t){if(Mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kn(n,t);)n=n.parentElement;return n}var Ns=5,Ui=200,pa="touchstart mousedown",Br="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=e.root,d=n.i18n,s={},p=[],u=[],E=[],S,$,g;function h(){y(),H(),b()}function x(){o(je,f),o(je,h),o(nt,b),l(document,pa+" keydown",function(C){g=C.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Ft(i,da,!!g)})}function f(C){var T=Si.concat("style");Bt(p),Wt(i,u),Wt(S,E),Pt([S,$],T),Pt(i,C?T:["style",On])}function b(){Wt(i,u),Wt(S,E),u=F(Or),E=F(Gi),Et(i,u),Et(S,E),we(i,yt,n.label),we(i,xi,n.labelledby)}function y(){S=L("."+Gi),$=Gn(S,"."+Ls),An(S&&$,"A track/list element is missing."),dr(p,ko($,"."+_r+":not(."+ia+")")),nn({arrows:wi,pagination:Mr,prev:oa,next:aa,bar:As,toggle:_s},function(C,T){s[T]=L("."+C)}),Wn(s,{root:i,track:S,list:$,slides:p})}function H(){var C=i.id||bs(Un),T=n.role;i.id=C,S.id=S.id||C+"-track",$.id=$.id||C+"-list",!Tt(i,Nt)&&i.tagName!=="SECTION"&&T&&we(i,Nt,T),we(i,On,d.carousel),we($,Nt,"presentation")}function L(C){var T=No(i,C);return T&&Ws(T,"."+Or)===i?T:void 0}function F(C){return[C+"--"+n.type,C+"--"+n.direction,n.drag&&C+"--draggable",n.isNavigation&&C+"--nav",C===Or&&on]}return Wn(s,{setup:h,mount:x,destroy:f})}var bn="slide",Ln="loop",Yn="fade";function Os(e,t,n,r){var o=Be(e),l=o.on,i=o.emit,d=o.bind,s=e.Components,p=e.root,u=e.options,E=u.isNavigation,S=u.updateOnMove,$=u.i18n,g=u.pagination,h=u.slideFocus,x=s.Direction.resolve,f=Tt(r,"style"),b=Tt(r,yt),y=n>-1,H=Gn(r,"."+Es),L;function F(){y||(r.id=p.id+"-slide"+mi(t+1),we(r,Nt,g?"tabpanel":"group"),we(r,On,$.slide),we(r,yt,b||ei($.slideLabel,[t+1,e.length]))),C()}function C(){d(r,"click",Ne(i,gi,q)),d(r,"keydown",Ne(i,Qo,q)),l([Tn,Jo,an],M),l(fi,j),S&&l(Vt,P)}function T(){L=!0,o.destroy(),Wt(r,ks),Pt(r,Si),we(r,"style",f),we(r,yt,b||"")}function j(){var z=e.splides.map(function(R){var G=R.splide.Components.Slides.getAt(t);return G?G.slide.id:""}).join(" ");we(r,yt,ei($.slideX,(y?n:t)+1)),we(r,Xn,z),we(r,Nt,h?"button":""),h&&Pt(r,On)}function P(){L||M()}function M(){if(!L){var z=e.index;_(),V(),Ft(r,la,t===z-1),Ft(r,ca,t===z+1)}}function _(){var z=oe();z!==Bi(r,on)&&(Ft(r,on,z),we(r,na,E&&z||""),i(z?Bo:Vo,q))}function V(){var z=I(),R=!z&&(!oe()||y);if(e.state.is([$n,zn])||we(r,ra,R||""),we(ui(r,u.focusableNodes||""),fn,R?-1:""),h&&we(r,fn,R?-1:0),z!==Bi(r,ni)&&(Ft(r,ni,z),i(z?Do:zo,q)),!z&&document.activeElement===r){var G=s.Slides.getAt(e.index);G&&Fo(G.slide)}}function Y(z,R,G){$t(G&&H||r,z,R)}function oe(){var z=e.index;return z===t||u.cloneStatus&&z===n}function I(){if(e.is(Yn))return oe();var z=ft(s.Elements.track),R=ft(r),G=x("left",!0),J=x("right",!0);return vr(z[G])<=Hn(R[G])&&vr(R[J])<=Hn(z[J])}function O(z,R){var G=it(z-t);return!y&&(u.rewind||e.is(Ln))&&(G=Ut(G,e.length-G)),G<=R}var q={index:t,slideIndex:n,slide:r,container:H,isClone:y,mount:F,destroy:T,update:M,style:Y,isWithin:O};return q}function Bs(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Elements,s=d.slides,p=d.list,u=[];function E(){S(),o(je,$),o(je,S)}function S(){s.forEach(function(M,_){h(M,_,-1)})}function $(){L(function(M){M.destroy()}),Bt(u)}function g(){L(function(M){M.update()})}function h(M,_,V){var Y=Os(e,_,V,M);Y.mount(),u.push(Y),u.sort(function(oe,I){return oe.index-I.index})}function x(M){return M?F(function(_){return!_.isClone}):u}function f(M){var _=t.Controller,V=_.toIndex(M),Y=_.hasFocus()?1:n.perPage;return F(function(oe){return ur(oe.index,V,V+Y-1)})}function b(M){return F(M)[0]}function y(M,_){xt(M,function(V){if(Gt(V)&&(V=Wo(V)),Io(V)){var Y=s[_];Y?di(V,Y):Kn(p,V),Et(V,n.classes.slide),T(V,Ne(l,vn))}}),l(je)}function H(M){rn(F(M).map(function(_){return _.slide})),l(je)}function L(M,_){x(_).forEach(M)}function F(M){return u.filter(Mo(M)?M:function(_){return Gt(M)?kn(_.slide,M):ci(qn(M),_.index)})}function C(M,_,V){L(function(Y){Y.style(M,_,V)})}function T(M,_){var V=ui(M,"img"),Y=V.length;Y?V.forEach(function(oe){i(oe,"load error",function(){--Y||_()})}):_()}function j(M){return M?s.length:u.length}function P(){return u.length>n.perPage}return{mount:E,destroy:$,update:g,register:h,get:x,getIn:f,getAt:b,add:y,remove:H,forEach:L,filter:F,style:C,getLength:j,isEnough:P}}function Vs(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,E=p.track,S=p.list,$=d.getAt,g=d.style,h,x,f;function b(){y(),l(window,"resize load",Ss(Ne(i,vn))),o([nt,je],y),o(vn,H)}function y(){h=n.direction===Ar,$t(u,"maxWidth",Jt(n.width)),$t(E,s("paddingLeft"),L(!1)),$t(E,s("paddingRight"),L(!0)),H(!0)}function H(q){var z=ft(u);(q||x.width!==z.width||x.height!==z.height)&&($t(E,"height",F()),g(s("marginRight"),Jt(n.gap)),g("width",T()),g("height",j(),!0),x=z,i(wr),f!==(f=O())&&(Ft(u,ua,f),i(xs,f)))}function L(q){var z=n.padding,R=s(q?"right":"left");return z&&Jt(z[R]||(In(z)?0:z))||"0px"}function F(){var q="";return h&&(q=C(),An(q,"height or heightRatio is missing."),q="calc("+q+" - "+L(!1)+" - "+L(!0)+")"),q}function C(){return Jt(n.height||ft(S).width*n.heightRatio)}function T(){return n.autoWidth?null:Jt(n.fixedWidth)||(h?"":P())}function j(){return Jt(n.fixedHeight)||(h?n.autoHeight?null:P():C())}function P(){var q=Jt(n.gap);return"calc((100%"+(q&&" + "+q)+")/"+(n.perPage||1)+(q&&" - "+q)+")"}function M(){return ft(S)[s("width")]}function _(q,z){var R=$(q||0);return R?ft(R.slide)[s("width")]+(z?0:oe()):0}function V(q,z){var R=$(q);if(R){var G=ft(R.slide)[s("right")],J=ft(S)[s("left")];return it(G-J)+(z?0:oe())}return 0}function Y(q){return V(e.length-1)-V(0)+_(0,q)}function oe(){var q=$(0);return q&&parseFloat($t(q.slide,s("marginRight")))||0}function I(q){return parseFloat($t(E,s("padding"+(q?"Right":"Left"))))||0}function O(){return e.is(Yn)||Y(!0)>M()}return{mount:b,resize:H,listSize:M,slideSize:_,sliderSize:Y,totalSize:V,getPadding:I,isOverflow:O}}var Ds=2;function zs(e,t,n){var r=Be(e),o=r.on,l=t.Elements,i=t.Slides,d=t.Direction.resolve,s=[],p;function u(){o(je,E),o([nt,vn],$),(p=x())&&(g(p),t.Layout.resize(!0))}function E(){S(),u()}function S(){rn(s),Bt(s),r.destroy()}function $(){var f=x();p!==f&&(p<f||!f)&&r.emit(je)}function g(f){var b=i.get().slice(),y=b.length;if(y){for(;b.length<f;)dr(b,b);dr(b.slice(-f),b.slice(0,f)).forEach(function(H,L){var F=L<f,C=h(H.slide,L);F?di(C,b[0].slide):Kn(l.list,C),dr(s,C),i.register(C,L-f+(F?0:y),H.index)})}}function h(f,b){var y=f.cloneNode(!0);return Et(y,n.classes.clone),y.id=e.root.id+"-clone"+mi(b+1),y}function x(){var f=n.clones;if(!e.is(Ln))f=0;else if(jn(f)){var b=n[d("fixedWidth")]&&t.Layout.slideSize(0),y=b&&Hn(ft(l.track)[d("width")]/b);f=y||n[d("autoWidth")]&&e.length||n.perPage*Ds}return f}return{mount:u,destroy:S}}function js(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Layout,s=d.slideSize,p=d.getPadding,u=d.totalSize,E=d.listSize,S=d.sliderSize,$=t.Direction,g=$.resolve,h=$.orient,x=t.Elements,f=x.list,b=x.track,y;function H(){y=t.Transition,o([Zt,wr,nt,je],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),C(e.index),t.Slides.update())}function F(R,G,J,Z){R!==G&&q(R>J)&&(M(),T(P(Y(),R>J),!0)),i($n),l(Vt,G,J,R),y.start(G,function(){i(yn),l(Tn,G,J,R),Z&&Z()})}function C(R){T(V(R,!0))}function T(R,G){if(!e.is(Yn)){var J=G?R:j(R);$t(f,"transform","translate"+g("X")+"("+J+"px)"),R!==J&&l(Jo)}}function j(R){if(e.is(Ln)){var G=_(R),J=G>t.Controller.getEnd(),Z=G<0;(Z||J)&&(R=P(R,J))}return R}function P(R,G){var J=R-O(G),Z=S();return R-=h(Z*(Hn(it(J)/Z)||1))*(G?1:-1),R}function M(){T(Y(),!0),y.cancel()}function _(R){for(var G=t.Slides.get(),J=0,Z=1/0,A=0;A<G.length;A++){var ne=G[A].index,m=it(V(ne,!0)-R);if(m<=Z)Z=m,J=ne;else break}return J}function V(R,G){var J=h(u(R-1)-I(R));return G?oe(J):J}function Y(){var R=g("left");return ft(f)[R]-ft(b)[R]+h(p(!1))}function oe(R){return n.trimSpace&&e.is(bn)&&(R=un(R,0,h(S(!0)-E()))),R}function I(R){var G=n.focus;return G==="center"?(E()-s(R,!0))/2:+G*s(R)||0}function O(R){return V(R?t.Controller.getEnd():0,!!n.trimSpace)}function q(R){var G=h(P(Y(),R));return R?G>=0:G<=f[g("scrollWidth")]-ft(b)[g("width")]}function z(R,G){G=jn(G)?Y():G;var J=R!==!0&&h(G)<h(O(!1)),Z=R!==!1&&h(G)>h(O(!0));return J||Z}return{mount:H,move:F,jump:C,translate:T,shift:P,cancel:M,toIndex:_,toPosition:V,getPosition:Y,getLimit:O,exceededLimit:z,reposition:L}}function qs(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=t.Move,d=i.getPosition,s=i.getLimit,p=i.toPosition,u=t.Slides,E=u.isEnough,S=u.getLength,$=n.omitEnd,g=e.is(Ln),h=e.is(bn),x=Ne(Y,!1),f=Ne(Y,!0),b=n.start||0,y,H=b,L,F,C;function T(){j(),o([nt,je,br],j),o(wr,P)}function j(){L=S(!0),F=n.perMove,C=n.perPage,y=q();var m=un(b,0,$?y:L-1);m!==b&&(b=m,i.reposition())}function P(){y!==q()&&l(br)}function M(m,Q,ye){if(!ne()){var ce=V(m),xe=O(ce);xe>-1&&(Q||xe!==b)&&(J(xe),i.move(ce,xe,H,ye))}}function _(m,Q,ye,ce){t.Scroll.scroll(m,Q,ye,function(){var xe=O(i.toIndex(d()));J($?Ut(xe,y):xe),ce&&ce()})}function V(m){var Q=b;if(Gt(m)){var ye=m.match(/([+\-<>])(\d+)?/)||[],ce=ye[1],xe=ye[2];ce==="+"||ce==="-"?Q=oe(b+ +(""+ce+(+xe||1)),b):ce===">"?Q=xe?z(+xe):x(!0):ce==="<"&&(Q=f(!0))}else Q=g?m:un(m,0,y);return Q}function Y(m,Q){var ye=F||(A()?1:C),ce=oe(b+ye*(m?-1:1),b,!(F||A()));return ce===-1&&h&&!Ho(d(),s(!m),1)?m?0:y:Q?ce:O(ce)}function oe(m,Q,ye){if(E()||A()){var ce=I(m);ce!==m&&(Q=m,m=ce,ye=!1),m<0||m>y?!F&&(ur(0,m,Q,!0)||ur(y,Q,m,!0))?m=z(R(m)):g?m=ye?m<0?-(L%C||C):L:m:n.rewind?m=m<0?y:0:m=-1:ye&&m!==Q&&(m=z(R(Q)+(m<Q?-1:1)))}else m=-1;return m}function I(m){if(h&&n.trimSpace==="move"&&m!==b)for(var Q=d();Q===p(m,!0)&&ur(m,0,e.length-1,!n.rewind);)m<b?--m:++m;return m}function O(m){return g?(m+L)%L||0:m}function q(){for(var m=L-(A()||g&&F?1:C);$&&m-- >0;)if(p(L-1,!0)!==p(m,!0)){m++;break}return un(m,0,L-1)}function z(m){return un(A()?m:C*m,0,y)}function R(m){return A()?Ut(m,y):vr((m>=y?L-1:m)/C)}function G(m){var Q=i.toIndex(m);return h?un(Q,0,y):Q}function J(m){m!==b&&(H=b,b=m)}function Z(m){return m?H:b}function A(){return!jn(n.focus)||n.isNavigation}function ne(){return e.state.is([$n,zn])&&!!n.waitForTransition}return{mount:T,go:M,scroll:_,getNext:x,getPrev:f,getAdjacent:Y,getEnd:q,setIndex:J,getIndex:Z,toIndex:z,toPage:R,toDest:G,hasFocus:A,isBusy:ne}}var Ks="http://www.w3.org/2000/svg",Gs="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",tr=40;function Us(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,E=p.arrows,S=p.track,$=E,g=p.prev,h=p.next,x,f,b={};function y(){L(),o(nt,H)}function H(){F(),y()}function L(){var _=n.arrows;_&&!(g&&h)&&j(),g&&h&&(Wn(b,{prev:g,next:h}),Nn($,_?"":"none"),Et($,f=wi+"--"+n.direction),_&&(C(),M(),we([g,h],Xn,S.id),i(Go,g,h)))}function F(){r.destroy(),Wt($,f),x?(rn(E?[g,h]:$),g=h=null):Pt([g,h],Si)}function C(){o([Zt,Tn,je,an,br],M),l(h,"click",Ne(T,">")),l(g,"click",Ne(T,"<"))}function T(_){u.go(_,!0)}function j(){$=E||hn("div",d.arrows),g=P(!0),h=P(!1),x=!0,Kn($,[g,h]),!E&&di($,S)}function P(_){var V='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+Ks+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Wo(V)}function M(){if(g&&h){var _=e.index,V=u.getPrev(),Y=u.getNext(),oe=V>-1&&_<V?s.last:s.prev,I=Y>-1&&_>Y?s.first:s.next;g.disabled=V<0,h.disabled=Y<0,we(g,yt,oe),we(h,yt,I),i(Uo,g,h,V,Y)}}return{arrows:b,mount:y,destroy:F,update:M}}var Xs=pi+"-interval";function Ys(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.emit,d=Tr(n.interval,e.go.bind(e,">"),C),s=d.isPaused,p=t.Elements,u=t.Elements,E=u.root,S=u.toggle,$=n.autoplay,g,h,x=$==="pause";function f(){$&&(b(),S&&we(S,Xn,p.track.id),x||y(),F())}function b(){n.pauseOnHover&&l(E,"mouseenter mouseleave",function(j){g=j.type==="mouseenter",L()}),n.pauseOnFocus&&l(E,"focusin focusout",function(j){h=j.type==="focusin",L()}),S&&l(S,"click",function(){x?y():H(!0)}),o([Vt,$r,je],d.rewind),o(Vt,T)}function y(){s()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),h=g=x=!1,F(),i(yi))}function H(j){j===void 0&&(j=!0),x=!!j,F(),s()||(d.pause(),i(vi))}function L(){x||(g||h?H(!1):y())}function F(){S&&(Ft(S,on,!x),we(S,yt,n.i18n[x?"play":"pause"]))}function C(j){var P=p.bar;P&&$t(P,"width",j*100+"%"),i(Zo,j)}function T(j){var P=t.Slides.getAt(j);d.set(P&&+Tt(P.slide,Xs)||n.interval)}return{mount:f,destroy:d.cancel,play:y,pause:H,isPaused:s}}function Zs(e,t,n){var r=Be(e),o=r.on;function l(){n.cover&&(o(bi,Ne(d,!0)),o([Zt,nt,je],Ne(i,!0)))}function i(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&d(s,u,p)})}function d(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Nn(p,s?"none":"")}return{mount:l,destroy:Ne(i,!1)}}var Qs=10,Js=600,el=.6,tl=1.5,nl=800;function rl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=e.state.set,d=t.Move,s=d.getPosition,p=d.getLimit,u=d.exceededLimit,E=d.translate,S=e.is(bn),$,g,h=1;function x(){o(Vt,H),o([nt,je],L)}function f(C,T,j,P,M){var _=s();if(H(),j&&(!S||!u())){var V=t.Layout.sliderSize(),Y=Jr(C)*V*vr(it(C)/V)||0;C=d.toPosition(t.Controller.toDest(C%V))+Y}var oe=Ho(_,C,1);h=1,T=oe?0:T||yr(it(C-_)/tl,nl),g=P,$=Tr(T,b,Ne(y,_,C,M),1),i(zn),l($r),$.start()}function b(){i(yn),g&&g(),l(an)}function y(C,T,j,P){var M=s(),_=C+(T-C)*F(P),V=(_-M)*h;E(M+V),S&&!j&&u()&&(h*=el,it(V)<Qs&&f(p(u(!0)),Js,!1,g,!0))}function H(){$&&$.cancel()}function L(){$&&!$.isPaused()&&(H(),b())}function F(C){var T=n.easingFunc;return T?T(C):1-Math.pow(1-C,4)}return{mount:x,destroy:H,scroll:f,cancel:L}}var pn={passive:!1,capture:!0};function il(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=r.unbind,s=e.state,p=t.Move,u=t.Scroll,E=t.Controller,S=t.Elements.track,$=t.Media.reduce,g=t.Direction,h=g.resolve,x=g.orient,f=p.getPosition,b=p.exceededLimit,y,H,L,F,C,T=!1,j,P,M;function _(){i(S,Br,Zr,pn),i(S,Vr,Zr,pn),i(S,pa,Y,pn),i(S,"click",O,{capture:!0}),i(S,"dragstart",kt),o([Zt,nt],V)}function V(){var D=n.drag;de(!D),F=D==="free"}function Y(D){if(j=!1,!P){var U=xe(D);ce(D.target)&&(U||!D.button)&&(E.isBusy()?kt(D,!0):(M=U?S:window,C=s.is([$n,zn]),L=null,i(M,Br,oe,pn),i(M,Vr,I,pn),p.cancel(),u.cancel(),q(D)))}}function oe(D){if(s.is(cr)||(s.set(cr),l(jo)),D.cancelable)if(C){p.translate(y+ye(A(D)));var U=ne(D)>Ui,X=T!==(T=b());(U||X)&&q(D),j=!0,l(qo),kt(D)}else G(D)&&(C=R(D),kt(D))}function I(D){s.is(cr)&&(s.set(yn),l(Ko)),C&&(z(D),kt(D)),d(M,Br,oe),d(M,Vr,I),C=!1}function O(D){!P&&j&&kt(D,!0)}function q(D){L=H,H=D,y=f()}function z(D){var U=J(D),X=Z(U),ee=n.rewind&&n.rewindByDrag;$(!1),F?E.scroll(X,0,n.snap):e.is(Yn)?E.go(x(Jr(U))<0?ee?"<":"-":ee?">":"+"):e.is(bn)&&T&&ee?E.go(b(!0)?">":"<"):E.go(E.toDest(X),!0),$(!0)}function R(D){var U=n.dragMinThreshold,X=In(U),ee=X&&U.mouse||0,be=(X?U.touch:+U)||10;return it(A(D))>(xe(D)?be:ee)}function G(D){return it(A(D))>it(A(D,!0))}function J(D){if(e.is(Ln)||!T){var U=ne(D);if(U&&U<Ui)return A(D)/U}return 0}function Z(D){return f()+Jr(D)*Ut(it(D)*(n.flickPower||600),F?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function A(D,U){return Q(D,U)-Q(m(D),U)}function ne(D){return Qr(D)-Qr(m(D))}function m(D){return H===D&&L||H}function Q(D,U){return(xe(D)?D.changedTouches[0]:D)["page"+h(U?"Y":"X")]}function ye(D){return D/(T&&e.is(bn)?Ns:1)}function ce(D){var U=n.noDrag;return!kn(D,"."+sa+", ."+Rr)&&(!U||!kn(D,U))}function xe(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function re(){return C}function de(D){P=D}return{mount:_,disable:de,isDragging:re}}var ol={Spacebar:" ",Right:Pr,Left:Er,Up:ea,Down:ta};function $i(e){return e=Gt(e)?e:e.key,ol[e]||e}var Xi="keydown";function al(e,t,n){var r=Be(e),o=r.on,l=r.bind,i=r.unbind,d=e.root,s=t.Direction.resolve,p,u;function E(){S(),o(nt,$),o(nt,S),o(Vt,h)}function S(){var f=n.keyboard;f&&(p=f==="global"?window:d,l(p,Xi,x))}function $(){i(p,Xi)}function g(f){u=f}function h(){var f=u;u=!0,Ro(function(){u=f})}function x(f){if(!u){var b=$i(f);b===s(Er)?e.go("<"):b===s(Pr)&&e.go(">")}}return{mount:E,destroy:$,disable:g}}var _n=pi+"-lazy",pr=_n+"-srcset",sl="["+_n+"], ["+pr+"]";function ll(e,t,n){var r=Be(e),o=r.on,l=r.off,i=r.bind,d=r.emit,s=n.lazyLoad==="sequential",p=[Tn,an],u=[];function E(){n.lazyLoad&&(S(),o(je,S))}function S(){Bt(u),$(),s?f():(l(p),o(p,g),g())}function $(){t.Slides.forEach(function(b){ui(b.slide,sl).forEach(function(y){var H=Tt(y,_n),L=Tt(y,pr);if(H!==y.src||L!==y.srcset){var F=n.classes.spinner,C=y.parentElement,T=Gn(C,"."+F)||hn("span",F,C);u.push([y,b,T]),y.src||Nn(y,"none")}})})}function g(){u=u.filter(function(b){var y=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,y)?h(b):!0}),u.length||l(p)}function h(b){var y=b[0];Et(b[1].slide,ri),i(y,"load error",Ne(x,b)),we(y,"src",Tt(y,_n)),we(y,"srcset",Tt(y,pr)),Pt(y,_n),Pt(y,pr)}function x(b,y){var H=b[0],L=b[1];Wt(L.slide,ri),y.type!=="error"&&(rn(b[2]),Nn(H,""),d(bi,H,L),d(vn)),s&&f()}function f(){u.length&&h(u.shift())}return{mount:E,destroy:Ne(Bt,u),check:g}}function cl(e,t,n){var r=Be(e),o=r.on,l=r.emit,i=r.bind,d=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,E=p.getIndex,S=p.go,$=t.Direction.resolve,g=s.pagination,h=[],x,f;function b(){y(),o([nt,je,br],b);var P=n.pagination;g&&Nn(g,P?"":"none"),P&&(o([Vt,$r,an],j),H(),j(),l(Xo,{list:x,items:h},T(e.index)))}function y(){x&&(rn(g?Yt(x.children):x),Wt(x,f),Bt(h),x=null),r.destroy()}function H(){var P=e.length,M=n.classes,_=n.i18n,V=n.perPage,Y=u()?p.getEnd()+1:Hn(P/V);x=g||hn("ul",M.pagination,s.track.parentElement),Et(x,f=Mr+"--"+C()),we(x,Nt,"tablist"),we(x,yt,_.select),we(x,Ci,C()===Ar?"vertical":"");for(var oe=0;oe<Y;oe++){var I=hn("li",null,x),O=hn("button",{class:M.page,type:"button"},I),q=d.getIn(oe).map(function(R){return R.slide.id}),z=!u()&&V>1?_.pageX:_.slideX;i(O,"click",Ne(L,oe)),n.paginationKeyboard&&i(O,"keydown",Ne(F,oe)),we(I,Nt,"presentation"),we(O,Nt,"tab"),we(O,Xn,q.join(" ")),we(O,yt,ei(z,oe+1)),we(O,fn,-1),h.push({li:I,button:O,page:oe})}}function L(P){S(">"+P,!0)}function F(P,M){var _=h.length,V=$i(M),Y=C(),oe=-1;V===$(Pr,!1,Y)?oe=++P%_:V===$(Er,!1,Y)?oe=(--P+_)%_:V==="Home"?oe=0:V==="End"&&(oe=_-1);var I=h[oe];I&&(Fo(I.button),S(">"+oe),kt(M,!0))}function C(){return n.paginationDirection||n.direction}function T(P){return h[p.toPage(P)]}function j(){var P=T(E(!0)),M=T(E());if(P){var _=P.button;Wt(_,on),Pt(_,zi),we(_,fn,-1)}if(M){var V=M.button;Et(V,on),we(V,zi,!0),we(V,fn,"")}l(Yo,{list:x,items:h},P,M)}return{items:h,mount:b,destroy:y,getAt:T,update:j}}var dl=[" ","Enter"];function ul(e,t,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){e.splides.forEach(function(g){g.isParent||(p(e,g.splide),p(g.splide,e))}),r&&u()}function d(){l.forEach(function(g){g.destroy()}),Bt(l)}function s(){d(),i()}function p(g,h){var x=Be(g);x.on(Vt,function(f,b,y){h.go(h.is(Ln)?y:f)}),l.push(x)}function u(){var g=Be(e),h=g.on;h(gi,S),h(Qo,$),h([Zt,nt],E),l.push(g),g.emit(fi,e.splides)}function E(){we(t.Elements.list,Ci,n.direction===Ar?"vertical":"")}function S(g){e.go(g.index)}function $(g,h){ci(dl,$i(h))&&(S(g),kt(h))}return{setup:Ne(t.Media.set,{slideFocus:jn(o)?r:o},!0),mount:i,destroy:d,remount:s}}function pl(e,t,n){var r=Be(e),o=r.bind,l=0;function i(){n.wheel&&o(t.Elements.track,"wheel",d,pn)}function d(p){if(p.cancelable){var u=p.deltaY,E=u<0,S=Qr(p),$=n.wheelMinThreshold||0,g=n.wheelSleep||0;it(u)>$&&S-l>g&&(e.go(E?"<":">"),l=S),s(E)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is($n)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var ml=90;function gl(e,t,n){var r=Be(e),o=r.on,l=t.Elements.track,i=n.live&&!n.isNavigation,d=hn("span",Ms),s=Tr(ml,Ne(u,!1));function p(){i&&(S(!t.Autoplay.isPaused()),we(l,Ki,!0),d.textContent="…",o(yi,Ne(S,!0)),o(vi,Ne(S,!1)),o([Tn,an],Ne(u,!0)))}function u($){we(l,qi,$),$?(Kn(l,d),s.start()):(rn(d),s.cancel())}function E(){Pt(l,[ji,Ki,qi]),rn(d)}function S($){i&&we(l,ji,$?"off":"polite")}return{mount:p,disable:S,destroy:E}}var hl=Object.freeze({__proto__:null,Media:ws,Direction:$s,Elements:Hs,Slides:Bs,Layout:Vs,Clones:zs,Move:js,Controller:qs,Arrows:Us,Autoplay:Ys,Cover:Zs,Scroll:rl,Drag:il,Keyboard:al,LazyLoad:ll,Pagination:cl,Sync:ul,Wheel:pl,Live:gl}),fl={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"},yl={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:Fs,i18n:fl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function vl(e,t,n){var r=t.Slides;function o(){Be(e).on([Zt,je],l)}function l(){r.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function i(d,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ro(s)}return{mount:o,start:i,cancel:Zr}}function bl(e,t,n){var r=t.Move,o=t.Controller,l=t.Scroll,i=t.Elements.list,d=Ne($t,i,"transition"),s;function p(){Be(e).bind(i,"transitionend",function($){$.target===i&&s&&(E(),s())})}function u($,g){var h=r.toPosition($,!0),x=r.getPosition(),f=S($);it(h-x)>=1&&f>=1?n.useScroll?l.scroll(h,f,!1,g):(d("transform "+f+"ms "+n.easing),r.translate(h,!0),s=g):(r.jump($),g())}function E(){d(""),l.cancel()}function S($){var g=n.rewindSpeed;if(e.is(bn)&&g){var h=o.getIndex(!0),x=o.getEnd();if(h===0&&$>=x||h>=x&&$===0)return g}return n.speed}return{mount:p,start:u,cancel:E}}var xl=(function(){function e(n,r){this.event=Be(),this.Components={},this.state=Cs(gn),this.splides=[],this._o={},this._E={};var o=Gt(n)?No(document,n):n;An(o,o+" is invalid."),this.root=o,r=Kt({label:Tt(o,yt)||"",labelledby:Tt(o,xi)||""},yl,e.defaults,r||{});try{Kt(r,JSON.parse(Tt(o,pi)))}catch{An(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,o){var l=this,i=this.state,d=this.Components;An(i.is([gn,fr]),"Already mounted!"),i.set(gn),this._C=d,this._T=o||this._T||(this.is(Yn)?vl:bl),this._E=r||this._E;var s=Wn({},hl,this._E,{Transition:this._T});return nn(s,function(p,u){var E=p(l,d,l._o);d[u]=E,E.setup&&E.setup()}),nn(d,function(p){p.mount&&p.mount()}),this.emit(Zt),Et(this.root,Is),i.set(yn),this.emit(ti),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(yn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Yt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(je),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(gn)?Be(this).on(ti,this.destroy.bind(this,r)):(nn(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(hi),o.destroy(),r&&Bt(this.splides),l.set(fr)),this},fs(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Ti=xl;Ti.defaults={};Ti.STATES=vs;var Yi=[[Zt,"onMounted"],[ti,"onReady"],[Vt,"onMove"],[Tn,"onMoved"],[gi,"onClick"],[Bo,"onActive"],[Vo,"onInactive"],[Do,"onVisible"],[zo,"onHidden"],[je,"onRefresh"],[nt,"onUpdated"],[vn,"onResize"],[wr,"onResized"],[jo,"onDrag"],[qo,"onDragging"],[Ko,"onDragged"],[$r,"onScroll"],[an,"onScrolled"],[hi,"onDestroy"],[Go,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Xo,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[fi,"onNavigationMounted"],[yi,"onAutoplayPlay"],[Zo,"onAutoplayPlaying"],[vi,"onAutoplayPause"],[bi,"onLazyLoadLoaded"]];function Li(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function ii(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ii(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!ii(e[o],t[o]))}return e===t}function Cl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Sl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function oi(e,t){const n=e;return Sl(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():xr(r)?n[o]=oi(xr(n[o])?n[o]:{},r):n[o]=r}),n}var wl=({children:e,className:t,...n})=>c.createElement("div",{className:Li("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Ei=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Ti(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=oi({},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&&!ii(this.options,e)&&(this.splide.options=e,this.options=oi({},e));const t=this.getSlides();Cl(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){Yi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(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:r,...o}=this.props;return c.createElement(t,{className:Li("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yi.map(l=>l[1])])},n?c.createElement(wl,null,r):r)}},Pi=({children:e,className:t,...n})=>c.createElement("li",{className:Li("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 $l="RichTextRenderer-module__link___BWeZ2",wl={link:$l},Tl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ir=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Tl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function et(e,t){var o,l,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ir(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:b.scalingValue(e.letterSpacing,t),wordSpacing:b.scalingValue(e.wordSpacing,t),fontSize:b.scalingValue(n,t),lineHeight:r!==void 0?b.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const xn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:wl.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:Ll(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function Ll(e){return{...e.fontFamily&&{fontFamily:Ir(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 El="SvgImage-module__svg___q3xE-",Pl="SvgImage-module__img___VsTm-",Xi={svg:El,img:Pl},_l=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Al=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Nt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=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("")');i(d)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:Pe(Xi.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:Pe(Xi.svg,r),style:{"--svg":Al(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ml={"top-left":me.topLeftAlignment,"top-center":me.topCenterAlignment,"top-right":me.topRightAlignment,"middle-left":me.middleLeftAlignment,"middle-center":me.middleCenterAlignment,"middle-right":me.middleRightAlignment,"bottom-left":me.bottomLeftAlignment,"bottom-center":me.bottomCenterAlignment,"bottom-right":me.bottomRightAlignment};function Il({settings:e,content:t,styles:n,isEditor:r}){const[o,l]=c.useState(null),{widthSettings:i,fontSettings:d,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:$}=n.imageCaption??{},[m,h]=c.useState(void 0),[C,y]=c.useState(null),[S,f]=c.useState(0),[H,E]=c.useState(0),{direction:D,transition:v,controls:P,pagination:z,imageCaption:L,triggers:k}=e,R=c.useRef(v.type),{x:O,y:Y}=e.controls.offset,ee=I=>{o&&o.go(I)};return c.useEffect(()=>{if(!C)return;const I=new ResizeObserver(F=>{if(!o)return;const[q]=F;h({width:Math.round(q.contentRect.width),height:Math.round(q.contentRect.height)})});return I.observe(C),()=>I.unobserve(C)},[C]),c.useEffect(()=>{!o||R.current===v.type||(E(I=>I+1),R.current=v.type)},[v.type]),a.jsx("div",{className:Pe(me.wrapper,{[me.editor]:r}),ref:y,children:a.jsxs("div",{className:me.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Pe(me.captionBlock),children:a.jsx("div",{className:me.captionTextWrapper,children:t.map((I,F)=>a.jsx("div",{className:Pe(me.captionText,Ml[L.alignment],{[me.withPointerEvents]:F===S&&r,[me.active]:F===S}),style:{fontFamily:Ir(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:i.sizing==="auto"?"max-content":b.scalingValue(i.width,r),letterSpacing:b.scalingValue(s,r),wordSpacing:b.scalingValue(u,r),textAlign:p,fontSize:b.scalingValue(T.fontSize,r),lineHeight:b.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:$,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:me.captionTextInner,style:{"--link-hover-color":L.linkHoverColor,"--link-color":L.linkColor,position:"relative",top:b.scalingValue(L.offset.y,r),left:b.scalingValue(L.offset.x,r)},children:a.jsx(xn,{content:I.imageCaption})})},F))})}),a.jsx(Li,{onMove:I=>{f(I.index)},ref:l,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:D==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((I,F)=>a.jsx(Ei,{children:a.jsx("div",{className:me.sliderItem,children:a.jsx("div",{className:me.imgWrapper,children:a.jsx("img",{className:Pe(me.sliderImage,{[me.contain]:I.image.objectFit==="contain",[me.cover]:I.image.objectFit==="cover"}),src:I.image.url,alt:I.image.name??""})})})},F))},H),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(me.arrow,{[me.arrowVertical]:D==="vert",[me.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{ee("-1")},className:me.arrowInner,style:{transform:`translate(${b.scalingValue(O,r)}, ${b.scalingValue(Y*(D==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Pe(me.arrowImg,me.mirror)}),!P.arrowsImgUrl&&a.jsx(Zi,{color:P.color,className:Pe(me.arrowIcon,me.arrowImg,me.mirror)})]})}),a.jsx("div",{className:Pe(me.arrow,me.nextArrow,{[me.arrowVertical]:D==="vert",[me.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:me.arrowInner,onClick:()=>ee("+1"),style:{transform:`translate(${b.scalingValue(O*(D==="horiz"?-1:1),r)}, ${b.scalingValue(Y,r)}) scale(${e.controls.scale/100}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Nt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:me.arrowImg}),!P.arrowsImgUrl&&a.jsx(Zi,{color:P.color,className:Pe(me.arrowIcon,me.arrowImg)})]})})]}),k.triggersList.click&&a.jsx("div",{className:me.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&a.jsx("div",{className:Pe(me.pagination,{[me.paginationInsideBottom]:z.position==="inside-1"&&D==="horiz",[me.paginationInsideTop]:z.position==="inside-2"&&D==="horiz",[me.paginationOutsideBottom]:z.position==="outside-1"&&D==="horiz",[me.paginationOutsideTop]:z.position==="outside-2"&&D==="horiz",[me.paginationInsideLeft]:z.position==="inside-1"&&D==="vert",[me.paginationInsideRight]:z.position==="inside-2"&&D==="vert",[me.paginationOutsideLeft]:z.position==="outside-1"&&D==="vert",[me.paginationOutsideRight]:z.position==="outside-2"&&D==="vert",[me.paginationVertical]:D==="vert"}),children:a.jsx("div",{className:me.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${b.scalingValue(z.offset.x,r)}, ${b.scalingValue(z.offset.y,r)}) rotate(${D==="horiz"?"0deg":"90deg"})`},children:t.map((I,F)=>a.jsx("button",{onClick:()=>{o&&o.go(F)},className:Pe(me.paginationItem),children:a.jsx("div",{className:Pe(me.dot,{[me.activeDot]:F===S}),style:{backgroundColor:F===S?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},F))})})]})})}function Zi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Rl={element:Il,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"]}},kl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fl="ImageRevealSlider-module__image___Qjt-e",Wl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",dn={imageRevealSlider:kl,image:Fl,link:Wl,cursor:Hl};function Qi(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,d=l/2,s=i/2;if(e>=r.x-d&&e<=r.x+d&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Nl(e,t,n,r){let o,l;if(t==="custom"){o=n;const i=await Vr(e);l=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Vr(e);l=i.height/i.width*o}else{const i=await Vr(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Ol({settings:e,content:t,isEditor:n}){const[r,o]=c.useState(null),[l,i]=c.useState([]),[d,s]=c.useState(0),p=c.useRef(0),[u,T]=c.useState({x:0,y:0}),[x,$]=c.useState(1),[m,h]=c.useState("none"),C=c.useRef({x:0,y:0}),[y,S]=c.useState(!1),{sizeType:f,imageWidth:H,randomRangeImageWidth:E}=e.imageSize,{revealPosition:D,visible:v}=e.position,{cursorType:P,target:z,defaultCursorScale:L,defaultCursor:k,hoverCursorScale:R,hoverCursor:O}=e.cursor;c.useEffect(()=>{if(!r)return;const I=(N,A)=>{const j=r.getBoundingClientRect(),Q=N-j.left,te=A-j.top;if(T({x:Q,y:te}),P==="system"){h("none"),$(1);return}const w=Q,ae=te,g=document.elementFromPoint(j.left+w,j.top+ae);if(g&&g.closest("a")){h("none"),$(1);return}const re=Qi(w,ae,l)||z==="area"?{img:O??"none",scale:R}:{img:k??"none",scale:L};h(re.img),$(re.scale)},F=N=>{N.stopPropagation(),C.current={x:N.clientX,y:N.clientY},I(N.clientX,N.clientY)},q=()=>{y&&I(C.current.x,C.current.y)};return r.addEventListener("mousemove",F),window.addEventListener("scroll",q,!0),()=>{r.removeEventListener("mousemove",F),window.removeEventListener("scroll",q,!0)}},[r,y,u,P,z,O,k,R,L,l]),c.useEffect(()=>{y||(h("none"),$(0))},[y]);const Y=async(I,F,q,N={})=>{const{width:A,height:j,finalWidth:Q}=await Nl(I.image.url,f,H,E);let te=0,w=0;D==="same"?(te=F/2,w=q/2):(te=N.x??Math.random()*F,w=N.y??Math.random()*q);const ae=Math.min(Math.max(te,A/2),F-A/2),g=Math.min(Math.max(w,j/2),q-j/2);return{id:p.current++,url:I.image.url,link:I.link,name:I.image.name,x:ae,y:g,width:Q}};c.useEffect(()=>{if(!r||t.length===0)return;const I=r.getBoundingClientRect(),F=I.width,q=I.height,N=[];(async()=>{const j=t[0],Q=await Y(j,F,q);N.push(Q),i(N),s(1)})()},[f,H,E,D,r]),c.useEffect(()=>{v==="last One"&&i(I=>I.length>0?[I[I.length-1]]:[])},[v]);const ee=async I=>{if(!r)return;const F=r.getBoundingClientRect(),q=I.clientX-F.left,N=I.clientY-F.top;if(z==="image"&&!Qi(q,N,l))return;let A=0,j=0;D==="on Click"?(A=q,j=N):D==="same"?(A=F.width/2,j=F.height/2):(A=Math.random()*F.width,j=Math.random()*F.height);const Q=t[d],te=await Y(Q,F.width,F.height,{x:A,y:j});i(w=>v==="all"?[...w,te]:[te]),s(w=>w>=t.length-1?0:w+1)};return a.jsxs("div",{ref:o,onClick:ee,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:dn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(I=>a.jsx("div",{className:dn.wrapper,style:{top:`${I.y}px`,left:`${I.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:I.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:z==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",className:dn.link,children:a.jsx("img",{src:I.url,alt:I.name,className:dn.image},I.id)}):a.jsx("img",{src:I.url,alt:I.name,className:dn.image},I.id)},I.id)),y&&a.jsx("div",{className:dn.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 Bl={element:Ol,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:""}]}}}},Vl="LightBox-module__hidden___9s-9x",Dl="LightBox-module__heroImage___sTxNF",zl="LightBox-module__background___rm9ml",jl="LightBox-module__editor___4ACaY",ql="LightBox-module__contentStyle___Bgnsq",Kl="LightBox-module__imageStyle___tLIlB",Gl="LightBox-module__imgWrapper___LuFUp",Ul="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",Xl="LightBox-module__caption___b6L2I",Zl="LightBox-module__captionTextInner___rCGNH",Ql="LightBox-module__lightboxSplide___XFuWC",Jl="LightBox-module__arrow___iz38X",ec="LightBox-module__arrowVertical___Zfz81",tc="LightBox-module__nextArrow___zkAQN",nc="LightBox-module__arrowInner___p48sW",rc="LightBox-module__arrowIcon___3VaFf",ic="LightBox-module__arrowImg___pNV88",oc="LightBox-module__mirror___pjeXc",ac="LightBox-module__thumbsWrapper___GB-nU",sc="LightBox-module__thumbsContainerVertical___wttk5",lc="LightBox-module__thumbsContainer___osSma",cc="LightBox-module__thumbsAlignStart___MO6tY",dc="LightBox-module__thumbsAlignCenter___Q4sUx",uc="LightBox-module__thumbsAlignEnd___p4y9R",pc="LightBox-module__thumbItem___HvnF3",mc="LightBox-module__closeButton___g2khP",gc="LightBox-module__fadeIn___0m5GW",hc="LightBox-module__slideInLeft___gPYwC",fc="LightBox-module__slideInRight___S-pPp",yc="LightBox-module__slideInTop___DFdAj",vc="LightBox-module__slideInBottom___m27kZ",bc="LightBox-module__fadeOut___55qBR",xc="LightBox-module__slideOutLeft___NvU7P",Cc="LightBox-module__slideOutRight___SK7eC",Sc="LightBox-module__slideOutTop___Vgg0z",$c="LightBox-module__slideOutBottom___nJ0Ef",wc="LightBox-module__scaleSlide___vZriG",ie={hidden:Vl,heroImage:Dl,background:zl,editor:jl,contentStyle:ql,imageStyle:Kl,imgWrapper:Gl,contain:Ul,cover:Yl,caption:Xl,captionTextInner:Zl,lightboxSplide:Ql,arrow:Jl,arrowVertical:ec,nextArrow:tc,arrowInner:nc,arrowIcon:rc,arrowImg:ic,mirror:oc,thumbsWrapper:ac,thumbsContainerVertical:sc,thumbsContainer:lc,thumbsAlignStart:cc,thumbsAlignCenter:dc,thumbsAlignEnd:uc,thumbItem:pc,closeButton:mc,fadeIn:gc,slideInLeft:hc,slideInRight:fc,slideInTop:yc,slideInBottom:vc,fadeOut:bc,slideOutLeft:xc,slideOutRight:Cc,slideOutTop:Sc,slideOutBottom:$c,scaleSlide:wc},nr=(e,t,n)=>{const r={},[o,l]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), calc(-50% + ${b.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${b.scalingValue(t.x,n)}, calc(-50% + ${b.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), ${b.scalingValue(t.y,n)})`:r.transform=`translate(${b.scalingValue(t.x,n)}, ${b.scalingValue(t.y,n)})`,r};function pa(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 Ji(e){const t=e.getBoundingClientRect(),n=pa(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,d=r/o,s=l/i;let p,u;s>d?(p=r,u=r/s):(u=o,p=o*s);const T=t.left+n.left,x=t.top+n.top,$=(r-p)/2+T,m=(o-u)/2+x;return{x:$,y:m,width:p,height:u}}function eo(e){const t=e.getBoundingClientRect(),n=pa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function to(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Tc(e,t){const n=(()=>{if(e==="fade in")return ie.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ie.slideInLeft;case"right":return ie.slideInRight;case"top":return ie.slideInTop;case"bottom":return ie.slideInBottom;default:return ie.slideInRight}return ie.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return ie.fadeIn;if(e==="slide in")switch(t){case"left":return ie.slideInLeft;case"right":return ie.slideInRight;case"top":return ie.slideInTop;case"bottom":return ie.slideInBottom;default:return ie.slideInRight}return ie.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ie.fadeOut;if(e==="slide in")switch(t){case"left":return ie.slideOutLeft;case"right":return ie.slideOutRight;case"top":return ie.slideOutTop;case"bottom":return ie.slideOutBottom;default:return ie.slideOutRight}return ie.fadeOut})(),l=(()=>{if(e==="fade in")return ie.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ie.slideOutLeft;case"right":return ie.slideOutRight;case"top":return ie.slideOutTop;case"bottom":return ie.slideOutBottom;default:return ie.slideOutRight}return ie.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Lc=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:l,isPreviewMode:i})=>{const[d,s]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:ie.heroImage,onClick:()=>s(!0)}),a.jsx(Ec,{isOpen:d,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Ec=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:d})=>{var _e;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:$,textAppearance:m,color:h}=r.imageCaption??{},[C,y]=c.useState(0),[S,f]=c.useState(0),[H,E]=c.useState(!1),[D,v]=c.useState(!1),[P,z]=c.useState({}),L=c.useRef(null),k=c.useRef(null),R=c.useRef(null),O=c.useRef(!1),Y=c.useRef(null),ee=c.useRef(null),I=c.useRef(null),F=c.useRef(null),q=c.useRef(!1),N=c.useRef(null),[A,j]=c.useState(!1),{appear:Q,triggers:te,slider:w,thumbnail:ae,controls:g,area:re,caption:he,layout:de}=o.lightboxBlock,{appearClass:X,backdropAppearClass:G,backdropDisappearClass:oe,disappearClass:M}=Tc(Q.type,Q.direction),W=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const V=()=>{setTimeout(()=>{var _,K;(K=(_=L.current)==null?void 0:_.splide)==null||K.refresh()},16)},se=()=>{f(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",V),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",V),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){j(!1);return}const V=N.current;if(!V)return;const se=()=>{w.direction==="horiz"?j(V.scrollWidth>V.clientWidth):j(V.scrollHeight>V.clientHeight)};se();const _=new ResizeObserver(se);return _.observe(V),()=>_.disconnect()},[e,ae.isActive,n.length,P,w.direction]);const B=c.useCallback(()=>{const V=window.matchMedia("(max-width: 768px)").matches,se=to(re.color);V&&!i&&se>.9&&(document.body.style.backgroundColor=""),E(!0),O.current=!0;const _=K=>{K.target===Y.current&&K.animationName&&(Y.current&&ee.current&&Y.current.removeEventListener("animationend",ee.current),ee.current=null,O.current&&(O.current=!1,t()),E(!1))};Y.current&&(ee.current=_,Y.current.addEventListener("animationend",_))},[t,re.color,i]),ne=(V,se,_)=>{var K,U;if(V){if(te.type==="click"&&te.switch==="image")te.repeat==="close"&&C===n.length-1?B():(K=L.current)==null||K.go("+1");else if(te.type==="click"&&te.switch==="50/50"){const Z=V.getBoundingClientRect(),ce=se-Z.left,fe=_-Z.top,Re=Z.width,be=Z.height;let xe;w.direction==="horiz"?xe=ce<Re/2?"-1":"+1":xe=fe<be/2?"-1":"+1",(U=L.current)==null||U.go(xe)}}},pe=V=>{if(q.current){q.current=!1;return}const se=n[C],_=(se==null?void 0:se.image.objectFit)==="cover";let K,U;if("changedTouches"in V&&V.changedTouches.length>0)K=V.changedTouches[0].clientX,U=V.changedTouches[0].clientY;else if("clientX"in V)K=V.clientX,U=V.clientY;else return;let Z;if(_&&R.current){const ce=eo(R.current);Z=K>=ce.left&&K<=ce.right&&U>=ce.top&&U<=ce.bottom}else{const ce=R.current?Ji(R.current):null;if(!ce){V.target===V.currentTarget&&B();return}Z=K>=ce.x&&K<=ce.x+ce.width&&U>=ce.y&&U<=ce.y+ce.height}Z?ne(R.current,K,U):B()},$e=V=>{const se=V.target;(se.classList.contains(ie.thumbsWrapper)||se.classList.contains(ie.thumbsContainer))&&pe(V)};c.useEffect(()=>{if(!e)return;const V=se=>{var _,K;if(se.key==="Escape"){B();return}if(se.key==="ArrowRight"){y(U=>(U+1)%Math.max(n.length,1)),(_=L.current)==null||_.go("+1");return}se.key==="ArrowLeft"&&(y(U=>(U-1+Math.max(n.length,1))%Math.max(n.length,1)),(K=L.current)==null||K.go("-1"))};return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[e,B,n.length]),c.useEffect(()=>{if(e){if(y(0),f(se=>se+1),O.current=!1,E(!1),v(!1),z({}),!W)return;const V=new CustomEvent("page-overlay",{detail:{itemId:W}});window.dispatchEvent(V)}return()=>{Y.current&&ee.current&&(Y.current.removeEventListener("animationend",ee.current),ee.current=null),v(!1)}},[e,W]),c.useEffect(()=>{k.current!==null&&k.current!==w.type&&f(V=>V+1),k.current=w.type},[w.type]),c.useEffect(()=>{if(!e)return;const V=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,_=to(re.color);document.body.style.overflow="hidden",v(!1);const K=Z=>{Z.target===Y.current&&!O.current&&Z.animationName&&(se&&!i&&_>.9&&(document.body.style.backgroundColor=re.color),v(!0),Y.current&&I.current&&Y.current.removeEventListener("animationend",I.current),I.current=null)};Y.current&&(I.current=K,Y.current.addEventListener("animationend",K));const U=Z=>{const ce=Z.target;ce&&(ce.closest(`.${ie.thumbsWrapper}`)||ce.closest(`.${ie.thumbsContainer}`))||w.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",U,{passive:!1}),()=>{document.body.style.overflow=V,document.removeEventListener("touchmove",U),Y.current&&I.current&&(Y.current.removeEventListener("animationend",I.current),I.current=null),v(!1)}},[e,i,re.color,w.type]),c.useEffect(()=>{if(!e)return;const V=se=>{var K,U;if(O.current){se.stopPropagation();return}if(q.current){q.current=!1;return}const _=se.target;if(!(_&&(_.closest(`.${ie.thumbsContainer}`)||_.closest(`.${ie.thumbItem}`)||_.closest(`.${ie.arrow}`)||_.closest(`.${ie.closeButton}`)||_.closest(`.${ie.caption}`)))){if(w.type==="slide"&&te.type==="drag"&&((U=(K=L.current)==null?void 0:K.splide)!=null&&U.root)){const Z=L.current.splide.root;if(_&&(Z.contains(_)||Z===_))return}if(se.touches.length===0&&se.changedTouches.length>0){const Z=n[C],ce=(Z==null?void 0:Z.image.objectFit)==="cover",fe=se.changedTouches[0];let Re;if(ce&&R.current){const be=eo(R.current);Re=fe.clientX>=be.left&&fe.clientX<=be.right&&fe.clientY>=be.top&&fe.clientY<=be.bottom}else{const be=R.current?Ji(R.current):null;if(!be)return;Re=fe.clientX>=be.x&&fe.clientX<=be.x+be.width&&fe.clientY>=be.y&&fe.clientY<=be.y+be.height}if(!Re){se.stopPropagation(),O.current=!0;const be=xe=>{xe.stopPropagation(),xe.preventDefault(),document.removeEventListener("click",be,!0)};document.addEventListener("click",be,!0),B()}}}};return document.addEventListener("touchend",V,{passive:!0}),()=>{document.removeEventListener("touchend",V)}},[e,B,C,n]);const ve=(w.type==="scale"||w.type==="fade")&&w.direction==="vert"&&te.type==="drag";c.useEffect(()=>{var xe,ke;if(!e||!ve||!((ke=(xe=L.current)==null?void 0:xe.splide)!=null&&ke.root))return;const V=L.current.splide.root,se=30,_=(le,Ce)=>{if(F.current){const Me=Math.abs(le-F.current.x),Ie=Math.abs(Ce-F.current.y);(Me>0||Ie>0)&&(q.current=!0)}},K=le=>{F.current&&(le.preventDefault(),_(le.clientX,le.clientY))},U=le=>{F.current&&le.touches.length>0&&(le.preventDefault(),_(le.touches[0].clientX,le.touches[0].clientY))},Z=(le,Ce)=>{if(!F.current||!L.current){F.current=null;return}const Me=Math.abs(le-F.current.x),Ie=Math.abs(Ce-F.current.y);Ie>se&&Ie>Me&&L.current.go(Ce<F.current.y?"+1":"-1"),F.current=null},ce=le=>{F.current&&Z(le.clientX,le.clientY),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("pointermove",K)},fe=le=>{if(F.current){if(le.changedTouches.length>0){const Ce=le.changedTouches[0];Z(Ce.clientX,Ce.clientY)}document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),document.removeEventListener("touchmove",U)}},Re=le=>{F.current={x:le.clientX,y:le.clientY},q.current=!1,document.addEventListener("pointermove",K,{passive:!1}),document.addEventListener("pointerup",ce),document.addEventListener("pointercancel",ce)},be=le=>{le.touches.length>0&&(F.current={x:le.touches[0].clientX,y:le.touches[0].clientY},q.current=!1,document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("touchend",fe),document.addEventListener("touchcancel",fe))};return V.addEventListener("pointerdown",Re),V.addEventListener("touchstart",be),()=>{V.removeEventListener("pointerdown",Re),V.removeEventListener("touchstart",be),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("touchmove",U),document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),F.current=null,q.current=!1}},[e,ve,S]);const Ee={backgroundColor:re.color,backdropFilter:`blur(${re.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:Y,className:Pe(ie.background,H?oe:G,{[ie.editor]:i},{[ie.hidden]:!e}),style:{...Ee,...D&&!i&&!H?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?Y:null,className:Pe(ie.contentStyle,H?M:X,{[ie.editor]:i},{[ie.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Li,{onMove:V=>y(V.index),ref:L,className:ie.lightboxSplide,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,direction:w.direction==="horiz"||w.type==="fade"||w.type==="scale"?"ltr":"ttb",pagination:!1,drag:te.type==="drag"&&!ve,perPage:1,width:"100%",height:"100%",type:w.type==="fade"||w.type==="scale"?"fade":"loop",padding:0,rewind:te.repeat!=="close",start:0},style:{"--splide-speed":w.duration},children:n.map((V,se)=>{const _=nr(de.position,de.offset,i),K=`${b.scalingValue(de.padding.top,i)} ${b.scalingValue(de.padding.right,i)} ${b.scalingValue(de.padding.bottom,i)} ${b.scalingValue(de.padding.left,i)}`,U=w.type==="scale"?(()=>{const{transform:Z,...ce}=_;return{...ce,position:"absolute",padding:K,boxSizing:"border-box","--position-transform":Z||"none"}})():{..._,position:"absolute",padding:K,boxSizing:"border-box"};return a.jsx(Ei,{children:a.jsx("div",{className:ie.imgWrapper,onClick:pe,children:a.jsx("img",{ref:se===C?R:null,className:Pe(ie.imageStyle,{[ie.contain]:V.image.objectFit==="contain",[ie.cover]:V.image.objectFit==="cover",[ie.scaleSlide]:w.type==="scale"}),src:V.image.url,alt:V.image.name??"",style:{...U,pointerEvents:V.image.objectFit==="contain"?"none":"auto"}})})},se)})},S),g.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pe(ie.arrow,{[ie.arrowVertical]:w.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:a.jsxs("button",{className:ie.arrowInner,style:{transform:`translate(${b.scalingValue(g.offset.x,i)}, ${b.scalingValue(g.offset.y*(w.direction==="horiz"?1:-1),i)}) scale(${g.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var V;return(V=L.current)==null?void 0:V.go("-1")},"aria-label":"Previous",children:[g.arrowsImgUrl&&a.jsx(Nt,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:Pe(ie.arrowImg,ie.mirror)}),!g.arrowsImgUrl&&a.jsx(no,{color:g.color,className:Pe(ie.arrowIcon,ie.arrowImg,ie.mirror)})]})}),a.jsx("div",{className:Pe(ie.arrow,ie.nextArrow,{[ie.arrowVertical]:w.direction==="vert"}),style:{color:g.color,"--arrow-hover-color":g.hover},children:a.jsxs("button",{className:ie.arrowInner,style:{transform:`translate(${b.scalingValue(g.offset.x*(w.direction==="horiz"?-1:1),i)}, ${b.scalingValue(g.offset.y,i)}) scale(${g.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var V;return(V=L.current)==null?void 0:V.go("+1")},"aria-label":"Next",children:[g.arrowsImgUrl&&a.jsx(Nt,{url:g.arrowsImgUrl,fill:g.color,hoverFill:g.hover,className:ie.arrowImg}),!g.arrowsImgUrl&&a.jsx(no,{color:g.color,className:Pe(ie.arrowIcon,ie.arrowImg)})]})})]}),re.closeIconUrl&&(()=>{const V=nr(re.closeIconAlign,re.closeIconOffset,i),se=`scale(${re.closeIconScale})`,_=V.transform?`${V.transform} ${se}`:se;return a.jsx("button",{className:ie.closeButton,style:{...V,transform:_},onClick:B,"aria-label":"Close lightbox",children:a.jsx(Nt,{url:re.closeIconUrl,fill:re.closeIconColor??"#000000",hoverFill:re.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&r.imageCaption&&((_e=n[C])==null?void 0:_e.imageCaption)&&a.jsx("div",{className:ie.caption,style:{...nr(he.alignment,he.offset,i),fontFamily:Ir(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":b.scalingValue(s.width,i),letterSpacing:b.scalingValue(u,i),wordSpacing:b.scalingValue(x,i),textAlign:T,fontSize:b.scalingValue($.fontSize,i),lineHeight:b.scalingValue($.lineHeight,i),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:h},onClick:V=>V.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:ie.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:a.jsx(xn,{content:n[C].imageCaption})})}),ae.isActive&&(()=>{const[V,se]=ae.position.split("-"),_=w.direction==="horiz"?`${V}-left`:ae.position,K=nr(_,ae.offset,i),U=()=>{if(w.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(V==="top")return"flex-start";if(V==="middle")return"center";if(V==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:N,className:ie.thumbsWrapper,onClick:Z=>$e(Z),style:{position:i?"absolute":"fixed",...K,...w.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pe(ie.thumbsContainer,{[ie.thumbsContainerVertical]:w.direction==="vert",[ie.thumbsAlignStart]:ae.align==="start",[ie.thumbsAlignCenter]:ae.align==="center",[ie.thumbsAlignEnd]:ae.align==="end"}),style:{gap:b.scalingValue(ae.grid.gap,i),justifyContent:A?"flex-start":U()},children:n.map((Z,ce)=>{const fe=ce===C,Re=P[ce],xe=ae.grid.size*(fe?ae.activeState.scale:1),ke=()=>{if(ae.fit!=="fit")return{};if(!Re)return w.direction==="horiz"?{height:b.scalingValue(xe,i)}:{width:b.scalingValue(xe,i)};const le=Re.width/Re.height;if(w.direction==="horiz"){const Ce=xe,Me=Ce*le;return{width:b.scalingValue(Me,i),height:b.scalingValue(Ce,i)}}else{const Ce=xe,Me=Ce/le;return{width:b.scalingValue(Ce,i),height:b.scalingValue(Me,i)}}};return a.jsx("button",{className:ie.thumbItem,style:{...w.direction==="horiz"&&ae.fit!=="fit"?{height:b.scalingValue(xe,i)}:{},...w.direction==="vert"&&ae.fit!=="fit"?{width:b.scalingValue(xe,i)}:{},...ae.fit==="cover"?{width:b.scalingValue(xe,i),height:b.scalingValue(xe,i)}:{},...ke(),transition:fe?"all 0.25s ease-out":"none",opacity:fe?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:le=>{var Ce;le.stopPropagation(),y(ce),(Ce=L.current)==null||Ce.go(ce)},onMouseEnter:()=>{var le;ae.triggers==="hov"&&((le=L.current)==null||le.go(ce))},children:a.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:le=>{const Ce=le.currentTarget;Ce.naturalWidth&&Ce.naturalHeight&&z(Me=>({...Me,[ce]:{width:Ce.naturalWidth,height:Ce.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${ce}`)})})})})()]})]}),document.getElementById(l))};function no({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Pc={element:Lc,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _c(e){return`
|
|
6
|
+
*/const $l="RichTextRenderer-module__link___BWeZ2",Tl={link:$l},Ll=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Ir=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ll(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function vt(e){const{color:t,...n}=e;return n}function et(e,t){var o,l,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ir(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:r!==void 0?w.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const xn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:Tl.link,href:r.value,target:r.target,children:t(r.children)},o):a.jsx("span",{style:El(r),children:r.text},o));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const o=n.children;return a.jsx("div",{children:t(o)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:Ir(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 Pl="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zi={svg:Pl,img:Al},_l=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=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("")');i(d)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:_e(Zi.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:_e(Zi.svg,r),style:{"--svg":Rl(e),"--fill":t,"--hover-fill":n,...o??{}}})},Ml={"top-left":me.topLeftAlignment,"top-center":me.topCenterAlignment,"top-right":me.topRightAlignment,"middle-left":me.middleLeftAlignment,"middle-center":me.middleCenterAlignment,"middle-right":me.middleRightAlignment,"bottom-left":me.bottomLeftAlignment,"bottom-center":me.bottomCenterAlignment,"bottom-right":me.bottomRightAlignment};function Il({settings:e,content:t,styles:n,isEditor:r}){const[o,l]=c.useState(null),{widthSettings:i,fontSettings:d,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:E,textAppearance:S,color:$}=n.imageCaption??{},[g,h]=c.useState(void 0),[x,f]=c.useState(null),[b,y]=c.useState(0),[H,L]=c.useState(0),{direction:F,transition:C,controls:T,pagination:j,imageCaption:P,triggers:M}=e,_=c.useRef(C.type),{x:V,y:Y}=e.controls.offset,oe=I=>{o&&o.go(I)};return c.useEffect(()=>{if(!x)return;const I=new ResizeObserver(O=>{if(!o)return;const[q]=O;h({width:Math.round(q.contentRect.width),height:Math.round(q.contentRect.height)})});return I.observe(x),()=>I.unobserve(x)},[x]),c.useEffect(()=>{!o||_.current===C.type||(L(I=>I+1),_.current=C.type)},[C.type]),a.jsx("div",{className:_e(me.wrapper,{[me.editor]:r}),ref:f,children:a.jsxs("div",{className:me.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:C.backgroundColor&&C.type==="fade in"?C.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:_e(me.captionBlock),children:a.jsx("div",{className:me.captionTextWrapper,children:t.map((I,O)=>a.jsx("div",{className:_e(me.captionText,Ml[P.alignment],{[me.withPointerEvents]:O===b&&r,[me.active]:O===b}),style:{fontFamily:Ir(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,r),letterSpacing:w.scalingValue(s,r),wordSpacing:w.scalingValue(u,r),textAlign:p,fontSize:w.scalingValue(E.fontSize,r),lineHeight:w.scalingValue(E.lineHeight,r),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:$,transitionDuration:C.duration?`${Math.round(parseInt(C.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:me.captionTextInner,style:{"--link-hover-color":P.linkHoverColor,"--link-color":P.linkColor,position:"relative",top:w.scalingValue(P.offset.y,r),left:w.scalingValue(P.offset.x,r)},children:a.jsx(xn,{content:I.imageCaption})})},O))})}),a.jsx(Ei,{onMove:I=>{y(I.index)},ref:l,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:F==="horiz"||C.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:C.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((I,O)=>a.jsx(Pi,{children:a.jsx("div",{className:me.sliderItem,children:a.jsx("div",{className:me.imgWrapper,children:a.jsx("img",{className:_e(me.sliderImage,{[me.contain]:I.image.objectFit==="contain",[me.cover]:I.image.objectFit==="cover"}),src:I.image.url,alt:I.image.name??""})})})},O))},H),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:_e(me.arrow,{[me.arrowVertical]:F==="vert",[me.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{onClick:()=>{oe("-1")},className:me.arrowInner,style:{transform:`translate(${w.scalingValue(V,r)}, ${w.scalingValue(Y*(F==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(Ht,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:_e(me.arrowImg,me.mirror)}),!T.arrowsImgUrl&&a.jsx(Qi,{color:T.color,className:_e(me.arrowIcon,me.arrowImg,me.mirror)})]})}),a.jsx("div",{className:_e(me.arrow,me.nextArrow,{[me.arrowVertical]:F==="vert",[me.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:me.arrowInner,onClick:()=>oe("+1"),style:{transform:`translate(${w.scalingValue(V*(F==="horiz"?-1:1),r)}, ${w.scalingValue(Y,r)}) scale(${e.controls.scale/100}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(Ht,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:me.arrowImg}),!T.arrowsImgUrl&&a.jsx(Qi,{color:T.color,className:_e(me.arrowIcon,me.arrowImg)})]})})]}),M.triggersList.click&&a.jsx("div",{className:me.clickOverlay,onClick:()=>{o&&o.go("+1")}}),j.isActive&&a.jsx("div",{className:_e(me.pagination,{[me.paginationInsideBottom]:j.position==="inside-1"&&F==="horiz",[me.paginationInsideTop]:j.position==="inside-2"&&F==="horiz",[me.paginationOutsideBottom]:j.position==="outside-1"&&F==="horiz",[me.paginationOutsideTop]:j.position==="outside-2"&&F==="horiz",[me.paginationInsideLeft]:j.position==="inside-1"&&F==="vert",[me.paginationInsideRight]:j.position==="inside-2"&&F==="vert",[me.paginationOutsideLeft]:j.position==="outside-1"&&F==="vert",[me.paginationOutsideRight]:j.position==="outside-2"&&F==="vert",[me.paginationVertical]:F==="vert"}),children:a.jsx("div",{className:me.paginationInner,style:{backgroundColor:j.colors[2],transform:`scale(${j.scale/100}) translate(${w.scalingValue(j.offset.x,r)}, ${w.scalingValue(j.offset.y,r)}) rotate(${F==="horiz"?"0deg":"90deg"})`},children:t.map((I,O)=>a.jsx("button",{onClick:()=>{o&&o.go(O)},className:_e(me.paginationItem),children:a.jsx("div",{className:_e(me.dot,{[me.activeDot]:O===b}),style:{backgroundColor:O===b?j.colors[0]:j.colors[1],"--pagination-hover-color":j.hover}})},O))})})]})})}function Qi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const kl={element:Il,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"]}},Fl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Wl="ImageRevealSlider-module__image___Qjt-e",Nl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",dn={imageRevealSlider:Fl,image:Wl,link:Nl,cursor:Hl};function Ji(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,d=l/2,s=i/2;if(e>=r.x-d&&e<=r.x+d&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ol(e,t,n,r){let o,l;if(t==="custom"){o=n;const i=await Dr(e);l=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await Dr(e);l=i.height/i.width*o}else{const i=await Dr(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Bl({settings:e,content:t,isEditor:n}){const[r,o]=c.useState(null),[l,i]=c.useState([]),[d,s]=c.useState(0),p=c.useRef(0),[u,E]=c.useState({x:0,y:0}),[S,$]=c.useState(1),[g,h]=c.useState("none"),x=c.useRef({x:0,y:0}),[f,b]=c.useState(!1),{sizeType:y,imageWidth:H,randomRangeImageWidth:L}=e.imageSize,{revealPosition:F,visible:C}=e.position,{cursorType:T,target:j,defaultCursorScale:P,defaultCursor:M,hoverCursorScale:_,hoverCursor:V}=e.cursor;c.useEffect(()=>{if(!r)return;const I=(z,R)=>{const G=r.getBoundingClientRect(),J=z-G.left,Z=R-G.top;if(E({x:J,y:Z}),T==="system"){h("none"),$(1);return}const A=J,ne=Z,m=document.elementFromPoint(G.left+A,G.top+ne);if(m&&m.closest("a")){h("none"),$(1);return}const Q=Ji(A,ne,l)||j==="area"?{img:V??"none",scale:_}:{img:M??"none",scale:P};h(Q.img),$(Q.scale)},O=z=>{z.stopPropagation(),x.current={x:z.clientX,y:z.clientY},I(z.clientX,z.clientY)},q=()=>{f&&I(x.current.x,x.current.y)};return r.addEventListener("mousemove",O),window.addEventListener("scroll",q,!0),()=>{r.removeEventListener("mousemove",O),window.removeEventListener("scroll",q,!0)}},[r,f,u,T,j,V,M,_,P,l]),c.useEffect(()=>{f||(h("none"),$(0))},[f]);const Y=async(I,O,q,z={})=>{const{width:R,height:G,finalWidth:J}=await Ol(I.image.url,y,H,L);let Z=0,A=0;F==="same"?(Z=O/2,A=q/2):(Z=z.x??Math.random()*O,A=z.y??Math.random()*q);const ne=Math.min(Math.max(Z,R/2),O-R/2),m=Math.min(Math.max(A,G/2),q-G/2);return{id:p.current++,url:I.image.url,link:I.link,name:I.image.name,x:ne,y:m,width:J}};c.useEffect(()=>{if(!r||t.length===0)return;const I=r.getBoundingClientRect(),O=I.width,q=I.height,z=[];(async()=>{const G=t[0],J=await Y(G,O,q);z.push(J),i(z),s(1)})()},[y,H,L,F,r]),c.useEffect(()=>{C==="last One"&&i(I=>I.length>0?[I[I.length-1]]:[])},[C]);const oe=async I=>{if(!r)return;const O=r.getBoundingClientRect(),q=I.clientX-O.left,z=I.clientY-O.top;if(j==="image"&&!Ji(q,z,l))return;let R=0,G=0;F==="on Click"?(R=q,G=z):F==="same"?(R=O.width/2,G=O.height/2):(R=Math.random()*O.width,G=Math.random()*O.height);const J=t[d],Z=await Y(J,O.width,O.height,{x:R,y:G});i(A=>C==="all"?[...A,Z]:[Z]),s(A=>A>=t.length-1?0:A+1)};return a.jsxs("div",{ref:o,onClick:oe,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:dn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[l.map(I=>a.jsx("div",{className:dn.wrapper,style:{top:`${I.y}px`,left:`${I.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:I.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:j==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",className:dn.link,children:a.jsx("img",{src:I.url,alt:I.name,className:dn.image},I.id)}):a.jsx("img",{src:I.url,alt:I.name,className:dn.image},I.id)},I.id)),f&&a.jsx("div",{className:dn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Vl={element:Bl,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:""}]}}}},Dl="LightBox-module__hidden___9s-9x",zl="LightBox-module__heroImage___sTxNF",jl="LightBox-module__background___rm9ml",ql="LightBox-module__editor___4ACaY",Kl="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Ul="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Ql="LightBox-module__captionTextInner___rCGNH",Jl="LightBox-module__lightboxSplide___XFuWC",ec="LightBox-module__arrow___iz38X",tc="LightBox-module__arrowVertical___Zfz81",nc="LightBox-module__nextArrow___zkAQN",rc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",oc="LightBox-module__arrowImg___pNV88",ac="LightBox-module__mirror___pjeXc",sc="LightBox-module__thumbsWrapper___GB-nU",lc="LightBox-module__thumbsContainerVertical___wttk5",cc="LightBox-module__thumbsContainer___osSma",dc="LightBox-module__thumbsAlignStart___MO6tY",uc="LightBox-module__thumbsAlignCenter___Q4sUx",pc="LightBox-module__thumbsAlignEnd___p4y9R",mc="LightBox-module__thumbItem___HvnF3",gc="LightBox-module__closeButton___g2khP",hc="LightBox-module__fadeIn___0m5GW",fc="LightBox-module__slideInLeft___gPYwC",yc="LightBox-module__slideInRight___S-pPp",vc="LightBox-module__slideInTop___DFdAj",bc="LightBox-module__slideInBottom___m27kZ",xc="LightBox-module__fadeOut___55qBR",Cc="LightBox-module__slideOutLeft___NvU7P",Sc="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",$c="LightBox-module__slideOutBottom___nJ0Ef",Tc="LightBox-module__scaleSlide___vZriG",ie={hidden:Dl,heroImage:zl,background:jl,editor:ql,contentStyle:Kl,imageStyle:Gl,imgWrapper:Ul,contain:Xl,cover:Yl,caption:Zl,captionTextInner:Ql,lightboxSplide:Jl,arrow:ec,arrowVertical:tc,nextArrow:nc,arrowInner:rc,arrowIcon:ic,arrowImg:oc,mirror:ac,thumbsWrapper:sc,thumbsContainerVertical:lc,thumbsContainer:cc,thumbsAlignStart:dc,thumbsAlignCenter:uc,thumbsAlignEnd:pc,thumbItem:mc,closeButton:gc,fadeIn:hc,slideInLeft:fc,slideInRight:yc,slideInTop:vc,slideInBottom:bc,fadeOut:xc,slideOutLeft:Cc,slideOutRight:Sc,slideOutTop:wc,slideOutBottom:$c,scaleSlide:Tc},nr=(e,t,n)=>{const r={},[o,l]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:r.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,r};function ma(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 eo(e){const t=e.getBoundingClientRect(),n=ma(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,i=e.naturalHeight,d=r/o,s=l/i;let p,u;s>d?(p=r,u=r/s):(u=o,p=o*s);const E=t.left+n.left,S=t.top+n.top,$=(r-p)/2+E,g=(o-u)/2+S;return{x:$,y:g,width:p,height:u}}function to(e){const t=e.getBoundingClientRect(),n=ma(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function no(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Lc(e,t){const n=(()=>{if(e==="fade in")return ie.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ie.slideInLeft;case"right":return ie.slideInRight;case"top":return ie.slideInTop;case"bottom":return ie.slideInBottom;default:return ie.slideInRight}return ie.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return ie.fadeIn;if(e==="slide in")switch(t){case"left":return ie.slideInLeft;case"right":return ie.slideInRight;case"top":return ie.slideInTop;case"bottom":return ie.slideInBottom;default:return ie.slideInRight}return ie.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ie.fadeOut;if(e==="slide in")switch(t){case"left":return ie.slideOutLeft;case"right":return ie.slideOutRight;case"top":return ie.slideOutTop;case"bottom":return ie.slideOutBottom;default:return ie.slideOutRight}return ie.fadeOut})(),l=(()=>{if(e==="fade in")return ie.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ie.slideOutLeft;case"right":return ie.slideOutRight;case"top":return ie.slideOutTop;case"bottom":return ie.slideOutBottom;default:return ie.slideOutRight}return ie.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:l,isPreviewMode:i})=>{const[d,s]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:ie.heroImage,onClick:()=>s(!0)}),a.jsx(Pc,{isOpen:d,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Pc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:d})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:E,wordSpacing:S,fontSizeLineHeight:$,textAppearance:g,color:h}=r.imageCaption??{},[x,f]=c.useState(0),[b,y]=c.useState(0),[H,L]=c.useState(!1),[F,C]=c.useState(!1),[T,j]=c.useState({}),P=c.useRef(null),M=c.useRef(null),_=c.useRef(null),V=c.useRef(!1),Y=c.useRef(null),oe=c.useRef(null),I=c.useRef(null),O=c.useRef(null),q=c.useRef(!1),z=c.useRef(null),[R,G]=c.useState(!1),{appear:J,triggers:Z,slider:A,thumbnail:ne,controls:m,area:Q,caption:ye,layout:ce}=o.lightboxBlock,{appearClass:xe,backdropAppearClass:re,backdropDisappearClass:de,disappearClass:D}=Lc(J.type,J.direction),U=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const B=()=>{setTimeout(()=>{var v,k;(k=(v=P.current)==null?void 0:v.splide)==null||k.refresh()},16)},W=()=>{y(v=>v+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",W),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",W)}},[]),c.useEffect(()=>{if(!e||!ne.isActive){G(!1);return}const B=z.current;if(!B)return;const W=()=>{A.direction==="horiz"?G(B.scrollWidth>B.clientWidth):G(B.scrollHeight>B.clientHeight)};W();const v=new ResizeObserver(W);return v.observe(B),()=>v.disconnect()},[e,ne.isActive,n.length,T,A.direction]);const X=c.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,W=no(Q.color);B&&!i&&W>.9&&(document.body.style.backgroundColor=""),L(!0),V.current=!0;const v=k=>{k.target===Y.current&&k.animationName&&(Y.current&&oe.current&&Y.current.removeEventListener("animationend",oe.current),oe.current=null,V.current&&(V.current=!1,t()),L(!1))};Y.current&&(oe.current=v,Y.current.addEventListener("animationend",v))},[t,Q.color,i]),ee=(B,W,v)=>{var k,N;if(B){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&x===n.length-1?X():(k=P.current)==null||k.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const K=B.getBoundingClientRect(),ae=W-K.left,se=v-K.top,he=K.width,ge=K.height;let ue;A.direction==="horiz"?ue=ae<he/2?"-1":"+1":ue=se<ge/2?"-1":"+1",(N=P.current)==null||N.go(ue)}}},be=B=>{if(q.current){q.current=!1;return}const W=n[x],v=(W==null?void 0:W.image.objectFit)==="cover";let k,N;if("changedTouches"in B&&B.changedTouches.length>0)k=B.changedTouches[0].clientX,N=B.changedTouches[0].clientY;else if("clientX"in B)k=B.clientX,N=B.clientY;else return;let K;if(v&&_.current){const ae=to(_.current);K=k>=ae.left&&k<=ae.right&&N>=ae.top&&N<=ae.bottom}else{const ae=_.current?eo(_.current):null;if(!ae){B.target===B.currentTarget&&X();return}K=k>=ae.x&&k<=ae.x+ae.width&&N>=ae.y&&N<=ae.y+ae.height}K?ee(_.current,k,N):X()},$e=B=>{const W=B.target;(W.classList.contains(ie.thumbsWrapper)||W.classList.contains(ie.thumbsContainer))&&be(B)};c.useEffect(()=>{if(!e)return;const B=W=>{var v,k;if(W.key==="Escape"){X();return}if(W.key==="ArrowRight"){f(N=>(N+1)%Math.max(n.length,1)),(v=P.current)==null||v.go("+1");return}W.key==="ArrowLeft"&&(f(N=>(N-1+Math.max(n.length,1))%Math.max(n.length,1)),(k=P.current)==null||k.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,X,n.length]),c.useEffect(()=>{if(e){if(f(0),y(W=>W+1),V.current=!1,L(!1),C(!1),j({}),!U)return;const B=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(B)}return()=>{Y.current&&oe.current&&(Y.current.removeEventListener("animationend",oe.current),oe.current=null),C(!1)}},[e,U]),c.useEffect(()=>{M.current!==null&&M.current!==A.type&&y(B=>B+1),M.current=A.type},[A.type]),c.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,W=window.matchMedia("(max-width: 768px)").matches,v=no(Q.color);document.body.style.overflow="hidden",C(!1);const k=K=>{K.target===Y.current&&!V.current&&K.animationName&&(W&&!i&&v>.9&&(document.body.style.backgroundColor=Q.color),C(!0),Y.current&&I.current&&Y.current.removeEventListener("animationend",I.current),I.current=null)};Y.current&&(I.current=k,Y.current.addEventListener("animationend",k));const N=K=>{const ae=K.target;ae&&(ae.closest(`.${ie.thumbsWrapper}`)||ae.closest(`.${ie.thumbsContainer}`))||A.type!=="slide"&&K.preventDefault()};return document.addEventListener("touchmove",N,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",N),Y.current&&I.current&&(Y.current.removeEventListener("animationend",I.current),I.current=null),C(!1)}},[e,i,Q.color,A.type]),c.useEffect(()=>{if(!e)return;const B=W=>{var k,N;if(V.current){W.stopPropagation();return}if(q.current){q.current=!1;return}const v=W.target;if(!(v&&(v.closest(`.${ie.thumbsContainer}`)||v.closest(`.${ie.thumbItem}`)||v.closest(`.${ie.arrow}`)||v.closest(`.${ie.closeButton}`)||v.closest(`.${ie.caption}`)))){if(A.type==="slide"&&Z.type==="drag"&&((N=(k=P.current)==null?void 0:k.splide)!=null&&N.root)){const K=P.current.splide.root;if(v&&(K.contains(v)||K===v))return}if(W.touches.length===0&&W.changedTouches.length>0){const K=n[x],ae=(K==null?void 0:K.image.objectFit)==="cover",se=W.changedTouches[0];let he;if(ae&&_.current){const ge=to(_.current);he=se.clientX>=ge.left&&se.clientX<=ge.right&&se.clientY>=ge.top&&se.clientY<=ge.bottom}else{const ge=_.current?eo(_.current):null;if(!ge)return;he=se.clientX>=ge.x&&se.clientX<=ge.x+ge.width&&se.clientY>=ge.y&&se.clientY<=ge.y+ge.height}if(!he){W.stopPropagation(),V.current=!0;const ge=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",ge,!0)};document.addEventListener("click",ge,!0),X()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,X,x,n]);const Ce=(A.type==="scale"||A.type==="fade")&&A.direction==="vert"&&Z.type==="drag";c.useEffect(()=>{var ue,ke;if(!e||!Ce||!((ke=(ue=P.current)==null?void 0:ue.splide)!=null&&ke.root))return;const B=P.current.splide.root,W=30,v=(le,Se)=>{if(O.current){const Me=Math.abs(le-O.current.x),Ie=Math.abs(Se-O.current.y);(Me>0||Ie>0)&&(q.current=!0)}},k=le=>{O.current&&(le.preventDefault(),v(le.clientX,le.clientY))},N=le=>{O.current&&le.touches.length>0&&(le.preventDefault(),v(le.touches[0].clientX,le.touches[0].clientY))},K=(le,Se)=>{if(!O.current||!P.current){O.current=null;return}const Me=Math.abs(le-O.current.x),Ie=Math.abs(Se-O.current.y);Ie>W&&Ie>Me&&P.current.go(Se<O.current.y?"+1":"-1"),O.current=null},ae=le=>{O.current&&K(le.clientX,le.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",k)},se=le=>{if(O.current){if(le.changedTouches.length>0){const Se=le.changedTouches[0];K(Se.clientX,Se.clientY)}document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),document.removeEventListener("touchmove",N)}},he=le=>{O.current={x:le.clientX,y:le.clientY},q.current=!1,document.addEventListener("pointermove",k,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},ge=le=>{le.touches.length>0&&(O.current={x:le.touches[0].clientX,y:le.touches[0].clientY},q.current=!1,document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("touchend",se),document.addEventListener("touchcancel",se))};return B.addEventListener("pointerdown",he),B.addEventListener("touchstart",ge),()=>{B.removeEventListener("pointerdown",he),B.removeEventListener("touchstart",ge),document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",N),document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),O.current=null,q.current=!1}},[e,Ce,b]);const Le={backgroundColor:Q.color,backdropFilter:`blur(${Q.blur}px)`,animationDuration:`${parseInt(J.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:Y,className:_e(ie.background,H?de:re,{[ie.editor]:i},{[ie.hidden]:!e}),style:{...Le,...F&&!i&&!H?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?Y:null,className:_e(ie.contentStyle,H?D:xe,{[ie.editor]:i},{[ie.hidden]:!e}),style:{animationDuration:`${parseInt(J.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Ei,{onMove:B=>f(B.index),ref:P,className:ie.lightboxSplide,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,direction:A.direction==="horiz"||A.type==="fade"||A.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:A.type==="fade"||A.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":A.duration},children:n.map((B,W)=>{const v=nr(ce.position,ce.offset,i),k=`${w.scalingValue(ce.padding.top,i)} ${w.scalingValue(ce.padding.right,i)} ${w.scalingValue(ce.padding.bottom,i)} ${w.scalingValue(ce.padding.left,i)}`,N=A.type==="scale"?(()=>{const{transform:K,...ae}=v;return{...ae,position:"absolute",padding:k,boxSizing:"border-box","--position-transform":K||"none"}})():{...v,position:"absolute",padding:k,boxSizing:"border-box"};return a.jsx(Pi,{children:a.jsx("div",{className:ie.imgWrapper,onClick:be,children:a.jsx("img",{ref:W===x?_:null,className:_e(ie.imageStyle,{[ie.contain]:B.image.objectFit==="contain",[ie.cover]:B.image.objectFit==="cover",[ie.scaleSlide]:A.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...N,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},W)})},b),m.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:_e(ie.arrow,{[ie.arrowVertical]:A.direction==="vert"}),style:{color:m.color,"--arrow-hover-color":m.hover},children:a.jsxs("button",{className:ie.arrowInner,style:{transform:`translate(${w.scalingValue(m.offset.x,i)}, ${w.scalingValue(m.offset.y*(A.direction==="horiz"?1:-1),i)}) scale(${m.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=P.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[m.arrowsImgUrl&&a.jsx(Ht,{url:m.arrowsImgUrl,fill:m.color,hoverFill:m.hover,className:_e(ie.arrowImg,ie.mirror)}),!m.arrowsImgUrl&&a.jsx(ro,{color:m.color,className:_e(ie.arrowIcon,ie.arrowImg,ie.mirror)})]})}),a.jsx("div",{className:_e(ie.arrow,ie.nextArrow,{[ie.arrowVertical]:A.direction==="vert"}),style:{color:m.color,"--arrow-hover-color":m.hover},children:a.jsxs("button",{className:ie.arrowInner,style:{transform:`translate(${w.scalingValue(m.offset.x*(A.direction==="horiz"?-1:1),i)}, ${w.scalingValue(m.offset.y,i)}) scale(${m.scale}) rotate(${A.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=P.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[m.arrowsImgUrl&&a.jsx(Ht,{url:m.arrowsImgUrl,fill:m.color,hoverFill:m.hover,className:ie.arrowImg}),!m.arrowsImgUrl&&a.jsx(ro,{color:m.color,className:_e(ie.arrowIcon,ie.arrowImg)})]})})]}),Q.closeIconUrl&&(()=>{const B=nr(Q.closeIconAlign,Q.closeIconOffset,i),W=`scale(${Q.closeIconScale})`,v=B.transform?`${B.transform} ${W}`:W;return a.jsx("button",{className:ie.closeButton,style:{...B,transform:v},onClick:X,"aria-label":"Close lightbox",children:a.jsx(Ht,{url:Q.closeIconUrl,fill:Q.closeIconColor??"#000000",hoverFill:Q.closeIconHover??"#cccccc"})})})(),ye&&ye.isActive&&r.imageCaption&&((Ee=n[x])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:ie.caption,style:{...nr(ye.alignment,ye.offset,i),fontFamily:Ir(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,i),letterSpacing:w.scalingValue(u,i),wordSpacing:w.scalingValue(S,i),textAlign:E,fontSize:w.scalingValue($.fontSize,i),lineHeight:w.scalingValue($.lineHeight,i),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:h},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:ie.captionTextInner,style:{"--link-color":ye.linkColor,"--link-hover-color":ye.linkHoverColor},children:a.jsx(xn,{content:n[x].imageCaption})})}),ne.isActive&&(()=>{const[B,W]=ne.position.split("-"),v=A.direction==="horiz"?`${B}-left`:ne.position,k=nr(v,ne.offset,i),N=()=>{if(A.direction==="horiz"){if(W==="left")return"flex-start";if(W==="center")return"center";if(W==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:z,className:ie.thumbsWrapper,onClick:K=>$e(K),style:{position:i?"absolute":"fixed",...k,...A.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:_e(ie.thumbsContainer,{[ie.thumbsContainerVertical]:A.direction==="vert",[ie.thumbsAlignStart]:ne.align==="start",[ie.thumbsAlignCenter]:ne.align==="center",[ie.thumbsAlignEnd]:ne.align==="end"}),style:{gap:w.scalingValue(ne.grid.gap,i),justifyContent:R?"flex-start":N()},children:n.map((K,ae)=>{const se=ae===x,he=T[ae],ue=ne.grid.size*(se?ne.activeState.scale:1),ke=()=>{if(ne.fit!=="fit")return{};if(!he)return A.direction==="horiz"?{height:w.scalingValue(ue,i)}:{width:w.scalingValue(ue,i)};const le=he.width/he.height;if(A.direction==="horiz"){const Se=ue,Me=Se*le;return{width:w.scalingValue(Me,i),height:w.scalingValue(Se,i)}}else{const Se=ue,Me=Se/le;return{width:w.scalingValue(Se,i),height:w.scalingValue(Me,i)}}};return a.jsx("button",{className:ie.thumbItem,style:{...A.direction==="horiz"&&ne.fit!=="fit"?{height:w.scalingValue(ue,i)}:{},...A.direction==="vert"&&ne.fit!=="fit"?{width:w.scalingValue(ue,i)}:{},...ne.fit==="cover"?{width:w.scalingValue(ue,i),height:w.scalingValue(ue,i)}:{},...ke(),transition:se?"all 0.25s ease-out":"none",opacity:se?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:le=>{var Se;le.stopPropagation(),f(ae),(Se=P.current)==null||Se.go(ae)},onMouseEnter:()=>{var le;ne.triggers==="hov"&&((le=P.current)==null||le.go(ae))},children:a.jsx("img",{src:K.image.url,alt:K.image.name??"",onLoad:le=>{const Se=le.currentTarget;Se.naturalWidth&&Se.naturalHeight&&j(Me=>({...Me,[ae]:{width:Se.naturalWidth,height:Se.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${K.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function ro({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ac={element:Ec,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 rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _c(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
pointer-events: auto;
|
|
156
156
|
z-index: 10;
|
|
157
157
|
}
|
|
158
|
-
`}function
|
|
158
|
+
`}function Rc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:o,activeEvent:l}){const i=!!n,d=r&&t||!t,{prefix:s}=w.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:E=[],buttonLabel:S,gap:$,fieldsGap:g,buttonCorners:h,buttonStroke:x,buttonPadding:f,isButtonFullWidth:b,inputCorners:y,inputStroke:H,inputPadding:L,inputColor:F,inputTextColor:C,inputBorderColor:T,placeholderColor:j,buttonColor:P,buttonTextColor:M,buttonBorderColor:_,labelTextColor:V,successColor:Y,errorColor:oe,fontFamily:I,inputFontSettings:O,inputFontSize:q,inputLineHeight:z,inputLetterSpacing:R,inputWordSpacing:G,inputTextAppearance:J,buttonFontSettings:Z,buttonFontSize:A,buttonLineHeight:ne,buttonLetterSpacing:m,buttonWordSpacing:Q,buttonTextAppearance:ye,labelFontSettings:ce,labelFontSize:xe,labelLineHeight:re,labelLetterSpacing:de,labelWordSpacing:D,labelTextAppearance:U,statusFontSettings:X,statusFontSize:ee,statusLineHeight:be,statusLetterSpacing:$e,statusWordSpacing:Ce,statusTextAppearance:Le,successMessage:Ee,errorMessage:B,stateOverrides:W}=e,v=p==="B",k=E.slice(0,Math.min(u,E.length)),N={fontSettings:{fontFamily:I,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:q??.01,lineHeight:z,letterSpacing:R??0,wordSpacing:G??0,textAppearance:J,color:C},K=vt(et(N,t)),ae=w.scalingValue(H??0,t),se=w.scalingValue((z??q??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?H??0:(H??0)*2),t),he={...K,borderStyle:"solid",borderRadius:p==="C"?0:w.scalingValue(y??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ae,borderLeftWidth:0}:{borderWidth:ae},paddingTop:w.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:w.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:w.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:w.scalingValue((L==null?void 0:L.left)??0,t),height:se,minHeight:se},ge={fontSettings:{fontFamily:I,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:A??.01,lineHeight:ne,letterSpacing:m??0,wordSpacing:Q??0,textAppearance:ye,color:M},ue=vt(et(ge,t)),ke=w.scalingValue(x??0,t),le={fontSettings:{fontFamily:I,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:xe??.01,lineHeight:re,letterSpacing:de??0,wordSpacing:D??0,textAppearance:U,color:V},Se=et(le,t),Me={fontSettings:{fontFamily:I,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:be,letterSpacing:$e??0,wordSpacing:Ce??0,textAppearance:Le,color:Y},Ie=vt(et(Me,t)),Ve=w.buildColorVars(s,{inputColor:F,inputTextColor:C,inputBorderColor:T,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:P,buttonTextColor:M,buttonBorderColor:_,labelTextColor:V,successColor:Y,errorColor:oe},Mc,Ic,W),[rt,lt]=c.useState(()=>Object.fromEntries(k.map(Te=>[Te.name,""]))),[ct,Ct]=c.useState("idle"),[_t,dt]=c.useState(null),Rt=l==="success"?"success":l==="error"?"error":ct,fe=l==="error"?B:_t,He=l==="filled",Oe=c.useMemo(()=>{if(!He)return rt;let Te=null;for(const Qe of k)(rt[Qe.name]??"").trim().length>0||(Te=Te??{...rt},Te[Qe.name]="Filled");return Te??rt},[rt,He,k]),Ue=Rt==="error"?w.getFormFieldValidationError(k,Oe):null,Dt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),ut=o==null?void 0:o.submitUrl,Mt=(Te,Qe)=>{lt(qe=>({...qe,[Te]:Qe}))},Pn=async Te=>{if(Te.preventDefault(),!d)return;const Qe=Object.fromEntries(k.map(De=>{var ot;return[De.name,((ot=rt[De.name])==null?void 0:ot.trim())??""]}).filter(([,De])=>De));if(!ut){Ct("error"),dt("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const qe=w.getFormFieldValidationError(k,rt);if(qe){Ct("error"),dt(qe);return}Ct("submitting"),dt(null);try{const De=await fetch(ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const ot=await De.text();throw new Error(ot||`Request failed: ${De.status}`)}Ct("success"),lt(Object.fromEntries(k.map(ot=>[ot.name,""])))}catch(De){Ct("error"),dt(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Dt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_c(s)}}),a.jsxs("form",{onSubmit:Pn,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:k.map((Te,Qe)=>a.jsxs(c.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":i?"fieldsGap":void 0,className:i?`${s}-control`:void 0,style:{height:w.scalingValue(g??0,t)}}),a.jsxs("div",{className:`${s}-field-group${v?` ${s}-labeled`:""}`,children:[v&&a.jsx("span",{className:`${s}-field-label`,style:Se?{...Se,lineHeight:Se.fontSize}:void 0,children:Te.label||Te.name}),Te.type==="textarea"?a.jsx("textarea",{name:Te.name,autoComplete:"off",value:Oe[Te.name]??"",onChange:qe=>Mt(Te.name,qe.target.value),placeholder:Te.placeholder,className:`${s}-input`,style:he,rows:1,"data-filled":He||(Oe[Te.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Te.type==="phone"?"tel":Te.type==="email"?"email":"text",name:Te.name,autoComplete:"off",value:Oe[Te.name]??"",onChange:qe=>Mt(Te.name,qe.target.value),placeholder:Te.placeholder,required:Te.isRequired??Te.type==="email",className:`${s}-input`,style:he,"data-filled":He||(Oe[Te.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":i?"gap":void 0,className:i?`${s}-control`:void 0,style:{height:w.scalingValue($??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:d?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(h??0,t),borderWidth:ke,paddingTop:w.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:w.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:w.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:w.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:d?"auto":void 0,...ue,...b?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:b?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ct==="submitting"?"...":S})})})]}),Rt==="success"&&a.jsx("p",{className:`${s}-success`,style:{...Ie},children:Ee}),Rt==="error"&&a.jsx("p",{className:`${s}-error`,style:{...Ie},role:"alert",children:Ue??fe??B})]})}const Mc={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"},Ic=["hover","focus","filled","success","error"],kc=`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
|
-
`,kc=[{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Wc={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:{...ir.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:{...ir.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:{...ir.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:{...ir.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:kc,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:[...Fc],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"]},Hc={element:Ac,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:Wc,sourceCode:Rc};function or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
|
|
792
|
+
`,Fc=[{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"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Wc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Nc={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:{...ir.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:{...ir.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:{...ir.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:{...ir.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:Fc,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:[...Wc],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"]},Hc={element:Rc,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:Nc,sourceCode:kc};function or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Oc(e){return`
|
|
793
793
|
.${e}-wrapper {
|
|
794
794
|
display: flex;
|
|
795
795
|
flex-direction: column;
|
|
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
980
980
|
font-size: ${or(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const
|
|
983
|
+
`}const Bc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:o})=>{const{prefix:l}=w.useScopedStyles(),i=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:E,inputFontSettings:S,inputFontSize:$,inputLineHeight:g,inputLetterSpacing:h,inputWordSpacing:x,inputTextAppearance:f,buttonFontSettings:b,buttonFontSize:y,buttonLineHeight:H,buttonLetterSpacing:L,buttonWordSpacing:F,buttonTextAppearance:C,statusFontSettings:T,statusFontSize:j,statusLineHeight:P,statusLetterSpacing:M,statusWordSpacing:_,statusTextAppearance:V,iconMaxWidth:Y,minHeight:oe,corners:I,stroke:O,stateOverrides:q,inputPadding:z,buttonPadding:R,successMessage:G="Thanks for subscribing!",errorMessage:J="Please, fill all required fields."}=e,Z=d.slice(0,Math.min(u,d.length)),[A,ne]=c.useState(()=>Object.fromEntries(Z.map(le=>[le.name,""]))),[m,Q]=c.useState("idle"),[ye,ce]=c.useState(null),xe=o==="success"?"success":o==="error"?"error":m,re=o==="error"?J:ye,de=o==="filled",D=c.useMemo(()=>{if(!de)return A;let le=null;for(const Se of Z)(A[Se.name]??"").trim().length>0||(le=le??{...A},le[Se.name]="Filled");return le??A},[de,A,Z]),U=xe==="error"?w.getFormFieldValidationError(Z,D):null,X=o&&o!=="default"?`${l}-state-${o}`:"",ee=Z.some(le=>(D[le.name]??"").trim().length>0),be=X!==`${l}-state-filled`&&ee?`${l}-state-filled`:"",$e=`${X} ${be}`.trim(),Ce=r==null?void 0:r.submitUrl,Le=p??"",Ee=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",W=Le||"Submit",v={fontSettings:{fontFamily:E,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:$??.01,lineHeight:g,letterSpacing:h??0,wordSpacing:x??0,textAppearance:f,color:e.inputTextColor??"#111111"},k={fontSettings:{fontFamily:E,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:y??.01,lineHeight:H,letterSpacing:L??0,wordSpacing:F??0,textAppearance:C,color:e.buttonTextColor??"#ffffff"},N={fontSettings:{fontFamily:E,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:j??.01,lineHeight:P,letterSpacing:M??0,wordSpacing:_??0,textAppearance:V,color:e.successColor??"#22c55e"},K=vt(et(v,t)),ae=vt(et(k,t)),se=vt(et(N,t)),he=w.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(v==null?void 0:v.color)??"#111111",buttonTextColor:e.buttonTextColor??(k==null?void 0:k.color)??"#ffffff"},Vc,Dc,q),ge={borderRadius:w.scalingValue(I,t),borderWidth:w.scalingValue(O,t),borderStyle:"solid"},ue={borderLeftWidth:w.scalingValue(O,t)},ke=async le=>{if(le.preventDefault(),!i)return;const Se=Object.fromEntries(Z.map(Ie=>{var Ve;return[Ie.name,((Ve=A[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!Ce){Q("error"),ce("No integrations were found for this form.");return}if(Object.keys(Se).length===0)return;const Me=w.getFormFieldValidationError(Z,A);if(Me){Q("error"),ce(Me);return}Q("submitting"),ce(null);try{const Ie=await fetch(Ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Se)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}Q("success"),ne(Object.fromEntries(Z.map(Ve=>[Ve.name,""])))}catch(Ie){Q("error"),ce(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${$e}`.trim(),style:he,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Oc(l)}}),a.jsxs("form",{onSubmit:ke,className:`${l}-form`,style:{...ge,height:w.scalingValue(oe,t),minHeight:w.scalingValue(oe,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Z.map(le=>a.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:D[le.name]??"",onChange:Se=>ne(Me=>({...Me,[le.name]:Se.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${l}-input`,style:{...K,paddingRight:w.scalingValue(z.right,t),paddingLeft:w.scalingValue(z.left,t),paddingTop:w.scalingValue(z.top,t),paddingBottom:w.scalingValue(z.bottom,t)}},le.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:i?"submit":"button",className:`${l}-submitBtn`,"aria-label":W,style:{...ae,...ue,paddingRight:w.scalingValue(R.right,t),paddingLeft:w.scalingValue(R.left,t),paddingTop:w.scalingValue(R.top,t),paddingBottom:w.scalingValue(R.bottom,t),pointerEvents:i?"auto":void 0},children:m==="submitting"?"...":B?Ee&&a.jsx(Ht,{url:Ee,className:`${l}-submitBtnIcon`,style:{maxWidth:w.scalingValue(Y??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),xe==="success"&&a.jsx("p",{className:`${l}-success`,style:{...se},children:G}),xe==="error"&&a.jsx("p",{className:`${l}-error`,style:{...se},role:"alert",children:U??re??J})]})},Vc={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"},Dc=["hover","focus","filled","success","error"],zc=`import React, { useMemo, useState } from 'react';\r
|
|
984
984
|
import { CommonComponentProps } from '../props';\r
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
|
|
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
|
|
|
1557
1557
|
};\r
|
|
1558
1558
|
\r
|
|
1559
1559
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
1560
|
-
`,zc="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>'),jc=[{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."}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},qc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Kc={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:{...Dr.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:{...Dr.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:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:jc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:zc},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:[...qc],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"]},Gc={element:Oc,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:Kc,sourceCode:Dc};function Uc(e){return`
|
|
1560
|
+
`,jc="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>'),qc=[{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."}],zr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Kc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Gc={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:{...zr.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:{...zr.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:{...zr.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:qc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:jc},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:[...Kc],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"]},Uc={element:Bc,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:Gc,sourceCode:zc};function Xc(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;\r
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover img {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const Yc=30,
|
|
1692
|
+
`}const Yc=30,Zc=20,jr=2,Qc=2,Jc=(e,t)=>Array.from({length:t},()=>e).flat(),ed=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},td=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>ed(r,e))},nd=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:l,isFirstSet:i,scaled:d,onFirstSetImageDone:s})=>{var C,T,j;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!i)return;const P=p.current;P!=null&&P.complete&&(s==null||s())},[i,(C=e.image)==null?void 0:C.url,s]);const u=n.display==="cover",E=n.ratioValue??"1:1",S=n.reversed??!1,[$,g]=E.split(":").map(Number),f=(S?g:$)/(S?$:g);let b=r,y=b/f;y>o&&(y=o,b=y*f);const H=d(b),L=d(y),F=((T=e.image)==null?void 0:T.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((j=e.image)==null?void 0:j.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(r),objectFit:"contain"},onLoad:i?s:void 0,onError:i?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:H}:{width:"fit-content",maxWidth:d(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:H,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:d(r),height:d(o)}},children:F&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:_e(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:F}):F})})},rd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),i=c.useMemo(()=>Xc(l),[l]),{speed:d,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:E,imageMaxHeight:S,imageFit:$,hoverEffect:g}=e,h=!!o,x=!n||!!r,f=x&&g!=="off"&&g!=="randomize"?`${l}-image-hover-${g}`:void 0,b=n?!!r:!0,H=((t==null?void 0:t.length)??0)>0&&(b||!!n),L=Math.max(0,d)*Yc,F=U=>w.scalingValue(U,n??!1),C=c.useRef(null),T=c.useRef(null),j=c.useRef(null),[P,M]=c.useState(0),[_,V]=c.useState(0),Y=b&&p==="on",[oe,I]=c.useState(!1),[O,q]=c.useState({}),z=c.useRef(O);z.current=O;const R=c.useRef(null),G=c.useRef(0),J=c.useRef(null),Z=c.useMemo(()=>(t??[]).map(U=>{var X;return((X=U.image)==null?void 0:X.url)??""}).join("\0"),[t]),[A,ne]=c.useState(jr),m=c.useMemo(()=>{const U=t??[];return!b||U.length===0?U:Jc(U,A)},[t,b,A]),Q=c.useMemo(()=>m.filter(U=>{var X;return!!((X=U.image)!=null&&X.url)}).length,[m]),ye=H?Qc:1;c.useLayoutEffect(()=>{G.current=0,q({}),R.current=null,ne(jr),M(0)},[Z]),c.useEffect(()=>{if(!x||g!=="randomize")return;const U=C.current;if(!U)return;const X=Ce=>{q(Le=>{let Ee=null;for(const B of Ce)B in Le&&(td(U,B)||(Ee||(Ee={...Le}),delete Ee[B]));return Ee??Le})},ee=new IntersectionObserver(Ce=>{const Le=new Set;for(const Ee of Ce){const B=Ee.target.dataset.marqueeItemIndex,W=B!==void 0?Number(B):NaN;Number.isNaN(W)||Le.add(W)}Le.size>0&&X(Le)},{root:U,threshold:0});Object.keys(O).forEach(Ce=>{const Le=Number(Ce);U.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(Ee=>ee.observe(Ee))});let be=0;const $e=()=>{const Ce=Object.keys(z.current);Ce.length!==0&&(X(Ce.map(Number)),be=requestAnimationFrame($e))};return Object.keys(z.current).length>0&&(be=requestAnimationFrame($e)),()=>{cancelAnimationFrame(be),ee.disconnect()}},[g,O,x]),c.useLayoutEffect(()=>{if(!H)return;const U=C.current,X=j.current;if(!U||!X)return;let ee=0;const be=()=>{const Le=U.getBoundingClientRect().width,Ee=X.getBoundingClientRect().width,B=R.current,W=typeof B=="number"&&Math.abs(B-Ee)<=.25;if(R.current=Ee,b&&Ee>0&&A>0){const v=Ee/A;if(v>0&&Le>0){const k=Math.max(jr,Math.ceil(Le/v)+1);if(k!==A){ne(k);return}}}if(Ee>0&&P<=0){M(Ee);return}W&&Ee!==P?M(Ee):!W&&P<=0&&(cancelAnimationFrame(ee),ee=requestAnimationFrame(be))},$e=()=>{cancelAnimationFrame(ee),ee=requestAnimationFrame(be)};J.current=$e,$e();const Ce=new ResizeObserver($e);return Ce.observe(U),Ce.observe(X),()=>{J.current=null,cancelAnimationFrame(ee),Ce.disconnect()}},[b,H,P,Z,A]),c.useLayoutEffect(()=>{const U=T.current;if(!H||!U)return;const X=P>0?P:0,ee=X>0&&L>0?X/L*1e3:0,be=`${Math.max(0,ee)/1e3}s`;U.style.setProperty("--marquee-distance",`${X}px`),U.style.setProperty("--marquee-duration",be)},[b,H,L,P]),c.useLayoutEffect(()=>{if(!H){V(0);return}if(P<=0){V(0);return}const U=T.current;if(!U)return;const X=()=>{const be=U.getBoundingClientRect().height;V(be>0?be:0)};X();const ee=new ResizeObserver(X);return ee.observe(U),()=>ee.disconnect()},[H,ye,m,n,u,E,S,P,$,O]);const ce=()=>{Y&&I(!0)},xe=()=>{Y&&I(!1)},re=c.useCallback(()=>{var U;G.current=Math.min(Q,G.current+1),(U=J.current)==null||U.call(J)},[Q]),de=c.useCallback((U,X)=>{q(ee=>{const be=ee[U]??X,$e=(t??[]).filter(Le=>Le!==be);if($e.length===0)return ee;const Ce=$e[Math.floor(Math.random()*$e.length)];return{...ee,[U]:Ce}})},[t]),D=(U,X,ee,be)=>{const $e=x&&g==="randomize"&&$.display==="cover"?O[ee]??U:U,Ce=`max(${F(u)}, ${Zc}px)`,Le=`calc(-0.5 * (${Ce} + ${F(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":ee,onMouseEnter:x&&g==="randomize"&&$.display==="cover"?()=>de(ee,U):void 0,children:[a.jsx(nd,{item:$e,prefix:l,imageFit:$,imageMaxWidth:E,imageMaxHeight:S,imageHoverClass:f,isEditor:n,isFirstSet:be,scaled:F,onFirstSetImageDone:re}),h&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Le,width:Ce,height:"100%"}})]},`${X}-${ee}`)};if(H){const U=b?Y&&oe?"paused":"running":"paused";return a.jsxs("div",{ref:C,className:_e(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:P>0&&_>0?{height:_}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{ref:T,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:ce,onMouseLeave:xe,style:{"--marquee-play-state":U},children:Array.from({length:ye},(X,ee)=>a.jsx("div",{ref:ee===0?j:void 0,className:_e(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:F(u),paddingRight:F(u)},"aria-hidden":ee>0,children:m.map((be,$e)=>D(be,ee,$e,ee===0))},`set-${ee}`))},"marquee-track")]})}return a.jsxs("div",{ref:C,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),a.jsx("div",{className:_e(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:F(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,X)=>D(U,0,X))},"marquee-static")]})},id=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
1693
1693
|
import cn from 'classnames';\r
|
|
1694
1694
|
import { CommonComponentProps } from '../props';\r
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';\r
|
|
@@ -2320,7 +2320,7 @@ type MarqueeProps = {\r
|
|
|
2320
2320
|
isPreviewMode?: boolean;\r
|
|
2321
2321
|
isEditMode?: boolean;\r
|
|
2322
2322
|
} & CommonComponentProps;\r
|
|
2323
|
-
`,
|
|
2323
|
+
`,od={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},ad={element:rd,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:od,sourceCode:id,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function io(e){return`
|
|
2324
2324
|
.${e}-marquee-wrapper {
|
|
2325
2325
|
overflow: hidden;
|
|
2326
2326
|
width: 100%;
|
|
@@ -2407,7 +2407,7 @@ type MarqueeProps = {\r
|
|
|
2407
2407
|
pointer-events: auto;
|
|
2408
2408
|
z-index: 10;
|
|
2409
2409
|
}
|
|
2410
|
-
`}const
|
|
2410
|
+
`}const sd=30,oo=2,ld=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),{align:i,speed:d,direction:s,pauseOnHover:p,gap:u,cardWidth:E,corners:S,stroke:$,strokeColor:g,bgColor:h,padding:x,logoMarginTop:f,logoWidth:b,logoHeight:y,captionMarginTop:H}=e,L=!!o,F=((t==null?void 0:t.length)??0)>0,C=d>0&&(!n||r),T=F&&(C||n),j=Math.max(0,d)*sd,P=v=>w.scalingValue(v,n??!1),M=c.useRef(null),_=c.useRef(null),V=c.useRef(null),[Y,oe]=c.useState(0),[I,O]=c.useState(0),[q,z]=c.useState(0),R=C&&p==="on",[G,J]=c.useState(!1),Z=c.useRef(null),[A,ne]=c.useState(0),[m,Q]=c.useState(0),ye=c.useRef(null),ce=v=>{var N,K,ae,se,he;return{fontSettings:{fontFamily:(e==null?void 0:e[`${v}FontFamily`])??"Arial",fontWeight:((N=e==null?void 0:e[`${v}FontSettings`])==null?void 0:N.fontWeight)??400,fontStyle:((K=e==null?void 0:e[`${v}FontSettings`])==null?void 0:K.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((he=e==null?void 0:e[`${v}TextAppearance`])==null?void 0:he.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${v}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${v}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${v}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${v}LineHeight`])??.01,color:(e==null?void 0:e[`${v}Color`])??"#000000"}},xe=ce("text"),re=ce("caption"),de=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(v=>{var k,N;return(((k=v.text)==null?void 0:k.length)??0)>0||(((N=v.caption)==null?void 0:N.length)??0)>0}),[t]),D=c.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:I<=0||Y<=0?oo:Math.max(oo,Math.ceil(Y/I)+1),[T,t==null?void 0:t.length,I,Y]);c.useLayoutEffect(()=>{if(!T)return;const v=M.current,k=V.current;if(!v||!k)return;let N=0;const K=()=>{const he=v.getBoundingClientRect().width,ge=k.getBoundingClientRect().width,ue=ye.current,ke=typeof ue=="number"&&Math.abs(ue-ge)<=.25;if(ye.current=ge,oe(he),typeof ge=="number"&&ge>0&&I<=0){O(ge);return}ke&&ge!==I?O(ge):!ke&&I<=0&&(cancelAnimationFrame(N),N=requestAnimationFrame(K))},ae=()=>{cancelAnimationFrame(N),N=requestAnimationFrame(K)};ae();const se=new ResizeObserver(ae);return se.observe(v),se.observe(k),()=>{cancelAnimationFrame(N),se.disconnect()}},[C,T,I]),c.useLayoutEffect(()=>{const v=_.current;if(!T||!v)return;const k=I>0?I:0,N=k>0&&j>0?k/j*1e3:0,K=`${Math.max(0,N)/1e3}s`;v.style.setProperty("--marquee-distance",`${k}px`),v.style.setProperty("--marquee-duration",K)},[C,T,j,I]),c.useLayoutEffect(()=>{if(!T){z(0);return}const v=V.current,k=_.current;if(!v||!k)return;const N=()=>{let ae=0;for(let se=0;se<v.children.length;se++){const ge=v.children[se].firstElementChild;ge&&(ae=Math.max(ae,ge.offsetHeight))}ae<=0&&(ae=k.offsetHeight),z(ae>0?ae:0)};N();const K=new ResizeObserver(N);return K.observe(v),K.observe(k),()=>{K.disconnect()}},[T,D,t,n,u,E,x,$,S,b,y,A,m]);const U=()=>{R&&J(!0)},X=()=>{R&&J(!1)},ee=c.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),be=c.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),$e=c.useCallback((v,k,N,K)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ee,width:"100%"},children:[a.jsx("div",{"data-controls":L?K==null?void 0:K.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:P((K==null?void 0:K.marginTop)??0)}}),a.jsx("div",{...K!=null&&K.dataMeasureKind?{"data-testimonial-measure":K.dataMeasureKind}:{},style:{...et(v,n),textAlign:be,pointerEvents:"auto",...typeof(K==null?void 0:K.minHeightPx)=="number"&&K.minHeightPx>0?{minHeight:K.minHeightPx}:{}},children:a.jsx(xn,{content:k})})]},N),[ee,be,n,L,l,P]),Ce=c.useCallback((v,k,N)=>{var K,ae,se;return a.jsxs("div",{style:{padding:`${P(x.top)} ${P(x.right)} ${P(x.bottom)} ${P(x.left)}`,width:P(E+$*2),height:"100%",borderRadius:P(S),border:`${P($)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:h}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:ee,textAlign:be},children:[v.text&&$e(xe,v.text,"text",N!=null&&N.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(N==null?void 0:N.textMinHeightPx)=="number"&&N.textMinHeightPx>0?{minHeightPx:N.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ee,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(N!=null&&N.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(N!=null&&N.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:P(f)}}),a.jsx("div",{style:{width:P(b),height:P(y)},children:((K=v.logo)==null?void 0:K.url)&&a.jsx("img",{src:v.logo.url,alt:((ae=v.logo)==null?void 0:ae.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((se=v.logo)==null?void 0:se.objectFit)||"contain"}})})]}),v.caption&&$e(re,v.caption,"caption",{...N!=null&&N.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...N!=null&&N.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(N==null?void 0:N.captionMinHeightPx)=="number"&&N.captionMinHeightPx>0?{minHeightPx:N.captionMinHeightPx}:{}})]})]},k)},[h,H,re,E,S,y,f,b,ee,be,x.bottom,x.left,x.right,x.top,$e,$,g,xe,n,L,l]),Le=c.useCallback(v=>{ne(v.maxTextPx),Q(v.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!de){Le({maxTextPx:0,maxCaptionPx:0});return}const v=Z.current;if(!v)return;const k=()=>{w.readTestimonialTextMeasure(v,Le)};k();const N=new ResizeObserver(k);return N.observe(v),()=>{N.disconnect()}},[de,Le,t,Ce]);const Ee=de?{textMinHeightPx:A,captionMinHeightPx:m}:void 0,B=de?a.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((v,k)=>Ce(v,`measure-${k}`,{dataMeasureAttrs:!0}))}):null,W=(v,k)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ce(v,`card-${k}`,Ee),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${P(u)})`,width:P(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},k);if(T){const v=C?R&&G?"paused":"running":"paused";return a.jsxs("div",{ref:M,className:_e(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...q>0?{height:q}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:io(l)}}),B,a.jsx("div",{ref:_,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:U,onMouseLeave:X,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":v},children:Array.from({length:D},(k,N)=>a.jsx("div",{ref:N===0?V:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:P(u),paddingRight:P(u)},"aria-hidden":N>0,children:t==null?void 0:t.map((K,ae)=>W(K,`${N}-${ae}`))},`set-${N}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:io(l)}}),B,a.jsx("div",{style:{gap:P(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((v,k)=>W(v,k))})]})},cd=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2411
2411
|
import cn from 'classnames';
|
|
2412
2412
|
import { CommonComponentProps } from '../props';
|
|
2413
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
|
|
|
3022
3022
|
logoHeight: number;
|
|
3023
3023
|
captionMarginTop: number;
|
|
3024
3024
|
};
|
|
3025
|
-
`,
|
|
3025
|
+
`,ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},dd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ao.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ud={element:ld,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:dd,sourceCode:cd,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function pd(e){return`
|
|
3026
3026
|
.${e}-container {
|
|
3027
3027
|
position: relative;
|
|
3028
3028
|
overflow-x: clip;
|
|
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
|
|
|
3146
3146
|
width: 100%;
|
|
3147
3147
|
height: 100%;
|
|
3148
3148
|
}
|
|
3149
|
-
`}const
|
|
3149
|
+
`}const md=3e3,gd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:l}=w.useScopedStyles(),i=t||[],{speed:d,align:s,width:p,imageMarginTop:u,textMarginTop:E,captionMarginTop:S,imageWidth:$,imageHeight:g,controlsWidth:h,controlsColor:x,controlsHoverColor:f}=e,b=d>0&&(!n||!!r),[y,H]=c.useState(0),[L,F]=c.useState(null),[C,T]=c.useState(!1),j=c.useRef(null),P=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),M=c.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);c.useEffect(()=>{H(0),F(null),T(!1)},[i.length]);const _=i[y],V=L===null?null:i[L],Y=re=>{var D,U,X,ee,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${re}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${re}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((X=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:X.textTransform)??"none",textDecoration:((ee=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ee.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},oe=Y("text"),I=Y("caption"),O=i.length>1&&i.some(re=>{var de,D;return(((de=re.text)==null?void 0:de.length)??0)>0||(((D=re.caption)==null?void 0:D.length)??0)>0}),q=c.useRef(null),[z,R]=c.useState(0),[G,J]=c.useState(0),Z=e.controls??{mode:"Off",icon:null},A=i.length>1,ne=c.useCallback((re,de)=>!A||de===re?re:(j.current&&window.clearTimeout(j.current),F(re),T(!0),j.current=window.setTimeout(()=>{F(null),T(!1),j.current=null},300),de),[A]),m=c.useCallback(()=>{A&&H(re=>ne(re,(re-1+i.length)%i.length))},[A,ne,i.length]),Q=c.useCallback(()=>{A&&H(re=>ne(re,(re+1)%i.length))},[A,ne,i.length]);c.useEffect(()=>{if(!b||!A)return;const re=Math.max(300,md/d),de=window.setInterval(()=>{H(D=>ne(D,(D+1)%i.length))},re);return()=>{window.clearInterval(de)}},[b,A,ne,i.length,d]),c.useEffect(()=>()=>{j.current&&window.clearTimeout(j.current)},[]);const ye=(re,de)=>{var be,$e,Ce,Le;const D=de==null?void 0:de.textMinHeightPx,U=de==null?void 0:de.captionMinHeightPx,X=de==null?void 0:de.dataMeasureAttrs,ee=o&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":ee?"textMarginTop":void 0,className:ee?`${l}-control`:void 0,style:{height:w.scalingValue(E??0,n??!1)}}),a.jsx("div",{...X&&{"data-testimonial-measure":"text"},style:{...et(oe,n),...D&&D>0?{minHeight:D}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(xn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":ee?"imageMarginTop":void 0,className:ee?`${l}-control`:void 0,style:{height:w.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:w.scalingValue($??0,n??!1),height:w.scalingValue(g??0,n??!1)},children:((be=re.image)==null?void 0:be.url)&&a.jsx("img",{src:($e=re.image)==null?void 0:$e.url,alt:((Ce=re.image)==null?void 0:Ce.name)??"",className:`${l}-icon`,style:{objectFit:((Le=re.image)==null?void 0:Le.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:P,width:"100%"},children:[a.jsx("div",{"data-controls":ee?"captionMarginTop":void 0,className:ee?`${l}-control`:void 0,style:{height:w.scalingValue(S??0,n??!1)}}),a.jsx("div",{...X?{"data-testimonial-measure":"caption"}:{},style:{...et(I,n),...U&&U>0?{minHeight:U}:{},textAlign:M,pointerEvents:"auto"},children:a.jsx(xn,{content:re.caption})})]})]})},ce=c.useCallback(re=>{R(re.maxTextPx),J(re.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!O){ce({maxTextPx:0,maxCaptionPx:0});return}const re=q.current;if(!re)return;const de=()=>{w.readTestimonialTextMeasure(re,ce)};de();const D=new ResizeObserver(de);return D.observe(re),()=>{D.disconnect()}},[O,ce,t]),!_)return a.jsx(a.Fragment,{});const xe=O?{textMinHeightPx:z,captionMinHeightPx:G}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:pd(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:w.scalingValue(p??0,n??!1),alignItems:P},children:[O&&a.jsx("div",{ref:q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:i.map((re,de)=>a.jsx("div",{style:{width:"100%"},children:ye(re,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[V&&C&&a.jsx("div",{className:_e(`${l}-fade-item-prev`,`${l}-fade-out`),children:ye(V,{...xe,hideControls:!0})}),a.jsx("div",{className:_e(`${l}-fade-item-current`,C?`${l}-fade-in`:void 0),children:ye(_,xe)})]})]}),Z.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:w.scalingValue(h??.02,n??!1),height:w.scalingValue(h??.02,n??!1),"--arrow-hover-color":f},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:m,disabled:!A,"aria-label":"Previous testimonial",children:Z.icon&&a.jsx(Ht,{url:Z.icon,fill:x,hoverFill:f,className:_e(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:_e(`${l}-arrow`,`${l}-next-arrow`),style:{width:w.scalingValue(h??.02,n??!1),height:w.scalingValue(h??.02,n??!1),"--arrow-hover-color":f},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:Q,disabled:!A,"aria-label":"Next testimonial",children:Z.icon&&a.jsx(Ht,{url:Z.icon,fill:x,hoverFill:f,className:`${l}-arrow-img`})})})]})]})})},hd=`import cn from 'classnames';\r
|
|
3150
3150
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
3151
3151
|
import { CommonComponentProps } from '../props';\r
|
|
3152
3152
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -3642,11 +3642,11 @@ type TestimonialsSettings = {\r
|
|
|
3642
3642
|
icon?: string | null;\r
|
|
3643
3643
|
};\r
|
|
3644
3644
|
};\r
|
|
3645
|
-
`,
|
|
3645
|
+
`,fd="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>'),so={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},yd={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:{...so.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:{...so.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:fd},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"}]}]}]}},vd={element:gd,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:yd,sourceCode:hd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function bd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function lo(e){return((e==null?void 0:e.trim().length)??0)>0}function qr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Kr(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((o-t)/2,r)}}function xd(e){return`
|
|
3646
3646
|
.${e}-wrapper {
|
|
3647
3647
|
display: grid;
|
|
3648
3648
|
align-items: start;
|
|
3649
|
-
min-height: ${
|
|
3649
|
+
min-height: ${bd(48)};
|
|
3650
3650
|
}
|
|
3651
3651
|
.${e}-item {
|
|
3652
3652
|
display: flex;
|
|
@@ -3845,11 +3845,11 @@ type TestimonialsSettings = {\r
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const St=500,xd=750,Lt="cubic-bezier(0.22, 1, 0.36, 1)",Cd=72;function Sd(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function $d(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function wd(e){const[t]=e.media;return t!=null&&t.url?t:null}function Td(e){return!Array.isArray(e)||e.length===0?[]:Sd(e)?e.flatMap(t=>{const n=$d(t);if(!n)return[];const r=wd(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Mn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function lo({media:e,className:t,style:n,onMediaClick:r}){return Mn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,autoPlay:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function Ld(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ed({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:d,counterClassName:s,counterStyle:p}){const u=n==="cover",T=c.useRef(null),x=c.useRef(null),$=c.useRef(null),m=c.useRef(null),h=c.useRef(0),C=c.useRef(!1),[y,S]=c.useState(null),[f,H]=c.useState(r?"opening":"open"),[E,D]=c.useState(!0),[v,P]=c.useState(0),[z,L]=c.useState(!1),[k,R]=c.useState(!1),O=c.useRef(t),Y=c.useRef(!1),ee=e[t],I=ee?Mn(ee):!1,F=c.useCallback(()=>{const X=x.current,G=$.current;if(!X||!G)return;const oe=X.getBoundingClientRect(),M=oe.width,W=oe.height,{width:B,height:ne}=Ld(G);if(!M||!W||!B||!ne)return;if(n==="cover"){S({width:M,height:W,left:oe.left,top:oe.top});return}const pe=B/ne,$e=M/W;if(pe>$e){const ve=M/pe;S({width:M,height:ve,left:oe.left,top:oe.top+(W-ve)/2})}else{const ve=W*pe;S({width:ve,height:W,left:oe.left+(M-ve)/2,top:oe.top})}},[n]);c.useEffect(()=>{F();const X=x.current;if(!X)return;const G=new ResizeObserver(()=>F());return G.observe(X),()=>G.disconnect()},[F,t]),c.useEffect(()=>{f==="opening"&&y&&H("open")},[f,y]),c.useEffect(()=>{if(f!=="closing")return;const X=setTimeout(()=>l(),St);return()=>clearTimeout(X)},[f,l]),c.useEffect(()=>{O.current!==t&&(D(!1),P(0),R(!1),L(!1),h.current=0,C.current=!1,m.current=null),O.current=t},[t]),c.useEffect(()=>{const X=T.current;if(!X||f!=="open")return;const G=W=>{if(W.touches.length!==1)return;const B=W.touches[0];m.current={x:B.clientX,y:B.clientY},C.current=!1},oe=W=>{if(!m.current||W.touches.length!==1)return;const B=W.touches[0],ne=B.clientX-m.current.x,pe=B.clientY-m.current.y;pe<=0||Math.abs(pe)<=Math.abs(ne)||(C.current=!0,L(!0),h.current=pe,P(pe),W.preventDefault())},M=()=>{if(!m.current)return;const W=h.current,B=C.current;if(B&&W>Cd){const ne=window.innerHeight;h.current=ne,R(!0),P(ne),H("closing")}else B&&(h.current=0,P(0));if(B){const ne=pe=>{pe.stopPropagation(),pe.preventDefault(),X.removeEventListener("click",ne,!0)};X.addEventListener("click",ne,!0)}m.current=null,C.current=!1,L(!1)};return X.addEventListener("touchstart",G,{passive:!0}),X.addEventListener("touchmove",oe,{passive:!1}),X.addEventListener("touchend",M),X.addEventListener("touchcancel",M),()=>{X.removeEventListener("touchstart",G),X.removeEventListener("touchmove",oe),X.removeEventListener("touchend",M),X.removeEventListener("touchcancel",M)}},[f]),c.useEffect(()=>{const X=$.current;X instanceof HTMLVideoElement&&f!=="open"&&X.pause()},[t,f,I]),c.useEffect(()=>{const X=G=>{G.key==="Escape"&&(G.preventDefault(),G.stopPropagation(),f!=="closing"&&H("closing"))};return window.addEventListener("keydown",X,!0),()=>window.removeEventListener("keydown",X,!0)},[f]);const q=()=>{f!=="closing"&&H("closing")},N=f==="open",A=f==="closing",j=A&&o&&!!r&&!k,Q=v>0?Math.max(0,1-v/500):1,te=v>0?Math.max(.35,1-v/500):1,w=f==="opening"?r??y:j?r:y,ae=X=>{if(X.stopPropagation(),Y.current){Y.current=!1;return}if(e.length<=1)return;const G=X.currentTarget.getBoundingClientRect(),oe=X.clientY-G.top,M=Math.min(52,G.height*.2);if(!(oe>G.height-M)){if(X.clientX-G.left<G.width/2){i();return}d()}},g=X=>{X.stopPropagation(),Y.current=!0},re=X=>{if(e.length<=1)return;const G=X.currentTarget.getBoundingClientRect(),oe=X.clientX-G.left,M=X.clientY-G.top,W=Math.min(52,G.height*.2);if(M>G.height-W){X.currentTarget.style.cursor="default";return}X.currentTarget.style.cursor=oe<G.width/2?"w-resize":"e-resize"},he={position:"fixed",top:w==null?void 0:w.top,left:w==null?void 0:w.left,width:w==null?void 0:w.width,height:w==null?void 0:w.height,objectFit:n==="cover"?"cover":"contain",transform:v>0?`translateY(${v}px)`:void 0,opacity:v>0?te:A&&!j?0:1,transition:z?"none":k?`transform ${St}ms ${Lt}, opacity ${St}ms ${Lt}`:A&&!j?`opacity ${St}ms ${Lt}`:j||E?`top ${St}ms ${Lt}, left ${St}ms ${Lt}, width ${St}ms ${Lt}, height ${St}ms ${Lt}`:"none",pointerEvents:I&&N?"auto":"none",touchAction:I&&N?"auto":void 0,zIndex:9998},de=y?{position:"fixed",top:y.top,height:y.height,width:y.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:T,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:f==="open"?"none":void 0},onClick:q,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?Q:0,transition:z?"none":`opacity ${St}ms ${Lt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${St}ms ${Lt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${St}ms ${Lt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),w&&ee&&(I?a.jsx("video",{ref:$,src:ee.url,controls:f==="open",playsInline:!0,onLoadedMetadata:F,onTouchStart:g,onClick:ae,onMouseMove:re,style:he},ee.url):a.jsx("img",{ref:$,src:ee.url,alt:ee.name,onLoad:F,style:he},ee.url)),N&&de&&e.length>1&&!I&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...de,left:y.left,cursor:"w-resize"},onClick:X=>{X.stopPropagation(),i()}}),a.jsx("div",{style:{...de,left:y.left+y.width/2,cursor:"e-resize"},onClick:X=>{X.stopPropagation(),d()}})]})]})}function Pd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function _d({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:d}){const{prefix:s}=b.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:$,lightbox:m,imageDisplay:h,lightboxImageDisplay:C,slider:y,sliderTiming:S,direction:f,transition:H,titleMarginTop:E,subtitleMarginTop:D,titleColor:v,subtitleColor:P,lightboxCounterColor:z,titleFontFamily:L,titleFontSettings:k,titleFontSize:R,titleLineHeight:O,titleLetterSpacing:Y,titleWordSpacing:ee,titleTextAppearance:I,subtitleFontFamily:F,subtitleFontSettings:q,subtitleFontSize:N,subtitleLineHeight:A,subtitleLetterSpacing:j,subtitleWordSpacing:Q,subtitleTextAppearance:te,lightboxCounterFontFamily:w,lightboxCounterFontSettings:ae,lightboxCounterFontSize:g,lightboxCounterLineHeight:re,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:X,showText:G="always",alignEntries:oe="off"}=e,M={fontSettings:{fontFamily:L,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:R??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:ee??0,textAppearance:I,color:v},B={...yt(et(M,n))},ne={fontSettings:{fontFamily:F,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:N??.01,lineHeight:A,letterSpacing:j??0,wordSpacing:Q??0,textAppearance:te,color:P},$e={...yt(et(ne,n))},ve={fontSettings:{fontFamily:w,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:g??.01,lineHeight:re,letterSpacing:he??0,wordSpacing:de??0,textAppearance:X,color:z},_e={...yt(et(ve,n)),...qr(g,re,s,n)},V=jr(R,O,`${s}-item-title`,`${s}-text-tight-leading`),se=jr(N,A,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=qr(R,O,s,n),K=qr(N,A,s,n),U=jr(g,re,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Z=b.buildColorVars(s,{titleColor:v,subtitleColor:P,lightboxCounterColor:z},Ad,Md),Re=`${i&&i!=="default"?`${s}-state-${i}`:""}${G==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),be=$===0?1/0:$,xe=(t??[]).slice(0,be),ke=u.entryWidth??.2,le=(h==null?void 0:h.display)==="cover",Ce=(h==null?void 0:h.ratioValue)??"1:1",Me=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=Ce.split(":").map(Number),lt=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,xt=b.scalingValue(ke??0,n),At=!le&&y!=="off",ct={width:xt,...le?{aspectRatio:lt,height:"auto",overflow:"hidden"}:{height:"auto"}},Mt=`${s}-item-image-wrapper${At?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),ge=p==="c",Ne=ge&&oe==="on",Oe=`calc(${b.scalingValue(ke??0,n)} * (${T} / 100))`,Ue=b.scalingValue(ke*T/100,n),Ct=le?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Dt,dt]=c.useState("ltr"),[It,Pn]=c.useState(0),we=c.useRef(null);c.useEffect(()=>{const Fe=we.current;if(!Fe)return;const ut=new ResizeObserver(J=>{Pn(Math.round(J[0].contentRect.width))});return ut.observe(Fe),()=>ut.disconnect()},[]);const Qe=(()=>{const Fe={...Z},ut=we.current?getComputedStyle(we.current).getPropertyValue("--cntrl-article-width").trim():"";return ut&&(Fe["--cntrl-article-width"]=ut),Fe})(),[qe,De]=c.useState(!1),[ot,Zn]=c.useState([]),[kr,sn]=c.useState(0),[Fr,Qn]=c.useState(null),Jn=m==="on"&&(!n||r),er=(Fe,ut,J)=>{if(n&&!r||m==="off")return;const ue=Fe.currentTarget.getBoundingClientRect();Qn({top:ue.top,left:ue.left,width:ue.width,height:ue.height}),Zn(ut),sn(J),De(!0)};c.useEffect(()=>{if(!qe||m!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,m]),c.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Wr=c.useMemo(()=>bd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),a.jsx("div",{style:Z,children:a.jsx("div",{ref:we,className:`${s}-wrapper ${s}-type-${p}${Ne?` ${s}-align-entries`:""} ${Re}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ne?0:b.scalingValue(x??0,n),columnGap:b.scalingValue(u.horizontalGap??0,n),width:b.scalingValue(u.wrapperWidth??0,n),...Ne?{[`--${s}-align-entries-row-gap`]:b.scalingValue(x??0,n)}:{}},children:xe.map((Fe,ut)=>{var gt;const J=so(Fe.title),ue=so(Fe.subtitle),ye=(((gt=Fe.link)==null?void 0:gt.length)??0)>0&&m==="off"?Fe.link:void 0,Te=Math.floor(ut/u.columnsCount)===Math.ceil(xe.length/u.columnsCount)-1,Ke=ge?a.jsxs("div",{className:`${s}-item-text-block`,children:[J&&a.jsx("p",{className:V,style:{width:Oe,...B,..._},children:Fe.title}),J&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:b.scalingValue(E??0,n),width:Ue}}),ue&&a.jsx("p",{className:se,style:{width:Oe,...$e,...K},children:Fe.subtitle}),ue&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:Ue}})]}):null,Ye=ge?a.jsxs("div",{className:`${s}-item-title-row`,children:[J&&a.jsx("p",{className:V,style:{width:Oe,...B,..._},children:Fe.title}),J&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:b.scalingValue(E??0,n),width:Ue}})]}):null,Le=ge?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[ue&&a.jsx("p",{className:se,style:{width:Oe,...$e,...K},children:Fe.subtitle}),ue&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:Ue}})]}):null,pt=ye?a.jsxs("a",{href:ye,target:"_blank",className:`${s}-item-text-link`,children:[Ye,Le]}):a.jsxs(a.Fragment,{children:[Ye,Le]}),Xe=Td(Fe.gallery),Ge=Xe.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:Mt,style:ct,children:Xe.length===0?null:y==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Xe[0],Rt=tt?Ge.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Rt>=0?Je=>er(Je,Ge,Rt):void 0})})():a.jsxs(a.Fragment,{children:[At&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Xe.map(({displayMedia:We})=>Mn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Li,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:xd,type:H==="fade"?"fade":"loop",rewind:H==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:H==="fade"?"ltr":f!=="random"?f==="horizontal"?"ltr":"ttb":Dt},onMoved:We=>{if(f!=="random"||H==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";dt(tt),setTimeout(()=>{We.refresh()},0)},children:Xe.map(({displayMedia:We,lightboxMedia:tt},Rt)=>{const Je=tt?Ge.findIndex(zt=>zt.url===tt.url):-1;return a.jsx(Ei,{children:a.jsx(lo,{media:We,className:`${s}-item-${Mn(We)?"video":"image"}`.trim(),style:Ct,onMediaClick:Jn&&Je>=0?zt=>er(zt,Ge,Je):void 0})},Rt)})},`${H}-${ke}-${f}-${S}-${It}-${d}`)]})}),mt=ge?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&J?"titleMarginTop":void 0,className:o&&J?`${s}-control`:void 0,style:{height:J?b.scalingValue(E??0,n):0,width:Ue}}),a.jsx("p",{className:V,style:{width:Oe,...B,..._},children:Fe.title}),a.jsx("div",{"data-controls":o&&ue?"subtitleMarginTop":void 0,className:o&&ue?`${s}-control`:void 0,style:{height:ue?b.scalingValue(D??0,n):0,width:Ue}}),a.jsx("p",{className:se,style:{width:Oe,...$e,...K},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${Ne&&Te?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${b.scalingValue(ke??0,n)} * (${T} / 100))`:b.scalingValue(ke??0,n)},children:Ne?a.jsxs(a.Fragment,{children:[pt,a.jsx("a",{href:ye,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ye,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,mt]})})},ut)})})}),(!n||r)&&qe&&typeof document<"u"&&m==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Ed,{items:ot,index:kr,imageDisplay:Pd(C),originRect:Fr,reverseClose:y==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:U,counterStyle:_e})}),document.body)]})}const Ad={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Md=["hover","focus","filled","success","error"],Id=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3848
|
+
`}const st=500,Cd=750,wt="cubic-bezier(0.22, 1, 0.36, 1)",Sd=72,wd=50;function $d(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Td(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Ld(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ed(e){return!Array.isArray(e)||e.length===0?[]:$d(e)?e.flatMap(t=>{const n=Td(t);if(!n)return[];const r=Ld(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Rn(e){return e.type==="video"}function Pd(e){e.pause(),e.removeAttribute("src"),e.load()}function co({media:e,className:t,style:n,onMediaClick:r}){return Rn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function ar(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ad(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function _d({src:e,phase:t,mediaRef:n,mediaStyle:r,onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d}){return c.useEffect(()=>{const s=n.current;if(s)return()=>{Pd(s)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d,style:r})}function Rd({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:d,counterClassName:s,counterStyle:p}){const u=n==="cover",E=c.useRef(null),S=c.useRef(null),$=c.useRef(null),g=c.useRef(null),h=c.useRef(0),x=c.useRef(0),f=c.useRef("none"),b=c.useRef(!1),y=c.useRef(!1),H=c.useRef(!1),L=c.useRef(null),[F,C]=c.useState(null),[T,j]=c.useState(r?"opening":"open"),[P,M]=c.useState(!0),[_,V]=c.useState(0),[Y,oe]=c.useState(0),[I,O]=c.useState(!1),[q,z]=c.useState(!1),[R,G]=c.useState(!1),J=c.useRef(t),Z=e[t],A=Z?Rn(Z):!1,ne=Y!==0||I,m=c.useCallback(W=>{H.current=W,O(W)},[]),Q=c.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ye=c.useCallback(()=>{Q(),L.current=window.setTimeout(()=>{Q(),m(!1)},st+32)},[Q,m]),ce=c.useCallback(()=>{const W=S.current,v=$.current;if(!W)return;const k=W.getBoundingClientRect(),N=k.width,K=k.height;if(!N||!K)return;if(n==="cover"){C({width:N,height:K,left:k.left,top:k.top});return}if(!v){C(ar(W));return}const{width:ae,height:se}=Ad(v);if(!ae||!se){C(ar(W));return}const he=ae/se,ge=N/K;if(he>ge){const ue=N/he;C({width:N,height:ue,left:k.left,top:k.top+(K-ue)/2})}else{const ue=K*he;C({width:ue,height:K,left:k.left+(N-ue)/2,top:k.top})}},[n]);c.useEffect(()=>{ce();const W=S.current;if(!W)return;const v=new ResizeObserver(()=>ce());return v.observe(W),()=>v.disconnect()},[ce,t]),c.useEffect(()=>{T==="opening"&&F&&j("open")},[T,F]),c.useEffect(()=>{if(T!=="closing")return;const W=setTimeout(()=>l(),st);return()=>clearTimeout(W)},[T,l]),c.useEffect(()=>()=>{Q()},[Q]),c.useLayoutEffect(()=>{if(J.current===t)return;Q(),M(!1),V(0),oe(0),m(!1),G(!1),z(!1),h.current=0,x.current=0,f.current="none",b.current=!1,g.current=null,y.current=!1;const W=S.current;W&&C(ar(W)),J.current=t},[t,m,Q]),c.useEffect(()=>{if(T!=="open")return;const W=()=>{const se=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",se,!0)};document.addEventListener("click",se,!0)},v=se=>{Q(),H.current=!1,O(!1),oe(0),z(!1),b.current=!1,x.current=0,f.current="none",M(!1);const he=S.current;he&&C(ar(he)),se<0?d():i()},k=se=>{if(Math.abs(se)>wd&&e.length>1){v(se);return}m(!0),oe(0),ye()},N=se=>{if(se.touches.length!==1||H.current)return;const he=se.touches[0];y.current=!0,g.current={x:he.clientX,y:he.clientY},f.current="none",x.current=0,b.current=!1},K=se=>{if(!g.current||se.touches.length!==1||H.current)return;const he=se.touches[0],ge=he.clientX-g.current.x,ue=he.clientY-g.current.y;if(f.current==="none"){if(Math.abs(ge)<10&&Math.abs(ue)<10)return;if(Math.abs(ge)>Math.abs(ue)){if(e.length<=1)return;f.current="horizontal"}else if(ue>0)f.current="vertical";else return}if(f.current==="horizontal"){b.current=!0,z(!0),x.current=ge,oe(ge),se.preventDefault();return}f.current==="vertical"&&(b.current=!0,z(!0),h.current=ue,V(ue),se.preventDefault())},ae=()=>{if(!g.current)return;const se=f.current,he=b.current;if(he&&se==="horizontal")k(x.current),W();else if(he&&se==="vertical"){if(h.current>Sd){const ue=window.innerHeight;h.current=ue,G(!0),V(ue),j("closing")}else h.current=0,V(0);W()}else se==="horizontal"&&Math.abs(x.current)>0&&(k(x.current),W());g.current=null,f.current="none",x.current=0,b.current=!1,z(!1)};return document.addEventListener("touchstart",N,{passive:!0}),document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",N),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae)}},[T,e.length,d,i,m,ye]),c.useEffect(()=>{const W=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),T!=="closing"&&j("closing"))};return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[T]);const xe=()=>{T!=="closing"&&j("closing")},re=T==="open",de=T==="closing",D=de&&o&&!!r&&!R,U=_>0?Math.max(0,1-_/500):1,X=_>0?Math.max(.35,1-_/500):1,ee=T==="opening"?r??F:D?r:F,be=W=>{if(W.stopPropagation(),y.current){y.current=!1;return}if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientY-v.top,N=Math.min(52,v.height*.2);if(!(k>v.height-N)){if(W.clientX-v.left<v.width/2){i();return}d()}},$e=W=>{if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientX-v.left,N=W.clientY-v.top,K=Math.min(52,v.height*.2);if(N>v.height-K){W.currentTarget.style.cursor="default";return}W.currentTarget.style.cursor=k<v.width/2?"w-resize":"e-resize"},Ce=c.useCallback(W=>{W.propertyName!=="transform"||!H.current||(Q(),m(!1))},[Q,m]),Le=ne?`translateX(${Y}px)`:_>0?`translateY(${_}px)`:void 0,Ee={position:"fixed",top:ee==null?void 0:ee.top,left:ee==null?void 0:ee.left,width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:n==="cover"?"cover":"contain",transform:Le,opacity:_>0?X:de&&!D?0:1,transition:q&&!I?"none":I?`transform ${st}ms ${wt}`:R?`transform ${st}ms ${wt}, opacity ${st}ms ${wt}`:de&&!D?`opacity ${st}ms ${wt}`:D||P?`top ${st}ms ${wt}, left ${st}ms ${wt}, width ${st}ms ${wt}, height ${st}ms ${wt}`:"none",pointerEvents:A&&re&&!ne?"auto":"none",touchAction:A&&re?"none":void 0,zIndex:9998},B=F?{position:"fixed",top:F.top,height:F.height,width:F.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:E,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:T==="open"?"none":void 0},onClick:xe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:re?U:0,transition:q?"none":`opacity ${st}ms ${wt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:S,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),ee&&Z&&(A?a.jsx(_d,{src:Z.url,phase:T,mediaRef:$,mediaStyle:Ee,onLoadedMetadata:ce,onClick:be,onMouseMove:$e,onTransitionEnd:Ce},`${t}-${Z.url}`):a.jsx("img",{ref:$,src:Z.url,alt:Z.name,onLoad:ce,onTransitionEnd:Ce,style:Ee},`${t}-${Z.url}`)),re&&B&&e.length>1&&!A&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:F.left,cursor:"w-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),i()}}),a.jsx("div",{style:{...B,left:F.left+F.width/2,cursor:"e-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),d()}})]})]})}function Md(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Id({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:d}){const{prefix:s}=w.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:E=100,verticalGap:S,entriesCount:$,lightbox:g,imageDisplay:h,lightboxImageDisplay:x,slider:f,sliderTiming:b,direction:y,transition:H,titleMarginTop:L,subtitleMarginTop:F,titleColor:C,subtitleColor:T,lightboxCounterColor:j,titleFontFamily:P,titleFontSettings:M,titleFontSize:_,titleLineHeight:V,titleLetterSpacing:Y,titleWordSpacing:oe,titleTextAppearance:I,subtitleFontFamily:O,subtitleFontSettings:q,subtitleFontSize:z,subtitleLineHeight:R,subtitleLetterSpacing:G,subtitleWordSpacing:J,subtitleTextAppearance:Z,lightboxCounterFontFamily:A,lightboxCounterFontSettings:ne,lightboxCounterFontSize:m,lightboxCounterLineHeight:Q,lightboxCounterLetterSpacing:ye,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:xe,showText:re="always",alignEntries:de="off"}=e,D={fontSettings:{fontFamily:P,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:_??.01,lineHeight:V,letterSpacing:Y??0,wordSpacing:oe??0,textAppearance:I,color:C},X={...vt(et(D,n))},ee={fontSettings:{fontFamily:O,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:z??.01,lineHeight:R,letterSpacing:G??0,wordSpacing:J??0,textAppearance:Z,color:T},$e={...vt(et(ee,n))},Ce={fontSettings:{fontFamily:A,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:m??.01,lineHeight:Q,letterSpacing:ye??0,wordSpacing:ce??0,textAppearance:xe,color:j},Ee={...vt(et(Ce,n)),...Kr(m,Q,s,n)},B=qr(_,V,`${s}-item-title`,`${s}-text-tight-leading`),W=qr(z,R,`${s}-item-subtitle`,`${s}-text-tight-leading`),v=Kr(_,V,s,n),k=Kr(z,R,s,n),N=qr(m,Q,`${s}-lightbox-counter`,`${s}-text-tight-leading`),K=w.buildColorVars(s,{titleColor:C,subtitleColor:T,lightboxCounterColor:j},kd,Fd),he=`${i&&i!=="default"?`${s}-state-${i}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ge=$===0?1/0:$,ue=(t??[]).slice(0,ge),ke=u.entryWidth??.2,le=(h==null?void 0:h.display)==="cover",Se=(h==null?void 0:h.ratioValue)??"1:1",Me=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=Se.split(":").map(Number),ct=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,Ct=w.scalingValue(ke??0,n),_t=!le&&f!=="off",dt={width:Ct,...le?{aspectRatio:ct,height:"auto",overflow:"hidden"}:{height:"auto"}},Rt=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),fe=p==="c",He=fe&&de==="on",Oe=`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`,Ue=w.scalingValue(ke*E/100,n),St=le?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Dt,ut]=c.useState("ltr"),[Mt,Pn]=c.useState(0),Te=c.useRef(null);c.useEffect(()=>{const Fe=Te.current;if(!Fe)return;const pt=new ResizeObserver(te=>{Pn(Math.round(te[0].contentRect.width))});return pt.observe(Fe),()=>pt.disconnect()},[]);const Qe=(()=>{const Fe={...K},pt=Te.current?getComputedStyle(Te.current).getPropertyValue("--cntrl-article-width").trim():"";return pt&&(Fe["--cntrl-article-width"]=pt),Fe})(),[qe,De]=c.useState(!1),[ot,Zn]=c.useState([]),[Fr,sn]=c.useState(0),[Wr,Qn]=c.useState(null),Jn=g==="on"&&(!n||r),er=(Fe,pt,te)=>{if(n&&!r||g==="off")return;const pe=Fe.currentTarget.getBoundingClientRect();Qn({top:pe.top,left:pe.left,width:pe.width,height:pe.height}),Zn(pt),sn(te),De(!0)};c.useEffect(()=>{if(!qe||g!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,g]),c.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Nr=c.useMemo(()=>xd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:K,children:a.jsx("div",{ref:Te,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${he}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:w.scalingValue(S??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:w.scalingValue(S??0,n)}:{}},children:ue.map((Fe,pt)=>{var ht;const te=lo(Fe.title),pe=lo(Fe.subtitle),ve=(((ht=Fe.link)==null?void 0:ht.length)??0)>0&&g==="off"?Fe.link:void 0,Pe=Math.floor(pt/u.columnsCount)===Math.ceil(ue.length/u.columnsCount)-1,Ke=fe?a.jsxs("div",{className:`${s}-item-text-block`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}}),pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,Xe=fe?a.jsxs("div",{className:`${s}-item-title-row`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}})]}):null,Ae=fe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,mt=ve?a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-text-link`,children:[Xe,Ae]}):a.jsxs(a.Fragment,{children:[Xe,Ae]}),Ye=Ed(Fe.gallery),Ge=Ye.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:Rt,style:dt,children:Ye.length===0?null:f==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Ye[0],It=tt?Ge.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&It>=0?Je=>er(Je,Ge,It):void 0})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ye.map(({displayMedia:We})=>Rn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Ei,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:b*1e3,width:"100%",height:"100%",speed:Cd,type:H==="fade"?"fade":"loop",rewind:H==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:H==="fade"?"ltr":y!=="random"?y==="horizontal"?"ltr":"ttb":Dt},onMoved:We=>{if(y!=="random"||H==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";ut(tt),setTimeout(()=>{We.refresh()},0)},children:Ye.map(({displayMedia:We,lightboxMedia:tt},It)=>{const Je=tt?Ge.findIndex(zt=>zt.url===tt.url):-1;return a.jsx(Pi,{children:a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&Je>=0?zt=>er(zt,Ge,Je):void 0})},It)})},`${H}-${ke}-${y}-${b}-${Mt}-${d}`)]})}),gt=fe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&te?"titleMarginTop":void 0,className:o&&te?`${s}-control`:void 0,style:{height:te?w.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),a.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${s}-control`:void 0,style:{height:pe?w.scalingValue(F??0,n):0,width:Ue}}),a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&Pe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(E??0)>100?`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`:w.scalingValue(ke??0,n)},children:He?a.jsxs(a.Fragment,{children:[mt,a.jsx("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,gt]})})},pt)})})}),(!n||r)&&qe&&typeof document<"u"&&g==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Rd,{items:ot,index:Fr,imageDisplay:Md(x),originRect:Wr,reverseClose:f==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:N,counterStyle:Ee})}),document.body)]})}const kd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Fd=["hover","focus","filled","success","error"],Wd=`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';
|
|
3852
|
-
import { useCallback, useEffect, useRef, useState, useMemo } from 'react';
|
|
3852
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState, useMemo } from 'react';
|
|
3853
3853
|
import { createPortal } from 'react-dom';
|
|
3854
3854
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
3855
3855
|
|
|
@@ -4129,11 +4129,14 @@ const LIGHTBOX_ANIM_MS = 500;
|
|
|
4129
4129
|
const SLIDER_TRANSITION_MS = 750;
|
|
4130
4130
|
const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
|
|
4131
4131
|
const SWIPE_CLOSE_THRESHOLD = 72;
|
|
4132
|
+
const SWIPE_NAV_THRESHOLD = 50;
|
|
4133
|
+
|
|
4134
|
+
type SwipeAxis = 'none' | 'horizontal' | 'vertical';
|
|
4132
4135
|
|
|
4133
4136
|
type GridMedia = {
|
|
4134
4137
|
url: string;
|
|
4135
4138
|
name?: string;
|
|
4136
|
-
type
|
|
4139
|
+
type: 'image' | 'video';
|
|
4137
4140
|
};
|
|
4138
4141
|
|
|
4139
4142
|
type GridMediaPair = {
|
|
@@ -4190,8 +4193,13 @@ function getGridDisplayItems(image: GridMedia[] | GridMediaPair[] | undefined):
|
|
|
4190
4193
|
|
|
4191
4194
|
function isVideoMedia(media: GridMedia): boolean {
|
|
4192
4195
|
if (media.type === 'video') return true;
|
|
4193
|
-
|
|
4194
|
-
|
|
4196
|
+
return false;
|
|
4197
|
+
}
|
|
4198
|
+
|
|
4199
|
+
function unloadVideoElement(video: HTMLVideoElement) {
|
|
4200
|
+
video.pause();
|
|
4201
|
+
video.removeAttribute('src');
|
|
4202
|
+
video.load();
|
|
4195
4203
|
}
|
|
4196
4204
|
|
|
4197
4205
|
function GridMediaItem({
|
|
@@ -4216,7 +4224,6 @@ function GridMediaItem({
|
|
|
4216
4224
|
}}
|
|
4217
4225
|
muted
|
|
4218
4226
|
loop
|
|
4219
|
-
autoPlay
|
|
4220
4227
|
playsInline
|
|
4221
4228
|
onClick={onMediaClick}
|
|
4222
4229
|
/>
|
|
@@ -4237,6 +4244,11 @@ function GridMediaItem({
|
|
|
4237
4244
|
);
|
|
4238
4245
|
}
|
|
4239
4246
|
|
|
4247
|
+
function getGhostRect(ghost: HTMLElement): AnimRect {
|
|
4248
|
+
const cb = ghost.getBoundingClientRect();
|
|
4249
|
+
return { width: cb.width, height: cb.height, left: cb.left, top: cb.top };
|
|
4250
|
+
}
|
|
4251
|
+
|
|
4240
4252
|
function getLightboxMediaDimensions(media: HTMLImageElement | HTMLVideoElement) {
|
|
4241
4253
|
if (media instanceof HTMLVideoElement) {
|
|
4242
4254
|
return { width: media.videoWidth, height: media.videoHeight };
|
|
@@ -4244,6 +4256,49 @@ function getLightboxMediaDimensions(media: HTMLImageElement | HTMLVideoElement)
|
|
|
4244
4256
|
return { width: media.naturalWidth, height: media.naturalHeight };
|
|
4245
4257
|
}
|
|
4246
4258
|
|
|
4259
|
+
function LightboxVideo({
|
|
4260
|
+
src,
|
|
4261
|
+
phase,
|
|
4262
|
+
mediaRef,
|
|
4263
|
+
mediaStyle,
|
|
4264
|
+
onLoadedMetadata,
|
|
4265
|
+
onClick,
|
|
4266
|
+
onMouseMove,
|
|
4267
|
+
onTransitionEnd,
|
|
4268
|
+
}: {
|
|
4269
|
+
src: string;
|
|
4270
|
+
phase: 'opening' | 'open' | 'closing';
|
|
4271
|
+
mediaRef: React.RefObject<HTMLVideoElement>;
|
|
4272
|
+
mediaStyle: React.CSSProperties;
|
|
4273
|
+
onLoadedMetadata: () => void;
|
|
4274
|
+
onClick: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
4275
|
+
onMouseMove: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
4276
|
+
onTransitionEnd: (e: React.TransitionEvent<HTMLVideoElement>) => void;
|
|
4277
|
+
}) {
|
|
4278
|
+
useEffect(() => {
|
|
4279
|
+
const video = mediaRef.current;
|
|
4280
|
+
if (!video) return;
|
|
4281
|
+
|
|
4282
|
+
return () => {
|
|
4283
|
+
unloadVideoElement(video);
|
|
4284
|
+
};
|
|
4285
|
+
}, [src, mediaRef]);
|
|
4286
|
+
|
|
4287
|
+
return (
|
|
4288
|
+
<video
|
|
4289
|
+
ref={mediaRef}
|
|
4290
|
+
src={src}
|
|
4291
|
+
controls={phase === 'open'}
|
|
4292
|
+
playsInline
|
|
4293
|
+
onLoadedMetadata={onLoadedMetadata}
|
|
4294
|
+
onClick={onClick}
|
|
4295
|
+
onMouseMove={onMouseMove}
|
|
4296
|
+
onTransitionEnd={onTransitionEnd}
|
|
4297
|
+
style={mediaStyle}
|
|
4298
|
+
/>
|
|
4299
|
+
);
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4247
4302
|
function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
|
|
4248
4303
|
const isCover = imageDisplay === 'cover';
|
|
4249
4304
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -4251,31 +4306,70 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4251
4306
|
const mediaRef = useRef<HTMLImageElement | HTMLVideoElement>(null);
|
|
4252
4307
|
const touchStartRef = useRef<{ x: number; y: number } | null>(null);
|
|
4253
4308
|
const swipeOffsetRef = useRef(0);
|
|
4309
|
+
const swipeDeltaXRef = useRef(0);
|
|
4310
|
+
const swipeAxisRef = useRef<SwipeAxis>('none');
|
|
4254
4311
|
const isSwipingRef = useRef(false);
|
|
4312
|
+
const touchInteractionRef = useRef(false);
|
|
4313
|
+
const navSwipeAnimatingRef = useRef(false);
|
|
4314
|
+
const navSwipeCommitTimerRef = useRef<number | null>(null);
|
|
4255
4315
|
const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
|
|
4256
4316
|
const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');
|
|
4257
4317
|
const [transitionsEnabled, setTransitionsEnabled] = useState(true);
|
|
4258
4318
|
const [swipeOffset, setSwipeOffset] = useState(0);
|
|
4319
|
+
const [navSwipeOffset, setNavSwipeOffset] = useState(0);
|
|
4320
|
+
const [navSwipeAnimating, setNavSwipeAnimating] = useState(false);
|
|
4259
4321
|
const [isSwiping, setIsSwiping] = useState(false);
|
|
4260
4322
|
const [swipeDismiss, setSwipeDismiss] = useState(false);
|
|
4261
4323
|
const prevIndexRef = useRef(index);
|
|
4262
|
-
const suppressVideoClickNavRef = useRef(false);
|
|
4263
4324
|
const currentItem = items[index];
|
|
4264
4325
|
const isCurrentVideo = currentItem ? isVideoMedia(currentItem) : false;
|
|
4326
|
+
const isHorizontalNavActive = navSwipeOffset !== 0 || navSwipeAnimating;
|
|
4327
|
+
|
|
4328
|
+
const setNavSwipeAnimatingState = useCallback((value: boolean) => {
|
|
4329
|
+
navSwipeAnimatingRef.current = value;
|
|
4330
|
+
setNavSwipeAnimating(value);
|
|
4331
|
+
}, []);
|
|
4332
|
+
|
|
4333
|
+
const clearNavSwipeCommitTimer = useCallback(() => {
|
|
4334
|
+
if (navSwipeCommitTimerRef.current !== null) {
|
|
4335
|
+
window.clearTimeout(navSwipeCommitTimerRef.current);
|
|
4336
|
+
navSwipeCommitTimerRef.current = null;
|
|
4337
|
+
}
|
|
4338
|
+
}, []);
|
|
4339
|
+
|
|
4340
|
+
const scheduleNavSwipeSnapBackEnd = useCallback(() => {
|
|
4341
|
+
clearNavSwipeCommitTimer();
|
|
4342
|
+
navSwipeCommitTimerRef.current = window.setTimeout(() => {
|
|
4343
|
+
clearNavSwipeCommitTimer();
|
|
4344
|
+
setNavSwipeAnimatingState(false);
|
|
4345
|
+
}, LIGHTBOX_ANIM_MS + 32);
|
|
4346
|
+
}, [clearNavSwipeCommitTimer, setNavSwipeAnimatingState]);
|
|
4265
4347
|
|
|
4266
4348
|
const computeFinalRect = useCallback(() => {
|
|
4267
4349
|
const ghost = ghostRef.current;
|
|
4268
4350
|
const media = mediaRef.current;
|
|
4269
|
-
if (!ghost
|
|
4351
|
+
if (!ghost) return;
|
|
4270
4352
|
const cb = ghost.getBoundingClientRect();
|
|
4271
4353
|
const cw = cb.width;
|
|
4272
4354
|
const ch = cb.height;
|
|
4273
|
-
|
|
4274
|
-
|
|
4355
|
+
if (!cw || !ch) return;
|
|
4356
|
+
|
|
4275
4357
|
if (imageDisplay === 'cover') {
|
|
4276
4358
|
setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
|
|
4277
4359
|
return;
|
|
4278
4360
|
}
|
|
4361
|
+
|
|
4362
|
+
if (!media) {
|
|
4363
|
+
setFinalRect(getGhostRect(ghost));
|
|
4364
|
+
return;
|
|
4365
|
+
}
|
|
4366
|
+
|
|
4367
|
+
const { width: nw, height: nh } = getLightboxMediaDimensions(media);
|
|
4368
|
+
if (!nw || !nh) {
|
|
4369
|
+
setFinalRect(getGhostRect(ghost));
|
|
4370
|
+
return;
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4279
4373
|
const ir = nw / nh;
|
|
4280
4374
|
const cr = cw / ch;
|
|
4281
4375
|
if (ir > cr) {
|
|
@@ -4307,97 +4401,174 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4307
4401
|
}, [phase, onClose]);
|
|
4308
4402
|
|
|
4309
4403
|
useEffect(() => {
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4404
|
+
return () => {
|
|
4405
|
+
clearNavSwipeCommitTimer();
|
|
4406
|
+
};
|
|
4407
|
+
}, [clearNavSwipeCommitTimer]);
|
|
4408
|
+
|
|
4409
|
+
useLayoutEffect(() => {
|
|
4410
|
+
if (prevIndexRef.current === index) return;
|
|
4411
|
+
|
|
4412
|
+
clearNavSwipeCommitTimer();
|
|
4413
|
+
setTransitionsEnabled(false);
|
|
4414
|
+
setSwipeOffset(0);
|
|
4415
|
+
setNavSwipeOffset(0);
|
|
4416
|
+
setNavSwipeAnimatingState(false);
|
|
4417
|
+
setSwipeDismiss(false);
|
|
4418
|
+
setIsSwiping(false);
|
|
4419
|
+
swipeOffsetRef.current = 0;
|
|
4420
|
+
swipeDeltaXRef.current = 0;
|
|
4421
|
+
swipeAxisRef.current = 'none';
|
|
4422
|
+
isSwipingRef.current = false;
|
|
4423
|
+
touchStartRef.current = null;
|
|
4424
|
+
touchInteractionRef.current = false;
|
|
4425
|
+
|
|
4426
|
+
const ghost = ghostRef.current;
|
|
4427
|
+
if (ghost) {
|
|
4428
|
+
setFinalRect(getGhostRect(ghost));
|
|
4318
4429
|
}
|
|
4430
|
+
|
|
4319
4431
|
prevIndexRef.current = index;
|
|
4320
|
-
}, [index]);
|
|
4432
|
+
}, [index, setNavSwipeAnimatingState, clearNavSwipeCommitTimer]);
|
|
4321
4433
|
|
|
4322
4434
|
useEffect(() => {
|
|
4323
|
-
|
|
4324
|
-
|
|
4435
|
+
if (phase !== 'open') return;
|
|
4436
|
+
|
|
4437
|
+
const blockSwipeClick = () => {
|
|
4438
|
+
const blockClick = (clickEvent: Event) => {
|
|
4439
|
+
clickEvent.stopPropagation();
|
|
4440
|
+
clickEvent.preventDefault();
|
|
4441
|
+
document.removeEventListener('click', blockClick, true);
|
|
4442
|
+
};
|
|
4443
|
+
document.addEventListener('click', blockClick, true);
|
|
4444
|
+
};
|
|
4445
|
+
|
|
4446
|
+
const commitNavSwipe = (deltaX: number) => {
|
|
4447
|
+
clearNavSwipeCommitTimer();
|
|
4448
|
+
navSwipeAnimatingRef.current = false;
|
|
4449
|
+
setNavSwipeAnimating(false);
|
|
4450
|
+
setNavSwipeOffset(0);
|
|
4451
|
+
setIsSwiping(false);
|
|
4452
|
+
isSwipingRef.current = false;
|
|
4453
|
+
swipeDeltaXRef.current = 0;
|
|
4454
|
+
swipeAxisRef.current = 'none';
|
|
4455
|
+
setTransitionsEnabled(false);
|
|
4456
|
+
|
|
4457
|
+
const ghost = ghostRef.current;
|
|
4458
|
+
if (ghost) {
|
|
4459
|
+
setFinalRect(getGhostRect(ghost));
|
|
4460
|
+
}
|
|
4461
|
+
|
|
4462
|
+
if (deltaX < 0) onNext();
|
|
4463
|
+
else onPrev();
|
|
4464
|
+
};
|
|
4465
|
+
|
|
4466
|
+
const startNavSwipeRelease = (deltaX: number) => {
|
|
4467
|
+
if (Math.abs(deltaX) > SWIPE_NAV_THRESHOLD && items.length > 1) {
|
|
4468
|
+
commitNavSwipe(deltaX);
|
|
4469
|
+
return;
|
|
4470
|
+
}
|
|
4471
|
+
|
|
4472
|
+
setNavSwipeAnimatingState(true);
|
|
4473
|
+
setNavSwipeOffset(0);
|
|
4474
|
+
scheduleNavSwipeSnapBackEnd();
|
|
4475
|
+
};
|
|
4325
4476
|
|
|
4326
4477
|
const handleTouchStart = (e: TouchEvent) => {
|
|
4327
|
-
if (e.touches.length !== 1) return;
|
|
4478
|
+
if (e.touches.length !== 1 || navSwipeAnimatingRef.current) return;
|
|
4328
4479
|
const touch = e.touches[0];
|
|
4329
4480
|
|
|
4481
|
+
touchInteractionRef.current = true;
|
|
4330
4482
|
touchStartRef.current = { x: touch.clientX, y: touch.clientY };
|
|
4483
|
+
swipeAxisRef.current = 'none';
|
|
4484
|
+
swipeDeltaXRef.current = 0;
|
|
4331
4485
|
isSwipingRef.current = false;
|
|
4332
4486
|
};
|
|
4333
4487
|
|
|
4334
4488
|
const handleTouchMove = (e: TouchEvent) => {
|
|
4335
|
-
if (!touchStartRef.current || e.touches.length !== 1) return;
|
|
4489
|
+
if (!touchStartRef.current || e.touches.length !== 1 || navSwipeAnimatingRef.current) return;
|
|
4336
4490
|
const touch = e.touches[0];
|
|
4337
4491
|
const deltaX = touch.clientX - touchStartRef.current.x;
|
|
4338
4492
|
const deltaY = touch.clientY - touchStartRef.current.y;
|
|
4339
4493
|
|
|
4340
|
-
if (
|
|
4341
|
-
|
|
4494
|
+
if (swipeAxisRef.current === 'none') {
|
|
4495
|
+
if (Math.abs(deltaX) < 10 && Math.abs(deltaY) < 10) return;
|
|
4496
|
+
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
4497
|
+
if (items.length <= 1) return;
|
|
4498
|
+
swipeAxisRef.current = 'horizontal';
|
|
4499
|
+
} else if (deltaY > 0) {
|
|
4500
|
+
swipeAxisRef.current = 'vertical';
|
|
4501
|
+
} else {
|
|
4502
|
+
return;
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4342
4505
|
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4506
|
+
if (swipeAxisRef.current === 'horizontal') {
|
|
4507
|
+
isSwipingRef.current = true;
|
|
4508
|
+
setIsSwiping(true);
|
|
4509
|
+
swipeDeltaXRef.current = deltaX;
|
|
4510
|
+
setNavSwipeOffset(deltaX);
|
|
4511
|
+
e.preventDefault();
|
|
4512
|
+
return;
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
if (swipeAxisRef.current === 'vertical') {
|
|
4516
|
+
isSwipingRef.current = true;
|
|
4517
|
+
setIsSwiping(true);
|
|
4518
|
+
swipeOffsetRef.current = deltaY;
|
|
4519
|
+
setSwipeOffset(deltaY);
|
|
4520
|
+
e.preventDefault();
|
|
4521
|
+
}
|
|
4348
4522
|
};
|
|
4349
4523
|
|
|
4350
4524
|
const handleTouchEnd = () => {
|
|
4351
4525
|
if (!touchStartRef.current) return;
|
|
4352
4526
|
|
|
4353
|
-
const
|
|
4527
|
+
const axis = swipeAxisRef.current;
|
|
4354
4528
|
const wasSwiping = isSwipingRef.current;
|
|
4355
4529
|
|
|
4356
|
-
if (wasSwiping &&
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4530
|
+
if (wasSwiping && axis === 'horizontal') {
|
|
4531
|
+
startNavSwipeRelease(swipeDeltaXRef.current);
|
|
4532
|
+
blockSwipeClick();
|
|
4533
|
+
} else if (wasSwiping && axis === 'vertical') {
|
|
4534
|
+
const offset = swipeOffsetRef.current;
|
|
4535
|
+
|
|
4536
|
+
if (offset > SWIPE_CLOSE_THRESHOLD) {
|
|
4537
|
+
const dismissOffset = window.innerHeight;
|
|
4538
|
+
swipeOffsetRef.current = dismissOffset;
|
|
4539
|
+
setSwipeDismiss(true);
|
|
4540
|
+
setSwipeOffset(dismissOffset);
|
|
4541
|
+
setPhase('closing');
|
|
4542
|
+
} else {
|
|
4543
|
+
swipeOffsetRef.current = 0;
|
|
4544
|
+
setSwipeOffset(0);
|
|
4545
|
+
}
|
|
4366
4546
|
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
container.removeEventListener('click', blockClick, true);
|
|
4372
|
-
};
|
|
4373
|
-
container.addEventListener('click', blockClick, true);
|
|
4547
|
+
blockSwipeClick();
|
|
4548
|
+
} else if (axis === 'horizontal' && Math.abs(swipeDeltaXRef.current) > 0) {
|
|
4549
|
+
startNavSwipeRelease(swipeDeltaXRef.current);
|
|
4550
|
+
blockSwipeClick();
|
|
4374
4551
|
}
|
|
4375
4552
|
|
|
4376
4553
|
touchStartRef.current = null;
|
|
4554
|
+
swipeAxisRef.current = 'none';
|
|
4555
|
+
swipeDeltaXRef.current = 0;
|
|
4377
4556
|
isSwipingRef.current = false;
|
|
4378
4557
|
setIsSwiping(false);
|
|
4379
4558
|
};
|
|
4380
4559
|
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4560
|
+
document.addEventListener('touchstart', handleTouchStart, { passive: true });
|
|
4561
|
+
document.addEventListener('touchmove', handleTouchMove, { passive: false });
|
|
4562
|
+
document.addEventListener('touchend', handleTouchEnd);
|
|
4563
|
+
document.addEventListener('touchcancel', handleTouchEnd);
|
|
4385
4564
|
|
|
4386
4565
|
return () => {
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4566
|
+
document.removeEventListener('touchstart', handleTouchStart);
|
|
4567
|
+
document.removeEventListener('touchmove', handleTouchMove);
|
|
4568
|
+
document.removeEventListener('touchend', handleTouchEnd);
|
|
4569
|
+
document.removeEventListener('touchcancel', handleTouchEnd);
|
|
4391
4570
|
};
|
|
4392
|
-
}, [phase]);
|
|
4393
|
-
|
|
4394
|
-
useEffect(() => {
|
|
4395
|
-
const media = mediaRef.current;
|
|
4396
|
-
if (!(media instanceof HTMLVideoElement)) return;
|
|
4397
|
-
if (phase !== 'open') {
|
|
4398
|
-
media.pause();
|
|
4399
|
-
}
|
|
4400
|
-
}, [index, phase, isCurrentVideo]);
|
|
4571
|
+
}, [phase, items.length, onNext, onPrev, setNavSwipeAnimatingState, scheduleNavSwipeSnapBackEnd]);
|
|
4401
4572
|
|
|
4402
4573
|
useEffect(() => {
|
|
4403
4574
|
const onKeyDown = (e: KeyboardEvent) => {
|
|
@@ -4429,8 +4600,8 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4429
4600
|
|
|
4430
4601
|
const handleVideoClick = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
4431
4602
|
e.stopPropagation();
|
|
4432
|
-
if (
|
|
4433
|
-
|
|
4603
|
+
if (touchInteractionRef.current) {
|
|
4604
|
+
touchInteractionRef.current = false;
|
|
4434
4605
|
return;
|
|
4435
4606
|
}
|
|
4436
4607
|
if (items.length <= 1) return;
|
|
@@ -4451,11 +4622,6 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4451
4622
|
onNext();
|
|
4452
4623
|
};
|
|
4453
4624
|
|
|
4454
|
-
const handleVideoTouchStart = (e: React.TouchEvent<HTMLVideoElement>) => {
|
|
4455
|
-
e.stopPropagation();
|
|
4456
|
-
suppressVideoClickNavRef.current = true;
|
|
4457
|
-
};
|
|
4458
|
-
|
|
4459
4625
|
const handleVideoMouseMove = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
4460
4626
|
if (items.length <= 1) return;
|
|
4461
4627
|
|
|
@@ -4472,6 +4638,19 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4472
4638
|
e.currentTarget.style.cursor = x < rect.width / 2 ? 'w-resize' : 'e-resize';
|
|
4473
4639
|
};
|
|
4474
4640
|
|
|
4641
|
+
const handleNavSwipeTransitionEnd = useCallback((e: React.TransitionEvent<HTMLElement>) => {
|
|
4642
|
+
if (e.propertyName !== 'transform' || !navSwipeAnimatingRef.current) return;
|
|
4643
|
+
|
|
4644
|
+
clearNavSwipeCommitTimer();
|
|
4645
|
+
setNavSwipeAnimatingState(false);
|
|
4646
|
+
}, [clearNavSwipeCommitTimer, setNavSwipeAnimatingState]);
|
|
4647
|
+
|
|
4648
|
+
const mediaTransform = isHorizontalNavActive
|
|
4649
|
+
? \`translateX(\${navSwipeOffset}px)\`
|
|
4650
|
+
: swipeOffset > 0
|
|
4651
|
+
? \`translateY(\${swipeOffset}px)\`
|
|
4652
|
+
: undefined;
|
|
4653
|
+
|
|
4475
4654
|
const mediaStyle: React.CSSProperties = {
|
|
4476
4655
|
position: 'fixed',
|
|
4477
4656
|
top: animatedRect?.top,
|
|
@@ -4479,23 +4658,25 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4479
4658
|
width: animatedRect?.width,
|
|
4480
4659
|
height: animatedRect?.height,
|
|
4481
4660
|
objectFit: imageDisplay === 'cover' ? 'cover' : 'contain',
|
|
4482
|
-
transform:
|
|
4661
|
+
transform: mediaTransform,
|
|
4483
4662
|
opacity: swipeOffset > 0
|
|
4484
4663
|
? swipeMediaOpacity
|
|
4485
4664
|
: isClosing && !reverseAnimateClose
|
|
4486
4665
|
? 0
|
|
4487
4666
|
: 1,
|
|
4488
|
-
transition: isSwiping
|
|
4667
|
+
transition: (isSwiping && !navSwipeAnimating)
|
|
4489
4668
|
? 'none'
|
|
4490
|
-
:
|
|
4491
|
-
? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}
|
|
4492
|
-
:
|
|
4493
|
-
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4494
|
-
:
|
|
4495
|
-
? \`
|
|
4496
|
-
:
|
|
4497
|
-
|
|
4498
|
-
|
|
4669
|
+
: navSwipeAnimating
|
|
4670
|
+
? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4671
|
+
: swipeDismiss
|
|
4672
|
+
? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4673
|
+
: isClosing && !reverseAnimateClose
|
|
4674
|
+
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4675
|
+
: (reverseAnimateClose || transitionsEnabled)
|
|
4676
|
+
? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4677
|
+
: 'none',
|
|
4678
|
+
pointerEvents: isCurrentVideo && isOpen && !isHorizontalNavActive ? 'auto' : 'none',
|
|
4679
|
+
touchAction: isCurrentVideo && isOpen ? 'none' : undefined,
|
|
4499
4680
|
zIndex: 9998,
|
|
4500
4681
|
};
|
|
4501
4682
|
|
|
@@ -4605,25 +4786,25 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4605
4786
|
|
|
4606
4787
|
{animatedRect && currentItem && (
|
|
4607
4788
|
isCurrentVideo ? (
|
|
4608
|
-
<
|
|
4609
|
-
key={currentItem.url}
|
|
4610
|
-
ref={mediaRef as React.RefObject<HTMLVideoElement>}
|
|
4789
|
+
<LightboxVideo
|
|
4790
|
+
key={\`\${index}-\${currentItem.url}\`}
|
|
4611
4791
|
src={currentItem.url}
|
|
4612
|
-
|
|
4613
|
-
|
|
4792
|
+
phase={phase}
|
|
4793
|
+
mediaRef={mediaRef as React.RefObject<HTMLVideoElement>}
|
|
4794
|
+
mediaStyle={mediaStyle}
|
|
4614
4795
|
onLoadedMetadata={computeFinalRect}
|
|
4615
|
-
onTouchStart={handleVideoTouchStart}
|
|
4616
4796
|
onClick={handleVideoClick}
|
|
4617
4797
|
onMouseMove={handleVideoMouseMove}
|
|
4618
|
-
|
|
4798
|
+
onTransitionEnd={handleNavSwipeTransitionEnd}
|
|
4619
4799
|
/>
|
|
4620
4800
|
) : (
|
|
4621
4801
|
<img
|
|
4622
|
-
key={currentItem.url}
|
|
4802
|
+
key={\`\${index}-\${currentItem.url}\`}
|
|
4623
4803
|
ref={mediaRef as React.RefObject<HTMLImageElement>}
|
|
4624
4804
|
src={currentItem.url}
|
|
4625
4805
|
alt={currentItem.name}
|
|
4626
4806
|
onLoad={computeFinalRect}
|
|
4807
|
+
onTransitionEnd={handleNavSwipeTransitionEnd}
|
|
4627
4808
|
style={mediaStyle}
|
|
4628
4809
|
/>
|
|
4629
4810
|
)
|
|
@@ -4636,8 +4817,13 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4636
4817
|
...navOverlayBaseStyle,
|
|
4637
4818
|
left: finalRect!.left,
|
|
4638
4819
|
cursor: 'w-resize',
|
|
4820
|
+
pointerEvents: isHorizontalNavActive ? 'none' : 'auto',
|
|
4639
4821
|
}}
|
|
4640
4822
|
onClick={(e) => {
|
|
4823
|
+
if (touchInteractionRef.current) {
|
|
4824
|
+
touchInteractionRef.current = false;
|
|
4825
|
+
return;
|
|
4826
|
+
}
|
|
4641
4827
|
e.stopPropagation();
|
|
4642
4828
|
onPrev();
|
|
4643
4829
|
}}
|
|
@@ -4647,8 +4833,13 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4647
4833
|
...navOverlayBaseStyle,
|
|
4648
4834
|
left: finalRect!.left + finalRect!.width / 2,
|
|
4649
4835
|
cursor: 'e-resize',
|
|
4836
|
+
pointerEvents: isHorizontalNavActive ? 'none' : 'auto',
|
|
4650
4837
|
}}
|
|
4651
4838
|
onClick={(e) => {
|
|
4839
|
+
if (touchInteractionRef.current) {
|
|
4840
|
+
touchInteractionRef.current = false;
|
|
4841
|
+
return;
|
|
4842
|
+
}
|
|
4652
4843
|
e.stopPropagation();
|
|
4653
4844
|
onNext();
|
|
4654
4845
|
}}
|
|
@@ -5266,11 +5457,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
5266
5457
|
};
|
|
5267
5458
|
|
|
5268
5459
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
5269
|
-
`,Kr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Rd=["titleColor","subtitleColor","lightboxCounterColor"],kd={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"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:{...Kr.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:{...Kr.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:{...Kr.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:[...Rd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Fd={element:_d,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:kd,sourceCode:Id},co=12;function Wd(e,t="50%"){const n={position:"absolute",width:co,height:co,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 Ze({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:r,...o}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:a.jsx("div",{style:Wd(n,r)})})}function Hd(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 Nd({media:e,className:t,style:n}){const r=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=r.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function pr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Od(e){return String(e??"").trim().length>0}function uo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function po(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function mo(e,t,n,r,o,l,i){const d=b.scalingValue(l,i),s=b.scalingValue(0,i),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:s,borderBottomWidth:!u||r?d:s}}function Bd(e,t,n){const r=b.scalingValue(t,n),o=b.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const go=10;function Vd(e){return`
|
|
5460
|
+
`,Gr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nd=["titleColor","subtitleColor","lightboxCounterColor"],Hd={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"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:{...Gr.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:{...Gr.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:{...Gr.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:[...Nd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Od={element:Id,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},schema:Hd,sourceCode:Wd},uo=12;function Bd(e,t="50%"){const n={position:"absolute",width:uo,height:uo,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 Ze({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:r,...o}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:a.jsx("div",{style:Bd(n,r)})})}function Vd(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 Dd({media:e,className:t,style:n}){const r=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=r.current;if(!o)return;const l=o.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zd(e){return String(e??"").trim().length>0}function po(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function mo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),o=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function go(e,t,n,r,o,l,i){const d=w.scalingValue(l,i),s=w.scalingValue(0,i),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:s,borderBottomWidth:!u||r?d:s}}function jd(e,t,n){const r=w.scalingValue(t,n),o=w.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const ho=10;function qd(e){return`
|
|
5270
5461
|
.${e}-wrapper {
|
|
5271
5462
|
display: grid;
|
|
5272
5463
|
align-items: start;
|
|
5273
|
-
min-height: ${
|
|
5464
|
+
min-height: ${mr(48)};
|
|
5274
5465
|
position: relative;
|
|
5275
5466
|
overflow: visible;
|
|
5276
5467
|
box-sizing: border-box;
|
|
@@ -5392,7 +5583,7 @@ a.${e}-list-item {
|
|
|
5392
5583
|
flex-shrink: 0;
|
|
5393
5584
|
overflow: visible;
|
|
5394
5585
|
box-sizing: border-box;
|
|
5395
|
-
min-width: ${
|
|
5586
|
+
min-width: ${mr(50)};
|
|
5396
5587
|
position: relative;
|
|
5397
5588
|
display: flex;
|
|
5398
5589
|
align-items: flex-start;
|
|
@@ -5400,7 +5591,7 @@ a.${e}-list-item {
|
|
|
5400
5591
|
|
|
5401
5592
|
.${e}-list-col-last {
|
|
5402
5593
|
flex: 1 1 auto;
|
|
5403
|
-
min-width: ${
|
|
5594
|
+
min-width: ${mr(50)};
|
|
5404
5595
|
}
|
|
5405
5596
|
|
|
5406
5597
|
.${e}-list-col-title {
|
|
@@ -5697,7 +5888,7 @@ a.${e}-list-item {
|
|
|
5697
5888
|
overflow-wrap: anywhere;
|
|
5698
5889
|
word-break: break-word;
|
|
5699
5890
|
}
|
|
5700
|
-
`}const Yt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Pi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ot="cutLabel",_i=[...Pi,Ot],Rr=["A","B","C","D","E"];function ma(e){return`${e}ColumnVerticalAlign`}const oi=["Top","Center","Bottom"];function Ai(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Rr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Dd(e){const t=Ai(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function zd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Rr.includes(n)?n:null}function ga(e,t,n){const r=zd(e);return r?r===t?!1:Dd(n[ma(r)]):!0}function Bn(e){const t=Ai(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Rr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function jd(e,t,n){if(ha(e,t,n))return Bn(e);const r=Bn(e);return r.kind==="baseline"?{kind:"top"}:r}function qd(e){const t=Bn(e);return t.kind==="baseline"?{kind:"top"}:t}function ha(e,t,n){return ga(e,n,t)?Bn(e).kind==="baseline":!1}function Kd(e){const t={};let n=!1;for(const r of Rr){const o=ma(r),l=e[o];if(e.type==="b"){const i=String(l??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}ga(l,r,e)||(t[o]="Top",n=!0)}return n?t:null}function Gd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Ud(e){const t=Bn(e).kind;return t==="baseline"?"center":t}function Yd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ho(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Xd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-r;return n.remove(),l}function Gr(e,t,n,r){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const i=Xd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const d=l.getBoundingClientRect(),s=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-s)/2:e.kind==="bottom"&&(p=d.height-s),d.top-t+p+i}function Zd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Qd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Jd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ae(e,t){return`${e}${t.replace(/^text/,"Text")}`}const eu={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function tu(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),{type:"row",items:[Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing")]},Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function nu(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_i.map(e=>[eu[e],tu(e)]))}}function xr(e,t){const n=r=>{const o=Ae(t,r);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===Ot?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.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 yt(et(n,t))}function yo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<l?`${n} ${r}`:n}function vo(e,t,n,r){const o=xr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((l-i)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Cn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Sn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],$n=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ru={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},iu=["hover","focus","filled","success","error"],bo=.004,mn=.004,Ur=mn,Mi=50,Vn=1440,Dn=Mi/Vn;function fa(e){const t=typeof e=="number"&&e>0?e:Vn;return Mi/t}function ou(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 r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Vn}const ya={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function In(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function au(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function su(){return Object.fromEntries([...Cn.map(e=>[e,0]),...Sn.map(e=>[e,0])])}function lu(){return Object.fromEntries($n.map(e=>[e,0]))}function ar(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function va(e,t,n){const r=e-Dn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:t*l,paddingRight:n*l}}function mr(e,t,n){const r=Ii(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((l,i)=>l+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function cu(e,t,n){const r={};for(let o=0;o<e;o+=1){const l=Cn[o],i=Sn[o],d=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,p=va(t[o]??0,d,s);p.paddingLeft!==d&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[i]=p.paddingRight)}return r}function Ii(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((p,u)=>p+u,0)+Dn;if(t>=i)return r;const d=[...o];let s=i-t;for(let p=d.length-1;p>=0&&s>0;p-=1){const u=d[p]-Dn;if(u<=0)continue;const T=Math.min(s,u);d[p]-=T,s-=T}return[...d,r[e-1]]}function du(e,t,n){if(e<=1)return{};const r=Ii(e,t,n),o={};for(let l=0;l<e-1;l+=1){const i=vt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function xo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Yt]}function uu(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function pu(e,t,n,r){const o=Math.min(r,e.length,vt.length),l={};for(let i=0;i<o;i+=1){const d=e[i],s=t.indexOf(d);if(s===-1)continue;const p=vt[s],u=Cn[s],T=Sn[s],x=$n[s],$=vt[i],m=Cn[i],h=Sn[i],C=$n[i],y=n[p],S=n[u],f=n[T],H=n[x];typeof y=="number"&&(l[$]=y),typeof S=="number"&&(l[m]=S),typeof f=="number"&&(l[h]=f),typeof H=="number"&&(l[C]=H)}return l}function ba(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function mu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const o=In(e),l=e.type==="b"||e.type===void 0&&t.type==="b",i={...e,...au(n,o),...su()};if(l)for(const d of $n)typeof t[d]=="number"&&(i[d]=t[d]);else Object.assign(i,lu());return ba(e,i)?i:e}function gu(e,t,n){const r=Kd(e);r&&(e={...e,...r});const o=fa(n==null?void 0:n.designWidth),l=e.columns,i=t.columns,d=In(e),s=In(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof i=="number"?i:Yt.length,T=f=>{if(p)return f;const H=ar({...t,...f}),E=In(f),D=mr(u,E,H),v=cu(u,D,{...t,...f});return Object.keys(v).length===0?f:{...f,...v}};if(typeof l=="number"&&l!==i)return e;const x=xo(e),$=xo(t);if(!uu(x,$))return T({...e,...pu(x,$,t,u)});if(d<s&&typeof u=="number"&&!p){const f=ar({...t,...e});return T({...e,...du(u,d,f)})}if(p){const f=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return f>H?{...e,textPaddingLR:H}:e}const m=ar({...t,...e}),h=mr(u,s,ar(t)),y=mr(u,d,m).some((f,H)=>f<(h[H]??f)),S=vt.some(f=>{const H=e[f],E=t[f];return typeof H=="number"&&typeof E=="number"&&H!==E});return y||S?T(e):e}function hu(e,t,n,r){const o=t.slice(0,e).reduce((i,d)=>i+d,0),l=n.slice(e+1,t.length-1).reduce((i,d)=>i+d,0);return Math.max(Dn,r-o-l-Dn)}function fu(e,t){return Math.random()*(t-e)+e}function yu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function Yr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function vu(e,t,n,r,o,l){return e.slice(0,t).map((i,d)=>{const s=Cn[d],p=Sn[d],u=$n[d];return{key:i,textPrefix:Jd[i],widthKey:vt[d],width:n[vt[d]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[p],paddingBottom:l[u]}})}function bu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l,layoutId:i,onUpdateSettings:d}){const{prefix:s}=b.useScopedStyles(),p=!!o,{columns:u,type:T,wrapperWidth:x,entriesCount:$,cellMinHeight:m,dividerWidth:h,showVisibility:C,cut:y,showCut:S,cutCellMinHeight:f,cutLabel:H,imageSize:E,imageOnHover:D,entryHoverEffect:v,entryHoverShowOption:P,rowPaddingTop:z,rowPaddingBottom:L,rowPaddingTopB:k,columnsOrder:R,textPaddingLR:O,textColor:Y,backgroundColor:ee,dividerColor:I,textHoverColor:F,backgroundHoverColor:q,dividerHoverColor:N}=e,[A,j]=c.useState(void 0),[Q,te]=c.useState(null),w=D==="on"&&(!n||r),ae=(y??0)>0,g=T==="b",re=c.useRef(null),he=c.useRef(null),[de,X]=c.useState(null),[G,oe]=c.useState(Vn),M=fa(G),W=Math.max(0,((x??0)-M)/2),B=Math.min(O??0,W),ne=Math.max(B,mn),pe=((x??0)+M)/2;c.useLayoutEffect(()=>{if(!n){oe(Vn);return}const J=()=>{oe(ou(re.current))};J();const ue=re.current;if(!ue)return;const ye=new ResizeObserver(J);ye.observe(ue);let Te=ue;for(;Te&&!Te.style.getPropertyValue("--cntrl-article-width");)Te=Te.parentElement;return Te&&ye.observe(Te),()=>ye.disconnect()},[n,i]),c.useEffect(()=>{j(void 0)},[y,S,t,$]),c.useEffect(()=>{n&&!r&&j(void 0)},[n,r]);const $e=b.buildColorVars(s,{textColor:Y,backgroundColor:ee,dividerColor:I,textHoverColor:F,backgroundHoverColor:q,dividerHoverColor:N},ru,iu),ve=l&&l!=="default"?`${s}-state-${l}`:"",_e=`${!n||r?v==="default"?`${s}-entry-hover-default`:v==="blinds"?`${s}-entry-hover-blinds`:v==="reveal"?`${s}-entry-hover-reveal`:"":""} ${ve}`.trim(),V=v==="reveal"&&(!n||r),se=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,K=c.useRef(e),U=c.useRef(i);c.useEffect(()=>{if(!d||!n){K.current=e,U.current=i;return}if(U.current!==i){K.current=e,U.current=i;return}const J=K.current;if(!(J!==e))return;if(typeof J.columns=="number"&&typeof e.columns=="number"&&J.columns!==e.columns){K.current=e;return}const ye=gu(e,J,{designWidth:G});K.current=e,ba(e,ye)&&d(ye)},[e,d,n,i,G]);const Z=c.useMemo(()=>yu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ce=c.useMemo(()=>Yr(e,Cn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),fe=c.useMemo(()=>Yr(e,Sn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Re=c.useMemo(()=>Yr(e,$n),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),be=c.useMemo(()=>Array.isArray(R)&&R.length>0?R:[...Yt],[R]),xe=c.useMemo(()=>vu(be,u,Z,ce,fe,Re),[be,u,Z,ce,fe,Re]),ke=In(e),le=c.useMemo(()=>vt.slice(0,u).map(J=>Z[J]),[u,Z]),Ce=c.useMemo(()=>Ii(u,ke,Z),[u,ke,Z]),Me=c.useMemo(()=>mr(u,ke,Z),[u,ke,Z]),Ie=c.useMemo(()=>xe.map((J,ue)=>va(Me[ue]??0,J.paddingLeft,J.paddingRight)),[xe,Me]),Ve=c.useMemo(()=>{const J=$===0?1/0:$;return(t??[]).slice(0,J).map((ye,Te)=>({id:Te,cells:Object.fromEntries(Yt.map(Ke=>[Ke,ye[Ke]??""])),image:ye.image,link:ye.link}))},[t,$]),rt=ae?A??y:Ve.length,st=c.useMemo(()=>ae?Ve.slice(0,rt):Ve,[Ve,ae,rt]),lt=ae&&rt<Ve.length,xt=st.length>1||lt,At=[se?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),ct=!n||r,Mt=()=>{if(!ct)return;const J=A??y;if(!S){j(Ve.length);return}j(Math.min(J+S,Ve.length))},ge=J=>b.scalingValue(J,n??!1),Ne=g?k??0:z??0,Oe=L??0,Ue=m??0,Ct=Ne+Ue/2,Dt=Math.max(Oe,Ur),dt=mo(0,st.length,se,_,lt,h??0,n??!1).borderTopWidth,It=de!=null?`${de}px`:`calc(${dt} + ${ge(Ct)})`,Pn=g?"rowPaddingTopB":"rowPaddingTop",we=xe[0],Qe=xe[xe.length-1],qe=Ie[0],De=Ie[Ie.length-1],ot=we&&qe?Math.max(qe.paddingLeft,mn):0,Zn=Qe&&De?Math.max(De.paddingRight,mn):0,kr=ke,sn=J=>{const ue=re.current;if(!ue)return{x:0,y:0};const ye=ue.getBoundingClientRect();return{x:J.clientX-ye.left+go,y:J.clientY-ye.top+go}},Fr=(J,ue)=>{if(!w)return;const ye=J.image;if(!(ye!=null&&ye.url)){te(null);return}const{x:Te,y:Ke}=sn(ue),Ye=(E==null?void 0:E.min)??80,Le=(E==null?void 0:E.max)??320,pt=(Q==null?void 0:Q.rowId)===J.id?Q.widthPx:fu(Ye,Le);te({rowId:J.id,url:ye.url,objectFit:"contain",isVideo:Hd(ye),widthPx:pt,x:Te,y:Ke})},Qn=J=>{if(!w||!Q)return;const{x:ue,y:ye}=sn(J);te(Te=>!Te||Te.x===ue&&Te.y===ye?Te:{...Te,x:ue,y:ye})},Jn=()=>{te(null)},er=J=>{V&&uo(J,s),w&&te(null)},Wr=J=>{V&&po(J,s)};c.useLayoutEffect(()=>{if(!p||g){X(null);return}const J=he.current,ue=J==null?void 0:J.parentElement;if(!J||!ue){X(null);return}const ye=()=>{const Ke=J.querySelector("[data-list-row]");if(!Ke){X(null);return}const Ye=ue.getBoundingClientRect(),Le=Ke.getBoundingClientRect();X(Le.top-Ye.top+Le.height/2)};ye();const Te=new ResizeObserver(ye);return Te.observe(J),Te.observe(ue),()=>Te.disconnect()},[p,g,st,Ne,Oe,Ue,t,e,xe,Me,G,h,se,_,lt]);const Fe=c.useMemo(()=>!g&&Pi.some(J=>{const ue=J.charAt(0),ye=e[`${J}VerticalAlign`];return ha(ye,e,ue)}),[g,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var pt;const J=re.current;if(!J)return;const ue=()=>{J.querySelectorAll("[data-list-col]").forEach(Xe=>{Xe.style.transform="";const Ge=Xe.querySelector(`.${s}-list-col`);Ge&&(Ge.style.minHeight="",Ge.style.height="");const at=Xe.querySelector(`.${s}-list-col-title`);at&&(at.style.transform="")})};if(g||!Fe){ue();return}const ye=()=>{const Xe=Array.from(J.querySelectorAll("[data-list-row]")),Ge=`${s}-list-col`,at=`${s}-baseline-probe`;Xe.forEach(mt=>{mt.querySelectorAll("[data-list-col]").forEach(gt=>{gt.style.transform="";const We=gt.querySelector(`.${Ge}`);We&&(We.style.minHeight="",We.style.height="");const tt=gt.querySelector(`.${s}-list-col-title`);tt&&(tt.style.transform="")})}),Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]"));Zd(mt,gt,Ge)}),J.offsetHeight,Xe.forEach(mt=>{const gt=Array.from(mt.querySelectorAll("[data-list-col]")),We=mt.getBoundingClientRect().top,tt=new Map,Rt=gt.map(ze=>{const ln=ze.querySelector(`.${s}-list-col-title`),cn={el:ze,titleEl:ln,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return tt.set(cn.letter,cn),cn}),Je=new Map,zt=(ze,ln)=>{const cn=Je.get(ze.letter);if(cn!==void 0)return cn;const Ri=ze.anchor?tt.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Ri||ln.has(ze.letter)){const Fi=Gr(ze,We,Ge,at);return Je.set(ze.letter,Fi),Fi}ln.add(ze.letter);const Ca=zt(Ri,ln);ln.delete(ze.letter);const Sa=Gr(ze,We,Ge,at),$a=Ca-Sa;Qd(ze.titleEl,$a);const ki=Gr(ze,We,Ge,at);return Je.set(ze.letter,ki),ki};Rt.forEach(ze=>zt(ze,new Set))})};let Te=null;const Ke=()=>{Te===null&&(Te=requestAnimationFrame(()=>{Te=null,ye()}))};ye();const Ye=new ResizeObserver(()=>Ke());Ye.observe(J);let Le=!1;return typeof document<"u"&&((pt=document.fonts)!=null&&pt.ready)&&document.fonts.ready.then(()=>{Le||Ke()}),()=>{Le=!0,Te!==null&&(cancelAnimationFrame(Te),Te=null),Ye.disconnect(),ue()}},[Fe,g,e,t,G,st,Me]);const ut=c.useMemo(()=>Vd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ut}}),a.jsx("div",{style:$e,children:a.jsxs("div",{ref:re,className:`${s}-wrapper ${_e}${At?` ${At}`:""}${g?` ${s}-type-b`:""}`.trim(),style:{width:b.scalingValue(x??0,n),...!g&&p?{[`--${s}-first-entry-handle-top`]:It}:{}},onMouseMove:w?Qn:void 0,onMouseLeave:w?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[st.map((J,ue)=>{var Ye;const ye=(((Ye=J.link)==null?void 0:Ye.length)??0)>0,Te=ye&&(!n||r)?"a":"div",Ke=mo(ue,st.length,se,_,lt,h??0,n??!1);return a.jsxs(Te,{ref:ue===0?Le=>{he.current=Le}:void 0,className:`${s}-list-item${ye||P==="always"?` ${s}-list-item-has-link`:""}`,...ye?{href:J.link,target:"_blank"}:{},style:Ke,onMouseEnter:Le=>{V&&(ye||P==="always")&&uo(Le,s),w&&Fr(J,Le)},onMouseLeave:Le=>{V&&(ye||P==="always")&&po(Le,s)},children:[Ne>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ge(Ne)}}),a.jsxs("div",{className:`${s}-list-cols-row${g?"":` ${s}-list-cols-row-h`}${p&&ue===0&&g?` ${s}-list-cols-row-controls`:""}`,...g?{}:{"data-list-row":""},style:g?void 0:{minHeight:ge(Ue)},children:[xe.map((Le,pt)=>{const Xe=pt===xe.length-1,Ge=Ie[pt],at=Le.paddingBottom,mt=Od(J.cells[Le.key]),gt=g&&mt&&at>0,We=g?{minHeight:ge(Ue)}:{width:ge(Me[pt])},tt=g?{paddingLeft:ge(B),paddingRight:ge(B)}:{paddingLeft:ge(Ge.paddingLeft),paddingRight:ge(Ge.paddingRight)},Rt=Le.textPrefix.charAt(0),Je=g?qd(e[`${Le.textPrefix}VerticalAlign`]):jd(e[`${Le.textPrefix}VerticalAlign`],e,Rt),zt=g&&mt&&p&&ue===0;return a.jsxs("div",{className:g?`${s}-list-col-wrap`:void 0,...g?{}:{"data-list-col":"","data-col-letter":Rt,"data-valign":Je.kind,...Je.kind==="baseline"?{"data-valign-anchor":Je.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${Xe?` ${s}-list-col-last`:""}`,style:{...tt,...We,...g?{justifyContent:ho(Je.kind)}:{}},"data-test":Le.width,children:a.jsx("span",{className:yo(e,Le.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fo(xr(e,Le.textPrefix),n),...vo(e,Le.textPrefix,s,n),...g?{}:Gd(Je.kind)},children:J.cells[Le.key]??null})}),gt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ge(at)}}),zt&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Le.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ge(Math.max(at,Ur))}})]},Le.key)}),p&&ue===0&&g&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-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(pe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ge(ne),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-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(pe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ge(Math.max(ne,ke-ne)),width:ge(ne),height:"100%"}})]})]}),!g&&Oe>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ge(Oe)}}),p&&ue===0&&!g&&a.jsx(Ze,{centerXHitTop:`var(--${s}-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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ge(Dt)}})]},J.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Pn,"data-controls-static-handle":"",...g?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:g?"center":"left-y",areaStyle:{position:"absolute",top:dt,left:0,width:"100%",height:ge(Math.max(Ne,Ur))}})},"row-padding-handles"),p&&!g&&we&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":we.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[0]-((qe==null?void 0:qe.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ge(ot),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Qe.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(Me[xe.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ge(kr-Zn),width:ge(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!g&&xe.slice(0,-1).map((J,ue)=>{const ye=xe[ue+1],Te=Ce.slice(0,ue+1).reduce((Xe,Ge)=>Xe+Ge,0),Ke=Ie[ue],Ye=Ie[ue+1],Le=Math.max(Ke.paddingRight,mn),pt=Math.max(Ye.paddingLeft,mn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":J.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(Me[ue]-Ke.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ge(Te-Le),width:ge(Le),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":ye.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[ue+1]-Ye.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ge(Te),width:ge(pt),height:"100%"}})]},`${J.paddingRightKey}-padding`)}),p&&!g&&xe.slice(0,-1).map((J,ue)=>{const ye=hu(ue,Ce,le,ke),Ke=Ce.slice(0,ue+1).reduce((Ye,Le)=>Ye+Le,0)-bo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":J.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Mi),"data-controls-max-fraction":String(ye),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ge(Ke),width:ge(bo),height:"calc(100%)",pointerEvents:"auto"}})},`${J.widthKey}-junction`)})]}),lt&&(()=>{const J=xr(e,Ot),ue=Ud(e.cutLabelVerticalAlign),ye=J.textTextAlign==="justify"||g;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:ge(f??0),cursor:ct?"pointer":"default",...Bd(_,h??0,n??!1)},onClick:ct?Mt:void 0,onMouseEnter:V||w?er:void 0,onMouseLeave:V?Wr:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...g?{paddingLeft:ge(B),paddingRight:ge(B)}:{},justifyContent:Yd(J.textTextAlign),alignItems:ho(ue)},children:a.jsx("span",{className:yo(e,Ot,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fo(J,n),...vo(e,Ot,s,n),...ye?{width:"100%"}:{}},children:H})})})})(),w&&Q&&(()=>{const J=pr(Q.widthPx),ue={width:J,height:"auto",maxHeight:J,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return a.jsx(Nd,{media:Q,className:Q.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Q.rowId}-${Q.url}`)})()]})})]})}const xu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
|
|
5891
|
+
`}const Xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ai=["AColumn","BColumn","CColumn","DColumn","EColumn"],Ot="cutLabel",_i=[...Ai,Ot],kr=["A","B","C","D","E"];function ga(e){return`${e}ColumnVerticalAlign`}const ai=["Top","Center","Bottom"];function Ri(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return kr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Kd(e){const t=Ri(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Gd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return kr.includes(n)?n:null}function ha(e,t,n){const r=Gd(e);return r?r===t?!1:Kd(n[ga(r)]):!0}function Bn(e){const t=Ri(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return kr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ud(e,t,n){if(fa(e,t,n))return Bn(e);const r=Bn(e);return r.kind==="baseline"?{kind:"top"}:r}function Xd(e){const t=Bn(e);return t.kind==="baseline"?{kind:"top"}:t}function fa(e,t,n){return ha(e,n,t)?Bn(e).kind==="baseline":!1}function Yd(e){const t={};let n=!1;for(const r of kr){const o=ga(r),l=e[o];if(e.type==="b"){const i=String(l??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}ha(l,r,e)||(t[o]="Top",n=!0)}return n?t:null}function Zd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Qd(e){const t=Bn(e).kind;return t==="baseline"?"center":t}function Jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function fo(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function eu(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),l=o-r;return n.remove(),l}function Ur(e,t,n,r){const o=e.titleEl;if(!o)return 0;const l=o.closest(`.${n}`);if(!l)return 0;const i=eu(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const d=l.getBoundingClientRect(),s=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-s)/2:e.kind==="bottom"&&(p=d.height-s),d.top-t+p+i}function tu(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const l=o.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function nu(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const ru={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Re(e,t){return`${e}${t.replace(/^text/,"Text")}`}const iu={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function ou(e){return[Re(e,"textFontFamily"),Re(e,"textFontSettings"),{type:"row",items:[Re(e,"textFontSize"),Re(e,"textLineHeight"),Re(e,"textLetterSpacing"),Re(e,"textWordSpacing")]},Re(e,"textTextAlign"),Re(e,"textTextAppearance"),`${e}VerticalAlign`]}function au(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(_i.map(e=>[iu[e],ou(e)]))}}function Cr(e,t){const n=r=>{const o=Re(t,r);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===Ot?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function yo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.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 vt(et(n,t))}function vo(e,t,n,r){const o=Cr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<l?`${n} ${r}`:n}function bo(e,t,n,r){const o=Cr(e,t),l=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((l-i)/2,r)}}const bt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Cn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Sn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],wn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],su={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},lu=["hover","focus","filled","success","error"],xo=.004,mn=.004,Xr=mn,Mi=50,Vn=1440,Dn=Mi/Vn;function ya(e){const t=typeof e=="number"&&e>0?e:Vn;return Mi/t}function cu(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 r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Vn}const va={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Mn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function du(e,t=1){const n=t/e;return Object.fromEntries(bt.map(r=>[r,n]))}function uu(){return Object.fromEntries([...Cn.map(e=>[e,0]),...Sn.map(e=>[e,0])])}function pu(){return Object.fromEntries(wn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(bt.map(t=>[t,typeof e[t]=="number"?e[t]:va[t]]))}function ba(e,t,n){const r=e-Dn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Ii(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((l,i)=>l+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function mu(e,t,n){const r={};for(let o=0;o<e;o+=1){const l=Cn[o],i=Sn[o],d=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,p=ba(t[o]??0,d,s);p.paddingLeft!==d&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[i]=p.paddingRight)}return r}function Ii(e,t,n){if(e<=0)return[];const r=bt.slice(0,e).map(p=>n[p]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((p,u)=>p+u,0)+Dn;if(t>=i)return r;const d=[...o];let s=i-t;for(let p=d.length-1;p>=0&&s>0;p-=1){const u=d[p]-Dn;if(u<=0)continue;const E=Math.min(s,u);d[p]-=E,s-=E}return[...d,r[e-1]]}function gu(e,t,n){if(e<=1)return{};const r=Ii(e,t,n),o={};for(let l=0;l<e-1;l+=1){const i=bt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function Co(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Xt]}function hu(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function fu(e,t,n,r){const o=Math.min(r,e.length,bt.length),l={};for(let i=0;i<o;i+=1){const d=e[i],s=t.indexOf(d);if(s===-1)continue;const p=bt[s],u=Cn[s],E=Sn[s],S=wn[s],$=bt[i],g=Cn[i],h=Sn[i],x=wn[i],f=n[p],b=n[u],y=n[E],H=n[S];typeof f=="number"&&(l[$]=f),typeof b=="number"&&(l[g]=b),typeof y=="number"&&(l[h]=y),typeof H=="number"&&(l[x]=H)}return l}function xa(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function yu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const o=Mn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",i={...e,...du(n,o),...uu()};if(l)for(const d of wn)typeof t[d]=="number"&&(i[d]=t[d]);else Object.assign(i,pu());return xa(e,i)?i:e}function vu(e,t,n){const r=Yd(e);r&&(e={...e,...r});const o=ya(n==null?void 0:n.designWidth),l=e.columns,i=t.columns,d=Mn(e),s=Mn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof i=="number"?i:Xt.length,E=y=>{if(p)return y;const H=sr({...t,...y}),L=Mn(y),F=gr(u,L,H),C=mu(u,F,{...t,...y});return Object.keys(C).length===0?y:{...y,...C}};if(typeof l=="number"&&l!==i)return e;const S=Co(e),$=Co(t);if(!hu(S,$))return E({...e,...fu(S,$,t,u)});if(d<s&&typeof u=="number"&&!p){const y=sr({...t,...e});return E({...e,...gu(u,d,y)})}if(p){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(d-o)/2);return y>H?{...e,textPaddingLR:H}:e}const g=sr({...t,...e}),h=gr(u,s,sr(t)),f=gr(u,d,g).some((y,H)=>y<(h[H]??y)),b=bt.some(y=>{const H=e[y],L=t[y];return typeof H=="number"&&typeof L=="number"&&H!==L});return f||b?E(e):e}function bu(e,t,n,r){const o=t.slice(0,e).reduce((i,d)=>i+d,0),l=n.slice(e+1,t.length-1).reduce((i,d)=>i+d,0);return Math.max(Dn,r-o-l-Dn)}function xu(e,t){return Math.random()*(t-e)+e}function Cu(e){return Object.fromEntries(bt.map(t=>[t,typeof e[t]=="number"?e[t]:va[t]]))}function Yr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Su(e,t,n,r,o,l){return e.slice(0,t).map((i,d)=>{const s=Cn[d],p=Sn[d],u=wn[d];return{key:i,textPrefix:ru[i],widthKey:bt[d],width:n[bt[d]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[p],paddingBottom:l[u]}})}function wu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l,layoutId:i,onUpdateSettings:d}){const{prefix:s}=w.useScopedStyles(),p=!!o,{columns:u,type:E,wrapperWidth:S,entriesCount:$,cellMinHeight:g,dividerWidth:h,showVisibility:x,cut:f,showCut:b,cutCellMinHeight:y,cutLabel:H,imageSize:L,imageOnHover:F,entryHoverEffect:C,entryHoverShowOption:T,rowPaddingTop:j,rowPaddingBottom:P,rowPaddingTopB:M,columnsOrder:_,textPaddingLR:V,textColor:Y,backgroundColor:oe,dividerColor:I,textHoverColor:O,backgroundHoverColor:q,dividerHoverColor:z}=e,[R,G]=c.useState(void 0),[J,Z]=c.useState(null),A=F==="on"&&(!n||r),ne=(f??0)>0,m=E==="b",Q=c.useRef(null),ye=c.useRef(null),[ce,xe]=c.useState(null),[re,de]=c.useState(Vn),D=ya(re),U=Math.max(0,((S??0)-D)/2),X=Math.min(V??0,U),ee=Math.max(X,mn),be=((S??0)+D)/2;c.useLayoutEffect(()=>{if(!n){de(Vn);return}const te=()=>{de(cu(Q.current))};te();const pe=Q.current;if(!pe)return;const ve=new ResizeObserver(te);ve.observe(pe);let Pe=pe;for(;Pe&&!Pe.style.getPropertyValue("--cntrl-article-width");)Pe=Pe.parentElement;return Pe&&ve.observe(Pe),()=>ve.disconnect()},[n,i]),c.useEffect(()=>{G(void 0)},[f,b,t,$]),c.useEffect(()=>{n&&!r&&G(void 0)},[n,r]);const $e=w.buildColorVars(s,{textColor:Y,backgroundColor:oe,dividerColor:I,textHoverColor:O,backgroundHoverColor:q,dividerHoverColor:z},su,lu),Ce=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?C==="default"?`${s}-entry-hover-default`:C==="blinds"?`${s}-entry-hover-blinds`:C==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Ce}`.trim(),B=C==="reveal"&&(!n||r),W=(x==null?void 0:x[0])??!1,v=(x==null?void 0:x[1])??!1,k=c.useRef(e),N=c.useRef(i);c.useEffect(()=>{if(!d||!n){k.current=e,N.current=i;return}if(N.current!==i){k.current=e,N.current=i;return}const te=k.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){k.current=e;return}const ve=vu(e,te,{designWidth:re});k.current=e,xa(e,ve)&&d(ve)},[e,d,n,i,re]);const K=c.useMemo(()=>Cu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=c.useMemo(()=>Yr(e,Cn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),se=c.useMemo(()=>Yr(e,Sn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),he=c.useMemo(()=>Yr(e,wn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ge=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Xt],[_]),ue=c.useMemo(()=>Su(ge,u,K,ae,se,he),[ge,u,K,ae,se,he]),ke=Mn(e),le=c.useMemo(()=>bt.slice(0,u).map(te=>K[te]),[u,K]),Se=c.useMemo(()=>Ii(u,ke,K),[u,ke,K]),Me=c.useMemo(()=>gr(u,ke,K),[u,ke,K]),Ie=c.useMemo(()=>ue.map((te,pe)=>ba(Me[pe]??0,te.paddingLeft,te.paddingRight)),[ue,Me]),Ve=c.useMemo(()=>{const te=$===0?1/0:$;return(t??[]).slice(0,te).map((ve,Pe)=>({id:Pe,cells:Object.fromEntries(Xt.map(Ke=>[Ke,ve[Ke]??""])),image:ve.image,link:ve.link}))},[t,$]),rt=ne?R??f:Ve.length,lt=c.useMemo(()=>ne?Ve.slice(0,rt):Ve,[Ve,ne,rt]),ct=ne&&rt<Ve.length,Ct=lt.length>1||ct,_t=[W?`${s}-divider-top`:"",v||Ct?`${s}-divider-bottom`:""].filter(Boolean).join(" "),dt=!n||r,Rt=()=>{if(!dt)return;const te=R??f;if(!b){G(Ve.length);return}G(Math.min(te+b,Ve.length))},fe=te=>w.scalingValue(te,n??!1),He=m?M??0:j??0,Oe=P??0,Ue=g??0,St=He+Ue/2,Dt=Math.max(Oe,Xr),ut=go(0,lt.length,W,v,ct,h??0,n??!1).borderTopWidth,Mt=ce!=null?`${ce}px`:`calc(${ut} + ${fe(St)})`,Pn=m?"rowPaddingTopB":"rowPaddingTop",Te=ue[0],Qe=ue[ue.length-1],qe=Ie[0],De=Ie[Ie.length-1],ot=Te&&qe?Math.max(qe.paddingLeft,mn):0,Zn=Qe&&De?Math.max(De.paddingRight,mn):0,Fr=ke,sn=te=>{const pe=Q.current;if(!pe)return{x:0,y:0};const ve=pe.getBoundingClientRect();return{x:te.clientX-ve.left+ho,y:te.clientY-ve.top+ho}},Wr=(te,pe)=>{if(!A)return;const ve=te.image;if(!(ve!=null&&ve.url)){Z(null);return}const{x:Pe,y:Ke}=sn(pe),Xe=(L==null?void 0:L.min)??80,Ae=(L==null?void 0:L.max)??320,mt=(J==null?void 0:J.rowId)===te.id?J.widthPx:xu(Xe,Ae);Z({rowId:te.id,url:ve.url,objectFit:"contain",isVideo:Vd(ve),widthPx:mt,x:Pe,y:Ke})},Qn=te=>{if(!A||!J)return;const{x:pe,y:ve}=sn(te);Z(Pe=>!Pe||Pe.x===pe&&Pe.y===ve?Pe:{...Pe,x:pe,y:ve})},Jn=()=>{Z(null)},er=te=>{B&&po(te,s),A&&Z(null)},Nr=te=>{B&&mo(te,s)};c.useLayoutEffect(()=>{if(!p||m){xe(null);return}const te=ye.current,pe=te==null?void 0:te.parentElement;if(!te||!pe){xe(null);return}const ve=()=>{const Ke=te.querySelector("[data-list-row]");if(!Ke){xe(null);return}const Xe=pe.getBoundingClientRect(),Ae=Ke.getBoundingClientRect();xe(Ae.top-Xe.top+Ae.height/2)};ve();const Pe=new ResizeObserver(ve);return Pe.observe(te),Pe.observe(pe),()=>Pe.disconnect()},[p,m,lt,He,Oe,Ue,t,e,ue,Me,re,h,W,v,ct]);const Fe=c.useMemo(()=>!m&&Ai.some(te=>{const pe=te.charAt(0),ve=e[`${te}VerticalAlign`];return fa(ve,e,pe)}),[m,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var mt;const te=Q.current;if(!te)return;const pe=()=>{te.querySelectorAll("[data-list-col]").forEach(Ye=>{Ye.style.transform="";const Ge=Ye.querySelector(`.${s}-list-col`);Ge&&(Ge.style.minHeight="",Ge.style.height="");const at=Ye.querySelector(`.${s}-list-col-title`);at&&(at.style.transform="")})};if(m||!Fe){pe();return}const ve=()=>{const Ye=Array.from(te.querySelectorAll("[data-list-row]")),Ge=`${s}-list-col`,at=`${s}-baseline-probe`;Ye.forEach(gt=>{gt.querySelectorAll("[data-list-col]").forEach(ht=>{ht.style.transform="";const We=ht.querySelector(`.${Ge}`);We&&(We.style.minHeight="",We.style.height="");const tt=ht.querySelector(`.${s}-list-col-title`);tt&&(tt.style.transform="")})}),Ye.forEach(gt=>{const ht=Array.from(gt.querySelectorAll("[data-list-col]"));tu(gt,ht,Ge)}),te.offsetHeight,Ye.forEach(gt=>{const ht=Array.from(gt.querySelectorAll("[data-list-col]")),We=gt.getBoundingClientRect().top,tt=new Map,It=ht.map(ze=>{const ln=ze.querySelector(`.${s}-list-col-title`),cn={el:ze,titleEl:ln,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return tt.set(cn.letter,cn),cn}),Je=new Map,zt=(ze,ln)=>{const cn=Je.get(ze.letter);if(cn!==void 0)return cn;const ki=ze.anchor?tt.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!ki||ln.has(ze.letter)){const Wi=Ur(ze,We,Ge,at);return Je.set(ze.letter,Wi),Wi}ln.add(ze.letter);const Sa=zt(ki,ln);ln.delete(ze.letter);const wa=Ur(ze,We,Ge,at),$a=Sa-wa;nu(ze.titleEl,$a);const Fi=Ur(ze,We,Ge,at);return Je.set(ze.letter,Fi),Fi};It.forEach(ze=>zt(ze,new Set))})};let Pe=null;const Ke=()=>{Pe===null&&(Pe=requestAnimationFrame(()=>{Pe=null,ve()}))};ve();const Xe=new ResizeObserver(()=>Ke());Xe.observe(te);let Ae=!1;return typeof document<"u"&&((mt=document.fonts)!=null&&mt.ready)&&document.fonts.ready.then(()=>{Ae||Ke()}),()=>{Ae=!0,Pe!==null&&(cancelAnimationFrame(Pe),Pe=null),Xe.disconnect(),pe()}},[Fe,m,e,t,re,lt,Me]);const pt=c.useMemo(()=>qd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:pt}}),a.jsx("div",{style:$e,children:a.jsxs("div",{ref:Q,className:`${s}-wrapper ${Ee}${_t?` ${_t}`:""}${m?` ${s}-type-b`:""}`.trim(),style:{width:w.scalingValue(S??0,n),...!m&&p?{[`--${s}-first-entry-handle-top`]:Mt}:{}},onMouseMove:A?Qn:void 0,onMouseLeave:A?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[lt.map((te,pe)=>{var Xe;const ve=(((Xe=te.link)==null?void 0:Xe.length)??0)>0,Pe=ve&&(!n||r)?"a":"div",Ke=go(pe,lt.length,W,v,ct,h??0,n??!1);return a.jsxs(Pe,{ref:pe===0?Ae=>{ye.current=Ae}:void 0,className:`${s}-list-item${ve||T==="always"?` ${s}-list-item-has-link`:""}`,...ve?{href:te.link,target:"_blank"}:{},style:Ke,onMouseEnter:Ae=>{B&&(ve||T==="always")&&po(Ae,s),A&&Wr(te,Ae)},onMouseLeave:Ae=>{B&&(ve||T==="always")&&mo(Ae,s)},children:[He>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:fe(He)}}),a.jsxs("div",{className:`${s}-list-cols-row${m?"":` ${s}-list-cols-row-h`}${p&&pe===0&&m?` ${s}-list-cols-row-controls`:""}`,...m?{}:{"data-list-row":""},style:m?void 0:{minHeight:fe(Ue)},children:[ue.map((Ae,mt)=>{const Ye=mt===ue.length-1,Ge=Ie[mt],at=Ae.paddingBottom,gt=zd(te.cells[Ae.key]),ht=m&>&&at>0,We=m?{minHeight:fe(Ue)}:{width:fe(Me[mt])},tt=m?{paddingLeft:fe(X),paddingRight:fe(X)}:{paddingLeft:fe(Ge.paddingLeft),paddingRight:fe(Ge.paddingRight)},It=Ae.textPrefix.charAt(0),Je=m?Xd(e[`${Ae.textPrefix}VerticalAlign`]):Ud(e[`${Ae.textPrefix}VerticalAlign`],e,It),zt=m&>&&p&&pe===0;return a.jsxs("div",{className:m?`${s}-list-col-wrap`:void 0,...m?{}:{"data-list-col":"","data-col-letter":It,"data-valign":Je.kind,...Je.kind==="baseline"?{"data-valign-anchor":Je.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${Ye?` ${s}-list-col-last`:""}`,style:{...tt,...We,...m?{justifyContent:fo(Je.kind)}:{}},"data-test":Ae.width,children:a.jsx("span",{className:vo(e,Ae.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...yo(Cr(e,Ae.textPrefix),n),...bo(e,Ae.textPrefix,s,n),...m?{}:Zd(Je.kind)},children:te.cells[Ae.key]??null})}),ht&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:fe(at)}}),zt&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Ae.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:fe(Math.max(at,Xr))}})]},Ae.key)}),p&&pe===0&&m&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-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(be),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:fe(ee),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-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(be),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:fe(Math.max(ee,ke-ee)),width:fe(ee),height:"100%"}})]})]}),!m&&Oe>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:fe(Oe)}}),p&&pe===0&&!m&&a.jsx(Ze,{centerXHitTop:`var(--${s}-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:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:fe(Dt)}})]},te.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Pn,"data-controls-static-handle":"",...m?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:m?"center":"left-y",areaStyle:{position:"absolute",top:ut,left:0,width:"100%",height:fe(Math.max(He,Xr))}})},"row-padding-handles"),p&&!m&&Te&&Qe&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[0]-((qe==null?void 0:qe.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:fe(ot),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Qe.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(Me[ue.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:fe(Fr-Zn),width:fe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!m&&ue.slice(0,-1).map((te,pe)=>{const ve=ue[pe+1],Pe=Se.slice(0,pe+1).reduce((Ye,Ge)=>Ye+Ge,0),Ke=Ie[pe],Xe=Ie[pe+1],Ae=Math.max(Ke.paddingRight,mn),mt=Math.max(Xe.paddingLeft,mn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me[pe]-Ke.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:fe(Pe-Ae),width:fe(Ae),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":ve.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me[pe+1]-Xe.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:fe(Pe),width:fe(mt),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!m&&ue.slice(0,-1).map((te,pe)=>{const ve=bu(pe,Se,le,ke),Ke=Se.slice(0,pe+1).reduce((Xe,Ae)=>Xe+Ae,0)-xo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Mi),"data-controls-max-fraction":String(ve),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:fe(Ke),width:fe(xo),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),ct&&(()=>{const te=Cr(e,Ot),pe=Qd(e.cutLabelVerticalAlign),ve=te.textTextAlign==="justify"||m;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:fe(y??0),cursor:dt?"pointer":"default",...jd(v,h??0,n??!1)},onClick:dt?Rt:void 0,onMouseEnter:B||A?er:void 0,onMouseLeave:B?Nr:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...m?{paddingLeft:fe(X),paddingRight:fe(X)}:{},justifyContent:Jd(te.textTextAlign),alignItems:fo(pe)},children:a.jsx("span",{className:vo(e,Ot,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...yo(te,n),...bo(e,Ot,s,n),...ve?{width:"100%"}:{}},children:H})})})})(),A&&J&&(()=>{const te=mr(J.widthPx),pe={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:J.x,top:J.y,position:"absolute"};return a.jsx(Dd,{media:J,className:J.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:pe},`${J.rowId}-${J.url}`)})()]})})]})}const $u=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
|
|
5701
5892
|
import { CommonComponentProps } from '../props';\r
|
|
5702
5893
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
5703
5894
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
|
|
@@ -8654,7 +8845,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8654
8845
|
</>\r
|
|
8655
8846
|
);\r
|
|
8656
8847
|
}\r
|
|
8657
|
-
`,En=["A","B","C","D","E"],Co=[...oi,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],en={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 Cu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function sr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Su(){return Object.fromEntries(En.map((e,t)=>{const n=Yt[t],r=`${e} column`;return[n,Cu(r)]}))}function $u(){const e={};for(const t of En)e[`${t}ColumnWidth`]=sr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=sr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=sr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=sr(`${t} column padding bottom`);return e}function So(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Yt]};for(const l of En)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...r,...o,...n}}function wu(e){const t={};if(e===Ot)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...oi]},enum:[...oi]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Co],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Co]}}return t[Ae(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ae(e,"textFontSettings")]={...en.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ae(e,"textFontSize")]={...en.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ae(e,"textLineHeight")]={...en.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ae(e,"textLetterSpacing")]={...en.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ae(e,"textWordSpacing")]={...en.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ae(e,"textTextAlign")]={...en.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ae(e,"textTextAppearance")]={...en.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Tu=_i.reduce((e,t)=>({...e,...wu(t)}),{});function Lu(e){return{verticalAlign:e===Ot?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Ot?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Eu(e,t={}){var n;return{...Lu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const $o=new Set(["textFontFamily","textFontSettings"]);function Pu(e,t,n){const r=l=>n===void 0?!0:n==="common"?$o.has(l):!$o.has(l),o={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ai(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ae(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ae(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(o[Ae(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ae(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ae(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ae(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ae(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ae(e,"textTextAppearance")]=t.textTextAppearance),o}function gr(e={},t){return _i.reduce((n,r)=>({...n,...Pu(r,Eu(r,e),t)}),{})}const _u=gr(),Au=nu();function xa(e){return[Ae(e,"textFontFamily"),Ae(e,"textFontSettings"),Ae(e,"textFontSize"),Ae(e,"textLineHeight"),Ae(e,"textLetterSpacing"),Ae(e,"textWordSpacing"),Ae(e,"textTextAlign"),Ae(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mu(){const e=[];return Pi.forEach((t,n)=>{const r=Yt[n],o=xa(t);for(let l=1;l<Yt.length;l+=1){const i=[{name:"columns",value:l},...Array.from({length:l},(d,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(d=>{e.push({if:i,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Iu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xa(Ot);const Ru=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],tn=[{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"}],ku=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:tn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:tn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:tn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:tn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:tn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:tn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:tn[6],link:""}],Fu=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Wu={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:{...Su(),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:ku},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"}},...$u(),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"}},...Tu,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",..._u,...gr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:So({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},...gr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:So({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},...gr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Mu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Ru.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}},...En.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",...Fu]},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__",Au]}],paletteBookmark:{items:[...Iu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Hu={element:bu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>mu(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:Wu,sourceCode:xu},wo=300,jt=.004,Nu={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"},Ou=["hover","focus","filled","success","error"];function Bu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function To(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Lo(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,r)}}function Vu(e){return`
|
|
8848
|
+
`,En=["A","B","C","D","E"],So=[...ai,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],en={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 Tu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function lr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Lu(){return Object.fromEntries(En.map((e,t)=>{const n=Xt[t],r=`${e} column`;return[n,Tu(r)]}))}function Eu(){const e={};for(const t of En)e[`${t}ColumnWidth`]=lr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=lr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=lr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=lr(`${t} column padding bottom`);return e}function wo(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Xt]};for(const l of En)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...r,...o,...n}}function Pu(e){const t={};if(e===Ot)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ai]},enum:[...ai]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...So],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...So]}}return t[Re(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Re(e,"textFontSettings")]={...en.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Re(e,"textFontSize")]={...en.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Re(e,"textLineHeight")]={...en.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Re(e,"textLetterSpacing")]={...en.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Re(e,"textWordSpacing")]={...en.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Re(e,"textTextAlign")]={...en.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Re(e,"textTextAppearance")]={...en.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Au=_i.reduce((e,t)=>({...e,...Pu(t)}),{});function _u(e){return{verticalAlign:e===Ot?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Ot?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Ru(e,t={}){var n;return{..._u(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const $o=new Set(["textFontFamily","textFontSettings"]);function Mu(e,t,n){const r=l=>n===void 0?!0:n==="common"?$o.has(l):!$o.has(l),o={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Ri(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(o[Re(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(o[Re(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(o[Re(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(o[Re(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Re(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Re(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(o[Re(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Re(e,"textTextAppearance")]=t.textTextAppearance),o}function hr(e={},t){return _i.reduce((n,r)=>({...n,...Mu(r,Ru(r,e),t)}),{})}const Iu=hr(),ku=au();function Ca(e){return[Re(e,"textFontFamily"),Re(e,"textFontSettings"),Re(e,"textFontSize"),Re(e,"textLineHeight"),Re(e,"textLetterSpacing"),Re(e,"textWordSpacing"),Re(e,"textTextAlign"),Re(e,"textTextAppearance"),`${e}VerticalAlign`]}function Fu(){const e=[];return Ai.forEach((t,n)=>{const r=Xt[n],o=Ca(t);for(let l=1;l<Xt.length;l+=1){const i=[{name:"columns",value:l},...Array.from({length:l},(d,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(d=>{e.push({if:i,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Wu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Ca(Ot);const Nu=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],tn=[{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"}],Hu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:tn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:tn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:tn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:tn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:tn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:tn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:tn[6],link:""}],Ou=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Bu={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:{...Lu(),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:Hu},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"}},...Eu(),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"}},...Au,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",...Iu,...hr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:wo({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},...hr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:wo({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},...hr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Fu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Nu.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}},...En.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",...Ou]},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__",ku]}],paletteBookmark:{items:[...Wu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Vu={element:wu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>yu(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:Bu,sourceCode:$u},To=300,jt=.004,Du={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"},zu=["hover","focus","filled","success","error"];function ju(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lo(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Eo(e,t,n,r){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:w.scalingValue((o-t)/2,r)}}function qu(e){return`
|
|
8658
8849
|
.${e}-wrapper {
|
|
8659
8850
|
box-sizing: border-box;
|
|
8660
8851
|
display: flex;
|
|
@@ -8716,7 +8907,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8716
8907
|
display: flex;
|
|
8717
8908
|
align-items: center;
|
|
8718
8909
|
justify-content: space-between;
|
|
8719
|
-
gap: ${
|
|
8910
|
+
gap: ${ju(20)};
|
|
8720
8911
|
width: 100%;
|
|
8721
8912
|
min-width: 0;
|
|
8722
8913
|
min-height: var(--${e}-question-min-height, unset);
|
|
@@ -8744,7 +8935,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8744
8935
|
width: var(--${e}-icon-max-width);
|
|
8745
8936
|
height: var(--${e}-icon-max-width);
|
|
8746
8937
|
position: relative;
|
|
8747
|
-
transition: transform ${
|
|
8938
|
+
transition: transform ${To}ms ease;
|
|
8748
8939
|
}
|
|
8749
8940
|
.${e}-icon-custom {
|
|
8750
8941
|
display: flex;
|
|
@@ -8779,7 +8970,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8779
8970
|
.${e}-panel {
|
|
8780
8971
|
display: grid;
|
|
8781
8972
|
grid-template-rows: 0fr;
|
|
8782
|
-
transition: grid-template-rows ${
|
|
8973
|
+
transition: grid-template-rows ${To}ms ease;
|
|
8783
8974
|
}
|
|
8784
8975
|
.${e}-item-open .${e}-panel {
|
|
8785
8976
|
grid-template-rows: 1fr;
|
|
@@ -8847,7 +9038,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8847
9038
|
left: 20px;
|
|
8848
9039
|
transform: translateY(-50%);
|
|
8849
9040
|
}
|
|
8850
|
-
`}function
|
|
9041
|
+
`}function Po(e,t,n,r,o,l,i,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:r,letterSpacing:o??0,wordSpacing:l??0,textAppearance:i,color:d??"#000000"}}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:l}){const{prefix:i}=w.useScopedStyles(),d=o??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:E="solid",entryHoverEffect:S="default",autoclose:$="off",icon:g,iconMaxWidth:h=.00833,iconPaddingRight:x=0,iconAnimation:f="rotate 45",questionColor:b="#000000",answerColor:y="#000000",dividerColor:H="#0000001F",iconColor:L="#000000",questionHoverColor:F="#666666",iconHoverColor:C="#666666",iconActiveColor:T="#000000",dividerHoverColor:j="#000000",questionFontFamily:P,questionFontSettings:M,questionFontSize:_,questionLineHeight:V,questionLetterSpacing:Y,questionWordSpacing:oe,questionTextAppearance:I,answerFontFamily:O,answerFontSettings:q,answerFontSize:z,answerLineHeight:R,answerLetterSpacing:G,answerWordSpacing:J,answerTextAppearance:Z,questionPaddingLeft:A=0,questionPaddingTop:ne=0,questionPaddingBottom:m=0,answerPaddingLeft:Q=0,answerPaddingRight:ye=0,answerPaddingTop:ce=0,answerPaddingBottom:xe=0}=e,re=t??[],[de,D]=c.useState(()=>new Set),U=!n||r;c.useEffect(()=>{D(new Set)},[$]),c.useEffect(()=>{n&&!o&&!r&&D(new Set)},[n,o,r]);const X=fe=>w.scalingValue(fe,n??!1),ee=Math.max(A,jt),be=Math.max(ne,jt),$e=Math.max(m,jt),Ce=Math.max(Q,jt),Le=Math.max(ye,jt),Ee=Math.max(ce,jt),B=Math.max(xe,jt),W=Math.max(0,(s??1)-x-h),v=Math.max(0,(s??1)-ye),k=Math.max(0,(s??1)-Q),N=Math.max(x,jt),K=Math.max(0,(s??1)-A-h),ae=c.useMemo(()=>de.size===0?0:Math.min(...de),[de]),se=c.useCallback(fe=>de.has(fe),[de]),he=U&&S==="default"?`${i}-entry-hover-default`:"",ge=g??"",ue=ge!=="",ke=f.replace(/^rotate /,""),le=`${i}-icon-anim-${ke}`,Se=vt(et(Po(P,M,_,V,Y,oe,I,b),n)),Me=vt(et(Po(O,q,z,R,G,J,Z,y),n)),Ie=Lo(_,V,`${i}-question`,`${i}-text-tight-leading`),Ve=Lo(z,R,`${i}-answer-text`,`${i}-text-tight-leading`),rt=Eo(_,V,i,n),lt=Eo(z,R,i,n),ct=w.buildColorVars(i,{questionColor:b,answerColor:y,dividerColor:H,iconColor:L,questionHoverColor:F,iconHoverColor:C,iconActiveColor:T,dividerHoverColor:j},Du,zu),Ct=l&&l!=="default"?`${i}-state-${l}`:"",_t=c.useCallback(fe=>{U&&D(He=>{if(He.has(fe)){const Ue=new Set(He);return Ue.delete(fe),Ue}if($==="on")return new Set([fe]);const Oe=new Set(He);return Oe.add(fe),Oe})},[U,$]),dt=c.useMemo(()=>qu(i),[i]),Rt={[`--${i}-divider-width`]:w.scalingValue(u,n??!1),[`--${i}-divider-style`]:E,[`--${i}-icon-max-width`]:w.scalingValue(h,n??!1),...p>0?{[`--${i}-question-min-height`]:w.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:dt}}),a.jsx("div",{style:ct,children:a.jsx("div",{className:_e(`${i}-wrapper`,n&&!r&&`${i}-editor`,he,Ct),style:{width:w.scalingValue(s,n??!1),maxWidth:"100%",...Rt},children:re.map((fe,He)=>{var Mt;const Oe=se(He),Ue=((Mt=fe.question)==null?void 0:Mt.trim())??"",St=fe.answer,Dt=((St==null?void 0:St.length)??0)>0,ut=d&&He===ae;return a.jsxs("div",{className:_e(`${i}-item`,Oe&&`${i}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${i}-question-controls`,children:[ut&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"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:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:X(be),zIndex:2}}),a.jsx(Ze,{"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(W),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:X(ee),height:"100%",zIndex:2}}),a.jsx(Ze,{"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(K),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:X(N),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${i}-question-button`,"aria-expanded":Oe,style:{...Se,...rt,paddingLeft:X(A),paddingRight:X(x)},onClick:()=>_t(He),children:[ne>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:X(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${i}-question-row`,children:[a.jsx("span",{className:Ie,children:Ue}),Dt&&(ue?a.jsx("span",{className:`${i}-icon ${i}-icon-custom ${le}`,"aria-hidden":"true",children:a.jsx(Ht,{url:ge,fill:L,hoverFill:C,className:`${i}-icon-image`})}):a.jsx("span",{className:`${i}-icon ${i}-icon-default ${le}`,"aria-hidden":"true"}))]}),m>0&&a.jsx("span",{className:`${i}-padding-handle`,style:{height:X(m)},"aria-hidden":"true"})]}),ut&&a.jsx(Ze,{"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:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:X($e),zIndex:2}})]}),Dt&&St&&a.jsx("div",{className:`${i}-panel`,"aria-hidden":!Oe,children:a.jsx("div",{className:`${i}-panel-inner`,children:a.jsxs("div",{className:`${i}-answer-controls`,children:[ut&&a.jsxs(a.Fragment,{children:[a.jsx(Ze,{"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:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:X(Ee),zIndex:2}}),a.jsx(Ze,{"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(v),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:X(Ce),height:"100%",zIndex:2}}),a.jsx(Ze,{"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(k),className:`${i}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:X(Le),height:"100%",zIndex:2}})]}),ce>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:X(ce)}}),a.jsx("div",{className:`${i}-answer`,style:{...Me,...lt,paddingLeft:X(Q),paddingRight:X(ye)},children:a.jsx("div",{className:Ve,children:a.jsx(xn,{content:St})})}),xe>0&&a.jsx("div",{className:`${i}-padding-handle`,style:{height:X(xe)}}),ut&&a.jsx(Ze,{"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:`${i}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:X(B),zIndex:2}})]})})})]},He)})})})]})}const Gu=`import { useCallback, useEffect, useMemo, useState } from 'react';\r
|
|
8851
9042
|
import cn from 'classnames';\r
|
|
8852
9043
|
import { CommonComponentProps } from '../props';\r
|
|
8853
9044
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -9644,4 +9835,4 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9644
9835
|
</>\r
|
|
9645
9836
|
);\r
|
|
9646
9837
|
}\r
|
|
9647
|
-
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Po={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ju=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],qu={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:qt("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:{...Po.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:{...Po.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:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("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:[...ju],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Ku={element:Du,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:qu,sourceCode:zu},Gu=[Rl,Bl,Pc,Hc,Gc,od,dd,yd,Fd,Hu,Ku];exports.components=Gu;exports.isSchemaV1=wa;
|
|
9838
|
+
`;function qt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ao={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Uu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Xu={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:qt("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:{...Ao.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:{...Ao.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:qt("Question Padding Left"),questionPaddingTop:qt("Question Padding Top"),questionPaddingBottom:qt("Question Padding Bottom"),answerPaddingLeft:qt("Answer Padding Left"),answerPaddingRight:qt("Answer Padding Right"),answerPaddingTop:qt("Answer Padding Top"),answerPaddingBottom:qt("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:[...Uu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Yu={element:Ku,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:Xu,sourceCode:Gu},Zu=[kl,Vl,Ac,Hc,Uc,ad,ud,vd,Od,Vu,Yu];exports.components=Zu;exports.isSchemaV1=Ta;
|