1flexbe_cli.entity.setClientJs("element","text01",{isPure:!0});function ot(t,e){e=e.sort((s,n)=>n-s);let i=e[0];return e.forEach(s=>{t<i&&t<=s&&(i=s)}),i}var rt=150,G=2160,at={avif:null,webp:null};function lt(){let t=typeof flexbe_cli=="object"&&flexbe_cli.vars?.site.images||{};return{lazy:!0,lazy_priority:!1,avif:!1,webp:!1,avif_support:at.avif||t.avif_support,webp_support:at.webp||t.webp_support,slow_network:!1,maxSize:G,minSize:rt,quality_map:{jpg:70,webp:70,avif:55}}}async function H(t){return new Promise((e,i)=>{let s=new Image,n=()=>{e(s),setTimeout(()=>{typeof s.remove=="function"&&s.remove()},10)};"decode"in s&&!/\.svg/.test(t)?(s.src=t,s.decode().then(n).catch(i)):(s.onerror=i,s.onload=n,s.src=t)})}function Ft(t){if(typeof t!="string")return t;t=t.replace(/(\/img\/[\d_q]+)\/[\w-]+(\.\w{3,4})/i,"$1$2");let[,e,i,s,n]=t.match(/\/img\/(\d+)_?(\d+)?_?q?(\d+)?\.(\w{3,4})/i)||[];return{id:+e,ext:n,name:`${e}.${n}`,size:i?+i:0,quality:s?+s:null}}function dt(t,e){let i=e.avif_support,s=e.webp_support,n=e.avif,o=e.webp,a=t.ext;return i&&n?a="avif":s&&o?a="webp":t.ext==="webp"&&(s?a="webp":a=t.transparent?"png":"jpg"),a}function zt(t,e=null,i=null){i={...lt(),...i};let{id:s,ext:n}=t;if(!s)return"";let o=i.maxSize||G;!e&&t.ext==="webp"&&!i.webp_support&&(e=Math.min(t.width||o,o));let a=t.animated??n==="gif",l=`/img/${s}.${n}`;if(!e||a||n==="svg")return l;let d=dt(t,i),r=i.slow_network&&ht(),h=i.quality_map??{jpg:70,webp:70,avif:55};switch(r&&(h={jpg:50,webp:50,avif:45}),d){case"png":return`/img/${s}_${e}.png`;case"avif":case"webp":case"jpg":return`/img/${s}_${e}_q${h[d]}.${d}`;case"gif":break;default:return l}}function Ht(t){let e=String(t).match(/\.(jpg|jpeg|png|gif|svg|bmp|webp)$/i);return e?.[1]?e[1]:""}function Vt(t){return t!=="transparent"?t:"#000000"}function Rt(t){if(typeof t=="string"&&(t=Ft(t)),!t||typeof t!="object")return{};let e=t.img_ext||t.ext,i=t.img_id||t.id,s=t.img_name||t.name;(!e||e==="false")&&(e=s?Ht(s):"jpg");let n=t.img_border||t.border,o=Vt(t.img_average||t.average),a=t.img_preview||t.preview||"",l=t.img_width||t.width||0,d=t.img_height||t.height||0,r=+(+t.img_proportion||+t.proportion||0).toFixed(2),h=t.img_animated||t.animated||e==="gif",g=t.img_transparent||t.transparent||0;return{id:i,ext:e,average:o,preview:a,width:l,height:d,proportion:r,border:n,animated:h,transparent:g}}function E(t,e=0,i){return zt(Rt(t),e==="%optimalWidth%"?e:Math.round(e)||parseInt(e,10)||null,i)}async function Y(t){let e=t,i=typeof t=="object"&&(+t.proportion||+t.img_proportion)||0;if(i&&(i<2||i<5&&i%1>0)&&(i*=100),typeof e=="string"||!i){typeof e=="object"&&(e=E(t,50));let s=await H(e);i=s.naturalHeight/s.naturalWidth*100}return i}function ht(){return typeof navigator>"u"?!1:(navigator.connection?.effectiveType||"4g")!=="4g"}async function k(t,e,i){i={...lt(),...i};let s=t.width||0,n=t.img_scale||t.scale||"cover",o=e.height/e.width,a=await Y(t)/100,l=i.slow_network&&ht()?Math.min(1.5,globalThis.devicePixelRatio):Math.min(2,globalThis.devicePixelRatio),d=dt(t,i),r,h;o>a&&n==="contain"||o<a&&n==="cover"?(r=e.width,h=r*a):(h=e.height,r=h/a),l>1&&(r*=l,h*=l),i.sizes&&(r=ot(r,i.sizes),h=r*a);let g=i.minSize||rt,f=i.maxSize||G;return r<=g&&/webp|jpg/.test(d)&&(r=r/l*2,h=r*a),s&&r>s&&(r=s,h=r*a),r>f&&(r=f,h=r*a),{width:Math.ceil(r),height:Math.ceil(h)}}var J=new WeakMap,Ot=()=>Math.floor(Math.random()*999999999),ct=t=>{let{is:e,component:i}=t;return J.has(i)||J.set(i,Ot()),`.component-${e}-${J.get(i)}`},S=class{static is="";require=[];core=null;owner=null;root=null;component=null;$component=null;componentWidth=null;componentHeight=null;isInited=!1;isLoaded=!1;isUpdated=!1;isOpen=null;isVisible=null;inScreen=!1;inBeside=!1;inView=!1;inFocus=!1;wasVisible=null;wasScreen=!1;wasBeside=!1;wasView=!1;wasFocus=!1;get is(){return this.constructor.is}constructor({component:t,core:e,reason:i}){this.core=e,this.owner=e.area,this.root=e.root,this.component=t,this.$component=$(t),this.isUpdated=i==="update"}onInit(){}onLoad(){}onVisible(t){}onScreen(t){}onBeside(t){}onView(t){}onFocus(t){}onResize(t){}onOpen(t){}onClose(t){}onHideShowUI(t){}onDestroy(){}#e(){this._clearEvents();let t=ct(this);
1$(this.owner).on(`tween${t}`,e=>this.#t(e.detail)),$(this.root).on(`open${t}`,e=>this._onOpen(e.detail)),$(this.root).on(`close${t}`,e=>this._onClose(e.detail))}_clearEvents(){let t=ct(this);$(this.owner).off(t),$(this.root).off(t)}#t({force:t=!1}={}){let e=this.componentWidth==null||this.componentHeight==null,i=this.core.isVisible,s=i&&this.component.offsetWidth||0,n=i&&this.component.offsetHeight||0,o=!!(s||n),a=o&&this.core.inBeside,l=o&&this.core.inScreen,d=o&&this.core.inView,r=o&&this.core.inFocus,h=this.componentWidth!==s,g=this.componentHeight!==n,f=t||o&&!e&&(h||g);o&&(this.componentWidth=s,this.componentHeight=n),o!==this.isVisible&&this._onVisible({state:o}),f&&this._onResize({force:t}),a!==this.inBeside&&this._onBeside({state:a}),l!==this.inScreen&&this._onScreen({state:l}),d!==this.inView&&this._onView({state:d}),r!==this.inFocus&&this._onFocus({state:r})}_onInit(){this.isInited=!0,typeof this.onInit=="function"&&this.onInit(),this.#t(),this.#e(),flexbe_cli.require(this.require,()=>this._onLoad())}_onLoad(){this.isLoaded=!0,typeof this.onLoad=="function"&&this.onLoad(),this.require.length&&this.#t()}_onVisible({state:t}){if(this.isVisible==null){this.isVisible=t,this.wasVisible=t;return}let e=t&&!this.wasVisible;this.isVisible=t,this.onVisible({state:t,first:e}),t&&(this.wasVisible=!0)}_onScreen({state:t}){let e=t&&!this.wasScreen;this.inScreen=t,this.onScreen({state:t,first:e}),t&&(this.wasScreen=!0)}_onView({state:t}){let e=t&&!this.wasView;this.inView=t,this.onView({state:t,first:e}),t&&(this.wasView=!0)}_onBeside({state:t}){let e=t&&!this.wasBeside;this.inBeside=t,this.onBeside({state:t,first:e}),t&&(this.wasBeside=!0)}_onFocus({state:t}){let e=t&&!this.wasFocus;this.inFocus=t,this.onFocus({state:t,first:e}),t&&(this.wasFocus=!0)}_onResize(t){this.onResize(t)}_onOpen(t){this.isOpen=!0,this.#t(),this.onOpen(t)}_onClose(t){this.isOpen=!1,this.#t(),this.onClose(t)}_onWindowResize(){this.onWindowResize&&(this.#t(),this.onWindowResize())}_onHideShowUI(t){this.onHideShowUI(t)}destroy(){this._clearEvents(),this.onDestroy()}};var Ie=Object.freeze({value:"auto",title:"AUTO",auto:!0,selectValue:"auto"}),Te=Object.freeze({value:"fill",title:"FILL",fill:!0,selectValue:"fill",tip:typeof tr=="function"&&tr("editor::units::fill_tip")}),Ee=Object.freeze({value:"px",title:"PX",step:1,altStep:5}),Pe=Object.freeze({value:"pt",title:"PT",step:1,altStep:.1}),Ae=Object.freeze({value:"em",title:"EM",step:.1,altStep:.01}),ke=Object.freeze({value:"rem",title:"REM",step:.1,altStep:.01}),Le=Object.freeze({value:"vh",title:"VH",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vh_tip")}),Me=Object.freeze({value:"vw",title:"VW",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vw_tip")}),Fe=Object.freeze({value:"cqw",title:"CQW",step:1,altStep:.1}),ze=Object.freeze({value:"cqw",title:"CQH",step:1,altStep:.1}),He=Object.freeze({value:"ch",title:"CH",step:1,altStep:5,tip:typeof tr=="function"&&tr("editor::units::ch_tip")}),Ve=Object.freeze({value:"%",title:"%",step:1,altStep:.1});function pt(t,e,i=1){let s=t.getBoundingClientRect();return{x:(e.clientX-s.left)/i,y:(e.clientY-s.top)/i}}var N=class extends S{static is="backgroundElement";constructor(...t){super(...t),this.$glareElement=this.$component.find("> .bg-glare-hover").eq(0),this.$bgElement=this.$component.find(".bg-fill").eq(0),this.$hoverElement=this.$component.find(".bg-fill-hover").eq(0),this.lazy=this.$bgElement.data("img-lazy"),this.isImgLoaded=this.$bgElement.data("img-loaded"),this.bgType=this.$bgElement.data("type"),this.hoverType=this.$hoverElement.data("hover-type"),this.hasImagePlaceholder=!!this.$bgElement.data("img-has-placeholder"),this.imageLoadingOptions=flexbe_cli.vars.site.images}async onInit(){this.$bgElement.on("setImage",async()=>{this.isVisible&&!this.isImgLoading&&!this.isImgLoaded&&(this.setImageParams(),await this.loadImage())}),this.$glareElement.length&&this.$component.off("mousemove.bg-glare").on("mousemove.bg-glare",t=>{let{x:e,y:i}=pt(this.$component[0],t);this.$glareElement.css({"--bgGlareX":`${e}px`,"--bgGlareY":`${i}px`})})}async onBeside({state:t,first:e}){t&&e&&(this.lazy&&this.bgType==="image"&&!this.isImgLoaded&&(this.setImageParams(),await this.loadImage()),this.hoverType==="image"&&(this.setHoverImageParams(),await this.loadHoverImage()),this.dispatchEffects())}onWindowResize(){this.dispatchEffects()}getComponentSize(){return{width:this.componentWidth,height:this.componentHeight}}
1dispatchEffects(){let t=flexbe_cli.resize.responsiveMode==="mobile",e=this.$component.hasClass("hover-trigger"),i=this.$component.hasClass("hover-trigger-am"),s=t?i:e;this.$component.toggleClass("js-hover",s)}async loadImage(){this.isImgLoading=!0;let t=0;if(!this.image.original){let{width:i}=await k(this.image,this.getComponentSize(),this.imageLoadingOptions);t=i}let e=E(this.image,t,this.imageLoadingOptions);this.hasImagePlaceholder&&await H(e),this.setImage(this.$bgElement,e),this.isImgLoading=!1,this.isImgLoaded=!0}async loadHoverImage(){let t=0;if(!this.hoverImage.original){let{width:i}=await k(this.hoverImage,this.getComponentSize(),this.imageLoadingOptions);t=i}let e=E(this.hoverImage,t,this.imageLoadingOptions);this.setImage(this.$hoverElement,e)}setImage(t,e){t.css("background-image",`url(${e})`),this.$component.find(".bg-preview").eq(0).addClass("invisible")}setImageParams(){let{$bgElement:t}=this;this.image={id:t.data("img-id"),ext:t.data("img-ext"),width:t.data("img-width"),animated:t.data("img-animated"),transparent:t.data("img-transparent"),proportion:t.data("img-proportion"),original:t.is("[data-img-original]"),type:"background",scale:"cover"}}setHoverImageParams(){let{$hoverElement:t}=this;this.hoverImage={id:t.data("img-id"),ext:t.data("img-ext"),width:t.data("img-width"),animated:t.data("img-animated"),transparent:t.data("img-transparent"),proportion:t.data("img-proportion"),original:t.is("[data-img-original]"),type:"background",scale:"cover"}}};flexbe_cli.entity.setClientJs("element","zone",{components:[N],onInit(){this.setMeta()},onUpdate(){this.setMeta()},setMeta(){let t=this.lastViewport,e=this.hideHidden;this.lastViewport=flexbe_cli.resize.viewportWidth,this.hideHidden=flexbe_cli.is_admin&&$("body").hasClass("hide-hidden"),this.needFixOrder=this.needFixOrder||this.lastViewport!==t||this.hideHidden!==e},onResize(){this.inScreen&&this.isVisible&&this.fixElementOrder()},fixElementOrder(){if(this.setMeta(),!this.needFixOrder)return;this.needFixOrder=!1;let t=this.$area.find(".elements-list");t.find("[data-hidden]").length&&t.each((e,i)=>{let s=$(i).find(".element-item--static"),n=s.filter(":visible");s.removeClass("is-first-child is-last-child"),n.first().addClass("is-first-child"),n.last().addClass("is-last-child")})}});var L=(t,e=0)=>(...i)=>new Promise(s=>{setTimeout(()=>s(t(...i)),e)}),Nt=(t,e=0)=>flexbe_cli.is_admin?t:L(t,e),Q=(t,e=0,...i)=>L(t,e)(...i),ft=(t,e=0,...i)=>Nt(t,e)(...i),X=Symbol("ref"),ut="detached";function mt(t){let e=flexbe_cli.resize.responsiveMode;$(t).find(`[data-hidden="all"], [data-hidden="${e}"]`).toArray().forEach(i=>{let s=$(`<!--${ut}-->`)[0];s[X]=i,$(i).before(s).detach()})}function gt(t){let e=document.createNodeIterator(t,NodeFilter.SHOW_COMMENT),i=[];for(;e.nextNode();){let s=e.referenceNode;s.textContent===ut&&s[X]&&i.push(s)}i.forEach(s=>{let n=s[X];s.parentNode.replaceChild(n,s)})}function F(t,e,i,s={}){let n=$(t),o=e?`[data-component="${e}"]`:"[data-component]";n.is(o)&&n.trigger(i,s),$(t).find(o).each((a,l)=>{$(l).trigger(i,s)})}function O(t=[]){t.forEach(L(e=>{F(e,"image","setImage")}))}function W(t){t.params.virtualTranslate=!0,t.params.cssMode=!1,t.params.slidesPerGroup=1,t.params.spaceBetween=0,t.fadeTransitionId=0,t.fadeTransitionTimer=null;function e(s,n){let{slides:o,slidesSizesGrid:a}=s,l=[],d=0;for(let r=0;r<o.length;r+=1)l.push(d),d+=a[r]||0;return n>0&&l.length>1&&(l[l.length-1]=n),l}function i(s){!t||t.destroyed||s!==t.fadeTransitionId||(t.fadeTransitionTimer&&(clearTimeout(t.fadeTransitionTimer),t.fadeTransitionTimer=null),t.animating=!1,$(t.wrapperEl).trigger("transitionend"))}t.on("init",L(()=>{$(t.el).addClass("swiper-effect-fade")})),t.on("setTransition",(s,n)=>{s.params.effect==="fade"&&(s.fadeTransitionDuration=n,s.slides.transition(n))}),t.on("setTranslate",(s,n)=>{let{slides:o,slidesSizesGrid:a}=s;if(s.params.effect!=="fade"||Number.isNaN(n))return;$(s.wrapperEl).css("transform","");let l=s.minTranslate(),d=s.maxTranslate(),r=Number.isFinite(l)&&Number.isFinite(d),h=e(s,r?l-d:0),g=r?Math.min(l,Math.max(n,d))-l:n;for(let c=0;c<o.length;c+=1){let b=s.slides.eq(c),x=a[c]||0,w=x?-(h[c]+g)/x:0;b.css({left:`-${c*100}
1%`,opacity:Math.min(Math.max(1-Math.abs(w),0),1)})}let f=++s.fadeTransitionId,p=Number(s.fadeTransitionDuration)||0;if(s.fadeTransitionTimer&&(clearTimeout(s.fadeTransitionTimer),s.fadeTransitionTimer=null),!p){s.animating=!1;return}let u=!1,y=s.slides,v=()=>{u||(u=!0,i(f))};y.transitionEnd(v),s.fadeTransitionTimer=setTimeout(v,p+50)}),t.on("destroy",()=>{t.fadeTransitionTimer&&(clearTimeout(t.fadeTransitionTimer),t.fadeTransitionTimer=null)})}var Wt=class{constructor(t,e){e={init:!0,targets:"span",...e},this.options=e,this.pagination=t,this.tag=this.options.tag,this.filled=!1,this.states=["hidden","prev-prev","prev","main","next","next-next","hidden"],this.init()}init(){this.bindEvents(),this.options.init&&this.render({states:this.states,force:!0})}bindEvents(){let{tag:t,pagination:e,options:i}=this,s=$(e);typeof i.onClick=="function"&&s.off("click").on("click",t,n=>{let o=$(n.currentTarget),a=+o.siblings('[data-state="main"]').attr("data-index"),l=+o.attr("data-index")-a;i.onClick(l)})}move(t){let e=this.states,i=this.filled&&t;if(!(i&&this.inAnimate===t)&&(this.render({states:e,force:!0}),i)){let s=e.map((n,o)=>e[o+(t==="prev"?1:-1)]||"hidden");this.inAnimate=t,clearTimeout(this._anim),this._anim=setTimeout(()=>{this.inAnimate=!1},200),requestAnimationFrame(()=>{this.render({states:s})})}}render({states:t,force:e}={}){let i=$(this.pagination),s=this.tag;if(this.filled=!0,e){let n=t.reduce(o=>`${o}<${s}></${s}>`,"");i.html(n)}i.addClass("swiper-pagination-bullets-dynamic"),i.find(s).each((n,o)=>{let a=$(o),l=t[n]||"hidden",d=["swiper-pagination-bullet"];l==="main"&&d.push("swiper-pagination-bullet-active"),l==="hidden"?d.push("swiper-pagination-bullet-hidden"):d.push(`swiper-pagination-bullet-active-${l}`),a.attr("class",d.join(" ")),a.attr("data-state",l),a.attr("data-index",n)})}};function Bt(t){t.params.virtualTranslate=!0,t.params.cssMode=!1,t.on("init",L(()=>{$(t.el).addClass("swiper-effect-slide")})),t.on("setTranslate",(e,i)=>{if(e.params.effect!=="slide"||Number.isNaN(i))return;let s=$(e.wrapperEl),n=$(e.slides),o=e.isHorizontal(),a=o?i:0,l=o?0:i;flexbe_cli.is_admin?s.css({position:"relative",top:`${l}px`,left:`${a}px`,transform:""}):s.css({transform:`translate3d(${a}px, ${l}px, 0px)`}),n.css({left:"",opacity:"",transform:""})})}var K={},vt="none",B="slide",Z="fade",yt=class extends S{static is="cards";constructor(...t){super(...t);let{component:e,$component:i}=this;this.id=this.core.id,this.mode=e.getAttribute("data-mode"),this.mode==="slider"&&(this.require=["/_s/lib/swiper8/dist/swiper-bundle.min.js?v847"],this.$cardsRoot=i.closest(".flexbe-cards-root"),this.$slider=this.$cardsRoot.find(".swiper"),this.$pagination=this.$cardsRoot.find(".slider-pagination--cards"),this.$navigation=this.$cardsRoot.find(".slider-button--cards"),this.$swiperHelper=this.$cardsRoot.find(".swiper-mobile-helper"),this.$flexbeCardsSlider=this.$cardsRoot.find(".flexbe-cards-slider"),this.$flexbeCards=this.$cardsRoot.find(".flexbe-cards"),this.$flexbeCard=this.$cardsRoot.find(".flexbe-card"),this.sliderResponsive=this.$slider.attr("data-slider-responsive-mode"),this.$slider.on("bringIntoView",s=>{let n=this.swiper,o=+$(s.target).closest(this.$flexbeCard)[0].getAttribute("data-swiper-slide-index");n?o!==-1&&(n.loopedSlides?n.slideToLoop(this.normalizeLoopSlideIndex(o)):flexbe_cli.run.is_preview&&n.slideTo(o)):K[this.id]=o}))}onLoad(){this.sliderDisposer(),this.core.inView&&this.initSwipeAnimation()}onBeside({state:t}){t&&this.sliderDisposer()}onScreen({state:t}){t?this.sliderDisposer():this.destroySwipeAnimation()}onView({state:t}){t&&!this.wasView&&this.swiper&&this.swiper.inited&&(this.swiper.update(),this.checkSlidesVisibility(),this.checkNavigationState()),this.toggleAutoplay(t),t&&this.isLoaded&&this.initSwipeAnimation()}onResize(){if(this.sliderDisposer(),this.swiper){let t=this.getViewportSpecificSettings();this.settings={...this.settings,...t},this.swiper.params={...this.swiper.params,...t},setTimeout(()=>{this.swiper.update(),this.checkSlidesVisibility()},10)}}onHideShowUI(){this.destroySlider(),this.initSlider()}sliderDisposer(){if(this.mode!=="slider"||!this.isLoaded||!this.core.isVisible)return;this.responsiveMode=flexbe_cli.resize.responsiveMode;let t=flexbe_cli.resize.responsiveMode==="mobile",e=this.sliderResponsive,i=t?e!=="desktop":e!=="mobile";this.$cardsRoot.toggleClass("slider-enabled",i).toggleClass("slider-
1disabled",!i),this.$flexbeCards.toggleClass("slider-wrapper",i),i&&!this.swiper?this.initSlider():!i&&this.swiper&&this.destroySlider()}initSlider(){if(!(this.mode!=="slider"||this.swiper||typeof Swiper>"u"))try{this.savePropsFromAttributes(),this.createSwiperSettings(),this.createSwiperInstance(),this.createSwiperNavigation(),this.createSwiperLoopPagination(),this.createSwiperEditorFixes(),Q(()=>{this.swiper.init(),Q(()=>this.toggleAutoplay(this.core.inView))})}catch(t){console.warn(t)}}destroySlider(){this.mode==="slider"&&(this.swiper&&this.swiper.destroy(),this.swiper=null,this.$cardsRoot.removeClass("slider-inited slider-enabled"),this.$cardsRoot.addClass("slider-disabled"),this.$flexbeCardsSlider.removeClass("swiper-active"),this.$flexbeCards.removeClass("swiper-wrapper"),this.$flexbeCard.removeClass("swiper-slide-hidden"))}initSwipeAnimation(){this.mode==="slider"&&flexbe_cli.resize.responsiveMode==="mobile"&&this.sliderResponsive!=="desktop"&&!this.$swiperHelper.hasClass("show")&&setTimeout(()=>{this.core.inView&&(this.$swiperHelper.addClass("show"),this.swiper.once("sliderMove",()=>{this.destroySwipeAnimation()}))},500)}destroySwipeAnimation(){this.mode==="slider"&&this.$swiperHelper.hasClass("show")&&this.$swiperHelper.removeClass("show")}savePropsFromAttributes(){this.props={totalSlides:+this.$slider.attr("data-count"),isOverflow:+this.$slider.attr("data-overflow"),autoplayDelay:flexbe_cli.run.is_preview&&Math.floor(+this.$slider.attr("data-autoplay")*1e3)||0,pagination:this.$pagination.attr("data-type")||!1,loop:flexbe_cli.run.is_preview&&!!+this.$slider.attr("data-loop"),effectDesktop:this.$slider.attr("data-effect")||B,effectMobile:this.$slider.attr("data-effect-mobile")||B,inRowDesktop:+this.$slider.attr("data-cards"),inRowMobile:+this.$slider.attr("data-cards-mobile")||1}}createSwiperSettings(){let t=this.getViewportSpecificSettings(),{totalSlides:e,isOverflow:i,autoplayDelay:s,pagination:n}=this.props,o=e<=t.slidesPerView?!1:this.props.loop,a=o&&n==="bullets"?"custom":n,l=Math.max(0,Math.min(e-1,K[this.id]||0));if(o&&(l=this.normalizeLoopSlideIndex(l,t.slidesPerView)),this.freeSlides=0,o&&!i){let d=this.$slider[0].offsetWidth,r=d/t.slidesPerView,h=(flexbe_cli.resize.viewportWidth-d)/2;this.freeSlides=Math.ceil(h/r)}this.settings={autoHeight:this.$slider.find(".align-items-stretch").length===0,preloadImages:!1,allowClick:!0,preventClicks:!1,preventClicksPropagation:!1,touchStartPreventDefault:!1,touchMoveStopPropagation:!1,preventInteractionOnTransition:!1,loopPreventsSlide:!1,simulateTouch:!flexbe_cli.run.is_touch&&flexbe_cli.run.is_preview,longSwipesRatio:.1,longSwipesMs:100,initialSlide:l,loop:o,autoplay:s?{delay:s,stopOnLastSlide:!o,disableOnInteraction:!0,waitForTransition:t.speed>0&&t.effect!==Z}:!1,navigation:{},pagination:{clickable:!0,type:a,el:this.$pagination[0],dynamicBullets:n==="bullets"&&this.$flexbeCard.length>7,dynamicMainBullets:t.slidesPerView,renderCustom:()=>"",formatFractionCurrent:()=>this.getGroupIndex()+1,formatFractionTotal:()=>Math.ceil(this.props.totalSlides/this.swiper.params.slidesPerView)},watchSlidesProgress:!0,loopedSlides:t.slidesPerView+this.freeSlides,...t}}getViewportSpecificSettings(){let t=flexbe_cli.resize.responsiveMode==="mobile",e=t?this.props.inRowMobile:this.props.inRowDesktop,i=t?this.props.effectMobile:this.props.effectDesktop,s=i;(e>1||s===vt)&&(s=B);let n=i===vt?0:flexbe_cli.run.is_preview&&s===Z?450:300;return{effect:s,speed:n,slidesPerView:e}}createSwiperInstance(){this.swiper&&(this.swiper.destroy(),this.swiper=null);let t=!1,e,i=new Swiper(this.$slider[0],{init:!1,wrapperClass:"flexbe-cards",slideClass:"flexbe-card",...this.settings});i.params.effect===Z?W(i):Bt(i);let s=()=>{t||(t=!0,this.$cardsRoot.addClass("slider-inited"),this.$slider.addClass("swiper-inited"));let r=this.props.totalSlides>i.params.slidesPerView;e!==r&&(e=r,this.$cardsRoot.toggleClass("slider-enabled",r),this.$cardsRoot.toggleClass("slider-disabled",!r),this.$slider.toggleClass("swiper-active",r),i.update())},n=()=>
1{if(i.loopedSlides){let r=$(i.slides).filter(`.${i.params.slideDuplicateClass}`),h={};r.each((g,f)=>{let p=$(f),u=p.attr("data-swiper-slide-index"),y=$(i.slides).eq(i.loopedSlides+ +u);h[u]=h[u]?h[u]+1:1,p.attr("data-cloned",h[u]);let v=y.find(".element-content, .ecommerce-content"),c=p.find(".element-content, .ecommerce-content");v.each((w,C)=>{let A=$(C),R=c.eq(w),m=A.data();m&&R.data(m)});let b=y.find("[data-action]"),x=p.find("[data-action]");b.each((w,C)=>{let A=$(C).data();x.eq(w).data(A)})}),flexbe_cli.entity.initArea(r)}},o=()=>{if(i.params.autoHeight){let r=new ResizeObserver(()=>{i.updateAutoHeight()});i.slides.forEach(h=>r.observe(h)),i.on("destroy",()=>{r.disconnect()}),i.on("slideChange",()=>{i.updateAutoHeight()})}};flexbe_cli.is_admin||(i.on("beforeInit",()=>{mt(this.swiper.el)}),i.on("destroy",()=>{gt(this.swiper.el)})),i.onAny((r,h)=>{i.el.dispatchEvent(new CustomEvent(`swiper:${r}`,{detail:h,bubbles:!1,cancelable:!0}))}),i.on("init",L(()=>{s(),n(),o(),this.checkSlidesVisibility()})),i.on("slideChange",L(()=>{this.checkSlidesVisibility()})),i.on("resize",$.debounce(()=>{this.swiper&&(s(),this.checkSlidesVisibility())},50));let a=!1,l=()=>{this.$cardsRoot.addClass("swiper-in-interacting"),this.checkSlidesVisibility()},d=()=>{this.$cardsRoot.removeClass("swiper-in-interacting"),this.checkSlidesVisibility()};i.on("sliderFirstMove",()=>{a=!0,l()}),i.on("touchEnd",()=>{a=!1,d()}),i.on("transitionStart",()=>{a||l()}),i.on("transitionEnd",()=>{a||d(),i.realIndex+i.loopedSlides!==i.activeIndex&&i.loopFix()}),this.$slider.on("reduceSliderControls",(r,{state:h=!0})=>{this.preventAutoplay=!!h,this.preventAutoplay&&this.toggleAutoplay({state:!1}),this.$cardsRoot.toggleClass("swiper-reduce-controls",!!h)}),this.$slider.on("preventSliderMove",(r,{state:h=!0})=>{i.allowTouchMove=!h}),this.swiper=i}createSwiperNavigation(){let t=this.swiper;t.on("init",()=>{this.checkNavigationState()}),t.on("resize",$.debounce(()=>{this.swiper&&this.checkNavigationState()},50)),t.on("slideChange",()=>{this._skipSlide||this.checkNavigationState()}),this.$navigation.on("click",e=>{let i=e.currentTarget.getAttribute("data-direction");this[i==="prev"?"prevSlide":"nextSlide"]()}),this.$slider.on("click.swiper-hidden",".swiper-slide-hidden",e=>{e.preventDefault(),e.stopPropagation();let i=this.swiper;if(i.animating)return;let s=e.currentTarget,n=Array.from(i.slides||[]).findIndex(d=>d===s),o=i.activeIndex,a=o-n,l=n-(o+i.params.slidesPerView-1);a>0?this.prevSlide(a):l>0&&this.nextSlide(l)})}createSwiperLoopPagination(){let t=this.swiper,e=!1;t.on("paginationRender",()=>{if(this.$pagination.toggleClass("disabled",this.props.totalSlides<=t.params.slidesPerView),this._skipSlide||t.params.pagination.type!=="custom")return;this.customPagination||(this.customPagination=new Wt(this.$pagination[0],{init:!1,tag:"span",onClick:a=>{a<0?this.prevSlide():a>0&&this.nextSlide()}}));let i=t.previousIndex,s=t.activeIndex,n=this.props.totalSlides,o=i<s?"next":"prev";(i!==s&&!(o==="next"&&i===s-n)&&!(o==="prev"&&i===s+n)||!e)&&this.customPagination.move(o),e=!0})}createSwiperEditorFixes(){if(!flexbe_cli.is_admin)return;let t=this.swiper;t.on("slideChange",()=>{K[this.id]=t.realIndex})}checkSlidesVisibility(){let t=this.swiper;t.updateSlides();let e=$(t.slides).filter(":visible"),i=e.slice(t.activeIndex,t.activeIndex+t.params.slidesPerView),s=e.not(i);s.removeClass("swiper-slide-visible").addClass("swiper-slide-hidden"),i.removeClass("swiper-slide-hidden").addClass("swiper-slide-visible"),F(s,!1,"sliderDeactivate"),F(i,!1,"sliderActivate")}checkNavigationState(){let t=this.swiper,e=t.params.navigation.disabledClass,i=this.$navigation,s=i.eq(0),n=i.eq(1),{isBeginning:o,isEnd:a}=t;t.loopedSlides&&(o=!1,a=!1),i.toggleClass("disabled",this.props.totalSlides<=t.params.slidesPerView),s.toggleClass(e,o),n.toggleClass(e,a)}normalizeLoopSlideIndex(t,e){let i=this.props.totalSlides;return e==null&&(e=this.swiper.params.slidesPerView||1),t+e>i?i-e:t}getGroupIndex(t,e,i=!0){let s=this.swiper;t==null&&(t=s.realIndex),e||(e=s.params.slidesPerView||1),i&&(s.loopedSlides||e<=1)&&(i=!1);let n=Math.ceil(this.props.totalSlides/e),o=Math.floor(t/e);if(i){let a=o*e,l=a+e-1,d=t-a>l-t,r=t%e!==0&&t+e>=this.props.totalSlides;(d||r)&&(o+=1)}return Math.max(0,Math.min(n,o))}getSlideIndex(t,e){return e==null&&(e=this.swiper.params.slidesPerView||1),t*e}toSlide(t,e){let i=this.swiper,s=this.getSlideIndex(t,e);return i.loopedSlides?i.slideToLoop(s):i.slideTo(s)}prevSlide(t){let e,i=this.swiper;t?t=Math.abs(t):t=1;let s=i.activeIndex;if(i.loopedSlides){let n=s,o=this.props.isOverflow?t:t+this.freeSlides;s+this.props.totalSlides<=i.slides.length&&!(n>=o)&&(this.toggleSkip(!0),i.slideTo(s+this.props.totalSlides,0)),e=i.activeIndex-t}else e=i.activeIndex-t;setTimeout(()=>{this.toggleSkip(!1),i.slideTo(e)},5)}nextSlide(t){let e,i=this.swiper,s=i.params.slidesPerView;t?t=Math.abs(t):t=1;let n=i.activeIndex,o=n+s-1;if(i.loopedSlides){let a=i.slides.length-o-1,l=this.props.isOverflow?t:t+this.freeSlides;n-this.props.totalSlides>=0&&!(a>=l)&&(this.toggleSkip(!0),i.slideTo(n-this.props.totalSlides,0)),e=i.activeIndex+t}else e=i.activeIndex+t;setTimeout(()=>{this.toggleSkip(!1),i.slideTo(e)},5)}toggleSkip(t=!this._skipSlide){this._skipSlide=!!t,this.$slider.toggleClass("noanimate",this._skipSlide)}toggleAutoplay(t){if(!this.swiper)return;this.preventAutoplay&&(t=!1);let e=this.swiper,i=e.autoplay,s=e.params.autoplay||{};!i||!s.enabled||(t&&!i.running?i.start():t||i.stop())}};flexbe_cli.entity.setClientJs("element","zone_cards",{components:[yt],onUpdate(t){t.originId===t.id&&this.fixSwiper(t)},fixSwiper(t={}){clearTimeout(this._changeTimer);let e=flexbe_cli.components.getInstances(this.area).filter(i=>
1i.is==="cards")?.[0]?.swiper;if(!e)return!1;if(document.body.contains(e.el)){if(t?.reason==="items_add"){let i=e.realIndex,s=t.reasonData.to,n=i;i+e.params.slidesPerView<=s&&(n=s-e.params.slidesPerView+1),n!==i&&(this._changeTimer=setTimeout(()=>e.slideTo(n),30))}t.styleRendered&&!t.templateRendered&&requestAnimationFrame(()=>e.$el&&e.update(!1))}else this._changeTimer=setTimeout(()=>this.fixSwiper(t),16)}});function Dt(t){return t.some(e=>e.type==="spacer")}function qt(t){return t.filter((e,i)=>e.type==="divider"&&i>0&&i<t.length-1)}function bt(t,e){if(!t.length||e<=0)return e;let i=Math.floor(e/t.length),s=e-i*t.length;return t.forEach(n=>{n.width+=i,s>0&&(n.width+=1,s-=1)}),0}function wt(t,e){let i=t.minWidth||0,s=Math.min((t.width||0)-i,e);return s<=0?0:(t.width-=s,s)}function Ut(t,e){let i=e;for(;i>0;){let s=t.filter(o=>(o.width||0)>(o.minWidth||0));if(!s.length)break;let n=Math.max(1,Math.floor(i/s.length));for(let o of s)if(i-=wt(o,Math.min(n,i)),i<=0)break}return e-i}function jt(t,e){let i=e-t.reduce((o,a)=>o+(a.width||0),0);if(i===0)return 0;if(i>0){if(Dt(t))return 0;let o=t.filter(d=>d.type==="divider"&&d.width>0);if(o.length)return bt(o,i),0;let a=qt(t);if(a.length)return bt(a,i),0;let l=[...t].reverse().find(d=>d.type==="divider");return l?(l.width+=i,0):i}let s=-i,n=t.filter(o=>o.type==="divider"&&o.width>0);for(let o of n)if(s-=wt(o,s),s<=0)return 0;return Ut(t.filter(o=>o.type==="element"),s),0}function D(t,e){return parseFloat(getComputedStyle(t).getPropertyValue(e))||0}function Gt(t){let e=t.getAttribute("data-e-id");return e==="header_divider"?"divider":e==="header_spacer"?"spacer":"element"}function Yt(t){return flexbe_cli.resize.responsiveMode==="mobile"&&t.attr("data-am-direction")==="column"}function Jt(t){return t.closest("[data-ref-page]").length>0}function Xt(t,e){t.style.removeProperty("gap"),e.forEach(i=>{i.style.removeProperty("--elementWidth")})}flexbe_cli.entity.setClientJs("element","zone_header",{onInit(){this.normalizeHeaderTrack()},onUpdate(){this.normalizeHeaderTrack()},onResize(){this.normalizeHeaderTrack()},onMsg(t,e){t==="normalizeHeaderTrack"&&this.normalizeHeaderTrack(e?.targetWidth)},normalizeHeaderTrack(t){let e=this.$area;if(!e?.length||!Jt(e))return;let i=e.children(".element-item").toArray(),s=e[0];if(Xt(s,i),Yt(e)||!i.length)return;let n=t||Math.round(D(s,"--containerWidth")+D(s,"--headerElementsGap")*2);if(!n)return;let o=i.map(d=>{let r=Gt(d);return{node:d,type:r,width:r==="spacer"?0:Math.round(D(d,"--elementWidth")),minWidth:r==="element"?Math.round(D(d,"--elementMinWidth"))||50:0}}),a=jt(o,n);o.forEach(d=>{d.type!=="spacer"&&d.node.style.setProperty("--elementWidth",`${d.width}px`)});let l=o.filter(d=>d.type==="element").length-1;if(a>0&&l>0){s.style.setProperty("gap",`${Math.round(a/l)}px`);return}s.style.removeProperty("gap")}});flexbe_cli.entity.setClientJs("widget","ANCHORS",{$list:null,loadAnime(){return new Promise((t,e)=>{typeof anime=="function"&&t(!0),document.readyState==="complete"?flexbe_cli.require("/_s/lib/anime/anime.min.js?321").then(t).catch(e):window.addEventListener("load",()=>{flexbe_cli.require("/_s/lib/anime/anime.min.js?321").then(t).catch(e)})})},async onLoad(){this.$list=this.$widget.find(".anchors-list"),this.list=typeof this.$list.data("anchors")=="object"&&this.$list.data("anchors").list||[];let t=this.list.reduce((i,s)=>i+s.enabled,0)<2,e={style:1,show_title:0,...this.$list.data("anchors")};if((flexbe_cli.run.is_mobile||t)&&!flexbe_cli.is_admin){this.$list.toggleClass("is-empty",t);return}this.style=e.style,this.show_title=e.show_title,this.$list.removeAttr("data-anchors"),await this.loadAnime(),this.drawList(),flexbe_cli.is_admin&&flexbe_cli.events.off("layout_change.anchors").on("layout_change.anchors",i=>{i?.action==="layout_render"&&this.drawList()})},check(){let t=flexbe_cli.block.$blocks.not("[data-overlayed]");this.list=this.list.map(e=>{let i=t.closest(`[data-id="${e.id}"]`),s=i.attr("data-hidden")||"none";
1return!e.enabled||!i[0]||["desktop","all"].includes(s)?null:{id:e.id,title:e.title,enabled:e.enabled,anchor:i.find("._anchor").attr("name")}}).filter(Boolean)},drawList(){flexbe_cli.block.$blocks.length||this.$list.hide(),this.check();let t="";flexbe_cli.is_admin&&this.list.length<2?t=`<svg style="color: #adadad" width="18" height="98" viewBox="0 0 18 98" xmlns="http://www.w3.org/2000/svg"> 2 <g fill="none" fill-rule="evenodd"> 3 <circle opacity=".05" cx="9" cy="5" r="5"/> 4 <circle opacity=".2" cx="9" cy="25" r="5"/> 5 <circle opacity=".2" cx="9" cy="73" r="5"/> 6 <circle opacity=".05" cx="9" cy="93" r="5"/> 7 <path d="M9 40a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm5.126 9.626h-4.5v4.5H8.34v-4.5h-4.5V48.34h4.5v-4.5h1.286v4.5h4.5v1.286z" opacity=".45"/> 8 </g> 9 </svg>`:this.list.length>=2&&(this.list.forEach(e=>{let i=this.show_title&&e.title?` data-title="${e.title}"`:"";t+=`<li${i}><a href="#${e.anchor||e.id}"></a></li>`}),t+='<li class="helper"><a></a></li>'),this.$list.find("ul").html(t),this.$helper=this.$list.find(".helper"),this.animateList(),this.bindEvents()},animateList(){if(!(this.list.length<1)){if(flexbe_cli.is_admin)this.$helper.css({opacity:1,transform:`translateY(${24*this.index}px)`});else{let t=anime({targets:this.$list.find("li").not(this.$helper).get(),duration:300,opacity:[0,1],scale:[.8,1],translateY:[10,0],easing:"easeInOutQuad",autoplay:!1,delay:(e,i)=>i*30,complete:()=>{anime({targets:this.$helper.get(),duration:400,translateY:24*this.index,scale:[2.5,1],opacity:[0,1],easing:"easeInExpo"})}});this.$list.addClass("hide"),setTimeout(()=>{this.$list.removeClass("hide"),t.play()},800)}this.$list.find("li").removeClass("active").eq(this.index).addClass("active")}},index:0,bindEvents(){this.$list.find("li").length<=1||(flexbe_cli.block.$blocks.each((t,e)=>{let i=e._core;i?.inFocus&&this.setBlock(i)}),flexbe_cli.block.$blocks.off("focused.anchors").on("focused.anchors",t=>{let e=t.currentTarget._core;e?.inFocus&&this.setBlock(e)}),this.$list.off("click.anchors").on("click.anchors","li",t=>$(t.target).is("a")?!0:($(t.currentTarget).find("[href]").trigger("click"),t.preventDefault(),!1)))},setBlock(t){let e=this.index,i="#6a6a6a",s=t.content||t.$area.find(".container")[0];if(s){let n=s.closest("[data-contrast]").getAttribute("data-contrast");n?i=n==="light"?"#FFF":"#1B1B1C":i=getComputedStyle(s).color}this.$list.css("color",i),this.list.some((n,o)=>n.id===t.id?(e=o,!0):!1),e=Math.max(0,Math.min(this.list.length-1,e)),e!==this.index&&(this.animate(e),this.index=e)},animate(t){if(this.$list.find("li").removeClass("active"),this.$list.find("li").eq(t).addClass("active"),+this.style==1){let e=24*t,i=t-this.index>0?12:-12;anime.remove(this.$helper[0]),anime({targets:this.$helper[0],translateY:e-i,scaleY:2.5,scaleX:.6,duration:80,easing:"easeInQuad",complete:()=>{anime({targets:this.$helper[0],translateY:e,scaleY:1,scaleX:1,duration:80,easing:"easeOutQuad"})}})}}});function Qt(t){return/^\s*(?:linear-gradient|repeat-linear-gradient|radial-gradient)\(.*\)/i.test(t)}var z={hidden:"hidden-mobile",navCreated:"mobile-navigation--created",cartContainer:"nav-header-controls--cart",burgerContainer:"nav-header-controls--burger",safeArea:"provide-panel-safe-area"},I={block:".b_block:not(.b_block--global)",element:".element-item",nav:".mobile-navigation",headerHolder:".header-area",header:".layout-type-header",cartBtn:".w_widget .cart-button",headerCartBtn:".cart-element-icon",navbarContent:".nav-header-content",navbarControls:".nav-header-controls",navmenu:".nav-menu",navmenuItem:".nav-menu-item"},V=(t,e=!1)=>{let i=$(t);if(!i.is(I.element)){let s=i.closest(I.element);i=s.length?s:i}i.toggleClass(z.hidden,!e)};flexbe_cli.entity.setClientJs("widget","MENU01",{created:{},navbarStyle:void 0,overlayingHeader:void 0,isFixed:!1,clickEvent:"click",navmenuCreated:0,contrast:"light",background:"#000000",opacity:1,contrastFixed:"light",backgroundFixed:"#000000",opacityFixed:1,headersMap:[],$headers:void 0,$nav:void 0,$navmenu:void 0,$cart:void 0,$burger:void 0,isOpen:!1,color:"",onLoad(){requestAnimationFrame(()=>this.createWidget());let t=flexbe_cli.resize.responsiveMode,e;$(window).on("resized",()=>{clearTimeout(e),e=setTimeout(()=>{let i=flexbe_cli.resize.responsiveMode;t!==i&&i==="mobile"&&this.createWidget(),t=i},50)})},onMsg(t){t==="forceRecreate"&&(this.createWidget(),this.toggleMenu(!1))},createWidget(){this.navbarStyle=null,this.navmenuCreated=0,this.isFixed=!1,this.overlayingHeader=null,this.created={},this.contrast="light",this.background="#000000",this.opacity=1,this.contrastFixed="light",this.backgroundFixed="#000000",this.opacityFixed=1;let t=$(I.block),e=t.find(I.header);if(V(t,!0),V(e,!0),$(`.${z.safeArea}`).removeClass(z.safeArea),this.headersMap=t.not((s,n)=>!!n.closest('[data-hidden="mobile"]')).toArray().map((s,n)=>{let o=$(s),a=o.find(I.header),l=a.closest("[data-fixed-ignore-adaptive]").length,d=a.hasClass("fixed-area")&&!l,r=a.closest("[data-overlayed]").length>0,h=!!a.data("mobile-menu"),g=a[0]?a[0].closest("[data-abtest-active]"):null,f=a[0]?a[0].closest("[data-abtest-id]"):null,p=(a.data("widget-color")||"auto").replace(/contrast|false/,"auto"),u=(a.data("widget-contrast")||a.closest("[data-contrast]").attr("data-contrast")||"auto").replace(/contrast|false/,"auto"),y=a.data("widget-opacity")||"100",[v,c]=String(p).split(":"),[b,x]=String(u).split(":"),[w,C]=String(y).split(":");return{enabled:h,index:n,$block:o,$header:a,isFixed:d,isOverlaying:r,isActiveAbtest:g,isAbtest:f,background:v,contrast:b,opacity:+w,backgroundFixed:c??v,contrastFixed:x??b,opacityFixed:+(C??w)}}).filter(s=>s.enabled&&(!s.isAbtest||s.isActiveAbtest)).sort((s,n)=>Number(n.isFixed)-Number(s.isFixed)),this.$headers=$(this.headersMap.map(s=>s.$header[0])),this.$nav=this.$area.find(I.nav),this.$navmenu=this.$area.find(I.navmenu),this.styleMobileMenu(),this.fillNavMenu(),this.fillNavbar(),e.closest(".b_block").each((s,n)=>{n._core&&n._core.updateTween()}),this.navbarStyle){if(this.background&&!Qt(this.background)){let s=$('meta[name="theme-color"]');s.length?s.attr("content",this.background):$("head").append(`<meta name="theme-color" content="${this.background}"/>`)}this.$nav.toggleClass("menu-fixed",this.isFixed),this.$nav.toggleClass("menu-static",!this.isFixed),this.hideUnnecessaryElements()}this.overlayingHeader?this.overlayingHeader?.$block.find(I.headerHolder).addClass(z.safeArea):this.navbarStyle==="panel"&&flexbe_cli.block.$list.addClass(z.safeArea),this.navmenuCreated&&(flexbe_cli.entity.initArea(this.$nav),flexbe_cli.events.off("ui_mobilemenu_open").on("ui_mobilemenu_open",()=>{this.openMenu()}),flexbe_cli.events.off("ui_mobilemenu_close").on("ui_mobilemenu_close",()=>{this.$nav.length&&[!0,"true"].includes(this.$nav.attr("data-opened"))&&this.closeMenu()}));let i=flexbe_cli.components.getGlobalInstance("lazyLoading");i&&(i.loadInArea(this.$area[0],"inline"),i.loadInArea(this.$area[0],"lazy"))},styleMobileMenu(){let t={dark:"#060607",light:"#FFFFFF"};if(this.headersMap.length){let s=this.headersMap[0];s.isOverlaying&&s.index===0?this.overlayingHeader=this.headersMap[0]:(s.isOverlaying=!1,(s.background==="transparent"||s.opacity===0)&&(s.isFixed?(s.background=s.backgroundFixed,s.opacity=s.opacityFixed,s.contrast=s.contrastFixed):(s.background="auto",s.opacity=100))),this.background=s.background,this.contrast=s.contrast,this.opacity=s.opacity,this.backgroundFixed=s.backgroundFixed,this.contrastFixed=s.contrastFixed,this.opacityFixed=s.opacityFixed,this.contrast==="auto"&&(this.contrast=s.$header.closest("[data-static-contrast]").attr("data-static-contrast")||s.$header.closest("[data-contrast]").attr("data-contrast")),this.contrastFixed==="auto"&&(this.contrastFixed=this.contrast),this.background==="auto"&&(this.background=this.contrast==="dark"?t.light:t.dark),this.backgroundFixed==="auto"&&(this.backgroundFixed=this.contrastFixed==="dark"?t.light:t.dark,this.opacityFixed=100),this.isFixed=!flexbe_cli.is_admin&&this.headersMap[0].isFixed}let e=null,i=()=>{let s=this.isOpen,n=this.isFixed&&(s||flexbe_cli.scroll.latest>1),o=n?this.contrastFixed:this.contrast,a=n?this.backgroundFixed:this.background,l=(n?this.opacityFixed:this.opacity)/100;s&&a==="transparent"&&(a=o==="dark"?t.light:t.dark,l=1);let d=`${a}-${o}-${l}`;e!==d&&(e=d,this.$area.css({"--background":a,"--opacity":l}).attr("data-contrast",o))};i(),$(window).off("scroll.mobilemenu").on("scroll.mobilemenu",()=>i()),flexbe_cli.events.off(".mobilemenu").on("mobilemenu_opened.mobilemenu mobilemenu_closed.mobilemenu",()=>i())},hideUnnecessaryElements(){this.$nav.removeClass("header-style-round header-style-panel"),this.$nav.addClass(`${z.navCreated} header-style-${this.navbarStyle}
9`),this.headersMap.forEach(t=>{let e=t.$header,i=t.$block,s=e.find(".element-item").toArray().some(n=>n.offsetHeight);V(e,!!s),i.toggleClass("mobile-menu-occupied",!s)})},fillNavbar(){let t=this,{created:e,$area:i,$headers:s,navmenuCreated:n}=this,o=i.find(I.navbarContent),a=i.find(I.navbarControls);o.empty(),a.empty();let l=[],d=[];h(),g(),this.$nav.attr("data-enabled",d.length?"true":"false"),d.length&&r(),l.length&&d.length||d.length>1?this.navbarStyle="panel":l.length===0&&d.length===1?this.navbarStyle="round":this.navbarStyle=null;function r(){let f=s.map((y,v)=>v.querySelector(".component-logo")).eq(0),p=f.clone(),u=p.find(".component-logo-img");if(p.length){p.css({position:"absolute",width:"200px",height:"auto",left:"-9999px",top:"-9999px"}),$("body").append(p);let y=u.prop("width"),v=u.prop("height");y instanceof SVGAnimatedLength&&(y=y.baseVal.value),v instanceof SVGAnimatedLength&&(v=v.baseVal.value),y||(y=u.innerWidth()||p.innerWidth()),v||(v=u.innerHeight()||p.innerHeight());let c=Math.max(.25,v/y||0),b=`${Math.round(50/c)}px`;e.logo=!0,p.css({position:"",width:"",height:"",left:"",top:"",maxWidth:b}),o.append(p),o.attr("data-id",f.closest("[data-id]").attr("data-id")),l.push("logo"),V(f,!1)}else e.logo=!1;return e.logo}function h(){let f=$(I.cartBtn).eq(0),p=t.$headers.find(I.headerCartBtn).eq(0);if(p.length||f.length){e.cart=!0,d.push("cart");let u=f.find(".cart-button-icon"),y=f.find(".cart-button-count"),v=p.find(".cart-element-button-icon"),c=p.find(".cart-element-button-count"),b,x,w;v.length?b=v.html():b=u.html(),c.length?(x=c.css("color"),w=c.css("background-color"),w==="rgba(0, 0, 0, 0)"&&(x="rgb(255, 255, 255, 1)",w="rgb(234, 127, 84, 1)")):(x=y.css("color"),w=y.css("background-color"));let C=` 10 <li class="${z.cartContainer}${p.length?"":" cart-optional"}"> 11 <div class="cart-button"> 12 <svg class="cart-button-icon"> 13 ${b} 14 </svg> 15 <div class="cart-button-count" style="color: ${x}; background: ${w}">0</div> 16 </div> 17 </li>`;t.$cart=$(C),a.append(t.$cart),!p.length&&!t.background&&(t.color=f.css("color"),t.background=f.css("background-color"))}else e.cart=!1;if(e.cart){let u=t.$area.find(".cart-button"),y=u.find(".cart-button-count"),v=flexbe_cli.ecommerce.cartStore.getCount();a.toggleClass("cart-empty",!v),y.text(v),t.$cart.on(t.clickEvent,()=>{t.toggleMenu(!1),flexbe_cli.events.trigger("ui_cart_open")}),setTimeout(()=>{flexbe_cli.ecommerce.cartStore.on("dispatch.mobilemenu",({name:c})=>{let b=flexbe_cli.ecommerce.cartStore.getCount();a.toggleClass("cart-empty",!b),y.text(b),c==="addItem"&&(u.addClass("blink"),setTimeout(()=>{u.removeClass("blink")},300))})})}return e.cart}function g(){return n?(t.$burger=$(`<li class="${z.burgerContainer}"><i></i><i></i><i></i></li>`),a.append(t.$burger),d.push("burger"),t.$burger.on(t.clickEvent,()=>{t.toggleMenu()}),e.burger=!0):e.burger=!1,e.burger}},fillNavMenu(){let{created:t,$navmenu:e,$headers:i}=this,s=["header_menu","header_text","header_contacts","header_social","header_lang_menu","header_button","header_html"];return["header_cart","header_spacer"].forEach(n=>{V(i.find(`[data-e-id="${n}"]`),!1)}),s.forEach(n=>{let o=e.find(`[data-element=${n}]`),a=i.find(`[data-e-id="${n}"]`),l=a.length;if(o.empty(),l){let d=a.clone();d.find('[class^="editor-"]').remove(),d.attr("data-cloned","true");let r=a.closest("[data-page-id]").attr("data-page-id");r&&o.attr("data-page-id",r),o.append(d),o.find("[data-direction]").attr("data-direction","column").attr("data-direction-adaptive","column").attr("data-rollup-adaptive","true"),o.find(".nowrap-list").removeClass("nowrap-list"),o.find(".element-content").removeClass("justify-content-center justify-content-end").addClass("justify-content-start"),V(a,!1),V(d,!0),t[n]=t[n]?t[n]+l:l}}),this.navmenuCreated=Object.keys(t).length,this.navmenuCreated},toggleMenu(t){typeof t>"u"?(t=[!0,"true"].includes(this.$nav.attr("data-opened")),t=!t):t=!!t,this[t?"openMenu":"closeMenu"]()},openMenu(){this.isOpen=!0,this.$area.addClass("show"),this.$nav.outerHeight(),this.$nav.attr("data-opened","true"),this.$navmenu.addClass("active"),this.$burger&&this.$burger.addClass("active"),flexbe_cli.is_admin||flexbe_cli.scroll.lock(),this._onOpen(),flexbe_cli.events.trigger("mobilemenu_opened"),flexbe_cli.resize.responsiveMode==="mobile"&&($("body").addClass("is-widget-open"),this.isFixed||window.scrollTo(0,0))},closeMenu(){this.isOpen=!1,Array.from(this.$navmenu.find(".folder-item")).forEac
17h(t=>{$(t).removeClass("show"),$(t.lastElementChild).slideUp(0)}),$("body").removeClass("is-widget-open"),this.$area.removeClass("show"),this.$nav.attr("data-opened","false"),this.$navmenu.removeClass("active"),this.$burger&&this.$burger.removeClass("active"),flexbe_cli.is_admin||flexbe_cli.scroll.unlock(),$(window).off("resized.mobilemenu"),this._onClose(),flexbe_cli.events.trigger("mobilemenu_closed")}});flexbe_cli.entity.setClientJs("element","header_divider",{isPure:!0});flexbe_cli.entity.setClientJs("element","header_logo",{isPure:!0});var $t=class extends S{static is="menu";get showOnClick(){return this.showType==="click"||flexbe_cli.resize.responsiveMode==="mobile"||flexbe_cli.run.is_touch}get showOnHover(){return this.showType==="hover"&&flexbe_cli.resize.responsiveMode==="desktop"&&flexbe_cli.run.is_pointer}get actualDirection(){return flexbe_cli.resize.responsiveMode==="desktop"?this.direction:this.directionAdaptive}get showAsRollup(){return flexbe_cli.resize.responsiveMode==="mobile"&&this.$component.attr("data-rollup-adaptive")==="true"}constructor(...t){super(...t),this.eventId=this.core?.id,this.isRootModal=this.core.$root.attr("data-is")==="modal",this.$menuList=this.$component.find(".component-menu-list--root"),this.showType=this.$component.attr("data-type"),this.direction=this.$component.attr("data-direction"),this.directionAdaptive=this.$component.attr("data-direction-adaptive"),this.activateMode=this.$component.attr("data-activate-mode"),this.allowShowMore=this.$component.attr("data-show_more"),this.isNested=!!this.$menuList.find(".folder-item").length,this.openFolders=[],this.activeHref=null}_getCleanPath(t){return t?t.split("?")[0]:""}_isInFolder(t){return!!t.closest(".folder-item").length}_isCurrentPageUrl(t){return!t||t.includes("#")?!1:this._getCleanPath(t)===window.location.pathname}_findMenuItemByAnchor(t){return this.$component.find(`a[href*="#${t}"]`).filter((e,i)=>{let s=$(i),[n]=s.attr("href").split("#");return(!n||n===window.location.pathname)&&!this._isInFolder(s)}).closest("li")}_findMenuItemByCurrentUrl(){return this.$component.find("a").filter((t,e)=>{let i=$(e);return this._isCurrentPageUrl(i.attr("href"))&&!this._isInFolder(i)}).closest("li")}activateMenuItem(t){return t&&t.length?(this.setActive(t),this.activeHref=t.find("a").attr("href"),!0):!1}deactivateMenuItem(){return this.clearActive(),this.activeHref=null,!0}activateMenuItems(){let t=this.$component.find("li.menu-item, li.root-item").filter((s,n)=>!this._isInFolder($(n)));t.removeClass("active");let e=[],i=window.location.pathname;if(t.each((s,n)=>{let o=$(n),a=o.find("a").attr("href");a&&(a.includes("#")||this._getCleanPath(a)===i&&e.push(o))}),e.length>0){let s=e.reduce((n,o)=>{let a=n.find("a").attr("href")||"",l=o.find("a").attr("href")||"";return a.length>=l.length?n:o});this.activateMenuItem(s)}this.initAnchorChangeListener()}onBeside({state:t,first:e}){!t||!e||(this.bindEvents(),this.dispatchShowMore(),this.$button=this.$component.find(".folder-item"),!flexbe_cli.is_admin&&this.activateMode&&this.activateMenuItems())}onResize(t={}){["bottom","top"].includes(t.type)||(this.dispatchShowMore(),this.openFolders.forEach(e=>{e.$dropdown?this.setDropdownPosition(e):this.showAsRollup||this._closeFolder(e)}))}onWindowResize(){this.onResize()}onHideShowUI(){this._closeFolder()}onClose(){this.toggleFolder(null,!1)}bindEvents(){$(window).off(`.${this.eventId}`),this.$component.off(".menu"),flexbe_cli.is_admin&&this.$component.on("mouseup.menu.prevent pointerdown.menu.prevent pointerup.menu.prevent",".folder-item",t=>{t.stopPropagation()}),$(window).on(`blur.${this.eventId}`,()=>{this.showAsRollup||this._closeFolder()}),this.$component.on("pointerenter.menu.item pointerleave.menu.item",".menu-item",t=>{if(flexbe_cli.resize.responsiveMode==="desktop"){let e=t.type==="pointerenter";$(t.currentTarget).toggleClass("hover",e)}}),this.$component.on("pointerenter.menu.folder",".folder-item",t=>{this.showOnHover&&(clearTimeout(this._dropdownTimer),$(t.currentTarget).hasClass("show")||(this._dropdownTimer=setTimeout(()=>{flexbe_cli.events.trigger("component_menu:closeAll"),this.toggleFolder(t.currentTarget,!0)},50)))}),this.$component.on("pointerdown.touchfix",t=>{t.target.closest("a")||t.preventDefault()}),this.$component.on("pointerleave.menu.folder",".folder-item",()=>{this.showOnHover&&(clearTimeout(this._dropdownTimer),this._dropdownTimer=setTimeout(()=>{flexbe_cli.events.trigger("component_menu:closeAll")},100))}),this.$component.on("click.menu",".folder-item-text, .show-more",t=>{if(this.showOnClick)return this.toggleFolder(t.currentTarget),!1}),flexbe_cli.events.off(`component_menu:closeAll.${this.eventId}`).on(`component_menu:closeAll.${this.eventId}`,()=>
17{this.openFolders.forEach(t=>this.toggleFolder(t,!1))})}observeItems(){let t,e=!0,i=this.$component.find("li.root-item")[0];this.unobserveItems(),this._resizeObserver=new ResizeObserver(()=>{if(e){e=!1;return}clearTimeout(t),t=setTimeout(()=>{this.onResize({})},30)}),this._resizeObserver.observe(i)}unobserveItems(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}dispatchShowMore(){if(!this.allowShowMore||flexbe_cli.resize.responsiveMode==="mobile"||this.actualDirection==="column"){this.restoreMenuItems();return}this.$componentCopy?this.restoreMenuItems():this.$componentCopy=this.$component.clone();let t=getComputedStyle(this.$component[0]),e=this.$component.innerWidth(),i=this.$menuList.innerWidth(),s=parseInt(t.getPropertyValue("--gapX"),10)||0,n=e+s*2;if(i<=n)return this.observeItems(),!1;let o=this.$menuList.find("li.root-item");this.$menuList.append(` 18 <li class="menu-item root-item folder-item show-more"> 19 <svg viewBox="0 0 18 4"> 20 <path transform="rotate(-90 2 2)" d="M4 2a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm-2 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/> 21 </svg> 22 23 <ul class="component-menu-list component-menu-list--nested apply-text-style"></ul> 24 </li> 25 `);let a=this.$menuList.find(".show-more .component-menu-list--nested"),l=18+s*2;o.toArray().forEach(d=>{let r=d.offsetWidth;l+r>n&&(a.append(d),$(d).removeClass("root-item")),l+=r}),this.observeItems()}restoreMenuItems(){let t=this.$menuList.find(".show-more");if(t.length){if(this.$componentCopy){let e=this.$componentCopy.find(".component-menu-list--root").clone();this.$menuList.html(e.html())}else{let e=t.find(".component-menu-list").eq(0).children();e.addClass("root-item"),t.replaceWith(e)}this.$menuList.css({position:"",top:"",left:""}),this.unobserveItems()}}toggleFolder(t,e){t=$(t).closest(".folder-item")[0],e==null&&(e=!$(t).hasClass("show")),this[e?"_openFolder":"_closeFolder"](t)}toggleNestedFolder(t,e){e==null&&(e=!$(t).hasClass("show")),this[e?"_openNestedDropdown":"_closeNestedDropdown"](t)}initAnchorChangeListener(){flexbe_cli.block.$blocks.each((t,e)=>{let i=e._core;i?.inFocus&&this.checkBlockInFocus(i)}),flexbe_cli.block.$blocks.off(`focused.${this.eventId}`).on(`focused.${this.eventId}`,t=>{this.checkBlockInFocus(t.currentTarget._core)})}checkBlockInFocus(t){if(!t)return;let e=t.$area.find("> a._anchor").attr("name")||t.$area.attr("data-id");if(e)if(t.inFocus)this.activateMenuItem(this._findMenuItemByAnchor(e));else{if(!this.activeHref)return;this.activeHref&&this.activeHref.includes(`#${e}`)&&(this.deactivateMenuItem(),this.activateMenuItem(this._findMenuItemByCurrentUrl()))}}setActive(t){this.clearActive(),t.addClass("active")}clearActive(){this.$component.find(".active").removeClass("active")}_openFolder(t){let e=$(t);if(!e.length||e.hasClass("show"))return;let i=!flexbe_cli.run.is_preview&&!!this.$component.closest("[data-editor*=menu]:not(.editor-focus)").length,s=!flexbe_cli.run.is_preview&&!!this.$component.closest(".editor-focus").length;if(!i){if(this.showAsRollup)e.find(".component-menu-list--nested").eq(0).slideDown(350),e.addClass("show");else{flexbe_cli.events.trigger("component_menu:closeAll");let n=$("body"),o=e.find(".component-menu-list--nested").eq(0).clone(),a=$(`<div class="component-menu-dropdown ${s?"editor-focus":""}"></div>`);t.$dropdown=a;let l=getComputedStyle(t),d=["--gapY","--fontSize","--lineHeight","--fontWeight","--letterSpacing","--fontStyle","--textDecoration"].reduce((r,h)=>({...r,[h]:l.getPropertyValue(h)}),{});if(a.css(d),this.$component.addClass("in-show"),e.addClass("show"),a.append(o).appendTo(n),this.setDropdownPosition(t),this.component.closest(".m_modal, .fixed-area")){let r=flexbe_cli.helpers.scrollParent(this.component);r===document.documentElement&&(r=document),$(r).one(`scroll.${this.eventId}`,()=>{this.setDropdownPosition(t)})}a.off("pointerenter").on("pointerenter",()=>{clearTimeout(this._dropdownTimer)}),n.on(`keydown.dropdown-${this.eventId}`,r=>{r.code==="Escape"&&this._closeFolder()}),n.on(`click.dropdown-${this.eventId}`,r=>{r.target.closest(".folder-item")||this._closeFolder()}),a.off("pointerleave").on("pointerleave",()=>{clearTimeout(this._dropdownTimer),this.toggleNestedFolder(null,!1),this.showOnHover&&(this._dropdownTimer=setTimeout(()=>{this.toggleFolder(t,!1)},100))}),a.on("pointerenter.menu.folder pointerleave.menu.folder",".menu-item",r=>{$(r.currentTarget).toggleClass("hover",r.type==="pointerenter")}),flexbe_cli.run.is_touch?a.on("click.menu.folder",".folder-item",r=>{this.toggleNestedFolder(r.currentTarget)}):(a.on("pointerenter.menu.folder",".folder-item",r=>{this.toggleNestedFolder(r.currentTarget,!0)}),a.on("pointerleave.menu.folder",".folder-item",r=>{this.toggleNestedFolder(r.currentTarget,!1)}))}this.openFolders.push(t)}}_closeFolder(t){let e=t?$(t):this.$menuList.find(".folder-item.show"),i=flexbe_cli.helpers.scrollParent(this.component);i===document.documentElement&&(i=document),$("body").off(`.dropdown-${this.eventId}`),this.$component.removeClass("in-show"),$(i).off(`.${this.eventId}`),this.showAsRollup?e.find(".component-menu-list--nested").slide
25Up(350):(e.find(".component-menu-list--nested").css("display",""),e.each((s,n)=>{n.$dropdown&&n.$dropdown.remove()})),e.removeClass("show"),e.find(".show").removeClass("show"),this.openFolders=this.openFolders.filter(s=>!e.is(s))}_openNestedDropdown(t){let{viewportWidth:e,documentHeight:i}=flexbe_cli.resize,s=$(t),n=s.siblings(".nested-item.show"),o=s.find(".component-menu-list--nested").eq(0),a=s.offset(),l=s.innerWidth(),d=s.innerHeight(),r=a.left,h=r+l,g=a.top,f=g+d,p=o.innerWidth(),u=o.innerHeight(),y=r>p,v=e-h>p,c=g>u,b=i-f>u;if(n.each((x,w)=>this._closeNestedDropdown(w)),s.addClass("show"),o.addClass("show-dropdown"),v)o.addClass("in-right");else if(y)o.addClass("in-left");else{let x=e>p?p:l;o.addClass("in-right"),o.css({maxWidth:`${l}px`,marginTop:"15px",marginLeft:`-${Math.floor(x-(e-h)+10)}px`})}b?o.addClass("in-bottom"):c?o.addClass("in-top"):o.addClass("in-bottom")}_closeNestedDropdown(t){let e=$(t),i=e.find(".component-menu-list--nested").eq(0);e.removeClass("show"),i.removeClass("show-dropdown in-left in-right in-bottom in-top")}setDropdownPosition(t){if(!t||!t.$dropdown)return;let{documentHeight:e,viewportHeight:i}=flexbe_cli.resize,s=$(t),n=t.$dropdown,o=s.hasClass("show-more"),a=s.closest("[data-fixed]").length,l=n.find(".component-menu-list--nested").eq(0),d=o?s.find("svg"):s.children().first().find("span"),r=d[0].getBoundingClientRect(),h=d.offset(),g=h.left,f=h.top,p=f+r.height,u=document.body.getBoundingClientRect(),y=7,v=parseInt(l.find(".menu-item-text").css("paddingLeft"),10)||10,c={position:"absolute",width:l.innerWidth(),height:l.innerHeight(),top:p,left:g-u.left-v};if(c.width<r.width&&(c.width=r.width+v*2,l.css("width","100%")),o&&(c.left=g+r.width/2-c.width/2),flexbe_cli.run.is_preview){let w=Math.max(0,-c.left+y),C=Math.max(0,c.left+c.width+y-u.width);w?c.left+=w:C&&(c.left-=C)}let b=p+c.height>e&&f>c.height,x=p+c.height>flexbe_cli.scroll.latest+i;a&&c.height+r.bottom<i?(c.position="fixed",c.top=r.bottom,c.left+=u.left):(!this.isRootModal&&b||this.isRootModal&&x)&&(c.top=f-c.height),n.toggleClass("rise",a),n.css(c)}};flexbe_cli.entity.setClientJs("element","header_menu",{components:[$t]});flexbe_cli.entity.setClientJs("element","header_social",{isPure:!0});flexbe_cli.entity.setClientJs("element","logo01",{isPure:!0});var Kt=t=>crypto.getRandomValues(new Uint8Array(t)),Zt=(t,e,i)=>{let s=256-256%t.length;if(s===256){let o=t.length-1;return(a=e)=>{if(!a)return"";let l="";for(;;){let d=i(a),r=a;for(;r--;)if(l+=t[d[r]&o],l.length>=a)return l}}}let n=Math.ceil(1.6*256*e/s);return(o=e)=>{if(!o)return"";let a="";for(;;){let l=i(n),d=n;for(;d--;)if(l[d]<s&&(a+=t[l[d]%t.length],a.length>=o))return a}}},te=(t,e=21)=>Zt(t,e|0,Kt),ee="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",fi=te(ee,8),ie=typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>crypto.getRandomValues(new Uint8Array(1))[0]&15:()=>Math.floor(Math.random()*16);function q(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>{let e=parseInt(t);return((e^ie())>>e/4).toString(16)})}var P={},xt=class extends S{static is="image";isImgLoaded=!1;params=null;constructor(t){super(t),this.imageLoadingOptions=flexbe_cli.vars.site.images,this.lazyLoad=this.component.hasAttribute("data-img-lazy"),this.autoLoad=this.component.hasAttribute("data-img-autoload"),this.imageLayer=this.$component.find(".component-image__image").get(0)||this.component,this.overlayLayer=this.$component.find(".component-image__scroll").get(0)}async onInit(){this.autoLoad&&!this.lazyLoad&&await this.loadImage(),this.$component.off(".componentImage"),this.$component.on("setImage.componentImage",$.debounce(async()=>{let t=this.component.getClientRects().length>0;this.autoLoad=!0,this.lazyLoad=!0,t&&!this.isImgLoading&&!this.isImgLoaded&&await this.loadImage()},10))}async onBeside({state:t}){if(!t)return!1;!this.isImgLoaded&&this.autoLoad&&await this.loadImage()}async onResize(){this.isImgLoaded&&this.autoLoad&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(()=>this.loadImage(!0),1e3))}onHideShowUI(t){t==="generation"&&requestAnimationFrame(()=>{this.component&&this.params?.position&&(this.component.style.setProperty("--imagePositionX",this.params.position.x),this.component.style.setProperty("--imagePositionY",this.params.position.y))})}async loadImage(t=!1){if(this._setParams(),!t&&(this.isImgLoaded||this.isImgLoading))return;this._setOverlay();let e,i=this.params;i.original_resolution||(e=await this.getOptimalSize(),e&&P[this.params.id].sizes&&!P[this.params.id].sizes.includes(e)&&P[this.params.id].sizes.push(e)),this.isImgLoading=!0;let s=E(i,e,this.imageLoadingOptions);await this._setImage(s),this.isImgLoading=!1}async getOptimalSize(){let t=this.params,e=await Y(t);t.proportion=e,P[this.params.id]&&(P[this.params.id].params.proportion=e);let i=this.componentWidth||this.component.offsetWidth,s=this.componentHeight||this.component.offsetHeight||i*e/100,{width:n}=await k(this.params,{width:i,height:s},this.imageLoadingOptions),o=n-2,a=Math.max(50,n*1.2);return n=this._getClosestSize(n,o,a),n}async _setImage(t){let{$component:e}=this;if(t){if(this.imageLayer.tagName==="IMG"?(this.imageLayer.removeAttribute("data-inline-src"),this.imageLayer.removeAttribute("data-lazy-src"),this.imageLayer.src=t):this.imageLayer.style.backgroundImage=`url(${t})`,!this.isImgLoaded){if(t)try{await H(t)}catch(i){console.error("Image preload error",i)}e.removeClass("loading"),this.isImgLoaded=!0}e.trigger("load")}}_setOverlay(){let{overlayLayer:t,componentWidth:e,componentHeight:i}=this;if(!t)return;let s="medium";e<=200||i<=150?s="xsmall":e<=400||i<=250?s="small":e>=650&&i>=400&&(s="large"),t.setAttribute("data-size",s),t.getAttribute("data-type")==="hover"&&$(t).on("pointerenter pointerleave",n=>{let o=n.type==="pointerenter";$(t).toggleClass("hover",o)})}
25_setParams(){if(this.params)return;let t=this.component,e=$(t),i={},s=e.attr("data-img-id");if(P[s]?.params)i={...P[s].params};else if(i.id=s,i.ext=e.attr("data-img-ext"),i.proportion=+e.attr("data-img-proportion"),i.position={x:e.attr("data-img-x")||"50%",y:e.attr("data-img-y")||"50%"},!i.ext){let n=(e.attr("data-img-name")||"image.jpg").match(/\.(\D{2,4})$/i)||[];n[1]&&i.ext!==n[1]&&(i.ext=n[1]||!1)}i.action=e.attr("data-action"),i.proportion||(i.proportion=100),i.scale=e.attr("data-img-scale")||"cover",i.original_resolution=t.hasAttribute("data-img-original"),P[i.id]||(P[i.id]={params:{...i},sizes:[]}),i.animated=t.hasAttribute("data-img-animated"),i.transparent=t.hasAttribute("data-img-transparent"),this.params=i}_getClosestSize(t,e=t,i=t+10){let s=P[this.params.id].sizes||[],n,o=1/0;return s.forEach(a=>{let l=Math.abs(a-t);a>=e&&a<=i&&l<o&&(n=a,o=l)}),n??t}};function M(t,e,i){let s;return typeof e=="function"&&typeof t=="function"&&(t()?e():(i&&setTimeout(()=>{clearInterval(s),e()},i),s=setInterval(()=>{t()&&(clearInterval(s),e())},25))),()=>clearInterval(s)}function se(t){t.params.virtualTranslate=!0,t.params.cssMode=!0}var tt="story-active",St="story-autoplay-running",ne=class{constructor(t,e={}){this.el=t,this.options=e,this.frame=null,this.frameId=0,this.activeIndex=null,this.delay=0,this.progress=0,this.running=!1}update({restart:t=!1}={}){if(!this.el)return;let e=Array.from(this.el.querySelectorAll(".swiper-pagination-bullet"));if(!e.length)return;let i=Math.max(0,Math.min(e.length-1,this.options.getIndex?.()||0)),s=this.options.getDelay?.()||0,n=s>0&&!!this.options.isRunning?.(),o=e[i],a=i!==this.activeIndex,l=s!==this.delay,d=t||a||l||!this.running&&n;if(n?d&&(this.progress=0):this.progress=1,this.activeIndex=i,this.delay=s,this.running=n,this.stopProgress(),this.el.classList.toggle(St,n),e.forEach((r,h)=>{r.classList.remove(tt);let g=this.getBulletProgress(h,i);r.style.setProperty("--storyProgress",String(g)),h===i&&r.classList.add(tt)}),!!o){if(!n){o.style.setProperty("--storyProgress",String(this.getBulletProgress(i,i)));return}this.startProgress(o,s)}}startProgress(t,e){let i=performance.now()-this.progress*e,s=++this.frameId,n=o=>{if(!this.el||!t.isConnected||s!==this.frameId)return;let a=Math.max(0,Math.min(1,(o-i)/e));this.progress=a,t.style.setProperty("--storyProgress",String(a)),a<1&&this.options.isRunning?.()&&(this.frame=requestAnimationFrame(n))};t.style.setProperty("--storyProgress",String(this.progress)),this.frame=requestAnimationFrame(n)}getBulletProgress(t,e){return t<e&&this.options.fillPrevious?1:t!==e?0:this.progress}stopProgress(){this.frameId+=1,this.frame!=null&&(cancelAnimationFrame(this.frame),this.frame=null)}destroy(){this.el&&(this.stopProgress(),this.activeIndex=null,this.delay=0,this.progress=0,this.running=!1,this.el.classList.remove(St),this.el.querySelectorAll(".swiper-pagination-bullet").forEach(t=>{t.classList.remove(tt),t.style.removeProperty("--storyProgress")}),this.el=null)}},et="swiper-slide",_t="none",it="slide",Ct="fade",oe="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]",ae={[_t]:0,[Ct]:200},st="click.sliderManualNavigation",re="click.sliderThumbsNavigation",le=6;function de(){return window.matchMedia?.("(hover: hover) and (pointer: fine)").matches??!flexbe_cli.run.is_touch}function he(t){let e=Number(flexbe_cli.resize?.zoom);return t.clientX/(Number.isFinite(e)&&e>0?e:1)}var It=class extends S{static is="slider";require=["/_s/lib/swiper8/dist/swiper-bundle.min.js?v848"];constructor(...t){super(...t);let{component:e}=this;this.swiper=null,this.initialSlide=0,this.index=$(e).closest("[data-item-id]").attr("data-item-id"),this.sliderEl=e.classList.contains("swiper")?e:e.querySelector(".swiper"),this.paginationEl=e.querySelector(".slider-pagination"),this.storyPagination=null,this.prevEl=e.querySelector('.slider-prev, [data-direction="prev"]'),this.nextEl=e.querySelector('.slider-next, [data-direction="next"]'),this.$component.on("bringIntoView",i=>{let s=this.swiper,n=$(this.sliderEl).find(`.${et}`),o=$(i.target).closest(`.${et}`),a=n.index(o);s&&!s.destroyed&&(s.wrapperEl||s.$wrapperEl)?a!==-1&&s.slideTo(a):this.initialSlide=a}),this.setSwiperOptions()}onLoad(){this.inScreen&&!this.swiper&&this.initSwiper()}onScreen({state:t}){!t||!this.isLoaded||this.swiper||this.initSwiper()}onView({state:t}){this.isLoaded&&(t&&!this.swiper&&this.initSwiper(),this.swiper&&this.toggleAutoplay({state:t}))}onResize(){this.swiper&&(this.setSliderSize(),this.setThumbnailsSize(),this.swiper&&this.swiper.initialized&&this.swiper.update(
25))}onDestroy(){this.destroySwiper()}onHideShowUI(t){this.setSwiperOptions(t!=="editor"),this.destroySwiper(),this.initSwiper()}setSwiperOptions(t=flexbe_cli.run.is_preview){let e=this.paginationEl&&this.paginationEl.getAttribute("data-type")||"bullets",i=this.paginationEl&&this.paginationEl.getAttribute("data-direction")||"horizontal",s=!!Number(this.$component.attr("data-loop")),n=Number(this.$component.attr("data-autoplay")),o=this.$component.attr("data-parallax");this.options={paginationType:e,direction:i,count:this.$component.attr("data-count"),loop:t&&s,autoplay:t&&n||!1,effect:(this.$component.attr("data-effect")||it).toLowerCase(),parallax:o!=null&&!["0","false"].includes(String(o)),navigationMode:this.$component.attr("data-navigation-mode")||"buttons",storyFillPrevious:!!Number(this.$component.attr("data-story-fill-previous")),slidesPerView:"auto"}}initSwiper(){if(this.swiper||typeof Swiper>"u")return!1;let{options:t,component:e,core:i,root:s,index:n,sliderEl:o,paginationEl:a,prevEl:l,nextEl:d}=this,r=`${i?.id||"-"}:${n}`,{count:h,loop:g,paginationType:f,direction:p}=t,u=t.effect===_t,y=!!o.querySelector(oe),v=t.effect===it&&(t.parallax||y),c=u?it:t.effect,b=flexbe_cli.theme_id===4,x=f==="story"?"bullets":f;v&&e.setAttribute("data-parallax","1");let w=this.owner.closest(".swiper-inited"),C=t.autoplay?{delay:t.autoplay*1e3,stopOnLastSlide:!g,disableOnInteraction:!1,waitForTransition:!1}:!1,A=this.initialSlide;flexbe_cli.run.is_preview||(s._sliderState?s._sliderState[r]&&(A=Math.max(0,Math.min(h-1,s._sliderState[r])||0)):s._sliderState={},s._sliderState[r]=A);let R={el:a,type:x,clickable:!0,dynamicBullets:b&&f==="bullets",dynamicMainBullets:3};f==="thumbs"&&(R.type=!1,R.el=null,this.thumbsSwiper=new Swiper(a,{cssMode:!0,loop:!1,slidesPerView:"auto",normalizeSlideIndex:!1,direction:p}));let m=new Swiper(o,{init:!1,speed:u?0:350,nested:w,slideClass:et,initialSlide:A,autoplay:C,pagination:R,thumbs:{swiper:this.thumbsSwiper},navigation:{prevEl:l,nextEl:d},effect:c,parallax:{enabled:v},rewind:g,roundLengths:!0,preventInteractionOnTransition:!1,updateOnWindowResize:!1,watchSlidesProgress:v,slidesPerView:t.slidesPerView,simulateTouch:!flexbe_cli.run.is_touch&&flexbe_cli.run.is_preview,longSwipesMs:100,longSwipesRatio:.1,preloadImages:!1,touchReleaseOnEdges:!1,runCallbacksOnInit:!1});this.swiper=m,c===Ct?W(m):b&&se(m),m.onAny((T,_)=>{m.el.dispatchEvent(new CustomEvent(`swiper:${T}`,{detail:_,bubbles:!1,cancelable:!0}))}),m.on("init",()=>{if(!m.slides)return;this.setSliderSize(),this.setThumbnailsSize(),this.swiper!=null&&this.swiper.$el.addClass("swiper-inited"),$(l).add(d).add(a).removeClass("disabled"),this.updateControlsContrast();let T=m.slides[A],_=m.visibleSlides||[m.slides[A]];this.thumbsSwiper&&this.thumbsSwiper.visibleSlides?.length&&_.push(...this.thumbsSwiper.visibleSlides),O(_),T&&F(T,!1,"sliderActivate"),this.toggleAutoplay({state:this.inView}),this.updateStoryPagination()}),this.thumbsSwiper&&this.thumbsSwiper.on("slideChange",$.debounce(T=>{O(T.visibleSlides)},50)),m.on("slideChange",$.debounce(()=>{if(!m.initialized)return;flexbe_cli.run.is_preview||(s._sliderState[r]=m.realIndex);let T=m.slides[m.previousIndex],_=m.slides[m.activeIndex],Lt=_&&(_.getAttribute("data-slider-type")||_.getAttribute("data-type")),Mt=m.previousIndex<m.activeIndex?Array.from(m.slides).slice(m.activeIndex,m.activeIndex+2):Array.from(m.slides).slice(m.activeIndex-2,m.activeIndex);e.setAttribute("data-current-content",Lt),F(T,null,"sliderDeactivate"),F(_,null,"sliderActivate"),O(Mt),this.updateControlsContrast(),this.updateStoryPagination()},50)),m.on("touchStart",()=>{$(o).addClass("swiper-in-interacting"),this.toggleAutoplay({state:!1})}),m.on("touchEnd",()=>{$(o).removeClass("swiper-in-interacting")}),this.$component.off("reduceSliderControls").on("reduceSliderControls",(T,{state:_=!0})=>{this.preventAutoplay=!!_,this.preventAutoplay&&this.toggleAutoplay({state:!1})}),this.$component.off("pointerenter").one("pointerenter",()=>{let T=Array.from(m.slides||[]);O([m.activeIndex-1,m.activeIndex+1].map(_=>T.at(_)))}),this.$component.off("pointerleave.sliderAutoplay").on("pointerleave.sliderAutoplay",()=>{this.toggleAutoplay({state:this.inView})}),$(l).add(d).add(a).off("click.sliderAutoplay").on("click.sliderAutoplay",()=>{this.toggleAutoplay({state:!1})}),this.initManualNavigation(),this.initThumbsNavigation(),m.on("paginationRender paginationUpdate autoplayStart autoplayStop autoplayPause autoplayResume",()=>{this.updateStoryPagination()}),this.initStoryPagination(),this.initHoverNavigation(),ft(()=>m.init())}
25destroySwiper(){if(this.$component.off("pointerleave.sliderAutoplay"),this.$component.off(".sliderHoverNavigation"),this.$hoverNavigationArea?.off(".sliderHoverNavigation"),this.$hoverNavigationArea=null,$(this.prevEl).add(this.nextEl).add(this.paginationEl).off("click.sliderAutoplay"),$(this.prevEl).add(this.nextEl).off(st),$(this.paginationEl).off(".sliderThumbsNavigation"),this.resetControlsContrast(),this.destroyStoryPagination(),this.swiper)try{this.swiper.destroy()}catch{}finally{this.swiper=null}}toggleAutoplay({state:t}){let{swiper:e,options:i}=this;if(!e||!i.autoplay||!e.autoplay)return!1;this.preventAutoplay&&(t=!1);let s=e.autoplay.running;t&&!s&&e.autoplay.start(),!t&&s&&e.autoplay.stop(),this.updateStoryPagination()}slideTo(t,e=!0,i=null,s=!1){if(!this.swiper){this.initialSlide=t;return}let n=this.swiper.params.loop,o=e?i??this.swiper.params.speed:0;(s||typeof this.swiper.realIndex<"u"&&this.swiper.realIndex!==t)&&(n?this.swiper.slideToLoop(t,o):this.swiper.slideTo(t,o))}getCurrentSlideIndex(){let t=this.swiper;if(!t)return this.initialSlide||0;if(!t.params.cssMode||!t.wrapperEl)return t.realIndex??t.activeIndex??0;let e=t.isHorizontal()?t.wrapperEl.scrollLeft:t.wrapperEl.scrollTop,i=Array.from(t.slides||[]);if(!i.length)return t.realIndex??t.activeIndex??0;let s=0,n=1/0;i.forEach((l,d)=>{let r=t.isHorizontal()?l.offsetLeft:l.offsetTop,h=Math.abs(r-e);h<n&&(n=h,s=d)});let o=i[s]?.getAttribute?.("data-swiper-slide-index")??i[s]?.getAttribute?.("data-real-index"),a=o==null?NaN:Number(o);return Number.isFinite(a)?a:s}slideToAdjacent(t){let e=Number(this.options.count)||0;if(!this.swiper||e<2)return;let i=Math.max(0,Math.min(e-1,this.getCurrentSlideIndex())),s=i+t;s<0?s=this.swiper.params.loop||this.swiper.params.rewind?e-1:0:s>=e&&(s=this.swiper.params.loop||this.swiper.params.rewind?0:e-1),s!==i&&this.slideTo(s,!0,null,!0)}initManualNavigation(){$(this.prevEl).add(this.nextEl).off(st).on(st,t=>{let e=t.currentTarget;if(!e)return;t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();let i=e.getAttribute("data-direction")==="next"?1:-1;this.slideToAdjacent(i)})}initThumbsNavigation(){if(this.options.paginationType!=="thumbs"||!this.paginationEl)return;let t=$(this.paginationEl),e=null;t.off(".sliderThumbsNavigation").on("pointerdown.sliderThumbsNavigation",".thumb-item",i=>{e={x:i.clientX,y:i.clientY}}).on("pointercancel.sliderThumbsNavigation",".thumb-item",()=>{e=null}
25).on(re,".thumb-item",i=>{if(e){let n=Math.hypot(i.clientX-e.x,i.clientY-e.y);if(e=null,n>le)return}let s=Array.from(this.paginationEl.querySelectorAll(".thumb-item")).indexOf(i.currentTarget);s<0||(i.preventDefault(),i.stopPropagation(),this.toggleAutoplay({state:!1}),this.slideTo(s,!0,null,!0))})}initHoverNavigation(){let{swiper:t,options:e,sliderEl:i}=this;if(this.$component.off(".sliderHoverNavigation"),this.$hoverNavigationArea?.off(".sliderHoverNavigation"),this.$hoverNavigationArea=null,!t||e.navigationMode!=="hover"||+e.count<2||!de())return;let s=null,n=ae[e.effect]??t.params.speed,o=()=>this.$component.attr("data-navigation-mode")==="hover",a=t.wrapperEl||i.querySelector(".component-slider__wrapper, .swiper-wrapper")||i,l=$(a),d=()=>{if(!o()){s=null;return}let h=s!=null;s=null,h&&this.slideTo(0,!1,0,!0)},r=()=>{s=null};this.$hoverNavigationArea=l,l.on("pointerenter.sliderHoverNavigation pointermove.sliderHoverNavigation",h=>{if(!t||t.destroyed||!o())return;let g=a.getBoundingClientRect(),f=Number(e.count)||0;if(!g.width||f<2)return;let p=Math.max(0,Math.min(1,(he(h)-g.left)/g.width)),u=Math.min(f-1,Math.floor(p*f));t.realIndex!==u&&(s=u,this.toggleAutoplay({state:!1}),this.slideTo(u,!0,n))}).on("pointerleave.sliderHoverNavigation pointercancel.sliderHoverNavigation",h=>{if(!o()){s=null;return}if(h.relatedTarget instanceof Element&&this.component.contains(h.relatedTarget)){r();return}d()}),this.$component.on("pointerleave.sliderHoverNavigation pointercancel.sliderHoverNavigation",d)}initStoryPagination(){this.options.paginationType!=="story"||!this.paginationEl||(this.destroyStoryPagination(),this.storyPagination=new ne(this.paginationEl,{getIndex:()=>this.swiper?.realIndex||0,getDelay:()=>{let t=this.swiper?.slides?.[this.swiper.activeIndex];return Number(t?.getAttribute?.("data-swiper-autoplay"))||(this.options.autoplay?this.options.autoplay*1e3:0)},isRunning:()=>!!this.swiper?.autoplay?.running&&!this.swiper?.autoplay?.paused,fillPrevious:!!this.options.storyFillPrevious}))}updateStoryPagination(t){this.storyPagination?.update(t)}destroyStoryPagination(){this.storyPagination?.destroy(),this.storyPagination=null}getControlsContrast(){let t=this.swiper?.slides?.[this.swiper.activeIndex];if(!t)return null;let e=t.getAttribute("data-slider-contrast");return["dark","light"].includes(e)?e:null}shouldApplyControlsContrast(t){return t?t.classList.contains("slider-pagination")?t.classList.contains("position--inside"):t.classList.contains("slider-button")?t.classList.contains("position--inside")||t.classList.contains("position--overlap"):!1:!1}updateControlsContrast(){let t=this.getControlsContrast();[this.paginationEl,this.prevEl,this.nextEl].forEach(e=>{e&&(t&&this.shouldApplyControlsContrast(e)?e.setAttribute("data-contrast",t):e.removeAttribute("data-contrast"))})}resetControlsContrast(){[this.paginationEl,this.prevEl,this.nextEl].forEach(t=>{t?.removeAttribute("data-contrast")})}setSliderSize(){let t=this.$component.find(".swiper");if(!t.length)return;let e=t[0];e.style.width="";let i=e.getBoundingClientRect().width,s=e.offsetWidth;if(i%1>0&&Math.abs(s-i)<2){e.style.width=`${Math.round(i)}px`;try{this.swiper.update()}catch{}}}setThumbnailsSize(){if(!this.thumbsSwiper||this.options.paginationType!=="thumbs")return;let t=this.options.direction==="horizontal",e=$(this.paginationEl),i=e.find(".thumb-item"),s=2,n=i.length,o=this.thumbsSwiper.params.slidesPerView;e.add(i).css({"--thumbSize":"","--thumbPad":"",width:"",height:""});let a=parseInt(i.css("--thumbPad"),10),l=t?e[0].offsetWidth:e[0].offsetHeight,d=t?i[0].offsetWidth:i[0].offsetHeight,r=Math.max(s,Math.round(l/(d+a)));n>=s&&(n===r+1||n===r-1)?r=n:o&&(o===r+1||o===r-1)&&(r=o),e.toggleClass("is-filled",n>=r),this.thumbsSwiper.params.slidesPerView=r,this.thumbsSwiper.params.spaceBetween=a,this.thumbsSwiper.update(),this.thumbsSwiper.slides.forEach(h=>{h.style.setProperty("--thumbSize",`${h.swiperSlideSize}px`)})}};var U=class{inited=!1;loaded=!1;destroyed=!1;abortController=new AbortController;constructor(t){this.options=t,this.target=t.target}async init(){this.inited=!0,await this.whenLoaded(),this.loaded=!0}destroy(){this.abortController.abort(),this.destroyed=!0}async whenLoaded(t=()=>{}){return new Promise(e=>{if(this.loaded){t(),e();return}
25if(this.type==="video")this.loaded=!0,t(),e();else{let i=!1,s=setTimeout(()=>{this.loaded=!0,i||(i=!0,t(),e())},1e3);$(this.target).one("load",()=>{clearTimeout(s),this.loaded=!0,i||(i=!0,t(),e())})}})}async play(){}pause(){}onLoadData(){this.options.onLoadData?.()}onPlay(){this.options.onPlay?.()}onPause(t){this.options.onPause?.(t)}onEnded(){this.options.onEnded?.()}onTime(t,e){this.options.onTime?.(t,e)}onError(t){this.options.onError?.(t)}},ce=class extends U{type="video";_wasClicked=!1;async init(){let t=this.target,e=t.poster||t.dataset.poster,i=t.getAttribute("data-src"),s=t.getAttribute("src");if(t.addEventListener("error",n=>this.onError(n.error)),t.addEventListener("loadeddata",this.onLoadData.bind(this)),t.addEventListener("playing",this.onPlay.bind(this)),t.addEventListener("ended",()=>this.onEnded()),t.addEventListener("timeupdate",()=>this.onTime(t.currentTime,t.duration)),t.addEventListener("pause",()=>{let n=this._wasClicked||t.currentTime===t.duration;this.onPause(n)}),t.addEventListener("pointerup",this.onClick.bind(this)),e&&(this.target.poster=e),i&&!s){let n=document.createElement("source");n.addEventListener("error",o=>this.onError(o.error||o)),n.setAttribute("type","video/mp4"),n.setAttribute("src",i),t.appendChild(n),t.load()}this.inited=!0,await this.whenLoaded(),this.loaded=!0}async play(){await this.whenLoaded(),await this.target.play()}async pause(){this.target.pause()}onClick(){this.target.paused||(this._wasClicked=!0,setTimeout(()=>{this._wasClicked=!1},100))}},nt=class extends U{type="embed";async init(){let t=this.target;if(!t)return;let e=t.getAttribute("data-src"),i=t.getAttribute("src");e&&!i&&(t.src=e),this.inited=!0,await this.whenLoaded(),this.loaded=!0}async play(){await this.whenLoaded(),this.target.contentWindow?.postMessage("play","*")}async pause(){this.target.contentWindow?.postMessage("pause","*")}},pe=class extends nt{type="embed";playerReady=!1;player;async init(){let t=this.target;if(!t)return;let e=t.src||t.dataset.src;this.inited=!0,this.loaded=!0,t.id=q();try{if(await flexbe_cli.require(["https://player.kinescope.io/latest/iframe.player.js"],null,5e3),this.destroyed||!t.isConnected)return;let i=Object.fromEntries(new URL(e).searchParams.entries());this.player=await Kinescope.IframePlayer.create(t.id,{url:e,playlist:[],behavior:{preload:"none",playsInline:!0,autoPlay:i.autoplay?"viewable":!1,autoPause:!1,localStorage:!1,loop:i.loop==="1",muted:i.muted==="1"},ui:{controls:i.controls!=="0",language:["ru","kk","be"].includes(flexbe_cli.vars.page.language)?"ru":"en"}}),this.player.on(Kinescope.IframePlayer.Events.Play,()=>this.onPlay()),this.player.on(Kinescope.IframePlayer.Events.Pause,()=>this.onPause())}catch(i){if(this.destroyed||!t?.isConnected)return;console.error(i),t.src!==e&&(t.src=e),await this.whenLoaded()}this.playerReady=!0}async destroy(){super.destroy(),this.player&&await this.player.destroy()}async play(){return new Promise(t=>{M(()=>this.playerReady,async()=>{await this.player?.play(),t()},7e3)})}async pause(){this.player&&await this.player.pause()}},fe=class extends nt{playerReady=!1;async init(){await super.init();let t=e=>{let i=e.data;if(typeof i=="string")try{i=JSON.parse(e.data)}catch{}e.source===this.target.contentWindow&&(["player:ready","player:changeState"].includes(i.type)&&(this.playerReady=!0),i.type==="player:changeState"&&(i.data.state==="playing"?this.onPlay():i.data.state==="paused"&&this.onPause()))};window.addEventListener("message",t,{signal:this.abortController.signal})}async play(){this.command("player:mute"),this.command("player:setCurrentTime",{time:0}),this.command("player:play")}async pause(){this.command("player:pause")}command(t,e={}){M(()=>this.loaded&&this.playerReady,()=>{this.target.contentWindow?.postMessage(JSON.stringify({type:t,data:e}),"*")})}},ue=class extends U{type="embed";async init(){let t=this.target,e=t.getAttribute("data-src"),i=t.getAttribute("src");e&&!i&&(t.src=e),this.inited=!0,await this.whenLoaded(),flexbe_cli.require(["https://player.vimeo.com/api/player.js"],()=>{this.destroyed||!this.target.isConnected||(this.vPlayer=new window.Vimeo.Player(t),this.vPlayer.on("play",()=>this.onPlay()),this.vPlayer.on("pause",()=>this.onPause()))}),this.loaded=!0}async play(){await this.whenLoaded(),this.vPlayer&&this.vPlayer.play()}async pause(){this.vPlayer&&this.vPlayer.pause()}},me=class extends U{type="embed";progressTimer;
25async init(){let t=this.target,e=t.getAttribute("data-src"),i=t.getAttribute("src"),s=n=>{(n===window.YT.PlayerState.BUFFERING||n===window.YT.PlayerState.PLAYING)&&this.onLoadData(),n===window.YT.PlayerState.PLAYING?(this.onPlay(),this.startProgressWatch()):n===window.YT.PlayerState.PAUSED?(this.stopProgressWatch(),this.onPause()):n===window.YT.PlayerState.ENDED&&(this.stopProgressWatch(),this.onPause(),this.onEnded())};e&&!i&&(t.src=e),this.inited=!0,await this.whenLoaded(),flexbe_cli.require([`https://www.youtube.com/iframe_api?origin=${window.location.host}`],()=>{this.destroyed||!this.target.isConnected||M(()=>window.YT?.Player,()=>{this.ytVideo=new window.YT.Player(t,{events:{onStateChange:n=>s(n.data),onReady:()=>s(this.ytVideo.getPlayerState())}})})}),this.loaded=!0}async play(){await this.whenLoaded(),this.target.contentWindow?.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}async pause(){this.target.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}destroy(){this.stopProgressWatch(),super.destroy()}startProgressWatch(){this.stopProgressWatch(),this.reportTime(),this.progressTimer=setInterval(()=>this.reportTime(),1e3)}stopProgressWatch(){this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=void 0)}reportTime(){try{let t=this.ytVideo?.getCurrentTime?.()||0,e=this.ytVideo?.getDuration?.()||0;e&&this.onTime(t,e)}catch{}}},Tt=class extends S{static is="video";videoStarted=!1;videoThresholds=new Set;constructor(...t){super(...t);let e;switch(this.$preview=this.$component.find(".component-video__preview"),this.$iframe=this.$component.find("iframe"),this.$video=this.$component.find("video.custom-video"),this.type=this.$component.data("type"),this.autoplay=!!+this.$component.data("autoplay"),this.autoInit=this.autoplay||!this.$preview.length||this.$preview.hasClass("no-image"),this.type){case"custom":e=ce;break;case"youtube":e=me;break;case"vimeo":e=ue;break;case"kinescope":e=pe;break;case"rutube":e=fe;break;default:e=nt}this.provider=new e({target:this.type==="custom"?this.$video[0]:this.$iframe[0],onPlay:this.onPlay.bind(this),onPause:this.onPause.bind(this),onEnded:this.onEnded.bind(this),onTime:this.onTime.bind(this),onError:this.onError.bind(this),onLoadData:this.onLoadData.bind(this)}),this.$preview.removeAttr("hidden"),this.$preview.on("click",async()=>{await this.#e(),await this.play(!0)}),this.$component.off("sliderActivate").on("sliderActivate",async()=>{this.preventAutoplay=!1,this.inScreen&&this.autoInit&&(await this.#e(),this.autoplay&&await this.play())}),this.$component.off("sliderDeactivate").on("sliderDeactivate",async()=>{this.preventAutoplay=!0,await this.pause()})}onDestroy(){this.provider.destroy()}async onScreen({state:t}){t?(this.autoInit&&await this.#e(),this.autoplay&&!this.preventAutoplay&&await this.play()):await this.pause()}async#e(){this.provider.inited||(this.$component.addClass("loading"),await this.provider.init(),this.$component.removeClass("loading"),this.$component.addClass("loaded"))}async play(t=!1){this.isAutoplaying=!t,this.isPaused=!1,this.$preview.off("click").addClass("preloading");try{await this.provider.play(),this.$preview.fadeOut(150,()=>{this.$preview.remove(),this.$component.removeClass("overlayed")})}catch(e){console.warn(e)}}async pause(){this.isAutoplaying=!1,this.isPaused=!0;try{await this.provider.pause()}catch{}}onPlay(){this.isPaused=!1,this.preventAutoplay=!1,this.videoStarted||(this.videoStarted=!0,this.reachVideoGoal("video_start")),!this.autoplay&&!flexbe_cli.is_admin&&flexbe_cli.resize.responsiveMode==="mobile"&&this.component.closest('[data-hidden="desktop"]')&&(this.viewportLocked=!0,flexbe_cli.resize.lockMode(!0)),(!this.autoplay||!this.isAutoplaying)&&(this.sliderAutoplayPrevented=!0,this.$component.trigger("reduceSliderControls",{state:!0}))}onPause(t=this.inScreen){this.isPaused=!0,t&&(this.preventAutoplay=!0),this.viewportLocked&&(this.viewportLocked=!1,flexbe_cli.resize.lockMode(!1)),this.sliderAutoplayPrevented&&(this.sliderAutoplayPrevented=!1,this.$component.trigger("reduceSliderControls",{state:!1}))}onEnded(){this.reachVideoGoal("video_complete"),this.videoStarted=!1,this.videoThresholds.clear()}onTime(t,e){if(!e)return;let i=Math.floor(t/e*100);
25[10,25,50,75].forEach(s=>{i<s||this.videoThresholds.has(s)||(this.videoThresholds.add(s),this.reachVideoGoal("video_progress",{video_current_time:Math.round(t),video_duration:Math.round(e),video_percent:s}))})}onError(t){console.error(t)}onLoadData(t){this.$component.addClass("started")}reachVideoGoal(t,e={}){let i=this.$iframe[0],s=this.$video[0],n=i?.src||i?.getAttribute("data-src")||s?.currentSrc||s?.src||"",o=this.$component.attr("data-title")||this.$preview.attr("title")||"";flexbe_cli.stat.goals.reachGoal(t,{video_provider:this.type,visible:this.inScreen,...n?{video_url:n}:{},...o?{video_title:o}:{},...e})}};flexbe_cli.entity.setClientJs("element","media01",{components:[xt,Tt,It]});flexbe_cli.entity.setClientJs("element","rotator01",{$rotator:null,$list:null,$animationElement:null,eventId:null,animation:null,animationId:null,speed:null,delay:null,loop:null,animationSet:!1,animationStarted:!1,completedEvent:null,animeFunction:null,typedFunction:null,maxHeight:0,documentHidden:null,documentVisibilityChange:null,onInit(){this.events(),this.setInitParams()},onLoad(){this.inScreen&&!this.animationSet&&!this.animationStarted&&(this.animationSet=!0,this.setInitParams(),this.startAnimation())},onScreen({state:t}){let e=this.animationSet&&this.animationStarted;this.loaded&&(t&&!e?(this.animationSet=!0,this.clearAnimation(),this.setInitParams(),this.startAnimation()):t&&e?this.restartAnimation():!t&&e&&this.pauseAnimation())},onResize(){this.setMaxHeight(),this.loaded&&this.maxHeight!==0&&(this.clearAnimation(),this.startAnimation())},onUpdate(){this.clearAnimation(),this.setInitParams()},events(){typeof document.hidden<"u"?(this.documentHidden="hidden",this.documentVisibilityChange="visibilitychange"):typeof document.msHidden<"u"?(this.documentHidden="msHidden",this.documentVisibilityChange="msvisibilitychange"):typeof document.webkitHidden<"u"&&(this.documentHidden="webkitHidden",this.documentVisibilityChange="webkitvisibilitychange"),document.addEventListener(this.documentVisibilityChange,this.handleVisibilityChange.bind(this),!1),flexbe_cli.events.on(`font_changed.${this.eventId}`,()=>{this.setMaxHeight()})},handleVisibilityChange(){this.animationSet&&this.animationStarted&&(document[this.documentHidden]?this.pauseAnimation():setTimeout(()=>this.restartAnimation(),100))},setInitParams(){this.$rotator=this.$area.find(".text-rotator"),this.$animationElement=this.$rotator.find(".text-animation"),this.animationId=this.$animationElement.attr("data-id"),this.eventId=`anim_${this.id}`,this.maxHeight=0,this.$rotator.addClass(this.eventId),this.setList(),this.setMaxHeight()},setList(){this.$list=this.$area.find(".animation-container").filter((t,e)=>!!$(e).find(".animate")[0]?.innerText),this.$list.each((t,e)=>{let i=$(e).find(".animate")[0],s=i?.innerText;s&&(i.innerHTML=s.replace(/(<[^>]+>)/g,""))})},setMaxHeight(){this.$list!=null&&this.$list.length>0?(this.maxHeight=0,this.$list.each((t,e)=>{let i=this.$area.closest(".modal-content").length>0,s=$(e).find(".animate")[0],n=s?.innerText;i&&!this.inScreen?this.maxHeight="auto":this.animationId==="typing"&&!this.animation?(s.innerText=`${e.innerText}|`,this.maxHeight=Math.max(this.maxHeight,$(e).height()),s.innerText=e.innerText.slice(0,e.innerText.length-1)):(this.animationId!=="counter"&&this.breakToWordsAndLetters($(e)),this.maxHeight=Math.max(this.maxHeight,$(e).height()),s.innerHTML=n)})):this.maxHeight=+this.$rotator.attr("data-size"),this.$area.find(".rotator-holder").css("height",this.maxHeight)},setAnimationParams(){this.$rotator.removeClass("animation-stopped"),this.$rotator.addClass("to-animate"),this.speed=1/+this.$animationElement.attr("data-speed"),this.delay=+this.$animationElement.attr("data-delay")*1e3,this.loop=this.$animationElement.attr("data-loop")==="true",this.animation=this.parseAnimation()},startAnimation(){this.setAnimationParams();let t=this.$list&&this.$list.length>0||!1,e=this.animation&&this.animation.id||!1,i=this.animeFunction&&this.animeFunction.children||!1,s=this.typedFunction&&this.typedFunction.strings||!1;t&&e&&!this.animationStarted&&this.maxHeight>0&&(this.animationStarted=!0,this.animation.id!=="typing"&&!i?(this.$rotator.removeClass("to-animate"),this.playListItem(0)):s||this.startTypingAnimation())},pauseAnimation(){let t=this.animeFunction&&this.animeFunction.children||!1,e=this.typedFunction&&this.typedFunction.strings||!1;this.animationId==="typing"&&e?this.typedFunction.stop():t&&this.animeFunction.pause()},restartAnimation(){let t=this.animeFunction&&this.animeFunction.children||!1,e=this.typedFunction&&this.typedFunction.strings||!1;this.animationId==="typing"&&e?this.typedFunction.start():t&&this.animeFunction.play()},playListItem(t){let e=$(this.$list[t]);e.addClass("active"),this.onAnimationStart({index:t,$target:e})},onAnimationStart({index:t,$target:e}){if(this.animation.steps&&this.animation.steps.length){let i=`.text-rotator.${this.eventId} .animation-container.active`;if(this.animation.replaceString){let n=e.find(".animate")[0],o=n.innerText;n.innerHTML=o.replace(/({.+})|(\[([^\]]+)])|(\S*\(([^)]+)\)\S{0,1})|\S+/g,"<span class='word'>$&</span>");let a="(?:[\u2700-\u27BF]|(?:\uD83C[\uDDE6-\uDDFF]){2}|[\uD800-\uDBFF][\uDC00-\uDFFF]|[#-9]\uFE0F?\u20E3|\u3299|\u3297|\u303D|\u3030|\u24C2|\uD83C[\uDD70-\uDD71]|\uD83C[\uDD7E-\uDD7F]|\u{1F18E}|\uD83C[\uDD91-\uDD9A]|\uD83C[\uDDE6-\uDDFF]|[\uD83C[\uDE01-\uDE02]|\u{1F21A}|\u{1F22F}|[\uD83C[\uDE32-\uDE3A]|[\uD83C[\uDE50-\uDE51]|\u203C|\u2049|[\u25AA-\u25AB]|\u25B6|\u25C0|[\u25FB-\u25FE]|\xA9|\xAE|\u2122|\u2139|\u{1F004}|[\u2600-\u26FF]|\u2B05|\u2B06|\u2B07|\u2B1B|\u2B1C|\u2B50|\u2B55|\u231A|\u231B|\u2328|\u23CF|[\u23E9-\u23F3]|[\u23F8-\u23FA]|\u{1F0CF}|\u2934|\u2935|[\u2190-\u21FF])",l=new RegExp(a,"g"),d;l.test(o)?d=new RegExp(`${a}|([^\\s])`,"g"):d=new RegExp("[^\\s]","g"),e.find(".word").each((r,h)=>{h.innerHTML=h.innerText.replace(d,"<span class='letter'>$&</span>")})}this.animeFunction=anime.timeline({loop:1}),this.animeFunction.id=this.eventId;let s=this.animation.steps.map(n=>this.parseStep({step:n,container:i}));
25!this.loop&&t===this.$list.length-1&&s.splice(1),s.forEach(n=>{this.animeFunction.add(n)}),this.animeFunction.play(),this.animeFunction.finished.then(()=>this.onAnimationFinished({index:t,$target:e})).catch(n=>console.error(n))}},onAnimationFinished({index:t,$target:e}){if(this.animationId!=="typing"){let i=t>=this.$list.length-1;this.purgeCurrentInstance(),e.removeAttr("style"),e.find(".animate").removeAttr("style"),this.$rotator.find(".animation-container").removeClass("active"),i?this.loop?this.playListItem(0):(e.addClass("active"),this.clearAnimation(!1,"animation stop")):this.playListItem(t+1)}},startTypingAnimation(){if(typeof Typed!="function")return;let t=`.text-rotator.${this.eventId} .typing.active .animate`,e=[],i=new RegExp("(?:[\u2700-\u27BF]|(?:\uD83C[\uDDE6-\uDDFF]){2}|[\uD800-\uDBFF][\uDC00-\uDFFF]|[#-9]\uFE0F?\u20E3|\u3299|\u3297|\u303D|\u3030|\u24C2|\uD83C[\uDD70-\uDD71]|\uD83C[\uDD7E-\uDD7F]|\u{1F18E}|\uD83C[\uDD91-\uDD9A]|\uD83C[\uDDE6-\uDDFF]|[\uD83C[\uDE01-\uDE02]|\u{1F21A}|\u{1F22F}|[\uD83C[\uDE32-\uDE3A]|[\uD83C[\uDE50-\uDE51]|\u203C|\u2049|[\u25AA-\u25AB]|\u25B6|\u25C0|[\u25FB-\u25FE]|\xA9|\xAE|\u2122|\u2139|\u{1F004}|[\u2600-\u26FF]|\u2B05|\u2B06|\u2B07|\u2B1B|\u2B1C|\u2B50|\u2B55|\u231A|\u231B|\u2328|\u23CF|[\u23E9-\u23F3]|[\u23F8-\u23FA]|\u{1F0CF}|\u2934|\u2935|[\u2190-\u21FF])","g");this.$list.find(".animate").each((n,o)=>{let a=o.innerText;i.test(a)&&(o.innerHTML=a.replace(i,"`$&`")),e.push(o.innerText)}),this.$list.first().removeClass("active").clone().addClass("typing active").appendTo(this.$rotator),this.setList();let s={...this.animation,strings:e};this.typedFunction=new window.Typed(t,s)},clearAnimation(t=!0){let e=this.animeFunction&&this.animeFunction.children||!1,i=this.typedFunction&&this.typedFunction.strings||!1;if(this.loaded&&this.animationId!=="typing"&&this.purgeCurrentInstance(),e&&(this.animeFunction=null),i&&(this.$rotator.find(".typing").remove(),this.setList(),this.typedFunction.destroy(),this.typedFunction=null),this.animation&&this.animation.id&&(this.animation=null,this.animationSet=!1),this.$rotator.length){let s=this.$rotator.find(".animation-container");this.$rotator.css("opacity",""),this.$rotator.addClass("animation-stopped"),s.length&&(s.removeClass("active"),t?(this.animationStarted=!1,s.first().addClass("active")):s.last().addClass("active"))}},purgeCurrentInstance(){let t=anime.running,e;t.forEach((i,s)=>{i.id===this.eventId&&(e=s)}),typeof e=="number"&&t.splice(e,1)},parseAnimation(){let t;if(this.$animationElement.attr("data-steps")){let e=this.$animationElement.attr("data-default-speed");if(this.animationId==="typing"){let i=JSON.parse(JSON.parse(this.$animationElement.attr("data-steps")))[0];t={id:this.animationId,loop:this.loop,typeSpeed:Math.round(this.speed*i.typeSpeedFactor*e),backSpeed:Math.round(this.speed*i.backSpeedFactor*e),backDelay:Math.round(this.delay*i.backDelayFactor),contentType:null,preStringTyped:()=>{this.$rotator.removeClass("to-animate")},onStringTyped:s=>{!this.loop&&s===this.$list.length-2&&setTimeout(()=>{this.clearAnimation(!1)},180)}}}else t={defaultSpeed:e,steps:JSON.parse(JSON.parse(this.$animationElement.attr("data-steps"))),speed:this.speed,delay:this.delay,id:this.animationId,loop:this.loop,replaceString:this.$animationElement.attr("data-replace")==="true"}}return t},parseStep({step:t,container:e}){return{...t,targets:`${e} ${t.targets}`,duration:this.getStepDuration(t),delay:this.getStepDelay(t)}},getStepDuration(t){return t.duration===0?0:Math.round(this.speed*(t.durationFactor?t.durationFactor:t.duration)*this.animation.defaultSpeed)},getStepDelay(t){if(t.delay===0)return 0;let e=t.delayFactor?t.delayFactor:1;if(t.delay&&t.delay instanceof Object){let i=this.getStepDuration(t)*t.delay.factor;return t.delay.increment&&t.delay.add?(s,n)=>t.delay.add+i*(n+t.delay.incrementBy):t.delay.increment?(s,n)=>i*(n+t.delay.incrementBy):t.delay.add?(s,n)=>t.delay.add+i*n:(s,n)=>i*n}return Math.round(this.delay*e)},breakToWordsAndLetters(t){let e=t.find(".animate")[0],i=e.innerText;e.innerHTML=i.replace(/({.+})|(\[([^\]]+)])|(\S*\(([^)]+)\)\S{0,1})|\S+/g,"<span class='word'>$&</span>");let s="(?:[\u2700-\u27BF]|(?:\uD83C[\uDDE6-\uDDFF]){2}|[\uD800-\uDBFF][\uDC00-\uDFFF]|[#-9]\uFE0F?\u20E3|\u3299|\u3297|\u303D|\u3030|\u24C2|\uD83C[\uDD70-\uDD71]|\uD83C[\uDD7E-\uDD7F]|\u{1F18E}|\uD83C[\uDD91-\uDD9A]|\uD83C[\uDDE6-\uDDFF]|[\uD83C[\uDE01-\uDE02]|\u{1F21A}|\u{1F22F}|[\uD83C[\uDE32-\uDE3A]|[\uD83C[\uDE50-\uDE51]|\u203C|\u2049|[\u25AA-\u25AB]|\u25B6|\u25C0|[\u25FB-\u25FE]|\xA9|\xAE|\u2122|\u2139|\u{1F004}|[\u2600-\u26FF]|\u2B05|\u2B06|\u2B07|\u2B1B|\u2B1C|\u2B50|\u2B55|\u231A|\u231B|\u2328|\u23CF|[\u23E9-\u23F3]|[\u23F8-\u23FA]|\u{1F0CF}|\u2934|\u2935|[\u2190-\u21FF])",n=new RegExp(s,"g"),o;n.test(i)?o=new RegExp(`${s}|([^\\s])`,"g"):o=new RegExp("[^\\s]","g"),t.find(".word").each((a,l)=>{l.innerHTML=l.innerText.replace(o,"<span class='letter'>$&</span>")})}});function Et(t,e,i=1){return 1-t>i&&(t=i),(1-Math.cos(Math.PI*t*e))/2}var ge=[0,"parallax","parallax-fade","zoom","zoom-return"],ve=class{imgParams={w:0,h:0,r:1,x:.5,y:.5};canvasSize={w:0,h:0,y:0};winSize={w:0,h:0};overlayOpacity=1;constructor(t,e,i="parallax",s=null){this.id=t,this.shouldRender=!1,this.mode=typeof i=="number"?ge[i]:i,this.fadeAnimation=this.mode.includes("fade"),this.parallaxFactor=this.mode.includes("fixed")?1:this.mode.includes("parallax")?.4:0,this.zoomFactor=this.mode.includes("zoom")?.2:0,this.zoomLimit=this.mode==="zoom"?.5:this.mode==="zoom-return"?1:0,this.offCanvas=document.createElement("canvas"),this.offCtx=this.offCanvas.getContext("2d",{alpha:!1}),this.component=e[0],this.canvas=this.component.querySelector("canvas"),this.overlay=this.component.querySelector(".overlay"),this.ctx=this.canvas.getContext("2d",{alpha:!1}),this.init(s),this.reflow()}init(t){!t||!t.url||(this.img=document.createElement("img"),this.img.onload=()=>{this.ready=!0,this.imgParams={w:this.img.width,h:this.img.height,r:this.img.height/this.img.width,x:+t.x.replace("%","")/100,y:+t.y.replace("%","")/100},this.dispatchEvents(),this.draw(),requestAnimationFrame(()=>{$(this.canvas).addClass("ready")})},this.img.src=t.url)}
25dispatchEvents(){flexbe_cli.events.off(`.bg_${this.id}`),$(window).off(`.bg_${this.id}`),$(window).on(`scroll.bg_${this.id}`,()=>{this.draw()}),$(window).on(`resize.bg_${this.id}`,()=>{this.reflow()}),flexbe_cli.is_admin&&(flexbe_cli.events.on(`entity_render:style.bg_${this.id}`,t=>{t.id===this.id&&this.reflow()}),flexbe_cli.events.on(`layout_change.bg_${this.id}`,()=>{this.reflow()}))}toggleRendering(t){this.shouldRender=t}getZoomCoords(t){let e=1;if(this.zoomFactor){let s=100-Et(t*.01,2,this.zoomLimit)*100;e=1+this.zoomFactor/100*s}let i={w:0,h:0,x:0,y:0};return i.w=this.canvasSize.w*e,i.h=this.canvasSize.h*e,i.x=(i.w-this.canvas.width)/2,i.y=(i.h-this.canvasSize.h)/2,i}reflow(){let t=this.canvas.getBoundingClientRect();this.canvasSize={w:t.width,h:t.height,y:t.top+window.pageYOffset};let{viewportWidth:e,viewportHeight:i}=flexbe_cli.resize;this.winSize.h=flexbe_cli.run.is_mobile?Math.max(this.winSize.h,i):i,this.winSize.w=e,this.fadeAnimation&&(this.overlayOpacity=parseFloat(getComputedStyle(this.component).getPropertyValue("--componentBgOpacity")||1)),this.draw()}draw(){if(!this.shouldRender||!this.ready||this.pending)return;this.pending=!0;let t=flexbe_cli.scroll.latest+this.winSize.h-this.canvasSize.y,e=100-t/(this.canvasSize.h+this.winSize.h)*100;this.drawOffscreen(),this.drawCanvas(t,e),this.drawOverlay(e),this.pending=!1}drawOffscreen(){let{canvasSize:t,zoomFactor:e,winSize:i,parallaxFactor:s,imgParams:n,offCanvas:o,offCtx:a,img:l}=this,d=e?t.h:t.h+(i.h-t.h)*s,r=t.w,h=r,g=r*n.r,f=0,p=(g-d)*n.y*-1;d/r>n.r&&(h=d/n.r,g=d,f=(h-r)*n.x*-1,p=0),o.width!==r&&(o.width=r),o.height!==d&&(o.height=d),a.drawImage(l,f,p,h,g)}drawCanvas(t,e){if(this.canvas.width!==this.canvasSize.w&&(this.canvas.width=this.canvasSize.w),this.canvas.height!==this.canvasSize.h&&(this.canvas.height=this.canvasSize.h),this.zoomFactor){let i=this.getZoomCoords(e);try{this.ctx.drawImage(this.offCanvas,Math.ceil(i.x*-1),Math.ceil(t*this.parallaxFactor-this.winSize.h*this.parallaxFactor-i.y),i.w,i.h)}catch{}}else try{this.ctx.drawImage(this.offCanvas,0,Math.ceil((t-this.winSize.h)*this.parallaxFactor))}catch{}}drawOverlay(t){if(this.fadeAnimation&&this.overlay){let e=1-(1-this.overlayOpacity)*Et(t*.01,2,1);this.overlay.style.setProperty("--componentBgOpacity",e)}}destroy(){this.destroyed=!0,cancelAnimationFrame(this._raf),flexbe_cli.events.off(`.bg_${this.id}`),$(window).off(`.bg_${this.id}`),$(this.canvas).removeClass("ready"),this.offCanvas?.remove(),this.img?.remove()}},ye=class{destroyed=!1;constructor(t,e,i){this.background=t,this.core=t.core,this.$component=t.$component,this.video=e,typeof i=="function"&&(this.onInited=i),this.initVideo()}initVideo(){this.$container=$('<div class="layer video-holder"></div>'),this.$overlay=this.$component.find(".layer.overlay"),this.insertVideo(),this.video.type==="custom"?this.initMP4():this.video.type==="vimeo"?this.initVimeo():this.video.type==="youtube"?this.initYoutube():this.video.type==="
25kinescope"?this.initKinescope():this.initEmbed(),$(document).on(`visibilitychange.bg_effect_${this.core.id}`,()=>{this.background.onscreen&&!document.hidden&&setTimeout(()=>{this.play()},50)})}initVimeo(){let t=0,e=()=>{let i=this.vPlayer;return Promise.all([i.getVideoWidth(),i.getVideoHeight()]).then(s=>{let[n,o]=s;return n/o<2.5&&n/o>.4||t===3?{width:n,height:o}:(t+=1,e())})};flexbe_cli.require(["https://player.vimeo.com/api/player.js"],()=>{this.destroyed||(this.vPlayer=new window.Vimeo.Player(this.$videoElement[0]),e().then(i=>(this.video.width=i.width,this.video.height=i.height,this.fitToSize(),this.play(),null)).catch(()=>{}))})}initYoutube(){let t=()=>{this.yPlayer=new window.YT.Player(this.$videoElement[0],{events:{onReady:()=>{this.fitToSize(),this.play()}}})};!window.YT&&!window.onYouTubeIframeAPIReady?(window.onYouTubeIframeAPIReady=()=>{window.youtubeBGQueue.forEach(e=>e()),window.youtubeBGQueue=null,window.onYouTubeIframeAPIReady=null},window.youtubeBGQueue=[],window.youtubeBGQueue.push(t),flexbe_cli.require(["https://www.youtube.com/iframe_api"])):window.onYouTubeIframeAPIReady?window.youtubeBGQueue.push(t):t()}initKinescope(){this.fitToSize(),flexbe_cli.require(["https://player.kinescope.io/latest/iframe.player.js"],async()=>{this.destroyed||(this.kPlayer=await window.Kinescope.IframePlayer.create(this.$videoElement.attr("id"),{url:this.video.link,behavior:{background:!0,preload:"auto",loop:!0,muted:!0,autoPlay:"viewable",autoPause:!1}}),this.play())})}initEmbed(){this.fitToSize(),this.play()}initMP4(){this.$videoElement[0].oncanplay=()=>{this.play()},this.$videoElement[0].onloadeddata=()=>{this.video.width=this.$videoElement[0].videoWidth,this.video.height=this.$videoElement[0].videoHeight,this.fitToSize(),this.ready()}}insertVideo(){this.video.type==="custom"?(this.$videoElement=$(`<video src="${this.video.link}" 26 controlslist="nodownload" 27 loop="true" 28 muted="true" 29 autoplay="true" 30 playsinline="true" 31 disablePictureInPicture 32 disableRemotePlayback 33 pip="false" 34 ></video>`),this.$videoElement[0].disablePictureInPicture=!0,this.$videoElement[0].disableRemotePlayback=!0):this.$videoElement=$(`<iframe 35 id="${q()}" 36 src="${this.video.link}" 37 width="${this.video.width}" 38 height="${this.video.height}" 39 allow="autoplay; encrypted-media; fullscreen; screen-wake-lock; accelerometer; clipboard-write;" 40 ></iframe>`),this.$container.append(this.$videoElement),this.$overlay.length&&this.$container.append(this.$overlay),this.$component.prepend(this.$container),this.onInited&&this.onInited(this.$container)}fitToSize(){if(this.video){let t=this.$container.width(),e=this.$container.height(),i=this.video.width/this.video.height;i>t/e?this.$videoElement.css({width:`${e*i}px`,height:"100%"}):this.$videoElement.css({width:"100%",height:`${t/i}px`})}this.videoIsResized=!0}ready(){M(()=>this.videoIsResized,()=>{this.$component.addClass("video-loaded")},5e3)}play(){this.$videoElement&&this.$videoElement[0]&&this.$videoElement[0].play?(this.$videoElement[0].play(),$(document).one("touchstart.video-bg",()=>{this.$videoElement[0].play()}),this.ready()):this.video.type==="vimeo"?M(()=>this.vPlayer&&this.vPlayer.play,()=>{setTimeout(()=>{this.vPlayer.play(),this.ready()},50)},5e3):this.video.type==="youtube"?M(()=>this.yPlayer&&this.yPlayer.playVideo,()=>{this.yPlayer.playVideo(),this.ready()}
40,5e3):this.video.type==="kinescope"?M(()=>this.kPlayer&&this.kPlayer.play,()=>{this.kPlayer.play(),this.ready()},5e3):this.ready()}pause(){this.video.type==="vimeo"&&this.vPlayer?this.vPlayer.pause():this.video.type==="youtube"&&this.yPlayer&&this.yPlayer.pauseVideo?this.yPlayer.pauseVideo():this.video.type==="kinescope"&&this.kPlayer?.pause?this.kPlayer.pause():this.$videoElement&&this.$videoElement[0]&&this.$videoElement[0].pause&&this.$videoElement[0].pause()}destroy(){this.destroyed=!0,this.pause(),this.kPlayer&&this.kPlayer.destroy(),$(document).off(`.bg_effect_${this.core.id}`)}},be=[800,1366,1920,2160],j=class extends S{static is="background";constructor(...t){super(...t);let{$component:e}=this,i=e.data();this.data={type:i.type||"color",hasImagePlaceholder:!!i.hasPlaceholder,imageLoadingOptions:flexbe_cli.vars.site.images,isLazyLoading:!!i.lazy,isImgLoaded:!!i.loaded,effect:i.effect,effectMobile:i.effectMobile??i.effect,videoId:i.videoId||null,videoType:i.videoType||null,videoLink:i.videoLink||null,videoWidth:i.videoWidth||640,videoHeight:i.videoHeight||360,videoPreview:i.videoPreview||"color",infinityVideo:i.infinityVideo??!1,mobileVideoEnabled:i.mobileVideoEnabled||!1,videoParallaxFactor:.4},this.image={url:null,id:i.imgId,ext:i.imgExt,x:i.imgX,y:i.imgY,proportion:i.imgProportion,width:i.imgWidth,animated:i.imgAnimated,transparent:i.imgTransparent,scale:"cover",type:"background",original:!!i.imgOriginal}}async onInit(){this.data.isLazyLoading||await this.loadImage(),this.$component.on("setImage",async()=>{this.isVisible&&!this.isImgLoading&&!this.data.isImgLoaded&&await this.loadImage()})}onScreen({state:t}){this.videoInstance&&(this.data.infinityVideo||(t?this.videoInstance.play():this.videoInstance.pause())),this.onscreen=t,!(!t||this.played)&&this.playVideo()}async onBeside({state:t,first:e}
40){t&&e&&(await this.loadImage(),this.imageEffectInit(),this.videoEffectInit()),this.played||this.playVideo(),this.bgEffect&&(this.bgEffect.toggleRendering(t),this.bgEffect.draw())}onResize(){this.bgEffect&&requestAnimationFrame(()=>{this.bgEffect.reflow()}),this.data.type==="video"&&(this.videoInstance?(this.videoInstance.fitToSize(),this.data.effect&&this.fixHolder&&this.setParallax&&setTimeout(()=>{this.fixHolder(),this.setParallax()},100),setTimeout(()=>{this.videoInstance.fitToSize()},150)):this.fixHolder&&this.fixHolder())}async loadImage(){if(!(this.image.id&&(this.data.type==="image"||this.data.type==="video"&&this.data.videoPreview==="image")))return;this.isImgLoading=!0;let t={width:this.componentWidth||this.component.offsetWidth,height:this.componentHeight||this.component.offsetHeight},{width:e}=this.image.original?{width:0}:await k(this.image,t,{...this.data.imageLoadingOptions,sizes:be});if(this.image.url=E(this.image,e,this.data.imageLoadingOptions),!this.data.isImgLoaded){if(this.data.hasImagePlaceholder)try{await H(this.image.url)}catch(i){console.error("Background preload error",i);return}this.setImage(this.image.url)}this.isImgLoading=!1}setImage(t){this.$component.find(".image-holder").css("background-image",`url(${t})`),this.$component.addClass("image-loaded"),this.isImgLoading=!1,this.data.isImgLoaded=!0}imageEffectInit(){if(this.data.type!=="image"||!this.data.effect||flexbe_cli.vars.globals.isScreenshot)return;let{owner:t,$component:e,data:i,image:s}=this,n=t._core?.id||t.getAttribute("data-id");typeof t._bgEffects=="object"&&t._bgEffects.destroy();let o=i.effect!=="fixed";o&&i.effectMobile==="off"&&flexbe_cli.run.is_screen_mobile&&(o=!1),o&&(this.bgEffect=new ve(n,e,i.effect,s),t._bgEffects=this.bgEffect)}videoEffectInit(){if(this.data.type!=="video"||this.data.effect!=="parallax"||flexbe_cli.vars.globals.isScreenshot)return;let t=this.$component.find(".video-holder, .image-holder"),e=this.owner._core,i=this.data,s=()=>e.tween.height+(flexbe_cli.resize.viewportHeight-e.tween.height)*i.videoParallaxFactor,n=()=>{t.css("height",`${s()}px`)},o=()=>{if(this.data.effectMobile==="off"&&flexbe_cli.run.is_screen_mobile){t.css("top","");return}let a=1-this.data.videoParallaxFactor,l=Math.floor((flexbe_cli.scroll.latest-e.tween.start)*-a)||0;t.css("top",`${l}px`)};n(),o(),e.$area.off(`fixHeaderHeight.component-bg-${e.id}`).on(`fixHeaderHeight.component-bg-${e.id}`,()=>{o()}),$(window).off(`scroll.component-bg-${e.id}`).on(`scroll.component-bg-${e.id}`,()=>{this.onscreen&&o()}),this.fixHolder=n,this.setParallax=o}playVideo(){if(flexbe_cli.run.is_screen_mobile&&!this.data.mobileVideoEnabled||flexbe_cli.vars.globals.isCriticalCss||flexbe_cli.vars.globals.isScreenshot||flexbe_cli.vars.globals.isBot)return!1;let t=this.data,e={id:t.videoId,type:t.videoType,link:t.videoLink,width:t.videoWidth,height:t.videoHeight};return this.data.type!=="video"||!e.id&&!e.link?!1:(this.played=!0,this.videoInstance||(this.videoInstance=new ye(this,e,()=>{this.videoEffectInit()})),!0)}onDestroy(){this.core.$area.off(`fixHeaderHeight.component-bg-${this.core.id}`),$(window).off(`scroll.component-bg-${this.core.id}`),this.bgEffect&&this.bgEffect.destroy(),this.videoInstance&&this.videoInstance.destroy()}};var Pt=class{inited=!1;interacted=!1;hasNav=!1;opts;$area;uidAttr;classContainer;activeUid;$activeTab;$activeSection;$mainContainer;$tabsContainer;$tabsList;$swiperHelper;$tabs;$sections;get isOnScreen(){if(!this.hasNav)return!1;let{top:t,height:e}=this.$tabsList[0].getBoundingClientRect();return t>0&&t+e<flexbe_cli.resize.viewportHeight}constructor(t){if(this.opts=t,this.$area=t.$area,this.uidAttr=t.uidAttr||"data-tab-uid",this.classContainer=t.classContainer,this.initTabs(),t.activeUid)this.selectTab(t.activeUid);else if(window.location.hash){let e=window.location.hash.replace("#",""),{$anchor:i,$entity:s}=flexbe_cli.helpers.findHashTarget(e),n=i[0]||s[0];n&&this.selectTabFromTarget(n)}this.$area.on("bringIntoView.tabsController",e=>this.selectTabFromTarget(e.target))}initTabs(){this.$mainContainer=this.classContainer==="self"?this.$area:this.$area.find(this.classContainer),this.$tabsContainer=this.$area.find(".container-tabs"),this.$tabsList=this.$area.find('[role="tablist"]'),this.$swiperHelper=this.$area.find(".tab-swiper-helper"),this.$sections=this.$mainContainer.find('[role="tabpanel"]'),this.hasNav=!!this.$tabsList.length,this.$tabs=this.hasNav?this.$tabsList.find('[role="tab"]'):$(),this.inited=!!this.$sections.length,this.inited&&(flexbe_cli.is_admin&&this.hasNav&&this.normalizeLines(),this.initClassTmt=setTimeout(()=>{this.$mainContainer.addClass("main-area--tabs-inited")},50),this.hasNav&&(this.$tabsContainer.on("click.tabsController",".tab",t=>{let e=$(t.currentTarget).closest(`[${this.uidAttr}]`).attr(`${this.uidAttr}`);e&&this.selectTab(e)}),this.$tabsList.on("wheel.tabsController",t=>{let e=this.$tabsList[0],i=t.originalEvent.wheelDeltaX,s=t.originalEvent.wheelDeltaY;e.scrollWidth<=e.clientWidth||s<0&&e.scrollLeft===0||s>0&&e.scrollLeft===e.scrollWidth-e.clientWidth||flexbe_cli.run.is_pointer&&!i&&s&&(t.preventDefault(),e.scrollLeft+=s)}),this.$tabsList.on("touchstart.tabsController",()=>{this.interacted=!0,this.destroySwipeAnimation()}),flexbe_cli.is_admin&&(this.$tabsContainer.on("mouseenter.tabsController",".tab",t=>{t.buttons===1&&document.body.classList.contains("state--in-move")&&(clearTimeout(this.bringViewTmt),this.bringViewTmt=setTimeout(()=>{let e=$(t.target).closest(`[${this.uidAttr}]`).attr(`${this.uidAttr}`);this.selectTab(e)},700))}),this.$tabsContainer.on("mouseleave.tabsController",".tab",()=>{clearTimeout(this.bringViewTmt)}))))}swipeAnimationController(){if(!this.inited||!this.hasNav)return;let t=this.$tabsList[0].scrollWidth>this.$tabsList[0].clientWidth,e=this.isOnScreen;t&&e?this.initSwiperAnimation():e||this.destroySwipeAnimation()}initSwiperAnimation(){!this.$swiperHelper.hasClass("show")&&!this.interacted&&this.$swiperHelper.addClass("show")}destroySwipeAnimation(){this.$swiperHelper.hasClass("show")&&this.$swiperHelper.removeClass("show")}selectTabFromIndex(t){if(this.hasNav){this.selectTabFromTarget(this.$tabs.get(t));return}let e=this.$sections?.eq(t).attr(this.uidAttr);this.selectTab(e)}selectTabFromTarget(t){let e=$(t).closest(`[${this.uidAttr}]`).attr(`${this.uidAttr}`);this.selectTab(e)}selectTab(t,{force:e}={}){if(!t||!e&&this.activeUid===t)return;this.inited||this.initTabs();let i=this.$sections?.filter(`[${this.uidAttr}="${t}"]`)??$();if(!i.length)return;let s=this.hasNav?this.$tabs.filter(`[${this.uidAttr}="${t}"]`):$(),n=this.$sections.filter(".active"),o=n[0]&&n[0].offsetTop;this.hasNav&&s.length&&(this.scrollToTab(s),this.$tabs.removeClass("active").attr("aria-selected",!1).attr("tabindex",-1),s.addClass("active").attr("aria-selected",!0).attr("tabindex",0)),this.$sections.removeClass("active").prop("hidden",!0),i.addClass("active").prop("hidden",!1);let a=i[0]&&i[0].offsetTop;if(this.activeUid=t,this.$activeTab=s,this.$activeSection=i,n[0]?.dispatchEvent(new CustomEvent("element-become-hidden")),i[0].dispatchEvent(new CustomEvent("element-become-visible")),typeof this.opts.onSelectTab=="function"&&this.opts.onSelectTab({uid:t,$tab:s}),!flexbe_cli.run.is_mobile&&o!=null&&a!=null&&Math.abs(o-a)>0&&typeof anime<"u"){let l=this.$mainContainer,d=o-a;l.css("will-change","transform"),anime({targets:l[0],translateY:[d,0],duration:250,easing:"easeOutCubic",complete:()=>{l.css({transform:"","will-change":""})}})}}normalizeLines(){if(!this.inited||!this.hasNav)return;let t,e=this.$tabs;this.$tabsList.find(".tab-spacer").remove(),e.removeClass("first-in-line last-in-line"),e.first().addClass("first-in-line"),e.last().addClass("last-in-line"),e.each((i,s)=>{t&&t.offsetTop!==s.offsetTop&&($(s).addClass("first-in-line"),$(t).addClass("last-in-line"),$(t).after('<span class="tab-spacer"></span>')),t=s})}scrollToTab(t){if(!this.inited||!this.hasNav||!t?.length)return;let e=this.$tabsList,i=e[0].scrollWidth;if(i>e[0].offsetWidth){let s=t[0].offsetLeft,n=t[0].getBoundingClientRect(),o=flexbe_cli.resize.viewportWidth,a;n.width>o||n.left<20?a=s-20:n.right>o-20&&(a=s-(o-20-n.width)),a!=null&&(a=Math.max(0,Math.min(i-o,a)),e.animate({scrollLeft:a},{duration:250}))}}destroy(){clearTimeout(this.initClassTmt),clearTimeout(this.bringViewTmt),this.$area.off(".tabsController"),this.$tabsContainer?.off(".tabsController"),this.$tabsList?.off(".tabsController"),this.$tabsList?.stop(),this.destroySwipeAnimation()}resetHash(){this.inited&&String(window.location.hash).replace(/^#{1,2}(tab)?/,"")===this.activeUid&&(flexbe_cli.lockPopstate=!0,window.history.replaceState(null,null,window.location.pathname),flexbe_cli.lockPopstate=!1)}};flexbe_cli.entity.setClientJs("block","BUNDLE",{components:[j],tabsController:void 0,shouldInitTabs:!0,onUpdate({templateRendered:t,reasonData:e}){t&&(this.shouldInitTabs=!0),["create","copy"].includes(e.source)&&requestAnimationFrame(()=>this.tabsController.selectTabFromIndex(e.to))},onResize(){this.tabsController&&this.tabsController.normalizeLines()},onBeside({state:t}){t&&this.shouldInitTabs&&this.createTabs()},onScreen({state:t}){this.tabsController&&(t||(this.tabsController.swipeAnimationController(),this.tabsController.resetHash()))},onFocus({state:t}){this.tabsController&&t&&this.tabsController.swipeAnimationController()},createTabs(){if(this.shouldInitTabs=!1,!this.$area.find('[role="tabpanel"]').length){this.tabsController=null;return}this.tabsController=new Pt({$area:this.$area,classContainer:".main-area",activeUid:this.selectedTabUid,onSelectTab:({uid:t})=>{this.selectedTabUid=t,this.updateTween()}})}});flexbe_cli.entity.setClientJs("block","FOOTER",{components:[j]});flexbe_cli.entity.setClientJs("block","HEADER",{onInit(){flexbe_cli.is_admin&&flexbe_cli.events.off(`entity_render:template.${this.id}`).on(`entity_render:template.${this.id}`,t=>{(t.is==="layout"||t.is==="block")&&this.fixOverlayContrast()})},onLoad(){this.ownContrast=this.$area.attr("data-contrast")||"auto",this.isOverlayed=this.$area.attr("data-overlayed")||!1,this.fixOverlayContrast()},onDestroy(){flexbe_cli.events.off(`layout_change.${this.id}`),flexbe_cli.events.off(`entity_render:template.${this.id}`)},onHideShowUI(){this.fixOverlayContrast()},fixOverlayContrast(){if(this.isOverlayed&&this.ownContrast==="auto"){let t=(this.$area.parent().is(".b_block")?this.$area.parent():this.$area).nextAll(".b_block:visible:not([data-overlayed])").eq(0).attr("data-contrast");t&&(this.$area.attr("data-static-contrast",t),this.$area.attr("data-contrast",t))}}});var At=class extends N{static is="button"};var we=new Array(70).fill(1).map((t,e)=>50+50*e),kt=class extends S{static is="icon";isCreated;isImgLoaded;isLazyLoading;image;imageLoadingOptions;async onInit(){this.$component.on("setImage",async()=>{this.isVisible&&!this.isImgLoaded&&(this.isCreated||this.create(),await this.loadImage())})}async onBeside({state:t}){t&&(this.isCreated||this.create(),this.isLazyLoading&&!this.isImgLoaded&&await this.loadImage())}async onResize(){this.isCreated&&await this.loadImage()}create(){let t=this.$component.data();this.imageLoadingOptions=flexbe_cli.vars.site.images,this.isLazyLoading=!!t.imgLazy,this.image={url:t.imgUrl||null,id:t.imgId,ext:t.imgExt,proportion:t.imgProportion,width:t.imgWidth,animated:t.imgAnimated,transparent:t.imgTransparent,scale:t.imgScale,type:"background"},this.isCreated=!0}async loadImage(){let t=this.$component.find(".vector-icon use"),e=this.$component.find(".custom-icon");if(t.length&&t.attr("href",this.image.url),e.length){let i=this.image.url;if(this.image.id){let s={width:this.componentWidth,height:this.componentHeight},{width:n}=await k(this.image,s,{...this.imageLoadingOptions,sizes:we});i=E(this.image,n,this.imageLoadingOptions)}i&&e.css("background-image",`url(${i})`)}this.isImgLoaded=!0}};flexbe_cli.entity.setClientJs("element","button01",{components:[At,kt],isPure:!0});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.