@cntrl-site/components 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/FAQ/FAQ.d.ts +64 -0
- package/dist/Components/FAQ/FAQComponent.d.ts +28 -0
- package/dist/Components/helpers/PaddingControl/PaddingControl.d.ts +9 -0
- package/dist/index.js +1037 -101
- package/dist/index.mjs +5400 -3507
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),d=require("react"),Ae=require("classnames"),w=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),So=require("react-dom");function ya(e){return e.type==="object"&&e.version===1}const va="ControlSlider-module__wrapper___sHEkd",ba="ControlSlider-module__hoverArrow___A-dOH",xa="ControlSlider-module__sliderItem___QQSkR",Ca="ControlSlider-module__sliderImage___9hRl-",Sa="ControlSlider-module__arrow___05ghY",$a="ControlSlider-module__arrowVertical___tBfVN",wa="ControlSlider-module__nextArrow___-30Yc",Ta="ControlSlider-module__arrowInner___aEra3",La="ControlSlider-module__arrowIcon___S4ztF",Ea="ControlSlider-module__arrowImg___2dwJW",Pa="ControlSlider-module__mirror___brd6U",_a="ControlSlider-module__pagination___bicLF",Aa="ControlSlider-module__paginationInner___bT-P-",Ia="ControlSlider-module__paginationVertical___zYqKw",Ra="ControlSlider-module__paginationItem___nTRbk",ka="ControlSlider-module__dot___p1Qun",Wa="ControlSlider-module__activeDot___LHFaj",Ma="ControlSlider-module__paginationInsideBottom___R3FWn",Fa="ControlSlider-module__paginationInsideTop___V-qb-",Na="ControlSlider-module__paginationOutsideBottom___14w8D",Ha="ControlSlider-module__paginationOutsideTop___SCLqB",Oa="ControlSlider-module__paginationInsideLeft___yOBRZ",Ba="ControlSlider-module__paginationInsideRight___Rtt3o",Va="ControlSlider-module__paginationOutsideLeft___lahaw",Da="ControlSlider-module__paginationOutsideRight___EtuQa",za="ControlSlider-module__imgWrapper___UjEgB",ja="ControlSlider-module__captionBlock___dJ6-j",Ka="ControlSlider-module__captionTextWrapper___HFlpf",qa="ControlSlider-module__captionText___uGBVc",Ua="ControlSlider-module__active___WZK4G",Ga="ControlSlider-module__withPointerEvents___t-18M",Ya="ControlSlider-module__topLeftAlignment___zjnGM",Xa="ControlSlider-module__topCenterAlignment___gD1xW",Za="ControlSlider-module__topRightAlignment___NMapS",Ja="ControlSlider-module__middleLeftAlignment___OnUrY",Qa="ControlSlider-module__middleCenterAlignment___Tdkl0",es="ControlSlider-module__middleRightAlignment___wEbfX",ts="ControlSlider-module__bottomLeftAlignment___cTP2-",ns="ControlSlider-module__bottomCenterAlignment___c54fB",rs="ControlSlider-module__bottomRightAlignment___kEwrz",is="ControlSlider-module__clickOverlay___DZA28",os="ControlSlider-module__contain___pLyq7",as="ControlSlider-module__cover___KdDat",le={wrapper:va,hoverArrow:ba,sliderItem:xa,sliderImage:Ca,arrow:Sa,arrowVertical:$a,nextArrow:wa,arrowInner:Ta,arrowIcon:La,arrowImg:Ea,mirror:Pa,pagination:_a,paginationInner:Aa,paginationVertical:Ia,paginationItem:Ra,dot:ka,activeDot:Wa,paginationInsideBottom:Ma,paginationInsideTop:Fa,paginationOutsideBottom:Na,paginationOutsideTop:Ha,paginationInsideLeft:Oa,paginationInsideRight:Ba,paginationOutsideLeft:Va,paginationOutsideRight:Da,imgWrapper:za,captionBlock:ja,captionTextWrapper:Ka,captionText:qa,active:Ua,withPointerEvents:Ga,topLeftAlignment:Ya,topCenterAlignment:Xa,topRightAlignment:Za,middleLeftAlignment:Ja,middleCenterAlignment:Qa,middleRightAlignment:es,bottomLeftAlignment:ts,bottomCenterAlignment:ns,bottomRightAlignment:rs,clickOverlay:is,contain:os,cover:as};function ss(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 ls(e,t,n){return t&&ss(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Wi="(prefers-reduced-motion: reduce)",un=1,cs=2,gn=3,xn=4,Vn=5,ar=6,mr=7,ds={CREATED:un,MOUNTED:cs,IDLE:gn,MOVING:xn,SCROLLING:Vn,DRAGGING:ar,DESTROYED:mr};function kt(e){e.length=0}function Dt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Dt(arguments,1)))}var $o=setTimeout,Gr=function(){};function Mi(e){return requestAnimationFrame(e)}function br(e,t){return typeof t===e}function An(e){return!oi(e)&&br("object",e)}var ii=Array.isArray,wo=Ne(br,"function"),Ot=Ne(br,"string"),Dn=Ne(br,"undefined");function oi(e){return e===null}function To(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function zn(e){return ii(e)?e:[e]}function gt(e,t){zn(e).forEach(t)}function ai(e,t){return e.indexOf(t)>-1}function sr(e,t){return e.push.apply(e,zn(t)),e}function _t(e,t,n){e&>(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function St(e,t){_t(e,Ot(t)?t.split(" "):t,!0)}function jn(e,t){gt(t,e.appendChild.bind(e))}function si(e,t){gt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function In(e,t){return To(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Lo(e,t){var n=e?Dt(e.children):[];return t?n.filter(function(r){return In(r,t)}):n}function Kn(e,t){return t?Lo(e,t)[0]:e.firstElementChild}var Rn=Object.keys;function Zt(e,t,n){return e&&(n?Rn(e).reverse():Rn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function kn(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){e[r]=t[r]})}),e}function Nt(e){return Dt(arguments,1).forEach(function(t){Zt(t,function(n,r){ii(n)?e[r]=n.slice():An(n)?e[r]=Nt({},An(e[r])?e[r]:{},n):e[r]=n})}),e}function Fi(e,t){gt(t||Rn(e),function(n){delete e[n]})}function $t(e,t){gt(e,function(n){gt(t,function(r){n&&n.removeAttribute(r)})})}function ye(e,t,n){An(t)?Zt(t,function(r,i){ye(e,i,r)}):gt(e,function(r){oi(n)||n===""?$t(r,t):r.setAttribute(t,String(n))})}function pn(e,t,n){var r=document.createElement(e);return t&&(Ot(t)?St(r,t):ye(r,t)),n&&jn(n,r),r}function ht(e,t,n){if(Dn(n))return getComputedStyle(e)[t];oi(n)||(e.style[t]=""+n)}function Wn(e,t){ht(e,"display",t)}function Eo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ft(e,t){return e.getAttribute(t)}function Ni(e,t){return e&&e.classList.contains(t)}function ut(e){return e.getBoundingClientRect()}function Jt(e){gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return Kn(new DOMParser().parseFromString(e,"text/html").body)}function Pt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function _o(e,t){return e&&e.querySelector(t)}function li(e,t){return t?Dt(e.querySelectorAll(t)):[]}function At(e,t){_t(e,t,!1)}function Yr(e){return e.timeStamp}function Gt(e){return Ot(e)?e:e?e+"px":""}var qn="splide",ci="data-"+qn;function En(e,t){if(!e)throw new Error("["+qn+"] "+(t||""))}var Bt=Math.min,gr=Math.max,hr=Math.floor,Mn=Math.ceil,tt=Math.abs;function Ao(e,t,n){return tt(e-t)<n}function lr(e,t,n,r){var i=Bt(t,n),a=gr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function ln(e,t,n){var r=Bt(t,n),i=gr(t,n);return Bt(gr(r,e),i)}function Xr(e){return+(e>0)-+(e<0)}function Zr(e,t){return gt(t,function(n){e=e.replace("%s",""+n)}),e}function di(e){return e<10?"0"+e:""+e}var Hi={};function us(e){return""+e+di(Hi[e]=(Hi[e]||0)+1)}function Io(){var e=[];function t(s,c,o,p){i(s,c,function(u,T,y){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,o,p):u.removeListener.bind(u,o);f?u.addEventListener(T,o,p):u.addListener(o),e.push([u,T,y,o,m])})}function n(s,c,o){i(s,c,function(p,u,T){e=e.filter(function(y){return y[0]===p&&y[1]===u&&y[2]===T&&(!o||y[3]===o)?(y[4](),!1):!0})})}function r(s,c,o){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:o}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,o)),s.dispatchEvent(p),p}function i(s,c,o){gt(s,function(p){p&>(c,function(u){u.split(" ").forEach(function(T){var y=T.split(".");o(p,y[0],y[1])})})})}function a(){e.forEach(function(s){s[4]()}),kt(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var zt="mounted",Jr="ready",Wt="move",Cn="moved",ui="click",Ro="active",ko="inactive",Wo="visible",Mo="hidden",De="refresh",Je="updated",hn="resize",xr="resized",Fo="drag",No="dragging",Ho="dragged",Cr="scroll",en="scrolled",ps="overflow",pi="destroy",Oo="arrows:mounted",Bo="arrows:updated",Vo="pagination:mounted",Do="pagination:updated",mi="navigation:mounted",gi="autoplay:play",zo="autoplay:playing",hi="autoplay:pause",fi="lazyload:loaded",jo="sk",Ko="sh",fr="ei";function He(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Io();function r(a,s){n.bind(t,zn(a).join(" "),function(c){s.apply(s,ii(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Dt(arguments,1))}return e&&e.event.on(pi,n.destroy),kn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:i})}function Sr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,p=0;function u(){if(!o){if(s=e?Bt((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++p>=r))return y();c=Mi(u)}}function T(C){C||m(),a=i()-(C?s*e:0),o=!1,c=Mi(u)}function y(){o=!0}function f(){a=i(),s=0,n&&n(s)}function m(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function g(C){e=C}function $(){return o}return{start:T,rewind:f,pause:y,cancel:m,set:g,isPaused:$}}function ms(e){var t=e;function n(i){t=i}function r(i){return ai(zn(i),t)}return{set:n,is:r}}function gs(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hs(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=Io(),c=[];function o(){var m=n.mediaQuery==="min";Rn(i).sort(function(g,$){return m?+g-+$:+$-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(a,Wi),T()}function p(m){m&&s.destroy()}function u(m,g){var $=matchMedia(g);s.bind($,"change",T),c.push([m,$])}function T(){var m=r.is(mr),g=n.direction,$=c.reduce(function(C,S){return Nt(C,S[1].matches?S[0]:{})},{});Fi(n),f($),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function y(m){matchMedia(Wi).matches&&(m?Nt(n,a):Fi(n,Rn(a)))}function f(m,g,$){Nt(n,m),g&&Nt(Object.getPrototypeOf(n),m),($||!r.is(un))&&e.emit(Je,n)}return{setup:o,destroy:p,reduce:y,set:f}}var $r="Arrow",wr=$r+"Left",Tr=$r+"Right",qo=$r+"Up",Uo=$r+"Down",Oi="rtl",Lr="ttb",Mr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[qo,Tr],ArrowRight:[Uo,wr]};function fs(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Oi&&!s?1:c===Lr?0:-1;return Mr[a]&&Mr[a][o]||a.replace(/width|left|right/i,function(p,u){var T=Mr[p.toLowerCase()][o]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Oi?1:-1)}return{resolve:r,orient:i}}var It="role",mn="tabindex",ys="disabled",yt="aria-",Un=yt+"controls",Go=yt+"current",Bi=yt+"selected",pt=yt+"label",yi=yt+"labelledby",Yo=yt+"hidden",vi=yt+"orientation",Fn=yt+"roledescription",Vi=yt+"live",Di=yt+"busy",zi=yt+"atomic",bi=[It,mn,ys,Un,Go,pt,yi,Yo,vi,Fn],wt=qn+"__",jt="is-",Fr=qn,ji=wt+"track",vs=wt+"list",Er=wt+"slide",Xo=Er+"--clone",bs=Er+"__container",xi=wt+"arrows",Pr=wt+"arrow",Zo=Pr+"--prev",Jo=Pr+"--next",_r=wt+"pagination",Qo=_r+"__page",xs=wt+"progress",Cs=xs+"__bar",Ss=wt+"toggle",$s=wt+"spinner",ws=wt+"sr",Ts=jt+"initialized",Qt=jt+"active",ea=jt+"prev",ta=jt+"next",Qr=jt+"visible",ei=jt+"loading",na=jt+"focus-in",ra=jt+"overflow",Ls=[Qt,Qr,ea,ta,ei,na,ra],Es={slide:Er,clone:Xo,arrows:xi,arrow:Pr,prev:Zo,next:Jo,pagination:_r,page:Qo,spinner:$s};function Ps(e,t){if(wo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!In(n,t);)n=n.parentElement;return n}var _s=5,Ki=200,ia="touchstart mousedown",Nr="touchmove mousemove",Hr="touchend touchcancel mouseup click";function As(e,t,n){var r=He(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},p=[],u=[],T=[],y,f,m;function g(){v(),M(),S()}function $(){i(De,C),i(De,g),i(Je,S),a(document,ia+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),a(s,"focusin",function(){_t(s,na,!!m)})}function C(b){var E=bi.concat("style");kt(p),At(s,u),At(y,T),$t([y,f],E),$t(s,b?E:["style",Fn])}function S(){At(s,u),At(y,T),u=N(Fr),T=N(ji),St(s,u),St(y,T),ye(s,pt,n.label),ye(s,yi,n.labelledby)}function v(){y=L("."+ji),f=Kn(y,"."+vs),En(y&&f,"A track/list element is missing."),sr(p,Lo(f,"."+Er+":not(."+Xo+")")),Zt({arrows:xi,pagination:_r,prev:Zo,next:Jo,bar:Cs,toggle:Ss},function(b,E){o[E]=L("."+b)}),kn(o,{root:s,track:y,list:f,slides:p})}function M(){var b=s.id||us(qn),E=n.role;s.id=b,y.id=y.id||b+"-track",f.id=f.id||b+"-list",!ft(s,It)&&s.tagName!=="SECTION"&&E&&ye(s,It,E),ye(s,Fn,c.carousel),ye(f,It,"presentation")}function L(b){var E=_o(s,b);return E&&Ps(E,"."+Fr)===s?E:void 0}function N(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Fr&&Qt]}return kn(o,{setup:g,mount:$,destroy:C})}var fn="slide",Sn="loop",Gn="fade";function Is(e,t,n,r){var i=He(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,p=e.root,u=e.options,T=u.isNavigation,y=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,$=o.Direction.resolve,C=ft(r,"style"),S=ft(r,pt),v=n>-1,M=Kn(r,"."+bs),L;function N(){v||(r.id=p.id+"-slide"+di(t+1),ye(r,It,m?"tabpanel":"group"),ye(r,Fn,f.slide),ye(r,pt,S||Zr(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",Ne(s,ui,D)),c(r,"keydown",Ne(s,jo,D)),a([Cn,Ko,en],P),a(mi,B),y&&a(Wt,x)}function E(){L=!0,i.destroy(),At(r,Ls),$t(r,bi),ye(r,"style",C),ye(r,pt,S||"")}function B(){var O=e.splides.map(function(I){var q=I.splide.Components.Slides.getAt(t);return q?q.slide.id:""}).join(" ");ye(r,pt,Zr(f.slideX,(v?n:t)+1)),ye(r,Un,O),ye(r,It,g?"button":""),g&&$t(r,Fn)}function x(){L||P()}function P(){if(!L){var O=e.index;A(),F(),_t(r,ea,t===O-1),_t(r,ta,t===O+1)}}function A(){var O=ee();O!==Ni(r,Qt)&&(_t(r,Qt,O),ye(r,Go,T&&O||""),s(O?Ro:ko,D))}function F(){var O=k(),I=!O&&(!ee()||v);if(e.state.is([xn,Vn])||ye(r,Yo,I||""),ye(li(r,u.focusableNodes||""),mn,I?-1:""),g&&ye(r,mn,I?-1:0),O!==Ni(r,Qr)&&(_t(r,Qr,O),s(O?Wo:Mo,D)),!O&&document.activeElement===r){var q=o.Slides.getAt(e.index);q&&Eo(q.slide)}}function j(O,I,q){ht(q&&M||r,O,I)}function ee(){var O=e.index;return O===t||u.cloneStatus&&O===n}function k(){if(e.is(Gn))return ee();var O=ut(o.Elements.track),I=ut(r),q=$("left",!0),X=$("right",!0);return hr(O[q])<=Mn(I[q])&&hr(I[X])<=Mn(O[X])}function W(O,I){var q=tt(O-t);return!v&&(u.rewind||e.is(Sn))&&(q=Bt(q,e.length-q)),q<=I}var D={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:N,destroy:E,update:P,style:j,isWithin:W};return D}function Rs(e,t,n){var r=He(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,p=c.list,u=[];function T(){y(),i(De,f),i(De,y)}function y(){o.forEach(function(P,A){g(P,A,-1)})}function f(){L(function(P){P.destroy()}),kt(u)}function m(){L(function(P){P.update()})}function g(P,A,F){var j=Is(e,A,F,P);j.mount(),u.push(j),u.sort(function(ee,k){return ee.index-k.index})}function $(P){return P?N(function(A){return!A.isClone}):u}function C(P){var A=t.Controller,F=A.toIndex(P),j=A.hasFocus()?1:n.perPage;return N(function(ee){return lr(ee.index,F,F+j-1)})}function S(P){return N(P)[0]}function v(P,A){gt(P,function(F){if(Ot(F)&&(F=Po(F)),To(F)){var j=o[A];j?si(F,j):jn(p,F),St(F,n.classes.slide),E(F,Ne(a,hn))}}),a(De)}function M(P){Jt(N(P).map(function(A){return A.slide})),a(De)}function L(P,A){$(A).forEach(P)}function N(P){return u.filter(wo(P)?P:function(A){return Ot(P)?In(A.slide,P):ai(zn(P),A.index)})}function b(P,A,F){L(function(j){j.style(P,A,F)})}function E(P,A){var F=li(P,"img"),j=F.length;j?F.forEach(function(ee){s(ee,"load error",function(){--j||A()})}):A()}function B(P){return P?o.length:u.length}function x(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:$,getIn:C,getAt:S,add:v,remove:M,forEach:L,filter:N,style:b,getLength:B,isEnough:x}}function ks(e,t,n){var r=He(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,y=p.list,f=c.getAt,m=c.style,g,$,C;function S(){v(),a(window,"resize load",gs(Ne(s,hn))),i([Je,De],v),i(hn,M)}function v(){g=n.direction===Lr,ht(u,"maxWidth",Gt(n.width)),ht(T,o("paddingLeft"),L(!1)),ht(T,o("paddingRight"),L(!0)),M(!0)}function M(D){var O=ut(u);(D||$.width!==O.width||$.height!==O.height)&&(ht(T,"height",N()),m(o("marginRight"),Gt(n.gap)),m("width",E()),m("height",B(),!0),$=O,s(xr),C!==(C=W())&&(_t(u,ra,C),s(ps,C)))}function L(D){var O=n.padding,I=o(D?"right":"left");return O&&Gt(O[I]||(An(O)?0:O))||"0px"}function N(){var D="";return g&&(D=b(),En(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return Gt(n.height||ut(y).width*n.heightRatio)}function E(){return n.autoWidth?null:Gt(n.fixedWidth)||(g?"":x())}function B(){return Gt(n.fixedHeight)||(g?n.autoHeight?null:x():b())}function x(){var D=Gt(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function P(){return ut(y)[o("width")]}function A(D,O){var I=f(D||0);return I?ut(I.slide)[o("width")]+(O?0:ee()):0}function F(D,O){var I=f(D);if(I){var q=ut(I.slide)[o("right")],X=ut(y)[o("left")];return tt(q-X)+(O?0:ee())}return 0}function j(D){return F(e.length-1)-F(0)+A(0,D)}function ee(){var D=f(0);return D&&parseFloat(ht(D.slide,o("marginRight")))||0}function k(D){return parseFloat(ht(T,o("padding"+(D?"Right":"Left"))))||0}function W(){return e.is(Gn)||j(!0)>P()}return{mount:S,resize:M,listSize:P,slideSize:A,sliderSize:j,totalSize:F,getPadding:k,isOverflow:W}}var Ws=2;function Ms(e,t,n){var r=He(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],p;function u(){i(De,T),i([Je,hn],f),(p=$())&&(m(p),t.Layout.resize(!0))}function T(){y(),u()}function y(){Jt(o),kt(o),r.destroy()}function f(){var C=$();p!==C&&(p<C||!C)&&r.emit(De)}function m(C){var S=s.get().slice(),v=S.length;if(v){for(;S.length<C;)sr(S,S);sr(S.slice(-C),S.slice(0,C)).forEach(function(M,L){var N=L<C,b=g(M.slide,L);N?si(b,S[0].slide):jn(a.list,b),sr(o,b),s.register(b,L-C+(N?0:v),M.index)})}}function g(C,S){var v=C.cloneNode(!0);return St(v,n.classes.clone),v.id=e.root.id+"-clone"+di(S+1),v}function $(){var C=n.clones;if(!e.is(Sn))C=0;else if(Dn(C)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&Mn(ut(a.track)[c("width")]/S);C=v||n[c("autoWidth")]&&e.length||n.perPage*Ws}return C}return{mount:u,destroy:y}}function Fs(e,t,n){var r=He(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,y=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,$=t.Elements,C=$.list,S=$.track,v;function M(){v=t.Transition,i([zt,xr,Je,De],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function N(I,q,X,J){I!==q&&D(I>X)&&(P(),E(x(j(),I>X),!0)),s(xn),a(Wt,q,X,I),v.start(q,function(){s(gn),a(Cn,q,X,I),J&&J()})}function b(I){E(F(I,!0))}function E(I,q){if(!e.is(Gn)){var X=q?I:B(I);ht(C,"transform","translate"+m("X")+"("+X+"px)"),I!==X&&a(Ko)}}function B(I){if(e.is(Sn)){var q=A(I),X=q>t.Controller.getEnd(),J=q<0;(J||X)&&(I=x(I,X))}return I}function x(I,q){var X=I-W(q),J=y();return I-=g(J*(Mn(tt(X)/J)||1))*(q?1:-1),I}function P(){E(j(),!0),v.cancel()}function A(I){for(var q=t.Slides.get(),X=0,J=1/0,R=0;R<q.length;R++){var ne=q[R].index,h=tt(F(ne,!0)-I);if(h<=J)J=h,X=ne;else break}return X}function F(I,q){var X=g(u(I-1)-k(I));return q?ee(X):X}function j(){var I=m("left");return ut(C)[I]-ut(S)[I]+g(p(!1))}function ee(I){return n.trimSpace&&e.is(fn)&&(I=ln(I,0,g(y(!0)-T()))),I}function k(I){var q=n.focus;return q==="center"?(T()-o(I,!0))/2:+q*o(I)||0}function W(I){return F(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var q=g(x(j(),I));return I?q>=0:q<=C[m("scrollWidth")]-ut(S)[m("width")]}function O(I,q){q=Dn(q)?j():q;var X=I!==!0&&g(q)<g(W(!1)),J=I!==!1&&g(q)>g(W(!0));return X||J}return{mount:M,move:N,jump:b,translate:E,shift:x,cancel:P,toIndex:A,toPosition:F,getPosition:j,getLimit:W,exceededLimit:O,reposition:L}}function Ns(e,t,n){var r=He(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,p=s.toPosition,u=t.Slides,T=u.isEnough,y=u.getLength,f=n.omitEnd,m=e.is(Sn),g=e.is(fn),$=Ne(j,!1),C=Ne(j,!0),S=n.start||0,v,M=S,L,N,b;function E(){B(),i([Je,De,fr],B),i(xr,x)}function B(){L=y(!0),N=n.perMove,b=n.perPage,v=D();var h=ln(S,0,f?v:L-1);h!==S&&(S=h,s.reposition())}function x(){v!==D()&&a(fr)}function P(h,te,ve){if(!ne()){var ce=F(h),xe=W(ce);xe>-1&&(te||xe!==S)&&(X(xe),s.move(ce,xe,M,ve))}}function A(h,te,ve,ce){t.Scroll.scroll(h,te,ve,function(){var xe=W(s.toIndex(c()));X(f?Bt(xe,v):xe),ce&&ce()})}function F(h){var te=S;if(Ot(h)){var ve=h.match(/([+\-<>])(\d+)?/)||[],ce=ve[1],xe=ve[2];ce==="+"||ce==="-"?te=ee(S+ +(""+ce+(+xe||1)),S):ce===">"?te=xe?O(+xe):$(!0):ce==="<"&&(te=C(!0))}else te=m?h:ln(h,0,v);return te}function j(h,te){var ve=N||(R()?1:b),ce=ee(S+ve*(h?-1:1),S,!(N||R()));return ce===-1&&g&&!Ao(c(),o(!h),1)?h?0:v:te?ce:W(ce)}function ee(h,te,ve){if(T()||R()){var ce=k(h);ce!==h&&(te=h,h=ce,ve=!1),h<0||h>v?!N&&(lr(0,h,te,!0)||lr(v,te,h,!0))?h=O(I(h)):m?h=ve?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ve&&h!==te&&(h=O(I(te)+(h<te?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var te=c();te===p(h,!0)&&lr(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function W(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&N?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return ln(h,0,L-1)}function O(h){return ln(R()?h:b*h,0,v)}function I(h){return R()?Bt(h,v):hr((h>=v?L-1:h)/b)}function q(h){var te=s.toIndex(h);return g?ln(te,0,v):te}function X(h){h!==S&&(M=S,S=h)}function J(h){return h?M:S}function R(){return!Dn(n.focus)||n.isNavigation}function ne(){return e.state.is([xn,Vn])&&!!n.waitForTransition}return{mount:E,go:P,scroll:A,getNext:$,getPrev:C,getAdjacent:j,getEnd:D,setIndex:X,getIndex:J,toIndex:O,toPage:I,toDest:q,hasFocus:R,isBusy:ne}}var Hs="http://www.w3.org/2000/svg",Os="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",Qn=40;function Bs(e,t,n){var r=He(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,y=p.track,f=T,m=p.prev,g=p.next,$,C,S={};function v(){L(),i(Je,M)}function M(){N(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&B(),m&&g&&(kn(S,{prev:m,next:g}),Wn(f,A?"":"none"),St(f,C=xi+"--"+n.direction),A&&(b(),P(),ye([m,g],Un,y.id),s(Oo,m,g)))}function N(){r.destroy(),At(f,C),$?(Jt(T?[m,g]:f),m=g=null):$t([m,g],bi)}function b(){i([zt,Cn,De,en,fr],P),a(g,"click",Ne(E,">")),a(m,"click",Ne(E,"<"))}function E(A){u.go(A,!0)}function B(){f=T||pn("div",c.arrows),m=x(!0),g=x(!1),$=!0,jn(f,[m,g]),!T&&si(f,y)}function x(A){var F='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Hs+'" viewBox="0 0 '+Qn+" "+Qn+'" width="'+Qn+'" height="'+Qn+'" focusable="false"><path d="'+(n.arrowPath||Os)+'" />';return Po(F)}function P(){if(m&&g){var A=e.index,F=u.getPrev(),j=u.getNext(),ee=F>-1&&A<F?o.last:o.prev,k=j>-1&&A>j?o.first:o.next;m.disabled=F<0,g.disabled=j<0,ye(m,pt,ee),ye(g,pt,k),s(Bo,m,g,F,j)}}return{arrows:S,mount:v,destroy:N,update:P}}var Vs=ci+"-interval";function Ds(e,t,n){var r=He(e),i=r.on,a=r.bind,s=r.emit,c=Sr(n.interval,e.go.bind(e,">"),b),o=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,y=u.toggle,f=n.autoplay,m,g,$=f==="pause";function C(){f&&(S(),y&&ye(y,Un,p.track.id),$||v(),N())}function S(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(B){m=B.type==="mouseenter",L()}),n.pauseOnFocus&&a(T,"focusin focusout",function(B){g=B.type==="focusin",L()}),y&&a(y,"click",function(){$?v():M(!0)}),i([Wt,Cr,De],c.rewind),i(Wt,E)}function v(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=$=!1,N(),s(gi))}function M(B){B===void 0&&(B=!0),$=!!B,N(),o()||(c.pause(),s(hi))}function L(){$||(m||g?M(!1):v())}function N(){y&&(_t(y,Qt,!$),ye(y,pt,n.i18n[$?"play":"pause"]))}function b(B){var x=p.bar;x&&ht(x,"width",B*100+"%"),s(zo,B)}function E(B){var x=t.Slides.getAt(B);c.set(x&&+ft(x.slide,Vs)||n.interval)}return{mount:C,destroy:c.cancel,play:v,pause:M,isPaused:o}}function zs(e,t,n){var r=He(e),i=r.on;function a(){n.cover&&(i(fi,Ne(c,!0)),i([zt,Je,De],Ne(s,!0)))}function s(o){t.Slides.forEach(function(p){var u=Kn(p.container||p.slide,"img");u&&u.src&&c(o,u,p)})}function c(o,p,u){u.style("background",o?'center/cover no-repeat url("'+p.src+'")':"",!0),Wn(p,o?"none":"")}return{mount:a,destroy:Ne(s,!1)}}var js=10,Ks=600,qs=.6,Us=1.5,Gs=800;function Ys(e,t,n){var r=He(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,y=e.is(fn),f,m,g=1;function $(){i(Wt,M),i([Je,De],L)}function C(b,E,B,x,P){var A=o();if(M(),B&&(!y||!u())){var F=t.Layout.sliderSize(),j=Xr(b)*F*hr(tt(b)/F)||0;b=c.toPosition(t.Controller.toDest(b%F))+j}var ee=Ao(A,b,1);g=1,E=ee?0:E||gr(tt(b-A)/Us,Gs),m=x,f=Sr(E,S,Ne(v,A,b,P),1),s(Vn),a(Cr),f.start()}function S(){s(gn),m&&m(),a(en)}function v(b,E,B,x){var P=o(),A=b+(E-b)*N(x),F=(A-P)*g;T(P+F),y&&!B&&u()&&(g*=qs,tt(F)<js&&C(p(u(!0)),Ks,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),S())}function N(b){var E=n.easingFunc;return E?E(b):1-Math.pow(1-b,4)}return{mount:$,destroy:M,scroll:C,cancel:L}}var cn={passive:!1,capture:!0};function Xs(e,t,n){var r=He(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,p=t.Move,u=t.Scroll,T=t.Controller,y=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,$=m.orient,C=p.getPosition,S=p.exceededLimit,v,M,L,N,b,E=!1,B,x,P;function A(){s(y,Nr,Gr,cn),s(y,Hr,Gr,cn),s(y,ia,j,cn),s(y,"click",W,{capture:!0}),s(y,"dragstart",Pt),i([zt,Je],F)}function F(){var V=n.drag;de(!V),N=V==="free"}function j(V){if(B=!1,!x){var U=xe(V);ce(V.target)&&(U||!V.button)&&(T.isBusy()?Pt(V,!0):(P=U?y:window,b=o.is([xn,Vn]),L=null,s(P,Nr,ee,cn),s(P,Hr,k,cn),p.cancel(),u.cancel(),D(V)))}}function ee(V){if(o.is(ar)||(o.set(ar),a(Fo)),V.cancelable)if(b){p.translate(v+ve(R(V)));var U=ne(V)>Ki,Q=E!==(E=S());(U||Q)&&D(V),B=!0,a(No),Pt(V)}else q(V)&&(b=I(V),Pt(V))}function k(V){o.is(ar)&&(o.set(gn),a(Ho)),b&&(O(V),Pt(V)),c(P,Nr,ee),c(P,Hr,k),b=!1}function W(V){!x&&B&&Pt(V,!0)}function D(V){L=M,M=V,v=C()}function O(V){var U=X(V),Q=J(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(Q,0,n.snap):e.is(Gn)?T.go($(Xr(U))<0?se?"<":"-":se?">":"+"):e.is(fn)&&E&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(Q),!0),f(!0)}function I(V){var U=n.dragMinThreshold,Q=An(U),se=Q&&U.mouse||0,ge=(Q?U.touch:+U)||10;return tt(R(V))>(xe(V)?ge:se)}function q(V){return tt(R(V))>tt(R(V,!0))}function X(V){if(e.is(Sn)||!E){var U=ne(V);if(U&&U<Ki)return R(V)/U}return 0}function J(V){return C()+Xr(V)*Bt(tt(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return te(V,U)-te(h(V),U)}function ne(V){return Yr(V)-Yr(h(V))}function h(V){return M===V&&L||M}function te(V,U){return(xe(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ve(V){return V/(E&&e.is(fn)?_s:1)}function ce(V){var U=n.noDrag;return!In(V,"."+Qo+", ."+Pr)&&(!U||!In(V,U))}function xe(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function de(V){x=V}return{mount:A,disable:de,isDragging:re}}var Zs={Spacebar:" ",Right:Tr,Left:wr,Up:qo,Down:Uo};function Ci(e){return e=Ot(e)?e:e.key,Zs[e]||e}var qi="keydown";function Js(e,t,n){var r=He(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,p,u;function T(){y(),i(Je,f),i(Je,y),i(Wt,g)}function y(){var C=n.keyboard;C&&(p=C==="global"?window:c,a(p,qi,$))}function f(){s(p,qi)}function m(C){u=C}function g(){var C=u;u=!0,$o(function(){u=C})}function $(C){if(!u){var S=Ci(C);S===o(wr)?e.go("<"):S===o(Tr)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var Pn=ci+"-lazy",cr=Pn+"-srcset",Qs="["+Pn+"], ["+cr+"]";function el(e,t,n){var r=He(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",p=[Cn,en],u=[];function T(){n.lazyLoad&&(y(),i(De,y))}function y(){kt(u),f(),o?C():(a(p),i(p,m),m())}function f(){t.Slides.forEach(function(S){li(S.slide,Qs).forEach(function(v){var M=ft(v,Pn),L=ft(v,cr);if(M!==v.src||L!==v.srcset){var N=n.classes.spinner,b=v.parentElement,E=Kn(b,"."+N)||pn("span",N,b);u.push([v,S,E]),v.src||Wn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||a(p)}function g(S){var v=S[0];St(S[1].slide,ei),s(v,"load error",Ne($,S)),ye(v,"src",ft(v,Pn)),ye(v,"srcset",ft(v,cr)),$t(v,Pn),$t(v,cr)}function $(S,v){var M=S[0],L=S[1];At(L.slide,ei),v.type!=="error"&&(Jt(S[2]),Wn(M,""),c(fi,M,L),c(hn)),o&&C()}function C(){u.length&&g(u.shift())}return{mount:T,destroy:Ne(kt,u),check:m}}function tl(e,t,n){var r=He(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,y=p.go,f=t.Direction.resolve,m=o.pagination,g=[],$,C;function S(){v(),i([Je,De,fr],S);var x=n.pagination;m&&Wn(m,x?"":"none"),x&&(i([Wt,Cr,en],B),M(),B(),a(Vo,{list:$,items:g},E(e.index)))}function v(){$&&(Jt(m?Dt($.children):$),At($,C),kt(g),$=null),r.destroy()}function M(){var x=e.length,P=n.classes,A=n.i18n,F=n.perPage,j=u()?p.getEnd()+1:Mn(x/F);$=m||pn("ul",P.pagination,o.track.parentElement),St($,C=_r+"--"+b()),ye($,It,"tablist"),ye($,pt,A.select),ye($,vi,b()===Lr?"vertical":"");for(var ee=0;ee<j;ee++){var k=pn("li",null,$),W=pn("button",{class:P.page,type:"button"},k),D=c.getIn(ee).map(function(I){return I.slide.id}),O=!u()&&F>1?A.pageX:A.slideX;s(W,"click",Ne(L,ee)),n.paginationKeyboard&&s(W,"keydown",Ne(N,ee)),ye(k,It,"presentation"),ye(W,It,"tab"),ye(W,Un,D.join(" ")),ye(W,pt,Zr(O,ee+1)),ye(W,mn,-1),g.push({li:k,button:W,page:ee})}}function L(x){y(">"+x,!0)}function N(x,P){var A=g.length,F=Ci(P),j=b(),ee=-1;F===f(Tr,!1,j)?ee=++x%A:F===f(wr,!1,j)?ee=(--x+A)%A:F==="Home"?ee=0:F==="End"&&(ee=A-1);var k=g[ee];k&&(Eo(k.button),y(">"+ee),Pt(P,!0))}function b(){return n.paginationDirection||n.direction}function E(x){return g[p.toPage(x)]}function B(){var x=E(T(!0)),P=E(T());if(x){var A=x.button;At(A,Qt),$t(A,Bi),ye(A,mn,-1)}if(P){var F=P.button;St(F,Qt),ye(F,Bi,!0),ye(F,mn,"")}a(Do,{list:$,items:g},x,P)}return{items:g,mount:S,destroy:v,getAt:E,update:B}}var nl=[" ","Enter"];function rl(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){a.forEach(function(m){m.destroy()}),kt(a)}function o(){c(),s()}function p(m,g){var $=He(m);$.on(Wt,function(C,S,v){g.go(g.is(Sn)?v:C)}),a.push($)}function u(){var m=He(e),g=m.on;g(ui,y),g(jo,f),g([zt,Je],T),a.push(m),m.emit(mi,e.splides)}function T(){ye(t.Elements.list,vi,n.direction===Lr?"vertical":"")}function y(m){e.go(m.index)}function f(m,g){ai(nl,Ci(g))&&(y(m),Pt(g))}return{setup:Ne(t.Media.set,{slideFocus:Dn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function il(e,t,n){var r=He(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,cn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,y=Yr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;tt(u)>f&&y-a>m&&(e.go(T?"<":">"),a=y),o(T)&&Pt(p)}}function o(p){return!n.releaseWheel||e.state.is(xn)||t.Controller.getAdjacent(p)!==-1}return{mount:s}}var ol=90;function al(e,t,n){var r=He(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=pn("span",ws),o=Sr(ol,Ne(u,!1));function p(){s&&(y(!t.Autoplay.isPaused()),ye(a,zi,!0),c.textContent="…",i(gi,Ne(y,!0)),i(hi,Ne(y,!1)),i([Cn,en],Ne(u,!0)))}function u(f){ye(a,Di,f),f?(jn(a,c),o.start()):(Jt(c),o.cancel())}function T(){$t(a,[Vi,zi,Di]),Jt(c)}function y(f){s&&ye(a,Vi,f?"off":"polite")}return{mount:p,disable:y,destroy:T}}var sl=Object.freeze({__proto__:null,Media:hs,Direction:fs,Elements:As,Slides:Rs,Layout:ks,Clones:Ms,Move:Fs,Controller:Ns,Arrows:Bs,Autoplay:Ds,Cover:zs,Scroll:Ys,Drag:Xs,Keyboard:Js,LazyLoad:el,Pagination:tl,Sync:rl,Wheel:il,Live:al}),ll={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"},cl={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:Es,i18n:ll,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function dl(e,t,n){var r=t.Slides;function i(){He(e).on([zt,De],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),$o(o)}return{mount:i,start:s,cancel:Gr}}function ul(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ne(ht,s,"transition"),o;function p(){He(e).bind(s,"transitionend",function(f){f.target===s&&o&&(T(),o())})}function u(f,m){var g=r.toPosition(f,!0),$=r.getPosition(),C=y(f);tt(g-$)>=1&&C>=1?n.useScroll?a.scroll(g,C,!1,m):(c("transform "+C+"ms "+n.easing),r.translate(g,!0),o=m):(r.jump(f),m())}function T(){c(""),a.cancel()}function y(f){var m=n.rewindSpeed;if(e.is(fn)&&m){var g=i.getIndex(!0),$=i.getEnd();if(g===0&&f>=$||g>=$&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var pl=(function(){function e(n,r){this.event=He(),this.Components={},this.state=ms(un),this.splides=[],this._o={},this._E={};var i=Ot(n)?_o(document,n):n;En(i,i+" is invalid."),this.root=i,r=Nt({label:ft(i,pt)||"",labelledby:ft(i,yi)||""},cl,e.defaults,r||{});try{Nt(r,JSON.parse(ft(i,ci)))}catch{En(!1,"Invalid JSON")}this._o=Object.create(Nt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;En(s.is([un,mr]),"Already mounted!"),s.set(un),this._C=c,this._T=i||this._T||(this.is(Gn)?dl:ul),this._E=r||this._E;var o=kn({},sl,this._E,{Transition:this._T});return Zt(o,function(p,u){var T=p(a,c,a._o);c[u]=T,T.setup&&T.setup()}),Zt(c,function(p){p.mount&&p.mount()}),this.emit(zt),St(this.root,Ts),s.set(gn),this.emit(Jr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(gn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Dt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),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(De),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(un)?He(this).on(Jr,this.destroy.bind(this,r)):(Zt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(pi),i.destroy(),r&&kt(this.splides),a.set(mr)),this},ls(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})(),Si=pl;Si.defaults={};Si.STATES=ds;var Ui=[[zt,"onMounted"],[Jr,"onReady"],[Wt,"onMove"],[Cn,"onMoved"],[ui,"onClick"],[Ro,"onActive"],[ko,"onInactive"],[Wo,"onVisible"],[Mo,"onHidden"],[De,"onRefresh"],[Je,"onUpdated"],[hn,"onResize"],[xr,"onResized"],[Fo,"onDrag"],[No,"onDragging"],[Ho,"onDragged"],[Cr,"onScroll"],[en,"onScrolled"],[pi,"onDestroy"],[Oo,"onArrowsMounted"],[Bo,"onArrowsUpdated"],[Vo,"onPaginationMounted"],[Do,"onPaginationUpdated"],[mi,"onNavigationMounted"],[gi,"onAutoplayPlay"],[zo,"onAutoplayPlaying"],[hi,"onAutoplayPause"],[fi,"onLazyLoadLoaded"]];function $i(...e){return e.filter(Boolean).join(" ")}function yr(e){return e!==null&&typeof e=="object"}function ti(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ti(n,t[r]));if(yr(e)&&yr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!ti(e[i],t[i]))}return e===t}function ml(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function gl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function ni(e,t){const n=e;return gl(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():yr(r)?n[i]=ni(yr(n[i])?n[i]:{},r):n[i]=r}),n}var hl=({children:e,className:t,...n})=>d.createElement("div",{className:$i("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),wi=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Si(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=ni({},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&&!ti(this.options,e)&&(this.splide.options=e,this.options=ni({},e));const t=this.getSlides();ml(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){Ui.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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,...i}=this.props;return d.createElement(t,{className:$i("splide",e),ref:this.splideRef,...this.omit(i,["options",...Ui.map(a=>a[1])])},n?d.createElement(hl,null,r):r)}},Ti=({children:e,className:t,...n})=>d.createElement("li",{className:$i("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Ee=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_i=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",Pa="ControlSlider-module__sliderItem___QQSkR",Ea="ControlSlider-module__sliderImage___9hRl-",_a="ControlSlider-module__arrow___05ghY",Aa="ControlSlider-module__arrowVertical___tBfVN",Ia="ControlSlider-module__nextArrow___-30Yc",Ra="ControlSlider-module__arrowInner___aEra3",ka="ControlSlider-module__arrowIcon___S4ztF",Wa="ControlSlider-module__arrowImg___2dwJW",Ma="ControlSlider-module__mirror___brd6U",Fa="ControlSlider-module__pagination___bicLF",Ha="ControlSlider-module__paginationInner___bT-P-",Na="ControlSlider-module__paginationVertical___zYqKw",Ba="ControlSlider-module__paginationItem___nTRbk",Oa="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",Ua="ControlSlider-module__paginationInsideRight___Rtt3o",Ga="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",os="ControlSlider-module__topRightAlignment___NMapS",is="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",de={wrapper:Ta,hoverArrow:La,sliderItem:Pa,sliderImage:Ea,arrow:_a,arrowVertical:Aa,nextArrow:Ia,arrowInner:Ra,arrowIcon:ka,arrowImg:Wa,mirror:Ma,pagination:Fa,paginationInner:Ha,paginationVertical:Na,paginationItem:Ba,dot:Oa,activeDot:Va,paginationInsideBottom:Da,paginationInsideTop:za,paginationOutsideBottom:ja,paginationOutsideTop:qa,paginationInsideLeft:Ka,paginationInsideRight:Ua,paginationOutsideLeft:Ga,paginationOutsideRight:Ya,imgWrapper:Xa,captionBlock:Za,captionTextWrapper:Qa,captionText:Ja,active:es,withPointerEvents:ts,topLeftAlignment:ns,topCenterAlignment:rs,topRightAlignment:os,middleLeftAlignment:is,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 Ho="(prefers-reduced-motion: reduce)",hn=1,fs=2,vn=3,Tn=4,zn=5,lr=6,hr=7,ys={CREATED:hn,MOUNTED:fs,IDLE:vn,MOVING:Tn,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 Ai=setTimeout,Xr=function(){};function No(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function kn(e){return!so(e)&&Cr("object",e)}var ao=Array.isArray,Ii=He(Cr,"function"),Ut=He(Cr,"string"),jn=He(Cr,"undefined");function so(e){return e===null}function Ri(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function qn(e){return ao(e)?e:[e]}function xt(e,t){qn(e).forEach(t)}function lo(e,t){return e.indexOf(t)>-1}function cr(e,t){return e.push.apply(e,qn(t)),e}function Wt(e,t,n){e&&xt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Lt(e,t){Wt(e,Ut(t)?t.split(" "):t,!0)}function Kn(e,t){xt(t,e.appendChild.bind(e))}function co(e,t){xt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Wn(e,t){return Ri(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ki(e,t){var n=e?Xt(e.children):[];return t?n.filter(function(r){return Wn(r,t)}):n}function Un(e,t){return t?ki(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function nn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Fn(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){ao(n)?e[r]=n.slice():kn(n)?e[r]=Kt({},kn(e[r])?e[r]:{},n):e[r]=n})}),e}function Bo(e,t){xt(t||Mn(e),function(n){delete e[n]})}function Pt(e,t){xt(e,function(n){xt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){kn(t)?nn(t,function(r,i){Ce(e,i,r)}):xt(e,function(r){so(n)||n===""?Pt(r,t):r.setAttribute(t,String(n))})}function fn(e,t,n){var r=document.createElement(e);return t&&(Ut(t)?Lt(r,t):Ce(r,t)),n&&Kn(n,r),r}function St(e,t,n){if(jn(n))return getComputedStyle(e)[t];so(n)||(e.style[t]=""+n)}function Hn(e,t){St(e,"display",t)}function Wi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function wt(e,t){return e.getAttribute(t)}function Oo(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 Mi(e){return Un(new DOMParser().parseFromString(e,"text/html").body)}function kt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Fi(e,t){return e&&e.querySelector(t)}function uo(e,t){return t?Xt(e.querySelectorAll(t)):[]}function Mt(e,t){Wt(e,t,!1)}function Zr(e){return e.timeStamp}function Jt(e){return Ut(e)?e:e?e+"px":""}var Gn="splide",po="data-"+Gn;function An(e,t){if(!e)throw new Error("["+Gn+"] "+(t||""))}var Gt=Math.min,fr=Math.max,yr=Math.floor,Nn=Math.ceil,it=Math.abs;function Hi(e,t,n){return it(e-t)<n}function dr(e,t,n,r){var i=Gt(t,n),l=fr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function pn(e,t,n){var r=Gt(t,n),i=fr(t,n);return Gt(fr(r,e),i)}function Qr(e){return+(e>0)-+(e<0)}function Jr(e,t){return xt(t,function(n){e=e.replace("%s",""+n)}),e}function mo(e){return e<10?"0"+e:""+e}var Vo={};function vs(e){return""+e+mo(Vo[e]=(Vo[e]||0)+1)}function Ni(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,x){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,x,s,m])})}function n(o,c,s){i(o,c,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(o,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),o.dispatchEvent(p),p}function i(o,c,s){xt(o,function(p){p&&xt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(o){o[4]()}),Bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Zt="mounted",eo="ready",Ot="move",Ln="moved",go="click",Bi="active",Oi="inactive",Vi="visible",Di="hidden",qe="refresh",tt="updated",bn="resize",$r="resized",zi="drag",ji="dragging",qi="dragged",Sr="scroll",an="scrolled",bs="overflow",ho="destroy",Ki="arrows:mounted",Ui="arrows:updated",Gi="pagination:mounted",Yi="pagination:updated",fo="navigation:mounted",yo="autoplay:play",Xi="autoplay:playing",vo="autoplay:pause",bo="lazyload:loaded",Zi="sk",Qi="sh",vr="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ni();function r(l,o){n.bind(t,qn(l).join(" "),function(c){o.apply(o,ao(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Xt(arguments,1))}return e&&e.event.on(ho,n.destroy),Fn(n,{bus:t,on:r,off:He(n.unbind,t),emit:i})}function wr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?Gt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return x();c=No(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=No(u)}function x(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function xs(e){var t=e;function n(i){t=i}function r(i){return lo(qn(i),t)}return{set:n,is:r}}function Cs(e,t){var n=wr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function $s(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Ni(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Ho),T()}function p(m){m&&o.destroy()}function u(m,g){var C=matchMedia(g);o.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(hr),g=n.direction,C=c.reduce(function(w,$){return Kt(w,$[1].matches?$[0]:{})},{});Bo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Ho).matches&&(m?Kt(n,l):Bo(n,Mn(l)))}function f(m,g,C){Kt(n,m),g&&Kt(Object.getPrototypeOf(n),m),(C||!r.is(hn))&&e.emit(tt,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Tr="Arrow",Lr=Tr+"Left",Pr=Tr+"Right",Ji=Tr+"Up",ea=Tr+"Down",Do="rtl",Er="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ji,Pr],ArrowRight:[ea,Lr]};function Ss(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===Do&&!o?1:c===Er?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 i(l){return l*(n.direction===Do?1:-1)}return{resolve:r,orient:i}}var Ft="role",yn="tabindex",ws="disabled",Tt="aria-",Yn=Tt+"controls",ta=Tt+"current",zo=Tt+"selected",yt=Tt+"label",xo=Tt+"labelledby",na=Tt+"hidden",Co=Tt+"orientation",Bn=Tt+"roledescription",jo=Tt+"live",qo=Tt+"busy",Ko=Tt+"atomic",$o=[Ft,yn,ws,Yn,ta,yt,xo,na,Co,Bn],Et=Gn+"__",Qt="is-",Nr=Gn,Uo=Et+"track",Ts=Et+"list",_r=Et+"slide",ra=_r+"--clone",Ls=_r+"__container",So=Et+"arrows",Ar=Et+"arrow",oa=Ar+"--prev",ia=Ar+"--next",Ir=Et+"pagination",aa=Ir+"__page",Ps=Et+"progress",Es=Ps+"__bar",_s=Et+"toggle",As=Et+"spinner",Is=Et+"sr",Rs=Qt+"initialized",on=Qt+"active",sa=Qt+"prev",la=Qt+"next",to=Qt+"visible",no=Qt+"loading",ca=Qt+"focus-in",da=Qt+"overflow",ks=[on,to,sa,la,no,ca,da],Ws={slide:_r,clone:ra,arrows:So,arrow:Ar,prev:oa,next:ia,pagination:Ir,page:aa,spinner:As};function Ms(e,t){if(Ii(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Wn(n,t);)n=n.parentElement;return n}var Fs=5,Go=200,ua="touchstart mousedown",Br="touchmove mousemove",Or="touchend touchcancel mouseup click";function Hs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),F(),$()}function C(){i(qe,w),i(qe,g),i(tt,$),l(document,ua+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(o,"focusin",function(){Wt(o,ca,!!m)})}function w(b){var P=$o.concat("style");Bt(p),Mt(o,u),Mt(x,T),Pt([x,f],P),Pt(o,b?P:["style",Bn])}function $(){Mt(o,u),Mt(x,T),u=H(Nr),T=H(Uo),Lt(o,u),Lt(x,T),Ce(o,yt,n.label),Ce(o,xo,n.labelledby)}function v(){x=L("."+Uo),f=Un(x,"."+Ts),An(x&&f,"A track/list element is missing."),cr(p,ki(f,"."+_r+":not(."+ra+")")),nn({arrows:So,pagination:Ir,prev:oa,next:ia,bar:Es,toggle:_s},function(b,P){s[P]=L("."+b)}),Fn(s,{root:o,track:x,list:f,slides:p})}function F(){var b=o.id||vs(Gn),P=n.role;o.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!wt(o,Ft)&&o.tagName!=="SECTION"&&P&&Ce(o,Ft,P),Ce(o,Bn,c.carousel),Ce(f,Ft,"presentation")}function L(b){var P=Fi(o,b);return P&&Ms(P,"."+Nr)===o?P:void 0}function H(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Nr&&on]}return Fn(s,{setup:g,mount:C,destroy:w})}var xn="slide",Pn="loop",Xn="fade";function Ns(e,t,n,r){var i=Oe(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=wt(r,"style"),$=wt(r,yt),v=n>-1,F=Un(r,"."+Ls),L;function H(){v||(r.id=p.id+"-slide"+mo(t+1),Ce(r,Ft,m?"tabpanel":"group"),Ce(r,Bn,f.slide),Ce(r,yt,$||Jr(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",He(o,go,D)),c(r,"keydown",He(o,Zi,D)),l([Ln,Qi,an],E),l(fo,O),x&&l(Ot,S)}function P(){L=!0,i.destroy(),Mt(r,ks),Pt(r,$o),Ce(r,"style",w),Ce(r,yt,$||"")}function O(){var N=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,yt,Jr(f.slideX,(v?n:t)+1)),Ce(r,Yn,N),Ce(r,Ft,g?"button":""),g&&Pt(r,Bn)}function S(){L||E()}function E(){if(!L){var N=e.index;A(),W(),Wt(r,sa,t===N-1),Wt(r,la,t===N+1)}}function A(){var N=te();N!==Oo(r,on)&&(Wt(r,on,N),Ce(r,ta,T&&N||""),o(N?Bi:Oi,D))}function W(){var N=k(),I=!N&&(!te()||v);if(e.state.is([Tn,zn])||Ce(r,na,I||""),Ce(uo(r,u.focusableNodes||""),yn,I?-1:""),g&&Ce(r,yn,I?-1:0),N!==Oo(r,to)&&(Wt(r,to,N),o(N?Vi:Di,D)),!N&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Wi(K.slide)}}function j(N,I,K){St(K&&F||r,N,I)}function te(){var N=e.index;return N===t||u.cloneStatus&&N===n}function k(){if(e.is(Xn))return te();var N=ft(s.Elements.track),I=ft(r),K=C("left",!0),Z=C("right",!0);return yr(N[K])<=Nn(I[K])&&yr(I[Z])<=Nn(N[Z])}function M(N,I){var K=it(N-t);return!v&&(u.rewind||e.is(Pn))&&(K=Gt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:F,isClone:v,mount:H,destroy:P,update:E,style:j,isWithin:M};return D}function Bs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),i(qe,f),i(qe,x)}function x(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Bt(u)}function m(){L(function(E){E.update()})}function g(E,A,W){var j=Ns(e,A,W,E);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(E){return E?H(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,W=A.toIndex(E),j=A.hasFocus()?1:n.perPage;return H(function(te){return dr(te.index,W,W+j-1)})}function $(E){return H(E)[0]}function v(E,A){xt(E,function(W){if(Ut(W)&&(W=Mi(W)),Ri(W)){var j=s[A];j?co(W,j):Kn(p,W),Lt(W,n.classes.slide),P(W,He(l,bn))}}),l(qe)}function F(E){rn(H(E).map(function(A){return A.slide})),l(qe)}function L(E,A){C(A).forEach(E)}function H(E){return u.filter(Ii(E)?E:function(A){return Ut(E)?Wn(A.slide,E):lo(qn(E),A.index)})}function b(E,A,W){L(function(j){j.style(E,A,W)})}function P(E,A){var W=uo(E,"img"),j=W.length;j?W.forEach(function(te){o(te,"load error",function(){--j||A()})}):A()}function O(E){return E?s.length:u.length}function S(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:$,add:v,remove:F,forEach:L,filter:H,style:b,getLength:O,isEnough:S}}function Os(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function $(){v(),l(window,"resize load",Cs(He(o,bn))),i([tt,qe],v),i(bn,F)}function v(){g=n.direction===Er,St(u,"maxWidth",Jt(n.width)),St(T,s("paddingLeft"),L(!1)),St(T,s("paddingRight"),L(!0)),F(!0)}function F(D){var N=ft(u);(D||C.width!==N.width||C.height!==N.height)&&(St(T,"height",H()),m(s("marginRight"),Jt(n.gap)),m("width",P()),m("height",O(),!0),C=N,o($r),w!==(w=M())&&(Wt(u,da,w),o(bs,w)))}function L(D){var N=n.padding,I=s(D?"right":"left");return N&&Jt(N[I]||(kn(N)?0:N))||"0px"}function H(){var D="";return g&&(D=b(),An(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return Jt(n.height||ft(x).width*n.heightRatio)}function P(){return n.autoWidth?null:Jt(n.fixedWidth)||(g?"":S())}function O(){return Jt(n.fixedHeight)||(g?n.autoHeight?null:S():b())}function S(){var D=Jt(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function E(){return ft(x)[s("width")]}function A(D,N){var I=f(D||0);return I?ft(I.slide)[s("width")]+(N?0:te()):0}function W(D,N){var I=f(D);if(I){var K=ft(I.slide)[s("right")],Z=ft(x)[s("left")];return it(K-Z)+(N?0:te())}return 0}function j(D){return W(e.length-1)-W(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat(St(D.slide,s("marginRight")))||0}function k(D){return parseFloat(St(T,s("padding"+(D?"Right":"Left"))))||0}function M(){return e.is(Xn)||j(!0)>E()}return{mount:$,resize:F,listSize:E,slideSize:A,sliderSize:j,totalSize:W,getPadding:k,isOverflow:M}}var Vs=2;function Ds(e,t,n){var r=Oe(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(qe,T),i([tt,bn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){rn(s),Bt(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var $=o.get().slice(),v=$.length;if(v){for(;$.length<w;)cr($,$);cr($.slice(-w),$.slice(0,w)).forEach(function(F,L){var H=L<w,b=g(F.slide,L);H?co(b,$[0].slide):Kn(l.list,b),cr(s,b),o.register(b,L-w+(H?0:v),F.index)})}}function g(w,$){var v=w.cloneNode(!0);return Lt(v,n.classes.clone),v.id=e.root.id+"-clone"+mo($+1),v}function C(){var w=n.clones;if(!e.is(Pn))w=0;else if(jn(w)){var $=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=$&&Nn(ft(l.track)[c("width")]/$);w=v||n[c("autoWidth")]&&e.length||n.perPage*Vs}return w}return{mount:u,destroy:x}}function zs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,$=C.track,v;function F(){v=t.Transition,i([Zt,$r,tt,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function H(I,K,Z,Q){I!==K&&D(I>Z)&&(E(),P(S(j(),I>Z),!0)),o(Tn),l(Ot,K,Z,I),v.start(K,function(){o(vn),l(Ln,K,Z,I),Q&&Q()})}function b(I){P(W(I,!0))}function P(I,K){if(!e.is(Xn)){var Z=K?I:O(I);St(w,"transform","translate"+m("X")+"("+Z+"px)"),I!==Z&&l(Qi)}}function O(I){if(e.is(Pn)){var K=A(I),Z=K>t.Controller.getEnd(),Q=K<0;(Q||Z)&&(I=S(I,Z))}return I}function S(I,K){var Z=I-M(K),Q=x();return I-=g(Q*(Nn(it(Z)/Q)||1))*(K?1:-1),I}function E(){P(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Z=0,Q=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=it(W(ne,!0)-I);if(h<=Q)Q=h,Z=ne;else break}return Z}function W(I,K){var Z=g(u(I-1)-k(I));return K?te(Z):Z}function j(){var I=m("left");return ft(w)[I]-ft($)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(xn)&&(I=pn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function M(I){return W(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g(S(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ft($)[m("width")]}function N(I,K){K=jn(K)?j():K;var Z=I!==!0&&g(K)<g(M(!1)),Q=I!==!1&&g(K)>g(M(!0));return Z||Q}return{mount:F,move:H,jump:b,translate:P,shift:S,cancel:E,toIndex:A,toPosition:W,getPosition:j,getLimit:M,exceededLimit:N,reposition:L}}function js(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(Pn),g=e.is(xn),C=He(j,!1),w=He(j,!0),$=n.start||0,v,F=$,L,H,b;function P(){O(),i([tt,qe,vr],O),i($r,S)}function O(){L=x(!0),H=n.perMove,b=n.perPage,v=D();var h=pn($,0,f?v:L-1);h!==$&&($=h,o.reposition())}function S(){v!==D()&&l(vr)}function E(h,ee,ge){if(!ne()){var le=W(h),be=M(le);be>-1&&(ee||be!==$)&&(Z(be),o.move(le,be,F,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=M(o.toIndex(c()));Z(f?Gt(be,v):be),le&&le()})}function W(h){var ee=$;if(Ut(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te($+ +(""+le+(+be||1)),$):le===">"?ee=be?N(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:pn(h,0,v);return ee}function j(h,ee){var ge=H||(R()?1:b),le=te($+ge*(h?-1:1),$,!(H||R()));return le===-1&&g&&!Hi(c(),s(!h),1)?h?0:v:ee?le:M(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!H&&(dr(0,h,ee,!0)||dr(v,ee,h,!0))?h=N(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=N(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==$)for(var ee=c();ee===p(h,!0)&&dr(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function M(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&H?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return pn(h,0,L-1)}function N(h){return pn(R()?h:b*h,0,v)}function I(h){return R()?Gt(h,v):yr((h>=v?L-1:h)/b)}function K(h){var ee=o.toIndex(h);return g?pn(ee,0,v):ee}function Z(h){h!==$&&(F=$,$=h)}function Q(h){return h?F:$}function R(){return!jn(n.focus)||n.isNavigation}function ne(){return e.state.is([Tn,zn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Z,getIndex:Q,toIndex:N,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}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 Us(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,$={};function v(){L(),i(tt,F)}function F(){H(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&O(),m&&g&&(Fn($,{prev:m,next:g}),Hn(f,A?"":"none"),Lt(f,w=So+"--"+n.direction),A&&(b(),E(),Ce([m,g],Yn,x.id),o(Ki,m,g)))}function H(){r.destroy(),Mt(f,w),C?(rn(T?[m,g]:f),m=g=null):Pt([m,g],$o)}function b(){i([Zt,Ln,qe,an,vr],E),l(g,"click",He(P,">")),l(m,"click",He(P,"<"))}function P(A){u.go(A,!0)}function O(){f=T||fn("div",c.arrows),m=S(!0),g=S(!1),C=!0,Kn(f,[m,g]),!T&&co(f,x)}function S(A){var W='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+qs+'" viewBox="0 0 '+tr+" "+tr+'" width="'+tr+'" height="'+tr+'" focusable="false"><path d="'+(n.arrowPath||Ks)+'" />';return Mi(W)}function E(){if(m&&g){var A=e.index,W=u.getPrev(),j=u.getNext(),te=W>-1&&A<W?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=W<0,g.disabled=j<0,Ce(m,yt,te),Ce(g,yt,k),o(Ui,m,g,W,j)}}return{arrows:$,mount:v,destroy:H,update:E}}var Gs=po+"-interval";function Ys(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=wr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&($(),x&&Ce(x,Yn,p.track.id),C||v(),H())}function $(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(O){m=O.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(O){g=O.type==="focusin",L()}),x&&l(x,"click",function(){C?v():F(!0)}),i([Ot,Sr,qe],c.rewind),i(Ot,P)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,H(),o(yo))}function F(O){O===void 0&&(O=!0),C=!!O,H(),s()||(c.pause(),o(vo))}function L(){C||(m||g?F(!1):v())}function H(){x&&(Wt(x,on,!C),Ce(x,yt,n.i18n[C?"play":"pause"]))}function b(O){var S=p.bar;S&&St(S,"width",O*100+"%"),o(Xi,O)}function P(O){var S=t.Slides.getAt(O);c.set(S&&+wt(S.slide,Gs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:F,isPaused:s}}function Xs(e,t,n){var r=Oe(e),i=r.on;function l(){n.cover&&(i(bo,He(c,!0)),i([Zt,tt,qe],He(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Un(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:He(o,!1)}}var Zs=10,Qs=600,Js=.6,el=1.5,tl=800;function nl(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(xn),f,m,g=1;function C(){i(Ot,F),i([tt,qe],L)}function w(b,P,O,S,E){var A=s();if(F(),O&&(!x||!u())){var W=t.Layout.sliderSize(),j=Qr(b)*W*yr(it(b)/W)||0;b=c.toPosition(t.Controller.toDest(b%W))+j}var te=Hi(A,b,1);g=1,P=te?0:P||fr(it(b-A)/el,tl),m=S,f=wr(P,$,He(v,A,b,E),1),o(zn),l(Sr),f.start()}function $(){o(vn),m&&m(),l(an)}function v(b,P,O,S){var E=s(),A=b+(P-b)*H(S),W=(A-E)*g;T(E+W),x&&!O&&u()&&(g*=Js,it(W)<Zs&&w(p(u(!0)),Qs,!1,m,!0))}function F(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(F(),$())}function H(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:F,scroll:w,cancel:L}}var mn={passive:!1,capture:!0};function rl(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,$=p.exceededLimit,v,F,L,H,b,P=!1,O,S,E;function A(){o(x,Br,Xr,mn),o(x,Or,Xr,mn),o(x,ua,j,mn),o(x,"click",M,{capture:!0}),o(x,"dragstart",kt),i([Zt,tt],W)}function W(){var V=n.drag;ce(!V),H=V==="free"}function j(V){if(O=!1,!S){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?kt(V,!0):(E=U?x:window,b=s.is([Tn,zn]),L=null,o(E,Br,te,mn),o(E,Or,k,mn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(lr)||(s.set(lr),l(zi)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Go,G=P!==(P=$());(U||G)&&D(V),O=!0,l(ji),kt(V)}else K(V)&&(b=I(V),kt(V))}function k(V){s.is(lr)&&(s.set(vn),l(qi)),b&&(N(V),kt(V)),c(E,Br,te),c(E,Or,k),b=!1}function M(V){!S&&O&&kt(V,!0)}function D(V){L=F,F=V,v=w()}function N(V){var U=Z(V),G=Q(U),se=n.rewind&&n.rewindByDrag;f(!1),H?T.scroll(G,0,n.snap):e.is(Xn)?T.go(C(Qr(U))<0?se?"<":"-":se?">":"+"):e.is(xn)&&P&&se?T.go($(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=kn(U),se=G&&U.mouse||0,ye=(G?U.touch:+U)||10;return it(R(V))>(be(V)?ye:se)}function K(V){return it(R(V))>it(R(V,!0))}function Z(V){if(e.is(Pn)||!P){var U=ne(V);if(U&&U<Go)return R(V)/U}return 0}function Q(V){return w()+Qr(V)*Gt(it(V)*(n.flickPower||600),H?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return F===V&&L||F}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(P&&e.is(xn)?Fs:1)}function le(V){var U=n.noDrag;return!Wn(V,"."+aa+", ."+Ar)&&(!U||!Wn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function ce(V){S=V}return{mount:A,disable:ce,isDragging:re}}var ol={Spacebar:" ",Right:Pr,Left:Lr,Up:Ji,Down:ea};function wo(e){return e=Ut(e)?e:e.key,ol[e]||e}var Yo="keydown";function il(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),i(tt,f),i(tt,x),i(Ot,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Yo,C))}function f(){o(p,Yo)}function m(w){u=w}function g(){var w=u;u=!0,Ai(function(){u=w})}function C(w){if(!u){var $=wo(w);$===s(Lr)?e.go("<"):$===s(Pr)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var In=po+"-lazy",ur=In+"-srcset",al="["+In+"], ["+ur+"]";function sl(e,t,n){var r=Oe(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Ln,an],u=[];function T(){n.lazyLoad&&(x(),i(qe,x))}function x(){Bt(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function($){uo($.slide,al).forEach(function(v){var F=wt(v,In),L=wt(v,ur);if(F!==v.src||L!==v.srcset){var H=n.classes.spinner,b=v.parentElement,P=Un(b,"."+H)||fn("span",H,b);u.push([v,$,P]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function($){var v=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,v)?g($):!0}),u.length||l(p)}function g($){var v=$[0];Lt($[1].slide,no),o(v,"load error",He(C,$)),Ce(v,"src",wt(v,In)),Ce(v,"srcset",wt(v,ur)),Pt(v,In),Pt(v,ur)}function C($,v){var F=$[0],L=$[1];Mt(L.slide,no),v.type!=="error"&&(rn($[2]),Hn(F,""),c(bo,F,L),c(bn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:He(Bt,u),check:m}}function ll(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function $(){v(),i([tt,qe,vr],$);var S=n.pagination;m&&Hn(m,S?"":"none"),S&&(i([Ot,Sr,an],O),F(),O(),l(Gi,{list:C,items:g},P(e.index)))}function v(){C&&(rn(m?Xt(C.children):C),Mt(C,w),Bt(g),C=null),r.destroy()}function F(){var S=e.length,E=n.classes,A=n.i18n,W=n.perPage,j=u()?p.getEnd()+1:Nn(S/W);C=m||fn("ul",E.pagination,s.track.parentElement),Lt(C,w=Ir+"--"+b()),Ce(C,Ft,"tablist"),Ce(C,yt,A.select),Ce(C,Co,b()===Er?"vertical":"");for(var te=0;te<j;te++){var k=fn("li",null,C),M=fn("button",{class:E.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),N=!u()&&W>1?A.pageX:A.slideX;o(M,"click",He(L,te)),n.paginationKeyboard&&o(M,"keydown",He(H,te)),Ce(k,Ft,"presentation"),Ce(M,Ft,"tab"),Ce(M,Yn,D.join(" ")),Ce(M,yt,Jr(N,te+1)),Ce(M,yn,-1),g.push({li:k,button:M,page:te})}}function L(S){x(">"+S,!0)}function H(S,E){var A=g.length,W=wo(E),j=b(),te=-1;W===f(Pr,!1,j)?te=++S%A:W===f(Lr,!1,j)?te=(--S+A)%A:W==="Home"?te=0:W==="End"&&(te=A-1);var k=g[te];k&&(Wi(k.button),x(">"+te),kt(E,!0))}function b(){return n.paginationDirection||n.direction}function P(S){return g[p.toPage(S)]}function O(){var S=P(T(!0)),E=P(T());if(S){var A=S.button;Mt(A,on),Pt(A,zo),Ce(A,yn,-1)}if(E){var W=E.button;Lt(W,on),Ce(W,zo,!0),Ce(W,yn,"")}l(Yi,{list:C,items:g},S,E)}return{items:g,mount:$,destroy:v,getAt:P,update:O}}var cl=[" ","Enter"];function dl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Bt(l)}function s(){c(),o()}function p(m,g){var C=Oe(m);C.on(Ot,function(w,$,v){g.go(g.is(Pn)?v:w)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(go,x),g(Zi,f),g([Zt,tt],T),l.push(m),m.emit(fo,e.splides)}function T(){Ce(t.Elements.list,Co,n.direction===Er?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){lo(cl,wo(g))&&(x(m),kt(g))}return{setup:He(t.Media.set,{slideFocus:jn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ul(e,t,n){var r=Oe(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,mn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;it(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&kt(p)}}function s(p){return!n.releaseWheel||e.state.is(Tn)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var pl=90;function ml(e,t,n){var r=Oe(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=fn("span",Is),s=wr(pl,He(u,!1));function p(){o&&(x(!t.Autoplay.isPaused()),Ce(l,Ko,!0),c.textContent="…",i(yo,He(x,!0)),i(vo,He(x,!1)),i([Ln,an],He(u,!0)))}function u(f){Ce(l,qo,f),f?(Kn(l,c),s.start()):(rn(c),s.cancel())}function T(){Pt(l,[jo,Ko,qo]),rn(c)}function x(f){o&&Ce(l,jo,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var gl=Object.freeze({__proto__:null,Media:$s,Direction:Ss,Elements:Hs,Slides:Bs,Layout:Os,Clones:Ds,Move:zs,Controller:js,Arrows:Us,Autoplay:Ys,Cover:Xs,Scroll:nl,Drag:rl,Keyboard:il,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:Ws,i18n:hl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function yl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Zt,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ai(s)}return{mount:i,start:o,cancel:Xr}}function vl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=He(St,o,"transition"),s;function p(){Oe(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);it(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(xn)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var bl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=xs(hn),this.splides=[],this._o={},this._E={};var i=Ut(n)?Fi(document,n):n;An(i,i+" is invalid."),this.root=i,r=Kt({label:wt(i,yt)||"",labelledby:wt(i,xo)||""},fl,e.defaults,r||{});try{Kt(r,JSON.parse(wt(i,po)))}catch{An(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;An(o.is([hn,hr]),"Already mounted!"),o.set(hn),this._C=c,this._T=i||this._T||(this.is(Xn)?yl:vl),this._E=r||this._E;var s=Fn({},gl,this._E,{Transition:this._T});return nn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),nn(c,function(p){p.mount&&p.mount()}),this.emit(Zt),Lt(this.root,Rs),o.set(vn),this.emit(eo),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(vn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Xt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),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(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(hn)?Oe(this).on(eo,this.destroy.bind(this,r)):(nn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(ho),i.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})(),To=bl;To.defaults={};To.STATES=ys;var Xo=[[Zt,"onMounted"],[eo,"onReady"],[Ot,"onMove"],[Ln,"onMoved"],[go,"onClick"],[Bi,"onActive"],[Oi,"onInactive"],[Vi,"onVisible"],[Di,"onHidden"],[qe,"onRefresh"],[tt,"onUpdated"],[bn,"onResize"],[$r,"onResized"],[zi,"onDrag"],[ji,"onDragging"],[qi,"onDragged"],[Sr,"onScroll"],[an,"onScrolled"],[ho,"onDestroy"],[Ki,"onArrowsMounted"],[Ui,"onArrowsUpdated"],[Gi,"onPaginationMounted"],[Yi,"onPaginationUpdated"],[fo,"onNavigationMounted"],[yo,"onAutoplayPlay"],[Xi,"onAutoplayPlaying"],[vo,"onAutoplayPause"],[bo,"onLazyLoadLoaded"]];function Lo(...e){return e.filter(Boolean).join(" ")}function br(e){return e!==null&&typeof e=="object"}function ro(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!ro(n,t[r]));if(br(e)&&br(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!ro(e[i],t[i]))}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 i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function oo(e,t){const n=e;return Cl(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():br(r)?n[i]=oo(br(n[i])?n[i]:{},r):n[i]=r}),n}var $l=({children:e,className:t,...n})=>d.createElement("div",{className:Lo("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Po=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new To(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=oo({},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&&!ro(this.options,e)&&(this.splide.options=e,this.options=oo({},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){Xo.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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,...i}=this.props;return d.createElement(t,{className:Lo("splide",e),ref:this.splideRef,...this.omit(i,["options",...Xo.map(l=>l[1])])},n?d.createElement($l,null,r):r)}},Eo=({children:e,className:t,...n})=>d.createElement("li",{className:Lo("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 fl="RichTextRenderer-module__link___BWeZ2",yl={link:fl},vl=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))},Ar=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>vl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ct(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Ar(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:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const Nn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:yl.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:bl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function bl(e){return{...e.fontFamily&&{fontFamily:Ar(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 xl="SvgImage-module__svg___q3xE-",Cl="SvgImage-module__img___VsTm-",Gi={svg:xl,img:Cl},Sl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},$l=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!Sl(e)||!a?l.jsx("img",{src:e,alt:"",className:Ae(Gi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Ae(Gi.svg,r),style:{"--svg":$l(e),"--fill":t,"--hover-fill":n,...i??{}}})},wl={"top-left":le.topLeftAlignment,"top-center":le.topCenterAlignment,"top-right":le.topRightAlignment,"middle-left":le.middleLeftAlignment,"middle-center":le.middleCenterAlignment,"middle-right":le.middleRightAlignment,"bottom-left":le.bottomLeftAlignment,"bottom-center":le.bottomCenterAlignment,"bottom-right":le.bottomRightAlignment};function Tl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=d.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:y,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[$,C]=d.useState(null),[S,v]=d.useState(0),[M,L]=d.useState(0),{direction:N,transition:b,controls:E,pagination:B,imageCaption:x,triggers:P}=e,A=d.useRef(b.type),{x:F,y:j}=e.controls.offset,ee=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!$)return;const k=new ResizeObserver(W=>{if(!i)return;const[D]=W;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe($),()=>k.unobserve($)},[$]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),l.jsx("div",{className:Ae(le.wrapper,{[le.editor]:r}),ref:C,children:l.jsxs("div",{className:le.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ae(le.captionBlock),children:l.jsx("div",{className:le.captionTextWrapper,children:t.map((k,W)=>l.jsx("div",{className:Ae(le.captionText,wl[x.alignment],{[le.withPointerEvents]:W===S&&r,[le.active]:W===S}),style:{fontFamily:Ar(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":w.scalingValue(s.width,r),letterSpacing:w.scalingValue(o,r),wordSpacing:w.scalingValue(u,r),textAlign:p,fontSize:w.scalingValue(T.fontSize,r),lineHeight:w.scalingValue(T.lineHeight,r),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:le.captionTextInner,style:{"--link-hover-color":x.linkHoverColor,"--link-color":x.linkColor,position:"relative",top:w.scalingValue(x.offset.y,r),left:w.scalingValue(x.offset.x,r)},children:l.jsx(Nn,{content:k.imageCaption})})},W))})}),l.jsx(wi,{onMove:k=>{v(k.index)},ref:a,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:P.autoPlay!==null,...P.autoPlay!==null&&{interval:parseInt(P.autoPlay)*1e3},direction:N==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:P.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,W)=>l.jsx(Ti,{children:l.jsx("div",{className:le.sliderItem,children:l.jsx("div",{className:le.imgWrapper,children:l.jsx("img",{className:Ae(le.sliderImage,{[le.contain]:k.image.objectFit==="contain",[le.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},W))},M),E.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ae(le.arrow,{[le.arrowVertical]:N==="vert",[le.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{onClick:()=>{ee("-1")},className:le.arrowInner,style:{transform:`translate(${w.scalingValue(F,r)}, ${w.scalingValue(j*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&l.jsx(Ht,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:Ae(le.arrowImg,le.mirror)}),!E.arrowsImgUrl&&l.jsx(Yi,{color:E.color,className:Ae(le.arrowIcon,le.arrowImg,le.mirror)})]})}),l.jsx("div",{className:Ae(le.arrow,le.nextArrow,{[le.arrowVertical]:N==="vert",[le.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:le.arrowInner,onClick:()=>ee("+1"),style:{transform:`translate(${w.scalingValue(F*(N==="horiz"?-1:1),r)}, ${w.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&l.jsx(Ht,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:le.arrowImg}),!E.arrowsImgUrl&&l.jsx(Yi,{color:E.color,className:Ae(le.arrowIcon,le.arrowImg)})]})})]}),P.triggersList.click&&l.jsx("div",{className:le.clickOverlay,onClick:()=>{i&&i.go("+1")}}),B.isActive&&l.jsx("div",{className:Ae(le.pagination,{[le.paginationInsideBottom]:B.position==="inside-1"&&N==="horiz",[le.paginationInsideTop]:B.position==="inside-2"&&N==="horiz",[le.paginationOutsideBottom]:B.position==="outside-1"&&N==="horiz",[le.paginationOutsideTop]:B.position==="outside-2"&&N==="horiz",[le.paginationInsideLeft]:B.position==="inside-1"&&N==="vert",[le.paginationInsideRight]:B.position==="inside-2"&&N==="vert",[le.paginationOutsideLeft]:B.position==="outside-1"&&N==="vert",[le.paginationOutsideRight]:B.position==="outside-2"&&N==="vert",[le.paginationVertical]:N==="vert"}),children:l.jsx("div",{className:le.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${w.scalingValue(B.offset.x,r)}, ${w.scalingValue(B.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((k,W)=>l.jsx("button",{onClick:()=>{i&&i.go(W)},className:Ae(le.paginationItem),children:l.jsx("div",{className:Ae(le.dot,{[le.activeDot]:W===S}),style:{backgroundColor:W===S?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},W))})})]})})}function Yi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 Ll={element:Tl,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"]}},El="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Pl="ImageRevealSlider-module__image___Qjt-e",_l="ImageRevealSlider-module__link___N-iLG",Al="ImageRevealSlider-module__cursor___2U03d",sn={imageRevealSlider:El,image:Pl,link:_l,cursor:Al};function Xi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Or(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Il(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Or(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Or(e);a=s.height/s.width*i}else{const s=await Or(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function Rl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[a,s]=d.useState([]),[c,o]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[y,f]=d.useState(1),[m,g]=d.useState("none"),$=d.useRef({x:0,y:0}),[C,S]=d.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:b}=e.position,{cursorType:E,target:B,defaultCursorScale:x,defaultCursor:P,hoverCursorScale:A,hoverCursor:F}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(O,I)=>{const q=r.getBoundingClientRect(),X=O-q.left,J=I-q.top;if(T({x:X,y:J}),E==="system"){g("none"),f(1);return}const R=X,ne=J,h=document.elementFromPoint(q.left+R,q.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const te=Xi(R,ne,a)||B==="area"?{img:F??"none",scale:A}:{img:P??"none",scale:x};g(te.img),f(te.scale)},W=O=>{O.stopPropagation(),$.current={x:O.clientX,y:O.clientY},k(O.clientX,O.clientY)},D=()=>{C&&k($.current.x,$.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",D,!0)}},[r,C,u,E,B,F,P,A,x,a]),d.useEffect(()=>{C||(g("none"),f(0))},[C]);const j=async(k,W,D,O={})=>{const{width:I,height:q,finalWidth:X}=await Il(k.image.url,v,M,L);let J=0,R=0;N==="same"?(J=W/2,R=D/2):(J=O.x??Math.random()*W,R=O.y??Math.random()*D);const ne=Math.min(Math.max(J,I/2),W-I/2),h=Math.min(Math.max(R,q/2),D-q/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:X}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),W=k.width,D=k.height,O=[];(async()=>{const q=t[0],X=await j(q,W,D);O.push(X),s(O),o(1)})()},[v,M,L,N,r]),d.useEffect(()=>{b==="last One"&&s(k=>k.length>0?[k[k.length-1]]:[])},[b]);const ee=async k=>{if(!r)return;const W=r.getBoundingClientRect(),D=k.clientX-W.left,O=k.clientY-W.top;if(B==="image"&&!Xi(D,O,a))return;let I=0,q=0;N==="on Click"?(I=D,q=O):N==="same"?(I=W.width/2,q=W.height/2):(I=Math.random()*W.width,q=Math.random()*W.height);const X=t[c],J=await j(X,W.width,W.height,{x:I,y:q});s(R=>b==="all"?[...R,J]:[J]),o(R=>R>=t.length-1?0:R+1)};return l.jsxs("div",{ref:i,onClick:ee,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:sn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[a.map(k=>l.jsx("div",{className:sn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:B==="area"&&k.link?l.jsx("a",{href:k.link,target:"_blank",className:sn.link,children:l.jsx("img",{src:k.url,alt:k.name,className:sn.image},k.id)}):l.jsx("img",{src:k.url,alt:k.name,className:sn.image},k.id)},k.id)),C&&l.jsx("div",{className:sn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const kl={element:Rl,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:""}]}}}},Wl="LightBox-module__hidden___9s-9x",Ml="LightBox-module__heroImage___sTxNF",Fl="LightBox-module__background___rm9ml",Nl="LightBox-module__editor___4ACaY",Hl="LightBox-module__contentStyle___Bgnsq",Ol="LightBox-module__imageStyle___tLIlB",Bl="LightBox-module__imgWrapper___LuFUp",Vl="LightBox-module__contain___8-yaS",Dl="LightBox-module__cover___hNvOG",zl="LightBox-module__caption___b6L2I",jl="LightBox-module__captionTextInner___rCGNH",Kl="LightBox-module__lightboxSplide___XFuWC",ql="LightBox-module__arrow___iz38X",Ul="LightBox-module__arrowVertical___Zfz81",Gl="LightBox-module__nextArrow___zkAQN",Yl="LightBox-module__arrowInner___p48sW",Xl="LightBox-module__arrowIcon___3VaFf",Zl="LightBox-module__arrowImg___pNV88",Jl="LightBox-module__mirror___pjeXc",Ql="LightBox-module__thumbsWrapper___GB-nU",ec="LightBox-module__thumbsContainerVertical___wttk5",tc="LightBox-module__thumbsContainer___osSma",nc="LightBox-module__thumbsAlignStart___MO6tY",rc="LightBox-module__thumbsAlignCenter___Q4sUx",ic="LightBox-module__thumbsAlignEnd___p4y9R",oc="LightBox-module__thumbItem___HvnF3",ac="LightBox-module__closeButton___g2khP",sc="LightBox-module__fadeIn___0m5GW",lc="LightBox-module__slideInLeft___gPYwC",cc="LightBox-module__slideInRight___S-pPp",dc="LightBox-module__slideInTop___DFdAj",uc="LightBox-module__slideInBottom___m27kZ",pc="LightBox-module__fadeOut___55qBR",mc="LightBox-module__slideOutLeft___NvU7P",gc="LightBox-module__slideOutRight___SK7eC",hc="LightBox-module__slideOutTop___Vgg0z",fc="LightBox-module__slideOutBottom___nJ0Ef",yc="LightBox-module__scaleSlide___vZriG",Z={hidden:Wl,heroImage:Ml,background:Fl,editor:Nl,contentStyle:Hl,imageStyle:Ol,imgWrapper:Bl,contain:Vl,cover:Dl,caption:zl,captionTextInner:jl,lightboxSplide:Kl,arrow:ql,arrowVertical:Ul,nextArrow:Gl,arrowInner:Yl,arrowIcon:Xl,arrowImg:Zl,mirror:Jl,thumbsWrapper:Ql,thumbsContainerVertical:ec,thumbsContainer:tc,thumbsAlignStart:nc,thumbsAlignCenter:rc,thumbsAlignEnd:ic,thumbItem:oc,closeButton:ac,fadeIn:sc,slideInLeft:lc,slideInRight:cc,slideInTop:dc,slideInBottom:uc,fadeOut:pc,slideOutLeft:mc,slideOutRight:gc,slideOutTop:hc,slideOutBottom:fc,scaleSlide:yc},er=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:a==="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 oa(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 Zi(e){const t=e.getBoundingClientRect(),n=oa(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let p,u;o>c?(p=r,u=r/o):(u=i,p=i*o);const T=t.left+n.left,y=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+y;return{x:f,y:m,width:p,height:u}}function Ji(e){const t=e.getBoundingClientRect(),n=oa(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Qi(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.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 vc(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),a=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const bc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:p,alt:"Cover",className:Z.heroImage,onClick:()=>o(!0)}),l.jsx(xc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},xc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var Ie;const{widthSettings:o,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:y,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[$,C]=d.useState(0),[S,v]=d.useState(0),[M,L]=d.useState(!1),[N,b]=d.useState(!1),[E,B]=d.useState({}),x=d.useRef(null),P=d.useRef(null),A=d.useRef(null),F=d.useRef(!1),j=d.useRef(null),ee=d.useRef(null),k=d.useRef(null),W=d.useRef(null),D=d.useRef(!1),O=d.useRef(null),[I,q]=d.useState(!1),{appear:X,triggers:J,slider:R,thumbnail:ne,controls:h,area:te,caption:ve,layout:ce}=i.lightboxBlock,{appearClass:xe,backdropAppearClass:re,backdropDisappearClass:de,disappearClass:V}=vc(X.type,X.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const H=()=>{setTimeout(()=>{var _,z;(z=(_=x.current)==null?void 0:_.splide)==null||z.refresh()},16)},ie=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",H),window.addEventListener("ArticleEditor.ComponentContent:change",ie),()=>{window.removeEventListener("ArticleEditor.Layout:change",H),window.removeEventListener("ArticleEditor.ComponentContent:change",ie)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){q(!1);return}const H=O.current;if(!H)return;const ie=()=>{R.direction==="horiz"?q(H.scrollWidth>H.clientWidth):q(H.scrollHeight>H.clientHeight)};ie();const _=new ResizeObserver(ie);return _.observe(H),()=>_.disconnect()},[e,ne.isActive,n.length,E,R.direction]);const Q=d.useCallback(()=>{const H=window.matchMedia("(max-width: 768px)").matches,ie=Qi(te.color);H&&!s&&ie>.9&&(document.body.style.backgroundColor=""),L(!0),F.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&ee.current&&j.current.removeEventListener("animationend",ee.current),ee.current=null,F.current&&(F.current=!1,t()),L(!1))};j.current&&(ee.current=_,j.current.addEventListener("animationend",_))},[t,te.color,s]),se=(H,ie,_)=>{var z,K;if(H){if(J.type==="click"&&J.switch==="image")J.repeat==="close"&&$===n.length-1?Q():(z=x.current)==null||z.go("+1");else if(J.type==="click"&&J.switch==="50/50"){const G=H.getBoundingClientRect(),oe=ie-G.left,pe=_-G.top,We=G.width,he=G.height;let fe;R.direction==="horiz"?fe=oe<We/2?"-1":"+1":fe=pe<he/2?"-1":"+1",(K=x.current)==null||K.go(fe)}}},ge=H=>{if(D.current){D.current=!1;return}const ie=n[$],_=(ie==null?void 0:ie.image.objectFit)==="cover";let z,K;if("changedTouches"in H&&H.changedTouches.length>0)z=H.changedTouches[0].clientX,K=H.changedTouches[0].clientY;else if("clientX"in H)z=H.clientX,K=H.clientY;else return;let G;if(_&&A.current){const oe=Ji(A.current);G=z>=oe.left&&z<=oe.right&&K>=oe.top&&K<=oe.bottom}else{const oe=A.current?Zi(A.current):null;if(!oe){H.target===H.currentTarget&&Q();return}G=z>=oe.x&&z<=oe.x+oe.width&&K>=oe.y&&K<=oe.y+oe.height}G?se(A.current,z,K):Q()},Le=H=>{const ie=H.target;(ie.classList.contains(Z.thumbsWrapper)||ie.classList.contains(Z.thumbsContainer))&&ge(H)};d.useEffect(()=>{if(!e)return;const H=ie=>{var _,z;if(ie.key==="Escape"){Q();return}if(ie.key==="ArrowRight"){C(K=>(K+1)%Math.max(n.length,1)),(_=x.current)==null||_.go("+1");return}ie.key==="ArrowLeft"&&(C(K=>(K-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=x.current)==null||z.go("-1"))};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[e,Q,n.length]),d.useEffect(()=>{if(e){if(C(0),v(ie=>ie+1),F.current=!1,L(!1),b(!1),B({}),!U)return;const H=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(H)}return()=>{j.current&&ee.current&&(j.current.removeEventListener("animationend",ee.current),ee.current=null),b(!1)}},[e,U]),d.useEffect(()=>{P.current!==null&&P.current!==R.type&&v(H=>H+1),P.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const H=document.body.style.overflow,ie=window.matchMedia("(max-width: 768px)").matches,_=Qi(te.color);document.body.style.overflow="hidden",b(!1);const z=G=>{G.target===j.current&&!F.current&&G.animationName&&(ie&&!s&&_>.9&&(document.body.style.backgroundColor=te.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const K=G=>{const oe=G.target;oe&&(oe.closest(`.${Z.thumbsWrapper}`)||oe.closest(`.${Z.thumbsContainer}`))||R.type!=="slide"&&G.preventDefault()};return document.addEventListener("touchmove",K,{passive:!1}),()=>{document.body.style.overflow=H,document.removeEventListener("touchmove",K),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,s,te.color,R.type]),d.useEffect(()=>{if(!e)return;const H=ie=>{var z,K;if(F.current){ie.stopPropagation();return}if(D.current){D.current=!1;return}const _=ie.target;if(!(_&&(_.closest(`.${Z.thumbsContainer}`)||_.closest(`.${Z.thumbItem}`)||_.closest(`.${Z.arrow}`)||_.closest(`.${Z.closeButton}`)||_.closest(`.${Z.caption}`)))){if(R.type==="slide"&&J.type==="drag"&&((K=(z=x.current)==null?void 0:z.splide)!=null&&K.root)){const G=x.current.splide.root;if(_&&(G.contains(_)||G===_))return}if(ie.touches.length===0&&ie.changedTouches.length>0){const G=n[$],oe=(G==null?void 0:G.image.objectFit)==="cover",pe=ie.changedTouches[0];let We;if(oe&&A.current){const he=Ji(A.current);We=pe.clientX>=he.left&&pe.clientX<=he.right&&pe.clientY>=he.top&&pe.clientY<=he.bottom}else{const he=A.current?Zi(A.current):null;if(!he)return;We=pe.clientX>=he.x&&pe.clientX<=he.x+he.width&&pe.clientY>=he.y&&pe.clientY<=he.y+he.height}if(!We){ie.stopPropagation(),F.current=!0;const he=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),Q()}}}};return document.addEventListener("touchend",H,{passive:!0}),()=>{document.removeEventListener("touchend",H)}},[e,Q,$,n]);const Ce=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&J.type==="drag";d.useEffect(()=>{var fe,Fe;if(!e||!Ce||!((Fe=(fe=x.current)==null?void 0:fe.splide)!=null&&Fe.root))return;const H=x.current.splide.root,ie=30,_=(ae,be)=>{if(W.current){const Re=Math.abs(ae-W.current.x),ke=Math.abs(be-W.current.y);(Re>0||ke>0)&&(D.current=!0)}},z=ae=>{W.current&&(ae.preventDefault(),_(ae.clientX,ae.clientY))},K=ae=>{W.current&&ae.touches.length>0&&(ae.preventDefault(),_(ae.touches[0].clientX,ae.touches[0].clientY))},G=(ae,be)=>{if(!W.current||!x.current){W.current=null;return}const Re=Math.abs(ae-W.current.x),ke=Math.abs(be-W.current.y);ke>ie&&ke>Re&&x.current.go(be<W.current.y?"+1":"-1"),W.current=null},oe=ae=>{W.current&&G(ae.clientX,ae.clientY),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("pointermove",z)},pe=ae=>{if(W.current){if(ae.changedTouches.length>0){const be=ae.changedTouches[0];G(be.clientX,be.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",K)}},We=ae=>{W.current={x:ae.clientX,y:ae.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",oe),document.addEventListener("pointercancel",oe)},he=ae=>{ae.touches.length>0&&(W.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return H.addEventListener("pointerdown",We),H.addEventListener("touchstart",he),()=>{H.removeEventListener("pointerdown",We),H.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),W.current=null,D.current=!1}},[e,Ce,S]);const Pe={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:So.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:j,className:Ae(Z.background,M?de:re,{[Z.editor]:s},{[Z.hidden]:!e}),style:{...Pe,...N&&!s&&!M?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?j:null,className:Ae(Z.contentStyle,M?V:xe,{[Z.editor]:s},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(wi,{onMove:H=>C(H.index),ref:x,className:Z.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:J.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:J.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((H,ie)=>{const _=er(ce.position,ce.offset,s),z=`${w.scalingValue(ce.padding.top,s)} ${w.scalingValue(ce.padding.right,s)} ${w.scalingValue(ce.padding.bottom,s)} ${w.scalingValue(ce.padding.left,s)}`,K=R.type==="scale"?(()=>{const{transform:G,...oe}=_;return{...oe,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":G||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return l.jsx(Ti,{children:l.jsx("div",{className:Z.imgWrapper,onClick:ge,children:l.jsx("img",{ref:ie===$?A:null,className:Ae(Z.imageStyle,{[Z.contain]:H.image.objectFit==="contain",[Z.cover]:H.image.objectFit==="cover",[Z.scaleSlide]:R.type==="scale"}),src:H.image.url,alt:H.image.name??"",style:{...K,pointerEvents:H.image.objectFit==="contain"?"none":"auto"}})})},ie)})},S),h.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ae(Z.arrow,{[Z.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(h.offset.x,s)}, ${w.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),s)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var H;return(H=x.current)==null?void 0:H.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&l.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ae(Z.arrowImg,Z.mirror)}),!h.arrowsImgUrl&&l.jsx(eo,{color:h.color,className:Ae(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:Ae(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:l.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${w.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),s)}, ${w.scalingValue(h.offset.y,s)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var H;return(H=x.current)==null?void 0:H.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&l.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Z.arrowImg}),!h.arrowsImgUrl&&l.jsx(eo,{color:h.color,className:Ae(Z.arrowIcon,Z.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const H=er(te.closeIconAlign,te.closeIconOffset,s),ie=`scale(${te.closeIconScale})`,_=H.transform?`${H.transform} ${ie}`:ie;return l.jsx("button",{className:Z.closeButton,style:{...H,transform:_},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Ht,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),ve&&ve.isActive&&r.imageCaption&&((Ie=n[$])==null?void 0:Ie.imageCaption)&&l.jsx("div",{className:Z.caption,style:{...er(ve.alignment,ve.offset,s),fontFamily:Ar(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:o.sizing==="auto"?"max-content":w.scalingValue(o.width,s),letterSpacing:w.scalingValue(u,s),wordSpacing:w.scalingValue(y,s),textAlign:T,fontSize:w.scalingValue(f.fontSize,s),lineHeight:w.scalingValue(f.lineHeight,s),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:H=>H.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":ve.linkColor,"--link-hover-color":ve.linkHoverColor},children:l.jsx(Nn,{content:n[$].imageCaption})})}),ne.isActive&&(()=>{const[H,ie]=ne.position.split("-"),_=R.direction==="horiz"?`${H}-left`:ne.position,z=er(_,ne.offset,s),K=()=>{if(R.direction==="horiz"){if(ie==="left")return"flex-start";if(ie==="center")return"center";if(ie==="right")return"flex-end"}else{if(H==="top")return"flex-start";if(H==="middle")return"center";if(H==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:O,className:Z.thumbsWrapper,onClick:G=>Le(G),style:{position:s?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ae(Z.thumbsContainer,{[Z.thumbsContainerVertical]:R.direction==="vert",[Z.thumbsAlignStart]:ne.align==="start",[Z.thumbsAlignCenter]:ne.align==="center",[Z.thumbsAlignEnd]:ne.align==="end"}),style:{gap:w.scalingValue(ne.grid.gap,s),justifyContent:I?"flex-start":K()},children:n.map((G,oe)=>{const pe=oe===$,We=E[oe],fe=ne.grid.size*(pe?ne.activeState.scale:1),Fe=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:w.scalingValue(fe,s)}:{width:w.scalingValue(fe,s)};const ae=We.width/We.height;if(R.direction==="horiz"){const be=fe,Re=be*ae;return{width:w.scalingValue(Re,s),height:w.scalingValue(be,s)}}else{const be=fe,Re=be/ae;return{width:w.scalingValue(be,s),height:w.scalingValue(Re,s)}}};return l.jsx("button",{className:Z.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:w.scalingValue(fe,s)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:w.scalingValue(fe,s)}:{},...ne.fit==="cover"?{width:w.scalingValue(fe,s),height:w.scalingValue(fe,s)}:{},...Fe(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ae=>{var be;ae.stopPropagation(),C(oe),(be=x.current)==null||be.go(oe)},onMouseEnter:()=>{var ae;ne.triggers==="hov"&&((ae=x.current)==null||ae.go(oe))},children:l.jsx("img",{src:G.image.url,alt:G.image.name??"",onLoad:ae=>{const be=ae.currentTarget;be.naturalWidth&&be.naturalHeight&&B(Re=>({...Re,[oe]:{width:be.naturalWidth,height:be.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${G.image.name}-${oe}`)})})})})()]})]}),document.getElementById(a))};function eo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 Cc={element:bc,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 tr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sc(e){return`
|
|
6
|
+
*/const Sl="RichTextRenderer-module__link___BWeZ2",wl={link:Sl},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))},Rr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Tl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function vt(e){const{color:t,...n}=e;return n}function Je(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Rr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:r!==void 0?y.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Cn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:wl.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:Ll(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function Ll(e){return{...e.fontFamily&&{fontFamily:Rr(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-",El="SvgImage-module__img___VsTm-",Zo={svg:Pl,img:El},_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,'\\"')}")`,Ht=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(c)}},[]),!_l(e)||!l?a.jsx("img",{src:e,alt:"",className:Ee(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:Ee(Zo.svg,r),style:{"--svg":Al(e),"--fill":t,"--hover-fill":n,...i??{}}})},Il={"top-left":de.topLeftAlignment,"top-center":de.topCenterAlignment,"top-right":de.topRightAlignment,"middle-left":de.middleLeftAlignment,"middle-center":de.middleCenterAlignment,"middle-right":de.middleRightAlignment,"bottom-left":de.bottomLeftAlignment,"bottom-center":de.bottomCenterAlignment,"bottom-right":de.bottomRightAlignment};function Rl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[$,v]=d.useState(0),[F,L]=d.useState(0),{direction:H,transition:b,controls:P,pagination:O,imageCaption:S,triggers:E}=e,A=d.useRef(b.type),{x:W,y:j}=e.controls.offset,te=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(M=>{if(!i)return;const[D]=M;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Ee(de.wrapper,{[de.editor]:r}),ref:w,children:a.jsxs("div",{className:de.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ee(de.captionBlock),children:a.jsx("div",{className:de.captionTextWrapper,children:t.map((k,M)=>a.jsx("div",{className:Ee(de.captionText,Il[S.alignment],{[de.withPointerEvents]:M===$&&r,[de.active]:M===$}),style:{fontFamily:Rr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":y.scalingValue(o.width,r),letterSpacing:y.scalingValue(s,r),wordSpacing:y.scalingValue(u,r),textAlign:p,fontSize:y.scalingValue(T.fontSize,r),lineHeight:y.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:de.captionTextInner,style:{"--link-hover-color":S.linkHoverColor,"--link-color":S.linkColor,position:"relative",top:y.scalingValue(S.offset.y,r),left:y.scalingValue(S.offset.x,r)},children:a.jsx(Cn,{content:k.imageCaption})})},M))})}),a.jsx(Po,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:H==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,M)=>a.jsx(Eo,{children:a.jsx("div",{className:de.sliderItem,children:a.jsx("div",{className:de.imgWrapper,children:a.jsx("img",{className:Ee(de.sliderImage,{[de.contain]:k.image.objectFit==="contain",[de.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},M))},F),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ee(de.arrow,{[de.arrowVertical]:H==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:de.arrowInner,style:{transform:`translate(${y.scalingValue(W,r)}, ${y.scalingValue(j*(H==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Ht,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Ee(de.arrowImg,de.mirror)}),!P.arrowsImgUrl&&a.jsx(Qo,{color:P.color,className:Ee(de.arrowIcon,de.arrowImg,de.mirror)})]})}),a.jsx("div",{className:Ee(de.arrow,de.nextArrow,{[de.arrowVertical]:H==="vert",[de.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:de.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(W*(H==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Ht,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:de.arrowImg}),!P.arrowsImgUrl&&a.jsx(Qo,{color:P.color,className:Ee(de.arrowIcon,de.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:de.clickOverlay,onClick:()=>{i&&i.go("+1")}}),O.isActive&&a.jsx("div",{className:Ee(de.pagination,{[de.paginationInsideBottom]:O.position==="inside-1"&&H==="horiz",[de.paginationInsideTop]:O.position==="inside-2"&&H==="horiz",[de.paginationOutsideBottom]:O.position==="outside-1"&&H==="horiz",[de.paginationOutsideTop]:O.position==="outside-2"&&H==="horiz",[de.paginationInsideLeft]:O.position==="inside-1"&&H==="vert",[de.paginationInsideRight]:O.position==="inside-2"&&H==="vert",[de.paginationOutsideLeft]:O.position==="outside-1"&&H==="vert",[de.paginationOutsideRight]:O.position==="outside-2"&&H==="vert",[de.paginationVertical]:H==="vert"}),children:a.jsx("div",{className:de.paginationInner,style:{backgroundColor:O.colors[2],transform:`scale(${O.scale/100}) translate(${y.scalingValue(O.offset.x,r)}, ${y.scalingValue(O.offset.y,r)}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:t.map((k,M)=>a.jsx("button",{onClick:()=>{i&&i.go(M)},className:Ee(de.paginationItem),children:a.jsx("div",{className:Ee(de.dot,{[de.activeDot]:M===$}),style:{backgroundColor:M===$?O.colors[0]:O.colors[1],"--pagination-hover-color":O.hover}})},M))})})]})})}function Qo({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:Rl,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"]}},Wl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ml="ImageRevealSlider-module__image___Qjt-e",Fl="ImageRevealSlider-module__link___N-iLG",Hl="ImageRevealSlider-module__cursor___2U03d",un={imageRevealSlider:Wl,image:Ml,link:Fl,cursor:Hl};function Jo(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&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 i,l;if(t==="custom"){i=n;const o=await Vr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Vr(e);l=o.height/o.width*i}else{const o=await Vr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Bl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,$]=d.useState(!1),{sizeType:v,imageWidth:F,randomRangeImageWidth:L}=e.imageSize,{revealPosition:H,visible:b}=e.position,{cursorType:P,target:O,defaultCursorScale:S,defaultCursor:E,hoverCursorScale:A,hoverCursor:W}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(N,I)=>{const K=r.getBoundingClientRect(),Z=N-K.left,Q=I-K.top;if(T({x:Z,y:Q}),P==="system"){g("none"),f(1);return}const R=Z,ne=Q,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=Jo(R,ne,l)||O==="area"?{img:W??"none",scale:A}:{img:E??"none",scale:S};g(ee.img),f(ee.scale)},M=N=>{N.stopPropagation(),C.current={x:N.clientX,y:N.clientY},k(N.clientX,N.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",M),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",M),window.removeEventListener("scroll",D,!0)}},[r,w,u,P,O,W,E,A,S,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,M,D,N={})=>{const{width:I,height:K,finalWidth:Z}=await Nl(k.image.url,v,F,L);let Q=0,R=0;H==="same"?(Q=M/2,R=D/2):(Q=N.x??Math.random()*M,R=N.y??Math.random()*D);const ne=Math.min(Math.max(Q,I/2),M-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Z}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),M=k.width,D=k.height,N=[];(async()=>{const K=t[0],Z=await j(K,M,D);N.push(Z),o(N),s(1)})()},[v,F,L,H,r]),d.useEffect(()=>{b==="last One"&&o(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const M=r.getBoundingClientRect(),D=k.clientX-M.left,N=k.clientY-M.top;if(O==="image"&&!Jo(D,N,l))return;let I=0,K=0;H==="on Click"?(I=D,K=N):H==="same"?(I=M.width/2,K=M.height/2):(I=Math.random()*M.width,K=Math.random()*M.height);const Z=t[c],Q=await j(Z,M.width,M.height,{x:I,y:K});o(R=>b==="all"?[...R,Q]:[Q]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:i,onClick:te,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:un.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:un.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:O==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:un.link,children:a.jsx("img",{src:k.url,alt:k.name,className:un.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:un.image},k.id)},k.id)),w&&a.jsx("div",{className:un.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 Ol={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:""}]}}}},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",Ul="LightBox-module__imgWrapper___LuFUp",Gl="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",oc="LightBox-module__arrowImg___pNV88",ic="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",$c="LightBox-module__slideOutTop___Vgg0z",Sc="LightBox-module__slideOutBottom___nJ0Ef",wc="LightBox-module__scaleSlide___vZriG",J={hidden:Vl,heroImage:Dl,background:zl,editor:jl,contentStyle:ql,imageStyle:Kl,imgWrapper:Ul,contain:Gl,cover:Yl,caption:Xl,captionTextInner:Zl,lightboxSplide:Ql,arrow:Jl,arrowVertical:ec,nextArrow:tc,arrowInner:nc,arrowIcon:rc,arrowImg:oc,mirror:ic,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:$c,slideOutBottom:Sc,scaleSlide:wc},nr=(e,t,n)=>{const r={},[i,l]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="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"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:r.transform=`translate(${y.scalingValue(t.x,n)}, ${y.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 ei(e){const t=e.getBoundingClientRect(),n=pa(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+x;return{x:f,y:m,width:p,height:u}}function ti(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 ni(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.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 J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Lc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(Pc,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},Pc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var _e;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[$,v]=d.useState(0),[F,L]=d.useState(!1),[H,b]=d.useState(!1),[P,O]=d.useState({}),S=d.useRef(null),E=d.useRef(null),A=d.useRef(null),W=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),M=d.useRef(null),D=d.useRef(!1),N=d.useRef(null),[I,K]=d.useState(!1),{appear:Z,triggers:Q,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=i.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:ce,disappearClass:V}=Tc(Z.type,Z.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,z;(z=(_=S.current)==null?void 0:_.splide)==null||z.refresh()},16)},oe=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const B=N.current;if(!B)return;const oe=()=>{R.direction==="horiz"?K(B.scrollWidth>B.clientWidth):K(B.scrollHeight>B.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(B),()=>_.disconnect()},[e,ne.isActive,n.length,P,R.direction]);const G=d.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,oe=ni(ee.color);B&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),W.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,W.current&&(W.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,o]),se=(B,oe,_)=>{var z,q;if(B){if(Q.type==="click"&&Q.switch==="image")Q.repeat==="close"&&C===n.length-1?G():(z=S.current)==null||z.go("+1");else if(Q.type==="click"&&Q.switch==="50/50"){const Y=B.getBoundingClientRect(),ae=oe-Y.left,me=_-Y.top,We=Y.width,he=Y.height;let ve;R.direction==="horiz"?ve=ae<We/2?"-1":"+1":ve=me<he/2?"-1":"+1",(q=S.current)==null||q.go(ve)}}},ye=B=>{if(D.current){D.current=!1;return}const oe=n[C],_=(oe==null?void 0:oe.image.objectFit)==="cover";let z,q;if("changedTouches"in B&&B.changedTouches.length>0)z=B.changedTouches[0].clientX,q=B.changedTouches[0].clientY;else if("clientX"in B)z=B.clientX,q=B.clientY;else return;let Y;if(_&&A.current){const ae=ti(A.current);Y=z>=ae.left&&z<=ae.right&&q>=ae.top&&q<=ae.bottom}else{const ae=A.current?ei(A.current):null;if(!ae){B.target===B.currentTarget&&G();return}Y=z>=ae.x&&z<=ae.x+ae.width&&q>=ae.y&&q<=ae.y+ae.height}Y?se(A.current,z,q):G()},Te=B=>{const oe=B.target;(oe.classList.contains(J.thumbsWrapper)||oe.classList.contains(J.thumbsContainer))&&ye(B)};d.useEffect(()=>{if(!e)return;const B=oe=>{var _,z;if(oe.key==="Escape"){G();return}if(oe.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=S.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=S.current)==null||z.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(oe=>oe+1),W.current=!1,L(!1),b(!1),O({}),!U)return;const B=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(B)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{E.current!==null&&E.current!==R.type&&v(B=>B+1),E.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ni(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!W.current&&Y.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ae=Y.target;ae&&(ae.closest(`.${J.thumbsWrapper}`)||ae.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,o,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const B=oe=>{var z,q;if(W.current){oe.stopPropagation();return}if(D.current){D.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Q.type==="drag"&&((q=(z=S.current)==null?void 0:z.splide)!=null&&q.root)){const Y=S.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Y=n[C],ae=(Y==null?void 0:Y.image.objectFit)==="cover",me=oe.changedTouches[0];let We;if(ae&&A.current){const he=ti(A.current);We=me.clientX>=he.left&&me.clientX<=he.right&&me.clientY>=he.top&&me.clientY<=he.bottom}else{const he=A.current?ei(A.current):null;if(!he)return;We=me.clientX>=he.x&&me.clientX<=he.x+he.width&&me.clientY>=he.y&&me.clientY<=he.y+he.height}if(!We){oe.stopPropagation(),W.current=!0;const he=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),G()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,G,C,n]);const $e=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Q.type==="drag";d.useEffect(()=>{var ve,Me;if(!e||!$e||!((Me=(ve=S.current)==null?void 0:ve.splide)!=null&&Me.root))return;const B=S.current.splide.root,oe=30,_=(ie,xe)=>{if(M.current){const Ie=Math.abs(ie-M.current.x),ke=Math.abs(xe-M.current.y);(Ie>0||ke>0)&&(D.current=!0)}},z=ie=>{M.current&&(ie.preventDefault(),_(ie.clientX,ie.clientY))},q=ie=>{M.current&&ie.touches.length>0&&(ie.preventDefault(),_(ie.touches[0].clientX,ie.touches[0].clientY))},Y=(ie,xe)=>{if(!M.current||!S.current){M.current=null;return}const Ie=Math.abs(ie-M.current.x),ke=Math.abs(xe-M.current.y);ke>oe&&ke>Ie&&S.current.go(xe<M.current.y?"+1":"-1"),M.current=null},ae=ie=>{M.current&&Y(ie.clientX,ie.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",z)},me=ie=>{if(M.current){if(ie.changedTouches.length>0){const xe=ie.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",q)}},We=ie=>{M.current={x:ie.clientX,y:ie.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},he=ie=>{ie.touches.length>0&&(M.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return B.addEventListener("pointerdown",We),B.addEventListener("touchstart",he),()=>{B.removeEventListener("pointerdown",We),B.removeEventListener("touchstart",he),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),M.current=null,D.current=!1}},[e,$e,$]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_i.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:j,className:Ee(J.background,F?ce:re,{[J.editor]:o},{[J.hidden]:!e}),style:{...Le,...H&&!o&&!F?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?j:null,className:Ee(J.contentStyle,F?V:be,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Po,{onMove:B=>w(B.index),ref:S,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Q.type==="drag"&&!$e,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Q.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((B,oe)=>{const _=nr(le.position,le.offset,o),z=`${y.scalingValue(le.padding.top,o)} ${y.scalingValue(le.padding.right,o)} ${y.scalingValue(le.padding.bottom,o)} ${y.scalingValue(le.padding.left,o)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ae}=_;return{...ae,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(Eo,{children:a.jsx("div",{className:J.imgWrapper,onClick:ye,children:a.jsx("img",{ref:oe===C?A:null,className:Ee(J.imageStyle,{[J.contain]:B.image.objectFit==="contain",[J.cover]:B.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...q,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},oe)})},$),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ee(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,o)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=S.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ee(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(ri,{color:h.color,className:Ee(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Ee(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),o)}, ${y.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=S.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Ht,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(ri,{color:h.color,className:Ee(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const B=nr(ee.closeIconAlign,ee.closeIconOffset,o),oe=`scale(${ee.closeIconScale})`,_=B.transform?`${B.transform} ${oe}`:oe;return a.jsx("button",{className:J.closeButton,style:{...B,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Ht,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((_e=n[C])==null?void 0:_e.imageCaption)&&a.jsx("div",{className:J.caption,style:{...nr(ge.alignment,ge.offset,o),fontFamily:Rr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,o),letterSpacing:y.scalingValue(u,o),wordSpacing:y.scalingValue(x,o),textAlign:T,fontSize:y.scalingValue(f.fontSize,o),lineHeight:y.scalingValue(f.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Cn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[B,oe]=ne.position.split("-"),_=R.direction==="horiz"?`${B}-left`:ne.position,z=nr(_,ne.offset,o),q=()=>{if(R.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="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:N,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:o?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ee(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":q()},children:n.map((Y,ae)=>{const me=ae===C,We=P[ae],ve=ne.grid.size*(me?ne.activeState.scale:1),Me=()=>{if(ne.fit!=="fit")return{};if(!We)return R.direction==="horiz"?{height:y.scalingValue(ve,o)}:{width:y.scalingValue(ve,o)};const ie=We.width/We.height;if(R.direction==="horiz"){const xe=ve,Ie=xe*ie;return{width:y.scalingValue(Ie,o),height:y.scalingValue(xe,o)}}else{const xe=ve,Ie=xe/ie;return{width:y.scalingValue(xe,o),height:y.scalingValue(Ie,o)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,o)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,o)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,o),height:y.scalingValue(ve,o)}:{},...Me(),transition:me?"all 0.25s ease-out":"none",opacity:me?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ie=>{var xe;ie.stopPropagation(),w(ae),(xe=S.current)==null||xe.go(ae)},onMouseEnter:()=>{var ie;ne.triggers==="hov"&&((ie=S.current)==null||ie.go(ae))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:ie=>{const xe=ie.currentTarget;xe.naturalWidth&&xe.naturalHeight&&O(Ie=>({...Ie,[ae]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ae}`)})})})})()]})]}),document.getElementById(l))};function ri({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 Ec={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`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${rr(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
|
|
14
14
|
.${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
min-width: 0;
|
|
33
33
|
}
|
|
34
34
|
.${e}-field-group.${e}-labeled {
|
|
35
|
-
gap: ${
|
|
35
|
+
gap: ${rr(4)};
|
|
36
36
|
}
|
|
37
37
|
.${e}-field-label {
|
|
38
38
|
white-space: nowrap;
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
outline: none;
|
|
129
129
|
}
|
|
130
130
|
.${e}-success {
|
|
131
|
-
margin-top: ${
|
|
131
|
+
margin-top: ${rr(8)};
|
|
132
132
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
133
133
|
}
|
|
134
134
|
.${e}-error {
|
|
135
|
-
margin-top: ${
|
|
135
|
+
margin-top: ${rr(8)};
|
|
136
136
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
137
137
|
}
|
|
138
138
|
.${e}-overlay-anchor {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
pointer-events: auto;
|
|
156
156
|
z-index: 10;
|
|
157
157
|
}
|
|
158
|
-
`}function
|
|
158
|
+
`}function Ac({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:l}){const o=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:x,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:w,isButtonFullWidth:$,inputCorners:v,inputStroke:F,inputPadding:L,inputColor:H,inputTextColor:b,inputBorderColor:P,placeholderColor:O,buttonColor:S,buttonTextColor:E,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te,fontFamily:k,inputFontSettings:M,inputFontSize:D,inputLineHeight:N,inputLetterSpacing:I,inputWordSpacing:K,inputTextAppearance:Z,buttonFontSettings:Q,buttonFontSize:R,buttonLineHeight:ne,buttonLetterSpacing:h,buttonWordSpacing:ee,buttonTextAppearance:ge,labelFontSettings:le,labelFontSize:be,labelLineHeight:re,labelLetterSpacing:ce,labelWordSpacing:V,labelTextAppearance:U,statusFontSettings:G,statusFontSize:se,statusLineHeight:ye,statusLetterSpacing:Te,statusWordSpacing:$e,statusTextAppearance:Le,successMessage:_e,errorMessage:B,stateOverrides:oe}=e,_=p==="B",z=T.slice(0,Math.min(u,T.length)),q={fontSettings:{fontFamily:k,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:D??.01,lineHeight:N,letterSpacing:I??0,wordSpacing:K??0,textAppearance:Z,color:b},Y=vt(Je(q,t)),ae=y.scalingValue(F??0,t),me=y.scalingValue((N??D??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?F??0:(F??0)*2),t),We={...Y,borderStyle:"solid",borderRadius:p==="C"?0:y.scalingValue(v??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ae,borderLeftWidth:0}:{borderWidth:ae},paddingTop:y.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:y.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:y.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:y.scalingValue((L==null?void 0:L.left)??0,t),height:me,minHeight:me},he={fontSettings:{fontFamily:k,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:R??.01,lineHeight:ne,letterSpacing:h??0,wordSpacing:ee??0,textAppearance:ge,color:E},ve=vt(Je(he,t)),Me=y.scalingValue(C??0,t),ie={fontSettings:{fontFamily:k,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:ce??0,wordSpacing:V??0,textAppearance:U,color:W},xe=Je(ie,t),Ie={fontSettings:{fontFamily:k,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ye,letterSpacing:Te??0,wordSpacing:$e??0,textAppearance:Le,color:j},ke=vt(Je(Ie,t)),Ve=y.buildColorVars(s,{inputColor:H,inputTextColor:b,inputBorderColor:P,placeholderColor:O!=null&&O.trim()?O:"#cccccc",buttonColor:S,buttonTextColor:E,buttonBorderColor:A,labelTextColor:W,successColor:j,errorColor:te},Ic,Rc,oe),[nt,pt]=d.useState(()=>Object.fromEntries(z.map(Se=>[Se.name,""]))),[mt,Ct]=d.useState("idle"),[_t,gt]=d.useState(null),At=l==="success"?"success":l==="error"?"error":mt,pe=l==="error"?B:_t,Ne=l==="filled",Be=d.useMemo(()=>{if(!Ne)return nt;let Se=null;for(const Qe of z)(nt[Qe.name]??"").trim().length>0||(Se=Se??{...nt},Se[Qe.name]="Filled");return Se??nt},[nt,Ne,z]),Ue=At==="error"?y.getFormFieldValidationError(z,Be):null,Vt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),ht=i==null?void 0:i.submitUrl,It=(Se,Qe)=>{pt(Ke=>({...Ke,[Se]:Qe}))},_n=async Se=>{if(Se.preventDefault(),!c)return;const Qe=Object.fromEntries(z.map(De=>{var at;return[De.name,((at=nt[De.name])==null?void 0:at.trim())??""]}).filter(([,De])=>De));if(!ht){Ct("error"),gt("No integrations were found for this form.");return}if(Object.keys(Qe).length===0)return;const Ke=y.getFormFieldValidationError(z,nt);if(Ke){Ct("error"),gt(Ke);return}Ct("submitting"),gt(null);try{const De=await fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe)});if(!De.ok){const at=await De.text();throw new Error(at||`Request failed: ${De.status}`)}Ct("success"),pt(Object.fromEntries(z.map(at=>[at.name,""])))}catch(De){Ct("error"),gt(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Vt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_c(s)}}),a.jsxs("form",{onSubmit:_n,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:z.map((Se,Qe)=>a.jsxs(d.Fragment,{children:[Qe>0&&a.jsx("div",{"data-controls":o?"fieldsGap":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${_?` ${s}-labeled`:""}`,children:[_&&a.jsx("span",{className:`${s}-field-label`,style:xe?{...xe,lineHeight:xe.fontSize}:void 0,children:Se.label||Se.name}),Se.type==="textarea"?a.jsx("textarea",{name:Se.name,autoComplete:"off",value:Be[Se.name]??"",onChange:Ke=>It(Se.name,Ke.target.value),placeholder:Se.placeholder,className:`${s}-input`,style:We,rows:1,"data-filled":Ne||(Be[Se.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Se.type==="phone"?"tel":Se.type==="email"?"email":"text",name:Se.name,autoComplete:"off",value:Be[Se.name]??"",onChange:Ke=>It(Se.name,Ke.target.value),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${s}-input`,style:We,"data-filled":Ne||(Be[Se.name]??"").trim().length>0})]})]},Qe))}),a.jsx("div",{"data-controls":o?"gap":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(g??0,t),borderWidth:Me,paddingTop:y.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:y.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:y.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:y.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:c?"auto":void 0,...ve,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":x})})})]}),At==="success"&&a.jsx("p",{className:`${s}-success`,style:{...ke},children:_e}),At==="error"&&a.jsx("p",{className:`${s}-error`,style:{...ke},role:"alert",children:Ue??pe??B})]})}const Ic={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"},Rc=["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
|
-
`,Ec=[{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"}],nr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],_c={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:{...nr.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:{...nr.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:{...nr.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:{...nr.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:Ec,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:[...Pc],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"]},Ac={element:$c,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:_c,sourceCode:Lc};function rr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(e){return`
|
|
792
|
+
`,Wc=[{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"}],or={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Mc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fc={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:{...or.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:{...or.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:{...or.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:{...or.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:Wc,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:[...Mc],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:Fc,sourceCode:kc};function ir(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
|
|
793
793
|
.${e}-wrapper {
|
|
794
794
|
display: flex;
|
|
795
795
|
flex-direction: column;
|
|
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
971
971
|
align-items: center;
|
|
972
972
|
}
|
|
973
973
|
.${e}-success {
|
|
974
|
-
margin-top: ${
|
|
975
|
-
font-size: ${
|
|
974
|
+
margin-top: ${ir(8)};
|
|
975
|
+
font-size: ${ir(14)};
|
|
976
976
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
977
977
|
}
|
|
978
978
|
.${e}-error {
|
|
979
|
-
margin-top: ${
|
|
980
|
-
font-size: ${
|
|
979
|
+
margin-top: ${ir(8)};
|
|
980
|
+
font-size: ${ir(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:i})=>{const{prefix:l}=y.useScopedStyles(),o=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:x,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:w,buttonFontSettings:$,buttonFontSize:v,buttonLineHeight:F,buttonLetterSpacing:L,buttonWordSpacing:H,buttonTextAppearance:b,statusFontSettings:P,statusFontSize:O,statusLineHeight:S,statusLetterSpacing:E,statusWordSpacing:A,statusTextAppearance:W,iconMaxWidth:j,minHeight:te,corners:k,stroke:M,stateOverrides:D,inputPadding:N,buttonPadding:I,successMessage:K="Thanks for subscribing!",errorMessage:Z="Please, fill all required fields."}=e,Q=c.slice(0,Math.min(u,c.length)),[R,ne]=d.useState(()=>Object.fromEntries(Q.map(ie=>[ie.name,""]))),[h,ee]=d.useState("idle"),[ge,le]=d.useState(null),be=i==="success"?"success":i==="error"?"error":h,re=i==="error"?Z:ge,ce=i==="filled",V=d.useMemo(()=>{if(!ce)return R;let ie=null;for(const xe of Q)(R[xe.name]??"").trim().length>0||(ie=ie??{...R},ie[xe.name]="Filled");return ie??R},[ce,R,Q]),U=be==="error"?y.getFormFieldValidationError(Q,V):null,G=i&&i!=="default"?`${l}-state-${i}`:"",se=Q.some(ie=>(V[ie.name]??"").trim().length>0),ye=G!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${G} ${ye}`.trim(),$e=r==null?void 0:r.submitUrl,Le=p??"",_e=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",oe=Le||"Submit",_={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:C??0,textAppearance:w,color:e.inputTextColor??"#111111"},z={fontSettings:{fontFamily:T,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:v??.01,lineHeight:F,letterSpacing:L??0,wordSpacing:H??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},q={fontSettings:{fontFamily:T,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:O??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:A??0,textAppearance:W,color:e.successColor??"#22c55e"},Y=vt(Je(_,t)),ae=vt(Je(z,t)),me=vt(Je(q,t)),We=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(z==null?void 0:z.color)??"#ffffff"},Oc,Vc,D),he={borderRadius:y.scalingValue(k,t),borderWidth:y.scalingValue(M,t),borderStyle:"solid"},ve={borderLeftWidth:y.scalingValue(M,t)},Me=async ie=>{if(ie.preventDefault(),!o)return;const xe=Object.fromEntries(Q.map(ke=>{var Ve;return[ke.name,((Ve=R[ke.name])==null?void 0:Ve.trim())??""]}).filter(([,ke])=>ke));if(!$e){ee("error"),le("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Ie=y.getFormFieldValidationError(Q,R);if(Ie){ee("error"),le(Ie);return}ee("submitting"),le(null);try{const ke=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!ke.ok){const Ve=await ke.text();throw new Error(Ve||`Request failed: ${ke.status}`)}ee("success"),ne(Object.fromEntries(Q.map(Ve=>[Ve.name,""])))}catch(ke){ee("error"),le(ke instanceof Error?ke.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:We,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(l)}}),a.jsxs("form",{onSubmit:Me,className:`${l}-form`,style:{...he,height:y.scalingValue(te,t),minHeight:y.scalingValue(te,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Q.map(ie=>a.jsx("input",{type:ie.type==="email"?"email":ie.type==="phone"?"tel":"text",name:ie.name,autoComplete:"off",value:V[ie.name]??"",onChange:xe=>ne(Ie=>({...Ie,[ie.name]:xe.target.value})),placeholder:ie.placeholder,required:ie.isRequired??ie.type==="email",className:`${l}-input`,style:{...Y,paddingRight:y.scalingValue(N.right,t),paddingLeft:y.scalingValue(N.left,t),paddingTop:y.scalingValue(N.top,t),paddingBottom:y.scalingValue(N.bottom,t)}},ie.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:o?"submit":"button",className:`${l}-submitBtn`,"aria-label":oe,style:{...ae,...ve,paddingRight:y.scalingValue(I.right,t),paddingLeft:y.scalingValue(I.left,t),paddingTop:y.scalingValue(I.top,t),paddingBottom:y.scalingValue(I.bottom,t),pointerEvents:o?"auto":void 0},children:h==="submitting"?"...":B?_e&&a.jsx(Ht,{url:_e,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(j??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),be==="success"&&a.jsx("p",{className:`${l}-success`,style:{...me},children:K}),be==="error"&&a.jsx("p",{className:`${l}-error`,style:{...me},role:"alert",children:U??re??Z})]})},Oc={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"},Vc=["hover","focus","filled","success","error"],Dc=`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
|
-
`,Fc="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>'),Nc=[{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."}],Br={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Oc={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:{...Br.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:{...Br.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:{...Br.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:Nc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Fc},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:[...Hc],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"]},Bc={element:Rc,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:Oc,sourceCode:Mc};function Vc(e){return`
|
|
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"]},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:Kc,sourceCode:Dc};function Gc(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
|
|
1692
|
+
`}const Yc=30,Xc=20,zr=2,Zc=2,Qc=(e,t)=>Array.from({length:t},()=>e).flat(),Jc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},ed=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Jc(r,e))},td=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:l,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var b,P,O;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!o)return;const S=p.current;S!=null&&S.complete&&(s==null||s())},[o,(b=e.image)==null?void 0:b.url,s]);const u=n.display==="cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[f,m]=T.split(":").map(Number),w=(x?m:f)/(x?f:m);let $=r,v=$/w;v>i&&(v=i,$=v*w);const F=c($),L=c(v),H=((P=e.image)==null?void 0:P.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((O=e.image)==null?void 0:O.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:o?s:void 0,onError:o?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:F}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:F,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:H&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ee(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:H}):H})})},nd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=d.useMemo(()=>Gc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:x,imageFit:f,hoverEffect:m}=e,g=!!i,C=!n||!!r,w=C&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,$=n?!!r:!0,F=((t==null?void 0:t.length)??0)>0&&($||!!n),L=Math.max(0,c)*Yc,H=U=>y.scalingValue(U,n??!1),b=d.useRef(null),P=d.useRef(null),O=d.useRef(null),[S,E]=d.useState(0),[A,W]=d.useState(0),j=$&&p==="on",[te,k]=d.useState(!1),[M,D]=d.useState({}),N=d.useRef(M);N.current=M;const I=d.useRef(null),K=d.useRef(0),Z=d.useRef(null),Q=d.useMemo(()=>(t??[]).map(U=>{var G;return((G=U.image)==null?void 0:G.url)??""}).join("\0"),[t]),[R,ne]=d.useState(zr),h=d.useMemo(()=>{const U=t??[];return!$||U.length===0?U:Qc(U,R)},[t,$,R]),ee=d.useMemo(()=>h.filter(U=>{var G;return!!((G=U.image)!=null&&G.url)}).length,[h]),ge=F?Zc:1;d.useLayoutEffect(()=>{K.current=0,D({}),I.current=null,ne(zr),E(0)},[Q]),d.useEffect(()=>{if(!C||m!=="randomize")return;const U=b.current;if(!U)return;const G=$e=>{D(Le=>{let _e=null;for(const B of $e)B in Le&&(ed(U,B)||(_e||(_e={...Le}),delete _e[B]));return _e??Le})},se=new IntersectionObserver($e=>{const Le=new Set;for(const _e of $e){const B=_e.target.dataset.marqueeItemIndex,oe=B!==void 0?Number(B):NaN;Number.isNaN(oe)||Le.add(oe)}Le.size>0&&G(Le)},{root:U,threshold:0});Object.keys(M).forEach($e=>{const Le=Number($e);U.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(_e=>se.observe(_e))});let ye=0;const Te=()=>{const $e=Object.keys(N.current);$e.length!==0&&(G($e.map(Number)),ye=requestAnimationFrame(Te))};return Object.keys(N.current).length>0&&(ye=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(ye),se.disconnect()}},[m,M,C]),d.useLayoutEffect(()=>{if(!F)return;const U=b.current,G=O.current;if(!U||!G)return;let se=0;const ye=()=>{const Le=U.getBoundingClientRect().width,_e=G.getBoundingClientRect().width,B=I.current,oe=typeof B=="number"&&Math.abs(B-_e)<=.25;if(I.current=_e,$&&_e>0&&R>0){const _=_e/R;if(_>0&&Le>0){const z=Math.max(zr,Math.ceil(Le/_)+1);if(z!==R){ne(z);return}}}if(_e>0&&S<=0){E(_e);return}oe&&_e!==S?E(_e):!oe&&S<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(ye))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(ye)};Z.current=Te,Te();const $e=new ResizeObserver(Te);return $e.observe(U),$e.observe(G),()=>{Z.current=null,cancelAnimationFrame(se),$e.disconnect()}},[$,F,S,Q,R]),d.useLayoutEffect(()=>{const U=P.current;if(!F||!U)return;const G=S>0?S:0,se=G>0&&L>0?G/L*1e3:0,ye=`${Math.max(0,se)/1e3}s`;U.style.setProperty("--marquee-distance",`${G}px`),U.style.setProperty("--marquee-duration",ye)},[$,F,L,S]),d.useLayoutEffect(()=>{if(!F){W(0);return}if(S<=0){W(0);return}const U=P.current;if(!U)return;const G=()=>{const ye=U.getBoundingClientRect().height;W(ye>0?ye:0)};G();const se=new ResizeObserver(G);return se.observe(U),()=>se.disconnect()},[F,ge,h,n,u,T,x,S,f,M]);const le=()=>{j&&k(!0)},be=()=>{j&&k(!1)},re=d.useCallback(()=>{var U;K.current=Math.min(ee,K.current+1),(U=Z.current)==null||U.call(Z)},[ee]),ce=d.useCallback((U,G)=>{D(se=>{const ye=se[U]??G,Te=(t??[]).filter(Le=>Le!==ye);if(Te.length===0)return se;const $e=Te[Math.floor(Math.random()*Te.length)];return{...se,[U]:$e}})},[t]),V=(U,G,se,ye)=>{const Te=C&&m==="randomize"&&f.display==="cover"?M[se]??U:U,$e=`max(${H(u)}, ${Xc}px)`,Le=`calc(-0.5 * (${$e} + ${H(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:C&&m==="randomize"&&f.display==="cover"?()=>ce(se,U):void 0,children:[a.jsx(td,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:ye,scaled:H,onFirstSetImageDone:re}),g&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Le,width:$e,height:"100%"}})]},`${G}-${se}`)};if(F){const U=$?j&&te?"paused":"running":"paused";return a.jsxs("div",{ref:b,className:Ee(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:S>0&&A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{ref:P,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:le,onMouseLeave:be,style:{"--marquee-play-state":U},children:Array.from({length:ge},(G,se)=>a.jsx("div",{ref:se===0?O:void 0,className:Ee(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:H(u),paddingRight:H(u)},"aria-hidden":se>0,children:h.map((ye,Te)=>V(ye,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:b,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{className:Ee(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:H(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,G)=>V(U,0,G))},"marquee-static")]})},rd=`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:""}]}},id={element:nd,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:rd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function oi(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 ad=30,ii=2,sd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),{align:o,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:x,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:w,logoWidth:$,logoHeight:v,captionMarginTop:F}=e,L=!!i,H=((t==null?void 0:t.length)??0)>0,b=c>0&&(!n||r),P=H&&(b||n),O=Math.max(0,c)*ad,S=_=>y.scalingValue(_,n??!1),E=d.useRef(null),A=d.useRef(null),W=d.useRef(null),[j,te]=d.useState(0),[k,M]=d.useState(0),[D,N]=d.useState(0),I=b&&p==="on",[K,Z]=d.useState(!1),Q=d.useRef(null),[R,ne]=d.useState(0),[h,ee]=d.useState(0),ge=d.useRef(null),le=_=>{var q,Y,ae,me,We;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${_}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Y=e==null?void 0:e[`${_}FontSettings`])==null?void 0:Y.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((We=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:We.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},be=le("text"),re=le("caption"),ce=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var z,q;return(((z=_.text)==null?void 0:z.length)??0)>0||(((q=_.caption)==null?void 0:q.length)??0)>0}),[t]),V=d.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:k<=0||j<=0?ii:Math.max(ii,Math.ceil(j/k)+1),[P,t==null?void 0:t.length,k,j]);d.useLayoutEffect(()=>{if(!P)return;const _=E.current,z=W.current;if(!_||!z)return;let q=0;const Y=()=>{const We=_.getBoundingClientRect().width,he=z.getBoundingClientRect().width,ve=ge.current,Me=typeof ve=="number"&&Math.abs(ve-he)<=.25;if(ge.current=he,te(We),typeof he=="number"&&he>0&&k<=0){M(he);return}Me&&he!==k?M(he):!Me&&k<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(Y))},ae=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(Y)};ae();const me=new ResizeObserver(ae);return me.observe(_),me.observe(z),()=>{cancelAnimationFrame(q),me.disconnect()}},[b,P,k]),d.useLayoutEffect(()=>{const _=A.current;if(!P||!_)return;const z=k>0?k:0,q=z>0&&O>0?z/O*1e3:0,Y=`${Math.max(0,q)/1e3}s`;_.style.setProperty("--marquee-distance",`${z}px`),_.style.setProperty("--marquee-duration",Y)},[b,P,O,k]),d.useLayoutEffect(()=>{if(!P){N(0);return}const _=W.current,z=A.current;if(!_||!z)return;const q=()=>{let ae=0;for(let me=0;me<_.children.length;me++){const he=_.children[me].firstElementChild;he&&(ae=Math.max(ae,he.offsetHeight))}ae<=0&&(ae=z.offsetHeight),N(ae>0?ae:0)};q();const Y=new ResizeObserver(q);return Y.observe(_),Y.observe(z),()=>{Y.disconnect()}},[P,V,t,n,u,T,C,f,x,$,v,R,h]);const U=()=>{I&&Z(!0)},G=()=>{I&&Z(!1)},se=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[o]),ye=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[o]),Te=d.useCallback((_,z,q,Y)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?Y==null?void 0:Y.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:S((Y==null?void 0:Y.marginTop)??0)}}),a.jsx("div",{...Y!=null&&Y.dataMeasureKind?{"data-testimonial-measure":Y.dataMeasureKind}:{},style:{...Je(_,n),textAlign:ye,pointerEvents:"auto",...typeof(Y==null?void 0:Y.minHeightPx)=="number"&&Y.minHeightPx>0?{minHeight:Y.minHeightPx}:{}},children:a.jsx(Cn,{content:z})})]},q),[se,ye,n,L,l,S]),$e=d.useCallback((_,z,q)=>{var Y,ae,me;return a.jsxs("div",{style:{padding:`${S(C.top)} ${S(C.right)} ${S(C.bottom)} ${S(C.left)}`,width:S(T+f*2),height:"100%",borderRadius:S(x),border:`${S(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:g}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:ye},children:[_.text&&Te(be,_.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(q!=null&&q.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:S(w)}}),a.jsx("div",{style:{width:S($),height:S(v)},children:((Y=_.logo)==null?void 0:Y.url)&&a.jsx("img",{src:_.logo.url,alt:((ae=_.logo)==null?void 0:ae.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=_.logo)==null?void 0:me.objectFit)||"contain"}})})]}),_.caption&&Te(re,_.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[g,F,re,T,x,v,w,$,se,ye,C.bottom,C.left,C.right,C.top,Te,f,m,be,n,L,l]),Le=d.useCallback(_=>{ne(_.maxTextPx),ee(_.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!ce){Le({maxTextPx:0,maxCaptionPx:0});return}const _=Q.current;if(!_)return;const z=()=>{y.readTestimonialTextMeasure(_,Le)};z();const q=new ResizeObserver(z);return q.observe(_),()=>{q.disconnect()}},[ce,Le,t,$e]);const _e=ce?{textMinHeightPx:R,captionMinHeightPx:h}:void 0,B=ce?a.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,z)=>$e(_,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,oe=(_,z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[$e(_,`card-${z}`,_e),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${S(u)})`,width:S(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);if(P){const _=b?I&&K?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:Ee(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...D>0?{height:D}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:oi(l)}}),B,a.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:U,onMouseLeave:G,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":_},children:Array.from({length:V},(z,q)=>a.jsx("div",{ref:q===0?W:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:S(u),paddingRight:S(u)},"aria-hidden":q>0,children:t==null?void 0:t.map((Y,ae)=>oe(Y,`${q}-${ae}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:oi(l)}}),B,a.jsx("div",{style:{gap:S(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,z)=>oe(_,z))})]})},ld=`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
|
+
`,ai={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},cd={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:{...ai.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:{...ai.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"}]}]}]}},dd={element:sd,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:cd,sourceCode:ld,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ud(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 pd=3e3,md=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:x,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:w}=e,$=c>0&&(!n||!!r),[v,F]=d.useState(0),[L,H]=d.useState(null),[b,P]=d.useState(!1),O=d.useRef(null),S=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),E=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{F(0),H(null),P(!1)},[o.length]);const A=o[v],W=L===null?null:o[L],j=re=>{var V,U,G,se,ye;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${re}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${re}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((ye=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:ye.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"}},te=j("text"),k=j("caption"),M=o.length>1&&o.some(re=>{var ce,V;return(((ce=re.text)==null?void 0:ce.length)??0)>0||(((V=re.caption)==null?void 0:V.length)??0)>0}),D=d.useRef(null),[N,I]=d.useState(0),[K,Z]=d.useState(0),Q=e.controls??{mode:"Off",icon:null},R=o.length>1,ne=d.useCallback((re,ce)=>!R||ce===re?re:(O.current&&window.clearTimeout(O.current),H(re),P(!0),O.current=window.setTimeout(()=>{H(null),P(!1),O.current=null},300),ce),[R]),h=d.useCallback(()=>{R&&F(re=>ne(re,(re-1+o.length)%o.length))},[R,ne,o.length]),ee=d.useCallback(()=>{R&&F(re=>ne(re,(re+1)%o.length))},[R,ne,o.length]);d.useEffect(()=>{if(!$||!R)return;const re=Math.max(300,pd/c),ce=window.setInterval(()=>{F(V=>ne(V,(V+1)%o.length))},re);return()=>{window.clearInterval(ce)}},[$,R,ne,o.length,c]),d.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ge=(re,ce)=>{var ye,Te,$e,Le;const V=ce==null?void 0:ce.textMinHeightPx,U=ce==null?void 0:ce.captionMinHeightPx,G=ce==null?void 0:ce.dataMeasureAttrs,se=i&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(T??0,n??!1)}}),a.jsx("div",{...G&&{"data-testimonial-measure":"text"},style:{...Je(te,n),...V&&V>0?{minHeight:V}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Cn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:y.scalingValue(f??0,n??!1),height:y.scalingValue(m??0,n??!1)},children:((ye=re.image)==null?void 0:ye.url)&&a.jsx("img",{src:(Te=re.image)==null?void 0:Te.url,alt:(($e=re.image)==null?void 0:$e.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:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...Je(k,n),...U&&U>0?{minHeight:U}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Cn,{content:re.caption})})]})]})},le=d.useCallback(re=>{I(re.maxTextPx),Z(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!M){le({maxTextPx:0,maxCaptionPx:0});return}const re=D.current;if(!re)return;const ce=()=>{y.readTestimonialTextMeasure(re,le)};ce();const V=new ResizeObserver(ce);return V.observe(re),()=>{V.disconnect()}},[M,le,t]),!A)return a.jsx(a.Fragment,{});const be=M?{textMinHeightPx:N,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ud(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(p??0,n??!1),alignItems:S},children:[M&&a.jsx("div",{ref:D,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.map((re,ce)=>a.jsx("div",{style:{width:"100%"},children:ge(re,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[W&&b&&a.jsx("div",{className:Ee(`${l}-fade-item-prev`,`${l}-fade-out`),children:ge(W,{...be,hideControls:!0})}),a.jsx("div",{className:Ee(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:ge(A,be)})]})]}),Q.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!R,"aria-label":"Previous testimonial",children:Q.icon&&a.jsx(Ht,{url:Q.icon,fill:C,hoverFill:w,className:Ee(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Ee(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ee,disabled:!R,"aria-label":"Next testimonial",children:Q.icon&&a.jsx(Ht,{url:Q.icon,fill:C,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},gd=`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
|
+
`,hd="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>'),si={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},fd={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:{...si.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:{...si.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:hd},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"}]}]}]}},yd={element:md,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:fd,sourceCode:gd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function vd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function li(e){return((e==null?void 0:e.trim().length)??0)>0}function jr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function qr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((i-t)/2,r)}}function bd(e){return`
|
|
3646
3646
|
.${e}-wrapper {
|
|
3647
3647
|
display: grid;
|
|
3648
3648
|
align-items: start;
|
|
3649
|
-
min-height: ${
|
|
3649
|
+
min-height: ${vd(48)};
|
|
3650
3650
|
}
|
|
3651
3651
|
.${e}-item {
|
|
3652
3652
|
display: flex;
|
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const Lt=500,md=750,Mt="cubic-bezier(0.22, 1, 0.36, 1)";function Ft(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ao({media:e,className:t,style:n,onImageClick:r}){return Ft(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function gd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:p}){const u=n==="cover",T=d.useRef(null),y=d.useRef(null),[f,m]=d.useState(null),[g,$]=d.useState(r?"opening":"open"),[C,S]=d.useState(!0),v=d.useRef(t),M=d.useCallback(()=>{const x=T.current,P=y.current;if(!x||!P)return;const A=x.getBoundingClientRect(),F=A.width,j=A.height,ee=P.naturalWidth,k=P.naturalHeight;if(!F||!j||!ee||!k)return;if(n==="cover"){m({width:F,height:j,left:A.left,top:A.top});return}const W=ee/k,D=F/j;if(W>D){const O=F/W;m({width:F,height:O,left:A.left,top:A.top+(j-O)/2})}else{const O=j*W;m({width:O,height:j,left:A.left+(F-O)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const x=T.current;if(!x)return;const P=new ResizeObserver(()=>M());return P.observe(x),()=>P.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&$("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const x=setTimeout(()=>a(),Lt);return()=>clearTimeout(x)},[g,a]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const x=P=>{P.key==="Escape"&&(P.preventDefault(),P.stopPropagation(),g!=="closing"&&$("closing"))};return window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)},[g]);const L=()=>{g!=="closing"&&$("closing")},N=g==="open",b=g==="closing",E=b&&i&&!!r,B=g==="opening"?r??f:E?r:f;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${Lt}ms ${Mt}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.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 ${Lt}ms ${Mt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:p,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${Lt}ms ${Mt}`},children:e.length>1&&l.jsxs("p",{className:o,style:p,children:[t+1," / ",e.length]})})]})}),B&&l.jsx("img",{ref:y,src:e[t],onLoad:M,style:{position:"fixed",top:B.top,left:B.left,width:B.width,height:B.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!E?0:1,transition:b&&!E?`opacity ${Lt}ms ${Mt}`:E||C?`top ${Lt}ms ${Mt}, left ${Lt}ms ${Mt}, width ${Lt}ms ${Mt}, height ${Lt}ms ${Mt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&f&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:x=>{x.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:x=>{x.stopPropagation(),c()}})]})]})}function hd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function fd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=w.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:y,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:$,slider:C,sliderTiming:S,direction:v,transition:M,titleMarginTop:L,subtitleMarginTop:N,titleColor:b,subtitleColor:E,lightboxCounterColor:B,titleFontFamily:x,titleFontSettings:P,titleFontSize:A,titleLineHeight:F,titleLetterSpacing:j,titleWordSpacing:ee,titleTextAppearance:k,subtitleFontFamily:W,subtitleFontSettings:D,subtitleFontSize:O,subtitleLineHeight:I,subtitleLetterSpacing:q,subtitleWordSpacing:X,subtitleTextAppearance:J,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:te,lightboxCounterLetterSpacing:ve,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:xe,showText:re="always",alignEntries:de="off"}=e,V={fontSettings:{fontFamily:x,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:A??.01,lineHeight:F,letterSpacing:j??0,wordSpacing:ee??0,textAppearance:k,color:b},Q={...Ct(nt(V,n))},se={fontSettings:{fontFamily:W,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:O??.01,lineHeight:I,letterSpacing:q??0,wordSpacing:X??0,textAppearance:J,color:E},Le={...Ct(nt(se,n))},Ce={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:te,letterSpacing:ve??0,wordSpacing:ce??0,textAppearance:xe,color:B},Ie={...Ct(nt(Ce,n)),...zr(h,te,o,n)},H=Dr(A,F,`${o}-item-title`,`${o}-text-tight-leading`),ie=Dr(O,I,`${o}-item-subtitle`,`${o}-text-tight-leading`),_=zr(A,F,o,n),z=zr(O,I,o,n),K=Dr(h,te,`${o}-lightbox-counter`,`${o}-text-tight-leading`),G=w.buildColorVars(o,{titleColor:b,subtitleColor:E,lightboxCounterColor:B},yd,vd),We=`${s&&s!=="default"?`${o}-state-${s}`:""}${re==="on hover"&&(!n||r)?` ${o}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,fe=(t??[]).slice(0,he),Fe=u.entryWidth??.2,ae=(g==null?void 0:g.display)==="cover",be=(g==null?void 0:g.ratioValue)??"1:1",Re=(g==null?void 0:g.reversed)??!1,[ke,ze]=be.split(":").map(Number),bt=`${Re?ze:ke} / ${Re?ke:ze}`,Tt=w.scalingValue(Fe??0,n),Kt=!ae&&C!=="off",xt={width:Tt,...ae?{aspectRatio:bt,height:"auto",overflow:"hidden"}:{height:"auto"}},qt=`${o}-item-image-wrapper${Kt?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),Se=p==="c",Ye=Se&&de==="on",Ke=`calc(${w.scalingValue(Fe??0,n)} * (${T} / 100))`,rt=w.scalingValue(Fe*T/100,n),wn=ae?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Tn,Ut]=d.useState("ltr"),[tn,Ln]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const _e=$e.current;if(!_e)return;const ot=new ResizeObserver(at=>{Ln(Math.round(at[0].contentRect.width))});return ot.observe(_e),()=>ot.disconnect()},[]);const Xe=(()=>{const _e={...G},ot=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return ot&&(_e["--cntrl-article-width"]=ot),_e})(),[je,Oe]=d.useState(!1),[it,Yn]=d.useState([]),[Rr,nn]=d.useState(0),[kr,Xn]=d.useState(null),Zn=(_e,ot,at)=>{if(n&&!r||m==="off")return;const Y=_e.currentTarget.getBoundingClientRect();Xn({top:Y.top,left:Y.left,width:Y.width,height:Y.height}),Yn(ot),nn(at),Oe(!0)};d.useEffect(()=>{if(!je||m!=="on"||typeof document>"u")return;const _e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=_e}},[je,m]),d.useEffect(()=>{!n||r||(Oe(!1),Xn(null))},[n,r]);const Wr=d.useMemo(()=>pd(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Wr}}),l.jsx("div",{style:G,children:l.jsx("div",{ref:$e,className:`${o}-wrapper ${o}-type-${p}${Ye?` ${o}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ye?0:w.scalingValue(y??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n),...Ye?{[`--${o}-align-entries-row-gap`]:w.scalingValue(y??0,n)}:{}},children:fe.map((_e,ot)=>{var Ue,ct;const at=oo(_e.title),Y=oo(_e.subtitle),ue=(((Ue=_e.link)==null?void 0:Ue.length)??0)>0&&m==="off"?_e.link:void 0,me=Math.floor(ot/u.columnsCount)===Math.ceil(fe.length/u.columnsCount)-1,we=Se?l.jsxs("div",{className:`${o}-item-text-block`,children:[at&&l.jsx("p",{className:H,style:{width:Ke,...Q,..._},children:_e.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:rt}}),Y&&l.jsx("p",{className:ie,style:{width:Ke,...Le,...z},children:_e.subtitle}),Y&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(N??0,n),width:rt}})]}):null,Ve=Se?l.jsxs("div",{className:`${o}-item-title-row`,children:[at&&l.jsx("p",{className:H,style:{width:Ke,...Q,..._},children:_e.title}),at&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:rt}})]}):null,qe=Se?l.jsxs("div",{className:`${o}-item-subtitle-row`,children:[Y&&l.jsx("p",{className:ie,style:{width:Ke,...Le,...z},children:_e.subtitle}),Y&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:w.scalingValue(N??0,n),width:rt}})]}):null,Te=ue?l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-text-link`,children:[Ve,qe]}):l.jsxs(l.Fragment,{children:[Ve,qe]}),st=l.jsx("div",{className:qt,style:xt,children:(((ct=_e.image)==null?void 0:ct.length)??0)===0?null:C==="off"?(()=>{const Me=_e.image[0],et=_e.image.filter(Ze=>!Ft(Ze)).map(Ze=>Ze.url);return l.jsx(ao,{media:Me,className:`${o}-item-${Ft(Me)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(Me)?void 0:Ze=>Zn(Ze,et,0)})})():l.jsxs(l.Fragment,{children:[Kt&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:_e.image.map(Me=>Ft(Me)?l.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):l.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),l.jsx(wi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:md,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Tn},onMoved:Me=>{if(v!=="random"||M==="fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ut(Qe),setTimeout(()=>{Me.refresh()},0)},children:_e.image.map((Me,Qe)=>{const et=_e.image.filter(Ge=>!Ft(Ge)),Ze=et.map(Ge=>Ge.url),rn=et.findIndex(Ge=>Ge.url===Me.url);return l.jsx(Ti,{children:l.jsx(ao,{media:Me,className:`${o}-item-${Ft(Me)?"video":"image"}`.trim(),style:wn,onImageClick:Ft(Me)?void 0:Ge=>Zn(Ge,Ze,rn)})},Qe)})},`${M}-${Fe}-${v}-${S}-${tn}-${c}`)]})}),lt=Se?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&at?"titleMarginTop":void 0,className:i&&at?`${o}-control`:void 0,style:{height:at?w.scalingValue(L??0,n):0,width:rt}}),l.jsx("p",{className:H,style:{width:Ke,...Q,..._},children:_e.title}),l.jsx("div",{"data-controls":i&&Y?"subtitleMarginTop":void 0,className:i&&Y?`${o}-control`:void 0,style:{height:Y?w.scalingValue(N??0,n):0,width:rt}}),l.jsx("p",{className:ie,style:{width:Ke,...Le,...z},children:_e.subtitle})]});return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:`${i?`${o}-item-inner`:`${o}-item-inner-hidden`}${Ye&&me?` ${o}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${w.scalingValue(Fe??0,n)} * (${T} / 100))`:w.scalingValue(Fe??0,n)},children:Ye?l.jsxs(l.Fragment,{children:[Te,l.jsx("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:st})]}):l.jsxs("a",{href:ue,target:"_blank",className:`${o}-item-image-link`,children:[we,st,lt]})})},ot)})})}),(!n||r)&&je&&typeof document<"u"&&m==="on"&&So.createPortal(l.jsx("div",{style:Xe,"data-selection":"none",children:l.jsx(gd,{images:it,index:Rr,imageDisplay:hd($),originRect:kr,reverseClose:C==="off",onClose:()=>Oe(!1),onPrev:()=>nn(_e=>(_e-1+it.length)%it.length),onNext:()=>nn(_e=>(_e+1)%it.length),counterClassName:K,counterStyle:Ie})}),document.body)]})}const yd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},vd=["hover","focus","filled","success","error"],bd=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3848
|
+
`}const Rt=500,xd=750,Dt="cubic-bezier(0.22, 1, 0.36, 1)";function qt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ci({media:e,className:t,style:n,onImageClick:r}){return qt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function Cd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,$]=d.useState(!0),v=d.useRef(t),F=d.useCallback(()=>{const S=T.current,E=x.current;if(!S||!E)return;const A=S.getBoundingClientRect(),W=A.width,j=A.height,te=E.naturalWidth,k=E.naturalHeight;if(!W||!j||!te||!k)return;if(n==="cover"){m({width:W,height:j,left:A.left,top:A.top});return}const M=te/k,D=W/j;if(M>D){const N=W/M;m({width:W,height:N,left:A.left,top:A.top+(j-N)/2})}else{const N=j*M;m({width:N,height:j,left:A.left+(W-N)/2,top:A.top})}},[n]);d.useEffect(()=>{F();const S=T.current;if(!S)return;const E=new ResizeObserver(()=>F());return E.observe(S),()=>E.disconnect()},[F,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const S=setTimeout(()=>l(),Rt);return()=>clearTimeout(S)},[g,l]),d.useEffect(()=>{v.current!==t&&$(!1),v.current=t},[t]),d.useEffect(()=>{const S=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",S,!0),()=>window.removeEventListener("keydown",S,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},H=g==="open",b=g==="closing",P=b&&i&&!!r,O=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?1:0,transition:`opacity ${Rt}ms ${Dt}`,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:T,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:H?1:0,transition:`opacity ${Rt}ms ${Dt}`,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:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${Rt}ms ${Dt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),O&&a.jsx("img",{ref:x,src:e[t],onLoad:F,style:{position:"fixed",top:O.top,left:O.left,width:O.width,height:O.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!P?0:1,transition:b&&!P?`opacity ${Rt}ms ${Dt}`:P||w?`top ${Rt}ms ${Dt}, left ${Rt}ms ${Dt}, width ${Rt}ms ${Dt}, height ${Rt}ms ${Dt}`:"none",pointerEvents:"none",zIndex:9998}}),H&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:S=>{S.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:S=>{S.stopPropagation(),c()}})]})]})}function $d(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Sd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:$,direction:v,transition:F,titleMarginTop:L,subtitleMarginTop:H,titleColor:b,subtitleColor:P,lightboxCounterColor:O,titleFontFamily:S,titleFontSettings:E,titleFontSize:A,titleLineHeight:W,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:M,subtitleFontSettings:D,subtitleFontSize:N,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Z,subtitleTextAppearance:Q,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:ce="off"}=e,V={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:W,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...vt(Je(V,n))},se={fontSettings:{fontFamily:M,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:N??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Z??0,textAppearance:Q,color:P},Te={...vt(Je(se,n))},$e={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:O},_e={...vt(Je($e,n)),...qr(h,ee,s,n)},B=jr(A,W,`${s}-item-title`,`${s}-text-tight-leading`),oe=jr(N,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=qr(A,W,s,n),z=qr(N,I,s,n),q=jr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:P,lightboxCounterColor:O},wd,Td),We=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),he=f===0?1/0:f,ve=(t??[]).slice(0,he),Me=u.entryWidth??.2,ie=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ie=(g==null?void 0:g.reversed)??!1,[ke,Ve]=xe.split(":").map(Number),mt=`${Ie?Ve:ke} / ${Ie?ke:Ve}`,Ct=y.scalingValue(Me??0,n),_t=!ie&&w!=="off",gt={width:Ct,...ie?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),pe=p==="c",Ne=pe&&ce==="on",Be=`calc(${y.scalingValue(Me??0,n)} * (${T} / 100))`,Ue=y.scalingValue(Me*T/100,n),$t=ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Vt,ht]=d.useState("ltr"),[It,_n]=d.useState(0),Se=d.useRef(null);d.useEffect(()=>{const Re=Se.current;if(!Re)return;const st=new ResizeObserver(lt=>{_n(Math.round(lt[0].contentRect.width))});return st.observe(Re),()=>st.disconnect()},[]);const Qe=(()=>{const Re={...Y},st=Se.current?getComputedStyle(Se.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Re["--cntrl-article-width"]=st),Re})(),[Ke,De]=d.useState(!1),[at,Zn]=d.useState([]),[Wr,sn]=d.useState(0),[Mr,Qn]=d.useState(null),Jn=(Re,st,lt)=>{if(n&&!r||m==="off")return;const X=Re.currentTarget.getBoundingClientRect();Qn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(st),sn(lt),De(!0)};d.useEffect(()=>{if(!Ke||m!=="on"||typeof document>"u")return;const Re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Re}},[Ke,m]),d.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Fr=d.useMemo(()=>bd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Fr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:Se,className:`${s}-wrapper ${s}-type-${p}${Ne?` ${s}-align-entries`:""} ${We}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Ne?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...Ne?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Re,st)=>{var Ye,ut;const lt=li(Re.title),X=li(Re.subtitle),ue=(((Ye=Re.link)==null?void 0:Ye.length)??0)>0&&m==="off"?Re.link:void 0,fe=Math.floor(st/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=pe?a.jsxs("div",{className:`${s}-item-text-block`,children:[lt&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),lt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Re.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(H??0,n),width:Ue}})]}):null,je=pe?a.jsxs("div",{className:`${s}-item-title-row`,children:[lt&&a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),lt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ge=pe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Re.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(H??0,n),width:Ue}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Ge]}):a.jsxs(a.Fragment,{children:[je,Ge]}),ct=a.jsx("div",{className:At,style:gt,children:(((ut=Re.image)==null?void 0:ut.length)??0)===0?null:w==="off"?(()=>{const Fe=Re.image[0],ot=Re.image.filter(et=>!qt(et)).map(et=>et.url);return a.jsx(ci,{media:Fe,className:`${s}-item-${qt(Fe)?"video":"image"}`.trim(),style:$t,onImageClick:qt(Fe)?void 0:et=>Jn(et,ot,0)})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Re.image.map(Fe=>qt(Fe)?a.jsx("video",{src:Fe.url,muted:!0,playsInline:!0},`sizer-${Fe.url}`):a.jsx("img",{src:Fe.url,alt:""},`sizer-${Fe.url}`))}),a.jsx(Po,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:xd,type:F==="fade"?"fade":"loop",rewind:F==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:F==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":Vt},onMoved:Fe=>{if(v!=="random"||F==="fade")return;const rt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";ht(rt),setTimeout(()=>{Fe.refresh()},0)},children:Re.image.map((Fe,rt)=>{const ot=Re.image.filter(Xe=>!qt(Xe)),et=ot.map(Xe=>Xe.url),ln=ot.findIndex(Xe=>Xe.url===Fe.url);return a.jsx(Eo,{children:a.jsx(ci,{media:Fe,className:`${s}-item-${qt(Fe)?"video":"image"}`.trim(),style:$t,onImageClick:qt(Fe)?void 0:Xe=>Jn(Xe,et,ln)})},rt)})},`${F}-${Me}-${v}-${$}-${It}-${c}`)]})}),dt=pe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&<?"titleMarginTop":void 0,className:i&<?`${s}-control`:void 0,style:{height:lt?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Be,...G,..._},children:Re.title}),a.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(H??0,n):0,width:Ue}}),a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Re.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${Ne&&fe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(Me??0,n)} * (${T} / 100))`:y.scalingValue(Me??0,n)},children:Ne?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:ct})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,ct,dt]})})},st)})})}),(!n||r)&&Ke&&typeof document<"u"&&m==="on"&&_i.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Cd,{images:at,index:Wr,imageDisplay:$d(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>sn(Re=>(Re-1+at.length)%at.length),onNext:()=>sn(Re=>(Re+1)%at.length),counterClassName:q,counterStyle:_e})}),document.body)]})}const wd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Td=["hover","focus","filled","success","error"],Ld=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';\r
|
|
3850
3850
|
import { CommonComponentProps } from '../props';\r
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -5014,11 +5014,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
|
|
|
5014
5014
|
};\r
|
|
5015
5015
|
\r
|
|
5016
5016
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
5017
|
-
`,jr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},xd=["titleColor","subtitleColor","lightboxCounterColor"],Cd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jr.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:{...jr.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:{...jr.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:[...xd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Sd={element:fd,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Cd,sourceCode:bd};function $d(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 wd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const i=r.current;if(!i)return;const a=i.play();a&&a.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?l.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):l.jsx("img",{className:t,src:e.url,alt:"",style:n})}function dr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Td(e){return String(e??"").trim().length>0}function so(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function lo(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function co(e,t,n,r,i,a,s){const c=w.scalingValue(a,s),o=w.scalingValue(0,s),p=e===0,u=e===t-1&&!i;return{borderTopWidth:p&&n?c:o,borderBottomWidth:!u||r?c:o}}function Ld(e,t,n){const r=w.scalingValue(t,n),i=w.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const uo=10;function Ed(e){return`
|
|
5017
|
+
`,Kr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pd=["titleColor","subtitleColor","lightboxCounterColor"],Ed={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...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:[...Pd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},_d={element:Sd,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ed,sourceCode:Ld},di=12;function Ad(e,t="50%"){const n={position:"absolute",width:di,height:di,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,...i}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:Ad(n,r)})})}function Id(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 Rd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const i=r.current;if(!i)return;const l=i.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 kd(e){return String(e??"").trim().length>0}function ui(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function pi(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function mi(e,t,n,r,i,l,o){const c=y.scalingValue(l,o),s=y.scalingValue(0,o),p=e===0,u=e===t-1&&!i;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Wd(e,t,n){const r=y.scalingValue(t,n),i=y.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const gi=10;function Md(e){return`
|
|
5018
5018
|
.${e}-wrapper {
|
|
5019
5019
|
display: grid;
|
|
5020
5020
|
align-items: start;
|
|
5021
|
-
min-height: ${
|
|
5021
|
+
min-height: ${pr(48)};
|
|
5022
5022
|
position: relative;
|
|
5023
5023
|
overflow: visible;
|
|
5024
5024
|
box-sizing: border-box;
|
|
@@ -5140,7 +5140,7 @@ a.${e}-list-item {
|
|
|
5140
5140
|
flex-shrink: 0;
|
|
5141
5141
|
overflow: visible;
|
|
5142
5142
|
box-sizing: border-box;
|
|
5143
|
-
min-width: ${
|
|
5143
|
+
min-width: ${pr(50)};
|
|
5144
5144
|
position: relative;
|
|
5145
5145
|
display: flex;
|
|
5146
5146
|
align-items: flex-start;
|
|
@@ -5148,7 +5148,7 @@ a.${e}-list-item {
|
|
|
5148
5148
|
|
|
5149
5149
|
.${e}-list-col-last {
|
|
5150
5150
|
flex: 1 1 auto;
|
|
5151
|
-
min-width: ${
|
|
5151
|
+
min-width: ${pr(50)};
|
|
5152
5152
|
}
|
|
5153
5153
|
|
|
5154
5154
|
.${e}-list-col-title {
|
|
@@ -5445,10 +5445,11 @@ a.${e}-list-item {
|
|
|
5445
5445
|
overflow-wrap: anywhere;
|
|
5446
5446
|
word-break: break-word;
|
|
5447
5447
|
}
|
|
5448
|
-
`}const Vt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Li=["AColumn","BColumn","CColumn","DColumn","EColumn"],Rt="cutLabel",Ei=[...Li,Rt],Ir=["A","B","C","D","E"];function aa(e){return`${e}ColumnVerticalAlign`}const ri=["Top","Center","Bottom"];function Pi(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Ir.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Pd(e){const t=Pi(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function _d(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ir.includes(n)?n:null}function sa(e,t,n){const r=_d(e);return r?r===t?!1:Pd(n[aa(r)]):!0}function Hn(e){const t=Pi(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ir.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ad(e,t,n){if(la(e,t,n))return Hn(e);const r=Hn(e);return r.kind==="baseline"?{kind:"top"}:r}function Id(e){const t=Hn(e);return t.kind==="baseline"?{kind:"top"}:t}function la(e,t,n){return sa(e,n,t)?Hn(e).kind==="baseline":!1}function Rd(e){const t={};let n=!1;for(const r of Ir){const i=aa(r),a=e[i];if(e.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}sa(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function kd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Wd(e){const t=Hn(e).kind;return t==="baseline"?"center":t}function Md(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function po(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Fd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Kr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=Fd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-o)/2:e.kind==="bottom"&&(p=c.height-o),c.top-t+p+s}function Nd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),r)}function Hd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Od={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ee(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Bd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Vd(e){return[Ee(e,"textFontFamily"),Ee(e,"textFontSettings"),{type:"row",items:[Ee(e,"textFontSize"),Ee(e,"textLineHeight"),Ee(e,"textLetterSpacing"),Ee(e,"textWordSpacing")]},Ee(e,"textTextAlign"),Ee(e,"textTextAppearance"),`${e}VerticalAlign`]}function Dd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ei.map(e=>[Bd[e],Vd(e)]))}}function vr(e,t){const n=r=>{const i=Ee(t,r);return e[i]};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===Rt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function mo(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.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 Ct(nt(n,t))}function go(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ho(e,t,n,r){const i=vr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((a-s)/2,r)}}const mt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],yn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],vn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],bn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},jd=["hover","focus","filled","success","error"],fo=.004,dn=.004,qr=dn,yo=12,_i=50,On=1440,Bn=_i/On;function ca(e){const t=typeof e=="number"&&e>0?e:On;return _i/t}function Kd(e,t){const n={position:"absolute",width:yo,height:yo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Et({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Kd(e,r)})})}function qd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return On}const da={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function _n(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ud(e,t=1){const n=t/e;return Object.fromEntries(mt.map(r=>[r,n]))}function Gd(){return Object.fromEntries([...yn.map(e=>[e,0]),...vn.map(e=>[e,0])])}function Yd(){return Object.fromEntries(bn.map(e=>[e,0]))}function ir(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function ua(e,t,n){const r=e-Bn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ur(e,t,n){const r=Ai(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Xd(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=yn[i],s=vn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,p=ua(t[i]??0,c,o);p.paddingLeft!==c&&(r[a]=p.paddingLeft),p.paddingRight!==o&&(r[s]=p.paddingRight)}return r}function Ai(e,t,n){if(e<=0)return[];const r=mt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((p,u)=>p+u,0)+Bn;if(t>=s)return r;const c=[...i];let o=s-t;for(let p=c.length-1;p>=0&&o>0;p-=1){const u=c[p]-Bn;if(u<=0)continue;const T=Math.min(o,u);c[p]-=T,o-=T}return[...c,r[e-1]]}function Zd(e,t,n){if(e<=1)return{};const r=Ai(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=mt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function vo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Vt]}function Jd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Qd(e,t,n,r){const i=Math.min(r,e.length,mt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const p=mt[o],u=yn[o],T=vn[o],y=bn[o],f=mt[s],m=yn[s],g=vn[s],$=bn[s],C=n[p],S=n[u],v=n[T],M=n[y];typeof C=="number"&&(a[f]=C),typeof S=="number"&&(a[m]=S),typeof v=="number"&&(a[g]=v),typeof M=="number"&&(a[$]=M)}return a}function pa(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 eu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=_n(e),a=e.type==="b"||e.type===void 0&&t.type==="b",s={...e,...Ud(n,i),...Gd()};if(a)for(const c of bn)typeof t[c]=="number"&&(s[c]=t[c]);else Object.assign(s,Yd());return pa(e,s)?s:e}function tu(e,t,n){const r=Rd(e);r&&(e={...e,...r});const i=ca(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=_n(e),o=_n(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof a=="number"?a:typeof s=="number"?s:Vt.length,T=v=>{if(p)return v;const M=ir({...t,...v}),L=_n(v),N=ur(u,L,M),b=Xd(u,N,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof a=="number"&&a!==s)return e;const y=vo(e),f=vo(t);if(!Jd(y,f))return T({...e,...Qd(y,f,t,u)});if(c<o&&typeof u=="number"&&!p){const v=ir({...t,...e});return T({...e,...Zd(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return v>M?{...e,textPaddingLR:M}:e}const m=ir({...t,...e}),g=ur(u,o,ir(t)),C=ur(u,c,m).some((v,M)=>v<(g[M]??v)),S=mt.some(v=>{const M=e[v],L=t[v];return typeof M=="number"&&typeof L=="number"&&M!==L});return C||S?T(e):e}function nu(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Bn,r-i-a-Bn)}function ru(e,t){return Math.random()*(t-e)+e}function iu(e){return Object.fromEntries(mt.map(t=>[t,typeof e[t]=="number"?e[t]:da[t]]))}function Ur(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function ou(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=yn[c],p=vn[c],u=bn[c];return{key:s,textPrefix:Od[s],widthKey:mt[c],width:n[mt[c]],paddingLeftKey:o,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[o],paddingRight:i[p],paddingBottom:a[u]}})}function au({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=w.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:y,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:$,cut:C,showCut:S,cutCellMinHeight:v,cutLabel:M,imageSize:L,imageOnHover:N,entryHoverEffect:b,entryHoverShowOption:E,rowPaddingTop:B,rowPaddingBottom:x,rowPaddingTopB:P,columnsOrder:A,textPaddingLR:F,textColor:j,backgroundColor:ee,dividerColor:k,textHoverColor:W,backgroundHoverColor:D,dividerHoverColor:O}=e,[I,q]=d.useState(void 0),[X,J]=d.useState(null),R=N==="on"&&(!n||r),ne=(C??0)>0,h=T==="b",te=d.useRef(null),ve=d.useRef(null),[ce,xe]=d.useState(null),[re,de]=d.useState(On),V=ca(re),U=Math.max(0,((y??0)-V)/2),Q=Math.min(F??0,U),se=Math.max(Q,dn),ge=((y??0)+V)/2;d.useLayoutEffect(()=>{if(!n){de(On);return}const Y=()=>{de(qd(te.current))};Y();const ue=te.current;if(!ue)return;const me=new ResizeObserver(Y);me.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&me.observe(we),()=>me.disconnect()},[n,s]),d.useEffect(()=>{q(void 0)},[C,S,t,f]),d.useEffect(()=>{n&&!r&&q(void 0)},[n,r]);const Le=w.buildColorVars(o,{textColor:j,backgroundColor:ee,dividerColor:k,textHoverColor:W,backgroundHoverColor:D,dividerHoverColor:O},zd,jd),Ce=a&&a!=="default"?`${o}-state-${a}`:"",Ie=`${!n||r?b==="default"?`${o}-entry-hover-default`:b==="blinds"?`${o}-entry-hover-blinds`:b==="reveal"?`${o}-entry-hover-reveal`:"":""} ${Ce}`.trim(),H=b==="reveal"&&(!n||r),ie=($==null?void 0:$[0])??!1,_=($==null?void 0:$[1])??!1,z=d.useRef(e),K=d.useRef(s);d.useEffect(()=>{if(!c||!n){z.current=e,K.current=s;return}if(K.current!==s){z.current=e,K.current=s;return}const Y=z.current;if(!(Y!==e))return;if(typeof Y.columns=="number"&&typeof e.columns=="number"&&Y.columns!==e.columns){z.current=e;return}const me=tu(e,Y,{designWidth:re});z.current=e,pa(e,me)&&c(me)},[e,c,n,s,re]);const G=d.useMemo(()=>iu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),oe=d.useMemo(()=>Ur(e,yn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),pe=d.useMemo(()=>Ur(e,vn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Ur(e,bn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Vt],[A]),fe=d.useMemo(()=>ou(he,u,G,oe,pe,We),[he,u,G,oe,pe,We]),Fe=_n(e),ae=d.useMemo(()=>mt.slice(0,u).map(Y=>G[Y]),[u,G]),be=d.useMemo(()=>Ai(u,Fe,G),[u,Fe,G]),Re=d.useMemo(()=>ur(u,Fe,G),[u,Fe,G]),ke=d.useMemo(()=>fe.map((Y,ue)=>ua(Re[ue]??0,Y.paddingLeft,Y.paddingRight)),[fe,Re]),ze=d.useMemo(()=>{const Y=f===0?1/0:f;return(t??[]).slice(0,Y).map((me,we)=>({id:we,cells:Object.fromEntries(Vt.map(Ve=>[Ve,me[Ve]??""])),image:me.image,link:me.link}))},[t,f]),dt=ne?I??C:ze.length,vt=d.useMemo(()=>ne?ze.slice(0,dt):ze,[ze,ne,dt]),bt=ne&&dt<ze.length,Tt=vt.length>1||bt,Kt=[ie?`${o}-divider-top`:"",_||Tt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),xt=!n||r,qt=()=>{if(!xt)return;const Y=I??C;if(!S){q(ze.length);return}q(Math.min(Y+S,ze.length))},Se=Y=>w.scalingValue(Y,n??!1),Ye=h?P??0:B??0,Ke=x??0,rt=m??0,wn=Ye+rt/2,Tn=Math.max(Ke,qr),Ut=co(0,vt.length,ie,_,bt,g??0,n??!1).borderTopWidth,tn=ce!=null?`${ce}px`:`calc(${Ut} + ${Se(wn)})`,Ln=h?"rowPaddingTopB":"rowPaddingTop",$e=fe[0],Xe=fe[fe.length-1],je=ke[0],Oe=ke[ke.length-1],it=$e&&je?Math.max(je.paddingLeft,dn):0,Yn=Xe&&Oe?Math.max(Oe.paddingRight,dn):0,Rr=Fe,nn=Y=>{const ue=te.current;if(!ue)return{x:0,y:0};const me=ue.getBoundingClientRect();return{x:Y.clientX-me.left+uo,y:Y.clientY-me.top+uo}},kr=(Y,ue)=>{if(!R)return;const me=Y.image;if(!(me!=null&&me.url)){J(null);return}const{x:we,y:Ve}=nn(ue),qe=(L==null?void 0:L.min)??80,Te=(L==null?void 0:L.max)??320,st=(X==null?void 0:X.rowId)===Y.id?X.widthPx:ru(qe,Te);J({rowId:Y.id,url:me.url,objectFit:"contain",isVideo:$d(me),widthPx:st,x:we,y:Ve})},Xn=Y=>{if(!R||!X)return;const{x:ue,y:me}=nn(Y);J(we=>!we||we.x===ue&&we.y===me?we:{...we,x:ue,y:me})},Zn=()=>{J(null)},Wr=Y=>{H&&so(Y,o),R&&J(null)},_e=Y=>{H&&lo(Y,o)};d.useLayoutEffect(()=>{if(!p||h){xe(null);return}const Y=ve.current,ue=Y==null?void 0:Y.parentElement;if(!Y||!ue){xe(null);return}const me=()=>{const Ve=Y.querySelector("[data-list-row]");if(!Ve){xe(null);return}const qe=ue.getBoundingClientRect(),Te=Ve.getBoundingClientRect();xe(Te.top-qe.top+Te.height/2)};me();const we=new ResizeObserver(me);return we.observe(Y),we.observe(ue),()=>we.disconnect()},[p,h,vt,Ye,Ke,rt,t,e,fe,Re,re,g,ie,_,bt]);const ot=d.useMemo(()=>!h&&Li.some(Y=>{const ue=Y.charAt(0),me=e[`${Y}VerticalAlign`];return la(me,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var st;const Y=te.current;if(!Y)return;const ue=()=>{Y.querySelectorAll("[data-list-col]").forEach(lt=>{lt.style.transform="";const Ue=lt.querySelector(`.${o}-list-col`);Ue&&(Ue.style.minHeight="",Ue.style.height="");const ct=lt.querySelector(`.${o}-list-col-title`);ct&&(ct.style.transform="")})};if(h||!ot){ue();return}const me=()=>{const lt=Array.from(Y.querySelectorAll("[data-list-row]")),Ue=`${o}-list-col`,ct=`${o}-baseline-probe`;lt.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(Qe=>{Qe.style.transform="";const et=Qe.querySelector(`.${Ue}`);et&&(et.style.minHeight="",et.style.height="");const Ze=Qe.querySelector(`.${o}-list-col-title`);Ze&&(Ze.style.transform="")})}),lt.forEach(Me=>{const Qe=Array.from(Me.querySelectorAll("[data-list-col]"));Nd(Me,Qe,Ue)}),Y.offsetHeight,lt.forEach(Me=>{const Qe=Array.from(Me.querySelectorAll("[data-list-col]")),et=Me.getBoundingClientRect().top,Ze=new Map,rn=Qe.map(Be=>{const on=Be.querySelector(`.${o}-list-col-title`),an={el:Be,titleEl:on,letter:Be.getAttribute("data-col-letter")??"",kind:Be.getAttribute("data-valign")??"top",anchor:Be.getAttribute("data-valign-anchor")};return Ze.set(an.letter,an),an}),Ge=new Map,Jn=(Be,on)=>{const an=Ge.get(Be.letter);if(an!==void 0)return an;const Ii=Be.anchor?Ze.get(Be.anchor):void 0;if(Be.kind!=="baseline"||!Ii||on.has(Be.letter)){const ki=Kr(Be,et,Ue,ct);return Ge.set(Be.letter,ki),ki}on.add(Be.letter);const ga=Jn(Ii,on);on.delete(Be.letter);const ha=Kr(Be,et,Ue,ct),fa=ga-ha;Hd(Be.titleEl,fa);const Ri=Kr(Be,et,Ue,ct);return Ge.set(Be.letter,Ri),Ri};rn.forEach(Be=>Jn(Be,new Set))})};let we=null;const Ve=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,me()}))};me();const qe=new ResizeObserver(()=>Ve());qe.observe(Y);let Te=!1;return typeof document<"u"&&((st=document.fonts)!=null&&st.ready)&&document.fonts.ready.then(()=>{Te||Ve()}),()=>{Te=!0,we!==null&&(cancelAnimationFrame(we),we=null),qe.disconnect(),ue()}},[ot,h,e,t,re,vt,Re]);const at=d.useMemo(()=>Ed(o),[o]);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:at}}),l.jsx("div",{style:Le,children:l.jsxs("div",{ref:te,className:`${o}-wrapper ${Ie}${Kt?` ${Kt}`:""}${h?` ${o}-type-b`:""}`.trim(),style:{width:w.scalingValue(y??0,n),...!h&&p?{[`--${o}-first-entry-handle-top`]:tn}:{}},onMouseMove:R?Xn:void 0,onMouseLeave:R?Zn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((Y,ue)=>{var qe;const me=(((qe=Y.link)==null?void 0:qe.length)??0)>0,we=me&&(!n||r)?"a":"div",Ve=co(ue,vt.length,ie,_,bt,g??0,n??!1);return l.jsxs(we,{ref:ue===0?Te=>{ve.current=Te}:void 0,className:`${o}-list-item${me||E==="always"?` ${o}-list-item-has-link`:""}`,...me?{href:Y.link,target:"_blank"}:{},style:Ve,onMouseEnter:Te=>{H&&(me||E==="always")&&so(Te,o),R&&kr(Y,Te)},onMouseLeave:Te=>{H&&(me||E==="always")&&lo(Te,o)},children:[Ye>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(Ye)}}),l.jsxs("div",{className:`${o}-list-cols-row${h?"":` ${o}-list-cols-row-h`}${p&&ue===0&&h?` ${o}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Se(rt)},children:[fe.map((Te,st)=>{const lt=st===fe.length-1,Ue=ke[st],ct=Te.paddingBottom,Me=Td(Y.cells[Te.key]),Qe=h&&Me&&ct>0,et=h?{minHeight:Se(rt)}:{width:Se(Re[st])},Ze=h?{paddingLeft:Se(Q),paddingRight:Se(Q)}:{paddingLeft:Se(Ue.paddingLeft),paddingRight:Se(Ue.paddingRight)},rn=Te.textPrefix.charAt(0),Ge=h?Id(e[`${Te.textPrefix}VerticalAlign`]):Ad(e[`${Te.textPrefix}VerticalAlign`],e,rn),Jn=h&&Me&&p&&ue===0;return l.jsxs("div",{className:h?`${o}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":rn,"data-valign":Ge.kind,...Ge.kind==="baseline"?{"data-valign-anchor":Ge.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${lt?` ${o}-list-col-last`:""}`,style:{...Ze,...et,...h?{justifyContent:po(Ge.kind)}:{}},"data-test":Te.width,children:l.jsx("span",{className:go(e,Te.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...mo(vr(e,Te.textPrefix),n),...ho(e,Te.textPrefix,o,n),...h?{}:kd(Ge.kind)},children:Y.cells[Te.key]??null})}),Qe&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(ct)}}),Jn&&l.jsx(Et,{P:o,"data-controls":Te.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(Math.max(ct,qr))}})]},Te.key)}),p&&ue===0&&h&&l.jsxs(l.Fragment,{children:[l.jsx(Et,{P:o,"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(ge),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Se(se),height:"100%"}}),l.jsx(Et,{P:o,"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(ge),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Se(Math.max(se,Fe-se)),width:Se(se),height:"100%"}})]})]}),!h&&Ke>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(Ke)}}),p&&ue===0&&!h&&l.jsx(Et,{P:o,"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(Tn)}})]},Y.id)}),p&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Et,{P:o,"data-controls":Ln,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Ut,left:0,width:"100%",height:Se(Math.max(Ye,qr))}})},"row-padding-handles"),p&&!h&&$e&&Xe&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":$e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Re[0]-((je==null?void 0:je.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Se(it),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":Xe.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(Re[fe.length-1]-((Oe==null?void 0:Oe.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Rr-Yn),width:Se(Yn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&fe.slice(0,-1).map((Y,ue)=>{const me=fe[ue+1],we=be.slice(0,ue+1).reduce((lt,Ue)=>lt+Ue,0),Ve=ke[ue],qe=ke[ue+1],Te=Math.max(Ve.paddingRight,dn),st=Math.max(qe.paddingLeft,dn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Et,{P:o,"data-controls":Y.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(Re[ue]-Ve.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(we-Te),width:Se(Te),height:"100%"}}),l.jsx(Et,{P:o,"data-controls":me.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Re[ue+1]-qe.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(we),width:Se(st),height:"100%"}})]},`${Y.paddingRightKey}-padding`)}),p&&!h&&fe.slice(0,-1).map((Y,ue)=>{const me=nu(ue,be,ae,Fe),Ve=be.slice(0,ue+1).reduce((qe,Te)=>qe+Te,0)-fo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":Y.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(_i),"data-controls-max-fraction":String(me),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Se(Ve),width:Se(fo),height:"calc(100%)",pointerEvents:"auto"}})},`${Y.widthKey}-junction`)})]}),bt&&(()=>{const Y=vr(e,Rt),ue=Wd(e.cutLabelVerticalAlign),me=Y.textTextAlign==="justify"||h;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:Se(v??0),cursor:xt?"pointer":"default",...Ld(_,g??0,n??!1)},onClick:xt?qt:void 0,onMouseEnter:H||R?Wr:void 0,onMouseLeave:H?_e:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...h?{paddingLeft:Se(Q),paddingRight:Se(Q)}:{},justifyContent:Md(Y.textTextAlign),alignItems:po(ue)},children:l.jsx("span",{className:go(e,Rt,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...mo(Y,n),...ho(e,Rt,o,n),...me?{width:"100%"}:{}},children:M})})})})(),R&&X&&(()=>{const Y=dr(X.widthPx),ue={width:Y,height:"auto",maxHeight:Y,objectFit:"contain",left:X.x,top:X.y,position:"absolute"};return l.jsx(wd,{media:X,className:X.isVideo?`${o}-hover-video`:`${o}-hover-image`,style:ue},`${X.rowId}-${X.url}`)})()]})})]})}const su=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';\r
|
|
5448
|
+
`}const Yt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],_o=["AColumn","BColumn","CColumn","DColumn","EColumn"],Nt="cutLabel",Ao=[..._o,Nt],kr=["A","B","C","D","E"];function ma(e){return`${e}ColumnVerticalAlign`}const io=["Top","Center","Bottom"];function Io(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 Fd(e){const t=Io(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(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 ga(e,t,n){const r=Hd(e);return r?r===t?!1:Fd(n[ma(r)]):!0}function On(e){const t=Io(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 Nd(e,t,n){if(ha(e,t,n))return On(e);const r=On(e);return r.kind==="baseline"?{kind:"top"}:r}function Bd(e){const t=On(e);return t.kind==="baseline"?{kind:"top"}:t}function ha(e,t,n){return ga(e,n,t)?On(e).kind==="baseline":!1}function Od(e){const t={};let n=!1;for(const r of kr){const i=ma(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}ga(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Vd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Dd(e){const t=On(e).kind;return t==="baseline"?"center":t}function zd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function jd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),l=i-r;return n.remove(),l}function Ur(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=jd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+o}function qd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Kd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Ud={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ae(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Gd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Yd(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 Xd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ao.map(e=>[Gd[e],Yd(e)]))}}function xr(e,t){const n=r=>{const i=Ae(t,r);return e[i]};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===Nt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.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(Je(n,t))}function yi(e,t,n,r){const i=xr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=xr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-o)/2,r)}}const bt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Sn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],wn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Qd=["hover","focus","filled","success","error"],bi=.004,gn=.004,Gr=gn,Ro=50,Vn=1440,Dn=Ro/Vn;function fa(e){const t=typeof e=="number"&&e>0?e:Vn;return Ro/t}function Jd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Vn}const ya={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Rn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function eu(e,t=1){const n=t/e;return Object.fromEntries(bt.map(r=>[r,n]))}function tu(){return Object.fromEntries([...$n.map(e=>[e,0]),...Sn.map(e=>[e,0])])}function nu(){return Object.fromEntries(wn.map(e=>[e,0]))}function ar(e){return Object.fromEntries(bt.map(t=>[t,typeof e[t]=="number"?e[t]:ya[t]]))}function va(e,t,n){const r=e-Dn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function mr(e,t,n){const r=ko(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function ru(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=$n[i],o=Sn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=va(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function ko(e,t,n){if(e<=0)return[];const r=bt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+Dn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-Dn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function ou(e,t,n){if(e<=1)return{};const r=ko(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=bt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function xi(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Yt]}function iu(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function au(e,t,n,r){const i=Math.min(r,e.length,bt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=bt[s],u=$n[s],T=Sn[s],x=wn[s],f=bt[o],m=$n[o],g=Sn[o],C=wn[o],w=n[p],$=n[u],v=n[T],F=n[x];typeof w=="number"&&(l[f]=w),typeof $=="number"&&(l[m]=$),typeof v=="number"&&(l[g]=v),typeof F=="number"&&(l[C]=F)}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 su(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=Rn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...eu(n,i),...tu()};if(l)for(const c of wn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,nu());return ba(e,o)?o:e}function lu(e,t,n){const r=Od(e);r&&(e={...e,...r});const i=fa(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=Rn(e),s=Rn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:Yt.length,T=v=>{if(p)return v;const F=ar({...t,...v}),L=Rn(v),H=mr(u,L,F),b=ru(u,H,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==o)return e;const x=xi(e),f=xi(t);if(!iu(x,f))return T({...e,...au(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=ar({...t,...e});return T({...e,...ou(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,F=Math.max(0,(c-i)/2);return v>F?{...e,textPaddingLR:F}:e}const m=ar({...t,...e}),g=mr(u,s,ar(t)),w=mr(u,c,m).some((v,F)=>v<(g[F]??v)),$=bt.some(v=>{const F=e[v],L=t[v];return typeof F=="number"&&typeof L=="number"&&F!==L});return w||$?T(e):e}function cu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(Dn,r-i-l-Dn)}function du(e,t){return Math.random()*(t-e)+e}function uu(e){return Object.fromEntries(bt.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 pu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=$n[c],p=Sn[c],u=wn[c];return{key:o,textPrefix:Ud[o],widthKey:bt[c],width:n[bt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function mu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:$,cutCellMinHeight:v,cutLabel:F,imageSize:L,imageOnHover:H,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:O,rowPaddingBottom:S,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:W,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:M,backgroundHoverColor:D,dividerHoverColor:N}=e,[I,K]=d.useState(void 0),[Z,Q]=d.useState(null),R=H==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,ce]=d.useState(Vn),V=fa(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(W??0,U),se=Math.max(G,gn),ye=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){ce(Vn);return}const X=()=>{ce(Jd(ee.current))};X();const ue=ee.current;if(!ue)return;const fe=new ResizeObserver(X);fe.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&fe.observe(we),()=>fe.disconnect()},[n,o]),d.useEffect(()=>{K(void 0)},[w,$,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:M,backgroundHoverColor:D,dividerHoverColor:N},Zd,Qd),$e=l&&l!=="default"?`${s}-state-${l}`:"",_e=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${$e}`.trim(),B=b==="reveal"&&(!n||r),oe=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(o);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=o;return}if(q.current!==o){z.current=e,q.current=o;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const fe=lu(e,X,{designWidth:re});z.current=e,ba(e,fe)&&c(fe)},[e,c,n,o,re]);const Y=d.useMemo(()=>uu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ae=d.useMemo(()=>Yr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),me=d.useMemo(()=>Yr(e,Sn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=d.useMemo(()=>Yr(e,wn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),he=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Yt],[A]),ve=d.useMemo(()=>pu(he,u,Y,ae,me,We),[he,u,Y,ae,me,We]),Me=Rn(e),ie=d.useMemo(()=>bt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>ko(u,Me,Y),[u,Me,Y]),Ie=d.useMemo(()=>mr(u,Me,Y),[u,Me,Y]),ke=d.useMemo(()=>ve.map((X,ue)=>va(Ie[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ie]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((fe,we)=>({id:we,cells:Object.fromEntries(Yt.map(je=>[je,fe[je]??""])),image:fe.image,link:fe.link}))},[t,f]),nt=ne?I??w:Ve.length,pt=d.useMemo(()=>ne?Ve.slice(0,nt):Ve,[Ve,ne,nt]),mt=ne&&nt<Ve.length,Ct=pt.length>1||mt,_t=[oe?`${s}-divider-top`:"",_||Ct?`${s}-divider-bottom`:""].filter(Boolean).join(" "),gt=!n||r,At=()=>{if(!gt)return;const X=I??w;if(!$){K(Ve.length);return}K(Math.min(X+$,Ve.length))},pe=X=>y.scalingValue(X,n??!1),Ne=h?E??0:O??0,Be=S??0,Ue=m??0,$t=Ne+Ue/2,Vt=Math.max(Be,Gr),ht=mi(0,pt.length,oe,_,mt,g??0,n??!1).borderTopWidth,It=le!=null?`${le}px`:`calc(${ht} + ${pe($t)})`,_n=h?"rowPaddingTopB":"rowPaddingTop",Se=ve[0],Qe=ve[ve.length-1],Ke=ke[0],De=ke[ke.length-1],at=Se&&Ke?Math.max(Ke.paddingLeft,gn):0,Zn=Qe&&De?Math.max(De.paddingRight,gn):0,Wr=Me,sn=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const fe=ue.getBoundingClientRect();return{x:X.clientX-fe.left+gi,y:X.clientY-fe.top+gi}},Mr=(X,ue)=>{if(!R)return;const fe=X.image;if(!(fe!=null&&fe.url)){Q(null);return}const{x:we,y:je}=sn(ue),Ge=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,ct=(Z==null?void 0:Z.rowId)===X.id?Z.widthPx:du(Ge,Pe);Q({rowId:X.id,url:fe.url,objectFit:"contain",isVideo:Id(fe),widthPx:ct,x:we,y:je})},Qn=X=>{if(!R||!Z)return;const{x:ue,y:fe}=sn(X);Q(we=>!we||we.x===ue&&we.y===fe?we:{...we,x:ue,y:fe})},Jn=()=>{Q(null)},Fr=X=>{B&&ui(X,s),R&&Q(null)},Re=X=>{B&&pi(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const fe=()=>{const je=X.querySelector("[data-list-row]");if(!je){be(null);return}const Ge=ue.getBoundingClientRect(),Pe=je.getBoundingClientRect();be(Pe.top-Ge.top+Pe.height/2)};fe();const we=new ResizeObserver(fe);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,pt,Ne,Be,Ue,t,e,ve,Ie,re,g,oe,_,mt]);const st=d.useMemo(()=>!h&&_o.some(X=>{const ue=X.charAt(0),fe=e[`${X}VerticalAlign`];return ha(fe,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var ct;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(dt=>{dt.style.transform="";const Ye=dt.querySelector(`.${s}-list-col`);Ye&&(Ye.style.minHeight="",Ye.style.height="");const ut=dt.querySelector(`.${s}-list-col-title`);ut&&(ut.style.transform="")})};if(h||!st){ue();return}const fe=()=>{const dt=Array.from(X.querySelectorAll("[data-list-row]")),Ye=`${s}-list-col`,ut=`${s}-baseline-probe`;dt.forEach(Fe=>{Fe.querySelectorAll("[data-list-col]").forEach(rt=>{rt.style.transform="";const ot=rt.querySelector(`.${Ye}`);ot&&(ot.style.minHeight="",ot.style.height="");const et=rt.querySelector(`.${s}-list-col-title`);et&&(et.style.transform="")})}),dt.forEach(Fe=>{const rt=Array.from(Fe.querySelectorAll("[data-list-col]"));qd(Fe,rt,Ye)}),X.offsetHeight,dt.forEach(Fe=>{const rt=Array.from(Fe.querySelectorAll("[data-list-col]")),ot=Fe.getBoundingClientRect().top,et=new Map,ln=rt.map(ze=>{const cn=ze.querySelector(`.${s}-list-col-title`),dn={el:ze,titleEl:cn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return et.set(dn.letter,dn),dn}),Xe=new Map,er=(ze,cn)=>{const dn=Xe.get(ze.letter);if(dn!==void 0)return dn;const Wo=ze.anchor?et.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Wo||cn.has(ze.letter)){const Fo=Ur(ze,ot,Ye,ut);return Xe.set(ze.letter,Fo),Fo}cn.add(ze.letter);const Ca=er(Wo,cn);cn.delete(ze.letter);const $a=Ur(ze,ot,Ye,ut),Sa=Ca-$a;Kd(ze.titleEl,Sa);const Mo=Ur(ze,ot,Ye,ut);return Xe.set(ze.letter,Mo),Mo};ln.forEach(ze=>er(ze,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,fe()}))};fe();const Ge=new ResizeObserver(()=>je());Ge.observe(X);let Pe=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Pe||je()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ge.disconnect(),ue()}},[st,h,e,t,re,pt,Ie]);const lt=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${_e}${_t?` ${_t}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:It}:{}},onMouseMove:R?Qn:void 0,onMouseLeave:R?Jn:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[pt.map((X,ue)=>{var Ge;const fe=(((Ge=X.link)==null?void 0:Ge.length)??0)>0,we=fe&&(!n||r)?"a":"div",je=mi(ue,pt.length,oe,_,mt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{ge.current=Pe}:void 0,className:`${s}-list-item${fe||P==="always"?` ${s}-list-item-has-link`:""}`,...fe?{href:X.link,target:"_blank"}:{},style:je,onMouseEnter:Pe=>{B&&(fe||P==="always")&&ui(Pe,s),R&&Mr(X,Pe)},onMouseLeave:Pe=>{B&&(fe||P==="always")&&pi(Pe,s)},children:[Ne>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Ne)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:pe(Ue)},children:[ve.map((Pe,ct)=>{const dt=ct===ve.length-1,Ye=ke[ct],ut=Pe.paddingBottom,Fe=kd(X.cells[Pe.key]),rt=h&&Fe&&ut>0,ot=h?{minHeight:pe(Ue)}:{width:pe(Ie[ct])},et=h?{paddingLeft:pe(G),paddingRight:pe(G)}:{paddingLeft:pe(Ye.paddingLeft),paddingRight:pe(Ye.paddingRight)},ln=Pe.textPrefix.charAt(0),Xe=h?Bd(e[`${Pe.textPrefix}VerticalAlign`]):Nd(e[`${Pe.textPrefix}VerticalAlign`],e,ln),er=h&&Fe&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":ln,"data-valign":Xe.kind,...Xe.kind==="baseline"?{"data-valign-anchor":Xe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${dt?` ${s}-list-col-last`:""}`,style:{...et,...ot,...h?{justifyContent:hi(Xe.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi(xr(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Vd(Xe.kind)},children:X.cells[Pe.key]??null})}),rt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(ut)}}),er&&a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":Pe.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:pe(Math.max(ut,Gr))}})]},Pe.key)}),p&&ue===0&&h&&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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:pe(se),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(ye),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:pe(Math.max(se,Me-se)),width:pe(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:pe(Be)}}),p&&ue===0&&!h&&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:pe(Vt)}})]},X.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":_n,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:ht,left:0,width:"100%",height:pe(Math.max(Ne,Gr))}})},"row-padding-handles"),p&&!h&&Se&&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":Se.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ie[0]-((Ke==null?void 0:Ke.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:pe(at),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(Ie[ve.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(Wr-Zn),width:pe(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=ve[ue+1],we=xe.slice(0,ue+1).reduce((dt,Ye)=>dt+Ye,0),je=ke[ue],Ge=ke[ue+1],Pe=Math.max(je.paddingRight,gn),ct=Math.max(Ge.paddingLeft,gn);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":X.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(Ie[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we-Pe),width:pe(Pe),height:"100%"}}),a.jsx(Ze,{centerXHitTop:`var(--${s}-first-entry-handle-top, 50%)`,"data-controls":fe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ie[ue+1]-Ge.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:pe(we),width:pe(ct),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const fe=cu(ue,xe,ie,Me),je=xe.slice(0,ue+1).reduce((Ge,Pe)=>Ge+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ro),"data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:pe(je),width:pe(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),mt&&(()=>{const X=xr(e,Nt),ue=Dd(e.cutLabelVerticalAlign),fe=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:pe(v??0),cursor:gt?"pointer":"default",...Wd(_,g??0,n??!1)},onClick:gt?At:void 0,onMouseEnter:B||R?Fr:void 0,onMouseLeave:B?Re:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:pe(G),paddingRight:pe(G)}:{},justifyContent:zd(X.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Nt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(X,n),...vi(e,Nt,s,n),...fe?{width:"100%"}:{}},children:F})})})})(),R&&Z&&(()=>{const X=pr(Z.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Z.x,top:Z.y,position:"absolute"};return a.jsx(Rd,{media:Z,className:Z.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Z.rowId}-${Z.url}`)})()]})})]})}const gu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';\r
|
|
5449
5449
|
import { CommonComponentProps } from '../props';\r
|
|
5450
5450
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
5451
5451
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
|
|
5452
|
+
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';\r
|
|
5452
5453
|
import type { LayoutItem, LayoutTab } from '../../types/SchemaV1';\r
|
|
5453
5454
|
\r
|
|
5454
5455
|
type ListFontSettings = { fontWeight: number; fontStyle: string };\r
|
|
@@ -6745,7 +6746,6 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
6745
6746
|
const COL_RESIZE_HANDLE_WIDTH = 0.004;\r
|
|
6746
6747
|
const COL_PADDING_HANDLE_WIDTH = 0.004;\r
|
|
6747
6748
|
const ROW_PADDING_HANDLE_HEIGHT = COL_PADDING_HANDLE_WIDTH;\r
|
|
6748
|
-
const PADDING_CONTROL_HIT_SIZE = 12;\r
|
|
6749
6749
|
const MIN_COLUMN_WIDTH_PX = 50;\r
|
|
6750
6750
|
const ARTICLE_DESIGN_WIDTH = 1440;\r
|
|
6751
6751
|
const MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH_PX / ARTICLE_DESIGN_WIDTH;\r
|
|
@@ -6758,60 +6758,6 @@ export function getListMinColumnWidth(designWidthPx?: number): number {\r
|
|
|
6758
6758
|
return MIN_COLUMN_WIDTH_PX / designWidth;\r
|
|
6759
6759
|
}\r
|
|
6760
6760
|
\r
|
|
6761
|
-
type ListPaddingControlHitPlacement = 'left-y' | 'center-x' | 'center';\r
|
|
6762
|
-
\r
|
|
6763
|
-
function getListPaddingControlHitStyle(\r
|
|
6764
|
-
P: string,\r
|
|
6765
|
-
placement: ListPaddingControlHitPlacement,\r
|
|
6766
|
-
): CSSProperties {\r
|
|
6767
|
-
const base: CSSProperties = {\r
|
|
6768
|
-
position: 'absolute',\r
|
|
6769
|
-
width: PADDING_CONTROL_HIT_SIZE,\r
|
|
6770
|
-
height: PADDING_CONTROL_HIT_SIZE,\r
|
|
6771
|
-
pointerEvents: 'auto',\r
|
|
6772
|
-
};\r
|
|
6773
|
-
\r
|
|
6774
|
-
if (placement === 'left-y') {\r
|
|
6775
|
-
return { ...base, left: 20, top: '50%', transform: 'translateY(-50%)' };\r
|
|
6776
|
-
}\r
|
|
6777
|
-
\r
|
|
6778
|
-
if (placement === 'center-x') {\r
|
|
6779
|
-
return {\r
|
|
6780
|
-
...base,\r
|
|
6781
|
-
left: '50%',\r
|
|
6782
|
-
top: \`var(--\${P}-first-entry-handle-top, 50%)\`,\r
|
|
6783
|
-
transform: 'translate(-50%, -50%)',\r
|
|
6784
|
-
};\r
|
|
6785
|
-
}\r
|
|
6786
|
-
\r
|
|
6787
|
-
return { ...base, left: '50%', top: '50%', transform: 'translate(-50%, -50%)' };\r
|
|
6788
|
-
}\r
|
|
6789
|
-
\r
|
|
6790
|
-
type ListPaddingControlProps = {\r
|
|
6791
|
-
P: string;\r
|
|
6792
|
-
className: string;\r
|
|
6793
|
-
areaStyle: CSSProperties;\r
|
|
6794
|
-
hitPlacement: ListPaddingControlHitPlacement;\r
|
|
6795
|
-
} & ComponentPropsWithoutRef<'div'>;\r
|
|
6796
|
-
\r
|
|
6797
|
-
function ListPaddingControl({\r
|
|
6798
|
-
P,\r
|
|
6799
|
-
className,\r
|
|
6800
|
-
areaStyle,\r
|
|
6801
|
-
hitPlacement,\r
|
|
6802
|
-
...rest\r
|
|
6803
|
-
}: ListPaddingControlProps) {\r
|
|
6804
|
-
return (\r
|
|
6805
|
-
<div\r
|
|
6806
|
-
className={className}\r
|
|
6807
|
-
style={{ ...areaStyle, pointerEvents: 'none' }}\r
|
|
6808
|
-
{...rest}\r
|
|
6809
|
-
>\r
|
|
6810
|
-
<div style={getListPaddingControlHitStyle(P, hitPlacement)} />\r
|
|
6811
|
-
</div>\r
|
|
6812
|
-
);\r
|
|
6813
|
-
}\r
|
|
6814
|
-
\r
|
|
6815
6761
|
function getEditorDesignWidth(element: HTMLElement | null | undefined): number {\r
|
|
6816
6762
|
let el = element ?? null;\r
|
|
6817
6763
|
\r
|
|
@@ -8121,8 +8067,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8121
8067
|
/>\r
|
|
8122
8068
|
)}\r
|
|
8123
8069
|
{columnPaddingBottomOverlay && (\r
|
|
8124
|
-
<
|
|
8125
|
-
|
|
8070
|
+
<PaddingControl\r
|
|
8071
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8126
8072
|
data-controls={col.paddingBottomKey}\r
|
|
8127
8073
|
data-controls-static-handle=""\r
|
|
8128
8074
|
data-controls-axis="y"\r
|
|
@@ -8144,8 +8090,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8144
8090
|
})}\r
|
|
8145
8091
|
{showControls && rowIdx === 0 && isVerticalLayout && (\r
|
|
8146
8092
|
<>\r
|
|
8147
|
-
<
|
|
8148
|
-
|
|
8093
|
+
<PaddingControl\r
|
|
8094
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8149
8095
|
data-controls="textPaddingLR"\r
|
|
8150
8096
|
data-controls-static-handle=""\r
|
|
8151
8097
|
data-controls-paired=""\r
|
|
@@ -8163,8 +8109,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8163
8109
|
height: '100%',\r
|
|
8164
8110
|
}}\r
|
|
8165
8111
|
/>\r
|
|
8166
|
-
<
|
|
8167
|
-
|
|
8112
|
+
<PaddingControl\r
|
|
8113
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8168
8114
|
data-controls="textPaddingLR"\r
|
|
8169
8115
|
data-controls-static-handle=""\r
|
|
8170
8116
|
data-controls-paired=""\r
|
|
@@ -8193,8 +8139,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8193
8139
|
/>\r
|
|
8194
8140
|
)}\r
|
|
8195
8141
|
{showControls && rowIdx === 0 && !isVerticalLayout && (\r
|
|
8196
|
-
<
|
|
8197
|
-
|
|
8142
|
+
<PaddingControl\r
|
|
8143
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8198
8144
|
data-controls="rowPaddingBottom"\r
|
|
8199
8145
|
data-controls-static-handle=""\r
|
|
8200
8146
|
data-controls-handle-left="20"\r
|
|
@@ -8217,8 +8163,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8217
8163
|
})}\r
|
|
8218
8164
|
{showControls && (\r
|
|
8219
8165
|
<div key="row-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8220
|
-
<
|
|
8221
|
-
|
|
8166
|
+
<PaddingControl\r
|
|
8167
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8222
8168
|
data-controls={rowPaddingTopControlKey}\r
|
|
8223
8169
|
data-controls-static-handle=""\r
|
|
8224
8170
|
{...(!isVerticalLayout ? { 'data-controls-handle-left': '20' } : {})}\r
|
|
@@ -8239,8 +8185,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8239
8185
|
)}\r
|
|
8240
8186
|
{showControls && !isVerticalLayout && firstColumn && lastColumn && (\r
|
|
8241
8187
|
<div key="column-edge-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8242
|
-
<
|
|
8243
|
-
|
|
8188
|
+
<PaddingControl\r
|
|
8189
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8244
8190
|
data-controls={firstColumn.paddingLeftKey}\r
|
|
8245
8191
|
data-controls-static-handle=""\r
|
|
8246
8192
|
data-controls-axis="x"\r
|
|
@@ -8259,8 +8205,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8259
8205
|
height: '100%',\r
|
|
8260
8206
|
}}\r
|
|
8261
8207
|
/>\r
|
|
8262
|
-
<
|
|
8263
|
-
|
|
8208
|
+
<PaddingControl\r
|
|
8209
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8264
8210
|
data-controls={lastColumn.paddingRightKey}\r
|
|
8265
8211
|
data-controls-static-handle=""\r
|
|
8266
8212
|
data-controls-axis="x"\r
|
|
@@ -8299,8 +8245,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8299
8245
|
\r
|
|
8300
8246
|
return (\r
|
|
8301
8247
|
<div key={\`\${col.paddingRightKey}-padding\`} style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>\r
|
|
8302
|
-
<
|
|
8303
|
-
|
|
8248
|
+
<PaddingControl\r
|
|
8249
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8304
8250
|
data-controls={col.paddingRightKey}\r
|
|
8305
8251
|
data-controls-static-handle=""\r
|
|
8306
8252
|
data-controls-axis="x"\r
|
|
@@ -8320,8 +8266,8 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8320
8266
|
height: '100%',\r
|
|
8321
8267
|
}}\r
|
|
8322
8268
|
/>\r
|
|
8323
|
-
<
|
|
8324
|
-
|
|
8269
|
+
<PaddingControl\r
|
|
8270
|
+
centerXHitTop={\`var(--\${P}-first-entry-handle-top, 50%)\`}\r
|
|
8325
8271
|
data-controls={nextCol.paddingLeftKey}\r
|
|
8326
8272
|
data-controls-static-handle=""\r
|
|
8327
8273
|
data-controls-axis="x"\r
|
|
@@ -8456,4 +8402,994 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8456
8402
|
</>\r
|
|
8457
8403
|
);\r
|
|
8458
8404
|
}\r
|
|
8459
|
-
`,$n=["A","B","C","D","E"],bo=[...ri,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Yt={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 lu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function or(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function cu(){return Object.fromEntries($n.map((e,t)=>{const n=Vt[t],r=`${e} column`;return[n,lu(r)]}))}function du(){const e={};for(const t of $n)e[`${t}ColumnWidth`]=or(`${t} column width`),e[`${t}ColumnPaddingLeft`]=or(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=or(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=or(`${t} column padding bottom`);return e}function xo(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Vt]};for(const a of $n)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function uu(e){const t={};if(e===Rt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ri]},enum:[...ri]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...bo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...bo]}}return t[Ee(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ee(e,"textFontSettings")]={...Yt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ee(e,"textFontSize")]={...Yt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ee(e,"textLineHeight")]={...Yt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ee(e,"textLetterSpacing")]={...Yt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ee(e,"textWordSpacing")]={...Yt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ee(e,"textTextAlign")]={...Yt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ee(e,"textTextAppearance")]={...Yt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const pu=Ei.reduce((e,t)=>({...e,...uu(t)}),{});function mu(e){return{verticalAlign:e===Rt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Rt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function gu(e,t={}){var n;return{...mu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Co=new Set(["textFontFamily","textFontSettings"]);function hu(e,t,n){const r=a=>n===void 0?!0:n==="common"?Co.has(a):!Co.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Pi(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Ee(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Ee(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Ee(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Ee(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Ee(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Ee(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Ee(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Ee(e,"textTextAppearance")]=t.textTextAppearance),i}function pr(e={},t){return Ei.reduce((n,r)=>({...n,...hu(r,gu(r,e),t)}),{})}const fu=pr(),yu=Dd();function ma(e){return[Ee(e,"textFontFamily"),Ee(e,"textFontSettings"),Ee(e,"textFontSize"),Ee(e,"textLineHeight"),Ee(e,"textLetterSpacing"),Ee(e,"textWordSpacing"),Ee(e,"textTextAlign"),Ee(e,"textTextAppearance"),`${e}VerticalAlign`]}function vu(){const e=[];return Li.forEach((t,n)=>{const r=Vt[n],i=ma(t);for(let a=1;a<Vt.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const bu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];ma(Rt);const xu=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Xt=[{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"}],Cu=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Xt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Xt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Xt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Xt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Xt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Xt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Xt[6],link:""}],Su=[...$n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],$u={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:{...cu(),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:Cu},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...du(),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"}},...pu,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",...fu,...pr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:xo({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},...pr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:xo({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},...pr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...vu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...xu.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}},...$n.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",...Su]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",yu]}],paletteBookmark:{items:[...bu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},wu={element:au,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>eu(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:$u,sourceCode:su},Tu=[Ll,kl,Cc,Ac,Bc,Jc,rd,dd,Sd,wu];exports.components=Tu;exports.isSchemaV1=ya;
|
|
8405
|
+
`,En=["A","B","C","D","E"],Ci=[...io,"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 hu(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 fu(){return Object.fromEntries(En.map((e,t)=>{const n=Yt[t],r=`${e} column`;return[n,hu(r)]}))}function yu(){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 $i(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 i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function vu(e){const t={};if(e===Nt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...io]},enum:[...io]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ci],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ci]}}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 bu=Ao.reduce((e,t)=>({...e,...vu(t)}),{});function xu(e){return{verticalAlign:e===Nt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Nt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Cu(e,t={}){var n;return{...xu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Si=new Set(["textFontFamily","textFontSettings"]);function $u(e,t,n){const r=l=>n===void 0?!0:n==="common"?Si.has(l):!Si.has(l),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Io(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Ae(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Ae(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Ae(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Ae(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Ae(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Ae(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Ae(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Ae(e,"textTextAppearance")]=t.textTextAppearance),i}function gr(e={},t){return Ao.reduce((n,r)=>({...n,...$u(r,Cu(r,e),t)}),{})}const Su=gr(),wu=Xd();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 Tu(){const e=[];return _o.forEach((t,n)=>{const r=Yt[n],i=xa(t);for(let l=1;l<Yt.length;l+=1){const o=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:o,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Lu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xa(Nt);const Pu=[...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"}],Eu=[{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:""}],_u=[...En.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Au={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:{...fu(),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:Eu},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"}},...yu(),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"}},...bu,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",...Su,...gr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:$i({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:$i({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:[...Tu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Pu.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",..._u]},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__",wu]}],paletteBookmark:{items:[...Lu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Iu={element:mu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>su(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:Au,sourceCode:gu},wi=300,zt=.004,Ru={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"},ku=["hover","focus","filled","success","error"];function Wu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ti(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Li(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((i-t)/2,r)}}function Mu(e){return`
|
|
8406
|
+
.${e}-wrapper {
|
|
8407
|
+
box-sizing: border-box;
|
|
8408
|
+
display: flex;
|
|
8409
|
+
flex-direction: column;
|
|
8410
|
+
}
|
|
8411
|
+
.${e}-item {
|
|
8412
|
+
display: flex;
|
|
8413
|
+
flex-direction: column;
|
|
8414
|
+
position: relative;
|
|
8415
|
+
border-bottom-width: var(--${e}-divider-width);
|
|
8416
|
+
border-bottom-style: var(--${e}-divider-style);
|
|
8417
|
+
border-bottom-color: var(--${e}-divider-color);
|
|
8418
|
+
}
|
|
8419
|
+
.${e}-item:first-child {
|
|
8420
|
+
border-top-width: var(--${e}-divider-width);
|
|
8421
|
+
border-top-style: var(--${e}-divider-style);
|
|
8422
|
+
border-top-color: var(--${e}-divider-color);
|
|
8423
|
+
}
|
|
8424
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item {
|
|
8425
|
+
transition: border-color 250ms;
|
|
8426
|
+
}
|
|
8427
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-question-button {
|
|
8428
|
+
transition: color 250ms;
|
|
8429
|
+
}
|
|
8430
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover,
|
|
8431
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item:has(+ .${e}-item:not(.${e}-item-open):hover),
|
|
8432
|
+
.${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) {
|
|
8433
|
+
border-bottom-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
|
|
8434
|
+
}
|
|
8435
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover:first-child,
|
|
8436
|
+
.${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open):first-child {
|
|
8437
|
+
border-top-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
|
|
8438
|
+
}
|
|
8439
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover .${e}-question-button,
|
|
8440
|
+
.${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-question-button {
|
|
8441
|
+
color: var(--${e}-question-hover-color, var(--${e}-question-color));
|
|
8442
|
+
}
|
|
8443
|
+
.${e}-question-button {
|
|
8444
|
+
display: flex;
|
|
8445
|
+
flex-direction: column;
|
|
8446
|
+
align-items: stretch;
|
|
8447
|
+
width: 100%;
|
|
8448
|
+
margin: 0;
|
|
8449
|
+
border: none;
|
|
8450
|
+
background: none;
|
|
8451
|
+
cursor: pointer;
|
|
8452
|
+
text-align: left;
|
|
8453
|
+
color: var(--${e}-question-color);
|
|
8454
|
+
font: inherit;
|
|
8455
|
+
padding-left: 0;
|
|
8456
|
+
outline: none;
|
|
8457
|
+
-webkit-tap-highlight-color: transparent;
|
|
8458
|
+
}
|
|
8459
|
+
.${e}-question-button:focus,
|
|
8460
|
+
.${e}-question-button:focus-visible {
|
|
8461
|
+
outline: none;
|
|
8462
|
+
}
|
|
8463
|
+
.${e}-question-row {
|
|
8464
|
+
display: flex;
|
|
8465
|
+
align-items: center;
|
|
8466
|
+
justify-content: space-between;
|
|
8467
|
+
gap: ${Wu(20)};
|
|
8468
|
+
width: 100%;
|
|
8469
|
+
min-width: 0;
|
|
8470
|
+
min-height: var(--${e}-question-min-height, unset);
|
|
8471
|
+
}
|
|
8472
|
+
.${e}-editor .${e}-question-button {
|
|
8473
|
+
cursor: default;
|
|
8474
|
+
}
|
|
8475
|
+
.${e}-question {
|
|
8476
|
+
margin: 0;
|
|
8477
|
+
flex: 1;
|
|
8478
|
+
min-width: 0;
|
|
8479
|
+
color: inherit;
|
|
8480
|
+
white-space: pre-wrap;
|
|
8481
|
+
overflow-wrap: anywhere;
|
|
8482
|
+
word-break: break-word;
|
|
8483
|
+
}
|
|
8484
|
+
.${e}-text-tight-leading {
|
|
8485
|
+
display: block;
|
|
8486
|
+
flex-shrink: 0;
|
|
8487
|
+
padding-top: var(--${e}-text-leading-gap, 0);
|
|
8488
|
+
padding-bottom: var(--${e}-text-leading-gap, 0);
|
|
8489
|
+
}
|
|
8490
|
+
.${e}-icon {
|
|
8491
|
+
flex-shrink: 0;
|
|
8492
|
+
width: var(--${e}-icon-max-width);
|
|
8493
|
+
height: var(--${e}-icon-max-width);
|
|
8494
|
+
position: relative;
|
|
8495
|
+
transition: transform ${wi}ms ease;
|
|
8496
|
+
}
|
|
8497
|
+
.${e}-icon-custom {
|
|
8498
|
+
display: flex;
|
|
8499
|
+
align-items: center;
|
|
8500
|
+
justify-content: center;
|
|
8501
|
+
}
|
|
8502
|
+
.${e}-icon-image {
|
|
8503
|
+
position: absolute;
|
|
8504
|
+
top: 50%;
|
|
8505
|
+
left: 50%;
|
|
8506
|
+
transform: translate(-50%, -50%);
|
|
8507
|
+
transition: background-color 250ms;
|
|
8508
|
+
}
|
|
8509
|
+
.${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover .${e}-icon-image,
|
|
8510
|
+
.${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-icon-image {
|
|
8511
|
+
--fill: var(--${e}-icon-hover-color, var(--${e}-icon-color)) !important;
|
|
8512
|
+
--hover-fill: var(--${e}-icon-hover-color, var(--${e}-icon-color)) !important;
|
|
8513
|
+
}
|
|
8514
|
+
.${e}-item-open .${e}-icon-image {
|
|
8515
|
+
--fill: var(--${e}-icon-active-color, var(--${e}-icon-color)) !important;
|
|
8516
|
+
--hover-fill: var(--${e}-icon-active-color, var(--${e}-icon-color)) !important;
|
|
8517
|
+
}
|
|
8518
|
+
.${e}-item-open .${e}-icon-anim-45 {
|
|
8519
|
+
transform: rotate(45deg);
|
|
8520
|
+
}
|
|
8521
|
+
.${e}-item-open .${e}-icon-anim-90 {
|
|
8522
|
+
transform: rotate(90deg);
|
|
8523
|
+
}
|
|
8524
|
+
.${e}-item-open .${e}-icon-anim-180 {
|
|
8525
|
+
transform: rotate(180deg);
|
|
8526
|
+
}
|
|
8527
|
+
.${e}-panel {
|
|
8528
|
+
display: grid;
|
|
8529
|
+
grid-template-rows: 0fr;
|
|
8530
|
+
transition: grid-template-rows ${wi}ms ease;
|
|
8531
|
+
}
|
|
8532
|
+
.${e}-item-open .${e}-panel {
|
|
8533
|
+
grid-template-rows: 1fr;
|
|
8534
|
+
}
|
|
8535
|
+
.${e}-panel-inner {
|
|
8536
|
+
overflow: hidden;
|
|
8537
|
+
min-height: 0;
|
|
8538
|
+
}
|
|
8539
|
+
.${e}-answer {
|
|
8540
|
+
color: var(--${e}-answer-color);
|
|
8541
|
+
}
|
|
8542
|
+
.${e}-answer-text {
|
|
8543
|
+
margin: 0;
|
|
8544
|
+
color: inherit;
|
|
8545
|
+
white-space: pre-wrap;
|
|
8546
|
+
overflow-wrap: anywhere;
|
|
8547
|
+
word-break: break-word;
|
|
8548
|
+
}
|
|
8549
|
+
.${e}-answer-text a {
|
|
8550
|
+
color: inherit;
|
|
8551
|
+
text-decoration: underline;
|
|
8552
|
+
text-underline-offset: 0.1em;
|
|
8553
|
+
}
|
|
8554
|
+
.${e}-padding-handle {
|
|
8555
|
+
width: 100%;
|
|
8556
|
+
flex-shrink: 0;
|
|
8557
|
+
background: transparent;
|
|
8558
|
+
}
|
|
8559
|
+
.${e}-question-controls,
|
|
8560
|
+
.${e}-answer-controls {
|
|
8561
|
+
position: relative;
|
|
8562
|
+
}
|
|
8563
|
+
.${e}-padding-control-handle {
|
|
8564
|
+
background: transparent;
|
|
8565
|
+
}
|
|
8566
|
+
.${e}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after {
|
|
8567
|
+
content: '';
|
|
8568
|
+
position: absolute;
|
|
8569
|
+
top: 50%;
|
|
8570
|
+
left: 50%;
|
|
8571
|
+
transform: translate(-50%, -50%);
|
|
8572
|
+
width: 4px;
|
|
8573
|
+
height: 12px;
|
|
8574
|
+
background: #FF5C02;
|
|
8575
|
+
border: 1px solid #FFFFFF;
|
|
8576
|
+
border-radius: 5px;
|
|
8577
|
+
box-sizing: border-box;
|
|
8578
|
+
pointer-events: none;
|
|
8579
|
+
}
|
|
8580
|
+
.${e}-padding-control-handle[data-controls-axis="y"]::after {
|
|
8581
|
+
content: '';
|
|
8582
|
+
position: absolute;
|
|
8583
|
+
top: 50%;
|
|
8584
|
+
left: 50%;
|
|
8585
|
+
transform: translate(-50%, -50%);
|
|
8586
|
+
width: 12px;
|
|
8587
|
+
height: 4px;
|
|
8588
|
+
background: #FF5C02;
|
|
8589
|
+
border: 1px solid #FFFFFF;
|
|
8590
|
+
border-radius: 5px;
|
|
8591
|
+
box-sizing: border-box;
|
|
8592
|
+
pointer-events: none;
|
|
8593
|
+
}
|
|
8594
|
+
.${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after {
|
|
8595
|
+
left: 20px;
|
|
8596
|
+
transform: translateY(-50%);
|
|
8597
|
+
}
|
|
8598
|
+
`}function Pi(e,t,n,r,i,l,o,c){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:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Fu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=y.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:$="#000000",answerColor:v="#000000",dividerColor:F="#0000001F",iconColor:L="#000000",questionHoverColor:H="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:O="#000000",questionFontFamily:S,questionFontSettings:E,questionFontSize:A,questionLineHeight:W,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:M,answerFontSettings:D,answerFontSize:N,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Z,answerTextAppearance:Q,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[ce,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]),d.useEffect(()=>{n&&!i&&!r&&V(new Set)},[n,i,r]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(R,zt),ye=Math.max(ne,zt),Te=Math.max(h,zt),$e=Math.max(ee,zt),Le=Math.max(ge,zt),_e=Math.max(le,zt),B=Math.max(be,zt),oe=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,zt),Y=Math.max(0,(s??1)-R-g),ae=d.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=d.useCallback(pe=>ce.has(pe),[ce]),We=U&&x==="default"?`${o}-entry-hover-default`:"",he=m??"",ve=he!=="",Me=w.replace(/^rotate /,""),ie=`${o}-icon-anim-${Me}`,xe=vt(Je(Pi(S,E,A,W,j,te,k,$),n)),Ie=vt(Je(Pi(M,D,N,I,K,Z,Q,v),n)),ke=Ti(A,W,`${o}-question`,`${o}-text-tight-leading`),Ve=Ti(N,I,`${o}-answer-text`,`${o}-text-tight-leading`),nt=Li(A,W,o,n),pt=Li(N,I,o,n),mt=y.buildColorVars(o,{questionColor:$,answerColor:v,dividerColor:F,iconColor:L,questionHoverColor:H,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:O},Ru,ku),Ct=l&&l!=="default"?`${o}-state-${l}`:"",_t=d.useCallback(pe=>{U&&V(Ne=>{if(Ne.has(pe)){const Ue=new Set(Ne);return Ue.delete(pe),Ue}if(f==="on")return new Set([pe]);const Be=new Set(Ne);return Be.add(pe),Be})},[U,f]),gt=d.useMemo(()=>Mu(o),[o]),At={[`--${o}-divider-width`]:y.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:mt,children:a.jsx("div",{className:Ee(`${o}-wrapper`,n&&!r&&`${o}-editor`,We,Ct),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",...At},children:re.map((pe,Ne)=>{var It;const Be=me(Ne),Ue=((It=pe.question)==null?void 0:It.trim())??"",$t=pe.answer,Vt=(($t==null?void 0:$t.length)??0)>0,ht=c&&Ne===ae;return a.jsxs("div",{className:Ee(`${o}-item`,Be&&`${o}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${o}-question-controls`,children:[ht&&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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),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(oe),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),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(Y),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${o}-question-button`,"aria-expanded":Be,style:{...xe,...nt,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>_t(Ne),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:ke,children:Ue}),Vt&&(ve?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${ie}`,"aria-hidden":"true",children:a.jsx(Ht,{url:he,fill:L,hoverFill:b,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${ie}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),ht&&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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Vt&&$t&&a.jsx("div",{className:`${o}-panel`,"aria-hidden":!Be,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[ht&&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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(_e),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(_),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G($e),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(z),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${o}-answer`,style:{...Ie,...pt,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Ve,children:a.jsx(Cn,{content:$t})})}),be>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(be)}}),ht&&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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(B),zIndex:2}})]})})})]},Ne)})})})]})}const Hu=`import { useCallback, useEffect, useMemo, useState } from 'react';\r
|
|
8599
|
+
import cn from 'classnames';\r
|
|
8600
|
+
import { CommonComponentProps } from '../props';\r
|
|
8601
|
+
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
8602
|
+
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
|
|
8603
|
+
import { SvgImage } from '../helpers/SvgImage/SvgImage';\r
|
|
8604
|
+
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
8605
|
+
import { PaddingControl } from '../helpers/PaddingControl/PaddingControl';\r
|
|
8606
|
+
\r
|
|
8607
|
+
type FAQContentItem = {\r
|
|
8608
|
+
question?: string;\r
|
|
8609
|
+
answer?: any[];\r
|
|
8610
|
+
};\r
|
|
8611
|
+
\r
|
|
8612
|
+
type FAQSettings = {\r
|
|
8613
|
+
wrapperWidth?: number;\r
|
|
8614
|
+
cellMinHeight?: number;\r
|
|
8615
|
+
dividerWidth?: number;\r
|
|
8616
|
+
dividerStyle?: 'solid' | 'dashed' | 'dotted';\r
|
|
8617
|
+
entryHoverEffect?: 'none' | 'default';\r
|
|
8618
|
+
autoclose?: 'on' | 'off';\r
|
|
8619
|
+
icon?: string | null;\r
|
|
8620
|
+
iconMaxWidth?: number;\r
|
|
8621
|
+
iconPaddingRight?: number;\r
|
|
8622
|
+
iconAnimation?: 'rotate 180' | 'rotate 90' | 'rotate 45';\r
|
|
8623
|
+
questionColor?: string;\r
|
|
8624
|
+
answerColor?: string;\r
|
|
8625
|
+
dividerColor?: string;\r
|
|
8626
|
+
iconColor?: string;\r
|
|
8627
|
+
questionHoverColor?: string;\r
|
|
8628
|
+
iconHoverColor?: string;\r
|
|
8629
|
+
iconActiveColor?: string;\r
|
|
8630
|
+
dividerHoverColor?: string;\r
|
|
8631
|
+
questionFontFamily?: string;\r
|
|
8632
|
+
questionFontSettings?: { fontWeight: number; fontStyle: string };\r
|
|
8633
|
+
questionFontSize?: number;\r
|
|
8634
|
+
questionLineHeight?: number;\r
|
|
8635
|
+
questionLetterSpacing?: number;\r
|
|
8636
|
+
questionWordSpacing?: number;\r
|
|
8637
|
+
questionTextAppearance?: TextStyles['textAppearance'];\r
|
|
8638
|
+
answerFontFamily?: string;\r
|
|
8639
|
+
answerFontSettings?: { fontWeight: number; fontStyle: string };\r
|
|
8640
|
+
answerFontSize?: number;\r
|
|
8641
|
+
answerLineHeight?: number;\r
|
|
8642
|
+
answerLetterSpacing?: number;\r
|
|
8643
|
+
answerWordSpacing?: number;\r
|
|
8644
|
+
answerTextAppearance?: TextStyles['textAppearance'];\r
|
|
8645
|
+
questionPaddingLeft?: number;\r
|
|
8646
|
+
questionPaddingTop?: number;\r
|
|
8647
|
+
questionPaddingBottom?: number;\r
|
|
8648
|
+
answerPaddingLeft?: number;\r
|
|
8649
|
+
answerPaddingRight?: number;\r
|
|
8650
|
+
answerPaddingTop?: number;\r
|
|
8651
|
+
answerPaddingBottom?: number;\r
|
|
8652
|
+
};\r
|
|
8653
|
+
\r
|
|
8654
|
+
type FAQProps = {\r
|
|
8655
|
+
settings: FAQSettings;\r
|
|
8656
|
+
content?: FAQContentItem[];\r
|
|
8657
|
+
isEditor?: boolean;\r
|
|
8658
|
+
isPreviewMode?: boolean;\r
|
|
8659
|
+
isEditMode?: boolean;\r
|
|
8660
|
+
activeEvent: string | undefined;\r
|
|
8661
|
+
onUpdateSettings?: (settings: FAQSettings) => void;\r
|
|
8662
|
+
} & CommonComponentProps;\r
|
|
8663
|
+
\r
|
|
8664
|
+
const PANEL_ANIM_MS = 300;\r
|
|
8665
|
+
const PADDING_HANDLE_SIZE = 0.004;\r
|
|
8666
|
+
\r
|
|
8667
|
+
type ColorKeys =\r
|
|
8668
|
+
| 'questionColor'\r
|
|
8669
|
+
| 'answerColor'\r
|
|
8670
|
+
| 'dividerColor'\r
|
|
8671
|
+
| 'iconColor'\r
|
|
8672
|
+
| 'questionHoverColor'\r
|
|
8673
|
+
| 'iconHoverColor'\r
|
|
8674
|
+
| 'iconActiveColor'\r
|
|
8675
|
+
| 'dividerHoverColor';\r
|
|
8676
|
+
\r
|
|
8677
|
+
const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
|
|
8678
|
+
questionColor: 'question-color',\r
|
|
8679
|
+
answerColor: 'answer-color',\r
|
|
8680
|
+
dividerColor: 'divider-color',\r
|
|
8681
|
+
iconColor: 'icon-color',\r
|
|
8682
|
+
questionHoverColor: 'question-hover-color',\r
|
|
8683
|
+
iconHoverColor: 'icon-hover-color',\r
|
|
8684
|
+
iconActiveColor: 'icon-active-color',\r
|
|
8685
|
+
dividerHoverColor: 'divider-hover-color',\r
|
|
8686
|
+
};\r
|
|
8687
|
+
\r
|
|
8688
|
+
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
8689
|
+
\r
|
|
8690
|
+
function sv(px: number): string {\r
|
|
8691
|
+
return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;\r
|
|
8692
|
+
}\r
|
|
8693
|
+
\r
|
|
8694
|
+
function getTextClassName(\r
|
|
8695
|
+
fontSize: number | undefined,\r
|
|
8696
|
+
lineHeight: number | undefined,\r
|
|
8697
|
+
baseClassName: string,\r
|
|
8698
|
+
tightLeadingClassName: string,\r
|
|
8699
|
+
): string {\r
|
|
8700
|
+
const resolvedFontSize = fontSize ?? 0.01;\r
|
|
8701
|
+
const needsTightLeading = lineHeight !== undefined && lineHeight < resolvedFontSize;\r
|
|
8702
|
+
\r
|
|
8703
|
+
return needsTightLeading\r
|
|
8704
|
+
? \`\${baseClassName} \${tightLeadingClassName}\`\r
|
|
8705
|
+
: baseClassName;\r
|
|
8706
|
+
}\r
|
|
8707
|
+
\r
|
|
8708
|
+
function getTextLeadingVars(\r
|
|
8709
|
+
fontSize: number | undefined,\r
|
|
8710
|
+
lineHeight: number | undefined,\r
|
|
8711
|
+
prefix: string,\r
|
|
8712
|
+
isEditor?: boolean,\r
|
|
8713
|
+
): React.CSSProperties {\r
|
|
8714
|
+
const resolvedFontSize = fontSize ?? 0.01;\r
|
|
8715
|
+
\r
|
|
8716
|
+
if (lineHeight === undefined || lineHeight >= resolvedFontSize) {\r
|
|
8717
|
+
return {};\r
|
|
8718
|
+
}\r
|
|
8719
|
+
\r
|
|
8720
|
+
return {\r
|
|
8721
|
+
[\`--\${prefix}-text-leading-gap\`]: scalingValue((resolvedFontSize - lineHeight) / 2, isEditor),\r
|
|
8722
|
+
} as React.CSSProperties;\r
|
|
8723
|
+
}\r
|
|
8724
|
+
\r
|
|
8725
|
+
function getCSS(P: string): string {\r
|
|
8726
|
+
return \`\r
|
|
8727
|
+
.\${P}-wrapper {\r
|
|
8728
|
+
box-sizing: border-box;\r
|
|
8729
|
+
display: flex;\r
|
|
8730
|
+
flex-direction: column;\r
|
|
8731
|
+
}\r
|
|
8732
|
+
.\${P}-item {\r
|
|
8733
|
+
display: flex;\r
|
|
8734
|
+
flex-direction: column;\r
|
|
8735
|
+
position: relative;\r
|
|
8736
|
+
border-bottom-width: var(--\${P}-divider-width);\r
|
|
8737
|
+
border-bottom-style: var(--\${P}-divider-style);\r
|
|
8738
|
+
border-bottom-color: var(--\${P}-divider-color);\r
|
|
8739
|
+
}\r
|
|
8740
|
+
.\${P}-item:first-child {\r
|
|
8741
|
+
border-top-width: var(--\${P}-divider-width);\r
|
|
8742
|
+
border-top-style: var(--\${P}-divider-style);\r
|
|
8743
|
+
border-top-color: var(--\${P}-divider-color);\r
|
|
8744
|
+
}\r
|
|
8745
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item {\r
|
|
8746
|
+
transition: border-color 250ms;\r
|
|
8747
|
+
}\r
|
|
8748
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-question-button {\r
|
|
8749
|
+
transition: color 250ms;\r
|
|
8750
|
+
}\r
|
|
8751
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover,\r
|
|
8752
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:has(+ .\${P}-item:not(.\${P}-item-open):hover),\r
|
|
8753
|
+
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) {\r
|
|
8754
|
+
border-bottom-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));\r
|
|
8755
|
+
}\r
|
|
8756
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover:first-child,\r
|
|
8757
|
+
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open):first-child {\r
|
|
8758
|
+
border-top-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));\r
|
|
8759
|
+
}\r
|
|
8760
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-question-button,\r
|
|
8761
|
+
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button {\r
|
|
8762
|
+
color: var(--\${P}-question-hover-color, var(--\${P}-question-color));\r
|
|
8763
|
+
}\r
|
|
8764
|
+
.\${P}-question-button {\r
|
|
8765
|
+
display: flex;\r
|
|
8766
|
+
flex-direction: column;\r
|
|
8767
|
+
align-items: stretch;\r
|
|
8768
|
+
width: 100%;\r
|
|
8769
|
+
margin: 0;\r
|
|
8770
|
+
border: none;\r
|
|
8771
|
+
background: none;\r
|
|
8772
|
+
cursor: pointer;\r
|
|
8773
|
+
text-align: left;\r
|
|
8774
|
+
color: var(--\${P}-question-color);\r
|
|
8775
|
+
font: inherit;\r
|
|
8776
|
+
padding-left: 0;\r
|
|
8777
|
+
outline: none;\r
|
|
8778
|
+
-webkit-tap-highlight-color: transparent;\r
|
|
8779
|
+
}\r
|
|
8780
|
+
.\${P}-question-button:focus,\r
|
|
8781
|
+
.\${P}-question-button:focus-visible {\r
|
|
8782
|
+
outline: none;\r
|
|
8783
|
+
}\r
|
|
8784
|
+
.\${P}-question-row {\r
|
|
8785
|
+
display: flex;\r
|
|
8786
|
+
align-items: center;\r
|
|
8787
|
+
justify-content: space-between;\r
|
|
8788
|
+
gap: \${sv(20)};\r
|
|
8789
|
+
width: 100%;\r
|
|
8790
|
+
min-width: 0;\r
|
|
8791
|
+
min-height: var(--\${P}-question-min-height, unset);\r
|
|
8792
|
+
}\r
|
|
8793
|
+
.\${P}-editor .\${P}-question-button {\r
|
|
8794
|
+
cursor: default;\r
|
|
8795
|
+
}\r
|
|
8796
|
+
.\${P}-question {\r
|
|
8797
|
+
margin: 0;\r
|
|
8798
|
+
flex: 1;\r
|
|
8799
|
+
min-width: 0;\r
|
|
8800
|
+
color: inherit;\r
|
|
8801
|
+
white-space: pre-wrap;\r
|
|
8802
|
+
overflow-wrap: anywhere;\r
|
|
8803
|
+
word-break: break-word;\r
|
|
8804
|
+
}\r
|
|
8805
|
+
.\${P}-text-tight-leading {\r
|
|
8806
|
+
display: block;\r
|
|
8807
|
+
flex-shrink: 0;\r
|
|
8808
|
+
padding-top: var(--\${P}-text-leading-gap, 0);\r
|
|
8809
|
+
padding-bottom: var(--\${P}-text-leading-gap, 0);\r
|
|
8810
|
+
}\r
|
|
8811
|
+
.\${P}-icon {\r
|
|
8812
|
+
flex-shrink: 0;\r
|
|
8813
|
+
width: var(--\${P}-icon-max-width);\r
|
|
8814
|
+
height: var(--\${P}-icon-max-width);\r
|
|
8815
|
+
position: relative;\r
|
|
8816
|
+
transition: transform \${PANEL_ANIM_MS}ms ease;\r
|
|
8817
|
+
}\r
|
|
8818
|
+
.\${P}-icon-custom {\r
|
|
8819
|
+
display: flex;\r
|
|
8820
|
+
align-items: center;\r
|
|
8821
|
+
justify-content: center;\r
|
|
8822
|
+
}\r
|
|
8823
|
+
.\${P}-icon-image {\r
|
|
8824
|
+
position: absolute;\r
|
|
8825
|
+
top: 50%;\r
|
|
8826
|
+
left: 50%;\r
|
|
8827
|
+
transform: translate(-50%, -50%);\r
|
|
8828
|
+
transition: background-color 250ms;\r
|
|
8829
|
+
}\r
|
|
8830
|
+
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-icon-image,\r
|
|
8831
|
+
.\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image {\r
|
|
8832
|
+
--fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;\r
|
|
8833
|
+
--hover-fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;\r
|
|
8834
|
+
}\r
|
|
8835
|
+
.\${P}-item-open .\${P}-icon-image {\r
|
|
8836
|
+
--fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;\r
|
|
8837
|
+
--hover-fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;\r
|
|
8838
|
+
}\r
|
|
8839
|
+
.\${P}-item-open .\${P}-icon-anim-45 {\r
|
|
8840
|
+
transform: rotate(45deg);\r
|
|
8841
|
+
}\r
|
|
8842
|
+
.\${P}-item-open .\${P}-icon-anim-90 {\r
|
|
8843
|
+
transform: rotate(90deg);\r
|
|
8844
|
+
}\r
|
|
8845
|
+
.\${P}-item-open .\${P}-icon-anim-180 {\r
|
|
8846
|
+
transform: rotate(180deg);\r
|
|
8847
|
+
}\r
|
|
8848
|
+
.\${P}-panel {\r
|
|
8849
|
+
display: grid;\r
|
|
8850
|
+
grid-template-rows: 0fr;\r
|
|
8851
|
+
transition: grid-template-rows \${PANEL_ANIM_MS}ms ease;\r
|
|
8852
|
+
}\r
|
|
8853
|
+
.\${P}-item-open .\${P}-panel {\r
|
|
8854
|
+
grid-template-rows: 1fr;\r
|
|
8855
|
+
}\r
|
|
8856
|
+
.\${P}-panel-inner {\r
|
|
8857
|
+
overflow: hidden;\r
|
|
8858
|
+
min-height: 0;\r
|
|
8859
|
+
}\r
|
|
8860
|
+
.\${P}-answer {\r
|
|
8861
|
+
color: var(--\${P}-answer-color);\r
|
|
8862
|
+
}\r
|
|
8863
|
+
.\${P}-answer-text {\r
|
|
8864
|
+
margin: 0;\r
|
|
8865
|
+
color: inherit;\r
|
|
8866
|
+
white-space: pre-wrap;\r
|
|
8867
|
+
overflow-wrap: anywhere;\r
|
|
8868
|
+
word-break: break-word;\r
|
|
8869
|
+
}\r
|
|
8870
|
+
.\${P}-answer-text a {\r
|
|
8871
|
+
color: inherit;\r
|
|
8872
|
+
text-decoration: underline;\r
|
|
8873
|
+
text-underline-offset: 0.1em;\r
|
|
8874
|
+
}\r
|
|
8875
|
+
.\${P}-padding-handle {\r
|
|
8876
|
+
width: 100%;\r
|
|
8877
|
+
flex-shrink: 0;\r
|
|
8878
|
+
background: transparent;\r
|
|
8879
|
+
}\r
|
|
8880
|
+
.\${P}-question-controls,\r
|
|
8881
|
+
.\${P}-answer-controls {\r
|
|
8882
|
+
position: relative;\r
|
|
8883
|
+
}\r
|
|
8884
|
+
.\${P}-padding-control-handle {\r
|
|
8885
|
+
background: transparent;\r
|
|
8886
|
+
}\r
|
|
8887
|
+
.\${P}-padding-control-handle[data-controls-axis="x"][data-controls-variant="column-padding"]::after {\r
|
|
8888
|
+
content: '';\r
|
|
8889
|
+
position: absolute;\r
|
|
8890
|
+
top: 50%;\r
|
|
8891
|
+
left: 50%;\r
|
|
8892
|
+
transform: translate(-50%, -50%);\r
|
|
8893
|
+
width: 4px;\r
|
|
8894
|
+
height: 12px;\r
|
|
8895
|
+
background: #FF5C02;\r
|
|
8896
|
+
border: 1px solid #FFFFFF;\r
|
|
8897
|
+
border-radius: 5px;\r
|
|
8898
|
+
box-sizing: border-box;\r
|
|
8899
|
+
pointer-events: none;\r
|
|
8900
|
+
}\r
|
|
8901
|
+
.\${P}-padding-control-handle[data-controls-axis="y"]::after {\r
|
|
8902
|
+
content: '';\r
|
|
8903
|
+
position: absolute;\r
|
|
8904
|
+
top: 50%;\r
|
|
8905
|
+
left: 50%;\r
|
|
8906
|
+
transform: translate(-50%, -50%);\r
|
|
8907
|
+
width: 12px;\r
|
|
8908
|
+
height: 4px;\r
|
|
8909
|
+
background: #FF5C02;\r
|
|
8910
|
+
border: 1px solid #FFFFFF;\r
|
|
8911
|
+
border-radius: 5px;\r
|
|
8912
|
+
box-sizing: border-box;\r
|
|
8913
|
+
pointer-events: none;\r
|
|
8914
|
+
}\r
|
|
8915
|
+
.\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after {\r
|
|
8916
|
+
left: 20px;\r
|
|
8917
|
+
transform: translateY(-50%);\r
|
|
8918
|
+
}\r
|
|
8919
|
+
\`;\r
|
|
8920
|
+
}\r
|
|
8921
|
+
\r
|
|
8922
|
+
function resolveTextStyle(\r
|
|
8923
|
+
fontFamily: string | undefined,\r
|
|
8924
|
+
fontSettings: FAQSettings['questionFontSettings'],\r
|
|
8925
|
+
fontSize: number | undefined,\r
|
|
8926
|
+
lineHeight: number | undefined,\r
|
|
8927
|
+
letterSpacing: number | undefined,\r
|
|
8928
|
+
wordSpacing: number | undefined,\r
|
|
8929
|
+
textAppearance: TextStyles['textAppearance'],\r
|
|
8930
|
+
color: string | undefined,\r
|
|
8931
|
+
): TextStyles {\r
|
|
8932
|
+
return {\r
|
|
8933
|
+
fontSettings: {\r
|
|
8934
|
+
fontFamily,\r
|
|
8935
|
+
fontWeight: fontSettings?.fontWeight ?? 400,\r
|
|
8936
|
+
fontStyle: fontSettings?.fontStyle ?? 'normal',\r
|
|
8937
|
+
},\r
|
|
8938
|
+
fontSize: fontSize ?? 0.01,\r
|
|
8939
|
+
lineHeight,\r
|
|
8940
|
+
letterSpacing: letterSpacing ?? 0,\r
|
|
8941
|
+
wordSpacing: wordSpacing ?? 0,\r
|
|
8942
|
+
textAppearance,\r
|
|
8943
|
+
color: color ?? '#000000',\r
|
|
8944
|
+
};\r
|
|
8945
|
+
}\r
|
|
8946
|
+
\r
|
|
8947
|
+
export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent }: FAQProps) {\r
|
|
8948
|
+
const { prefix: P } = useScopedStyles();\r
|
|
8949
|
+
const showControls = isEditMode ?? false;\r
|
|
8950
|
+
const {\r
|
|
8951
|
+
wrapperWidth = 1,\r
|
|
8952
|
+
cellMinHeight = 0,\r
|
|
8953
|
+
dividerWidth = 0.000694,\r
|
|
8954
|
+
dividerStyle = 'solid',\r
|
|
8955
|
+
entryHoverEffect = 'default',\r
|
|
8956
|
+
autoclose = 'off',\r
|
|
8957
|
+
icon,\r
|
|
8958
|
+
iconMaxWidth = 0.00833,\r
|
|
8959
|
+
iconPaddingRight = 0,\r
|
|
8960
|
+
iconAnimation = 'rotate 45',\r
|
|
8961
|
+
questionColor = '#000000',\r
|
|
8962
|
+
answerColor = '#000000',\r
|
|
8963
|
+
dividerColor = '#0000001F',\r
|
|
8964
|
+
iconColor = '#000000',\r
|
|
8965
|
+
questionHoverColor = '#666666',\r
|
|
8966
|
+
iconHoverColor = '#666666',\r
|
|
8967
|
+
iconActiveColor = '#000000',\r
|
|
8968
|
+
dividerHoverColor = '#000000',\r
|
|
8969
|
+
questionFontFamily,\r
|
|
8970
|
+
questionFontSettings,\r
|
|
8971
|
+
questionFontSize,\r
|
|
8972
|
+
questionLineHeight,\r
|
|
8973
|
+
questionLetterSpacing,\r
|
|
8974
|
+
questionWordSpacing,\r
|
|
8975
|
+
questionTextAppearance,\r
|
|
8976
|
+
answerFontFamily,\r
|
|
8977
|
+
answerFontSettings,\r
|
|
8978
|
+
answerFontSize,\r
|
|
8979
|
+
answerLineHeight,\r
|
|
8980
|
+
answerLetterSpacing,\r
|
|
8981
|
+
answerWordSpacing,\r
|
|
8982
|
+
answerTextAppearance,\r
|
|
8983
|
+
questionPaddingLeft = 0,\r
|
|
8984
|
+
questionPaddingTop = 0,\r
|
|
8985
|
+
questionPaddingBottom = 0,\r
|
|
8986
|
+
answerPaddingLeft = 0,\r
|
|
8987
|
+
answerPaddingRight = 0,\r
|
|
8988
|
+
answerPaddingTop = 0,\r
|
|
8989
|
+
answerPaddingBottom = 0,\r
|
|
8990
|
+
} = settings;\r
|
|
8991
|
+
const items = content ?? [];\r
|
|
8992
|
+
const [openIndices, setOpenIndices] = useState<Set<number>>(() => new Set());\r
|
|
8993
|
+
const isInteractive = !isEditor || isPreviewMode;\r
|
|
8994
|
+
\r
|
|
8995
|
+
useEffect(() => {\r
|
|
8996
|
+
setOpenIndices(new Set());\r
|
|
8997
|
+
}, [autoclose]);\r
|
|
8998
|
+
\r
|
|
8999
|
+
useEffect(() => {\r
|
|
9000
|
+
if (isEditor && !isEditMode && !isPreviewMode) {\r
|
|
9001
|
+
setOpenIndices(new Set());\r
|
|
9002
|
+
}\r
|
|
9003
|
+
}, [isEditor, isEditMode, isPreviewMode]);\r
|
|
9004
|
+
const scaled = (value: number) => scalingValue(value, isEditor ?? false);\r
|
|
9005
|
+
const questionPaddingLeftWidth = Math.max(questionPaddingLeft, PADDING_HANDLE_SIZE);\r
|
|
9006
|
+
const questionPaddingTopHeight = Math.max(questionPaddingTop, PADDING_HANDLE_SIZE);\r
|
|
9007
|
+
const questionPaddingBottomHeight = Math.max(questionPaddingBottom, PADDING_HANDLE_SIZE);\r
|
|
9008
|
+
const answerPaddingLeftWidth = Math.max(answerPaddingLeft, PADDING_HANDLE_SIZE);\r
|
|
9009
|
+
const answerPaddingRightWidth = Math.max(answerPaddingRight, PADDING_HANDLE_SIZE);\r
|
|
9010
|
+
const answerPaddingTopHeight = Math.max(answerPaddingTop, PADDING_HANDLE_SIZE);\r
|
|
9011
|
+
const answerPaddingBottomHeight = Math.max(answerPaddingBottom, PADDING_HANDLE_SIZE);\r
|
|
9012
|
+
const questionPaddingLeftMaxFraction = Math.max(0, (wrapperWidth ?? 1) - iconPaddingRight - iconMaxWidth);\r
|
|
9013
|
+
const answerPaddingLeftMaxFraction = Math.max(0, (wrapperWidth ?? 1) - answerPaddingRight);\r
|
|
9014
|
+
const answerPaddingRightMaxFraction = Math.max(0, (wrapperWidth ?? 1) - answerPaddingLeft);\r
|
|
9015
|
+
const iconPaddingRightWidth = Math.max(iconPaddingRight, PADDING_HANDLE_SIZE);\r
|
|
9016
|
+
const iconPaddingRightMaxFraction = Math.max(0, (wrapperWidth ?? 1) - questionPaddingLeft - iconMaxWidth);\r
|
|
9017
|
+
\r
|
|
9018
|
+
const controlsTargetIndex = useMemo(() => {\r
|
|
9019
|
+
if (openIndices.size === 0) {\r
|
|
9020
|
+
return 0;\r
|
|
9021
|
+
}\r
|
|
9022
|
+
\r
|
|
9023
|
+
return Math.min(...openIndices);\r
|
|
9024
|
+
}, [openIndices]);\r
|
|
9025
|
+
\r
|
|
9026
|
+
const isItemOpen = useCallback((index: number) => openIndices.has(index), [openIndices]);\r
|
|
9027
|
+
const entryHoverClass = isInteractive && entryHoverEffect === 'default'\r
|
|
9028
|
+
? \`\${P}-entry-hover-default\`\r
|
|
9029
|
+
: '';\r
|
|
9030
|
+
const iconSrc = icon ?? '';\r
|
|
9031
|
+
const useCustomIcon = iconSrc !== '';\r
|
|
9032
|
+
const iconAnimSuffix = iconAnimation.replace(/^rotate /, '');\r
|
|
9033
|
+
const iconAnimClass = \`\${P}-icon-anim-\${iconAnimSuffix}\`;\r
|
|
9034
|
+
\r
|
|
9035
|
+
const questionTypographyCss = omitTextColors(textStylesToCss(\r
|
|
9036
|
+
resolveTextStyle(\r
|
|
9037
|
+
questionFontFamily,\r
|
|
9038
|
+
questionFontSettings,\r
|
|
9039
|
+
questionFontSize,\r
|
|
9040
|
+
questionLineHeight,\r
|
|
9041
|
+
questionLetterSpacing,\r
|
|
9042
|
+
questionWordSpacing,\r
|
|
9043
|
+
questionTextAppearance,\r
|
|
9044
|
+
questionColor,\r
|
|
9045
|
+
),\r
|
|
9046
|
+
isEditor,\r
|
|
9047
|
+
));\r
|
|
9048
|
+
const answerTypographyCss = omitTextColors(textStylesToCss(\r
|
|
9049
|
+
resolveTextStyle(\r
|
|
9050
|
+
answerFontFamily,\r
|
|
9051
|
+
answerFontSettings,\r
|
|
9052
|
+
answerFontSize,\r
|
|
9053
|
+
answerLineHeight,\r
|
|
9054
|
+
answerLetterSpacing,\r
|
|
9055
|
+
answerWordSpacing,\r
|
|
9056
|
+
answerTextAppearance,\r
|
|
9057
|
+
answerColor,\r
|
|
9058
|
+
),\r
|
|
9059
|
+
isEditor,\r
|
|
9060
|
+
));\r
|
|
9061
|
+
\r
|
|
9062
|
+
const questionTextClassName = getTextClassName(\r
|
|
9063
|
+
questionFontSize,\r
|
|
9064
|
+
questionLineHeight,\r
|
|
9065
|
+
\`\${P}-question\`,\r
|
|
9066
|
+
\`\${P}-text-tight-leading\`,\r
|
|
9067
|
+
);\r
|
|
9068
|
+
const answerTextClassName = getTextClassName(\r
|
|
9069
|
+
answerFontSize,\r
|
|
9070
|
+
answerLineHeight,\r
|
|
9071
|
+
\`\${P}-answer-text\`,\r
|
|
9072
|
+
\`\${P}-text-tight-leading\`,\r
|
|
9073
|
+
);\r
|
|
9074
|
+
const questionTextLeadingVars = getTextLeadingVars(questionFontSize, questionLineHeight, P, isEditor);\r
|
|
9075
|
+
const answerTextLeadingVars = getTextLeadingVars(answerFontSize, answerLineHeight, P, isEditor);\r
|
|
9076
|
+
\r
|
|
9077
|
+
const colorVars = buildColorVars(P, {\r
|
|
9078
|
+
questionColor,\r
|
|
9079
|
+
answerColor,\r
|
|
9080
|
+
dividerColor,\r
|
|
9081
|
+
iconColor,\r
|
|
9082
|
+
questionHoverColor,\r
|
|
9083
|
+
iconHoverColor,\r
|
|
9084
|
+
iconActiveColor,\r
|
|
9085
|
+
dividerHoverColor,\r
|
|
9086
|
+
}, COLOR_VAR_MAP, STATE_KEYS);\r
|
|
9087
|
+
\r
|
|
9088
|
+
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';\r
|
|
9089
|
+
\r
|
|
9090
|
+
const toggleItem = useCallback((index: number) => {\r
|
|
9091
|
+
if (!isInteractive) return;\r
|
|
9092
|
+
\r
|
|
9093
|
+
setOpenIndices((prev) => {\r
|
|
9094
|
+
if (prev.has(index)) {\r
|
|
9095
|
+
const next = new Set(prev);\r
|
|
9096
|
+
next.delete(index);\r
|
|
9097
|
+
return next;\r
|
|
9098
|
+
}\r
|
|
9099
|
+
\r
|
|
9100
|
+
if (autoclose === 'on') {\r
|
|
9101
|
+
return new Set([index]);\r
|
|
9102
|
+
}\r
|
|
9103
|
+
\r
|
|
9104
|
+
const next = new Set(prev);\r
|
|
9105
|
+
next.add(index);\r
|
|
9106
|
+
return next;\r
|
|
9107
|
+
});\r
|
|
9108
|
+
}, [isInteractive, autoclose]);\r
|
|
9109
|
+
\r
|
|
9110
|
+
const scopedCss = useMemo(() => getCSS(P), [P]);\r
|
|
9111
|
+
const wrapperStyleVars = {\r
|
|
9112
|
+
[\`--\${P}-divider-width\`]: scalingValue(dividerWidth, isEditor ?? false),\r
|
|
9113
|
+
[\`--\${P}-divider-style\`]: dividerStyle,\r
|
|
9114
|
+
[\`--\${P}-icon-max-width\`]: scalingValue(iconMaxWidth, isEditor ?? false),\r
|
|
9115
|
+
...(cellMinHeight > 0\r
|
|
9116
|
+
? { [\`--\${P}-question-min-height\`]: scalingValue(cellMinHeight, isEditor ?? false) }\r
|
|
9117
|
+
: {}),\r
|
|
9118
|
+
} as React.CSSProperties;\r
|
|
9119
|
+
\r
|
|
9120
|
+
return (\r
|
|
9121
|
+
<>\r
|
|
9122
|
+
<style dangerouslySetInnerHTML={{ __html: scopedCss }} />\r
|
|
9123
|
+
<div style={colorVars}>\r
|
|
9124
|
+
<div\r
|
|
9125
|
+
className={cn(\r
|
|
9126
|
+
\`\${P}-wrapper\`,\r
|
|
9127
|
+
isEditor && !isPreviewMode && \`\${P}-editor\`,\r
|
|
9128
|
+
entryHoverClass,\r
|
|
9129
|
+
stateClass,\r
|
|
9130
|
+
)}\r
|
|
9131
|
+
style={{\r
|
|
9132
|
+
width: scalingValue(wrapperWidth, isEditor ?? false),\r
|
|
9133
|
+
maxWidth: '100%',\r
|
|
9134
|
+
...wrapperStyleVars,\r
|
|
9135
|
+
}}\r
|
|
9136
|
+
>\r
|
|
9137
|
+
{items.map((item, index) => {\r
|
|
9138
|
+
const isOpen = isItemOpen(index);\r
|
|
9139
|
+
const question = item.question?.trim() ?? '';\r
|
|
9140
|
+
const answer = item.answer;\r
|
|
9141
|
+
const hasAnswer = (answer?.length ?? 0) > 0;\r
|
|
9142
|
+
const showPaddingControls = showControls && index === controlsTargetIndex;\r
|
|
9143
|
+
\r
|
|
9144
|
+
return (\r
|
|
9145
|
+
<div\r
|
|
9146
|
+
key={index}\r
|
|
9147
|
+
className={cn(\`\${P}-item\`, isOpen && \`\${P}-item-open\`)}\r
|
|
9148
|
+
data-faq-item=""\r
|
|
9149
|
+
>\r
|
|
9150
|
+
<div className={\`\${P}-question-controls\`}>\r
|
|
9151
|
+
{showPaddingControls && (\r
|
|
9152
|
+
<>\r
|
|
9153
|
+
<PaddingControl\r
|
|
9154
|
+
data-controls="questionPaddingTop"\r
|
|
9155
|
+
data-controls-static-handle=""\r
|
|
9156
|
+
data-controls-handle-left="20"\r
|
|
9157
|
+
data-controls-axis="y"\r
|
|
9158
|
+
data-controls-variant="row-padding"\r
|
|
9159
|
+
data-controls-min="0"\r
|
|
9160
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9161
|
+
hitPlacement="left-y"\r
|
|
9162
|
+
areaStyle={{\r
|
|
9163
|
+
position: 'absolute',\r
|
|
9164
|
+
top: 0,\r
|
|
9165
|
+
left: 0,\r
|
|
9166
|
+
width: '100%',\r
|
|
9167
|
+
height: scaled(questionPaddingTopHeight),\r
|
|
9168
|
+
zIndex: 2,\r
|
|
9169
|
+
}}\r
|
|
9170
|
+
/>\r
|
|
9171
|
+
<PaddingControl\r
|
|
9172
|
+
data-controls="questionPaddingLeft"\r
|
|
9173
|
+
data-controls-static-handle=""\r
|
|
9174
|
+
data-controls-axis="x"\r
|
|
9175
|
+
data-controls-variant="column-padding"\r
|
|
9176
|
+
data-controls-min="0"\r
|
|
9177
|
+
data-controls-max-fraction={String(questionPaddingLeftMaxFraction)}\r
|
|
9178
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9179
|
+
hitPlacement="center-x"\r
|
|
9180
|
+
areaStyle={{\r
|
|
9181
|
+
position: 'absolute',\r
|
|
9182
|
+
top: 0,\r
|
|
9183
|
+
left: 0,\r
|
|
9184
|
+
width: scaled(questionPaddingLeftWidth),\r
|
|
9185
|
+
height: '100%',\r
|
|
9186
|
+
zIndex: 2,\r
|
|
9187
|
+
}}\r
|
|
9188
|
+
/>\r
|
|
9189
|
+
<PaddingControl\r
|
|
9190
|
+
data-controls="iconPaddingRight"\r
|
|
9191
|
+
data-controls-static-handle=""\r
|
|
9192
|
+
data-controls-axis="x"\r
|
|
9193
|
+
data-controls-variant="column-padding"\r
|
|
9194
|
+
data-controls-reverse=""\r
|
|
9195
|
+
data-controls-min="0"\r
|
|
9196
|
+
data-controls-max-fraction={String(iconPaddingRightMaxFraction)}\r
|
|
9197
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9198
|
+
hitPlacement="center-x"\r
|
|
9199
|
+
areaStyle={{\r
|
|
9200
|
+
position: 'absolute',\r
|
|
9201
|
+
top: 0,\r
|
|
9202
|
+
right: 0,\r
|
|
9203
|
+
width: scaled(iconPaddingRightWidth),\r
|
|
9204
|
+
height: '100%',\r
|
|
9205
|
+
zIndex: 2,\r
|
|
9206
|
+
}}\r
|
|
9207
|
+
/>\r
|
|
9208
|
+
</>\r
|
|
9209
|
+
)}\r
|
|
9210
|
+
<button\r
|
|
9211
|
+
type="button"\r
|
|
9212
|
+
className={\`\${P}-question-button\`}\r
|
|
9213
|
+
aria-expanded={isOpen}\r
|
|
9214
|
+
style={{\r
|
|
9215
|
+
...questionTypographyCss,\r
|
|
9216
|
+
...questionTextLeadingVars,\r
|
|
9217
|
+
paddingLeft: scaled(questionPaddingLeft),\r
|
|
9218
|
+
paddingRight: scaled(iconPaddingRight),\r
|
|
9219
|
+
}}\r
|
|
9220
|
+
onClick={() => toggleItem(index)}\r
|
|
9221
|
+
>\r
|
|
9222
|
+
{questionPaddingTop > 0 && (\r
|
|
9223
|
+
<span\r
|
|
9224
|
+
className={\`\${P}-padding-handle\`}\r
|
|
9225
|
+
style={{ height: scaled(questionPaddingTop) }}\r
|
|
9226
|
+
aria-hidden="true"\r
|
|
9227
|
+
/>\r
|
|
9228
|
+
)}\r
|
|
9229
|
+
<span className={\`\${P}-question-row\`}>\r
|
|
9230
|
+
<span className={questionTextClassName}>{question}</span>\r
|
|
9231
|
+
{hasAnswer && (\r
|
|
9232
|
+
useCustomIcon ? (\r
|
|
9233
|
+
<span className={\`\${P}-icon \${P}-icon-custom \${iconAnimClass}\`} aria-hidden="true">\r
|
|
9234
|
+
<SvgImage\r
|
|
9235
|
+
url={iconSrc}\r
|
|
9236
|
+
fill={iconColor}\r
|
|
9237
|
+
hoverFill={iconHoverColor}\r
|
|
9238
|
+
className={\`\${P}-icon-image\`}\r
|
|
9239
|
+
/>\r
|
|
9240
|
+
</span>\r
|
|
9241
|
+
) : (\r
|
|
9242
|
+
<span className={\`\${P}-icon \${P}-icon-default \${iconAnimClass}\`} aria-hidden="true" />\r
|
|
9243
|
+
)\r
|
|
9244
|
+
)}\r
|
|
9245
|
+
</span>\r
|
|
9246
|
+
{questionPaddingBottom > 0 && (\r
|
|
9247
|
+
<span\r
|
|
9248
|
+
className={\`\${P}-padding-handle\`}\r
|
|
9249
|
+
style={{ height: scaled(questionPaddingBottom) }}\r
|
|
9250
|
+
aria-hidden="true"\r
|
|
9251
|
+
/>\r
|
|
9252
|
+
)}\r
|
|
9253
|
+
</button>\r
|
|
9254
|
+
{showPaddingControls && (\r
|
|
9255
|
+
<PaddingControl\r
|
|
9256
|
+
data-controls="questionPaddingBottom"\r
|
|
9257
|
+
data-controls-static-handle=""\r
|
|
9258
|
+
data-controls-handle-left="20"\r
|
|
9259
|
+
data-controls-axis="y"\r
|
|
9260
|
+
data-controls-variant="row-padding"\r
|
|
9261
|
+
data-controls-min="0"\r
|
|
9262
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9263
|
+
hitPlacement="left-y"\r
|
|
9264
|
+
areaStyle={{\r
|
|
9265
|
+
position: 'absolute',\r
|
|
9266
|
+
bottom: 0,\r
|
|
9267
|
+
left: 0,\r
|
|
9268
|
+
width: '100%',\r
|
|
9269
|
+
height: scaled(questionPaddingBottomHeight),\r
|
|
9270
|
+
zIndex: 2,\r
|
|
9271
|
+
}}\r
|
|
9272
|
+
/>\r
|
|
9273
|
+
)}\r
|
|
9274
|
+
</div>\r
|
|
9275
|
+
{hasAnswer && answer && (\r
|
|
9276
|
+
<div className={\`\${P}-panel\`} aria-hidden={!isOpen}>\r
|
|
9277
|
+
<div className={\`\${P}-panel-inner\`}>\r
|
|
9278
|
+
<div className={\`\${P}-answer-controls\`}>\r
|
|
9279
|
+
{showPaddingControls && (\r
|
|
9280
|
+
<>\r
|
|
9281
|
+
<PaddingControl\r
|
|
9282
|
+
data-controls="answerPaddingTop"\r
|
|
9283
|
+
data-controls-static-handle=""\r
|
|
9284
|
+
data-controls-handle-left="20"\r
|
|
9285
|
+
data-controls-axis="y"\r
|
|
9286
|
+
data-controls-variant="row-padding"\r
|
|
9287
|
+
data-controls-min="0"\r
|
|
9288
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9289
|
+
hitPlacement="left-y"\r
|
|
9290
|
+
areaStyle={{\r
|
|
9291
|
+
position: 'absolute',\r
|
|
9292
|
+
top: 0,\r
|
|
9293
|
+
left: 0,\r
|
|
9294
|
+
width: '100%',\r
|
|
9295
|
+
height: scaled(answerPaddingTopHeight),\r
|
|
9296
|
+
zIndex: 2,\r
|
|
9297
|
+
}}\r
|
|
9298
|
+
/>\r
|
|
9299
|
+
<PaddingControl\r
|
|
9300
|
+
data-controls="answerPaddingLeft"\r
|
|
9301
|
+
data-controls-static-handle=""\r
|
|
9302
|
+
data-controls-axis="x"\r
|
|
9303
|
+
data-controls-variant="column-padding"\r
|
|
9304
|
+
data-controls-min="0"\r
|
|
9305
|
+
data-controls-max-fraction={String(answerPaddingLeftMaxFraction)}\r
|
|
9306
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9307
|
+
hitPlacement="center-x"\r
|
|
9308
|
+
areaStyle={{\r
|
|
9309
|
+
position: 'absolute',\r
|
|
9310
|
+
top: 0,\r
|
|
9311
|
+
left: 0,\r
|
|
9312
|
+
width: scaled(answerPaddingLeftWidth),\r
|
|
9313
|
+
height: '100%',\r
|
|
9314
|
+
zIndex: 2,\r
|
|
9315
|
+
}}\r
|
|
9316
|
+
/>\r
|
|
9317
|
+
<PaddingControl\r
|
|
9318
|
+
data-controls="answerPaddingRight"\r
|
|
9319
|
+
data-controls-static-handle=""\r
|
|
9320
|
+
data-controls-axis="x"\r
|
|
9321
|
+
data-controls-variant="column-padding"\r
|
|
9322
|
+
data-controls-reverse=""\r
|
|
9323
|
+
data-controls-min="0"\r
|
|
9324
|
+
data-controls-max-fraction={String(answerPaddingRightMaxFraction)}\r
|
|
9325
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9326
|
+
hitPlacement="center-x"\r
|
|
9327
|
+
areaStyle={{\r
|
|
9328
|
+
position: 'absolute',\r
|
|
9329
|
+
top: 0,\r
|
|
9330
|
+
right: 0,\r
|
|
9331
|
+
width: scaled(answerPaddingRightWidth),\r
|
|
9332
|
+
height: '100%',\r
|
|
9333
|
+
zIndex: 2,\r
|
|
9334
|
+
}}\r
|
|
9335
|
+
/>\r
|
|
9336
|
+
</>\r
|
|
9337
|
+
)}\r
|
|
9338
|
+
{answerPaddingTop > 0 && (\r
|
|
9339
|
+
<div\r
|
|
9340
|
+
className={\`\${P}-padding-handle\`}\r
|
|
9341
|
+
style={{ height: scaled(answerPaddingTop) }}\r
|
|
9342
|
+
/>\r
|
|
9343
|
+
)}\r
|
|
9344
|
+
<div\r
|
|
9345
|
+
className={\`\${P}-answer\`}\r
|
|
9346
|
+
style={{\r
|
|
9347
|
+
...answerTypographyCss,\r
|
|
9348
|
+
...answerTextLeadingVars,\r
|
|
9349
|
+
paddingLeft: scaled(answerPaddingLeft),\r
|
|
9350
|
+
paddingRight: scaled(answerPaddingRight),\r
|
|
9351
|
+
}}\r
|
|
9352
|
+
>\r
|
|
9353
|
+
<div className={answerTextClassName}>\r
|
|
9354
|
+
<RichTextRenderer content={answer} />\r
|
|
9355
|
+
</div>\r
|
|
9356
|
+
</div>\r
|
|
9357
|
+
{answerPaddingBottom > 0 && (\r
|
|
9358
|
+
<div\r
|
|
9359
|
+
className={\`\${P}-padding-handle\`}\r
|
|
9360
|
+
style={{ height: scaled(answerPaddingBottom) }}\r
|
|
9361
|
+
/>\r
|
|
9362
|
+
)}\r
|
|
9363
|
+
{showPaddingControls && (\r
|
|
9364
|
+
<PaddingControl\r
|
|
9365
|
+
data-controls="answerPaddingBottom"\r
|
|
9366
|
+
data-controls-static-handle=""\r
|
|
9367
|
+
data-controls-handle-left="20"\r
|
|
9368
|
+
data-controls-axis="y"\r
|
|
9369
|
+
data-controls-variant="row-padding"\r
|
|
9370
|
+
data-controls-min="0"\r
|
|
9371
|
+
className={\`\${P}-padding-control-handle\`}\r
|
|
9372
|
+
hitPlacement="left-y"\r
|
|
9373
|
+
areaStyle={{\r
|
|
9374
|
+
position: 'absolute',\r
|
|
9375
|
+
bottom: 0,\r
|
|
9376
|
+
left: 0,\r
|
|
9377
|
+
width: '100%',\r
|
|
9378
|
+
height: scaled(answerPaddingBottomHeight),\r
|
|
9379
|
+
zIndex: 2,\r
|
|
9380
|
+
}}\r
|
|
9381
|
+
/>\r
|
|
9382
|
+
)}\r
|
|
9383
|
+
</div>\r
|
|
9384
|
+
</div>\r
|
|
9385
|
+
</div>\r
|
|
9386
|
+
)}\r
|
|
9387
|
+
</div>\r
|
|
9388
|
+
);\r
|
|
9389
|
+
})}\r
|
|
9390
|
+
</div>\r
|
|
9391
|
+
</div>\r
|
|
9392
|
+
</>\r
|
|
9393
|
+
);\r
|
|
9394
|
+
}\r
|
|
9395
|
+
`;function jt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ei={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Bu={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:jt("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:{...Ei.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:{...Ei.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:jt("Question Padding Left"),questionPaddingTop:jt("Question Padding Top"),questionPaddingBottom:jt("Question Padding Bottom"),answerPaddingLeft:jt("Answer Padding Left"),answerPaddingRight:jt("Answer Padding Right"),answerPaddingTop:jt("Answer Padding Top"),answerPaddingBottom:jt("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:[...Nu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Ou={element:Fu,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:Bu,sourceCode:Hu},Vu=[kl,Ol,Ec,Hc,Uc,id,dd,yd,_d,Iu,Ou];exports.components=Vu;exports.isSchemaV1=wa;
|