!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&"object"==typeof module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b){var i=".smartmenus_mouse";if(h||b)h&&b&&(a(document).off(i),h=!1);else{var j=!0,k=null,l={mousemove:function(b){var c={x:b.pageX,y:b.pageY,timeStamp:(new Date).getTime()};if(k){var d=Math.abs(k.x-c.x),g=Math.abs(k.y-c.y);if((d>0||g>0)&&d<=4&&g<=4&&c.timeStamp-k.timeStamp<=300&&(f=!0,j)){var h=a(b.target).closest("a");h.is("a")&&a.each(e,function(){if(a.contains(this.$root[0],h[0]))return this.itemEnter({currentTarget:h[0]}),!1}),j=!1}}k=c}};l[g?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(a){c(a.originalEvent)&&(f=!1)},a(document).on(d(l,i)),h=!0}}function c(a){return!/^(4|mouse)$/.test(a.pointerType)}function d(a,b){b||(b="");var c={};for(var d in a)c[d.split(" ").join(b+" ")+b]=a[d];return c}var e=[],f=!1,g="ontouchstart"in window,h=!1,i=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},j=window.cancelAnimationFrame||function(a){clearTimeout(a)},k=!!a.fn.animate;return a.SmartMenus=function(b,c){this.$root=a(b),this.opts=c,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in b.style||"webkitPerspective"in b.style,this.wasCollapsible=!1,this.init()},a.extend(a.SmartMenus,{hideAll:function(){a.each(e,function(){this.menuHideAll()})},destroy:function(){for(;e.length;)e[0].destroy();b(!0)},prototype:{init:function(c){var f=this;if(!c){e.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var g=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(d({"mouseover focusin":a.proxy(this.rootOver,this),"mouseout focusout":a.proxy(this.rootOut,this),keydown:a.proxy(this.rootKeyDown,this)},g)).on(d({mouseenter:a.proxy(this.itemEnter,this),mouseleave:a.proxy(this.itemLeave,this),mousedown:a.proxy(this.itemDown,this),focus:a.proxy(this.itemFocus,this),blur:a.proxy(this.itemBlur,this),click:a.proxy(this.itemClick,this)},g),"a"),g+=this.rootId,this.opts.hideOnClick&&a(document).on(d({touchstart:a.proxy(this.docTouchStart,this),touchmove:a.proxy(this.docTouchMove,this),touchend:a.proxy(this.docTouchEnd,this),click:a.proxy(this.docClick,this)},g)),a(window).on(d({"resize orientationchange":a.proxy(this.winResize,this)},g)),this.opts.subIndicators&&(this.$subArrow=a("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),b()}if(this.$firstSub=this.$root.find("ul").each(function(){f.menuInit(a(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var h=/(index|default)\.[^#\?\/]*/i,i=/#.*/,j=window.location.href.replace(h,""),k=j.replace(i,"");this.$root.find("a:not(.mega-menu a)").each(function(){var b=this.href.replace(h,""),c=a(this);b!=j&&b!=k||(c.addClass("current"),f.opts.markCurrentTree&&c.parentsUntil("[data-smartmenus-id]","ul").each(function(){a(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(b){if(!b){var c=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(c),c+=this.rootId,a(document).off(c),a(window).off(c),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var d=this;this.$root.find("ul").each(function(){var b=a(this);b.dataSM("scroll-arrows")&&b.dataSM("scroll-arrows").remove(),b.dataSM("shown-before")&&((d.opts.subMenusMinWidth||d.opts.subMenusMaxWidth)&&b.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),b.dataSM("scroll-arrows")&&b.dataSM("scroll-arrows").remove(),b.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(b.attr("id")||"").indexOf(d.accessIdPrefix)&&b.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var b=a(this);0==b.attr("id").indexOf(d.accessIdPrefix)&&b.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),b||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),e.splice(a.inArray(this,e),1))},disable:function(b){if(!this.disabled){if(this.menuHideAll(),!b&&!this.opts.isPopup&&this.$root.is(":visible")){var c=this.$root.offset();this.$disableOverlay=a('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:c.top,left:c.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(b){return this.$touchScrollingSub?void(this.$touchScrollingSub=null):void((this.visibleSubMenus.length&&!a.contains(this.$root[0],b.target)||a(b.target).closest("a").length)&&this.menuHideAll())},docTouchEnd:function(b){if(this.lastTouch){if(this.visibleSubMenus.length&&(void 0===this.lastTouch.x2||this.lastTouch.x1==this.lastTouch.x2)&&(void 0===this.lastTouch.y2||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!a.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var c=this;this.hideTimeout=setTimeout(function(){c.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(a){if(this.lastTouch){var b=a.originalEvent.touches[0];this.lastTouch.x2=b.pageX,this.lastTouch.y2=b.pageY}},docTouchStart:function(a){var b=a.originalEvent.touches[0];this.lastTouch={x1:b.pageX,y1:b.pageY,target:b.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(b){for(var c=a(b).closest("ul");c.dataSM("in-mega");)c=c.parent().closest("ul");return c[0]||null},getHeight:function(a){return this.getOffset(a,!0)},getOffset:function(a,b){var c;"none"==a.css("display")&&(c={position:a[0].style.position,visibility:a[0].style.visibility},a.css({position:"absolute",visibility:"hidden"}).show());var d=a[0].getBoundingClientRect&&a[0].getBoundingClientRect(),e=d&&(b?d.height||d.bottom-d.top:d.width||d.right-d.left);return e||0===e||(e=b?a[0].offsetHeight:a[0].offsetWidth),c&&a.hide().css(c),e},getStartZIndex:function(a){var b=parseInt(this[a?"$root":"$firstSub"].css("z-index"));return!a&&isNaN(b)&&(b=parseInt(this.$root.css("z-index"))),isNaN(b)?1:b},getTouchPoint:function(a){return a.touches&&a.touches[0]||a.changedTouches&&a.changedTouches[0]||a},getViewport:function(a){var b=a?"Height":"Width",c=document.documentElement["client"+b],d=window["inner"+b];return d&&(c=Math.min(c,d)),c},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(a){return this.getOffset(a)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(a){return this.handleEvents()&&!this.isLinkInMegaMenu(a)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var b="fixed"==this.$root.css("position");return b||this.$root.parentsUntil("body").each(function(){if("fixed"==a(this).css("position"))return b=!0,!1}),b},isLinkInMegaMenu:function(b){return a(this.getClosestMenu(b[0])).hasClass("mega-menu")},isTouchMode:function(){return!f||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(b,c){var d=b.closest("ul"),e=d.dataSM("level");if(e>1&&(!this.activatedItems[e-2]||this.activatedItems[e-2][0]!=d.dataSM("parent-a")[0])){var f=this;a(d.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(d).each(function(){f.itemActivate(a(this).dataSM("parent-a"))})}if(this.isCollapsible()&&!c||this.menuHideSubMenus(this.activatedItems[e-1]&&this.activatedItems[e-1][0]==b[0]?e:e-1),this.activatedItems[e-1]=b,this.$root.triggerHandler("activate.smapi",b[0])!==!1){var g=b.dataSM("sub");g&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(g)}},itemBlur:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&this.$root.triggerHandler("blur.smapi",c[0])},itemClick:function(b){var c=a(b.currentTarget);if(this.handleItemEvents(c)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==c.closest("ul")[0])return this.$touchScrollingSub=null,b.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",c[0])===!1)return!1;var d=c.dataSM("sub"),e=!!d&&2==d.dataSM("level");if(d){var f=a(b.target).is(".sub-arrow"),g=this.isCollapsible(),h=/toggle$/.test(this.opts.collapsibleBehavior),i=/link$/.test(this.opts.collapsibleBehavior),j=/^accordion/.test(this.opts.collapsibleBehavior);if(d.is(":visible")){if(!g&&this.opts.showOnClick&&e)return this.menuHide(d),this.clickActivated=!1,this.focusActivated=!1,!1;if(g&&(h||f))return this.itemActivate(c,j),this.menuHide(d),!1}else if((!i||!g||f)&&(!g&&this.opts.showOnClick&&e&&(this.clickActivated=!0),this.itemActivate(c,j),d.is(":visible")))return this.focusActivated=!0,!1}return!(!g&&this.opts.showOnClick&&e||c.hasClass("disabled")||this.$root.triggerHandler("select.smapi",c[0])===!1)&&void 0}},itemDown:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&c.dataSM("mousedown",!0)},itemEnter:function(b){var c=a(b.currentTarget);if(this.handleItemEvents(c)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var d=this;this.showTimeout=setTimeout(function(){d.itemActivate(c)},this.opts.showOnClick&&1==c.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",c[0])}},itemFocus:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&(!this.focusActivated||this.isTouchMode()&&c.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==c[0]||this.itemActivate(c,!0),this.$root.triggerHandler("focus.smapi",c[0]))},itemLeave:function(b){var c=a(b.currentTarget);this.handleItemEvents(c)&&(this.isTouchMode()||(c[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),c.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",c[0]))},menuHide:function(b){if(this.$root.triggerHandler("beforehide.smapi",b[0])!==!1&&(k&&b.stop(!0,!0),"none"!=b.css("display"))){var c=function(){b.css("z-index","")};this.isCollapsible()?k&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,b,c):b.hide(this.opts.collapsibleHideDuration,c):k&&this.opts.hideFunction?this.opts.hideFunction.call(this,b,c):b.hide(this.opts.hideDuration,c),b.dataSM("scroll")&&(this.menuScrollStop(b),b.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),b.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),b.attr({"aria-expanded":"false","aria-hidden":"true"});var d=b.dataSM("level");this.activatedItems.splice(d-1,1),this.visibleSubMenus.splice(a.inArray(b,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",b[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var a=this.opts.isPopup?1:0,b=this.visibleSubMenus.length-1;b>=a;b--)this.menuHide(this.visibleSubMenus[b]);this.opts.isPopup&&(k&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(k&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(a){for(var b=this.activatedItems.length-1;b>=a;b--){var c=this.activatedItems[b].dataSM("sub");c&&this.menuHide(c)}},menuInit:function(a){if(!a.dataSM("in-mega")){a.hasClass("mega-menu")&&a.find("ul").dataSM("in-mega",!0);for(var b=2,c=a[0];(c=c.parentNode.parentNode)!=this.$root[0];)b++;var d=a.prevAll("a").eq(-1);d.length||(d=a.prevAll().find("a").eq(-1)),d.addClass("has-submenu").dataSM("sub",a),a.dataSM("parent-a",d).dataSM("level",b).parent().dataSM("sub",a);var e=d.attr("id")||this.accessIdPrefix+ ++this.idInc,f=a.attr("id")||this.accessIdPrefix+ ++this.idInc;d.attr({id:e,"aria-haspopup":"true","aria-controls":f,"aria-expanded":"false"}),a.attr({id:f,role:"group","aria-hidden":"true","aria-labelledby":e,"aria-expanded":"false"}),this.opts.subIndicators&&d[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(b){var c,e,f=b.dataSM("parent-a"),h=f.closest("li"),i=h.parent(),j=b.dataSM("level"),k=this.getWidth(b),l=this.getHeight(b),m=f.offset(),n=m.left,o=m.top,p=this.getWidth(f),q=this.getHeight(f),r=a(window),s=r.scrollLeft(),t=r.scrollTop(),u=this.getViewportWidth(),v=this.getViewportHeight(),w=i.parent().is("[data-sm-horizontal-sub]")||2==j&&!i.hasClass("sm-vertical"),x=this.opts.rightToLeftSubMenus&&!h.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&h.is("[data-sm-reverse]"),y=2==j?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,z=2==j?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(w?(c=x?p-k-y:y,e=this.opts.bottomToTopSubMenus?-l-z:q+z):(c=x?y-k:p-y,e=this.opts.bottomToTopSubMenus?q-z-l:z),this.opts.keepInViewport){var A=n+c,B=o+e;if(x&&A<s?c=w?s-A+c:p-y:!x&&A+k>s+u&&(c=w?s+u-k-A+c:y-k),w||(l<v&&B+l>t+v?e+=t+v-l-B:(l>=v||B<t)&&(e+=t-B)),w&&(B+l>t+v+.49||B<t)||!w&&l>v+.49){var C=this;b.dataSM("scroll-arrows")||b.dataSM("scroll-arrows",a([a('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],a('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).on({mouseenter:function(){b.dataSM("scroll").up=a(this).hasClass("scroll-up"),C.menuScroll(b)},mouseleave:function(a){C.menuScrollStop(b),C.menuScrollOut(b,a)},"mousewheel DOMMouseScroll":function(a){a.preventDefault()}}).insertAfter(b));var D=".smartmenus_scroll";if(b.dataSM("scroll",{y:this.cssTransforms3d?0:e-q,step:1,itemH:q,subH:l,arrowDownH:this.getHeight(b.dataSM("scroll-arrows").eq(1))}).on(d({mouseover:function(a){C.menuScrollOver(b,a)},mouseout:function(a){C.menuScrollOut(b,a)},"mousewheel DOMMouseScroll":function(a){C.menuScrollMousewheel(b,a)}},D)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:c+(parseInt(b.css("border-left-width"))||0),width:k-(parseInt(b.css("border-left-width"))||0)-(parseInt(b.css("border-right-width"))||0),zIndex:b.css("z-index")}).eq(w&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var E={};E[g?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(a){C.menuScrollTouch(b,a)},b.css({"touch-action":"none","-ms-touch-action":"none"}).on(d(E,D))}}}b.css({top:"auto",left:"0",marginLeft:c,marginTop:e-q})},menuScroll:function(a,b,c){var d,e=a.dataSM("scroll"),g=a.dataSM("scroll-arrows"),h=e.up?e.upEnd:e.downEnd;if(!b&&e.momentum){if(e.momentum*=.92,d=e.momentum,d<.5)return void this.menuScrollStop(a)}else d=c||(b||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(e.step));var j=a.dataSM("level");if(this.activatedItems[j-1]&&this.activatedItems[j-1].dataSM("sub")&&this.activatedItems[j-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(j-1),e.y=e.up&&h<=e.y||!e.up&&h>=e.y?e.y:Math.abs(h-e.y)>d?e.y+(e.up?d:-d):h,a.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+e.y+"px, 0)",transform:"translate3d(0, "+e.y+"px, 0)"}:{marginTop:e.y}),f&&(e.up&&e.y>e.downEnd||!e.up&&e.y<e.upEnd)&&g.eq(e.up?1:0).show(),e.y==h)f&&g.eq(e.up?0:1).hide(),this.menuScrollStop(a);else if(!b){this.opts.scrollAccelerate&&e.step<this.opts.scrollStep&&(e.step+=.2);var k=this;this.scrollTimeout=i(function(){k.menuScroll(a)})}},menuScrollMousewheel:function(a,b){if(this.getClosestMenu(b.target)==a[0]){b=b.originalEvent;var c=(b.wheelDelta||-b.detail)>0;a.dataSM("scroll-arrows").eq(c?0:1).is(":visible")&&(a.dataSM("scroll").up=c,this.menuScroll(a,!0))}b.preventDefault()},menuScrollOut:function(b,c){f&&(/^scroll-(up|down)/.test((c.relatedTarget||"").className)||(b[0]==c.relatedTarget||a.contains(b[0],c.relatedTarget))&&this.getClosestMenu(c.relatedTarget)==b[0]||b.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(b,c){if(f&&!/^scroll-(up|down)/.test(c.target.className)&&this.getClosestMenu(c.target)==b[0]){this.menuScrollRefreshData(b);var d=b.dataSM("scroll"),e=a(window).scrollTop()-b.dataSM("parent-a").offset().top-d.itemH;b.dataSM("scroll-arrows").eq(0).css("margin-top",e).end().eq(1).css("margin-top",e+this.getViewportHeight()-d.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(b){var c=b.dataSM("scroll"),d=a(window).scrollTop()-b.dataSM("parent-a").offset().top-c.itemH;this.cssTransforms3d&&(d=-(parseFloat(b.css("margin-top"))-d)),a.extend(c,{upEnd:d,downEnd:d+this.getViewportHeight()-c.subH})},menuScrollStop:function(a){if(this.scrollTimeout)return j(this.scrollTimeout),this.scrollTimeout=0,a.dataSM("scroll").step=1,!0},menuScrollTouch:function(b,d){if(d=d.originalEvent,c(d)){var e=this.getTouchPoint(d);if(this.getClosestMenu(e.target)==b[0]){var f=b.dataSM("scroll");if(/(start|down)$/i.test(d.type))this.menuScrollStop(b)?(d.preventDefault(),this.$touchScrollingSub=b):this.$touchScrollingSub=null,this.menuScrollRefreshData(b),a.extend(f,{touchStartY:e.pageY,touchStartTime:d.timeStamp});else if(/move$/i.test(d.type)){var g=void 0!==f.touchY?f.touchY:f.touchStartY;if(void 0!==g&&g!=e.pageY){this.$touchScrollingSub=b;var h=g<e.pageY;void 0!==f.up&&f.up!=h&&a.extend(f,{touchStartY:e.pageY,touchStartTime:d.timeStamp}),a.extend(f,{up:h,touchY:e.pageY}),this.menuScroll(b,!0,Math.abs(e.pageY-g))}d.preventDefault()}else void 0!==f.touchY&&((f.momentum=15*Math.pow(Math.abs(e.pageY-f.touchStartY)/(d.timeStamp-f.touchStartTime),2))&&(this.menuScrollStop(b),this.menuScroll(b),d.preventDefault()),delete f.touchY)}}},menuShow:function(a){if((a.dataSM("beforefirstshowfired")||(a.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",a[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",a[0])!==!1&&(a.dataSM("shown-before",!0),k&&a.stop(!0,!0),!a.is(":visible"))){var b=a.dataSM("parent-a"),c=this.isCollapsible();if((this.opts.keepHighlighted||c)&&b.addClass("highlighted"),c)a.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(a.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(a.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&a.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var d=this.getWidth(a);a.css("max-width",this.opts.subMenusMaxWidth),d>this.getWidth(a)&&a.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(a)}var e=function(){a.css("overflow","")};c?k&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,a,e):a.show(this.opts.collapsibleShowDuration,e):k&&this.opts.showFunction?this.opts.showFunction.call(this,a,e):a.show(this.opts.showDuration,e),b.attr("aria-expanded","true"),a.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(a),this.$root.triggerHandler("show.smapi",a[0])}},popupHide:function(a){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var b=this;this.hideTimeout=setTimeout(function(){b.menuHideAll()},a?1:this.opts.hideTimeout)},popupShow:function(a,b){if(!this.opts.isPopup)return void alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),k&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:a,top:b});var c=this,d=function(){c.$root.css("overflow","")};k&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,d):this.$root.show(this.opts.showDuration,d),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(b){if(this.handleEvents())switch(b.keyCode){case 27:var c=this.activatedItems[0];if(c){this.menuHideAll(),c[0].focus();var d=c.dataSM("sub");d&&this.menuHide(d)}break;case 32:var e=a(b.target);if(e.is("a")&&this.handleItemEvents(e)){var d=e.dataSM("sub");d&&!d.is(":visible")&&(this.itemClick({currentTarget:b.target}),b.preventDefault())}}},rootOut:function(a){if(this.handleEvents()&&!this.isTouchMode()&&a.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var b=this;this.hideTimeout=setTimeout(function(){b.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(a){this.handleEvents()&&!this.isTouchMode()&&a.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(a){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==a.type){var b=this.isCollapsible();this.wasCollapsible&&b||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=b}}else if(this.$disableOverlay){var c=this.$root.offset();this.$disableOverlay.css({top:c.top,left:c.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),a.fn.dataSM=function(a,b){return b?this.data(a+"_smartmenus",b):this.data(a+"_smartmenus")},a.fn.removeDataSM=function(a){return this.removeData(a+"_smartmenus")},a.fn.smartmenus=function(b){if("string"==typeof b){var c=arguments,d=b;return Array.prototype.shift.call(c),this.each(function(){var b=a(this).data("smartmenus");b&&b[d]&&b[d].apply(b,c)})}return this.each(function(){var c=a(this).data("sm-options")||null;c&&"object"!=typeof c&&(c=null,alert('ERROR\n\nSmartMenus jQuery init:\nThe value of the "data-sm-options" attribute must be valid JSON.')),c&&a.each(["showFunction","hideFunction","collapsibleShowFunction","collapsibleHideFunction"],function(){this in c&&delete c[this]}),new a.SmartMenus(this,a.extend({},a.fn.smartmenus.defaults,b,c))})},a.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(a,b){a.fadeOut(200,b)},collapsibleShowDuration:0,collapsibleShowFunction:function(a,b){a.slideDown(200,b)},collapsibleHideDuration:0,collapsibleHideFunction:function(a,b){a.slideUp(200,b)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},a});
!function(){"use strict";var e={d:function(t,n){for(var l in n)e.o(n,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:n[l]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{init:function(){return f},register:function(){return r},registerBySelector:function(){return a},unregister:function(){return o},unregisterBySelector:function(){return s}});const n=new Map,l=new Map,r=({elementType:e,id:t,callback:l})=>{n.has(e)||n.set(e,new Map),n.get(e)?.has(t)||n.get(e)?.set(t,l)};Object.defineProperty(window,"registerElementorElement",{value:r,enumerable:!0});const o=({elementType:e,id:t})=>{n.has(e)&&(t?(n.get(e)?.delete(t),0===n.get(e)?.size&&n.delete(e)):n.delete(e))},a=({id:e,selector:t,callback:n})=>{l.has(t)||l.set(t,new Map),l.get(t)?.has(e)||l.get(t)?.set(e,n)},s=({selector:e,id:t})=>{l.has(e)&&(t?(l.get(e)?.delete(t),0===l.get(e)?.size&&l.delete(e)):l.delete(e))},i=new WeakMap,d="elementor/element/rendered",m="elementor/element/destroyed",c=({element:e,elementType:t,elementId:l})=>{y(e);const r=new AbortController,o=[],a=()=>{u({element:e,controller:r}),e.dispatchEvent(new CustomEvent(d,{bubbles:!0,detail:{element:e,elementType:t,elementId:l}}))};e.isConnected?a():requestAnimationFrame(()=>{a()}),n.has(t)&&(g({element:e,controller:r,manualUnmount:o}),Array.from(n.get(t)?.values()??[]).forEach(t=>{const n=e.getAttribute("data-e-settings"),l=t({element:e,signal:r.signal,settings:n?JSON.parse(n):{},listenToChildren:t=>({render:n=>{const l=e=>{const{elementType:l}=e.detail;t.includes(l)&&n()};e.addEventListener(d,l,{signal:r.signal}),e.addEventListener(m,l,{signal:r.signal})}})});"function"==typeof l&&o.push(l)}))},u=({element:e,controller:t})=>{let n=!1;const r=[];Array.from(l.entries()??[]).forEach(([l,o])=>{e.matches(l)&&(n=!0,Array.from(o.values()??[]).forEach(n=>{const l=e.getAttribute("data-e-settings"),o=n({element:e,signal:t.signal,settings:l?JSON.parse(l):{}});"function"==typeof o&&r.push(o)}))}),n&&g({element:e,controller:t,manualUnmount:r})},p=({elementType:e,elementId:t,element:n})=>{var l;n&&(y(n),(l={element:n,elementType:e,elementId:t}).element.dispatchEvent(new CustomEvent(m,{bubbles:!0,detail:l})))},g=({element:e,controller:t,manualUnmount:n})=>{const l=i.get(e);l?l.manualUnmount.push(...n):i.set(e,{controller:t,manualUnmount:n})},y=e=>{const t=i.get(e);t&&(t.controller.abort(),t.manualUnmount.forEach(e=>e()),i.delete(e))};function f(){window.addEventListener("elementor/element/render",e=>{const t=e,{id:n,type:l,element:r}=t.detail;c({element:r,elementType:l,elementId:n})}),window.addEventListener("elementor/element/destroy",e=>{const t=e,{id:n,type:l,element:r}=t.detail;p({elementType:l,elementId:n,element:r})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("[data-e-type]").forEach(e=>{const t=e,{eType:n,id:l}=t.dataset;n&&l&&c({element:t,elementType:n,elementId:l})})})}(window.elementorV2=window.elementorV2||{}).frontendHandlers=t}(),window.elementorV2.frontendHandlers?.init?.();
!function(){"use strict";var e={d:function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Alpine:function(){return ni},init:function(){return ii},refreshTree:function(){return ri}});var n,i,r,o,s=!1,a=!1,l=[],c=-1;function u(e){let t=l.indexOf(e);-1!==t&&t>c&&l.splice(t,1)}function p(){s=!1,a=!0;for(let e=0;e<l.length;e++)l[e](),c=e;l.length=0,c=-1,a=!1}var f=!0;function d(e){i=e}function h(e,t){let n,o=!0,s=i(()=>{let i=e();JSON.stringify(i),o?n=i:queueMicrotask(()=>{t(i,n),n=i}),o=!1});return()=>r(s)}var _=[],m=[],g=[];function x(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,m.push(t))}function v(e){_.push(e)}function y(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function b(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,i])=>{(void 0===t||t.includes(n))&&(i.forEach(e=>e()),delete e._x_attributeCleanups[n])})}var w=new MutationObserver(R),E=!1;function O(){w.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),E=!0}function A(){!function(){let e=w.takeRecords();k.push(()=>e.length>0&&R(e));let t=k.length;queueMicrotask(()=>{if(k.length===t)for(;k.length>0;)k.shift()()})}(),w.disconnect(),E=!1}var k=[];function T(e){if(!E)return e();A();let t=e();return O(),t}var S=!1,N=[];function R(e){if(S)return void(N=N.concat(e));let t=[],n=new Set,i=new Map,r=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&("childList"===e[o].type&&(e[o].removedNodes.forEach(e=>{1===e.nodeType&&e._x_marker&&n.add(e)}),e[o].addedNodes.forEach(e=>{1===e.nodeType&&(n.has(e)?n.delete(e):e._x_marker||t.push(e))})),"attributes"===e[o].type)){let t=e[o].target,n=e[o].attributeName,s=e[o].oldValue,a=()=>{i.has(t)||i.set(t,[]),i.get(t).push({name:n,value:t.getAttribute(n)})},l=()=>{r.has(t)||r.set(t,[]),r.get(t).push(n)};t.hasAttribute(n)&&null===s?a():t.hasAttribute(n)?(l(),a()):l()}r.forEach((e,t)=>{b(t,e)}),i.forEach((e,t)=>{_.forEach(n=>n(t,e))});for(let e of n)t.some(t=>t.contains(e))||m.forEach(t=>t(e));for(let e of t)e.isConnected&&g.forEach(t=>t(e));t=null,n=null,i=null,r=null}function C(e){return j($(e))}function P(e,t,n){return e._x_dataStack=[t,...$(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(e=>e!==t)}}function $(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?$(e.host):e.parentNode?$(e.parentNode):[]}function j(e){return new Proxy({objects:e},U)}var U={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(e=>Object.keys(e))))},has({objects:e},t){return t!=Symbol.unscopables&&e.some(e=>Object.prototype.hasOwnProperty.call(e,t)||Reflect.has(e,t))},get({objects:e},t,n){return"toJSON"==t?I:Reflect.get(e.find(e=>Reflect.has(e,t))||{},t,n)},set({objects:e},t,n,i){const r=e.find(e=>Object.prototype.hasOwnProperty.call(e,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(r,t);return o?.set&&o?.get?o.set.call(i,n)||!0:Reflect.set(r,t,n)}};function I(){return Reflect.ownKeys(this).reduce((e,t)=>(e[t]=Reflect.get(this,t),e),{})}function L(e){let t=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([r,{value:o,enumerable:s}])=>{if(!1===s||void 0===o)return;if("object"==typeof o&&null!==o&&o.__v_skip)return;let a=""===i?r:`${i}.${r}`;var l;"object"==typeof o&&null!==o&&o._x_interceptor?n[r]=o.initialize(e,a,r):"object"!=typeof(l=o)||Array.isArray(l)||null===l||o===n||o instanceof Element||t(o,a)})};return t(e)}function M(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(t,n,i){return e(this.initialValue,()=>function(e,t){return t.split(".").reduce((e,t)=>e[t],e)}(t,n),e=>B(t,n,e),n,i)}};return t(n),e=>{if("object"==typeof e&&null!==e&&e._x_interceptor){let t=n.initialize.bind(n);n.initialize=(i,r,o)=>{let s=e.initialize(i,r,o);return n.initialValue=s,t(i,r,o)}}else n.initialValue=e;return n}}function B(e,t,n){if("string"==typeof t&&(t=t.split(".")),1!==t.length){if(0===t.length)throw error;return e[t[0]]||(e[t[0]]={}),B(e[t[0]],t.slice(1),n)}e[t[0]]=n}var F={};function D(e,t){F[e]=t}function z(e,t){let n=function(e){let[t,n]=le(e),i={interceptor:M,...t};return x(e,n),i}(t);return Object.entries(F).forEach(([i,r])=>{Object.defineProperty(e,`$${i}`,{get(){return r(t,n)},enumerable:!1})}),e}function G(e,t,n,...i){try{return n(...i)}catch(n){q(n,e,t)}}function q(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message}\n\n${n?'Expression: "'+n+'"\n\n':""}`,t),setTimeout(()=>{throw e},0)}var W=!0;function V(e){let t=W;W=!1;let n=e();return W=t,n}function K(e,t,n={}){let i;return J(e,t)(e=>i=e,n),i}function J(...e){return Z(...e)}var Z=function(e,t){let n={};z(n,e);let i=[n,...$(e)],r="function"==typeof t?H(i,t):function(e,t,n){let i=function(e,t){if(X[e])return X[e];let n=Object.getPrototypeOf(async function(){}).constructor,i=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e}})()`:e;let r=(()=>{try{let t=new n(["__self","scope"],`with (scope){ __self.result=${i}}; __self.finished=true; return __self.result;`);return Object.defineProperty(t,"name",{value:`[Alpine] ${e}`}),t}catch(n){return q(n,t,e),Promise.resolve()}})();return X[e]=r,r}(t,n);return(r=()=>{},{scope:o={},params:s=[],context:a}={})=>{i.result=void 0,i.finished=!1;let l=j([o,...e]);if("function"==typeof i){let e=i.call(a,i,l).catch(e=>q(e,n,t));i.finished?(Y(r,i.result,l,s,n),i.result=void 0):e.then(e=>{Y(r,e,l,s,n)}).catch(e=>q(e,n,t)).finally(()=>i.result=void 0)}}}(i,t,e);return G.bind(null,e,t,r)};function H(e,t){return(n=()=>{},{scope:i={},params:r=[],context:o}={})=>{Y(n,t.apply(j([i,...e]),r))}}var X={};function Y(e,t,n,i,r){if(W&&"function"==typeof t){let o=t.apply(n,i);o instanceof Promise?o.then(t=>Y(e,t,n,i)).catch(e=>q(e,r,t)):e(o)}else"object"==typeof t&&t instanceof Promise?t.then(t=>e(t)):e(t)}var Q="x-";function ee(e=""){return Q+e}var te={};function ne(e,t){return te[e]=t,{before(t){if(!te[t])return void console.warn(String.raw`Cannot find directive \`${t}\`. \`${e}\` will use the default order of execution`);const n=me.indexOf(t);me.splice(n>=0?n:me.indexOf("DEFAULT"),0,e)}}}function ie(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let n=Object.entries(e._x_virtualDirectives).map(([e,t])=>({name:e,value:t})),i=re(n);n=n.map(e=>i.find(t=>t.name===e.name)?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e),t=t.concat(n)}let i={},r=t.map(ue((e,t)=>i[e]=t)).filter(de).map(function(e,t){return({name:n,value:i})=>{let r=n.match(he()),o=n.match(/:([a-zA-Z0-9\-_:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[n]||n;return{type:r?r[1]:null,value:o?o[1]:null,modifiers:s.map(e=>e.replace(".","")),expression:i,original:a}}}(i,n)).sort(ge);return r.map(t=>function(e,t){let n=te[t.type]||(()=>{}),[i,r]=le(e);y(e,t.original,r);let o=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),oe?se.get(ae).push(n):n())};return o.runCleanups=r,o}(e,t))}function re(e){return Array.from(e).map(ue()).filter(e=>!de(e))}var oe=!1,se=new Map,ae=Symbol();function le(e){let t=[],[n,o]=function(e){let t=()=>{};return[n=>{let o=i(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(e=>e())}),e._x_effects.add(o),t=()=>{void 0!==o&&(e._x_effects.delete(o),r(o))},o},()=>{t()}]}(e);return t.push(o),[{Alpine:mt,effect:n,cleanup:e=>t.push(e),evaluateLater:J.bind(J,e),evaluate:K.bind(K,e)},()=>t.forEach(e=>e())]}var ce=(e,t)=>({name:n,value:i})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:i});function ue(e=()=>{}){return({name:t,value:n})=>{let{name:i,value:r}=pe.reduce((e,t)=>t(e),{name:t,value:n});return i!==t&&e(i,t),{name:i,value:r}}}var pe=[];function fe(e){pe.push(e)}function de({name:e}){return he().test(e)}var he=()=>new RegExp(`^${Q}([^:^.]+)\\b`),_e="DEFAULT",me=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",_e,"teleport"];function ge(e,t){let n=-1===me.indexOf(e.type)?_e:e.type,i=-1===me.indexOf(t.type)?_e:t.type;return me.indexOf(n)-me.indexOf(i)}function xe(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function ve(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach(e=>ve(e,t));let n=!1;if(t(e,()=>n=!0),n)return;let i=e.firstElementChild;for(;i;)ve(i,t),i=i.nextElementSibling}function ye(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var be=!1,we=[],Ee=[];function Oe(){return we.map(e=>e())}function Ae(){return we.concat(Ee).map(e=>e())}function ke(e){we.push(e)}function Te(e){Ee.push(e)}function Se(e,t=!1){return Ne(e,e=>{if((t?Ae():Oe()).some(t=>e.matches(t)))return!0})}function Ne(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return Ne(e.parentElement,t)}}var Re=[],Ce=1;function Pe(e,t=ve,n=()=>{}){Ne(e,e=>e._x_ignore)||function(){oe=!0;let i=Symbol();ae=i,se.set(i,[]);let r=()=>{for(;se.get(i).length;)se.get(i).shift()();se.delete(i)};t(e,(e,t)=>{e._x_marker||(n(e,t),Re.forEach(n=>n(e,t)),ie(e,e.attributes).forEach(e=>e()),e._x_ignore||(e._x_marker=Ce++),e._x_ignore&&t())}),oe=!1,r()}()}function $e(e,t=ve){t(e,e=>{!function(e){for(e._x_effects?.forEach(u);e._x_cleanups?.length;)e._x_cleanups.pop()()}(e),b(e),delete e._x_marker})}var je=[],Ue=!1;function Ie(e=()=>{}){return queueMicrotask(()=>{Ue||setTimeout(()=>{Le()})}),new Promise(t=>{je.push(()=>{e(),t()})})}function Le(){for(Ue=!1;je.length;)je.shift()()}function Me(e,t){return Array.isArray(t)?Be(e,t.join(" ")):"object"==typeof t&&null!==t?function(e,t){let n=e=>e.split(" ").filter(Boolean),i=Object.entries(t).flatMap(([e,t])=>!!t&&n(e)).filter(Boolean),r=Object.entries(t).flatMap(([e,t])=>!t&&n(e)).filter(Boolean),o=[],s=[];return r.forEach(t=>{e.classList.contains(t)&&(e.classList.remove(t),s.push(t))}),i.forEach(t=>{e.classList.contains(t)||(e.classList.add(t),o.push(t))}),()=>{s.forEach(t=>e.classList.add(t)),o.forEach(t=>e.classList.remove(t))}}(e,t):"function"==typeof t?Me(e,t()):Be(e,t)}function Be(e,t){return t=!0===t?t="":t||"",n=t.split(" ").filter(t=>!e.classList.contains(t)).filter(Boolean),e.classList.add(...n),()=>{e.classList.remove(...n)};var n}function Fe(e,t){return"object"==typeof t&&null!==t?function(e,t){let n={};return Object.entries(t).forEach(([t,i])=>{n[t]=e.style[t],t.startsWith("--")||(t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),e.style.setProperty(t,i)}),setTimeout(()=>{0===e.style.length&&e.removeAttribute("style")}),()=>{Fe(e,n)}}(e,t):function(e,t){let n=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",n||"")}}(e,t)}function De(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}function ze(e,t,n={}){e._x_transition||(e._x_transition={enter:{during:n,start:n,end:n},leave:{during:n,start:n,end:n},in(n=()=>{},i=()=>{}){qe(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){qe(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}function Ge(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:Ge(t)}function qe(e,t,{during:n,start:i,end:r}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),0===Object.keys(n).length&&0===Object.keys(i).length&&0===Object.keys(r).length)return o(),void s();let a,l,c;!function(e,t){let n,i,r,o=De(()=>{T(()=>{n=!0,i||t.before(),r||(t.end(),Le()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(e){this.beforeCancels.push(e)},cancel:De(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},T(()=>{t.start(),t.during()}),Ue=!0,requestAnimationFrame(()=>{if(n)return;let o=1e3*Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s","")),s=1e3*Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""));0===o&&(o=1e3*Number(getComputedStyle(e).animationDuration.replace("s",""))),T(()=>{t.before()}),i=!0,requestAnimationFrame(()=>{n||(T(()=>{t.end()}),Le(),setTimeout(e._x_transitioning.finish,o+s),r=!0)})})}(e,{start(){a=t(e,i)},during(){l=t(e,n)},before:o,end(){a(),c=t(e,r)},after:s,cleanup(){l(),c()}})}function We(e,t,n){if(-1===e.indexOf(t))return n;const i=e[e.indexOf(t)+1];if(!i)return n;if("scale"===t&&isNaN(i))return n;if("duration"===t||"delay"===t){let e=i.match(/([0-9]+)ms/);if(e)return e[1]}return"origin"===t&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[i,e[e.indexOf(t)+2]].join(" "):i}ne("transition",(e,{value:t,modifiers:n,expression:i},{evaluate:r})=>{"function"==typeof i&&(i=r(i)),!1!==i&&(i&&"boolean"!=typeof i?function(e,t,n){ze(e,Me,""),{enter:t=>{e._x_transition.enter.during=t},"enter-start":t=>{e._x_transition.enter.start=t},"enter-end":t=>{e._x_transition.enter.end=t},leave:t=>{e._x_transition.leave.during=t},"leave-start":t=>{e._x_transition.leave.start=t},"leave-end":t=>{e._x_transition.leave.end=t}}[n](t)}(e,i,t):function(e,t,n){ze(e,Fe);let i=!t.includes("in")&&!t.includes("out")&&!n,r=i||t.includes("in")||["enter"].includes(n),o=i||t.includes("out")||["leave"].includes(n);t.includes("in")&&!i&&(t=t.filter((e,n)=>n<t.indexOf("out"))),t.includes("out")&&!i&&(t=t.filter((e,n)=>n>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity")?0:1,l=s||t.includes("scale")?We(t,"scale",95)/100:1,c=We(t,"delay",0)/1e3,u=We(t,"origin","center"),p="opacity, transform",f=We(t,"duration",150)/1e3,d=We(t,"duration",75)/1e3,h="cubic-bezier(0.4, 0.0, 0.2, 1)";r&&(e._x_transition.enter.during={transformOrigin:u,transitionDelay:`${c}s`,transitionProperty:p,transitionDuration:`${f}s`,transitionTimingFunction:h},e._x_transition.enter.start={opacity:a,transform:`scale(${l})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:u,transitionDelay:`${c}s`,transitionProperty:p,transitionDuration:`${d}s`,transitionTimingFunction:h},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:a,transform:`scale(${l})`})}(e,n,t))}),window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,n,i){const r="visible"===document.visibilityState?requestAnimationFrame:setTimeout;let o=()=>r(n);t?e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(n):o():e._x_transition?e._x_transition.in(n):o():(e._x_hidePromise=e._x_transition?new Promise((t,n)=>{e._x_transition.out(()=>{},()=>t(i)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>n({isFromCancelledTransition:!0}))}):Promise.resolve(i),queueMicrotask(()=>{let t=Ge(e);t?(t._x_hideChildren||(t._x_hideChildren=[]),t._x_hideChildren.push(e)):r(()=>{let t=e=>{let n=Promise.all([e._x_hidePromise,...(e._x_hideChildren||[]).map(t)]).then(([e])=>e?.());return delete e._x_hidePromise,delete e._x_hideChildren,n};t(e).catch(e=>{if(!e.isFromCancelledTransition)throw e})})}))};var Ve=!1;function Ke(e,t=()=>{}){return(...n)=>Ve?t(...n):e(...n)}var Je=[];function Ze(e){Je.push(e)}var He=!1;function Xe(e){let t=i;d((e,n)=>{let i=t(e);return r(i),()=>{}}),e(),d(t)}function Ye(e,t,i,r=[]){switch(e._x_bindings||(e._x_bindings=n({})),e._x_bindings[t]=i,t=r.includes("camel")?t.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase()):t){case"value":!function(e,t){if(st(e))void 0===e.attributes.value&&(e.value=t),window.fromModel&&(e.checked="boolean"==typeof t?tt(e.value)===t:et(e.value,t));else if(ot(e))Number.isInteger(t)?e.value=t:Array.isArray(t)||"boolean"==typeof t||[null,void 0].includes(t)?Array.isArray(t)?e.checked=t.some(t=>et(t,e.value)):e.checked=!!t:e.value=String(t);else if("SELECT"===e.tagName)!function(e,t){const n=[].concat(t).map(e=>e+"");Array.from(e.options).forEach(e=>{e.selected=n.includes(e.value)})}(e,t);else{if(e.value===t)return;e.value=void 0===t?"":t}}(e,i);break;case"style":!function(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Fe(e,t)}(e,i);break;case"class":!function(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Me(e,t)}(e,i);break;case"selected":case"checked":!function(e,t,n){Qe(e,t,n),function(e,t,n){e[t]!==n&&(e[t]=n)}(e,t,n)}(e,t,i);break;default:Qe(e,t,i)}}function Qe(e,t,n){[null,void 0,!1].includes(n)&&function(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}(t)?e.removeAttribute(t):(it(t)&&(n=t),function(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}(e,t,n))}function et(e,t){return e==t}function tt(e){return!![1,"1","true","on","yes",!0].includes(e)||![0,"0","false","off","no",!1].includes(e)&&(e?Boolean(e):null)}var nt=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function it(e){return nt.has(e)}function rt(e,t,n){let i=e.getAttribute(t);return null===i?"function"==typeof n?n():n:""===i||(it(t)?!![t,"true"].includes(i):i)}function ot(e){return"checkbox"===e.type||"ui-checkbox"===e.localName||"ui-switch"===e.localName}function st(e){return"radio"===e.type||"ui-radio"===e.localName}function at(e,t){let n;return function(){const i=this,r=arguments;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(i,r)},t)}}function lt(e,t){let n;return function(){let i=arguments;n||(e.apply(this,i),n=!0,setTimeout(()=>n=!1,t))}}function ct({get:e,set:t},{get:n,set:o}){let s,a,l=!0,c=i(()=>{let i=e(),r=n();if(l)o(ut(i)),l=!1;else{let e=JSON.stringify(i),n=JSON.stringify(r);e!==s?o(ut(i)):e!==n&&t(ut(r))}s=JSON.stringify(e()),a=JSON.stringify(n())});return()=>{r(c)}}function ut(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var pt={},ft=!1,dt={};function ht(e,t,n){let i=[];for(;i.length;)i.pop()();let r=Object.entries(t).map(([e,t])=>({name:e,value:t})),o=re(r);return r=r.map(e=>o.find(t=>t.name===e.name)?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e),ie(e,r,n).map(e=>{i.push(e.runCleanups),e()}),()=>{for(;i.length;)i.pop()()}}var _t={},mt={get reactive(){return n},get release(){return r},get effect(){return i},get raw(){return o},version:"3.15.0",flushAndStopDeferringMutations:function(){S=!1,R(N),N=[]},dontAutoEvaluateFunctions:V,disableEffectScheduling:function(e){f=!1,e(),f=!0},startObservingMutations:O,stopObservingMutations:A,setReactivityEngine:function(e){n=e.reactive,r=e.release,i=t=>e.effect(t,{scheduler:e=>{f?function(e){var t;t=e,l.includes(t)||l.push(t),a||s||(s=!0,queueMicrotask(p))}(e):e()}}),o=e.raw},onAttributeRemoved:y,onAttributesAdded:v,closestDataStack:$,skipDuringClone:Ke,onlyDuringClone:function(e){return(...t)=>Ve&&e(...t)},addRootSelector:ke,addInitSelector:Te,interceptClone:Ze,addScopeToNode:P,deferMutations:function(){S=!0},mapAttributes:fe,evaluateLater:J,interceptInit:function(e){Re.push(e)},setEvaluator:function(e){Z=e},mergeProxies:j,extractProp:function(e,t,n,i=!0){if(e._x_bindings&&void 0!==e._x_bindings[t])return e._x_bindings[t];if(e._x_inlineBindings&&void 0!==e._x_inlineBindings[t]){let n=e._x_inlineBindings[t];return n.extract=i,V(()=>K(e,n.expression))}return rt(e,t,n)},findClosest:Ne,onElRemoved:x,closestRoot:Se,destroyTree:$e,interceptor:M,transition:qe,setStyles:Fe,mutateDom:T,directive:ne,entangle:ct,throttle:lt,debounce:at,evaluate:K,initTree:Pe,nextTick:Ie,prefixed:ee,prefix:function(e){Q=e},plugin:function(e){(Array.isArray(e)?e:[e]).forEach(e=>e(mt))},magic:D,store:function(e,t){if(ft||(pt=n(pt),ft=!0),void 0===t)return pt[e];pt[e]=t,L(pt[e]),"object"==typeof t&&null!==t&&t.hasOwnProperty("init")&&"function"==typeof t.init&&pt[e].init()},start:function(){var e;be&&ye("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),be=!0,document.body||ye("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),xe(document,"alpine:init"),xe(document,"alpine:initializing"),O(),e=e=>Pe(e,ve),g.push(e),x(e=>$e(e)),v((e,t)=>{ie(e,t).forEach(e=>e())}),Array.from(document.querySelectorAll(Ae().join(","))).filter(e=>!Se(e.parentElement,!0)).forEach(e=>{Pe(e)}),xe(document,"alpine:initialized"),setTimeout(()=>{[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([e,t,n])=>{var i;i=t,Object.keys(te).includes(i)||n.some(t=>{if(document.querySelector(t))return ye(`found "${t}", but missing ${e} plugin`),!0})})})},clone:function(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),Ve=!0,He=!0,Xe(()=>{!function(e){let t=!1;Pe(e,(e,n)=>{ve(e,(e,i)=>{if(t&&function(e){return Oe().some(t=>e.matches(t))}(e))return i();t=!0,n(e,i)})})}(t)}),Ve=!1,He=!1},cloneNode:function(e,t){Je.forEach(n=>n(e,t)),Ve=!0,Xe(()=>{Pe(t,(e,t)=>{t(e,()=>{})})}),Ve=!1},bound:function(e,t,n){return e._x_bindings&&void 0!==e._x_bindings[t]?e._x_bindings[t]:rt(e,t,n)},$data:C,watch:h,walk:ve,data:function(e,t){_t[e]=t},bind:function(e,t){let n="function"!=typeof t?()=>t:t;return e instanceof Element?ht(e,n()):(dt[e]=n,()=>{})}},gt=class{constructor(e,t,n,i){this.type=e,this.value=t,this.start=n,this.end=i}},xt=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){for(;this.position<this.input.length&&(this.skipWhitespace(),!(this.position>=this.input.length));){const e=this.input[this.position];this.isDigit(e)?this.readNumber():this.isAlpha(e)||"_"===e||"$"===e?this.readIdentifierOrKeyword():'"'===e||"'"===e?this.readString():"/"===e&&"/"===this.peek()?this.skipLineComment():this.readOperatorOrPunctuation()}return this.tokens.push(new gt("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){for(;this.position<this.input.length&&/\s/.test(this.input[this.position]);)this.position++}skipLineComment(){for(;this.position<this.input.length&&"\n"!==this.input[this.position];)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){const e=this.position;let t=!1;for(;this.position<this.input.length;){const e=this.input[this.position];if(this.isDigit(e))this.position++;else{if("."!==e||t)break;t=!0,this.position++}}const n=this.input.slice(e,this.position);this.tokens.push(new gt("NUMBER",parseFloat(n),e,this.position))}readIdentifierOrKeyword(){const e=this.position;for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)this.position++;const t=this.input.slice(e,this.position);["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t)?"true"===t||"false"===t?this.tokens.push(new gt("BOOLEAN","true"===t,e,this.position)):"null"===t?this.tokens.push(new gt("NULL",null,e,this.position)):"undefined"===t?this.tokens.push(new gt("UNDEFINED",void 0,e,this.position)):this.tokens.push(new gt("KEYWORD",t,e,this.position)):this.tokens.push(new gt("IDENTIFIER",t,e,this.position))}readString(){const e=this.position,t=this.input[this.position];this.position++;let n="",i=!1;for(;this.position<this.input.length;){const r=this.input[this.position];if(i){switch(r){case"n":n+="\n";break;case"t":n+="\t";break;case"r":n+="\r";break;case"\\":n+="\\";break;case t:n+=t;break;default:n+=r}i=!1}else if("\\"===r)i=!0;else{if(r===t)return this.position++,void this.tokens.push(new gt("STRING",n,e,this.position));n+=r}this.position++}throw new Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){const e=this.position,t=this.input[this.position],n=this.peek(),i=this.peek(2);if("="===t&&"="===n&&"="===i)this.position+=3,this.tokens.push(new gt("OPERATOR","===",e,this.position));else if("!"===t&&"="===n&&"="===i)this.position+=3,this.tokens.push(new gt("OPERATOR","!==",e,this.position));else if("="===t&&"="===n)this.position+=2,this.tokens.push(new gt("OPERATOR","==",e,this.position));else if("!"===t&&"="===n)this.position+=2,this.tokens.push(new gt("OPERATOR","!=",e,this.position));else if("<"===t&&"="===n)this.position+=2,this.tokens.push(new gt("OPERATOR","<=",e,this.position));else if(">"===t&&"="===n)this.position+=2,this.tokens.push(new gt("OPERATOR",">=",e,this.position));else if("&"===t&&"&"===n)this.position+=2,this.tokens.push(new gt("OPERATOR","&&",e,this.position));else if("|"===t&&"|"===n)this.position+=2,this.tokens.push(new gt("OPERATOR","||",e,this.position));else if("+"===t&&"+"===n)this.position+=2,this.tokens.push(new gt("OPERATOR","++",e,this.position));else if("-"===t&&"-"===n)this.position+=2,this.tokens.push(new gt("OPERATOR","--",e,this.position));else{this.position++;const n="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new gt(n,t,e,this.position))}}},vt=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw new Error("Empty expression");const e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw new Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){const e=this.parseTernary();if(this.match("OPERATOR","=")){const t=this.parseAssignment();if("Identifier"===e.type||"MemberExpression"===e.type)return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw new Error("Invalid assignment target")}return e}parseTernary(){const e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){const t=this.parseExpression();return this.consume("PUNCTUATION",":"),{type:"ConditionalExpression",test:e,consequent:t,alternate:this.parseExpression()}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.match("OPERATOR","||");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseLogicalAnd()};return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.match("OPERATOR","&&");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseEquality()};return e}parseEquality(){let e=this.parseRelational();for(;this.match("OPERATOR","==","!=","===","!==");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseRelational()};return e}parseRelational(){let e=this.parseAdditive();for(;this.match("OPERATOR","<",">","<=",">=");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseAdditive()};return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.match("OPERATOR","+","-");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseMultiplicative()};return e}parseMultiplicative(){let e=this.parseUnary();for(;this.match("OPERATOR","*","/","%");)e={type:"BinaryExpression",operator:this.previous().value,left:e,right:this.parseUnary()};return e}parseUnary(){return this.match("OPERATOR","++","--")?{type:"UpdateExpression",operator:this.previous().value,argument:this.parseUnary(),prefix:!0}:this.match("OPERATOR","!","-","+")?{type:"UnaryExpression",operator:this.previous().value,argument:this.parseUnary(),prefix:!0}:this.parsePostfix()}parsePostfix(){let e=this.parseMember();return this.match("OPERATOR","++","--")?{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1}:e}parseMember(){let e=this.parsePrimary();for(;;)if(this.match("PUNCTUATION","."))e={type:"MemberExpression",object:e,property:{type:"Identifier",name:this.consume("IDENTIFIER").value},computed:!1};else if(this.match("PUNCTUATION","[")){const t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else{if(!this.match("PUNCTUATION","("))break;e={type:"CallExpression",callee:e,arguments:this.parseArguments()}}return e}parseArguments(){const e=[];if(!this.check("PUNCTUATION",")"))do{e.push(this.parseExpression())}while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){const e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw new Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){const e=[];for(;!this.check("PUNCTUATION","]")&&!this.isAtEnd()&&(e.push(this.parseExpression()),this.match("PUNCTUATION",","))&&!this.check("PUNCTUATION","]"););return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){const e=[];for(;!this.check("PUNCTUATION","}")&&!this.isAtEnd();){let t,n=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.match("IDENTIFIER"))t={type:"Identifier",name:this.previous().value};else{if(!this.match("PUNCTUATION","["))throw new Error("Expected property key");t=this.parseExpression(),n=!0,this.consume("PUNCTUATION","]")}this.consume("PUNCTUATION",":");const i=this.parseExpression();if(e.push({type:"Property",key:t,value:i,computed:n,shorthand:!1}),!this.match("PUNCTUATION",","))break;if(this.check("PUNCTUATION","}"))break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){const n=e[t];if(0===t&&e.length>1){const t=n;for(let n=1;n<e.length;n++)if(this.check(t,e[n]))return this.advance(),!0;return!1}if(1===e.length)return!!this.checkType(n)&&(this.advance(),!0)}return!1}check(e,t){return!this.isAtEnd()&&(void 0!==t?this.current().type===e&&this.current().value===t:this.current().type===e)}checkType(e){return!this.isAtEnd()&&this.current().type===e}advance(){return this.isAtEnd()||this.position++,this.previous()}isAtEnd(){return"EOF"===this.current().type}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(void 0!==t){if(this.check(e,t))return this.advance();throw new Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw new Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}},yt=class{evaluate({node:e,scope:t={},context:n=null,allowGlobal:i=!1,forceBindingRootScopeToFunctions:r=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){const n=t[e.name];return"function"==typeof n?n.bind(t):n}if(i&&void 0!==globalThis[e.name]){const t=globalThis[e.name];return"function"==typeof t?t.bind(globalThis):t}throw new Error(`Undefined variable: ${e.name}`);case"MemberExpression":const o=this.evaluate({node:e.object,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});if(null==o)throw new Error("Cannot read property of null or undefined");let s;return s=e.computed?o[this.evaluate({node:e.property,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r})]:o[e.property.name],"function"==typeof s?r?s.bind(t):s.bind(o):s;case"CallExpression":const a=e.arguments.map(e=>this.evaluate({node:e,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}));if("MemberExpression"===e.callee.type){const o=this.evaluate({node:e.callee.object,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});let s;if(s=e.callee.computed?o[this.evaluate({node:e.callee.property,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r})]:o[e.callee.property.name],"function"!=typeof s)throw new Error("Value is not a function");return s.apply(o,a)}if("Identifier"===e.callee.type){const r=e.callee.name;let o;if(r in t)o=t[r];else{if(!i||void 0===globalThis[r])throw new Error(`Undefined variable: ${r}`);o=globalThis[r]}if("function"!=typeof o)throw new Error("Value is not a function");const s=null!==n?n:t;return o.apply(s,a)}{const o=this.evaluate({node:e.callee,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});if("function"!=typeof o)throw new Error("Value is not a function");return o.apply(n,a)}case"UnaryExpression":const l=this.evaluate({node:e.argument,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});switch(e.operator){case"!":return!l;case"-":return-l;case"+":return+l;default:throw new Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if("Identifier"===e.argument.type){const n=e.argument.name;if(!(n in t))throw new Error(`Undefined variable: ${n}`);const i=t[n];return"++"===e.operator?t[n]=i+1:"--"===e.operator&&(t[n]=i-1),e.prefix?t[n]:i}if("MemberExpression"===e.argument.type){const o=this.evaluate({node:e.argument.object,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}),s=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}):e.argument.property.name,a=o[s];return"++"===e.operator?o[s]=a+1:"--"===e.operator&&(o[s]=a-1),e.prefix?o[s]:a}throw new Error("Invalid update expression target");case"BinaryExpression":const c=this.evaluate({node:e.left,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}),u=this.evaluate({node:e.right,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});switch(e.operator){case"+":return c+u;case"-":return c-u;case"*":return c*u;case"/":return c/u;case"%":return c%u;case"==":return c==u;case"!=":return c!=u;case"===":return c===u;case"!==":return c!==u;case"<":return c<u;case">":return c>u;case"<=":return c<=u;case">=":return c>=u;case"&&":return c&&u;case"||":return c||u;default:throw new Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r})?this.evaluate({node:e.consequent,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}):this.evaluate({node:e.alternate,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});case"AssignmentExpression":const p=this.evaluate({node:e.right,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});if("Identifier"===e.left.type)return t[e.left.name]=p,p;if("MemberExpression"===e.left.type){const o=this.evaluate({node:e.left.object,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});return e.left.computed?o[this.evaluate({node:e.left.property,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r})]=p:o[e.left.property.name]=p,p}throw new Error("Invalid assignment target");case"ArrayExpression":return e.elements.map(e=>this.evaluate({node:e,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}));case"ObjectExpression":const f={};for(const o of e.properties){const e=o.computed?this.evaluate({node:o.key,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}):"Identifier"===o.key.type?o.key.name:this.evaluate({node:o.key,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r}),s=this.evaluate({node:o.value,scope:t,context:n,allowGlobal:i,forceBindingRootScopeToFunctions:r});f[e]=s}return f;default:throw new Error(`Unknown node type: ${e.type}`)}}};function bt(e,t){const n=Object.create(null),i=e.split(",");for(let e=0;e<i.length;e++)n[i[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}var wt,Et=Object.freeze({}),Ot=(Object.freeze([]),Object.prototype.hasOwnProperty),At=(e,t)=>Ot.call(e,t),kt=Array.isArray,Tt=e=>"[object Map]"===Ct(e),St=e=>"symbol"==typeof e,Nt=e=>null!==e&&"object"==typeof e,Rt=Object.prototype.toString,Ct=e=>Rt.call(e),Pt=e=>Ct(e).slice(8,-1),$t=e=>"string"==typeof e&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,jt=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ut=/-(\w)/g,It=(jt(e=>e.replace(Ut,(e,t)=>t?t.toUpperCase():"")),/\B([A-Z])/g),Lt=(jt(e=>e.replace(It,"-$1").toLowerCase()),jt(e=>e.charAt(0).toUpperCase()+e.slice(1))),Mt=(jt(e=>e?`on${Lt(e)}`:""),(e,t)=>e!==t&&(e==e||t==t)),Bt=new WeakMap,Ft=[],Dt=Symbol("iterate"),zt=Symbol("Map key iterate"),Gt=0;function qt(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}var Wt=!0,Vt=[];function Kt(){const e=Vt.pop();Wt=void 0===e||e}function Jt(e,t,n){if(!Wt||void 0===wt)return;let i=Bt.get(e);i||Bt.set(e,i=new Map);let r=i.get(n);r||i.set(n,r=new Set),r.has(wt)||(r.add(wt),wt.deps.push(r),wt.options.onTrack&&wt.options.onTrack({effect:wt,target:e,type:t,key:n}))}function Zt(e,t,n,i,r,o){const s=Bt.get(e);if(!s)return;const a=new Set,l=e=>{e&&e.forEach(e=>{(e!==wt||e.allowRecurse)&&a.add(e)})};if("clear"===t)s.forEach(l);else if("length"===n&&kt(e))s.forEach((e,t)=>{("length"===t||t>=i)&&l(e)});else switch(void 0!==n&&l(s.get(n)),t){case"add":kt(e)?$t(n)&&l(s.get("length")):(l(s.get(Dt)),Tt(e)&&l(s.get(zt)));break;case"delete":kt(e)||(l(s.get(Dt)),Tt(e)&&l(s.get(zt)));break;case"set":Tt(e)&&l(s.get(Dt))}a.forEach(s=>{s.options.onTrigger&&s.options.onTrigger({effect:s,target:e,key:n,type:t,newValue:i,oldValue:r,oldTarget:o}),s.options.scheduler?s.options.scheduler(s):s()})}var Ht=bt("__proto__,__v_isRef,__isVue"),Xt=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(St)),Yt=nn(),Qt=nn(!0),en=tn();function tn(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=Ln(this);for(let e=0,t=this.length;e<t;e++)Jt(n,"get",e+"");const i=n[t](...e);return-1===i||!1===i?n[t](...e.map(Ln)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){Vt.push(Wt),Wt=!1;const n=Ln(this)[t].apply(this,e);return Kt(),n}}),e}function nn(e=!1,t=!1){return function(n,i,r){if("__v_isReactive"===i)return!e;if("__v_isReadonly"===i)return e;if("__v_raw"===i&&r===(e?t?$n:Pn:t?Cn:Rn).get(n))return n;const o=kt(n);if(!e&&o&&At(en,i))return Reflect.get(en,i,r);const s=Reflect.get(n,i,r);return(St(i)?Xt.has(i):Ht(i))?s:(e||Jt(n,"get",i),t?s:Mn(s)?o&&$t(i)?s:s.value:Nt(s)?e?Un(s):jn(s):s)}}function rn(e=!1){return function(t,n,i,r){let o=t[n];if(!e&&(i=Ln(i),o=Ln(o),!kt(t)&&Mn(o)&&!Mn(i)))return o.value=i,!0;const s=kt(t)&&$t(n)?Number(n)<t.length:At(t,n),a=Reflect.set(t,n,i,r);return t===Ln(r)&&(s?Mt(i,o)&&Zt(t,"set",n,i,o):Zt(t,"add",n,i)),a}}var on={get:Yt,set:rn(),deleteProperty:function(e,t){const n=At(e,t),i=e[t],r=Reflect.deleteProperty(e,t);return r&&n&&Zt(e,"delete",t,void 0,i),r},has:function(e,t){const n=Reflect.has(e,t);return St(t)&&Xt.has(t)||Jt(e,"has",t),n},ownKeys:function(e){return Jt(e,"iterate",kt(e)?"length":Dt),Reflect.ownKeys(e)}},sn={get:Qt,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},an=e=>Nt(e)?jn(e):e,ln=e=>Nt(e)?Un(e):e,cn=e=>e,un=e=>Reflect.getPrototypeOf(e);function pn(e,t,n=!1,i=!1){const r=Ln(e=e.__v_raw),o=Ln(t);t!==o&&!n&&Jt(r,"get",t),!n&&Jt(r,"get",o);const{has:s}=un(r),a=i?cn:n?ln:an;return s.call(r,t)?a(e.get(t)):s.call(r,o)?a(e.get(o)):void(e!==r&&e.get(t))}function fn(e,t=!1){const n=this.__v_raw,i=Ln(n),r=Ln(e);return e!==r&&!t&&Jt(i,"has",e),!t&&Jt(i,"has",r),e===r?n.has(e):n.has(e)||n.has(r)}function dn(e,t=!1){return e=e.__v_raw,!t&&Jt(Ln(e),"iterate",Dt),Reflect.get(e,"size",e)}function hn(e){e=Ln(e);const t=Ln(this);return un(t).has.call(t,e)||(t.add(e),Zt(t,"add",e,e)),this}function _n(e,t){t=Ln(t);const n=Ln(this),{has:i,get:r}=un(n);let o=i.call(n,e);o?Nn(n,i,e):(e=Ln(e),o=i.call(n,e));const s=r.call(n,e);return n.set(e,t),o?Mt(t,s)&&Zt(n,"set",e,t,s):Zt(n,"add",e,t),this}function mn(e){const t=Ln(this),{has:n,get:i}=un(t);let r=n.call(t,e);r?Nn(t,n,e):(e=Ln(e),r=n.call(t,e));const o=i?i.call(t,e):void 0,s=t.delete(e);return r&&Zt(t,"delete",e,void 0,o),s}function gn(){const e=Ln(this),t=0!==e.size,n=Tt(e)?new Map(e):new Set(e),i=e.clear();return t&&Zt(e,"clear",void 0,void 0,n),i}function xn(e,t){return function(n,i){const r=this,o=r.__v_raw,s=Ln(o),a=t?cn:e?ln:an;return!e&&Jt(s,"iterate",Dt),o.forEach((e,t)=>n.call(i,a(e),a(t),r))}}function vn(e,t,n){return function(...i){const r=this.__v_raw,o=Ln(r),s=Tt(o),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...i),u=n?cn:t?ln:an;return!t&&Jt(o,"iterate",l?zt:Dt),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function yn(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${Lt(e)} operation ${n}failed: target is readonly.`,Ln(this))}return"delete"!==e&&this}}function bn(){const e={get(e){return pn(this,e)},get size(){return dn(this)},has:fn,add:hn,set:_n,delete:mn,clear:gn,forEach:xn(!1,!1)},t={get(e){return pn(this,e,!1,!0)},get size(){return dn(this)},has:fn,add:hn,set:_n,delete:mn,clear:gn,forEach:xn(!1,!0)},n={get(e){return pn(this,e,!0)},get size(){return dn(this,!0)},has(e){return fn.call(this,e,!0)},add:yn("add"),set:yn("set"),delete:yn("delete"),clear:yn("clear"),forEach:xn(!0,!1)},i={get(e){return pn(this,e,!0,!0)},get size(){return dn(this,!0)},has(e){return fn.call(this,e,!0)},add:yn("add"),set:yn("set"),delete:yn("delete"),clear:yn("clear"),forEach:xn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=vn(r,!1,!1),n[r]=vn(r,!0,!1),t[r]=vn(r,!1,!0),i[r]=vn(r,!0,!0)}),[e,n,t,i]}var[wn,En,On,An]=bn();function kn(e,t){const n=t?e?An:On:e?En:wn;return(t,i,r)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_raw"===i?t:Reflect.get(At(n,i)&&i in t?n:t,i,r)}var Tn={get:kn(!1,!1)},Sn={get:kn(!0,!1)};function Nn(e,t,n){const i=Ln(n);if(i!==n&&t.call(e,i)){const t=Pt(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${"Map"===t?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Rn=new WeakMap,Cn=new WeakMap,Pn=new WeakMap,$n=new WeakMap;function jn(e){return e&&e.__v_isReadonly?e:In(e,!1,on,Tn,Rn)}function Un(e){return In(e,!0,sn,Sn,Pn)}function In(e,t,n,i,r){if(!Nt(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const s=(a=e).__v_skip||!Object.isExtensible(a)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(Pt(a));var a;if(0===s)return e;const l=new Proxy(e,2===s?i:n);return r.set(e,l),l}function Ln(e){return e&&Ln(e.__v_raw)||e}function Mn(e){return Boolean(e&&!0===e.__v_isRef)}D("nextTick",()=>Ie),D("dispatch",e=>xe.bind(xe,e)),D("watch",(e,{evaluateLater:t,cleanup:n})=>(e,i)=>{let r=t(e),o=h(()=>{let e;return r(t=>e=t),e},i);n(o)}),D("store",function(){return pt}),D("data",e=>C(e)),D("root",e=>Se(e)),D("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=j(function(e){let t=[];return Ne(e,e=>{e._x_refs&&t.push(e._x_refs)}),t}(e))),e._x_refs_proxy));var Bn={};function Fn(e){return Bn[e]||(Bn[e]=0),++Bn[e]}function Dn(e,t,n){D(t,i=>ye(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,i))}D("id",(e,{cleanup:t})=>(n,i=null)=>function(e,t,n,i){if(e._x_id||(e._x_id={}),e._x_id[t])return e._x_id[t];let r=i();return e._x_id[t]=r,n(()=>{delete e._x_id[t]}),r}(e,`${n}${i?`-${i}`:""}`,t,()=>{let t=function(e,t){return Ne(e,e=>{if(e._x_ids&&e._x_ids[t])return!0})}(e,n),r=t?t._x_ids[n]:Fn(n);return i?`${n}-${r}-${i}`:`${n}-${r}`})),Ze((e,t)=>{e._x_id&&(t._x_id=e._x_id)}),D("el",e=>e),Dn("Focus","focus","focus"),Dn("Persist","persist","persist"),ne("modelable",(e,{expression:t},{effect:n,evaluateLater:i,cleanup:r})=>{let o=i(t),s=()=>{let e;return o(t=>e=t),e},a=i(`${t}=__placeholder`),l=e=>a(()=>{},{scope:{__placeholder:e}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let t=e._x_model.get,n=e._x_model.set,i=ct({get(){return t()},set(e){n(e)}},{get(){return s()},set(e){l(e)}});r(i)})}),ne("teleport",(e,{modifiers:t,expression:n},{cleanup:i})=>{"template"!==e.tagName.toLowerCase()&&ye("x-teleport can only be used on a <template> tag",e);let r=Gn(n),o=e.content.cloneNode(!0).firstElementChild;e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents&&e._x_forwardEvents.forEach(t=>{o.addEventListener(t,t=>{t.stopPropagation(),e.dispatchEvent(new t.constructor(t.type,t))})}),P(o,{},e);let s=(e,t,n)=>{n.includes("prepend")?t.parentNode.insertBefore(e,t):n.includes("append")?t.parentNode.insertBefore(e,t.nextSibling):t.appendChild(e)};T(()=>{s(o,r,t),Ke(()=>{Pe(o)})()}),e._x_teleportPutBack=()=>{let i=Gn(n);T(()=>{s(e._x_teleport,i,t)})},i(()=>T(()=>{o.remove(),$e(o)}))});var zn=document.createElement("div");function Gn(e){let t=Ke(()=>document.querySelector(e),()=>zn)();return t||ye(`Cannot find x-teleport element for selector: "${e}"`),t}var qn=()=>{};function Wn(e,t,n,i){let r=e,o=e=>i(e),s={},a=(e,t)=>n=>t(e,n);if(n.includes("dot")&&(t=t.replace(/-/g,".")),n.includes("camel")&&(t=t.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase())),n.includes("passive")&&(s.passive=!0),n.includes("capture")&&(s.capture=!0),n.includes("window")&&(r=window),n.includes("document")&&(r=document),n.includes("debounce")){let e=n[n.indexOf("debounce")+1]||"invalid-wait",t=Vn(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=at(o,t)}if(n.includes("throttle")){let e=n[n.indexOf("throttle")+1]||"invalid-wait",t=Vn(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=lt(o,t)}return n.includes("prevent")&&(o=a(o,(e,t)=>{t.preventDefault(),e(t)})),n.includes("stop")&&(o=a(o,(e,t)=>{t.stopPropagation(),e(t)})),n.includes("once")&&(o=a(o,(e,n)=>{e(n),r.removeEventListener(t,o,s)})),(n.includes("away")||n.includes("outside"))&&(r=document,o=a(o,(t,n)=>{e.contains(n.target)||!1!==n.target.isConnected&&(e.offsetWidth<1&&e.offsetHeight<1||!1!==e._x_isShown&&t(n))})),n.includes("self")&&(o=a(o,(t,n)=>{n.target===e&&t(n)})),(function(e){return["keydown","keyup"].includes(e)}(t)||Kn(t))&&(o=a(o,(e,t)=>{(function(e,t){let n=t.filter(e=>!["window","document","prevent","stop","once","capture","self","away","outside","passive","preserve-scroll"].includes(e));if(n.includes("debounce")){let e=n.indexOf("debounce");n.splice(e,Vn((n[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.includes("throttle")){let e=n.indexOf("throttle");n.splice(e,Vn((n[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(0===n.length)return!1;if(1===n.length&&Jn(e.key).includes(n[0]))return!1;const i=["ctrl","shift","alt","meta","cmd","super"].filter(e=>n.includes(e));if(n=n.filter(e=>!i.includes(e)),i.length>0&&i.filter(t=>("cmd"!==t&&"super"!==t||(t="meta"),e[`${t}Key`])).length===i.length){if(Kn(e.type))return!1;if(Jn(e.key).includes(n[0]))return!1}return!0})(t,n)||e(t)})),r.addEventListener(t,o,s),()=>{r.removeEventListener(t,o,s)}}function Vn(e){return!Array.isArray(e)&&!isNaN(e)}function Kn(e){return["contextmenu","click","mouse"].some(t=>e.includes(t))}function Jn(e){if(!e)return[];var t;e=[" ","_"].includes(t=e)?t:t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase();let n={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return n[e]=e,Object.keys(n).map(t=>{if(n[t]===e)return t}).filter(e=>e)}function Zn(e,t,n,i){return T(()=>{if(n instanceof CustomEvent&&void 0!==n.detail)return null!==n.detail&&void 0!==n.detail?n.detail:n.target.value;if(ot(e)){if(Array.isArray(i)){let e=null;return e=t.includes("number")?Hn(n.target.value):t.includes("boolean")?tt(n.target.value):n.target.value,n.target.checked?i.includes(e)?i:i.concat([e]):i.filter(t=>!(t==e))}return n.target.checked}if("select"===e.tagName.toLowerCase()&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(e=>Hn(e.value||e.text)):t.includes("boolean")?Array.from(n.target.selectedOptions).map(e=>tt(e.value||e.text)):Array.from(n.target.selectedOptions).map(e=>e.value||e.text);{let r;return r=st(e)?n.target.checked?n.target.value:i:n.target.value,t.includes("number")?Hn(r):t.includes("boolean")?tt(r):t.includes("trim")?r.trim():r}})}function Hn(e){let t=e?parseFloat(e):null;return n=t,Array.isArray(n)||isNaN(n)?e:t;var n}function Xn(e){return null!==e&&"object"==typeof e&&"function"==typeof e.get&&"function"==typeof e.set}qn.inline=(e,{modifiers:t},{cleanup:n})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,n(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})},ne("ignore",qn),ne("effect",Ke((e,{expression:t},{effect:n})=>{n(J(e,t))})),ne("model",(e,{modifiers:t,expression:n},{effect:i,cleanup:r})=>{let o=e;t.includes("parent")&&(o=e.parentNode);let s,a=J(o,n);s="string"==typeof n?J(o,`${n}=__placeholder`):"function"==typeof n&&"string"==typeof n()?J(o,`${n()}=__placeholder`):()=>{};let l=()=>{let e;return a(t=>e=t),Xn(e)?e.get():e},c=e=>{let t;a(e=>t=e),Xn(t)?t.set(e):s(()=>{},{scope:{__placeholder:e}})};"string"==typeof n&&"radio"===e.type&&T(()=>{e.hasAttribute("name")||e.setAttribute("name",n)});let u="select"===e.tagName.toLowerCase()||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input",p=Ve?()=>{}:Wn(e,u,t,n=>{c(Zn(e,t,n,l()))});if(t.includes("fill")&&([void 0,null,""].includes(l())||ot(e)&&Array.isArray(l())||"select"===e.tagName.toLowerCase()&&e.multiple)&&c(Zn(e,t,{target:e},l())),e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=p,r(()=>e._x_removeModelListeners.default()),e.form){let n=Wn(e.form,"reset",[],n=>{Ie(()=>e._x_model&&e._x_model.set(Zn(e,t,{target:e},l())))});r(()=>n())}e._x_model={get(){return l()},set(e){c(e)}},e._x_forceModelUpdate=t=>{void 0===t&&"string"==typeof n&&n.match(/\./)&&(t=""),window.fromModel=!0,T(()=>Ye(e,"value",t)),delete window.fromModel},i(()=>{let n=l();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(n)})}),ne("cloak",e=>queueMicrotask(()=>T(()=>e.removeAttribute(ee("cloak"))))),Te(()=>`[${ee("init")}]`),ne("init",Ke((e,{expression:t},{evaluate:n})=>"string"==typeof t?!!t.trim()&&n(t,{},!1):n(t,{},!1))),ne("text",(e,{expression:t},{effect:n,evaluateLater:i})=>{let r=i(t);n(()=>{r(t=>{T(()=>{e.textContent=t})})})}),ne("html",(e,{expression:t},{effect:n,evaluateLater:i})=>{let r=i(t);n(()=>{r(t=>{T(()=>{e.innerHTML=t,e._x_ignoreSelf=!0,Pe(e),delete e._x_ignoreSelf})})})}),fe(ce(":",ee("bind:")));var Yn=(e,{value:t,modifiers:n,expression:i,original:r},{effect:o,cleanup:s})=>{if(!t){let t={};return a=t,Object.entries(dt).forEach(([e,t])=>{Object.defineProperty(a,e,{get(){return(...e)=>t(...e)}})}),void J(e,i)(t=>{ht(e,t,r)},{scope:t})}var a;if("key"===t)return function(e,t){e._x_keyExpression=t}(e,i);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let l=J(e,i);o(()=>l(r=>{void 0===r&&"string"==typeof i&&i.match(/\./)&&(r=""),T(()=>Ye(e,t,r,n))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})};function Qn(e,t,n,i){let r={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(e=>e.trim()).forEach((e,n)=>{r[e]=t[n]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&"object"==typeof t?e.item.replace("{","").replace("}","").split(",").map(e=>e.trim()).forEach(e=>{r[e]=t[e]}):r[e.item]=t,e.index&&(r[e.index]=n),e.collection&&(r[e.collection]=i),r}function ei(){}function ti(e,t,n){ne(t,i=>ye(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,i))}Yn.inline=(e,{value:t,modifiers:n,expression:i})=>{t&&(e._x_inlineBindings||(e._x_inlineBindings={}),e._x_inlineBindings[t]={expression:i,extract:!1})},ne("bind",Yn),ke(()=>`[${ee("data")}]`),ne("data",(e,{expression:t},{cleanup:i})=>{if(function(e){return!!Ve&&(!!He||e.hasAttribute("data-has-alpine-state"))}(e))return;t=""===t?"{}":t;let r={};z(r,e);let o={};var s,a;s=o,a=r,Object.entries(_t).forEach(([e,t])=>{Object.defineProperty(s,e,{get(){return(...e)=>t.bind(a)(...e)},enumerable:!1})});let l=K(e,t,{scope:o});void 0!==l&&!0!==l||(l={}),z(l,e);let c=n(l);L(c);let u=P(e,c);c.init&&K(e,c.init),i(()=>{c.destroy&&K(e,c.destroy),u()})}),Ze((e,t)=>{e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0))}),ne("show",(e,{modifiers:t,expression:n},{effect:i})=>{let r=J(e,n);e._x_doHide||(e._x_doHide=()=>{T(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{T(()=>{1===e.style.length&&"none"===e.style.display?e.removeAttribute("style"):e.style.removeProperty("display")})});let o,s=()=>{e._x_doHide(),e._x_isShown=!1},a=()=>{e._x_doShow(),e._x_isShown=!0},l=()=>setTimeout(a),c=De(e=>e?a():s(),t=>{"function"==typeof e._x_toggleAndCascadeWithTransitions?e._x_toggleAndCascadeWithTransitions(e,t,a,s):t?l():s()}),u=!0;i(()=>r(e=>{(u||e!==o)&&(t.includes("immediate")&&(e?l():s()),c(e),o=e,u=!1)}))}),ne("for",(e,{expression:t},{effect:i,cleanup:r})=>{let o=function(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,n=e.match(/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/);if(!n)return;let i={};i.items=n[2].trim();let r=n[1].replace(/^\s*\(|\)\s*$/g,"").trim(),o=r.match(t);return o?(i.item=r.replace(t,"").trim(),i.index=o[1].trim(),o[2]&&(i.collection=o[2].trim())):i.item=r,i}(t),s=J(e,o.items),a=J(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},i(()=>function(e,t,i,r){let o=e;i(i=>{var s;s=i,!Array.isArray(s)&&!isNaN(s)&&i>=0&&(i=Array.from(Array(i).keys(),e=>e+1)),void 0===i&&(i=[]);let a=e._x_lookup,l=e._x_prevKeys,c=[],u=[];if("object"!=typeof(p=i)||Array.isArray(p))for(let n=0;n<i.length;n++){let o=Qn(t,i[n],n,i);r(t=>{u.includes(t)&&ye("Duplicate key on x-for",e),u.push(t)},{scope:{index:n,...o}}),c.push(o)}else i=Object.entries(i).map(([n,o])=>{let s=Qn(t,o,n,i);r(t=>{u.includes(t)&&ye("Duplicate key on x-for",e),u.push(t)},{scope:{index:n,...s}}),c.push(s)});var p;let f=[],d=[],h=[],_=[];for(let e=0;e<l.length;e++){let t=l[e];-1===u.indexOf(t)&&h.push(t)}l=l.filter(e=>!h.includes(e));let m="template";for(let e=0;e<u.length;e++){let t=u[e],n=l.indexOf(t);if(-1===n)l.splice(e,0,t),f.push([m,e]);else if(n!==e){let t=l.splice(e,1)[0],i=l.splice(n-1,1)[0];l.splice(e,0,i),l.splice(n,0,t),d.push([t,i])}else _.push(t);m=t}for(let e=0;e<h.length;e++){let t=h[e];t in a&&(T(()=>{$e(a[t]),a[t].remove()}),delete a[t])}for(let e=0;e<d.length;e++){let[t,n]=d[e],i=a[t],r=a[n],s=document.createElement("div");T(()=>{r||ye('x-for ":key" is undefined or invalid',o,n,a),r.after(s),i.after(r),r._x_currentIfEl&&r.after(r._x_currentIfEl),s.before(i),i._x_currentIfEl&&i.after(i._x_currentIfEl),s.remove()}),r._x_refreshXForScope(c[u.indexOf(n)])}for(let e=0;e<f.length;e++){let[t,i]=f[e],r="template"===t?o:a[t];r._x_currentIfEl&&(r=r._x_currentIfEl);let s=c[i],l=u[i],p=document.importNode(o.content,!0).firstElementChild,d=n(s);P(p,d,o),p._x_refreshXForScope=e=>{Object.entries(e).forEach(([e,t])=>{d[e]=t})},T(()=>{r.after(p),Ke(()=>Pe(p))()}),"object"==typeof l&&ye("x-for key cannot be an object, it must be a string or an integer",o),a[l]=p}for(let e=0;e<_.length;e++)a[_[e]]._x_refreshXForScope(c[u.indexOf(_[e])]);o._x_prevKeys=u})}(e,o,s,a)),r(()=>{Object.values(e._x_lookup).forEach(e=>T(()=>{$e(e),e.remove()})),delete e._x_prevKeys,delete e._x_lookup})}),ei.inline=(e,{expression:t},{cleanup:n})=>{let i=Se(e);i._x_refs||(i._x_refs={}),i._x_refs[t]=e,n(()=>delete i._x_refs[t])},ne("ref",ei),ne("if",(e,{expression:t},{effect:n,cleanup:i})=>{"template"!==e.tagName.toLowerCase()&&ye("x-if can only be used on a <template> tag",e);let r=J(e,t);n(()=>r(t=>{t?(()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let t=e.content.cloneNode(!0).firstElementChild;P(t,{},e),T(()=>{e.after(t),Ke(()=>Pe(t))()}),e._x_currentIfEl=t,e._x_undoIf=()=>{T(()=>{$e(t),t.remove()}),delete e._x_currentIfEl}})():e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)})),i(()=>e._x_undoIf&&e._x_undoIf())}),ne("id",(e,{expression:t},{evaluate:n})=>{n(t).forEach(t=>function(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Fn(t))}(e,t))}),Ze((e,t)=>{e._x_ids&&(t._x_ids=e._x_ids)}),fe(ce("@",ee("on:"))),ne("on",Ke((e,{value:t,modifiers:n,expression:i},{cleanup:r})=>{let o=i?J(e,i):()=>{};"template"===e.tagName.toLowerCase()&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Wn(e,t,n,e=>{o(()=>{},{scope:{$event:e},params:[e]})});r(()=>s())})),ti("Collapse","collapse","collapse"),ti("Intersect","intersect","intersect"),ti("Focus","trap","focus"),ti("Mask","mask","mask"),mt.setEvaluator(function(e,t){let n=function(e){let t={};return z(t,e),[t,...$(e)]}(e);if("function"==typeof t)return H(n,t);let i=function(e,t,n){return(e=()=>{},{scope:i={},params:r=[]}={})=>{let o=j([i,...n]),s=function(e){try{const t=new xt(e).tokenize(),n=new vt(t).parse(),i=new yt;return function(e={}){const{scope:t={},context:r=null,allowGlobal:o=!1,forceBindingRootScopeToFunctions:s=!1}=e;return i.evaluate({node:n,scope:t,context:r,allowGlobal:o,forceBindingRootScopeToFunctions:s})}}catch(e){throw new Error(`CSP Parser Error: ${e.message}`)}}(t),a=s({scope:o,allowGlobal:!0,forceBindingRootScopeToFunctions:!0});if(W&&"function"==typeof a){let t=a.apply(a,r);t instanceof Promise?t.then(t=>e(t)):e(t)}else"object"==typeof a&&a instanceof Promise?a.then(t=>e(t)):e(a)}}(0,t,n);return G.bind(null,e,t,i)}),mt.setReactivityEngine({reactive:jn,effect:function(e,t=Et){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return e();if(!Ft.includes(n)){qt(n);try{return Vt.push(Wt),Wt=!0,Ft.push(n),wt=n,e()}finally{Ft.pop(),Kt(),wt=Ft[Ft.length-1]}}};return n.id=Gt++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n},release:function(e){e.active&&(qt(e),e.options.onStop&&e.options.onStop(),e.active=!1)},raw:Ln});var ni=mt;function ii(){document.addEventListener("DOMContentLoaded",()=>{ni.start()},{once:!0})}const ri=e=>{ni.nextTick(()=>{ni.destroyTree(e),ni.initTree(e)})};(window.elementorV2=window.elementorV2||{}).alpinejs=t}(),window.elementorV2.alpinejs?.init?.();