const p=["transitionend","webkitTransitionEnd","oTransitionEnd"],g=["transition","MozTransition","webkitTransition","WebkitTransition","OTransition"],v=`
.layout-menu-fixed .layout-navbar-full .layout-menu,
.layout-menu-fixed-offcanvas .layout-navbar-full .layout-menu {
  top: {navbarHeight}px !important;
}
.layout-page {
  padding-top: {navbarHeight}px !important;
}
.content-wrapper {
  padding-bottom: {footerHeight}px !important;
}`;function d(e){throw new Error(`Parameter required${e?`: \`${e}\``:""}`)}const h={ROOT_EL:typeof window<"u"?document.documentElement:null,prefix:getComputedStyle(document.documentElement).getPropertyValue("--prefix").trim(),LAYOUT_BREAKPOINT:1200,RESIZE_DELAY:200,menuPsScroll:null,mainMenu:null,_curStyle:null,_styleEl:null,_resizeTimeout:null,_resizeCallback:null,_transitionCallback:null,_transitionCallbackTimeout:null,_listeners:[],_initialized:!1,_autoUpdate:!1,_setCookie(e,t,s=365,i="/",n=""){const o=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;let a="";if(s){const l=new Date;l.setTime(l.getTime()+s*24*60*60*1e3),a=`; expires=${l.toUTCString()}`}const r=`; path=${i}`,u=n?`; domain=${n}`:"";document.cookie=`${o}${a}${r}${u}`},_getCookie(e){const t=document.cookie.split("; ");for(let s=0;s<t.length;s++){const[i,n]=t[s].split("=");if(decodeURIComponent(i)===e)return decodeURIComponent(n)}return null},_scrollToActive(e=!1,t=500){const s=this.getLayoutMenu();if(!s)return;let i=s.querySelector("li.menu-item.active:not(.open)");if(i){const n=(l,c,m,f)=>(l/=f/2,l<1?m/2*l*l+c:(l-=1,-m/2*(l*(l-2)-1)+c)),o=this.getLayoutMenu().querySelector(".menu-inner");if(typeof i=="string"&&(i=document.querySelector(i)),typeof i!="number"&&(i=i.getBoundingClientRect().top+o.scrollTop),i<parseInt(o.clientHeight*2/3,10))return;const a=o.scrollTop,r=i-a-parseInt(o.clientHeight/2,10),u=+new Date;if(e===!0){const l=()=>{const m=+new Date-u,f=n(m,a,r,t);o.scrollTop=f,m<t?requestAnimationFrame(l):o.scrollTop=r};l()}else o.scrollTop=r}},_swipeIn(e,t){const{Hammer:s}=window;if(typeof s<"u"&&typeof e=="string"){const i=document.querySelector(e);i&&new s(i).on("panright",t)}},_swipeOut(e,t){const{Hammer:s}=window;typeof s<"u"&&typeof e=="string"&&setTimeout(()=>{const i=document.querySelector(e);if(i){const n=new s(i);n.get("pan").set({direction:s.DIRECTION_ALL,threshold:250}),n.on("panleft",t)}},500)},_addClass(e,t=this.ROOT_EL){t&&t.length!==void 0?t.forEach(s=>{s&&e.split(" ").forEach(i=>s.classList.add(i))}):t&&e.split(" ").forEach(s=>t.classList.add(s))},_removeClass(e,t=this.ROOT_EL){t&&t.length!==void 0?t.forEach(s=>{s&&e.split(" ").forEach(i=>s.classList.remove(i))}):t&&e.split(" ").forEach(s=>t.classList.remove(s))},_toggleClass(e=this.ROOT_EL,t,s){e.classList.contains(t)?e.classList.replace(t,s):e.classList.replace(s,t)},_hasClass(e,t=this.ROOT_EL){let s=!1;return e.split(" ").forEach(i=>{t.classList.contains(i)&&(s=!0)}),s},_findParent(e,t){if(e&&e.tagName.toUpperCase()==="BODY"||e.tagName.toUpperCase()==="HTML")return null;for(e=e.parentNode;e&&e.tagName.toUpperCase()!=="BODY"&&!e.classList.contains(t);)e=e.parentNode;return e=e&&e.tagName.toUpperCase()!=="BODY"?e:null,e},_triggerWindowEvent(e){if(!(typeof window>"u"))if(document.createEvent){let t;typeof Event=="function"?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!1,!0)),window.dispatchEvent(t)}else window.fireEvent(`on${e}`,document.createEventObject())},_triggerEvent(e){this._triggerWindowEvent(`layout${e}`),this._listeners.filter(t=>t.event===e).forEach(t=>t.callback.call(null))},_updateInlineStyle(e=0,t=0){this._styleEl||(this._styleEl=document.createElement("style"),this._styleEl.type="text/css",document.head.appendChild(this._styleEl));const s=v.replace(/\{navbarHeight\}/gi,e).replace(/\{footerHeight\}/gi,t);this._curStyle!==s&&(this._curStyle=s,this._styleEl.textContent=s)},_removeInlineStyle(){this._styleEl&&document.head.removeChild(this._styleEl),this._styleEl=null,this._curStyle=null},_redrawLayoutMenu(){const e=this.getLayoutMenu();if(e&&e.querySelector(".menu")){const t=e.querySelector(".menu-inner"),{scrollTop:s}=t,i=document.documentElement.scrollTop;return e.style.display="none",e.style.display="",t.scrollTop=s,document.documentElement.scrollTop=i,!0}return!1},_supportsTransitionEnd(){if(window.QUnit)return!1;const e=document.body||document.documentElement;if(!e)return!1;let t=!1;return g.forEach(s=>{typeof e.style[s]<"u"&&(t=!0)}),t},_getNavbarHeight(){const e=this.getLayoutNavbar();if(!e)return 0;if(!this.isSmallScreen())return e.getBoundingClientRect().height;const t=e.cloneNode(!0);t.id=null,t.style.visibility="hidden",t.style.position="absolute",Array.prototype.slice.call(t.querySelectorAll(".collapse.show")).forEach(i=>this._removeClass("show",i)),e.parentNode.insertBefore(t,e);const s=t.getBoundingClientRect().height;return t.parentNode.removeChild(t),s},_getFooterHeight(){const e=this.getLayoutFooter();return e?e.getBoundingClientRect().height:0},_getAnimationDuration(e){const t=window.getComputedStyle(e).transitionDuration;return parseFloat(t)*(t.indexOf("ms")!==-1?1:1e3)},_setMenuHoverState(e){this[e?"_addClass":"_removeClass"]("layout-menu-hover")},_setCollapsed(e){this.isSmallScreen()?e?this._removeClass("layout-menu-expanded"):setTimeout(()=>{this._addClass("layout-menu-expanded")},this._redrawLayoutMenu()?5:0):this[e?"_addClass":"_removeClass"]("layout-menu-collapsed")},_bindLayoutAnimationEndEvent(e,t){const s=this.getMenu(),i=s?this._getAnimationDuration(s)+50:0;if(!i){e.call(this),t.call(this);return}this._transitionCallback=n=>{n.target===s&&(this._unbindLayoutAnimationEndEvent(),t.call(this))},p.forEach(n=>{s.addEventListener(n,this._transitionCallback,!1)}),e.call(this),this._transitionCallbackTimeout=setTimeout(()=>{this._transitionCallback.call(this,{target:s})},i)},_unbindLayoutAnimationEndEvent(){const e=this.getMenu();this._transitionCallbackTimeout&&(clearTimeout(this._transitionCallbackTimeout),this._transitionCallbackTimeout=null),e&&this._transitionCallback&&p.forEach(t=>{e.removeEventListener(t,this._transitionCallback,!1)}),this._transitionCallback&&(this._transitionCallback=null)},_bindWindowResizeEvent(){this._unbindWindowResizeEvent();const e=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=null),this._triggerEvent("resize")};this._resizeCallback=()=>{this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(e,this.RESIZE_DELAY)},window.addEventListener("resize",this._resizeCallback,!1)},_unbindWindowResizeEvent(){this._resizeTimeout&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=null),this._resizeCallback&&(window.removeEventListener("resize",this._resizeCallback,!1),this._resizeCallback=null)},_bindMenuMouseEvents(){if(this._menuMouseEnter&&this._menuMouseLeave&&this._windowTouchStart)return;const e=this.getLayoutMenu();if(!e)return this._unbindMenuMouseEvents();this._menuMouseEnter||(this._menuMouseEnter=()=>this.isSmallScreen()||!this._hasClass("layout-menu-collapsed")||this.isOffcanvas()||this._hasClass("layout-transitioning")?this._setMenuHoverState(!1):this._setMenuHoverState(!0),e.addEventListener("mouseenter",this._menuMouseEnter,!1),e.addEventListener("touchstart",this._menuMouseEnter,!1)),this._menuMouseLeave||(this._menuMouseLeave=()=>{this._setMenuHoverState(!1)},e.addEventListener("mouseleave",this._menuMouseLeave,!1)),this._windowTouchStart||(this._windowTouchStart=t=>{(!t||!t.target||!this._findParent(t.target,".layout-menu"))&&this._setMenuHoverState(!1)},window.addEventListener("touchstart",this._windowTouchStart,!0))},_unbindMenuMouseEvents(){if(!this._menuMouseEnter&&!this._menuMouseLeave&&!this._windowTouchStart)return;const e=this.getLayoutMenu();this._menuMouseEnter&&(e&&(e.removeEventListener("mouseenter",this._menuMouseEnter,!1),e.removeEventListener("touchstart",this._menuMouseEnter,!1)),this._menuMouseEnter=null),this._menuMouseLeave&&(e&&e.removeEventListener("mouseleave",this._menuMouseLeave,!1),this._menuMouseLeave=null),this._windowTouchStart&&(e&&window.addEventListener("touchstart",this._windowTouchStart,!0),this._windowTouchStart=null),this._setMenuHoverState(!1)},scrollToActive(e=!1){this._scrollToActive(e)},swipeIn(e,t){this._swipeIn(e,t)},swipeOut(e,t){this._swipeOut(e,t)},setCollapsed(e=d("collapsed"),t=!0){this.getLayoutMenu()&&(this._unbindLayoutAnimationEndEvent(),t&&this._supportsTransitionEnd()?(this._addClass("layout-transitioning"),e&&this._setMenuHoverState(!1),this._bindLayoutAnimationEndEvent(()=>{this._setCollapsed(e)},()=>{this._removeClass("layout-transitioning"),this._triggerWindowEvent("resize"),this._triggerEvent("toggle"),this._setMenuHoverState(!1)})):(this._addClass("layout-no-transition"),e&&this._setMenuHoverState(!1),this._setCollapsed(e),setTimeout(()=>{this._removeClass("layout-no-transition"),this._triggerWindowEvent("resize"),this._triggerEvent("toggle"),this._setMenuHoverState(!1)},1)))},toggleCollapsed(e=!0){this.setCollapsed(!this.isCollapsed(),e)},setPosition(e=d("fixed"),t=d("offcanvas")){this._removeClass("layout-menu-offcanvas layout-menu-fixed layout-menu-fixed-offcanvas"),!e&&t?this._addClass("layout-menu-offcanvas"):e&&!t?(this._addClass("layout-menu-fixed"),this._redrawLayoutMenu()):e&&t&&(this._addClass("layout-menu-fixed-offcanvas"),this._redrawLayoutMenu()),this.update()},switchImage(e){e==="system"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Array.from(document.querySelectorAll(`[data-app-${e}-img]`)).forEach(s=>{const i=s.getAttribute(`data-app-${e}-img`);if(i){const n=`${assetsPath}img/${i}`,o=new Image;o.src=n,o.onload=()=>{s.src=o.src,s.style.visibility="visible"},s.style.visibility="hidden"}})},getLayoutMenu(){return document.querySelector(".layout-menu")},getMenu(){const e=this.getLayoutMenu();return e?this._hasClass("menu",e)?e:e.querySelector(".menu"):null},getLayoutNavbar(){return document.querySelector(".layout-navbar")},getLayoutFooter(){return document.querySelector(".content-footer")},getLayoutContainer(){return document.querySelector(".layout-page")},setNavbarFixed(e=d("fixed")){this[e?"_addClass":"_removeClass"]("layout-navbar-fixed"),this.update()},setNavbar(e){e==="sticky"?(this._addClass("layout-navbar-fixed"),this._removeClass("layout-navbar-hidden")):e==="hidden"?(this._addClass("layout-navbar-hidden"),this._removeClass("layout-navbar-fixed")):(this._removeClass("layout-navbar-hidden"),this._removeClass("layout-navbar-fixed")),this.update()},setFooterFixed(e=d("fixed")){this[e?"_addClass":"_removeClass"]("layout-footer-fixed"),this.update()},setColor(e,t){if(!e)return;const s=getComputedStyle(document.documentElement).getPropertyValue("--bs-primary").trim();if(e===s&&!t)return;const i=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);let a=document.getElementById("custom-css");a||(a=document.createElement("style"),a.id="custom-css",document.head.appendChild(a));function r(_){return(100-parseFloat(_))/100}const u=(i*299+n*587+o*114)/1e3,l=getComputedStyle(document.documentElement).getPropertyValue("--bs-min-contrast-ratio").trim()*100,c=getComputedStyle(document.documentElement).getPropertyValue("--bs-bg-label-tint-amount").trim("%"),m=getComputedStyle(document.documentElement).getPropertyValue("--bs-border-subtle-amount").trim(),f=u>=l?"#000":"#fff";a.innerHTML=`:root, [data-bs-theme=light], [data-bs-theme=dark] {
    --bs-primary: ${e};
    --bs-primary-rgb: ${i}, ${n}, ${o};
    --bs-primary-bg-subtle: color-mix(in sRGB, ${window.config.colors.cardColor} ${c}, ${e});
    --bs-primary-border-subtle: rgba(${i}, ${n}, ${o}, ${r(m)});
    --bs-primary-contrast: ${f}
  }`;const y=!(document.documentElement.getAttribute("data-template")||"").includes("front")?"admin-primaryColor":"front-primaryColor";typeof this._setCookie=="function"&&t&&this._setCookie(y,e,365)},applySkin(e){if(!e)return;let t=e;if(window.TemplateCustomizer&&window.TemplateCustomizer.SKINS){const n=window.TemplateCustomizer.SKINS;if(isNaN(parseInt(e)))typeof e=="string"&&(n.find(a=>a.name===e)||(t="default"));else{const o=parseInt(e),a=n.find(r=>r.id===o);a&&(t=a.name)}}if(document.documentElement.setAttribute("data-skin",t||"default"),!(document.documentElement.getAttribute("data-template")||"").includes("front"))if(typeof this._setCookie=="function")this._setCookie("customize_skin",t,365);else{const n=new Date;n.setTime(n.getTime()+365*24*60*60*1e3),document.cookie=`customize_skin=${t}; expires=${n.toUTCString()}; path=/`}},setContentLayout(e=d("contentLayout")){setTimeout(()=>{const t=document.querySelector(".content-wrapper > div");let s;document.querySelector(".layout-wrapper.layout-navbar-full")?s=document.querySelector(".layout-navbar-full .layout-navbar > div"):s=document.querySelector(".layout-content-navbar .layout-navbar");const i=document.querySelector(".content-footer > div"),n=[].slice.call(document.querySelectorAll(".container-fluid")),o=[].slice.call(document.querySelectorAll(".container-xxl"));let a=!1,r;document.querySelector(".content-wrapper > .menu-horizontal > div")&&(a=!0,r=document.querySelector(".content-wrapper > .menu-horizontal > div")),e==="compact"?(n.some(u=>[t,s,i].includes(u))&&(this._removeClass("container-fluid",[t,s,i]),this._addClass("container-xxl",[t,s,i])),a&&(this._removeClass("container-fluid",r),this._addClass("container-xxl",r))):(o.some(u=>[t,s,i].includes(u))&&(this._removeClass("container-xxl",[t,s,i]),this._addClass("container-fluid",[t,s,i])),a&&(this._removeClass("container-xxl",r),this._addClass("container-fluid",r)))},100)},update(){(this.getLayoutNavbar()&&(!this.isSmallScreen()&&this.isLayoutNavbarFull()&&this.isFixed()||this.isNavbarFixed())||this.getLayoutFooter()&&this.isFooterFixed())&&this._updateInlineStyle(this._getNavbarHeight(),this._getFooterHeight()),this._bindMenuMouseEvents()},setAutoUpdate(e=d("enable")){e&&!this._autoUpdate?(this.on("resize.Helpers:autoUpdate",()=>this.update()),this._autoUpdate=!0):!e&&this._autoUpdate&&(this.off("resize.Helpers:autoUpdate"),this._autoUpdate=!1)},updateCustomOptionCheck(e){e.checked?(e.type==="radio"&&[].slice.call(e.closest(".row").querySelectorAll(".custom-option")).map(function(s){s.closest(".custom-option").classList.remove("checked")}),e.closest(".custom-option").classList.add("checked")):e.closest(".custom-option").classList.remove("checked")},isRtl(){return document.querySelector("body").getAttribute("dir")==="rtl"||document.querySelector("html").getAttribute("dir")==="rtl"},isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1},isSmallScreen(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<this.LAYOUT_BREAKPOINT},isLayoutNavbarFull(){return!!document.querySelector(".layout-wrapper.layout-navbar-full")},isCollapsed(){return this.isSmallScreen()?!this._hasClass("layout-menu-expanded"):this._hasClass("layout-menu-collapsed")},isFixed(){return this._hasClass("layout-menu-fixed layout-menu-fixed-offcanvas")},isOffcanvas(){return this._hasClass("layout-menu-offcanvas layout-menu-fixed-offcanvas")},isNavbarFixed(){return this._hasClass("layout-navbar-fixed")||!this.isSmallScreen()&&this.isFixed()&&this.isLayoutNavbarFull()},isFooterFixed(){return this._hasClass("layout-footer-fixed")},isLightStyle(){return document.documentElement.getAttribute("data-bs-theme")==="light"},isDarkStyle(){return document.documentElement.getAttribute("data-bs-theme")==="dark"},on(e=d("event"),t=d("callback")){const[s]=e.split(".");let[,...i]=e.split(".");i=i.join(".")||null,this._listeners.push({event:s,namespace:i,callback:t})},off(e=d("event")){const[t]=e.split(".");let[,...s]=e.split(".");s=s.join(".")||null,this._listeners.filter(i=>i.event===t&&i.namespace===s).forEach(i=>this._listeners.splice(this._listeners.indexOf(i),1))},getStoredTheme:e=>(window.templateCustomizer?e=window.templateCustomizer._getSetting("Theme"):e=document.getElementsByTagName("HTML")[0].getAttribute("data-bs-theme"),e||(window.templateCustomizer.settings.defaultTheme?window.templateCustomizer.settings.defaultTheme:"light")),setStoredTheme:(e,t)=>{localStorage.setItem(`templateCustomizer-${e}--Theme`,t)},getPreferredTheme:e=>{const t=h.getStoredTheme(e);return t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},setTheme:e=>{e==="system"?document.documentElement.setAttribute("data-bs-theme",window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):document.documentElement.setAttribute("data-bs-theme",e);const t=!window.location.pathname.includes("/front-pages/"),s=t?"admin-mode":"front-mode",i=t?"admin-colorPref":"front-colorPref",n=(o,a,r=365)=>{const u=new Date;u.setTime(u.getTime()+r*24*60*60*1e3);const l="expires="+u.toUTCString();document.cookie=o+"="+a+";"+l+";path=/"};if(n(s,e),e==="system"){const a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n(i,a)}},showActiveTheme:(e,t=!1)=>{const s=document.querySelector("#nav-theme");if(!s)return;const i=document.querySelector("#nav-theme-text"),n=document.querySelector(".theme-icon-active"),o=document.querySelector(`[data-bs-theme-value="${e}"]`),a=o.querySelector("i").getAttribute("data-icon");document.querySelectorAll("[data-bs-theme-value]").forEach(c=>{c.classList.remove("active"),c.setAttribute("aria-pressed","false")}),o.classList.add("active"),o.setAttribute("aria-pressed","true");const u=Array.from(n.classList).filter(c=>!c.startsWith("tabler-"));n.setAttribute("class",`tabler-${a} ${u.join(" ")}`);const l=`${i.textContent} (${o.dataset.bsThemeValue})`;s.setAttribute("aria-label",l),t&&s.focus()},syncThemeToggles:e=>{document.querySelectorAll("[data-bs-theme-value]").forEach(t=>{t.getAttribute("data-bs-theme-value")===e&&t.click()})},syncCustomOptions:e=>{const t=document.querySelector(`.template-customizer-themes-options input[value="${e}"]`);t&&(t.checked=!0,window.Helpers.updateCustomOptionCheck(t))},syncCustomOptionsRtl:e=>{const t=document.querySelector(`.template-customizer-directions-options input[value="${e}"]`);t&&(t.checked=!0,window.Helpers.updateCustomOptionCheck(t))},init(){this._initialized||(this._initialized=!0,this._updateInlineStyle(0),this._bindWindowResizeEvent(),this.off("init._Helpers"),this.on("init._Helpers",()=>{this.off("resize._Helpers:redrawMenu"),this.on("resize._Helpers:redrawMenu",()=>{this.isSmallScreen()&&!this.isCollapsed()&&this._redrawLayoutMenu()}),typeof document.documentMode=="number"&&document.documentMode<11&&(this.off("resize._Helpers:ie10RepaintBody"),this.on("resize._Helpers:ie10RepaintBody",()=>{if(this.isFixed())return;const{scrollTop:e}=document.documentElement;document.body.style.display="none",document.body.style.display="block",document.documentElement.scrollTop=e}))}),this._triggerEvent("init"))},destroy(){this._initialized&&(this._initialized=!1,this._removeClass("layout-transitioning"),this._removeInlineStyle(),this._unbindLayoutAnimationEndEvent(),this._unbindWindowResizeEvent(),this._unbindMenuMouseEvents(),this.setAutoUpdate(!1),this.off("init._Helpers"),this._listeners.filter(e=>e.event!=="init").forEach(e=>this._listeners.splice(this._listeners.indexOf(e),1)))},initPasswordToggle(){const e=document.querySelectorAll(".form-password-toggle i");typeof e<"u"&&e!==null&&e.forEach(t=>{t.addEventListener("click",s=>{s.preventDefault();const i=t.closest(".form-password-toggle"),n=i.querySelector("i"),o=i.querySelector("input");o.getAttribute("type")==="text"?(o.setAttribute("type","password"),n.classList.replace("tabler-eye","tabler-eye-off")):o.getAttribute("type")==="password"&&(o.setAttribute("type","text"),n.classList.replace("tabler-eye-off","tabler-eye"))})})},initCustomOptionCheck(){const e=this;[].slice.call(document.querySelectorAll(".custom-option .form-check-input")).map(function(s){e.updateCustomOptionCheck(s),s.addEventListener("click",i=>{e.updateCustomOptionCheck(s)})})},initSpeechToText(){const e=window.SpeechRecognition||window.webkitSpeechRecognition,t=document.querySelectorAll(".speech-to-text");if(e!=null&&typeof t<"u"&&t!==null){const s=new e;document.querySelectorAll(".speech-to-text i").forEach(n=>{let o=!1;n.addEventListener("click",()=>{n.closest(".input-group").querySelector(".form-control").focus(),s.onspeechstart=()=>{o=!0},o===!1&&s.start(),s.onerror=()=>{o=!1},s.onresult=a=>{n.closest(".input-group").querySelector(".form-control").value=a.results[0][0].transcript},s.onspeechend=()=>{o=!1,s.stop()}})})}},initNavbarDropdownScrollbar(){const e=document.querySelectorAll(".navbar-dropdown .scrollable-container"),{PerfectScrollbar:t}=window;t!==void 0&&typeof e<"u"&&e!==null&&e.forEach(s=>{new t(s,{wheelPropagation:!1,suppressScrollX:!0})})},ajaxCall(e){return new Promise((t,s)=>{const i=new XMLHttpRequest;i.open("GET",e),i.onload=()=>i.status===200?t(i.response):s(Error(i.statusText)),i.onerror=n=>s(Error(`Network Error: ${n}`)),i.send()})},initSidebarToggle(){document.querySelectorAll('[data-bs-toggle="sidebar"]').forEach(t=>{t.addEventListener("click",()=>{const s=t.getAttribute("data-target"),i=t.getAttribute("data-overlay"),n=document.querySelectorAll(".app-overlay");document.querySelectorAll(s).forEach(a=>{a.classList.toggle("show"),typeof i<"u"&&i!==null&&i!==!1&&typeof n<"u"&&(a.classList.contains("show")?n[0].classList.add("show"):n[0].classList.remove("show"),n[0].addEventListener("click",r=>{r.currentTarget.classList.remove("show"),a.classList.remove("show")}))})})})},getCssVar(e,t=!1){return t===!0?getComputedStyle(document.documentElement).getPropertyValue(`--${window.Helpers.prefix}${e}`).trim():`var(--${window.Helpers.prefix}${e})`},maxLengthCount(e,t,s){const i=e.value.length,n=s-i;t.className="maxLength label-success",n>=0&&(t.textContent=`You typed ${i} out of ${s} characters.`),n<=0&&(t.textContent=`You typed ${i} out of ${s} characters.`,t.classList.remove("label-success"),t.classList.add("label-danger"))}};typeof window<"u"&&(h.init(),h.isMobileDevice()&&window.chrome&&document.documentElement.classList.add("layout-menu-100vh"),document.readyState==="complete"?h.update():document.addEventListener("DOMContentLoaded",function e(){h.update(),document.removeEventListener("DOMContentLoaded",e)}));window.Helpers=h;
