import{a as Ri}from"../../js/chunk-WSI4CI7G.mjs";function S(i,t){if(!{}.hasOwnProperty.call(i,t))throw new TypeError("attempted to use private field on non-instance");return i}var zi=0;function Nt(i){return"__private_"+zi+++"_"+i}var Pt="default",x=Nt("listeners"),K=Nt("context"),ft=Nt("addEventListeners"),E=class{constructor(t,e=!1){Object.defineProperty(this,ft,{value:qi}),Object.defineProperty(this,x,{writable:!0,value:new Map}),Object.defineProperty(this,K,{writable:!0,value:null}),this.strict=!1,S(this,K)[K]=t||this,this.strict=e}on(t,e){return S(this,ft)[ft](t,e,!1),this}one(t,e){return S(this,ft)[ft](t,e,!0),this}off(t,e){return(Array.isArray(t)?t:t.split(" ")).forEach(o=>{let[s,...r]=o.includes(".")?o.split("."):[o,Pt],a=r.join(".")||Pt;(s?[S(this,x)[x].get(s)]:[...S(this,x)[x].values()]).filter(Boolean).forEach(u=>{Array.from(u.entries()).forEach(([c,p])=>{(!e||e===c)&&p.namespace===a&&u.delete(c)}),u.size===0&&S(this,x)[x].delete(s)})}),this}clear(){return S(this,x)[x].clear(),this}async trigger(t,...e){let[n,...o]=t.split("."),s=o.join("."),r=S(this,x)[x].get(n),a=S(this,x)[x].get("*"),l=[];return r&&r.forEach((u,c)=>{(!s||u.namespace.startsWith(s))&&(l.push(Promise.resolve(c.call(S(this,K)[K],...e))),u.once&&r.delete(c))}),a&&a.forEach((u,c)=>{l.push(Promise.resolve(c.call(S(this,K)[K],t,...e)))}),this.strict&&l.length===0&&console.warn(`No listeners for event: ${t}`),Promise.all(l)}async emit(t,...e){return this.trigger(t,...e)}};function qi(i,t,e){(Array.isArray(i)?i:i.split(" ")).forEach(o=>{let[s,...r]=o.includes(".")?o.split("."):[o,Pt],a=r.join(".")||Pt;S(this,x)[x].has(s)||S(this,x)[x].set(s,new Map),S(this,x)[x].get(s).set(t,{once:e,namespace:a})})}var Vt=class extends E{constructor(){super(),this.init()}init(){let t=window.parent!==window;if(t){let e=()=>{this.message("LOCATION_CHANGE",{title:document.title,location:window.location.toString()})};window.addEventListener("hashchange",e),window.addEventListener("popstate",e),window.addEventListener("load",e),document.addEventListener("DOMContentLoaded",()=>{this.message("DOM_CONTENT_LOADED"),e()})}flexbe_cli.is_admin||window.addEventListener("keydown",e=>{let n="app.flexbe.com",o=e.metaKey||e.ctrlKey,s=e.shiftKey;(["F2"].includes(e.key)||["/","\\"].includes(e.key)&&o&&s)&&(t?this.message("CLOSE_FRAME"):window.location.href=`https://${n}/project/${flexbe_cli.group_id}/editor/${flexbe_cli.p_id}/`)})}message(t,e={}){window.parent!==window&&window.parent.postMessage({message:t,payload:e},"*"),this.trigger(t,e)}},b=new Vt;var fo=String.fromCharCode;function Le(i,t="default"){let[e,n]=i.split("#"),[o,s]=e.split("?"),r=o.endsWith("/"),a=o;return/\.[0-9a-z]+$/i.test(o)||o.startsWith("/files/")||o.startsWith("/img/")||!o.startsWith("./")&&!o.startsWith("/")?i:(t==="enabled"&&!r&&a&&(a=`${a}/`),t==="disabled"&&r&&o!=="/"&&(a=a.replace(/\/$/,"")),`${a}${s?`?${s}`:""}${n?`#${n}`:""}`)}var Ni=150,De=2160,Fe={avif:null,webp:null};function Vi(){var i;let t=typeof flexbe_cli=="object"&&((i=flexbe_cli.vars)==null?void 0:i.site.images)||{};return{lazy:!0,lazy_priority:!1,avif:!1,webp:!1,avif_support:Fe.avif||t.avif_support,webp_support:Fe.webp||t.webp_support,slow_network:!1,maxSize:De,minSize:Ni,quality_map:{jpg:70,webp:70,avif:55}}}async function Bt(i){try{let t=new Image;return"decode"in t?(t.src=i,await t.decode(),!0):await new Promise(e=>{let n=t;n.onload=()=>e(!0),n.onerror=()=>e(!1),n.src=i})}catch{return!1}}function jt(i){if(typeof i!="string")return i;i=i.replace(/(\/img\/[\d_q]+)\/[\w-]+(\.\w{3,4})/i,"$1$2");let[,t,e,n,o]=i.match(/\/img\/(\d+)_?(\d+)?_?q?(\d+)?\.(\w{3,4})/i)||[],s=+t,r=`${t}.${o}`,a=e?+e:0,l=n?+n:null;return{id:s,ext:o,name:r,size:a,quality:l}}function Bi(i,t){let e=t.avif_support,n=t.webp_support,o=t.avif,s=t.webp,r=i.ext;return e&&o?r="avif":n&&s?r="webp":i.ext==="webp"&&(n?r="webp":r=i.transparent?"png":"jpg"),r}function ji(i,t=null,e=null){var n;e={...Vi(),...e};let{id:o,ext:s}=i;if(!o)return"";let r=e.maxSize||De;!t&&i.ext==="webp"&&!e.webp_support&&(t=Math.min(i.width||r,r));let a=(n=i.animated)!=null?n:s==="gif",l=`/img/${o}.${s}`;if(!t||a||s==="svg")return l;let c=Bi(i,e),p=e.slow_network&&Gi(),f=e.quality_map;switch(p&&(f={jpg:50,webp:50,avif:45}),c){case"png":return`/img/${o}_${t}.png`;case"avif":case"webp":case"jpg":return`/img/${o}_${t}_q${f[c]}.${c}`;case"gif":default:return l}}function Hi(i){let t=String(i).match(/\.(jpg|jpeg|png|gif|svg|bmp|webp)$/i);return t&&t[1]?t[1]:""}function Wi(i){return i!=="transparent"?i:"#000000"}function Ht(i){if(typeof i=="string"&&(i=jt(i)),!i||typeof i!="object")return{};let t=i.img_ext||i.ext,e=i.img_id||i.id,n=i.img_name||i.name;(!t||t==="false")&&(t=n?Hi(n):"jpg");let o=i.img_border||i.border,s=Wi(i.img_average||i.average),r=i.img_preview||i.preview||"",a=i.img_width||i.width||0,l=i.img_height||i.height||0,c=+(+i.img_proportion||+i.proportion||0).toFixed(2),p=i.img_animated||i.animated||t==="gif",f=i.img_transparent||i.transparent||0;return{id:e,ext:t,average:s,preview:r,width:a,height:l,proportion:c,border:o,animated:p,transparent:f}}function Re(i,t=0,e){let n=Ht(i),o=typeof t=="number"?Math.round(t):typeof t=="string"?parseInt(t,10):null;return ji(n,o,e)}function Gi(){var i;return typeof navigator>"u"?!1:(((i=navigator.connection)==null?void 0:i.effectiveType)||"4g")!=="4g"}function pt(i,t){if(!{}.hasOwnProperty.call(i,t))throw new TypeError("attempted to use private field on non-instance");return i}var Xi=0;function Zt(i){return"__private_"+Xi+++"_"+i}var Wt=Zt("checkSupports"),ht=Zt("deviceInfo"),mt=Zt("applyClasses"),Gt=class{constructor(){Object.defineProperty(this,mt,{value:Ji}),Object.defineProperty(this,ht,{value:Zi}),Object.defineProperty(this,Wt,{value:Qi}),this.is_screen_mobile=void 0,this.is_screen_mobile_scaled=void 0,this.is_screen_desktop=void 0,this.is_screen_desktop_scaled=void 0,this.is_touch=void 0,this.is_pointer=void 0,this.is_tablet=void 0,this.is_mobile=void 0,this.is_desktop=void 0,this.is_chrome=void 0,this.is_safari=void 0,this.is_firefox=void 0,this.is_OSX=void 0,this.is_android=void 0,this.is_ios=void 0,this.is_preview=void 0,this.is_bot=void 0,this.is_instagram=void 0,this.device_type=void 0}init(){pt(this,ht)[ht](),pt(this,mt)[mt](),pt(this,Wt)[Wt](),$(window).on("resize.deviceInfo",()=>{pt(this,ht)[ht]()}),$(window).on("resized.deviceInfo",()=>{pt(this,mt)[mt]()}),flexbe_cli.events.on("hideShowUI",t=>{this.is_preview=["preview","generation"].includes(t),$(document.body).removeClass("mode--editor mode--preview mode--generation").addClass(`mode--${t}`)})}matchScreen(t,e){let n=["screen"];return t!=null&&n.push(`(min-width: ${t}px)`),e!=null&&n.push(`(max-width: ${e}px)`),window.matchMedia(n.join(" and ")).matches}};async function Qi(){let i=flexbe_cli.vars.site.images||{},[t,e]=await Promise.all([i.webp_support||Bt("data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"),i.avif_support||Bt("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=")]);i.webp_support=t,i.avif_support=e}function Zi(){var i,t;let e=(i=window.CSS)==null?void 0:i.supports("zoom","1"),n=navigator.userAgent.toLowerCase();this.is_screen_mobile=this.matchScreen(0,767),this.is_screen_mobile_scaled=e&&this.matchScreen(0,399),this.is_screen_desktop=this.matchScreen(768,1e4),this.is_screen_desktop_scaled=e&&this.matchScreen(768,1199),this.is_touch="ontouchstart"in window||navigator.maxTouchPoints>0||window.matchMedia("(any-pointer: coarse)").matches,this.is_pointer=!this.is_touch||window.matchMedia("(pointer: fine)").matches,this.is_tablet=/ipad|xoom|kindle|playbook|tablet/i.test(n),this.is_mobile=!this.is_tablet&&n.indexOf("mobile")!==-1,this.is_desktop=!this.is_mobile&&!this.is_tablet,this.is_chrome=/(chromium|chrome)\/(\d+)/.test(n),this.is_safari=n.indexOf("safari")!==-1&&((t=n.match(/version\/(\d+)/))==null?void 0:t[1]),this.is_firefox=n.indexOf("firefox")!==-1,this.is_OSX=/ipad|iphone|ipod|macintosh/gi.test(n),this.is_android=n.indexOf("android")!==-1,this.is_ios=this.is_OSX&&this.is_touch&&!this.is_desktop,this.is_preview=/is-view|mode--preview|mode--generation/.test(document.body.className),this.is_instagram=/instagram/i.test(n),this.is_mobile&&this.is_touch?this.device_type="mobile":this.is_tablet&&this.is_touch?this.device_type="tablet":this.device_type="desktop"}function Ji(){let i=$(document.body);i.toggleClass("is-mobile",this.is_mobile),i.toggleClass("is-tablet",this.is_tablet),i.toggleClass("is-desktop",this.is_desktop),i.toggleClass("is-pointer",this.is_pointer),i.toggleClass("is-touch",this.is_touch),i.toggleClass("is-ios",!!this.is_ios),i.toggleClass("is-android",this.is_android),i.toggleClass("is-osx",this.is_OSX&&this.is_desktop),i.toggleClass("is-safari",!!this.is_safari),this.is_safari&&i.addClass(`is-safari-${this.is_safari}`),i.toggleClass("is-firefox",this.is_firefox),i.toggleClass("is-chrome",this.is_chrome),i.toggleClass("is-instagram",this.is_instagram)}var Y=new Gt;function O(i,t){if(!{}.hasOwnProperty.call(i,t))throw new TypeError("attempted to use private field on non-instance");return i}var on=0;function qe(i){return"__private_"+on+++"_"+i}var ze,C=qe("smallViewportHeight"),T=qe("largeViewportHeight"),Jt=class{constructor(){this.containerWidth=null,this.oldWidth=null,this.oldHeight=null,this.lockedMode=!1,this.responsiveMode=null,this.clientWidth=null,this.clientHeight=null,Object.defineProperty(this,C,{writable:!0,value:null}),Object.defineProperty(this,T,{writable:!0,value:null}),this.lockedViewport=!1,this.viewportWidth=null,this.viewportHeight=null,this.proportion=null}init(){this.simulateWindowResized(),this.simulateDocumentResize(),this.updateSizes({triggerResize:!1}),this.watchContainerSize(),this.applySizeVariablesOnResize()}trigger(t,e=window){e.dispatchEvent(new CustomEvent(t))}getAccurateViewportInfo(){let e=document.documentElement.getBoundingClientRect(),n=window.innerWidth,o=window.innerHeight,s=Math.round(e.width),r=o,a=n-s;return{clientWidth:s,clientHeight:r,viewportWidth:n,viewportHeight:o,scrollbarWidth:a}}updateSizes({width:t,height:e,proportion:n=null,triggerResize:o=!0,lockViewport:s}){var r,a,l,u;let{clientWidth:c,clientHeight:p,scrollbarWidth:f}=this.getAccurateViewportInfo();t=(r=t)!=null?r:this.lockedViewport?this.viewportWidth:c,e=(a=e)!=null?a:this.lockedViewport?this.viewportHeight:p,t=Math.min(t,c),e=Math.min(e,p);let m=t>=0&&t<=399,d=t>=768&&t<=1199;(d||m)&&(t=d?1200:400),this.oldWidth=this.clientWidth,this.oldHeight=this.clientHeight,this.viewportWidth=t,this.viewportHeight=e,this.clientWidth=c,this.clientHeight=p,O(this,C)[C]=Math.min(this.clientHeight,(l=O(this,C)[C])!=null?l:this.clientHeight),O(this,T)[T]=Math.max(this.clientHeight,(u=O(this,T)[T])!=null?u:this.clientHeight),(flexbe_cli.is_admin||O(this,T)[T]-O(this,C)[C]>120)&&(O(this,C)[C]=this.clientHeight,O(this,T)[T]=this.clientHeight),this.scrollbarWidth||(this.scrollbarWidth=f),n!=null&&(this.proportion=n),s!=null&&(this.lockedViewport=s),this.lockedMode||(this.responsiveMode=flexbe_cli.vars.page.responsive&&t<=767?"mobile":"desktop"),o&&(this.trigger("resize"),this.trigger("resized"))}lockMode(t){this.lockedMode=t}applySizeVariablesOnResize(){let t=$(document.documentElement),e=$(document.body),n=()=>{t.css("--scrollbarWidth",`${this.scrollbarWidth}px`),t.css("--100vw",`${this.viewportWidth}px`),t.css("--100vh",`${this.viewportHeight}px`),CSS.supports("height","1svh")||t.css("--100svh",`${O(this,C)[C]}px`),CSS.supports("height","1lvh")||t.css("--100lvh",`${O(this,T)[T]}px`),this.proportion?t.css("--cover",`${Math.round(this.viewportWidth/this.proportion)}px`):t.css("--cover",""),e.toggleClass("adaptive-mobile",this.responsiveMode==="mobile"),e.toggleClass("adaptive-desktop",this.responsiveMode==="desktop")};n(),Y.is_ios&&setTimeout(()=>n(),150),$(window).on("resized.setVars",()=>n())}watchContainerSize(){let t=()=>{let e=document.createElement("div");e.classList.add("container"),requestAnimationFrame(()=>{document.body.appendChild(e),this.containerWidth=e.offsetWidth,document.body.removeChild(e)})};t(),$(window).on("resized.setContainer",()=>t())}simulateWindowResized(){let e,n=this.oldWidth,o=this.oldHeight;$(window).on("resize orientationchange",s=>{s.originalEvent&&(this.updateSizes({triggerResize:!1}),clearTimeout(e),e=setTimeout(()=>{this.oldWidth=n,this.oldHeight=o,n=this.clientWidth,o=this.clientHeight,requestAnimationFrame(()=>{this.trigger("resized")})},80))})}simulateDocumentResize(){requestAnimationFrame(()=>{this.documentHeight=document.body.offsetHeight});let t=flexbe_cli.is_admin?200:80,e=(n=0)=>{let o=document.body.offsetHeight;Math.abs(o-this.documentHeight)>=5&&(this.documentHeight=o,this.trigger("documentresize",document),clearTimeout(ze),ze=setTimeout(()=>{this.trigger("documentresized",document)},n))};if(typeof ResizeObserver=="function"){let n=!0;new ResizeObserver(()=>{if(n){n=!1;return}e(t)}).observe(document.querySelector("body"))}else setInterval(()=>{e(0)},t)}},P=new Jt;var Ot={};function sn(i,t){let e=document.createElement("link");return new Promise((n,o)=>{let s=!1,r,a=(l=!0)=>{s||(s=!0,clearTimeout(r),l==="timeout"?o(new Error("timeout")):n(l))};e.onerror=a.bind(null,!1),e.onload=a.bind(null,!0),r=setTimeout(a.bind(null,"timeout"),t),e.rel="stylesheet",e.href=i,document.body.appendChild(e)})}function rn(i,t){let e=document.createElement("script");return new Promise((n,o)=>{let s=!1,r,a=(l=!0)=>{s||(s=!0,clearTimeout(r),l==="timeout"?o(new Error("timeout")):n(l))};e.onload=a.bind(null,!0),e.onerror=a.bind(null,!1),r=setTimeout(a.bind(null,"timeout"),t),e.async=!0,e.src=i,document.body.appendChild(e)})}function Ne(i,t=15e3){return!i||i.length===0?Promise.resolve(!1):Array.isArray(i)?Promise.all(i.map(e=>Ne(e,t))).then(e=>e.every(Boolean)):(Ot[i]||(Ot[i]=/\.css(\?.*)?$/.test(i)?sn(i,t):rn(i,t)),Ot[i])}function R(i,t,e=15e3){let n=Ne(i,e);return typeof t=="function"&&n.then(()=>t(!0)).catch(()=>t(!1)),n}var et={anchorToCenter:!0,inScroll:!1,skip:!1,_latest:null,get latest(){let i=P.zoom||1;return this._latest/i},init(){window.history.scrollRestoration&&(window.history.scrollRestoration="auto"),requestAnimationFrame(()=>{this._latest=window.scrollY}),document.addEventListener("wheel",()=>{this.$inScrollElement&&(this.$inScrollElement.stop(),this.$inScrollElement=null)},{passive:!0}),document.addEventListener("scroll",()=>{this.inScroll=!0,this._latest=window.scrollY},{passive:!0}),document.addEventListener("scrollend",()=>{this.inScroll=!1},{passive:!0}),this.scrollImprovement.init(),flexbe_cli.vars.site.smoothingScroll&&this.scrollSmoothing.init()},scrollImprovement:{scrollTimer:0,init(){this.createStopScrollEvent()},createStopScrollEvent(){let i=et.latest;document.addEventListener("scroll",()=>{let t=i>et.latest?"up":"down",e=Math.max(et.latest-i,i-et.latest);clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{i=et.latest,document.dispatchEvent(new CustomEvent("scrollend",{detail:{direction:t,distance:e}}))},200)},{passive:!0})}},scrollSmoothing:{duration:1.2,lenisInstance:null,instances:[],loadLib(){return new Promise(i=>R(["/_s/lib/lenis/lenis.min.js"],()=>i(!0)))},async init(){if(flexbe_cli.is_admin)return;let i=".scroller",t=".widget-content, .elements-list",e=".container-list",n=document.querySelectorAll(i);await this.loadLib(),this.instances.push(new window.Lenis({duration:this.duration,eventsTarget:document.querySelector(e)||document.documentElement})),n.length&&n.forEach(s=>{let r=new window.Lenis({duration:this.duration,wrapper:s,eventsTarget:s.querySelector(t)||s});this.instances.push(r)});let o=s=>{this.instances.forEach(r=>{r.raf(s)}),requestAnimationFrame(o)};requestAnimationFrame(o),$(document).on("bringIntoView.scroll-smoothing",()=>{this.instances.forEach(s=>{s.stop(),s.start()})})},destroy(){$(document).off(".scroll-smoothing"),this.instances.forEach(i=>{i.destroy()}),this.instances=[]}},scrollLock:{loaded:!1,locked:!1,async load(){if(!this.loaded)return R(["/_s/lib/scroll-lock/scroll-lock.min.js"],()=>{this.loaded=!0,window.scrollLock._state.lockableSelectors=["html"],window.scrollLock._state.fillGapSelectors=["html"],window.scrollLock._state.scrollableSelectors=[".scroller",".scrollable","[data-scroll-lock-scrollable]"]})},async lock(){this.locked=!0,await this.load(),typeof window.scrollLock<"u"&&(window.scrollLock.disablePageScroll(),P.trigger("resized"))},unlock(){this.locked=!1,typeof window.scrollLock<"u"&&(window.scrollLock.clearQueueScrollLocks(),window.scrollLock.enablePageScroll(),P.trigger("resized"))}},to(i){document.scrollingElement.scrollTo(0,i)},toElement(i,t={}){let e=$(i);if(i=e[0],!i)return!1;t.animation==null&&(t.animation=!0),t.centered==null&&(t.centered=this.anchorToCenter),t.force==null&&(t.force=!0);let n=0,o=0,s,r=flexbe_cli.helpers.scrollParent(i,"y");(!r||$(r).is(".b_block, .container-list"))&&(r=document.scrollingElement);let a=t.padding||0,l=r===document.body||r===document.documentElement,u=l?flexbe_cli.resize.clientHeight:r.offsetHeight,c=e.offset().top,p=i.offsetHeight,f=l?$("html, body"):$(r);Y.is_mobile?s=f.find(".menu-fixed > .nav-header"):flexbe_cli.theme_id===4?o=flexbe_cli.fixed.getAllFixedHeight(c):s=f.find('.floating[data-floating="true"]'),s&&s.length&&(o+=s[0].offsetHeight-2);let m=Math.max(0,u-o-p);if(p>=u&&(t.centered=!1),t.centered?n=c-Math.max(0,m/2)-o:n=c-a-o,t.offset&&(n+=t.offset),!t.force){let d=r.offsetTop,h=e[0].getBoundingClientRect(),g=Math.max(h.top,d);if(Math.min(h.bottom,d+u)-g>=p/2)return typeof t.complete=="function"&&t.complete(),!1}this.$inScrollElement=f,$(document).off("documentresize.scrollTo").on("documentresize.scrollTo",()=>{this.toElement(i,t)}),f.stop(),f.animate({scrollTop:n},{delay:t.delay||0,duration:t.duration?t.duration:t.animation?450:0,easing:t.animation?"swing":"linear",always:(...d)=>{this.$inScrollElement=!1,$(document).off("documentresize.scrollTo"),typeof t.complete=="function"&&t.complete(...d)}})}},z=et;function an(i){let t=$(i).eq(0);if(t.length){let e=new Event("bringIntoView",{bubbles:!0,cancelable:!0});t[0].dispatchEvent(e)}}function Ve(i,t=!1){if(i=i?Le(i,flexbe_cli.vars.site.trailingSlash):null,flexbe_cli.is_admin){i?b.message("LEAVE_PAGE",{href:i,blank:t}):b.message("WRONG_LINK",{type:"link",href:i});return}if(!i){console.warn("Empty link");return}window.parent!==window&&i.includes("http")&&(t=!0),t?window.open(i,"_blank").focus():window.location.href=i}function Mt(i="",t){if(typeof i!="string")return!1;if(/#{1,2}.+/.test(i)){flexbe_cli.theme_id===4&&$('nav[data-opened="true"]').length&&b.trigger("ui_mobilemenu_close",{}),flexbe_cli.theme_id!==4&&$(".mobile-menu.show").length&&$(".mobile-menu").removeClass("show").trigger("close"),i=i.replace(/^\.\/#{2}/,"#").trim();let e=i.trim().split("#"),n=e[e.length-1];if(!(e[0]===""||e[0]==="./"||e[0]===new URL(document.baseURI).pathname))return Ve(i),!0;let s=$(`._anchor[name="${n}" i], [id="${n}"]`),r=s.length?s.closest("[data-id]"):$(`[data-id="${n}" i]`);r.is(".element-item--free")&&(r=r.find(".element-content"));let a=r.closest(".b_block").filter(":visible"),l=r.closest(".m_modal");if((s.length||r.length)&&an(s.length?s:r),n==="cart")b.trigger("ui_modal_close",{}),b.trigger("ui_cart_open",{});else if(a.length)b.trigger("ui_cart_close",{}),b.trigger("ui_modal_close",{}),setTimeout(()=>{let u=a;if(r&&!a.is(r)){let c=a[0].getBoundingClientRect(),p=r[0].getBoundingClientRect(),f=p.top-c.top>P.viewportHeight-100,m=p.topc.bottom;(f||m)&&(u=r)}u.is(":visible")&&z.toElement(u,{force:!n.startsWith("tab")})},30),window.history.replaceState(null,null,`#${n}`);else if(l.length){let u=l.data("id");b.trigger("ui_cart_close",{}),b.trigger("ui_modal_open",{id:u})}else window.location.hash=`#${n}`,flexbe_cli.is_admin&&b.message("WRONG_LINK",{type:"anchor",href:`#${n}`})}else return Ve(i,t),!0}function Be(i=document){$(i).find("[data-product]").each((e,n)=>{let o=$(n),s=o.data("product");o.removeAttr("data-product"),(s==null||typeof s=="object"&&!Object.keys(s).length)&&(s=null),s!==null?o.data("product",s):o.removeData("product")})}function te(){if(flexbe_cli.lockPopstate)return;let i=window.location.hash;if(!i&&window.parent)try{i=window.parent.location.hash}catch{}flexbe_cli.lockPopstate=!0,/^#/.test(i)?Mt(i):flexbe_cli.modal.opened.size&&b.trigger("ui_modal_close"),flexbe_cli.lockPopstate=!1}function ee(i=()=>{},t=()=>{}){let e=!1;["complete","loaded"].includes(document.readyState)?n():document.addEventListener("DOMContentLoaded",()=>n());function n(){if(!e){if(typeof $>"u"||!$.debounce){setTimeout(n,10);return}e=!0,i(),requestAnimationFrame(async()=>{$("body").removeClass("noanimate").addClass("DOMContentLoaded"),await t(),flexbe_cli.vars.globals.isService||(te(),setTimeout(()=>te(),1e3),window.addEventListener("popstate",te)),flexbe_cli.isInited=!0})}}}var ie={};Ri(ie,{get:()=>ln,set:()=>cn});function ln(i){let t=document.cookie.match(new RegExp(`(?:^|; )${i.replace(/([$()*+./?[\\\]^{|}])/g,"\\$1")}=([^;]*)`));return t?decodeURIComponent(t[1]):void 0}function cn(i,t,e={}){let n=e.expires;if(typeof n=="number"){let r=new Date;r.setTime(r.getTime()+n*1e3),n=r,e.expires=r}else n instanceof Date&&(e.expires=n.toUTCString());t=encodeURIComponent(t);let o=`${i}=${t}`;Object.keys(e).forEach(r=>{o+=`; ${r}`;let a=e[r];a!==!0&&(o+=`=${a}`)}),document.cookie=o}function Lt(i){if(!i||!i.offsetParent)return null;let t=0,e=0;for(;i;){if($.css(i,"position")==="fixed"){t+=window.scrollY,e+=window.scrollX;break}t+=i.offsetTop-i.scrollTop,e+=i.offsetLeft-i.scrollLeft,i=i.offsetParent}return{top:Math.round(t),left:Math.round(e)}}function je(i,t=[]){return i.parentNode==null?t:je(i.parentNode,[...t,i])}function un(i){let t=/(auto|scroll)/,e=getComputedStyle(i,null);return["overflow","overflow-y","overflow-x"].some(n=>t.test(e.getPropertyValue(n)))}function He(i){if(!i||!i.parentNode)return;let t=i.ownerDocument||document,e=je(i.parentNode,[]);for(let n=0;n{$.ajax({url:i,type:t.type||t.method||"POST",dataType:"json",...t}).done(o=>{e(o)}).fail(o=>{let s=o.responseJSON,r=s?new Error(s.message):o;r.status=o.status,r.data=s,n(r)})})}function ne(i,t={}){t={onSuccess:()=>{},onComplete:()=>{},onError:()=>{},onProgress:()=>{},...t};let e=new FormData;e.append("file",i);let n=$.ajax({url:"/mod/file/lead/upload/",type:t.type||t.method||"POST",dataType:"json",processData:!1,contentType:!1,data:e,success:(o,s)=>{t.onSuccess(o,s)},error:(o,s)=>{t.onError(o,s)},complete:(o,s)=>{t.onComplete(o,s)},xhr:()=>{let o=new window.XMLHttpRequest;return o.upload.addEventListener("progress",s=>t.onProgress(n,s)),o},...t});return n}function We(i){return String(i).split("").reduce((e,n)=>(e=(e<<5)-e+n.charCodeAt(0),e&e),0).toString(16)}var Ge={fetch:H,upload:ne,scrollParent:He,getElOffset:Lt,gotoLink:Mt,getImageUrl:Re,hashCode:We,cookie:ie};var dn=[".layout-type-header",".layout-type-tabs",".layout-type-column",".layout-type-products",".flexbe-cards-container.mode-slider",".content-zone--vertical.bg-element",".content-zone--vertical:not(.bg-element) .element-item--static",".flexbe-card:not(.swiper-slide)",".quiz-progress",".step-title",".quiz-fields"].join(","),fn=[".free-area .element-item"].join(","),Ft={startTransitions(i){let t=$(i);if(flexbe_cli.is_admin){t.addClass("was-view"),t.removeClass("wait-animation");return}let e=t.find(fn),n=t.find(dn);n=n.filter((a,l)=>$(l).find(n).length===0);let o=200,s=Math.min(80,1e3/n.length),r=1e3+n.length*s;n.css("--transitionDelay",a=>`${a*s}ms`),n.addClass("transition-target"),e.addClass("transition-target"),setTimeout(()=>{t.addClass("was-view")},o),setTimeout(()=>{this.stopTransition(t,n)},o+r)},stopTransition(i,t){let e=$(i),n=$(t);n.length||(n=e.find(t),n=n.filter((o,s)=>$(s).find(n).length===0)),e.removeClass("wait-animation"),n.removeClass("transition-target"),n.css("--transitionDelay",""),e.trigger("flexbe-transition-end")}};function q(i,t){if(!{}.hasOwnProperty.call(i,t))throw new TypeError("attempted to use private field on non-instance");return i}var pn=0;function gt(i){return"__private_"+pn+++"_"+i}var Q=gt("lskey"),X=gt("query"),oe=gt("session"),se=gt("saveSession"),re=gt("saveReferrer"),ae=class{constructor(){Object.defineProperty(this,re,{value:_n}),Object.defineProperty(this,se,{value:gn}),Object.defineProperty(this,oe,{get:mn,set:void 0}),Object.defineProperty(this,X,{get:hn,set:void 0}),Object.defineProperty(this,Q,{writable:!0,value:"client_utm"}),Object.keys(q(this,X)[X]).length&&q(this,se)[se](),this.referrer||q(this,re)[re]()}get referrer(){try{return sessionStorage.getItem("referrer")}catch(t){return console.error(t),null}}get data(){return{...q(this,oe)[oe],...q(this,X)[X]}}getUtm(){return this.data}toString(){return new URLSearchParams(this.data).toString()}};function hn(){let i=[...new URL(window.location.toString()).searchParams].filter(([t])=>/utm_/.test(t));return{...Object.fromEntries(i)}}function mn(){try{return JSON.parse(localStorage.getItem(q(this,Q)[Q])||"null")}catch(i){return console.error(i),null}}function gn(){if(!flexbe_cli.is_admin)try{let i=q(this,X)[X];Object.keys(i).length?localStorage.setItem(q(this,Q)[Q],JSON.stringify(i)):localStorage.removeItem(q(this,Q)[Q])}catch{}}function _n(){try{sessionStorage.setItem("referrer",document.referrer)}catch(i){console.error(i)}}var it=new ae;var bn={quiz:"quiz_start",modal:"modal_open",modal_form:"form_open",modal_done:"done_open",modal_product:"product_show",order_done:"order_done",pay_done:"pay_done",cart:"add_to_cart",link:"link_open",file:"file_load",close:"modal_close",app_link:"app_link_open"},W={get u_id(){return localStorage.getItem("f_uid")||0},set u_id(i){try{localStorage.setItem("f_uid",String(i))}catch{}},init(){if(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.vars.globals.isBot||!flexbe_cli.p_id)return;let i=flexbe_cli.vars.site.delayCounters||0;setTimeout(()=>{let t=flexbe_cli.helpers.cookie.get("f_uid")||this.u_id;t?(this.u_id=t,yn()):vn()},i),this.AB.init(),this.ecommerce.init(),this.QUIZ.init()},getGoal(i,t){if(i==="modal"){let{modal:e}=flexbe_cli.modal.find(t)||{modal:null};/form/.test(t)?i="modal_form":/done/.test(t)?i="modal_done":/product/.test(t)?i="modal_product":(/quiz/.test(t)||e&&e.getAttribute("data-m-id")==="QUIZ")&&(i="quiz")}return bn[i]||!1},reachGoal(i,t={}){if(flexbe_cli.is_admin||!i)return;let e={goalAction:"send",goalValue:""};t.goalParams&&(e.goalParams=t.goalParams),t.leadId&&(e.leadId=t.leadId),b.trigger("reach_goal",{name:i,params:e})},reachGoals(i={},t={}){if(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.vars.globals.isBot||!flexbe_cli.p_id)return;let e=`${i.goal||""}`.trim(),n=`${i.mainGoal||""}`.trim(),o=`${i.htmlGoal||""}`.trim();if(n&&this.reachGoal(n,t),e)try{this.reachGoal(e,t)}catch(s){console.warn("reachGoals [goal]: ",s.message)}if(o)try{let s=o.replace(/{{\s*goalAction\s*}}/g,t.goalAction||"").replace(/{{\s*goalValue\s*}}/g,t.goalValue||"").replace(/(["']?){{\s*goalParams\s*}}\1/g,JSON.stringify(t.goalParams||{})),r=$("
").append(s).find("script");r.length&&(s=r.html()),(async l=>{let u=Object.getPrototypeOf(async()=>{}).constructor;await new u("{ goalAction, goalValue, goalParams, formData }",`{ ${s} }`)(l)})(t).catch(l=>{console.error("Error executing action code:",l)})}catch(s){console.warn("reachGoals [htmlGoal]: ",s.message)}},ecommerce:{inited:!1,init(){this.inited=!0,window.dataLayer||(window.dataLayer=[])},add(i){this.inited||this.init(),window.dataLayer.push({ecommerce:{currencyCode:flexbe_cli.vars.site.currencyData.code,add:{products:[this._normalizeItem(i)]}}})},remove(i){this.inited||this.init(),window.dataLayer.push({ecommerce:{currencyCode:flexbe_cli.vars.site.currencyData.code,remove:{products:[this._normalizeItem(i)]}}})},purchase(i,t){if(!(!i&&i.length===0)){this.inited||this.init(),t||(t=Math.ceil(Math.random()*1e4));try{window.dataLayer.push({ecommerce:{currencyCode:flexbe_cli.vars.site.currencyData.code,purchase:{actionField:{id:t},products:i.map(e=>this._normalizeItem(e))}}})}catch{}}},_normalizeItem(i){var t,e,n;return{id:i.id,name:i.name||i.title,price:(t=i.price)!=null?t:i.orderPrice,brand:(e=i.brand)!=null?e:i.vendorCode,variant:i.optionsInfo?i.optionsInfo.map(o=>o.name).join(", "):"",quantity:(n=i.count)!=null?n:i.quantity}}},AB:{process:{},init(){flexbe_cli.is_admin||!document.querySelectorAll("[data-abtest-variant]").length||flexbe_cli.block.$blocks.on("screen",i=>{let t=i.currentTarget._core,e=i.detail||{};!e.state||!e.first||!(t!=null&&t.abtestVariant)||this.fixView(t.abtestId,t.abtestVariant)})},setCookie(i){flexbe_cli.helpers.cookie.set("f_ab",JSON.stringify(i),{expires:7*24*60*60,path:"/",domain:document.location.hostname})},getCookie(){let i=flexbe_cli.helpers.cookie.get("f_ab");if(i)try{i=JSON.parse(decodeURIComponent(i))}catch(t){console.warn("Can`t parse abtest cookie",t)}return i||(i={view:{},lead:[]}),i},async fixView(i,t){if(i==null||t==null||t!=="a"&&t!=="b")return;if(this.getCookie().view[i]==null&&!this.process[i]){this.process[i]=!0;try{await H("/mod/stat/abtest/",{data:{testId:i,variant:t,s_id:flexbe_cli.s_id,p_id:flexbe_cli.p_id}});let n=this.getCookie();n.view[i]=t,this.setCookie(n)}catch(n){console.error("Can't fix abtest",n)}this.process[i]=!1}}},QUIZ:{inited:!1,init(){this.inited||(this.inited=!0,b.on("quiz_event.stat",(i={})=>{let t=i.payload||{};if(!["step","submit"].includes(i.event)||i.event==="step"&&!t.toNext)return;let e=i.quiz,n=e.$area.attr("data-page-id"),o=i.answerGoals,s=i.resultGoals,r=i.resultGoalsData,l=e.core.id,u=t.fromAnswers||[],c=t.toId,p=t.sessionId,f=t.fromId,m=u.reduce((d,h)=>d.concat((h.variants||[]).map(g=>g.id)),[]);if(this.fixAnswer({sessionId:p,sectionId:l,answerStep:f,answerVariants:m,viewStep:c,pId:n}),o){let d="answer";u.forEach(h=>{var g;if((g=h.variants)!=null&&g.length)h.variants.forEach(_=>{let y=_.value;W.reachGoals(o,{goalAction:d,goalValue:y})});else{let _=h.value||"";["email","phone","name"].includes(h.type)&&(_=""),W.reachGoals(o,{goalAction:d,goalValue:_})}})}s&&W.reachGoals(s,r)}))},fixAnswer({sectionId:i,sessionId:t,answerStep:e,viewStep:n,answerVariants:o,pId:s}){let r;if(n&&e?r="/mod/quiz/stat/save/composite/":e?r="/mod/quiz/stat/save/answer/":n&&(r="/mod/quiz/stat/save/view/"),!r)return;W.u_id?a():b.one("user_created",()=>{a()});async function a(){return H(r,{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,f_uid:W.u_id,page_id:s||flexbe_cli.p_id,session_id:t,section_id:i,answer_step:e,answer_variants:o,view_step:n}})}}}};async function vn(){try{let i={...it.data};it.referrer&&(i.referrer=it.referrer);let t=await H("/mod/stat/",{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,p_id:flexbe_cli.p_id,utm_data:i,device:{type:flexbe_cli.run.device_type,width:flexbe_cli.resize.clientWidth,height:flexbe_cli.resize.clientHeight,dpi:window.devicePixelRatio,browser:navigator.userAgent}}});W.u_id=t.u_id,flexbe_cli.helpers.cookie.set("f_uid",t.u_id,{Path:"/"}),b.trigger("user_created")}catch(i){console.warn("Cookie visit not created",i)}}async function yn(){try{let i=await H("/mod/stat/visit/",{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,p_id:flexbe_cli.p_id,u_id:W.u_id}});i.v_id||console.warn("Visit was not registered",i)}catch(i){console.error("Visit was not registered",i)}}var le=W;var Dt="||||",Ue=()=>0,wn=i=>{if(i<3)return i;let t=i%100;return t>=3&&t<=10?3:t>=11?4:5},xn=i=>{let t=i%10,e=i%100;return t===1&&e!==11?0:t>=2&&t<=4&&!(e>=12&&e<=14)?1:2},An=i=>{let t=i%10,e=i%100;return t===0||e>=11&&e<=19?0:t===1&&e!==11?1:2},$n=i=>i>=0&&i<=1?0:1,En=i=>i>=2?1:0,Sn=i=>i!==1?1:0,kn=i=>i%10===1&&i%100!==11?0:i%10>=2&&i%10<=9&&(i%100<11||i%100>19)?1:2,In=i=>i===1?0:i>=2&&i<=4?1:2,Cn=i=>{if(i===1)return 0;let t=i%10;return t>=2&&t<=4&&(i%100<10||i%100>=20)?1:2},Tn=i=>i%10!==1||i%100===11?1:0,Pn=i=>{let t=i%100;return t===1?0:t===2?1:t===3||t===4?2:3},On=i=>{if(i===1)return 0;let t=i%100;return i===0||t>=2&&t<=19?1:2},Mn=new Map([[["ar"],wn],[["ru","uk","bs","bs","sr","hr","be"],xn],[["fa","da","de","en","es","fi","el","he","hi","hu","hu","it","nl","no","pt","sv","tr","ka","kk","uz","af","ky","sq","az","et","sw","mn","tg","so"],Sn],[["fr","tl","hy","pt-br"],En],[["lt"],kn],[["lv"],An],[["cs","sk"],In],[["pl"],Cn],[["is","mk"],Tn],[["sl"],Pn],[["ro"],On],[["hi","zu","bn"],$n],[["id","ja","ko","lo","ms","th","zh","vi"],Ue]]),Ln=[...Mn].reduce((i,[t,e])=>(t.forEach(n=>{i[n]=e}),i),{});function Ke(i,t){return(Ln[i]||Ue)(t)}var _t=class{constructor(t){this.locale=void 0,this.phrases={},this.keyDelimiter="::",this.interpolateRegexp=/%([^%]*)%/g,this.warn=void 0,this.locale=t.locale||"en",this.warn=t.warn||console.warn.bind(console),this.extend(t.phrases||{})}extend(t,e){Object.entries(t).forEach(([n,o])=>{if(typeof e=="string"&&(n=`${e}${this.keyDelimiter}${n}`),typeof o=="object")this.extend(o,n);else if(o.startsWith("{")&&o.endsWith("}"))try{let s=JSON.parse(o);this.phrases[n]=["zero","one","two","few","many","other"].map(r=>s[r]).filter(r=>typeof r=="string").join(Dt)}catch{this.phrases[n]=o}else this.phrases[n]=o})}tr(t,e={}){if(t==null)return"";typeof e=="number"?e={count:e}:e.count??(e.count=1);let n="";return this.phrases[t]?n=String(this.phrases[t]):(n=String(t??""),this.warn(`Missing translation for key: ${t}`)),n.includes(Dt)&&(n=this.pluralize(n,e.count)),n.includes("%")?this.interpolate(n,e):n}pluralize(t,e){let n=Ke(this.locale,e),o=t.split(Dt);return o.at(n)||o.at(-1)}interpolate(t,e={}){return String(t).replace(this.interpolateRegexp,(n,o)=>{var s;return(s=e[o])!=null?s:n})}};var Ye=(i,t=2,e=",",n=".")=>{let o,s;Number.isNaN(t=Math.abs(t))&&(t=2),o=`${parseInt(i=(+i||0).toFixed(t),10)}`,(s=o.length)>3?s%=3:s=0;let r=s?o.substr(0,s)+n:"",a=o.substr(s).replace(/(\d{3})(?=\d)/g,`$1${n}`),l=t?e+Math.abs(i-o).toFixed(t).replace(/-/,"0").slice(2):"";return r+a+l},Xe={dateFormat:{dateLiteral:"/",dateMask:"DD/MM/YYYY",firstDay:1,dateTimeLiteral:", ",hour12:!1,timeLiteral:":",timeMask:"HH:MM"},translation:{},_p:null,tr(i,t){return this._p||(this._p=new _t({locale:flexbe_cli.vars.page.language,phrases:this.translation})),this._p.tr(i,t)},parseMoney(i,t=2){i=String(i).replace(/,/g,".").replace(/ /g,"").replace(/(?!^)-/g,"").replace(/^\./g,"0.");let e=i.replace(/[^\d.]/g,""),n=((e.match(new RegExp(`\\.\\d{1,${t}}$`))||[])[0]||"").replace(/\D/g,""),o=e.replace(new RegExp(`\\.${n}$`),"");o=parseInt(o.replace(/[^\d-]/g,""),10)||0,parseInt(n,10)||(n="");let s=parseFloat(n?`${o}.${n}`:o);return/^-/.test(i)?-s:s},formatMoney(i,{currencyFormat:t=flexbe_cli.vars.site.currencyFormat,currencyData:e=flexbe_cli.vars.site.currencyData,freeLabel:n=!1,useNonBreakingSpace:o=!1}={}){if(i=parseFloat(i),!i&&n)return Xe.tr("cart::free_price");let s=t.str,r=t.d,a=Math.abs(i)>=1e4?t.t:"",l=t.d_force||parseInt(i,10)!==i?e.decimals:0,u=Ye(Math.abs(i),l,r,a),c=u;return s&&(c=s.replace(":value",u).replace(":symbol",e.symbol),o&&(c=c.replace(/\s/g," "))),i<0&&(c=`-${c}`),c.trim()},formatNumber(i,t,e=this.currencyFormat){let n=e.d,o=Math.abs(i)>=1e4?e.t:"";return t=t??(e.d_force||parseInt(i,10)!==i?this.currencyData.decimals:0),Ye(Math.abs(i),t,n,o)},animateNumber({target:i,from:t,to:e,asMoney:n,freeLabel:o=!0,duration:s,easing:r}){if(!i)return!1;let a=$(i);t==null&&(t=this.parseMoney(a.text())||"");let l=Math.abs(t-e);if(t===e)return;if(i._animation&&(i._animation.pause(),i._animation.reset()),n&&(!e||!t)||l<3||typeof anime!="function")a.text(n?this.formatMoney(e,{freeLabel:o}):e);else{let c={value:t};s==null&&(s=Math.max(150,Math.min(l*.3,650))),r==null&&(r="linear"),i._animation=anime({targets:c,value:e,duration:s,easing:r,update:()=>{let p=Math.floor(c.value),f=n?this.formatMoney(p,{freeLabel:o}):p;a.text(f)},complete:()=>{let p=n?this.formatMoney(e,{freeLabel:o}):e;a.text(p)}})}},...flexbe_cli.locale},M=Xe;var Fn=".js-hover",Qe="hover",ce={init(){this.adaptiveHoverInit(),this.initIosHacks(),this.initFontsHacks()},adaptiveHoverInit(){let i="touchstart.adaptive_hover_in";flexbe_cli.run.is_desktop&&(i=`${i} mouseenter.adaptive_hover_in`),$(document).on(i,Fn,t);function t(e){if(globalThis.accessabilityEnabled)return;let n=$(e.currentTarget),o=`adaptive_hover_out_${Math.floor(Math.random()*1e6)}`;n.addClass(Qe),flexbe_cli.run.is_desktop&&n.one(`mouseleave.${o}`,s),$(document).one(`touchend.${o}`,s);function s(){n.off(`.${o}`),$(document).off(`.${o}`),n.removeClass(Qe)}}},initIosHacks(i="body"){flexbe_cli.run.is_ios&&($("> *",i).off("click.iosHacks").on("click.iosHacks",()=>!0),$("a, [data-action-target]",i).off("click.iosHacks").on("click.iosHacks",()=>!0))},initFontsHacks(){if(!flexbe_cli.run.is_android)return;let i=getComputedStyle(document.documentElement),t=parseFloat(i.getPropertyValue("--1rem")),e=parseFloat(i.getPropertyValue("font-size")),n=t/e;n!==1&&!Number.isNaN(t)&&!Number.isNaN(n)&&document.documentElement.style.setProperty("--1rem",`${t*n}px`)}};var Ze={content:"",contentAsHTML:!0,theme:"dark",animation:"fall",animationDuration:[250,180],delay:[180,100],position:"top",autoClose:!0,hideOnClick:!1,interactive:!1,distance:3,maxWidth:350,IEmin:12,trigger:"custom",triggerOpen:{click:!1,touchstart:!1,mouseenter:!0},triggerClose:{click:!1,originClick:!1,mouseleave:!0,touchleave:!0}},Dn=async()=>{let i=flexbe_cli.vars,t=i.page.themeId,e=i.globals.versionId,n=()=>R(["/_s/lib/jquery/tooltipster/tooltipster.patched.min.js",`/_s/build/theme/${t}/_tooltipster.css?${e}`]);return document.readyState==="complete"?n():new Promise(o=>window.addEventListener("load",()=>n().then(o),{once:!0}))},Je={async init(i,t={}){var e,n;if(!i)return!1;await Dn();let o,s=$(i),r={...Ze,...t,content:(e=(n=t.content)!=null?n:s.attr("data-tip"))!=null?e:i.innerHTML};r.theme=`tooltipster-${(s.attr("data-theme")||r.theme||Ze.theme).replace("tooltipster-","")}`,r.maxWidth=parseInt(s.attr("data-width"),10)||r.maxWidth,r.position=s.attr("data-tip-position")||r.position;let a=r.content||"";if($.fn.tooltipster==null)return console.warn("Tooltipster is not loaded"),!1;try{o=s.tooltipster("instance")}catch{}if(!(!o&&!a))return o?(clearTimeout(o._contentTmt),a&&a!==o.content()?(o.content(a),o.enable()):a||this.destroy(i)):(i.tooltipstered=!0,s.tooltipster(r),o=s.tooltipster("instance"),o.on("created",()=>{s.attr("data-tooltipstered","true"),o._$tooltip.addClass("editor-ui")}),o.on("destroy",()=>{i.tooltipstered=!1,s.removeAttr("data-tooltipstered")}),o.on("ready",()=>{o.reposition()})),t.show&&o.open(),o},destroy(i){if(!i)return!1;let t,e=$(i);try{t=e.tooltipster("instance")}catch{}t&&(t.destroy(),i.tooltipstered=!1,e.removeAttr("data-tooltipstered"))}};var ti=!1,ue="f_cookies_allowed",de=class{constructor(){this.cookieApplied=!1,this.observer=null,this.params={show:0,consent_mode:"click",use_custom_warning_text:0,custom_warning_text:"",policy_uri:"",style:"right_bottom",show_decline_button:1,decline_button_text:"",button_text:"",link_text:"",use_policy:0}}init(){setTimeout(()=>requestAnimationFrame(()=>{this.params={...this.params,...flexbe_cli.vars.site.cookiesWarning||{}},!(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.theme_id===99||!this.params.show||localStorage.getItem(ue)||ti)&&this.createNotify()}),1e3)}createNotify(){let t=this.params,e=$("body"),n=P.viewportHeight/2,o="/\\r\\n|\\r|\\n/g",s=flexbe_cli.scroll.latest,r=0;ti=!0,+t.use_custom_warning_text&&t.custom_warning_text?this.content=t.custom_warning_text.replace(o,"
"):this.content=flexbe_cli.locale.tr(t.style==="center_compact"?"cookies::compact_text":"cookies::long_text");let a=t.button_text&&t.use_custom_warning_text?t.button_text.replace(o,"
"):flexbe_cli.locale.tr("cookies::button"),l=t.decline_button_text&&t.use_custom_warning_text?t.decline_button_text.replace(o,"
"):flexbe_cli.locale.tr("cookies::button_decline"),u=t.link_text?t.link_text.replace(o,"
"):flexbe_cli.locale.tr("cookies::button_link"),c=t.policy_uri?t.policy_uri.replace(o,"
"):"/legal/cookie-policy/",p=+t.use_policy?"show":"",f=t.consent_mode==="click"||t.style!=="center_compact",m=+t.show_decline_button&&t.consent_mode==="click",d=t.style==="center_long"?"is-dark":"is-light",h=m?`
${l}
`:"",g=f?`
${a}
`:"",_=t.style==="popup"?'
':"",y=t.consent_mode!=="click"&&["popup","right_bottom","center_compact"].includes(t.style)?`
`:"",A=$(`
${_}
${this.content} ${u}
${m||f?`
${h} ${g}
`:""} ${y}
`);e.find(".cookies-wrap").remove(),e.append(A),this.setupBodyObserver(e,A),t.style==="popup"&&flexbe_cli.scroll.scrollLock.lock();let v=()=>{let w=$(".cookies-wrap");w.removeClass("show"),e.removeClass("cookies-warning--show"),t.style==="popup"&&flexbe_cli.scroll.scrollLock.unlock(),this.observer&&(this.observer.disconnect(),this.observer=null),setTimeout(()=>{w.remove()},1e3)},j=()=>{localStorage.setItem(ue,"declined")},D=()=>{this.cookieApplied||(this.cookieApplied=!0,typeof window.applyCookies=="function"&&window.applyCookies(),localStorage.setItem(ue,"allowed"),document.removeEventListener("scroll",U),$(document).off("click.cookies"))},U=()=>{let w=Math.max(flexbe_cli.scroll.latest-s,s-flexbe_cli.scroll.latest);clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{s=flexbe_cli.scroll.latest,r+=w,r>=n&&D()},200)};t.consent_mode==="open"?D():t.consent_mode==="interaction"&&setTimeout(()=>{document.addEventListener("scroll",U,{passive:!0})},500),setTimeout(()=>{document.addEventListener("scroll",U,{passive:!0})},500),A.outerWidth(),A.addClass("show"),e.addClass("cookies-warning--show"),A.on("click.cookies",".cookies-button.primary, .cookies-close",()=>{v(),D()}),A.on("click.cookies",".cookies-button.decline",()=>{j(),v()}),t.consent_mode==="interaction"&&$(document).on("click.cookies","a, [data-component]",()=>D())}setupBodyObserver(t,e){this.observer=new MutationObserver(n=>{n.forEach(o=>{o.type==="childList"&&e.length&&e[0]!==t.children().last()[0]&&t.append(e)})}),this.observer.observe(t[0],{childList:!0})}},ei=new de;var ii=!1,nt,ni=i=>{if(!nt.size){ii=!1;return}requestAnimationFrame(ni),Array.from(nt).forEach(([t,e])=>{if(e.last>=i)return;let n=typeof e.fps=="function"?e.fps():e.fps;(!n||i-e.last>=1e3/n)&&(e.last=i,t(i))})};function oi(i,t=0){return nt||(nt=new Map),nt.set(i,{last:0,fps:t}),ii||requestAnimationFrame(ni),()=>{nt.delete(i)}}var fe,pe,si=!0,Rn=100,zn=200,qn=150,Z="position-fixed",Nn="position-sticky",he={map:[],createMap(){return $('[data-is="block"][data-fixed="true"]').toArray().map((t,e)=>{let n=$(t),o=n.attr("data-fixed-wrapper")||"self",s=n.attr("data-fixed-ignore-adaptive"),r=o==="self"?n:n.find(o),a=n.find(".fixed-area").eq(0);if(!a.length||!r.length)return null;let l=!!n.data("fixed-animation"),u=!!n.data("sticky"),c=a.closest("[data-static-contrast]").attr("data-static-contrast")||a.closest("[data-contrast]").attr("data-contrast"),p=a.closest("[data-fixed-contrast]").attr("data-fixed-contrast")||c,f=Math.round(r.outerHeight()),{top:m}=Lt(r[0])||{},d=m+f,h=f;return l&&(a.hasClass(Z)?h=Math.round(a.outerHeight()):(a.addClass(Z),h=Math.round(a.outerHeight()),a.removeClass(Z))),{index:e,$block:n,$wrap:r,$fixed:a,top:m,bottom:d,height:f,heightFixed:h,contrastStatic:c,contrastFixed:p,isSticky:u,ignoreAdaptive:s,hasFixedAnimation:l,isFixed:!1,isReplaced:!1}}).filter(t=>{if(!t)return!1;let e=flexbe_cli.resize.responsiveMode,n=t.$block.attr("data-hidden");return!(e===n||e==="mobile"&&t.ignoreAdaptive)})},modifyMap(i,t){let e=0,n=0;return i.forEach((o,s)=>{let r=s&&i[s-1],a=Math.max(0,(r?.bottom||0)-o.top),l=t+e-a;o.isFixed=o.hasFixedAnimation?l>o.bottom+Rn:l>o.top,o.fixOffset=e-a,o.isSticky&&o.isFixed&&(e+=o.heightFixed-a),o.isFixed&&(n+=o.heightFixed),o.replaceOffset=0,r&&!r.isSticky&&t+r.fixOffset+r.heightFixed>o.top&&(r.replaceOffset=Math.min(r.fixOffset+r.heightFixed,t+r.fixOffset+r.heightFixed-o.top))}),{allFixedHeight:n}},applyMap(i,t){let e=!i.applied&&!si;i.forEach(n=>{let o=n.$fixed[0].isFixed,s=n.isFixed,r=n.isSticky;if(flexbe_cli.run.is_preview||(s=!1,r=!1),o!==s||e)if(n.$fixed[0].isFixed=s,n.$fixed.toggleClass(Nn,s&&r),n.contrastStatic&&n.contrastStatic!==n.contrastFixed&&n.$fixed.attr("data-contrast",s?n.contrastFixed:n.contrastStatic),n.hasFixedAnimation)if(clearTimeout(n._fixedAnimationBouncer),s)n.$wrap.css("height",`${n.height}px`),n.$fixed.removeClass("fade-out"),!n.replaceOffset&&!n.$fixed.hasClass(Z)&&(n.$fixed.addClass(`${Z} fade-in`),n._fixedAnimationBouncer=setTimeout(()=>{n.$fixed.removeClass("fade-in")},zn));else{let a=t>n.height;n.$fixed.removeClass("fade-in"),!n.replaceOffset&&i.applied&&a&&n.$fixed.addClass("fade-out"),n._fixedAnimationBouncer=setTimeout(()=>{n.$wrap.css("height",""),n.$fixed.removeClass(`${Z} fade-out`)},a?qn:0)}else n.$wrap.css("height",s?`${n.height}px`:""),n.$fixed.toggleClass(Z,s);if(s?(n.$fixed[0].style.setProperty("top",`${n.fixOffset}px`,"important"),n.$fixed[0].style.setProperty("transform",n.replaceOffset?`translateY(-${n.replaceOffset}px)`:"none","important")):(n.$fixed[0].style.removeProperty("top"),n.$fixed[0].style.removeProperty("transform")),o!==s){let a=n.$block[0]._core;a&&a.updateTween({fixed:s})}}),si=!1,i.applied=!0,this.map=i},getAllFixedHeight(i){let{allFixedHeight:t}=this.modifyMap($.extend([],this.map||[]),i);return t},initFixed(){let i=this.createMap();pe=null,fe&&fe(),i.length&&(fe=oi(()=>{let t=window.scrollY;pe!==t&&(pe=t,this.modifyMap(i,t),this.applyMap(i,t))},i.length>1?90:30))},init(){new ResizeObserver(()=>{this.initFixed()}).observe(document.body)}};var ge=new WeakMap,me=new WeakMap;function ri(i,t,e){ge.set(i,setTimeout(()=>{ge.delete(i),e&&e()},t))}function ot(i,t,e=80){let n=typeof i=="object"?i:document.querySelector(`[data-id="${i}"]`),o=n?._core;if(o){if(ge.get(o)){me.set(o,!0);return}o.updateTween({force:t}),ri(o,e,()=>{me.get(o)&&(me.set(o,!1),o.updateTween({force:t}),ri(o,e))})}}var ai=(i,t=0)=>(...e)=>new Promise(n=>{setTimeout(()=>n(i(...e)),t)}),st=(i,t=0)=>flexbe_cli.is_admin?i:ai(i,t),k=(i,t=0,...e)=>ai(i,t)(...e),rt=(i,t=0,...e)=>st(i,t)(...e),bt=(i,t=1)=>Array.from({length:Math.ceil(i.length/t)},(e,n)=>i.slice(n*t,n*t+t));var _e=class{constructor(t,e={}){this.components=null,this.inited=!1,this.updated=!1,this.loaded=!1,this.ready=!1,this.isPure=!1,this.isVisible=null,this.inScreen=!1,this.inBeside=!1,this.inView=!1,this.inFocus=!1,this.wasVisible=null,this.wasScreen=!1,this.wasBeside=!1,this.wasView=!1,this.wasFocus=!1,this.$area=void 0,this.area=void 0,this.$content=void 0,this.content=void 0,this.$root=void 0,this.root=void 0,this.is=void 0,this.id=void 0,this.template_id=void 0,this.tween=void 0,this.type=void 0;let n=$(t),o=n.attr("data-is"),s=n.attr("data-id"),r=o==="zone"?"e":o[0],a=n.attr(`data-${r}-id`);this.$area=n,this.area=n[0],this.$content=n,this.content=this.$content[0],this.$root=n,this.root=n[0],this.is=o,this.id=s,this.template_id=a,this.tween={},this.type=JSON.parse(n.attr(`${r}-type`)||"[]"),Object.keys(e).forEach(l=>{let u=Object.getOwnPropertyDescriptor(e,l);if("value"in u){let c=e[l];typeof c=="object"?this[l]=$.extend(!0,Array.isArray(c)?[]:{},c):this[l]=c}else Object.defineProperty(this,l,u)}),["_onVisible","_onBeside","_onFocus","_onScreen","_onView","_onResize","_onOpen","_onClose","_sendEvent"].forEach(l=>{this[l]=this[l].bind(this)})}onInit(t){}onUpdate(t){}onLoad(t){}onDestroy(t){}onVisible(t){}onBeside(t){}onFocus(t){}onScreen(t){}onView(t){}onResize(t){}onOpen(t){}onClose(t){}onMsg(t,e){}init(t="init",e={}){this.components=(this.components||[]).filter(n=>n&&typeof n=="function"),t==="init"?this._onInit(e):t==="update"&&this._onUpdate(e),this._inheritEvents(),(t==="init"||t==="update"&&e.templateRendered)&&this._onLoad(e)}_inheritEvents(){"onHideShowUI"in this&&(flexbe_cli.events.off(`hideShowUI.core_${this.id}`),flexbe_cli.events.on(`hideShowUI.core_${this.id}`,t=>{var e;return(e=this.onHideShowUI)==null?void 0:e.call(this,t)}))}_sendEvent(t,e){let n=new CustomEvent(t,{detail:e});this.area.dispatchEvent(n)}_onInit(t){this.inited=!0,this.onInit(t),this._sendEvent("init",t),requestAnimationFrame(()=>this.updateTween())}_onUpdate(t){this.inited=!0,this.onUpdate(t),this._sendEvent("update",t),this.updateTween({force:!0})}_onLoad(t){this.loaded=!0,this.onLoad(t),this._sendEvent("load",t)}_onResize(t={}){this.isVisible&&(this.onResize(t),this._sendEvent("resize",t))}_onDestroy(t){this.$area.off(".inherit"),this.onDestroy(t),this._sendEvent("destroy",t)}_onMsg(t,e){this.onMsg(t,e)}_onVisible({state:t,force:e}){if(this.isVisible==null){this.isVisible=t,this.wasVisible=t;return}if(this.isVisible===t&&!e)return;let n=t?!this.wasVisible:void 0,o=n==null?{state:t}:{state:t,first:n};this.isVisible=t,this.onVisible(o),this._sendEvent("visible",o),t&&(this.wasVisible=!0)}_onFocus({state:t,force:e}){if(this.isVisible||(t=!1),this.inFocus===t&&!e)return;let n=t?!this.wasFocus:void 0,o=n==null?{state:t}:{state:t,first:n};this.inFocus=t,this.onFocus(o),this._sendEvent("focused",o),t&&(this.wasFocus=!0)}_onScreen({state:t,force:e}){if(this.isVisible||(t=!1),this.inScreen===t&&!e)return;let n=t?!this.wasScreen:void 0,o=n==null?{state:t}:{state:t,first:n};this.inScreen=t,this.onScreen(o),this._sendEvent("screen",o),t&&(this.wasScreen=!0)}_onView({state:t,force:e}){if(this.isVisible||(t=!1),this.inView===t&&!e)return;let n=t?!this.wasView:void 0,o=n==null?{state:t}:{state:t,first:n};this.inView=t,this.is==="block"&&n&&requestAnimationFrame(()=>{Ft.startTransitions(this.$area)}),this.onView(o),this._sendEvent("view",o),t&&(this.wasView=!0)}_onBeside({state:t,force:e}){if(this.isVisible||(t=!1),this.inBeside===t&&!e)return;let n=t?!this.wasBeside:void 0,o=n==null?{state:t}:{state:t,first:n};this.inBeside=t,this.onBeside(o),this._sendEvent("beside",o),t&&(this.wasBeside=!0)}updateTween(t={}){}_onOpen(t){this.updateTween(),this.onOpen(t),this._sendEvent("open",t)}_onClose(t){this.updateTween(),this.onClose(),this._sendEvent("close",t)}},G=_e;var Vn=()=>!(flexbe_cli.is_admin&&(window.parent.flexbe.modal.visible||[]).length),L={opened:new Map,$list:$(".modal-list"),init(){let i=new URLSearchParams(location.search).get("m_id");if(flexbe_cli.vars.globals.isScreenshot&&i)return this.$list.addClass("noanimate"),this.open({id:i}),!1;this.dispatchEvents()},dispatchEvents(){let i=$("body");i.on("bringIntoView.core-modal",".m_modal",s=>{let r=s.currentTarget.dataset.id;r&&this.open({id:r})}),flexbe_cli.events.on("ui_modal_open.core_modal",(s={})=>{this.open(s)}),flexbe_cli.events.on("ui_modal_close.core_modal",(s={})=>{this.close(s)}),i.on("click.modal-close",".m_modal .close",s=>{s.preventDefault();let a=$(s.currentTarget).closest(".m_modal.show").attr("data-id");this.close({id:a})});let t,e,n,o={x:0,y:0};i.off(".modal-close-overlay"),i.on("click.modal-close-clickout",".container-list",()=>{!flexbe_cli.run.is_preview||!this.opened.size||this.opened.forEach((s,r)=>{let{modal:a}=this.find(r)||{};a!=null&&a.hasAttribute("data-clickout")&&this.close({id:a.id})})}),i.on("pointerdown.modal-close-overlay pointerup.modal-close-overlay","[data-overlay]",s=>{if(!(!flexbe_cli.run.is_preview||!this.opened.size))if(s.type==="pointerdown"){let r=document.body.getBoundingClientRect();n=s.target===s.currentTarget||$(s.target).is(".modal-data")?s.target:null,o={x:s.pageX,y:s.pageY},t=s.target.clientWidth<=s.pageX,e=r.left>o.x||r.right{this.close({id:$(n).closest(".m_modal").attr("data-id")})},50)}),$(window).off(".modal-close-esc").on("keyup.modal-close-esc",s=>{if(flexbe_cli.run.is_preview&&s.which===27&&Vn()&&this.opened.size){let r=[...this.opened.keys()].at(-1);this.close({id:r})}})},find(i){if(this.$list==null||!this.$list.length)return!1;let t=this.$list.find(`[data-id="${i}"]`);t.length||(t=this.$list.find(`._anchor[name="${i}"]`).closest(".m_modal"));let e=t.toArray(),n=e[0];return n?{modals:e,modal:n}:null},open({id:i,data:t={},options:e={}}={}){let{modal:n}=this.find(i)||{};if(!n)return console.warn("Modal not found",i),!1;let o=at.bind(n);if(!o)return console.warn("Modal without core object,",`id: ${i},`,"modal: ",n),!1;let s=[...this.opened.keys()].at(-1);return!e.rise&&s&&s!=i&&this.close({id:s,openId:i}),this.opened.has(i)||(this.opened.set(i,{fromId:s,data:t,options:e}),o.open({fromId:s,data:t,options:e})),o.$area.css("zIndex",this.opened.size),!0},close({id:i,openId:t}={}){if(!i)return this.opened.forEach((o,s)=>{s!==t&&this.close({id:s,openId:t})});if(!this.opened.has(i))return!1;let{modal:e}=this.find(i)||{};if(!e)return;let n=at.bind(e);return n?(n.close({openId:t}),n.$area.css("zIndex",""),this.opened.delete(i),!0):(console.warn("Modal doesnt have core object"),!1)}};var be=class extends G{constructor(t,e){super(t,e),this.is="modal",this.isOpen=!1,this.$modal=this.$area}_onInit(t){super._onInit(t),flexbe_cli.is_admin&&L.opened.has(this.id)&&this.open(L.opened.get(this.id))}open({fromId:t,data:e,options:n={}}={}){var o,s;if(this.isOpen)return;this.isOpen=!0,this.lastOptions=n,this.lastScroll=z.latest;let r=this.$area.find(".modal-data > ._anchor").attr("name")||this.id;(n.hash||n.hash==null)&&(this._prevHash=window.location.hash,flexbe_cli.lockPopstate=!0,window.history.pushState(null,null,`#${r}`),flexbe_cli.lockPopstate=!1),this.$area.removeClass("noanimate"),this.$area.addClass("show animation-forwards"),L.$list.addClass("show"),$("body").addClass("is-modal-open"),$('[data-w-id="CART"].show, .w_widget.show').length&&L.$list.addClass("rise");let a=this.$modal.find(".component-button").eq(0),l=(o=(s=a.offset())==null?void 0:s.top)!=null?o:0;!flexbe_cli.run.is_screen_mobile&&flexbe_cli.run.is_preview&&flexbe_cli.resize.viewportHeight>l+100&&a.focus(),setTimeout(()=>{this.$area.hasClass("pointerless")||z.scrollLock.lock(),L.$list.addClass("overlay"),this._onOpen({data:e}),this._onBeside({state:!0}),this._onScreen({state:!0}),this._onView({state:!0}),this._onFocus({state:!0}),typeof n.onOpen=="function"&&n.onOpen()},30),b.trigger("modal_opened",{id:this.id,fromId:t,data:e,options:n})}close({openId:t}={}){if(!this.isOpen)return;let e=this.lastOptions,n=!t&&!this.$area.siblings(".show").length;if(this.lastOptions={},this.isOpen=!1,(e.hash||e.hash==null)&&n&&/^#{1,2}/.test(window.location.hash)){let s=!this._prevHash||this._prevHash===window.location.hash?window.location.pathname:this._prevHash;flexbe_cli.lockPopstate=!0,window.history.replaceState(null,null,s),flexbe_cli.lockPopstate=!1}this.$area.removeClass("animation-forwards").addClass("noanimate");let o=parseInt(this.$area.css("--animationDuration"),10)||450;this.$area.removeClass("show noanimate").addClass("hide animation-backwards"),setTimeout(()=>{this.$area.removeClass("show hide animation-backwards"),n&&(L.$list.removeClass("show rise overlay fade-out"),window.location.hash!=="#cart"&&!this.$area.hasClass("pointerless")&&z.scrollLock.unlock(),$("body").removeClass("is-modal-open")),flexbe_cli.run.is_screen_mobile&&$("body, html").scrollTop(this.lastScroll)},flexbe_cli.is_admin?0:o),this._onClose(),this._onBeside({state:!1}),this._onScreen({state:!1}),this._onView({state:!1}),this._onFocus({state:!1}),typeof e.onClose=="function"&&e.onClose(this),b.trigger("modal_closed",{id:this.id,openId:t})}updateTween({force:t}={}){if(!this.inited)return!1;let e=this.area,n=e.offsetWidth,o=e.offsetHeight,s=this.tween.width==null&&this.tween.height==null,r=t||n!==this.tween.width||o!==this.tween.height,a=this.isOpen;return this.tween.width=n,this.tween.height=o,this._onVisible({force:t,state:a}),rt(()=>{!s&&r&&this._onResize({force:t}),this._onBeside({force:t,state:a}),this._onScreen({force:t,state:a}),this._onView({force:t,state:a}),this._onFocus({force:t,state:a})}),rt(this._sendEvent,0,"tween",{tween:this.tween,force:t}),r}},li=be;var ve=class extends G{constructor(t,e){super(t,e),this.is="widget",this.$widget=this.$area}updateTween({force:t}={}){if(!this.inited)return!1;let e=this.area,n=e.offsetWidth,o=e.offsetHeight,s;this.isOpen!=null?s=!!this.isOpen:s=!!(n||o);let r=this.tween.width==null&&this.tween.height==null,a=!!t||n!==this.tween.width||o!==this.tween.height;return a&&(this.tween.width=n,this.tween.height=o),this._onVisible({force:t,state:s}),rt(()=>{!r&&a&&this._onResize({force:t}),this._onBeside({force:t,state:s}),this._onScreen({force:t,state:s}),this._onView({force:t,state:s}),this._onFocus({force:t,state:s})}),rt(this._sendEvent,0,"tween",{tween:this.tween,force:t}),a}},ci=ve;var ye=class extends G{constructor(t,e){super(t,e),this.is="block",this.$block=this.$area,this.$content=this.$area.find("> .container-fluid").addBack().last(),this.content=this.$content[0],this.abtestVariant=this.$area.attr("data-abtest-variant"),this.abtestId=this.abtestVariant&&this.$area.attr("data-abtest-id")}_onUpdate(t){this.$content=this.$area.find("> .container-fluid").addBack().last(),this.content=this.$content[0],super._onUpdate(t)}updateTween({force:t=!1,fixed:e=!1}={}){if(!this.inited)return!1;let n=this.area,o=0,s=n.offsetWidth,r=n.offsetHeight;for(;n;)o+=n.offsetTop,n=n.offsetParent;let a=o+r,l=!!(s||r),u=this.tween.width==null&&this.tween.height==null,c=t||s!==this.tween.width||r!==this.tween.height,p=y(),f=A(),m=v();this.tween.start=o,this.tween.end=a,this.tween.width=s,this.tween.height=r,this.tween.position=p,this.tween.positionAbs=f,this.tween.positionCenter=m;let d=l&&m>0&&m<1,h=d||D(),g=h||j(),_=g||U();return this._onVisible({state:l}),!u&&c&&this._onResize({force:t}),this._onBeside({force:t,state:_}),this._onScreen({force:t,state:g}),this._onView({force:t,state:h}),this._onFocus({force:t,state:d}),this._sendEvent("tween",{tween:this.tween,force:t}),c;function y(){return 1/(r||1)*(flexbe_cli.scroll.latest-o)}function A(){let w=o-flexbe_cli.resize.clientHeight;return 1/(a-w)*(flexbe_cli.scroll.latest-w)}function v(){let w=r||1,tt=flexbe_cli.scroll.latest+flexbe_cli.resize.clientHeight/2,Di=o+w/2;return(tt-Di+w/2)/w}function j(){return e?!0:f>=0&&f<=1}function D(){if(e)return!0;let w=Math.min(r/3,flexbe_cli.resize.clientHeight/4);return flexbe_cli.scroll.latest+flexbe_cli.resize.clientHeight>=o+w&&flexbe_cli.scroll.latest<=a-w}function U(){if(e)return!0;let w=Math.max(r/2,flexbe_cli.resize.clientHeight/3);return flexbe_cli.scroll.latest+flexbe_cli.resize.clientHeight>o-w&&flexbe_cli.scroll.latest .element-content").addBack().last(),this.content=this.$content[0],this.$root=this.$area.closest(".b_block, .m_modal, .w_widget"),this.root=this.$root[0];let o=flexbe_cli.entity.closestEntity(this.area.parentNode);o?(this.$parent=o.$area,this.parent=o.area):(this.$parent=this.$area.parents("[data-is]").eq(0),this.parent=this.$parent[0],console.warn("Parent core instance not created for element",this.area))}_onUpdate(t){this.$area.off(`.inherit.${this.id}`),this.$content=this.$area.find("> .element-content").addBack().last(),this.content=this.$content[0],super._onUpdate(t)}_onDestroy(t){super._onDestroy(t),this.$area.off(".inherit"),this.$parent.off(`.inherit.${this.id}`)}_inheritEvents(){let t=`.inherit.${this.id}.${this.isClone?`clone${Number(this.isClone)}`:"original"}`;super._inheritEvents(),this.$parent.off(t),this.$parent.on(`tween${t}`,e=>{this.updateTween(e.detail||{})}),["visible"].forEach(e=>{this.$parent.on(`${e}${t}`,()=>{this.updateTween({})})}),["_onOpen","_onClose","_onDestroy"].forEach(e=>{let n=`${e.replace("_on","").toLowerCase()}${t}`;this.$parent.on(n,(o,...s)=>{!s.length&&o.detail&&(s[0]=o.detail),this[e](...s)})})}updateTween({force:t}={}){let e=this.content||this.area,n=this.parent&&this.parent._core,o=this.root&&this.root._core;if(!n||!this.inited)return;let s=this.tween.width==null&&this.tween.height==null,r=n.isVisible,a=n.inBeside,l=a,u=l,c=l,p=!1;if(!(s&&n.isVisible&&!a)){if(r&&a){let f=e.offsetWidth,m=e.offsetHeight,d=flexbe_cli.resize.clientHeight;if(r=!!(f||m),p=t||f!==this.tween.width||m!==this.tween.height,this.tween.width=f,this.tween.height=m,r&&o&&o.is==="block"){let{top:h,bottom:g}=e.getBoundingClientRect();a=g>-(d/3)&&h0&&h=d/2;let _=Math.min(m/3,flexbe_cli.resize.clientHeight/4);u=c||l&&u&&h+_>0&&g-_{let[e,...n]=t.split(".");return[Hn[e]||e,...n,"publicApi"].join(".")}).join(" ")}var V=Ae("instances"),J=Ae("core"),vt=Ae("callbacks"),lt=class i{static create(t){return N(i,V)[V][t.id]&&N(i,V)[V][t.id].destroy(),N(i,V)[V][t.id]=new i(t),N(i,V)[V][t.id]}get size(){return{width:N(this,J)[J].tween.width,height:N(this,J)[J].tween.height}}constructor(t){Object.defineProperty(this,J,{writable:!0,value:void 0}),Object.defineProperty(this,vt,{writable:!0,value:new Map}),N(this,J)[J]=t;let e=jn.reduce((n,o)=>{let s={...n};return s[o]={enumerable:!0,get(){return t[o]}},s},{});Object.defineProperties(this,e)}trigger(t,e){if(!t||typeof t!="string")return this;let n=new CustomEvent(t,{detail:e});return this.area.dispatchEvent(n),this}on(t,e){if(!t||typeof t!="string"||typeof e!="function")return this;let n=di(t),o=s=>e.call(this,s.detail||s.originalEvent,s.originalEvent||s);return $(this.area).on(`${n}`,o),N(this,vt)[vt].set(e,o),this}off(t,e){let n=di(t);return typeof e=="function"?$(this.area).off(n,N(this,vt)[vt].get(e)):$(this.area).off(n),this}destroy(){$(this.area).off(".publicApi")}};Object.defineProperty(lt,V,{writable:!0,value:{}});var fi={block:ui,modal:li,widget:ci,element:xe,zone:xe},pi={block:"data-b-id",modal:"data-m-id",widget:"data-w-id",zone:"data-e-id",element:"data-e-id",default:"data-t-id"},Wn=["beside","screen","focus","visible"],hi=new Map,mi=new WeakMap;function gi(i){let t="[data-is]",e=$(i);return[...e.filter(t).toArray(),...e.find(t).toArray()]}var at={async init(){this._dispatchEvents(),await Promise.all([this.initArea($(".w_widget")),this.initArea(flexbe_cli.block.$list)]),await this.initArea(flexbe_cli.modal.$list)},async initArea(i,t={}){Be(i);let e=gi(i),n=await Promise.all(bt(e,200).map(st(s=>s.map(r=>this.bind(r,t))))),o=(await Promise.all(n.flat())).filter(Boolean);return await Promise.all(o.map(s=>s.loaded||new Promise(r=>s.area.addEventListener("load",r,{once:!0})))),flexbe_cli.components.initInArea(i,t.templateRendered?"update":"init"),o},destroyArea(i,t={}){gi(i).forEach(n=>{let o=n._core;o&&o._onDestroy(t)}),flexbe_cli.components.destroyInArea(i)},setClientJs(i,t,e){var n;hi.set(`${i}:${t}`,e),(n=e.components)==null||n.forEach(o=>{flexbe_cli.components.registerComponent(o)})},getClientJs(i,t){return i==="zone"&&(i="element"),hi.get(`${i}:${t}`)},bind(i,t={},e=!1){if(!i||!i.getAttribute)return null;let n=i.getAttribute("data-is");n=n==="zone"?"element":n;let o=i.getAttribute(pi[n]||pi.default);if(!o||!(n in fi))return null;let s=!i._core||!i._core.inited,r=!s&&(t.templateRendered||t.styleRendered),a=this.getClientJs(n,o)||{};if(a.isPure&&!e&&!i._core)return null;let l=i._core||new fi[n](i,a);return i._core=l,l&&(s||r)&&l.init(r?"update":"init",t),l},closestEntity(i,t=!1){let e;for(;i&&!e;){var n;if(i=(n=i)==null?void 0:n.closest("[data-id]"),!i||(e=this.bind(i,{},t),e))break;i=i.parentNode}return e},_dispatchEvents(){flexbe_cli.events.off(".core_entity"),flexbe_cli.events.on("forceUpdateTween.core_entity",(i,t)=>{ot(i,t)}),flexbe_cli.is_admin&&(flexbe_cli.events.on("layout_change.core_entity",i=>{i.action==="before_remove"&&this.destroyArea($(`[data-id="${i.id}"]`),i)}),flexbe_cli.events.on("entity_before_render.core_entity",async(i={})=>{i.templateRendered&&this.destroyArea($(`[data-id="${i.id}"]`),i)}),flexbe_cli.events.on("entity_render.core_entity",async i=>{let t=document.querySelector(`[data-id="${i.id}"]`);t&&await this.initArea(t,i)}),flexbe_cli.events.on("client_msg.core_entity",i=>{if(!i||!i.id||!i.is)return;let t=document.querySelector(`[data-id="${i.id}"]`);t!=null&&t._core&&t._core._onMsg(i.msg,i.data)}))},createPublicAPI(i){let t,e=()=>(t||(t=document.querySelector(`[data-id="${i}"]`)),t),n=a=>{let l=this.closestEntity(a,!0);if(!l)return null;let u=mi.get(l);return u?u.destroy():(u=lt.create(l),mi.set(l,u)),u},s={require:R,subscribe:(a,l,u)=>{let c=e();Wn.includes(a)&&n(c);let p=new AbortController,f=()=>p.abort(),m=d=>{var h;if(!d.currentTarget.contains(d.target))return;d.stopPropagation();let g=(h=d.detail.state)==null||h?"in":"out";(!u.state||u.state==="all"||u.state===g)&&(l(d),u.once&&f())};return c.addEventListener(a,m,{signal:p.signal}),f},sectionApi:null,modalApi:null,widgetApi:null,elementApi:null,isEditor:flexbe_cli.is_admin,isView:!flexbe_cli.is_admin},r={get(a,l,u){let c=e();return l==="elementApi"?n(c):l==="sectionApi"?n(c.closest(".b_block")):l==="modalApi"?n(c.closest(".m_modal")):l==="widgetApi"?n(c.closest(".w_widget")):Reflect.get(a,l,u)}};return new Proxy(s,r)}};var $e={$list:$(".container-list").eq(0),$blocks:$(".b_block"),init(){this.dispatchEvents()},dispatchEvents(){let i=()=>{this.$blocks.each((t,e)=>ot(e,!1))};$(window).on("resized.flexbe_block",$.debounce(()=>i(),20)),$(document).on("documentresized.flexbe_block",$.debounce(()=>i(),20)),window.addEventListener("scroll",$.throttle(()=>{this.$blocks.each((t,e)=>ot(e,!1))},16*6),{passive:!0}),flexbe_cli.is_admin&&flexbe_cli.events.off("layout_change.flexbe_block").on("layout_change.flexbe_block",t=>{!t||t.is!=="block"||(this.$blocks=$(".b_block"),this.$blocks.each((e,n)=>ot(n,!1)))})}};var Gn=i=>typeof i=="string"?new Date(i.slice(0,19).replace("T"," ")):i,_i=({date:i,timezone:t,format:e="date"})=>{if(!i||!t)return null;let n=new Date(Gn(i)),o=new Date,s=new Date(o.toLocaleString("en-US",{timeZone:t}));o.setMilliseconds(0),s.setMilliseconds(0);let r=o.getTime()-s.getTime(),a=n.getTime()-r;return e==="milliseconds"?a:new Date(a)};var bi=(i,t,e)=>!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length?!1:t.every((n,o)=>i?e.includes(n):e[o]===n);var sr=bi.bind(null,!0),rr=bi.bind(null,!1);var vr=Object.freeze({value:"fill",title:"FILL",auto:!0,selectValue:"fill"}),yr=Object.freeze({value:"auto",title:"AUTO",auto:!0,selectValue:"auto"}),wr=Object.freeze({value:"auto",title:"HUG",auto:!0,selectValue:"auto"}),xr=Object.freeze({value:"px",title:"PX",step:1,altStep:5}),Ar=Object.freeze({value:"pt",title:"PT",step:1,altStep:.1}),$r=Object.freeze({value:"em",title:"EM",step:.1,altStep:.01}),Er=Object.freeze({value:"rem",title:"REM",step:.1,altStep:.01}),Sr=Object.freeze({value:"vh",title:"VH",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vh_tip")}),kr=Object.freeze({value:"vw",title:"VW",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vw_tip")}),Ir=Object.freeze({value:"cqw",title:"CQW",step:1,altStep:.1}),Cr=Object.freeze({value:"cqw",title:"CQH",step:1,altStep:.1}),Tr=Object.freeze({value:"ch",title:"CH",step:1,altStep:5,tip:typeof tr=="function"&&tr("editor::units::ch_tip")}),Pr=Object.freeze({value:"%",title:"%",step:1,altStep:.1});function Ee(i,t={}){return i?Yn(i,t.type||"click",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget}):!1}function Yn(i,t,e={}){let n,o="",s={click:"MouseEvent",dblclick:"MouseEvent",mousedown:"MouseEvent",mouseup:"MouseEvent",mouseover:"MouseEvent",mousemove:"MouseEvent",mouseout:"MouseEvent",mouseenter:"MouseEvent",mouseleave:"MouseEvent",contextmenu:"MouseEvent",keydown:"KeyboardEvent",keyup:"KeyboardEvent",keypress:"KeyboardEvent",focus:"FocusEvent",blur:"FocusEvent",focusin:"FocusEvent",focusout:"FocusEvent",input:"InputEvent",change:"Event",submit:"Event",reset:"Event",touchstart:"TouchEvent",touchmove:"TouchEvent",touchend:"TouchEvent",touchcancel:"TouchEvent",scroll:"UIEvent",resize:"UIEvent",select:"UIEvent",wheel:"WheelEvent",drag:"DragEvent",dragstart:"DragEvent",dragend:"DragEvent",dragenter:"DragEvent",dragover:"DragEvent",dragleave:"DragEvent",drop:"DragEvent",copy:"ClipboardEvent",cut:"ClipboardEvent",paste:"ClipboardEvent",custom:"CustomEvent"};switch(o=s[t]||s.custom,o){case"MouseEvent":n=new MouseEvent(t,e);break;case"KeyboardEvent":n=new KeyboardEvent(t,e);break;case"FocusEvent":n=new FocusEvent(t,e);break;case"TouchEvent":n=new TouchEvent(t,e);break;case"UIEvent":n=new UIEvent(t,e);break;case"WheelEvent":n=new WheelEvent(t,e);break;case"InputEvent":n=new InputEvent(t,e);break;case"DragEvent":n=new DragEvent(t,e);break;case"ClipboardEvent":n=new ClipboardEvent(t,e);break;case"CustomEvent":n=new CustomEvent(t,e);break;default:n=new Event(t,e)}return i.dispatchEvent(n)}function yi(i,t=!1){let e=$(i),n=t?{}:e.data("product");if(n===!1)return!1;if(n||(n=$(i).closest("[data-product-item]").find("[data-product-action]").data("product")),(n==null||typeof n!="object"||Array.isArray(n))&&(n={img:e.attr("data-product-image"),title:e.attr("data-product-name"),price:e.attr("data-product-price"),count:e.attr("data-product-count"),productId:e.attr("data-product-id"),variantId:e.attr("data-variant-id")}),typeof n=="object"&&!n.strict){let s;if(flexbe_cli.theme_id===4?(s=e.closest(".content-zone, .flexbe-card, .flexbe-column, .modal-content"),s.length||(s=e.parents("[data-item-id]").last())):s=e.closest("[data-item-id], .modal-data").eq(0),n={...n},n.count||(n.count=1),t||!n.img){let r=a=>{let l=a.find("[data-img-id]").eq(0),u=l.attr("data-img-id"),c=l.attr("data-img-ext"),p=c?null:l.attr("data-img-name");return u?{id:u,ext:c,name:p}:null};n.img=r(s)||r(s.closest(".flexbe-row"))}if(t||!n.title){var o;let r=s.find(".name, .title, .item-title, .text_title, .element-text--title, .text-style-h1, .text-style-h2, .text-style-h3, .text-style-h4, .text-style-title, .text-style-subtitle").not(".text-rotator").eq(0);r.length||(r=s.find('[class*="font-family-"]').eq(0)),n.title=((o=r[0])==null?void 0:o.innerText.trim())||""}if(t||!n.price&&n.price!==0){let r=a=>{let l=a.clone();flexbe_cli.is_admin&&l.find('[class*="editor-"]').remove(),l.find(".text-rotator").remove(),l.find(".component-image").remove(),l.find("del, s, strike").remove();let u=String(l[0]&&l[0].innerText||"").replace(/\n/g,"
").replace(/\.$/,"").replace(/\u00a0/g," "),c=u.match(/(?:\d?\D{0,2} ?)?[1-9](?:[ ,.]?\d{0,3}){2}(?:[,.]\d{1,2})?(?: ?\D)?/g)||[];return u=c.find(p=>p.includes(flexbe_cli.vars.site.currencyData.symbol))||c[0]||"",u=(u.match(/([\d\s]+[ ,.]\d+|[\d\s]+)/g)||[])[0],u?(u=M.parseMoney(u),u):null};n.price=r(e.closest(".element-item").find(".price, .item-price, .main-price, .element-text--price").eq(0))||r(e)||r(s.find(".price, .item-price, .main-price, .element-text--price").eq(0))||r(s)}}if(!n.id)if(n.productId){let s=flexbe_cli.ecommerce.productsStore.getProduct(n.productId);if(s){let a=s.currentVariant(n.variantId||"default").getCartData("image");n.id=`product_${n.productId}:${n.variantId||"default"}`,a.img=Ht(a.img[0]),n={...n,...a}}else n={}}else{let s=flexbe_cli.p_id,r=e.parents("[data-id], [data-item-id], [data-multivar]").toArray().map(l=>{let u=l.getAttribute("data-id")||l.getAttribute("data-item-id")||"",c=l.getAttribute("data-multivar")||"";return u+c}).join(":"),a=flexbe_cli.helpers.hashCode(n.title+n.price);n.id=`${s}_${r||0}:${a}`}return{type:n.productId?"product":"custom",...n}}var vi=i=>typeof i=="string"?new Date(i.slice(0,19).replace("T"," ")):i,Se=({dateFrom:i,dateTo:t,timezone:e=(n=>(n=flexbe)==null||(n=n.vars)==null||(n=n.project)==null?void 0:n.timezone)()})=>{let n=_i({date:new Date,timezone:e,format:"milliseconds"}),o=new Date(vi(i)).getTime(),s=new Date(vi(t)).getTime();return!(i&&o>n||t&&se&&+e.count)}catch(e){console.error(e)}this.dispatch("updateList",t)}getList(){return I}getItem(t){return I.find(e=>e.id===t)}getCount(){return I.reduce((t,e)=>t+e.count,0)}getTotal(){return I.reduce((t,e)=>(e.count&&e.price&&(t+=parseInt(String(e.count),10)*parseFloat(String(e.price))),t),0)}updateList(t){if(!Array.isArray(t))return null;if(t=t.map(e=>{var n;let o=this.getItem(e.id);if(typeof e.img=="string"){let r=jt(e.img);e.img=r&&{id:r.id,ext:r.ext}}else(n=e.img)!=null&&n.img_id&&(e.img={id:e.img.img_id,ext:e.img.img_ext,unq_id:String(e.img.unq_id||e.img.id)});if(e.img=e.img||null,e.type=e.type||"custom",e.price=e.price==null?null:parseFloat(e.price),o&&e.orderPrice==null){var s;e.orderPrice=(s=o.orderPrice)!=null?s:o.price}else e.orderPrice==null&&(e.orderPrice=e.price);return e.quantity=wi(e),e.count=Math.round(+e.count)||0,e}),flexbe_cli.run.is_preview)try{localStorage.setItem("f_cart",JSON.stringify(t))}catch{}return I=t,I}purchase(){flexbe_cli.stat.ecommerce.purchase(I),this.resetList()}resetList(){let t=[...I].filter(e=>e.protect);this.updateList(t)}addItem(t){if(!t.id)throw new Error("Cart add item: product ID is not defined");let e=[...I],n={...t,count:parseFloat(t.count)||1},o=this.getItem(n.id);if(o){let s=e.indexOf(o);n.count+=o.count,e.splice(s,1,n)}else e.push(n);return this.updateList(e),flexbe_cli.stat.ecommerce.add(n),e}removeItem(t){let e=this.getItem(t),n=[...I];return!e||e.protect?I:(n.splice(n.indexOf(e),1),flexbe_cli.stat.ecommerce.remove(e),this.updateList(n))}updateCount({id:t,count:e}){let n=this.getItem(t);if(!n)return null;let o=+n.count||0;e==="+"?n.count+=1:e==="-"&&n.count>0?n.count-=1:n.count=e===""?1:e,Number.isNaN(+n.count)&&(n.count=o),this.updateList(I);let s=n.count-o;return s>0?flexbe_cli.stat.ecommerce.add({...n,count:s}):s<0&&flexbe_cli.stat.ecommerce.remove({...n,count:-s}),n}normalizeListItems(t=I,e={price:!0,count:!1,unavailable:!1,banPriceless:!1}){let n=t.map(o=>{let s={...o};return e.price&&(s.orderPrice=o.price),e.count&&!B.settings.allowPreorder&&(s.count=Math.min(o.count,o.quantity)),s});return e.unavailable&&(n=n.filter(o=>!o.hidden&&o.count)),e.banPriceless&&(n=n.filter(o=>!o.price===null)),this.updateList(n),n}};var ke=[{id:25280736,unq_id:"25280736",ext:"png",animated:!1,average:"#EEEEEE",border:"#EEEEEE",preview:"UklGRjQAAABXRUJQVlA4ICgAAADQAgCdASoeABYAPyWKvFeuKSWjqAgBwCSJaQAAPaOgAP7t6e+boAAA",proportion:71,transparent:0,original_resolution:1,width:700,height:500}],wt=class extends E{constructor(t,e){super(),this.variant=void 0,this.parent=void 0,this.variant=t,this.parent=e}get id(){return this.variant.id}get article(){var t;return(t=this.variant.vendor_code)!=null?t:""}get name(){var t;return((t=this.variant.name)!=null?t:[]).join(" - ")}get images(){var t;return(t=this.variant.images)!=null?t:[]}get oldPrice(){var t;return(t=this.variant.price_old)!=null?t:!1}get hasOldPrice(){return!!(this.parent.isOldPrice&&this.oldPrice)}get visible(){var t;return(t=this.variant.visible)!=null?t:!1}get optionValues(){return this.variant.option_values}get optionsInfo(){return this.variant.optionsInfo}get quantity(){var t;return(t=this.variant.quantity)!=null?t:0}get price(){var t;return(t=this.variant.price)!=null?t:null}get defaultImageId(){var t;return(t=this.variant.default_image_id)!=null?t:0}isDefault(){return!!(this.variant.is_default&&this.variant.visible)}getPrice(t){return typeof t=="string"?flexbe_cli.vars.site.currencyFormat.str.replace(":value",t).replace(":symbol",flexbe_cli.vars.site.currencyData.symbol):t==null?!flexbe_cli.ecommerce.settings.noPriceLabel&&flexbe_cli.is_admin?flexbe_cli.vars.site.language==="ru"?"\u0446\u0435\u043D\u0430 \u0441\u043A\u0440\u044B\u0442\u0430":"price hidden":flexbe_cli.ecommerce.settings.noPriceLabel:flexbe_cli.locale.formatMoney(t,{freeLabel:flexbe_cli.ecommerce.settings.zeroPrice})}getImages(t){if(this.parent.displayImage==="variant"&&this.parent.options.length){let e=this.variant.images;return e.length?e:ke}if(this.parent.displayImage==="product"||!this.parent.options.length){let e=this.parent.images;return t==="image"&&e.length>1?[e.find(n=>n.unq_id===this.defaultImageId)||e[0]]:e.length?e:ke}return ke}getCartData(t){return{price:this.variant.price,title:this.parent.title,productId:this.parent.id,variantId:this.variant.id,vendorCode:this.variant.vendor_code,quantity:this.variant.quantity,img:this.getImages(t),optionsInfo:this.variant.optionsInfo,count:1,strict:1}}availableInfo(){let{inStockStatus:t,outOfStockStatus:e}=flexbe_cli.ecommerce.settings,n=this.quantity!==0;if(flexbe_cli.is_admin&&(t=t==="none"?"in_stock":t,e=e==="none"?"out_of_stock":e),this.parent.allVariantsDisabled)return{text:"Not available",class:"not-available"};if(this.quantity==="dummy")return{text:flexbe_cli.vars.site.language==="ru"?"\u041D\u0430\u043B\u0438\u0447\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430":"Availability",class:"in-stock in_stock"};if(n&&t!=="none")return{text:this.quantity===-1||t==="in_stock"?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):flexbe_cli.locale.tr("cart::quantity_status::items_in_stock",{count:this.quantity}),class:"in-stock in_stock"};if(!n){if(e==="in_stock"&&t!=="none")return{text:flexbe_cli.locale.tr("cart::quantity_status::in_stock"),class:"in-stock in_stock"};if(e==="out_of_stock")return{text:flexbe_cli.locale.tr("cart::quantity_status::out_of_stock"),class:"not-available"};if(e==="preorder")return{text:flexbe_cli.locale.tr("cart::quantity_status::preorder"),class:"preorder"}}return{text:null,class:"hide"}}allowOrder(){let{allowPreorder:t,allowPriceless:e}=flexbe_cli.ecommerce.settings,n=flexbe_cli.locale.tr("ecommerce::option::disabled");return!this.quantity&&!t?{allow:!1,reason:flexbe_cli.locale.tr("ecommerce::option::locked")}:this.parent.allVariantsDisabled?{allow:!1,reason:n}:this.price==null&&!e?{allow:!1,reason:n}:{allow:!0}}};var xi=(i,t)=>{if(!i.visible)return{exceptionClass:"disabled",tipText:t.needTipsOptions?flexbe_cli.locale.tr("ecommerce::option::disabled"):""};if(!i.quantity){let e=flexbe_cli.ecommerce.settings.outOfStockStatus,n=t.needAvailableOptions?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):"",o=flexbe_cli.ecommerce.settings.allowPreorder,s=o?"":"locked",r=t.needTipsOptions?flexbe_cli.locale.tr("ecommerce::option::locked"):"";return o&&t.needTipsOptions&&(r=e==="in_stock"?n:flexbe_cli.locale.tr("cart::quantity_status::preorder")),o&&e==="none"&&(r=""),{exceptionClass:s,tipText:r}}return t.inStock!=="none"?t.inStock==="items_in_stock"&&i.quantity!==-1?{exceptionClass:"",tipText:t.needAvailableOptions&&t.needTipsOptions?flexbe_cli.locale.tr("cart::quantity_status::items_in_stock",{count:i.quantity}):""}:{exceptionClass:"",tipText:t.needAvailableOptions&&t.needTipsOptions?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):""}:{exceptionClass:"",tipText:""}},Qn=(i,t)=>{let e=!1;return i.length!==t.length?!1:(e=i.every(n=>t.some(o=>n.option_id===o.option_id&&n.value_id===o.value_id)),e)},Zn=({product:i,currentOptions:t,optionsStyle:e})=>{var n,o;let s=(n=e.show_available)!=null?n:!0,r=(o=e.show_in_stock_statuses)!=null?o:!0,a=flexbe_cli.ecommerce.settings.inStockStatus,l=[];return t.length===1?l=i.variants.reduce((u,c)=>[...u,{optionId:`${c.option_values[0].option_id}_${c.option_values[0].value_id}`,...xi(c,{needTipsOptions:s,needAvailableOptions:r,inStock:a})}],[]):i.variants.forEach(u=>{for(let c=0;cc!==d),f=u.option_values.filter((m,d)=>c!==d);JSON.stringify(p)===JSON.stringify(f)&&l.push({optionId:`${u.option_values[c].option_id}_${u.option_values[c].value_id}`,...xi(u,{needTipsOptions:s,needAvailableOptions:r,inStock:a})})}}),l},Jn=i=>i.find(t=>t.isDefault())||i.find(t=>t.visible)||i[0],ct=class extends E{constructor(t){super(),this.product=void 0,this.variantItems=void 0,this.activeVariant=void 0,this.activeOptions=void 0,this.oldPayload=void 0,this.hasOptionsElement=void 0,this.product=t,this.variantItems=t.variants.map(e=>new wt(e,this)),this.init()}get id(){return this.product.id}get settings(){var t;return(t=this.product.settings)!=null?t:{}}get link(){if(this.settings.use_custom_uri){var t;return(t=this.settings.uri)!=null?t:""}return""}get variants(){return this.variantItems}get title(){var t;return(t=this.product.name)!=null?t:""}get description(){var t;return(t=this.product.description)!=null?t:""}get options(){var t;return(t=this.product.options)!=null?t:[]}get hasVariants(){return this.variants.length>1}get allVariantsDisabled(){return!this.variants.filter(t=>t.visible).length}get displayImage(){var t;return(t=this.product.displayImage)!=null?t:"product"}get images(){var t;return(t=this.product.images)!=null?t:[]}get isOldPrice(){var t;return(t=this.product.usePriceOld)!=null?t:!1}get hasOptions(){return!!this.product.options.length}get visible(){return!!this.product.visible}init(){let t=Jn(this.variantItems),e=t.optionValues;this.setOption(e),this.setVariant(t)}getAction(t){return this.hasVariants&&!t&&!this.hasOptionsElement?"modal":"cart"}getVariant(t){var e;return(e=this.variantItems.filter(n=>String(n.id)===String(t))[0])!=null?e:this.variantItems[0]}currentVariant(t){return t==="default"?this.activeVariant:this.getVariant(t)}currentOptions(t){return t&&t!=="default"?this.getVariant(t).optionValues:this.activeOptions}selectOption(t){let[e,n]=t.split("_"),o=this.currentOptions().map(r=>String(r.option_id)===String(e)?{option_id:+e,value_id:+n}:r),s=this.variantItems.find(r=>Qn(r.optionValues,o));this.setOption(o),this.setVariant(s),t!==this.oldPayload&&(flexbe_cli.events.trigger(`update_${this.product.id}`,this),this.oldPayload=t)}setOption(t){this.activeOptions=t}setVariant(t){this.activeVariant=t}setOptionElement(){this.hasOptionsElement||(this.hasOptionsElement=!0,flexbe_cli.events.trigger(`update_${this.product.id}`,this))}combinationOptionsList(t){return Zn({product:this.product,currentOptions:this.activeOptions,optionsStyle:t})}};var xt=class extends E{constructor(){super(),this.products=void 0,this.products=new Map,this.init()}init(){let t=document.getElementById("flexbe-products-store");if(t){try{let e=JSON.parse(t.textContent.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"));this.addToStore(e)}catch{}t.parentNode.removeChild(t)}}addToStore(t){t.forEach(e=>{(e.visible||flexbe_cli.is_admin)&&this.products.set(String(e.id),new ct(e))})}getProducts(t){return t.map(e=>this.products.get(String(e))).filter(Boolean)}getProduct(t){return this.products.get(String(t))}getDummyProduct(){let t=flexbe_cli.vars.site.language==="ru";return new ct({id:0,name:t?"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430":"Product name",description:t?"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u043E \u043E\u0442\u0440\u0430\u0436\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B, \u0432\u0430\u0436\u043D\u044B\u0435 \u043F\u0440\u0438 \u043F\u043E\u043A\u0443\u043F\u043A\u0435.":"The product description should convey the key features and qualities that help customers make a purchasing decision.",images:t?[{id:39821031,ext:"jpg",animated:!1,average:"#EEEEEE",border:"#EEEEEE",height:2480,preview:"UklGRkYAAABXRUJQVlA4IDoAAAAQBACdASoeACMAPxV8r1GxKKQitVv4AiAiiWkAAHdYxpA7nUpHNdVoAAD+7mmMq9LCAW+j7lgJyYAA",proportion:114.81,transparent:0,width:2160}]:[{animated:!1,average:"#EEEEEE",border:"#EEEEEE",ext:"jpg",height:1080,id:39909534,preview:"UklGRkwAAABXRUJQVlA4IEAAAADwAwCdASoeAB4APyVyyWSuJKkpFAHAJIlpAAA9ZIprB9gU3U+hJ/oAAP7tQ+5GIEcJuzeAREpLgMJmahfgAAAA",proportion:100,transparent:0,width:1080}],variants:[{id:6468,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 1"]:["Variant 1"],option_values:[{option_id:893,value_id:2338}],vendor_code:t?"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:1},{id:6480,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 2"]:["Variant 2"],option_values:[{option_id:893,value_id:2339}],vendor_code:t?"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:0},{id:6481,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 3"]:["Variant 3"],option_values:[{option_id:893,value_id:2340}],vendor_code:t?"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:0}],options:[{id:893,name:t?"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043F\u0446\u0438\u0438":"Option name",sort_index:0,values:[{id:2338,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 1":"Variant 1",data:{color:"#ffffff",contrast:"dark",contrastFixed:"dark"}},{id:2339,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 2":"Variant 2",data:{color:"#000000",contrast:"light",contrastFixed:"light"}},{id:2340,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 3":"Variant 3",data:{color:"#7666F6",contrast:"dark",contrastFixed:"dark"}}],data:{type:"color",widget_type:"radio"}}],visible:!0,usePriceOld:!0,displayImage:"product",available:!0})}async loadProducts({showType:t,productIds:e,categoryIds:n,limit:o,onlyVisible:s,hideOutOfStock:r}){let a={project_id:flexbe_cli.vars.site.id,productIds:t==="select_products"?e:void 0,categoryIds:t==="select_category"?n:void 0,showType:t,limit:o,onlyVisible:s??!0,hideOutOfStock:r??flexbe_cli.vars.site.ecommerce.hideOutOfStock},{products:l,categories:u}=await new Promise((c,p)=>{let f=d=>{c(d)},m=d=>{p(d)};return $.ajax({url:"/api/ecommerce/data/",type:"GET",dataType:"json",data:a}).done(f).fail(m)});return this.addToStore(l),{categories:u,products:l}}};var At=class extends E{get hasPromotionChanges(){var t,e;return!!((t=this.promotionsChanges)!=null&&t.discount)||!!((e=this.promotionsChanges)!=null&&e.promocode)}get groupId(){return typeof flexbe_cli=="object"?flexbe_cli.group_id:null}get timezone(){return typeof flexbe_cli=="object"?flexbe_cli.vars.site.timezone:null}constructor(t){super(),this.options=void 0,this.discounts=void 0,this.promocode=void 0,this.activeDiscount=void 0,this.nearestDiscount=void 0,this.appliedPromocode=void 0,this.promotionsChanges=void 0,this.getTotal=void 0,this.getTotalIncludingPromotions=void 0,this.options=t,this.appliedPromocode=null,this.activeDiscount=null,this.nearestDiscount=null,this.promotionsChanges={},this.getTotal=()=>(t.getTotal==null?void 0:t.getTotal())||0,this.getTotalIncludingPromotions=()=>{var e,n;let o=this.getTotal(),s=((e=this.activeDiscount)==null?void 0:e.discountValue)||0,r=((n=this.appliedPromocode)==null?void 0:n.discountValue)||0;return o-s-r},flexbe_cli.is_admin||this.init(t)}init(t){var e;this.updateDiscountList((e=flexbe_cli.vars.site.discounts)!=null?e:[],{updateChanges:!1}),t.needUpdateWithLS&&this.updateFromLocalStorage(),this.updateActiveDiscount(!1),this.updateNearestDiscount(),this.bindEvents()}async dispatch(t,...e){let n=this[t];if(typeof n!="function")throw new Error(`Promotion dispatch: action '${t}' doesnt exist`);let o=await n.apply(this,e);this.trigger("dispatch",{name:t,args:e,result:o})}bindEvents(){this.on("dispatch.promotion-store",({name:t})=>{["applyPromocode","removePromocode"].includes(t)&&(this.updateActiveDiscount(),this.updateNearestDiscount())})}updateActiveDiscount(t=!1){var e;if(!this.discounts.length||this.appliedPromocode&&!this.appliedPromocode.usage_with_any_discount){this.activeDiscount=null;return}let n=this.discounts.filter(l=>l.isAvailableByTime),o=this.getTotal(),s=n.filter(l=>o>=l.active_from&&o-l.discountValue>=0).sort((l,u)=>u.discountValue-l.discountValue)[0]||null,r=this.activeDiscount,a=s?this.getDiscountData(s.id):null;t&&s?.discountValue!==((e=this.activeDiscount)==null?void 0:e.discountValue)&&(this.promotionsChanges.discount={oldData:r,newData:a}),this.activeDiscount=a}updateNearestDiscount(){var t;let e=this.getTotal(),n=this.getTotalIncludingPromotions();if(!this.discounts.length||this.appliedPromocode&&!this.appliedPromocode.usage_with_any_discount||n<=0){this.nearestDiscount=null;return}let o=this.discounts.filter(r=>r.isAvailableByTime),s=(t=o.filter(r=>r.active_from>e).filter(r=>{if(this.activeDiscount){if(r.discount_type==="percent"){let a=r.active_from*r.discount_amount;return this.activeDiscount.discount_type==="percent"?a>r.active_from*this.activeDiscount.discount_amount:a>this.activeDiscount.discount_amount}return+r.discount_amount>this.activeDiscount.discountValue}return!0}).sort((r,a)=>r.discountValue-a.discountValue).sort((r,a)=>r.active_from-a.active_from)[0])==null?void 0:t.active_from;if(s){let r=o.filter(a=>a.active_from===s).filter(a=>{var l;return!this.activeDiscount||a.discountValue>((l=this.activeDiscount)==null?void 0:l.discountValue)}).sort((a,l)=>l.discountValue-a.discountValue)[0]||{};this.nearestDiscount=r?this.getDiscountData(r.id):null}else this.nearestDiscount=null}updateAppliedPromocode(){var t;if(!this.appliedPromocode)return;let e=((t=this.promotionsChanges)==null||(t=t.promocode)==null?void 0:t.oldData)||this.appliedPromocode,n=this.getPromocodeData();if(e&&n){if(e.discountValue!==n?.discountValue||e.delivery_free!==n?.delivery_free){var o;this.promotionsChanges.promocode={oldData:((o=this.promotionsChanges)==null||(o=o.promocode)==null?void 0:o.oldData)||this.appliedPromocode,newData:n,code:this.appliedPromocode.code}}else this.acceptPromotionChanges({promocode:!0});this.appliedPromocode=this.promocode}}async applyPromocode(t){let e=this.getTotal(),n;try{n=await this.loadDataPromocode(t)}catch{let s=Error();throw s.name="default_error",s}if(this.updatePromocode(n,{updatePromotions:!1}),e&&this.promocode.active_from&&this.promocode.active_from>e){let o=new Error(this.promocode.active_from.toString());throw o.name="total_error",o}if(!this.promocode.isAvailableByTime){let o=new Error;throw o.name="timeout_error",o}if(this.appliedPromocode=n,this.options.needUpdateWithLS)try{localStorage.setItem("f_applied_promocode",JSON.stringify({code:t,id:this.promocode.id}))}catch{}}removePromocode(){this.appliedPromocode=null,this.acceptPromotionChanges({promocode:!0});try{localStorage.removeItem("f_applied_promocode")}catch{}}acceptPromotionChanges({promocode:t,discount:e}={}){t||e?(t&&delete this.promotionsChanges.promocode,e&&delete this.promotionsChanges.discount):this.promotionsChanges={}}async updateFromLocalStorage(){let t=JSON.parse(localStorage.getItem("f_applied_promocode"));if(t&&t.id&&t.code){var e;let n;try{n=await this.loadDataPromocode(t.code)}catch{this.removePromocode();return}if(this.updatePromocode(n,{updatePromotions:!1}),!((e=this.promocode)!=null&&e.isActive)){this.removePromocode();return}this.appliedPromocode=this.promocode}}getDiscountData(t){return this.discounts.find(e=>e.id===t)}getPromocodeData(){return this.promocode}async loadPromotionList(t){return new Promise((e,n)=>{let o=r=>{e(r)},s=r=>{n(r)};return $.ajax({url:"/api/promotions/get_list/",type:"GET",dataType:"json",data:{project_id:flexbe_cli.vars.site.id,promotionType:t}}).done(o).fail(s)})}async loadDataPromocode(t){return new Promise((e,n)=>{let o=r=>{e(r)},s=r=>{n(r)};return $.ajax({url:"/api/promotions/get_promocode/",type:"GET",dataType:"json",data:{project_id:flexbe_cli.vars.site.id,promoCode:t}}).done(o).fail(s)})}updatePromocode(t,{updatePromotions:e=!0}={}){typeof t=="object"&&Object.defineProperties(t,{isAvailableByTime:{get:()=>{let{date_from:n,date_to:o}=t;return Se({dateFrom:n,dateTo:o,timezone:this.timezone})}},discountValue:{get:()=>{let n=this.getTotal();return t&&t.discount_type==="percent"?Math.round(n*t.discount_amount)/100:+t.discount_amount}},isAvailable:{get:()=>!!this.promocode&&t.isAvailableByTime},isActive:{get:()=>{if(!t.isAvailable)return!1;let n=this.getTotal();return t?.active_from<=n}},hasFreeDelivery:{get:()=>t?.delivery_free||t?.discount_type==="delivery"}}),this.promocode=t,e&&this.updateAppliedPromocode()}updateDiscountList(t,{updateChanges:e=!0,updatePromotions:n=!0}={}){t.forEach(o=>{Object.defineProperties(o,{isAvailableByTime:{get:()=>{let{date_from:s,date_to:r}=o;return Se({dateFrom:s,dateTo:r,timezone:this.timezone})}},discountValue:{get:()=>{let s=this.getTotal();return o&&o.discount_type==="percent"?Math.round(s*o.discount_amount)/100:+o.discount_amount}}})}),this.discounts=t,n&&(this.updateActiveDiscount(e),this.updateNearestDiscount())}async loadDiscountList({updateChanges:t=!0,updatePromotions:e=!0}={}){let n;try{n=await this.loadPromotionList("discount")}catch{this.discounts=[];return}this.updateDiscountList(n,{updateChanges:t,updatePromotions:e})}};var Ai="f_last_shipping_type",$t=class extends E{get methods(){return Object.values(this.lists).flat()}get enabled(){return this.methods.length>0}constructor(){super(),this.activeType=void 0,this.activeAddress={country:"",addressLine1:"",addressLine2:"",city:"",region:"",zipCode:""},this.lists={delivery:[],pickup:[]},this.activeMethod=void 0,this.ecommerceSetting=void 0,this.lists={delivery:(flexbe_cli.vars.site.delivery||[]).filter(t=>t.enabled),pickup:(flexbe_cli.vars.site.pickups||[]).filter(t=>t.enabled)},this.ecommerceSetting=B.settings,this.dispatch("selectType",localStorage.getItem(Ai)||"delivery")}dispatch(t,...e){let n=this[t];if(typeof n!="function")throw new Error(`Shipping dispatch: action '${t}' doesnt exist`);let o=n.apply(this,e);this.trigger("dispatch",{name:t,args:e,result:o})}getList(t=this.activeType){return this.lists[t]||[]}getActive(){let t=this.activeMethod;if(!t)return null;let e=this.getShippingType(t),n={id:t.id,type:this.getShippingType(t),title:t.title,desc:t.desc,price:this.getPrice(t.id),fieldIds:t.fields.map(o=>o.id),address:null};return e==="pickup"?n.address=t.address:t.deliveryAddressEnabled&&(n.address=this.activeAddress),n}getMethod(t){return this.methods.find(e=>e.id.toString()===t)}getShippingType(t){if(!t)return null;let e=typeof t=="string"?t:t.id;for(let[n,o]of Object.entries(this.lists))if(o.some(s=>s.id.toString()===e.toString()))return n;return null}setAddress(t){this.activeAddress={...this.activeAddress,...t}}syncFromLS(){let t=`f_last_${this.activeType}`,e=localStorage.getItem(t);this.getMethod(e)||localStorage.removeItem(t),this.dispatch("selectMethod",e)}selectType(t){var e;t=(e=this.lists[t])!=null&&e.length?t:Object.keys(this.lists).find(n=>this.lists[n].length),t&&(this.activeType=t,localStorage.setItem(Ai,this.activeType),this.syncFromLS())}selectMethod(t){if(this.activeMethod=this.getMethod(t)||this.getList()[0],this.activeMethod){let e=this.getShippingType(this.activeMethod);localStorage.setItem(`f_last_${e}`,this.activeMethod.id),this.activeType!==e&&this.dispatch("selectType",e)}return this.activeMethod}getPrice(t){let{appliedPromocode:e}=B.promotionStore||{},n=t?this.getMethod(t):this.activeMethod,o=+this.ecommerceSetting.minTotalOrder,s=0,r="\u23E4",a=0,l="",u=0,c="",p=0,f="",m=0,d="",h=!1,g;if(n){let _=B.cartStore.getTotal(),y=e?.hasFreeShipping&&e?.isActive;n.prices.filter(v=>v.from!=="").forEach((v,j)=>{n.useMinTotal&&!j&&+v.from&&(s=+v.price,+v.from>o&&(p=+v.from)),(_>=+v.from||!j)&&(s=+v.price),y&&(s=0)});let A=n.prices.find(v=>v.price===0);h=!!n.useNotFixTotal,g=h&&(!A||A.from===""),A&&(a=+A.from||0,u=Math.max(0,a-_),l=M.formatMoney(a),c=M.formatMoney(u)),p&&(m=Math.max(0,p-_),f=M.formatMoney(p),d=M.formatMoney(m))}return(!h||a&&u<=0)&&(h=!1,r=M.formatMoney(s,{freeLabel:!0})),{current:s,currentFormatted:r,freeFrom:a,freeFromFormatted:l,untilFree:u,untilFreeFormatted:c,minTotal:p,minTotalFormatted:f,untilMinTotal:m,untilMinTotalFormatted:d,notFixedPrice:h,notHasFree:g}}};var Ie=class{constructor(){this.cartStore=null,this.shippingStore=null,this.promotionStore=null,this.productsStore=null,this.getProductInfo=yi}get settings(){return flexbe_cli.vars.site.ecommerce}init({enableDelivery:t=!1,enablePromotions:e=!1,enableProducts:n=!1}){this.cartStore=new yt,e&&(this.promotionStore=new At({getTotal:this.cartStore.getTotal,needUpdateWithLS:!flexbe_cli.is_admin})),t&&(this.shippingStore=new $t),n&&(this.productsStore=new xt)}},B=new Ie;var Et=class{static create(){return new this}constructor(){this.Interactivity=void 0,this.animationsData=[],this.interactionInstances=[],this.responsiveMode=flexbe_cli.resize.responsiveMode,this.observableLoopSliderElements=[],this.observableTabs=[],this.slidersEventsMap=new Map,this.init()}async init(){this.findAnimations(),this.animationsData.length&&await this.createAnimations(),this.bindEvents()}bindEvents(){window.addEventListener("resized",()=>{let t=flexbe_cli.resize.responsiveMode;t!==this.responsiveMode&&(this.responsiveMode=t,this.updateAnimations())}),flexbe_cli.is_admin&&flexbe_cli.events.off("hideShowUI.global-animation-component").on("hideShowUI.global-animation-component",t=>{t==="preview"?(this.findAnimations(),this.createAnimations()):this.destroyAnimations()})}findAnimations(){this.animationsData=[],$("[data-flexbe-animations]").each((t,e)=>{let n=JSON.parse(e.getAttribute("data-flexbe-animations"));n.forEach(o=>{o.element=e}),n&&n.length&&this.animationsData.push(...n),e.animationsOptions=n,e.removeAttribute("data-flexbe-animations")})}async require(){this.Interactivity||(this.Interactivity=(await import("../../js/chunk-WUIXZTYE.mjs")).default)}async createAnimation(t){var e;let n=t==null||(e=t.responsive)==null?void 0:e[this.responsiveMode];if(n)if(n.enabled){var o;let s=(t==null||(o=t.responsive)==null?void 0:o[n.inherit])||n,r=t.element.closest(".swiper-slide"),a=t.element.closest(".wait-animation"),l=t.element.parentNode.closest(".has-animation"),u=t.element.closest(".animation--slide_up"),c=s.interactionType==="scroll"&&s.interactionSettings.fixed;u&&c&&flexbe_cli.transitions.stopTransition(a);let f=await this.Interactivity.create({id:t.id,element:t.element,allowNativePositionFixed:!r&&!l,normalizeIntersectionState:(m,d)=>{if(d.interactionType==="screen"){let _=d.interactionSettings.triggerElements[0],y=_.closest(".swiper-slide"),A=_.closest(".tab-content");if(y||A){let v=!0;if(A&&(v=v&&A.classList.contains("active")),y){var h,g;let j=y.getAttribute("data-item-id"),D=y.closest(".swiper"),U=(h=D==null||(g=D.swiper)==null?void 0:g.slides)!=null?h:[],w=[y,...U.filter(tt=>tt.getAttribute("data-item-id")===j)];v=v&&w.some(tt=>tt.classList.contains("swiper-slide-visible"))}return v&&m==="in"?"in":"out"}}return m},...s,normalizeOptions:m=>({...m,steps:m.steps.map(d=>{let h={...d};return d.animationParams.skewEnabled||(delete h.animationParams.skewX,delete h.animationParams.skewY),d.animationParams.clipPathEnabled||delete h.animationParams.clipPath,h})})});f.setProgress(0,!1),this.interactionInstances.push(f),this.walkTriggerElements({interaction:f}),$(a).off("flexbe-transition-end").one("flexbe-transition-end",async()=>{f.updateOffsetBound()})}else this.Interactivity.removeAnimationStyles(t.element)}async createAnimations(){flexbe_cli.run.is_preview&&(await this.require(),this.animationsData.forEach(t=>this.createAnimation(t)))}walkTriggerElements({interaction:t}){t.interactionSettings.triggerElements.forEach(e=>{let n=e.closest(".swiper"),o=e.closest(".tab-content");n&&(n.swiper?this.sliderNormalizationsInit({swiper:n.swiper,triggerElement:e,interaction:t}):n.addEventListener("swiper:init",()=>{setTimeout(()=>{this.sliderNormalizationsInit({swiper:n.swiper,triggerElement:e,interaction:t})},50)})),o&&this.tabNormalizationsInit({tabEl:o,interaction:t})})}bindSliderEvents(t,e){this.slidersEventsMap.get(t)||this.slidersEventsMap.set(t,{});let n=this.slidersEventsMap.get(t);Object.entries(e).forEach(([o,s])=>{n[o]||(n[o]=[],t.on(o,r=>{n[o].forEach(l=>l(r))})),n[o].push(s)})}sliderNormalizationsInit({swiper:t,triggerElement:e,interaction:n}){if(!t||!n)return;let o=e.classList.contains("swiper-slide"),s=e.closest(".swiper-slide");if(n.interactionType==="screen"&&s&&(this.bindSliderEvents(t,{slideChange:()=>{requestAnimationFrame(()=>{this.Interactivity.checkIntersection(n)})}}),this.Interactivity.checkIntersection(n)),o&&(n.updateStyles(),this.bindSliderEvents(t,{setTranslate:()=>{requestAnimationFrame(()=>{n.updateStyles()})},update:()=>n.updateStyles()})),t.params.loop){if(this.observableLoopSliderElements.includes(t.el))return;this.observableLoopSliderElements.push(t.el);let r=Array.from(t.slides||[]);r.filter(l=>l.classList.contains("swiper-slide-duplicate")).forEach(l=>{let u=l.getAttribute("data-item-id"),c=r.find(f=>f.getAttribute("data-item-id")===u&&!f.hasAttribute("data-cloned")),p=Array.from(l.querySelectorAll(".has-animation"));c.animationsOptions&&this.createAnimation({...c.animationsOptions[0],element:l}),p.forEach(f=>{var m;let d=f.getAttribute("data-id")||((m=f.closest("[data-id]"))==null?void 0:m.getAttribute("data-id")),h=c.querySelector(`[data-id="${d}"].has-animation, [data-id="${d}"] .has-animation`);h&&h.animationsOptions&&this.createAnimation({...h.animationsOptions[0],element:f})})})}}tabNormalizationsInit({tabEl:t,interaction:e}){this.observableTabs.includes(t)||(this.observableTabs.push(t),t.addEventListener("element-become-visible",()=>this.Interactivity.checkIntersection(e)),t.addEventListener("element-become-hidden",()=>this.Interactivity.checkIntersection(e)))}async updateAnimations(){flexbe_cli.run.is_preview&&(this.destroyAnimations(),await this.createAnimations())}destroyAnimations(){this.interactionInstances.forEach(t=>{var e;return(e=this.Interactivity)==null?void 0:e.remove(t)}),this.interactionInstances=[]}};var to=".autowidth-desktop:not(.autoheight-desktop) > .element-content, .autowidth-mobile:not(.autoheight-mobile) > .element-content",$i="--elementHeightPx",ut=class i{static create(){return new this}constructor(){flexbe_cli.is_admin&&flexbe_cli.events.off("entity_render.autoWidth").on("entity_render.autoWidth",e=>{if(!e||!e.id||!e.templateRendered)return;let n=document.querySelector(`[data-id="${e.id}"]`);this.observeInArea(n)});let t=e=>{let n=e._core;if(n&&n.inScreen)this.observeInArea(n.area);else{let o=new AbortController;e.addEventListener("screen",s=>{let r=s.detail||{};r.state&&r.first&&(this.observeInArea(s.target),o.abort())},{signal:o.signal})}};k(()=>document.querySelectorAll(".b_block").forEach(e=>t(e))),k(()=>document.querySelectorAll(".m_modal").forEach(e=>t(e))),k(()=>document.querySelectorAll(".w_widget").forEach(e=>t(e)))}observeInArea(t=document){let e=t?.querySelectorAll(to)||[];Array.from(e).forEach(n=>i.observer.observe(n))}};ut.observer=new ResizeObserver(i=>{i.forEach(({target:t,contentRect:e})=>{let n=t&&t.offsetParent;if(!n)return;let o=getComputedStyle(n),s=`${e.height}px`;o.getPropertyValue($i)!==s&&requestAnimationFrame(()=>{n.style.setProperty($i,s)})})});var ki,eo=150,io=2160,no=Math.min(2,window.devicePixelRatio),F=class{static create(){return new this}constructor(){this.imageOptions={lazy:!0,lazy_priority:!1,...flexbe_cli.vars.site.images||{}},this.loadInArea(document,"inline"),this.initLazyLoading(),this.initLazyPriority()}initLazyLoading(){flexbe_cli.is_admin&&flexbe_cli.events.off(".lazyLoading").on("entity_render.lazyLoading",e=>{if(!e||!e.id||!e.templateRendered)return;let n=document.querySelector(`[data-id="${e.id}"]`);this.loadInArea(n,"inline"),this.loadInArea(n,"lazy")});let t=e=>{let n=e._core;if(n&&n.inScreen)this.loadInArea(n.area,"lazy");else{let o=new AbortController;e.addEventListener("screen",s=>{let r=s.detail||{};r.state&&r.first&&(this.loadInArea(s.target,"lazy"),o.abort())},{signal:o.signal})}};k(()=>document.querySelectorAll(".b_block").forEach(e=>t(e))),k(()=>document.querySelectorAll(".m_modal").forEach(e=>t(e))),k(()=>document.querySelectorAll(".w_widget").forEach(e=>t(e)))}initLazyPriority(){let t=this.imageOptions.lazy,e=this.imageOptions.lazy_priority;!t||!e||$(window).one("load.lazyPriority",()=>{let n=[".component-bg",'.bg-fill[data-type="image"]',".component-image",".component-icon"].join(",");this.loadInArea(document,"lazy"),Array.from(document.querySelectorAll(n)).forEach(o=>o.dispatchEvent(new CustomEvent("setImage",{detail:{reason:"lazyPriority"}})))})}loadInArea(t=document,e="inline"){if(!t)return;let n=Array.from(t.querySelectorAll(`[data-${e}-src], [data-${e}-bg], [data-${e}-href]`));oo(n)}};ki=F;F.observer=new ResizeObserver(i=>{i.filter(e=>e.contentRect.width||e.contentRect.height).forEach(e=>{Ii(e.target),ki.observer.unobserve(e.target)})});function oo(i){i.length&&i.forEach(t=>{if(t.tagName==="LINK"||t.tagName==="SCRIPT"){Ii(t);return}if(t.tagName==="svg"||t.tagName==="use"){var e;t=(e=t.closest("svg"))==null?void 0:e.parentElement}F.observer.observe(t)})}function Ii(i){let t=i.dataset.inlineSrc||i.dataset.lazySrc,e=i.dataset.inlineBg||i.dataset.lazyBg,n=i.dataset.inlineHref||i.dataset.lazyHref,o=t||e||n,s=i.tagName==="svg"?[i]:[...i.children].filter(d=>d.tagName==="svg");if(s.length){let d=s[0].querySelector("use"),h=d&&(d.dataset.inlineHref||d.dataset.lazyHref);return h&&Si(d,h),!0}if(i.tagName==="LINK")return Si(i,o),!0;if(i.tagName==="SCRIPT")return Ce(i,o),!0;if(!o)return!0;if(!/%optimalWidth%/gi.test(o))return e?Ei(i,o):Ce(i,o),F.observer.unobserve(i),!0;let r=i.parentElement,a=r.dataset.imgAttachment==="fixed",l=i.dataset.imgProportion||100,u=a?window.innerWidth:r.offsetWidth,c=a?window.innerHeight:r.offsetHeight;if(!u&&!c)return!1;let p=l/100,f=t?p:c/u,m;return f<=p?m=u:m=c/p,m=Math.max(eo,Math.min(m*no,io)),m=Math.round(m),e?Ei(i,o.replace(/%optimalWidth%/gi,`${m}`)):Ce(i,o.replace(/%optimalWidth%/gi,`${m}`)),F.observer.unobserve(i),!0}function Ei(i,t){let e=i.parentElement.querySelector("img"),n=getComputedStyle(i).getPropertyValue("background-image");i.style.backgroundImage=[`url(${t})`,n].filter(o=>o).join(","),e&&e.setAttribute("src",t),["data-inline-bg","data-lazy-bg"].forEach(o=>i.removeAttribute(o))}function Ce(i,t){i.setAttribute("src",t),["data-inline-src","data-lazy-src"].forEach(e=>i.removeAttribute(e))}function Si(i,t){i.setAttribute("href",t),["data-inline-href","data-lazy-href"].forEach(e=>i.removeAttribute(e))}var Ci,Te={x:0,y:0},Ti=".lightbox-container, .b_block, .m_modal, .w_widget",St="[data-lightbox]",kt=class{static create(){return new this}constructor(){var t;this.loaded=!1,this.opened=!1,this.$lg=void 0,this.bindEvents(),(t=window.history.state)!=null&&t.lg&&this.openGallery(window.history.state.lg)}require(t){if(this.loaded){typeof t=="function"&&t();return}flexbe_cli.require(["/_s/lib/jquery/lightGallery/css/lightgallery.min.css","/_s/lib/jquery/lightGallery/js/lightgallery.min.js"],()=>{this.loaded=!0,typeof t=="function"&&t()})}bindEvents(){$(window).one("load.lightbox",()=>{$(St).length&&this.require()}),$(document).on("click.lightbox",St,t=>{t.preventDefault(),t.stopPropagation()}),$(document).on("pointerdown.lightbox",St,t=>{var e,n;flexbe_cli.run.is_preview&&(t.preventDefault(),t.stopPropagation(),Ci=t.target,Te={x:(e=t.clientX)!=null?e:t.touches[0].clientX,y:(n=t.clientY)!=null?n:t.touches[0].clientY})}),$(document).on("pointerup.lightbox",St,t=>{var e,n;let o=Ci===t.target,s={x:(e=t.clientX)!=null?e:t.changedTouches[0].clientX,y:(n=t.clientY)!=null?n:t.changedTouches[0].clientY},r=Math.sqrt((Te.x-s.x)**2+(Te.y-s.y)**2)<5;if(!o||!r||t.button!==0)return;let a=$(t.currentTarget),l=a.closest(Ti),u=a.attr("data-lightbox"),c=a.closest("[data-loop]").attr("data-loop")==="1",f=l.find(St).filter((d,h)=>{let g=$(h).closest(Ti),_=g.is(l),y=g.closest(".swiper-slide-duplicate").length;return _&&!y}).toArray().map(d=>{let h,g=$(d),_=g.attr("data-lightbox")||g.attr("src")||g.attr("href"),y=g.attr("data-sub-html");return y?h=g.find(y).html():h=g.attr("alt")||g.find("img").attr("alt")||"",c&&g.closest("[data-cloned]").length?null:{src:_,subHtml:h}}).filter(d=>d?.src),m=f.findIndex(d=>d.src===u)||0;this.openGallery({index:m,dynamicEl:f,enableSlide:f.length>1,loop:c})}),$(window).on("popstate.lightbox",()=>{let t=window.history.state||{};t.lg?this.openGallery(t.lg):this.closeGallery()})}openGallery(t={}){if(t.dynamicEl.length===0||this.opened)return;this.opened=!0,this.$lg=$("
");let e=this.$lg,n={index:0,dynamicEl:[],dynamic:!0,subHtmlSelectorRelative:!0,getCaptionFromTitleOrAlt:!0,slideEndAnimation:!1,swipeThreshold:30,counter:!0,closable:!0,download:!1,easing:"ease-out",hideBarsDelay:1e3,zoomIcons:!1,actualSize:!1,enableSlide:!0,loop:!0,...t};n.index<=0&&(n.index=0),e.on("onBeforeOpen.lg",()=>{this.opened=!0,Pi(n)}),e.on("onBeforeSlide.lg",(o,s,r)=>{s!==r&&Pi({...n,index:r})}),e.on("onBeforeClose.lg",()=>{var o;(o=window.history.state)!=null&&o.lg&&(flexbe_cli.lockPopstate=!0,window.history.back(),setTimeout(()=>{flexbe_cli.lockPopstate=!1},20)),this.opened=!1}),this.require(()=>e.lightGallery(n))}closeGallery(){var t;this.opened=!1;let e=(t=this.$lg)==null?void 0:t.data("lightGallery");e&&e.destroy()}};function Pi(i){let t=window.history.state||{};flexbe_cli.lockPopstate=!0,t.lg?window.history.replaceState({lg:i},null,"#image-popup"):window.history.pushState({lg:i},null,"#image-popup"),flexbe_cli.lockPopstate=!1}var Pe=document,It="a[href], [data-action]",Rt="[data-action-target]",zt,Oi,Ct=class i{static create(){return zt||(zt=new i,zt)}constructor(){this.bindEvents()}bindEvents(){let t=e=>!!e.target.closest('[data-prevent-action], [data-flexbe-events="off"]');$(Pe).off("mousedown.component-links-fake",Rt).on("mousedown.component-links-fake",Rt,e=>e.which===2||e.button===1?(e.preventDefault(),!1):!0),$(Pe).off("click.component-links-fake auxclick.component-links-fake").on("click.component-links-fake auxclick.component-links-fake",Rt,e=>{let n=e.originalEvent;return!n||!n.isTrusted||e.target.closest(It)||t(e)?!0:(e.stopPropagation(),e.stopImmediatePropagation(),Ee($(e.currentTarget).children(It).get(0),n),!1)}),$(Pe).off("click.component-links auxclick.component-links",It).on("click.component-links auxclick.component-links",It,e=>{let n=e.currentTarget,o=$(n);if(t(e))return!0;if(!flexbe_cli.run.is_preview&&!n.closest(".editor-focus, .b_block--global, .component-menu-dropdown"))return e.preventDefault(),!0;let s=o.closest("[data-action]").data("action")||(n.tagName==="A"?"link":"none");if(this.reachGoals(e),["link","app_link","phone","mail","anchor"].includes(s))return this.actionLink(e);if(s==="file")return this.actionFile();if(s==="button")return this.actionButton(e);if(s==="modalOptions")return this.openProductOptions(e);if(s.startsWith("modal"))return this.actionModal(e);if(s==="cart")return this.actionCart(e);if(s==="quiz")return this.actionQuiz(e);if(s==="close")return this.actionClose(e);if(s==="code")return this.actionCode(e);if(s==="popup")return e.preventDefault(),!1;s==="a11y"&&flexbe_cli.events.trigger("ui_mobilemenu_close"),s==="copy"&&this.actionCopy(e)})}openProductOptions(t){t.preventDefault(),t.stopPropagation();let e=t.currentTarget.dataset.productId;if(!e||!flexbe_cli.run.is_preview)return;let[n]=flexbe_cli.ecommerce.productsStore.getProducts([e]);n&&setTimeout(()=>{flexbe_cli.events.trigger("ui_modal_open",{id:"product-options",data:{product:n},options:{hash:!1,rise:!0}})},100)}actionCode(t){if(!flexbe_cli.run.is_preview)return;let e=t.currentTarget,n=async function(){}.constructor;return new n("event",e.getAttribute("data-code")||"")(t.originalEvent)}actionFile(){return!0}actionLink(t){let e=t.currentTarget,o=e.hasAttribute("href")?e.getAttribute("href"):"",s=t.button===2||t.which===3,r=t.button===1||t.which===2,a=t.metaKey||t.ctrlKey||r||e.getAttribute("target")==="_blank"||!1,l=e.hasAttribute("download"),u=flexbe_cli.is_admin;s||l||a&&!r&&!u||(t.preventDefault(),clearTimeout(Oi),Oi=setTimeout(()=>{flexbe_cli.helpers.gotoLink(o,a)},15))}actionCopy(t){let e=t.currentTarget,n=e.getAttribute("href");n&&(n=new URL(n,location.href).toString());let o=e.getAttribute("data-copy")||n||e.textContent;if(e.closest(".markdown-code-wrapper")){var s;o=(s=e.closest(".markdown-code-wrapper").querySelector("code"))==null?void 0:s.textContent}if(o)try{navigator.clipboard.writeText(o),e.classList.add("copied"),setTimeout(()=>e.classList.remove("copied"),600)}catch(r){console.error("Failed to copy anchor link:",r)}}actionButton(t){t.stopPropagation();let n=$(t.currentTarget).closest(".content-zone, [data-item-id]").first().find(".component-button").not(".form-button").find(It);n[0]&&Ee(n[0],t)}actionModal(t){let e=$(t.currentTarget),n=this.getProductInfo(e[0]),o=e.attr("data-modal-id");flexbe_cli.modal.find(o)||(o=flexbe_cli.modal.$list.find(`._anchor[name="${o}"]`).closest(".m_modal").attr("data-id")||o),/^(form|done)$/.test(o)&&!flexbe_cli.modal.find(o)&&(o=`${e.closest("[data-id]").attr("data-id").split("_")[0]}_${o}`),flexbe_cli.events.trigger("ui_mobilemenu_close"),flexbe_cli.events.trigger("ui_modal_open",{id:o,data:{items:n?[n]:[]}})}actionCart(t){let e=$(t.currentTarget),n=e.closest(".m_modal").length,o=e.closest(".disabled").length,s=this.getProductInfo(e[0]),r=!1,a=e.closest(Rt);a.length||(a=e),!(!s||o)&&(r=a.is("button"),r&&(a.append(` `),requestAnimationFrame(()=>{a.addClass("animate-add-to-cart")})),setTimeout(()=>{n&&(flexbe_cli.events.trigger("ui_modal_close"),flexbe_cli.ecommerce.cartStore.dispatch("addItem",s)),r&&requestAnimationFrame(()=>{a.removeClass("animate-add-to-cart"),a.find(".in-cart-icon").remove()})},n?450:1600),n||flexbe_cli.ecommerce.cartStore.dispatch("addItem",s))}actionQuiz(t){let e=$(t.currentTarget).closest("[data-id]").attr("data-id");flexbe_cli.events.trigger("quiz_command",{command:"start",id:e})}actionClose(t){t.preventDefault(),flexbe_cli.events.trigger("ui_modal_close")}reachGoals(t){let e=$(t.currentTarget),n=e.attr("data-action"),o=n==="modal"?e.attr("data-modal-id"):e.attr("href"),s=flexbe_cli.stat.getGoal(n,o),r=e.attr("data-goal"),a=e.attr("data-html-goal");flexbe_cli.stat.reachGoals({mainGoal:s,goal:r,htmlGoal:a})}getProductInfo(t){var e;let n=flexbe_cli.ecommerce.getProductInfo(t)||{};return(!((e=n)!=null&&e.title)||n.title==="-"||n.price==null&&!flexbe_cli.ecommerce.settings.allowPriceless)&&(n=null),n}};var qt,Tt=class i{static create(){return qt||(qt=new i,qt)}constructor(){this.bindEvents()}bindEvents(){let t=e=>{var n;return(n=$(e).find(".swiper")[0])==null?void 0:n.swiper};$("body").on("click",'a[href^="#prev"], a[href^="#next"], a[href^="#slide"]',e=>{let n,o=String(e.currentTarget.href).match(".*#(.*)")[1],[s,r]=o.split(":");if(r?n=t(`[data-id="${r}"]`):$(e.currentTarget).parents("[data-id]").toArray().some(l=>(n=t(l),n)),n){if(s==="prev")n.slidePrev();else if(s==="next")n.slideNext();else if(s.includes("slide")){let a=+s.match(/\d+$/)[0];n.slideTo(a-1)}e.preventDefault(),e.stopPropagation()}})}};var Mi=new Map,dt=new Map,Li={},Oe=i=>{let t=$(i),e=t.find("[data-component]").toArray();return t.each((n,o)=>{$(o).is("[data-component]")&&e.unshift(o)}),e},Fi=(i,t)=>{dt.has(i)||dt.set(i,t),i.componentInstance=t},so=i=>{i.componentInstance=null,dt.delete(i)},ro={registerComponent(i){Mi.set(i.is,i)},getComponentClass(i){return Mi.get(i)},getInstances(i){return Oe(i).map(t=>dt.get(t)).filter(Boolean)},getGlobalInstance(i){return Li[i]},setGlobalInstance(i,t){Li[i]=t},init(){this.setGlobalInstance("autoWidth",ut.create()),this.setGlobalInstance("lazyLoading",F.create()),this.setGlobalInstance("links",Ct.create()),this.setGlobalInstance("lightbox",kt.create()),this.setGlobalInstance("sliderControl",Tt.create()),this.setGlobalInstance("animation",Et.create()),flexbe_cli.events.off(".core_components").on("hideShowUI.core_components",i=>{Array.from(dt.values()).forEach(t=>t._onHideShowUI(i))}),$(window).off(".core_components").on("resized.core_components",()=>{Array.from(dt.values()).forEach(i=>i._onWindowResize())})},initInArea(i,t){bt(Oe(i),10).forEach(st(n=>n.forEach(o=>this.initComponent(o,t))))},destroyInArea(i){bt(Oe(i),10).forEach(st(e=>e.forEach(n=>this.destroyComponent(n))))},initComponent(i,t="init",e){if(!(i!=null&&i.isConnected))return null;let n=i.componentInstance;if(n)if(t==="update")n.destroy();else return Fi(i,n),n;e=e||flexbe_cli.entity.closestEntity(i);let o=String(i.getAttribute("data-component")).trim(),s=this.getComponentClass(o);return s?(typeof s=="function"&&(n=new s({component:i,core:e||flexbe_cli.entity.closestEntity(i),reason:t}),n._onInit(),Fi(i,n)),n):null},destroyComponent(i){let t=i.componentInstance;t&&t.destroy(),so(i)}},Me=ro;flexbe_cli.helpers=Ge;flexbe_cli.run=Y;flexbe_cli.utm=it;flexbe_cli.stat=le;flexbe_cli.events=b;flexbe_cli.locale=M;flexbe_cli.adaptive=ce;flexbe_cli.scroll=z;flexbe_cli.resize=P;flexbe_cli.tip=Je;flexbe_cli.transitions=Ft;flexbe_cli.require=R;flexbe_cli.fixed=he;flexbe_cli.entity=at;flexbe_cli.block=$e;flexbe_cli.modal=L;flexbe_cli.ecommerce=B;flexbe_cli.components=Me;ee(()=>{Y.init(),z.init(),P.init(),ce.init()},()=>{Me.init(),k(()=>le.init()),k(()=>B.init({enableDelivery:!0,enablePromotions:!0,enableProducts:!0})),k(()=>{at.init(),$e.init(),L.init()}),k(()=>ei.init()),k(()=>he.init(),200)});