// source --> https://cbblanes.cat/wp-content/plugins/photo-gallery/js/scripts.min.js?ver=1.8.39 
var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&parseInt(jQuery(".spider_popup_close").css("right"))<0&&jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id)),1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),jQuery("#spider_popup_wrap .bwg_image_wrap").on("swiperight",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_wrap .bwg_image_wrap").on("swipeleft",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):"width"==gallery_box_data.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){var t,i,a,r;window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var _=e.target,s=_.getBoundingClientRect();e.targetTouches&&(a=e.targetTouches[0].clientX-s.left,r=e.targetTouches[0].clientY-s.top),t=e.offsetX?e.offsetX:e.targetTouches?a:_.offsetHeight,i=e.offsetY?e.offsetY:e.targetTouches?r:_.offsetWidth,x=t/_.offsetWidth*100,y=i/_.offsetHeight*100,_.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&#038;/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+a+"px; height:"+r+"px; margin-top:-"+r/2+"px; margin-left: -"+a/2+'px; ">'+e+"</div>").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());if(void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds)){instgrm.Embeds.process();var o=parseInt(jQuery("#bwg_image_container").height());jQuery(".bwg_embed_frame .instagram-media").css({"max-height":o+"px"})}}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){jQuery(".bwg_comments").mCustomScrollbar("destroy");var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i,e){var t={};t.image_id=jQuery("#rate_image_id").val(),t.rate=void 0!==e?e:jQuery("#"+i+" input[name='score']").val(),t.ajax_task=jQuery("#rate_ajax_task").val();var a=jQuery("#bwg_image_container").data("action");return jQuery.ajax({type:"POST",url:a,data:t,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var s=t.find(".cur_gal_id").val(),o=jQuery("#bwg_tag_id_"+s).val();o=o||0;var l=1==i?"&open_ecommerce=1":"",n=jQuery("#bwg_search_input_"+_).val(),g=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";n=n||"",void 0!==a&&(r+="&gallery_id="+a);var b="",w=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==w&&!1!==w&&(b="&open_comment=1");var d=parseInt(jQuery("#bwg_random_seed_"+_).val());spider_createpopup(r+"&bwg_gallery_type="+t.data("gallery-type")+"&bwg_random_seed="+d+"&image_id="+e+"&filter_tag="+o+l+b+"&filter_search_name="+n+g,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(jQuery("#rate_image_id").val(r[a].id),bwg_current_key=gallery_box_data.bwg_current_key,""==gallery_box_data.data[a].alt&&""==gallery_box_data.data[a].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show(),jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){bwg_info_height_set(),jQuery(".bwg_image_description").height()>jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),jQuery("#rate_image_id").val(r[a].id),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("<span />").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("<span />").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),n=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),g=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),b=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),w=jQuery(s).height(),d=jQuery(s).width(),u='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),u+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(b?"block":"table")+'; table-layout: fixed; height: 100%;">'+(g?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),n){var h=jQuery(".instagram-media"),m=jQuery(".bwg_embed_frame"),c=jQuery(".bwg_image_container").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),p=jQuery(".bwg_image_container").height()-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),y=r[a].image_width,f=r[a].image_height,j=bwg_resizing_ratio(y,f,c,p);m.attr("data-width",c),m.attr("data-height",p);var Q=j.width,v=j.height;Q<v?Q-=109:Q+=109,u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":c,"data-height":p,"data-instagram-width":y,"data-instagram-height":f,style:"width:"+Q+"px; height:"+v+"px; vertical-align:middle; display:inline-block; position:relative;"}),h.css({"max-height":v+"px","min-width":Q+"px !important"})}else u+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(b?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});u+="</span>"}else{jQuery(".bwg-loading").removeClass("bwg-hidden"),jQuery("#bwg_download").removeClass("bwg-hidden");var x="'"+(gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0]+"'";gallery_box_data.popup_enable_zoom&&(u+='<figure style="max-height: '+w+"px; max-width: "+d+"px; background-image: url("+x+'); background-repeat: no-repeat" class="bwg_popup_image bwg_popup_watermark" alt="'+r[a].alt+'" />'),u+='<img style="max-height: '+w+"px; max-width: "+d+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function z(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url.replace("image_id","image_id="+ +r[a].id));if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/intent/tweet?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&(bwg_slideshow_filmstrip_fix_dimension(),setTimeout(function(){bwg_disable_lightbox_filmstrip_left_right_arrow(gallery_box_data)},100)),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?u+="</figure></span></span>":u+="</span></span>",jQuery(o).html(u),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:d,maxHeight:w,height:"auto"}),l)z();else jQuery(o).find("img").one("load",function(){z()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").show())}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r<a;_++){var s=1;do{var o=(e+_*s+i)%i;if(void 0!==t[o])-1<t[o].filetype.indexOf("EMBED_")||jQuery("<img/>").attr("src",gallery_box_data.site_url+jQuery("<span />").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_width-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(bwg_popup_current_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:bwg_popup_current_height-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),setTimeout(function(){bwg_info_height_set()},500)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).width()-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),1!=gallery_box_data.open_with_fullscreen&&(gallery_box_data.lightbox_close_btn_right<0&&jQuery("#spider_popup_wrap").width()-2*gallery_box_data.lightbox_close_btn_right>=jQuery(window).width()||gallery_box_data.lightbox_close_btn_top<0&&jQuery("#spider_popup_wrap").height()-2*gallery_box_data.lightbox_close_btn_top>=jQuery(window).height()?jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"):jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"));var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";if(0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)){var _=parseFloat(jQuery("#bwg_star").attr("data-score"));jQuery("#bwg_star").removeAttr("data-score").html("");var s={starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,noRatedMsg:"Not rated yet.",readOnly:!1,score:_,starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t};e||(s.click=function(e,t){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form",e)).then(function(){gallery_box_data.data[a].rate=e,++gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating=_?((_+e)/2).toFixed(1):e.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})}),jQuery("#bwg_star").raty(s),jQuery(".bwg_image_rate_disabled").hide(),e&&jQuery(".bwg_image_rate_disabled").show()}}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),s={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),type:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:s,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("bwg-hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("bwg-hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e=jQuery(this).find("img");void 0===e.attr("style")&&(0==e.width()?e.on("load",function(){jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)}):(jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(e)))})}function bwg_filmstrip_thumb_view(e){var t=gallery_box_data.image_filmstrip_height,i=gallery_box_data.image_filmstrip_width,a=i-gallery_box_data.filmstrip_thumb_right_left_space,r=t,_=Math.max(i/e.width(),t/e.height()),s=e.width()*_,o=e.height()*_;e.css({width:s,height:o,marginLeft:(a-s)/2,marginTop:(r-o)/2})}function bwg_info_height_set(){bwg_info_position(!1),jQuery(".mCustomScrollBox").length&&jQuery(".bwg_image_info_container1").height()<jQuery(".mCustomScrollBox").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&jQuery(".bwg_image_info").css({height:jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)})}function bwg_info_position(e){var t=0,i="none";"top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(i="top"):"bottom"==gallery_box_data.lightbox_info_pos&&(i="bottom"),jQuery(".bwg_ctrl_btn_container").hasClass("closed")||("top"==gallery_box_data.lightbox_ctrl_btn_pos?"top"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height()):"bottom"==gallery_box_data.lightbox_info_pos&&(t=jQuery(".bwg_ctrl_btn_container").height())),"top"==i?0==e?jQuery(".bwg_image_info").css("top",t):jQuery(".bwg_image_info").animate({top:t+"px"},500):"bottom"==i&&(0==e?jQuery(".bwg_image_info").css("bottom",t):jQuery(".bwg_image_info").animate({bottom:t+"px"},500))}function bwg_disable_lightbox_filmstrip_left_arrow(e){"left"==e.left_or_top?0==parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)&&jQuery(".bwg_filmstrip_left").css({opacity:.3}):0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_right_arrow(e){"left"==e.left_or_top?"width"==e.width_or_height?parseInt(jQuery(".bwg_filmstrip_thumbnails").position().left)<=jQuery(".bwg_filmstrip").width()-jQuery(".bwg_filmstrip_thumbnails").width()+e.filmstrip_thumb_right_left_space+e.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):"width"==e.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3}):parseInt(jQuery(".bwg_filmstrip_thumbnails").position().top)<=jQuery(".bwg_filmstrip").height()-jQuery(".bwg_filmstrip_thumbnails").height()+gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.all_images_right_left_space&&jQuery(".bwg_filmstrip_right").css({opacity:.3})}function bwg_disable_lightbox_filmstrip_left_right_arrow(e){var t=jQuery(".bwg_filmstrip_thumbnails").position().left,i=jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width();"top"==e.left_or_top&&(t=jQuery(".bwg_filmstrip_thumbnails").position().top,i=jQuery(".bwg_filmstrip").height()>jQuery(".bwg_filmstrip_thumbnails").height()),jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"1"}),jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"1"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:first-child").index()!=jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&0!=t||jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"0.3"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:last-child").index()==jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),i&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"})}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+(i=i.replace("?t","?start"))+(-1!==i.indexOf("?")?"&":"?")+'enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="<iframe ";for(attr in""!=i&&(s+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');r+=s+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');o+=" >",""!=i&&(o+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=o+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+decodeURIComponent(t)+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var n=a["data-max-width"],g=a["data-max-height"];l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=t&&(l+='<img src="'+decodeURIComponent(t)+'" style="max-width:'+n+"px; max-height:"+g+'px; width: auto; height: auto">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=">",""!=t&&(l+='<div class="inner_instagram_iframe_'+obj_class+'" style="max-width: 100% !important; max-height: 100% !important; width: 100%; height: 100%; margin:0; vertical-align:middle;">'+atob(t)+"</div>"),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var b="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(b+=" "+attr+'="'+a[attr]+'"');b+=" >",""!=i&&(b+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=b+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var w="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(w+=" "+attr+'="'+a[attr]+'"');w+=" >",""!=i&&(w+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=w+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var d="<iframe ";for(attr in""!=i&&(d+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(d+=" "+attr+'="'+a[attr]+'"');r+=d+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var u="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');u+=" >",""!=i&&(u+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=u+="</div>";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var h="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(h+=" "+attr+'="'+a[attr]+'"');h+=" >",""!=i&&(h+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=h+="</div>";break;default:var m={content:""};jQuery(document).trigger("bwg_display_embed",[m,e,t,i,a]),r=m.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(bwg_ajax_url_nonce,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o,"instagram"),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_slideshow_filmstrip_thumbnail_timer=!1;window.bwg_slideshow_filmstrip_thumb={};var bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_remove_lazy_loader_icon(){1==bwg_objectsL10n.lazy_load&&jQuery("img.bwg_lazyload").Lazy({afterLoad:function(){jQuery(".lazy_loader").removeClass("lazy_loader")},onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}function bwg_main_ready(e){var t=e.data("bwg");1===e.data("scroll")&&(form_id="gal_front_form_"+t,jQuery("html, body").animate({scrollTop:jQuery("#"+form_id).offset().top-150},500)),bwg_remove_lazy_loader_icon(),0<e.find(".wd_error").length&&bwg_container_loaded(t);var i=e.find(".bwg-container");if("album"===e.data("is-album")&&i.hasClass("bwg-thumbnails"))var a="thumbnails";else a=e.data("gallery-type");switch(bwg_document_ready(e),a){case"thumbnails":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(i);break;case"thumbnails_mosaic":bwg_thumbnail_mosaic(i);break;case"slideshow":bwg_slideshow_ready(t);break;case"carousel":bwg_carousel_ready(t),bwg_carousel_onload(e);break;case"image_browser":bwg_image_browser_ready(e);break;case"blog_style":bwg_blog_style_ready(e)}}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}function bwg_tags_button_section_visibility(){jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this),t=e.find(".current_view").val(),i=e.find(".show_bottom_tag").val(),a=e.find(".bwg_tags_container_"+t+" .bwg_tag_button_view_container");if(a.length)var r=a[0].scrollHeight;var _=a.find(".bwg_tags_filter_buttons").outerHeight(!0),s=parseInt(2*a.find(".bwg_tags_filter_buttons").outerHeight(!0)+3);s<r?(0===jQuery(this).find(".see_all_tags.bwg_hide").length&&a.css({"min-height":_,"max-height":s,overflow:"hidden"}),a.next(".bwg_tag_button_see_all").show()):(a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}),a.next(".bwg_tag_button_see_all").hide());var o=a.next().find(".see_all_tags").width()/2;a.next().find(".see_all_tags").attr("style","margin-left: -"+o+"px"),a.next().find(".see_all_tags").off("click").on("click",function(){jQuery(this).hasClass("bwg_show")?(jQuery(this).removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("bwg_hide")&&(jQuery(this).removeClass("bwg_hide").addClass("bwg_show").html("<span>&#43;</span>"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("bwg_show").addClass("bwg_hide").html("<span>&#8722;</span>"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process();var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&void 0!==bwg_params_carousel[bwg]&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){if(bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var e=jQuery(".bwg_embed_frame_"+t),i=e.data("height");e.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+t+" #instagram-embed-"+t).css({"max-height":i+"px"}),e.css({display:"inline-block"})}jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#bwg_container1_"+t).on("swiperight",function(){bwg_params_carousel[t].carousel.prev()}),jQuery("#bwg_container1_"+t).on("swipeleft",function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");jQuery(".bwg_carousel-container"+e).length&&(bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start())})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;a<bwg_params_carousel[t].carousel_r_width?r=a/bwg_params_carousel[t].carousel_r_width:a=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].parent_width!=a&&(bwg_params_carousel[t].parent_width=a,bwg_params_carousel[t].carousel_image_column_number>bwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)<bwg_params_carousel[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*r),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*r),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:a*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*r}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_carousel-container"+t).css({width:a,height:bwg_params_carousel[t].image_height*r}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*r,height:bwg_params_carousel[t].image_height*r}),bwg_params_carousel[t].carousel&&!e||(e&&bwg_params_carousel[t].carousel&&bwg_params_carousel[t].carousel.pause(),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:a*r,containerHeight:bwg_params_carousel[t].image_height*r,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*r,largeFeatureHeight:bwg_params_carousel[t].image_height*r,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})))}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(r){if(jQuery("#bwg_slideshow_image_container_"+r).length){bwg_params[r]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+r).attr("data-params")),bwg_params[r].event_stack=[];var e=".bwg_slideshow_filmstrip_"+r,t="bwg_slideshow_filmstrip_thumbnail_"+r;bwg_slideshow_filmstrip_thumb[t]={},bwg_slideshow_filmstrip_thumb[t].next_prev_index=0;var i=!1;2==bwg_params[r].slideshow_filmstrip_type&&(i=!0,e=".bwg_slideshow_filmstrip_fix_count_"+r),bwg_container_loaded(r);var a=bwg_params[r].data;jQuery("#bwg_container1_"+r).on("swiperight",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r)?(parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r))%a.length:a.length-1,a,"",r),!1}),jQuery("#bwg_container1_"+r).on("swipeleft",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),parseInt(jQuery("#bwg_current_image_key_"+r).val())+bwg_iterator(r)%a.length,a,"",r),!1});var _=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(r),jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(r)},500),1==bwg_params[r].slideshow_filmstrip_type&&("horizontal"==bwg_params[r].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+r).height(jQuery(".bwg_slideshow_image_wrap_"+r).height()-bwg_params[r].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+r).width(jQuery(".bwg_slideshow_image_wrap_"+r).width()-bwg_params[r].slideshow_filmstrip_width));var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(e).bind(s,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+r).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+r).trigger("click"),!1});var o={bwg:r,params:bwg_params[r],slideshow_filmstrip_class_name:e};if(jQuery(".bwg_slideshow_filmstrip_right_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_next(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_next(o)}),jQuery(".bwg_slideshow_filmstrip_left_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_prev(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_prev(o)}),"width"==bwg_params[r].width_or_height?bwg_set_filmstrip_pos(jQuery(e).width(),r):bwg_set_filmstrip_pos(jQuery(e).height(),r),jQuery("#bwg_slideshow_play_pause_"+r).off(_).on(_,function(){jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-play")?(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).play()):(window.clearInterval(window["bwg_playInterval"+r]),jQuery(".bwg_slideshow_play_pause_"+r).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-play bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).pause())}),0!=bwg_params[r].enable_slideshow_autoplay&&(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&jQuery("#bwg_audio_"+r).length&&document.getElementById("bwg_audio_"+r).play()),bwg_params[r].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),r),jQuery(".bwg_slideshow_image_"+r).removeAttr("width"),jQuery(".bwg_slideshow_image_"+r).removeAttr("height"),jQuery("#instagram-embed-"+r).hide(),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var l=jQuery(".bwg_embed_frame_"+r),n=l.data("height");l.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+r+" #instagram-embed-"+r).css({"max-height":n+"px"}),l.css({display:"inline-block"})}if(0<jQuery(".elementor-editor-active .bwg_embed_frame_"+r).length){!function e(){var t=jQuery(document).find(".bwg_embed_frame_"+r+" iframe");if(0<t.length){var i=jQuery(".bwg_embed_frame_"+r),a=i.data("height");return void t.css({"max-height":a+"px"})}window.setTimeout(e,500)}()}}}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(e){var t=e.data("bwg");bwg_container_loaded(t),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process(),jQuery(".image_browser_images_conteiner_"+t).length&&(bwg_params_ib[t]=JSON.parse(jQuery(".image_browser_images_conteiner_"+t).attr("data-params")),setTimeout(function(){bwg_image_browser(t)},3))}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("bwg-hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("bwg-hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&!jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var s=100/_,o=jQuery(e).find(".bwg-extended-item"),l=parseInt(o.css("margin-left")),n=parseInt(o.css("margin-right"));o.css({width:"calc("+s+"% - "+(l+n)+"px)"}),o.width()<i?o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):o.width()>2*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2"),i=jQuery(this).find(".bwg-item1"),a=0<t.width()?t.width():i.width(),r=0<t.height()?t.height():i.height(),_=e.data("width"),s=e.data("height");""!=_&&""!=s&&void 0!==_&&void 0!==s||(_=e.width(),s=e.height());var o=_/s;e.removeAttr("style"),o<a/r?(_<a?e.css({width:"100%",height:a/o}):e.css({maxWidth:"100%",height:Math.ceil(a/o)}),s=(_=a)/o):(r>e.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i<o;i++)l.push(0);_.find(".bwg-item").each(function(){var e=l.indexOf(Math.min.apply(Math,l));jQuery(this).css({height:s,order:e+1}),l[e]+=jQuery(this)[0].getBoundingClientRect().width});var n=Math.max.apply(Math,l);for(_.width(n),i=0;i<o;i++)l[i]<n&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),b=_.data("thumbnail-border"),w=(_.data("thumbnail-padding"),o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o<w&&(w=o);var d=_.find(".bwg-item").length;d<w&&(w=d);var u,h,m=100/w,c=[];for(i=0;i<w;i++)c.push(0);_.find(".bwg-item").each(function(){var e=c.indexOf(Math.min.apply(Math,c)),t=jQuery(this).find("img");if(jQuery(this).css({width:m+"%",order:e+1}),void 0!==t.data("src")&&-1===t.data("src").indexOf("svg")&&0<t.attr("data-width").length&&0<t.attr("data-height").length){h=parseInt(t.data("width"))/parseInt(t.data("height")),u=t.width()/h;var i=(this.querySelector("a .bwg-zoom-effect-overlay .bwg-title2")||!this.querySelector("a .bwg-title1 .bwg-title2")?0:this.querySelector("a .bwg-title1 .bwg-title2").getClientRects()[0].height)+(0<jQuery(this).find(".bwg-masonry-thumb-description").length?jQuery(this).find(".bwg-masonry-thumb-description").height():0);jQuery(this).height(Math.floor(u+i+2*b))}c[e]+=jQuery(this)[0].getBoundingClientRect().height});var p=Math.max.apply(Math,c);for(i=0;i<w;i++)c[i]<p&&_.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:m+"%",order:i+1,height:p-c[i]}));_.outerWidth(w*(g+2*b)),_.height(p)}if(""!=a.html()){r.outerWidth(w*(g+2*b)),"0"!=p?(r.css("opacity","1"),r.height(p)):r.css("opacity","0"),r.empty();var y=a.html();r.append(y),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).data("src")&&""!=jQuery(this).data("src")&&(jQuery(this).attr("src",jQuery(this).data("src")),jQuery(this).on("load",function(){jQuery(this).removeClass("lazy_loader")}))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,_=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var r=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*r;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*r;else s=r;else s=r;(p=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=p.get(e).naturalWidth,i=p.get(e).naturalHeight),t=t*s/i,p.eq(e).css({cssText:"width:"+t+"px !important; height:"+s+"px !important;"})});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*_,n=0,g=[];g[0]=0;var b=[],w=b[0]=0;p.each(function(e){row_cum_width2=w+p.eq(e).width()+2*_,row_cum_width2-o<0?(w=row_cum_width2,g[e]=n,b[n]++):e!==p.length-1?Math.abs(w-o)>Math.abs(row_cum_width2-o)||Math.abs(w-o)<=Math.abs(row_cum_width2-o)&&0==b[n]?e!==p.length-2?(w=row_cum_width2,g[e]=n,b[n]++,b[++n]=0,w=0):(w=row_cum_width2,g[e]=n,b[n]++):(b[++n]=1,g[e]=n,w=row_cum_width2-w):(w=row_cum_width2,g[e]=n,b[n]++)});for(var d=[],u=[],h=0;h<=n;h++)w=0,p.each(function(e){g[e]==h&&(w+=p.eq(e).width())}),d[h]=C=(o-2*b[h]*_)/w,u[h]=(l-2*_)*d[h]+2*_;if(0==n)for(h=0;h<=n;h++)u[h]>s&&(d[h]=1,u[h]=l);(T=[])[0]=0;var m=[],c=[];m[0]=0,c[0]=0;for(h=1;h<=n;h++)m[h]=m[0],c[h]=c[h-1]+u[h-1];p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[g[e]],r=i*d[g[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:c[g[e]],left:m[g[e]]}),m[g[e]]+=t*d[g[e]]+2*_,T[g[e]]=e}),jQuery("#"+i).height(c[n]+u[n]-c[0])}else{var p,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0<jQuery(".header-content-with_tab").length)f=jQuery(".header-content-with_tab").width()/4-10}else{f=y;var j=jQuery(".bwg_container").width();void 0!==j&&j<y&&(f=j)}(p=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){jQuery(this).removeAttr("style"),jQuery(this).parent().removeAttr("style");var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=p.get(e).naturalWidth,0!==(i=p.get(e).naturalHeight)&&""!==i||(i=f),0!==t&&""!==t||(t=f)),p.eq(e).css({cssText:"width:"+f+"px !important; height:"+i*f/t+"px !important;"})});o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var Q=f+2*_<o?f:o-2*_,v=Math.min(Math.floor(o/(Q+2*_)),p.length),x=[];x[0]=0;for(var k=[],z=[],C=0;C<v;C++)z[C]=0,k[C]=0;p.each(function(e){for(var t=0,i=z[0],a=0;a<v;a++)i>z[a]&&(i=z[a],t=a);x[e]=t,k[t]++,A=i,H=0+t*(Q+2*_),p.eq(e).parent().css({top:A,left:H}),z[t]+=p.eq(e).height()+2*_}),(d=[])[0]=1;var I=0,E=[],M=0,S=0;for(C=0;C<v;C++)I+=Q,E[C]=0,p.each(function(e){x[e]==C&&(E[C]+=p.eq(e).height())}),0!=E[C]&&(M+=Q/E[C],S+=Q*k[C]*2*_/E[C]);var O=0;0!=M&&(O=(I+S)/M);for(C=0;C<v;C++)0!=E[C]&&(d[C]=(O-2*k[C]*_)/E[C]);var T,H=[];H[0]=0;for(C=1;C<=v;C++)H[C]=H[C-1]+Q*d[C-1]+2*_;var A=[];for(C=0;C<v;C++)A[C]=0;(T=[])[0]=0,p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[x[e]],r=i*d[x[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:A[x[e]],left:H[x[e]]}),A[x[e]]+=i*d[x[e]]+2*_,T[x[e]]=e}),jQuery("#"+i).width(H[v]).height(A[0])}}function bwg_thumbnail_mosaic(e){var t=jQuery(e),i=jQuery.Deferred();if(i.done([bwg_thumbnail_mosaic_logic]).done(function(e){"1"!=e.data("mosaic-thumb-transition")&&jQuery(".bwg_mosaic_thumb_spun_"+t).css({transition:"all 0.3s ease 0s","-webkit-transition":"all 0.3s ease 0s"});var t=e.data("bwg");jQuery(".bwg_mosaic_thumbnails_"+t).css({visibility:"visible"}),jQuery(".tablenav-pages_"+t).css({visibility:"visible"}),bwg_container_loaded(t),jQuery(".bwg_mosaic_thumb_"+t).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+t).removeClass("bwg-hidden")}),i.resolve(t),"hover"==t.attr("data-image-title")){var a=parseInt(t.attr("data-thumb-padding"))/2,r=parseInt(t.attr("data-thumb-border"))+a;bwg_mosaic_title_on_hover(t.data("bwg"),t,r)}"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).height();jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:r+.5*t-.5*a,left:r+.5*e-.5*i,opacity:1})}),jQuery(".bwg_mosaic_thumb_spun_"+bwg).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+bwg).css({top:0,left:-1e4,opacity:0,padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(t,e,i){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+t).width();jQuery(this).find(".bwg_mosaic_title_spun1_"+t).width(e),jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:1,"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+t).css({opacity:0,padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*i+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(e)})}function bwg_add_album(){var t=!1;"1"!=bwg_objectsL10n.front_ajax&&jQuery(document).off("click",".bwg-album").on("click",".bwg-album",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(document).on("click",".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image, .bwg_lightbox .bwg-title1",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).closest("a");if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t,i="",a="",r=(a=jQuery(e).parent().parent().hasClass("bwg_tag_buttons_view")?jQuery(e).parent().parent():jQuery(e).parent().parent().parent()).find(".current_view").val(),_=a.find(".form_id").val(),s=a.find(".cur_gal_id").val(),o=a.find(".album_gallery_id").val(),l=a.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){i=i+jQuery(e).text()+","}),""==(i=i.slice(0,-1))&&(i=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",i),jQuery(e).parent().find(".CaptionCont .placeholder").html(i);var n=jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+s).val();t="string"==typeof n&&""!==n?n.split(","):[],"object"==typeof n&&(t=n),jQuery(".bwg_tags_container_"+r+" #bwg_tag_id_"+r).val(t),bwg_select_tag(r,_,s,o,l,!1)}function bwg_document_ready(i){bwg_add_lightbox(),i.data("right-click-protection")&&bwg_disable_right_click(i);var e=i.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&e.length)for(var t=0;t<e[0].length;t++)void 0===e[0][t].attributes.selected&&(e[0][t].selected=!1);e.length&&(e.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),e.off("change").on("change",function(){bwg_filter_by_tag(this)})),bwg_search_tag_init(i);var a=i.find(".cur_gal_id").val(),r=i.find(".current_view").val(),_=i.find(".bwg_tags_container_"+r+" .bwg_tag_button_view_container"),s=i.find("#bwg_tag_id_"+a),o=parseInt(2*_.find(".bwg_tags_filter_buttons").outerHeight(!0));_.length&&(_.find(".bwg_tags_filter_buttons").off("click").on("click",function(){if(!jQuery(this).hasClass("active")){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1"),""==s.val()?s.val(jQuery(this).val()):s.val(s.val()+","+jQuery(this).val()),bwg_filter_by_tag(this)}return!1}),_.find(".bwg_all_tags").off("click").on("click",function(){return jQuery(this).hasClass("active")||(s.val(""),bwg_filter_by_tag(this)),!1}),""!=s.val()&&_.find(".bwg_all_tags").removeClass("active"),s.val().split(",").forEach(function(t){_.find(".bwg_tags_filter_buttons").each(function(){if(jQuery(this).val()==t){var e=jQuery(this).position().top;o<e&&i.find(".show_bottom_tag").val("1")}})}),bwg_tags_button_section_visibility());var l=i.find(".bwg_order");l.length&&l.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed"),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=(jQuery(this).parents(".bwg_container").find(".wd_error").length,jQuery(this).parent(".SumoSelect").find(".optWrapper>.options"));void 0!==t&&(e-50<t.height()&&t.css("max-height",e-50));0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var n=window.location.hash.substring(1);if(n&&"-1"!=n.indexOf("bwg")){bwg_hash_array=n.replace("bwg","").split("/");var g=jQuery(".bwg_container");g&&bwg_gallery_box(bwg_hash_array[1],g,!1,bwg_hash_array[0])}bwg_resize_search_line()}function bwg_search_tag_init(e){var t=e.find(".search_tags");if("1"==bwg_objectsL10n.front_ajax&&t.length)for(var i=0;i<t[0].length;i++)void 0===t[0][i].attributes.selected&&(t[0][i].selected=!1);t.length&&(t.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}))}function bwg_clear_search_input(e){if("1"!=bwg_objectsL10n.front_ajax)jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("bwg-hidden");else{var t=window.location.href,i=bwg_remove_url_parameter("bwg_search_"+e,t,t);window.location.replace(i)}}function bwg_check_search_input_enter(e,t){return"Enter"!=t.key||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,s,o,l,n,g,b){if("1"==bwg_objectsL10n.front_ajax&&!0!==n){if("back"===r)return-1==document.referrer.indexOf(window.location.host)?(str=jQuery(location).attr("href"),void window.location.replace(str.substring(0,str.indexOf("type_0")))):void window.history.back();var w=jQuery("#bwg_search_input_"+i).val(),d=jQuery(".bwg_tags_container_"+i+" .cur_gal_id").val(),u=window.location.href,h="",m=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+d).val();if("#"==u.substr(-1)&&(u=u.slice(0,-1)),""!==w&&void 0!==w?!1!==(h=bwg_add_url_parameter(h=bwg_remove_url_parameter("page_number_"+i,u),"bwg_search_"+i,w))&&(u=h):!1!==(h=bwg_remove_url_parameter("bwg_search_"+i,u))&&(u=h),void 0!==l&&""!==l&&!1!==(h=bwg_add_url_parameter(u,"sort_by_"+i,l))&&(u=h),null!=m&&0<m.length){var c="";jQuery(".bwg_tags_container_"+i).parent().hasClass("bwg_tag_select_view")&&(m=m.toString());var p=m.split(",");jQuery.each(p,function(e){var t=",";e===p.length-1&&(t=""),c+=p[e]+t}),""!==c&&!1!==(h=bwg_add_url_parameter(u,"filter_tag_"+i,c))&&(u=h)}else!1!==(h=bwg_remove_url_parameter("filter_tag_"+i,h))&&(u=h);return s&&!1!==(h=bwg_remove_url_parameter("page_number_"+i,h))&&(u=h),void(window.location.href=u)}n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var y=jQuery("#"+t).data("ajax-url"),f=0;if(void 0===n)n=!1;var j,Q=jQuery("#page_number_"+i).val(),v=jQuery("#bwg_search_input_"+i).val(),x={},k=jQuery("#bwg_album_breadcrumb_"+i).val();if(k&&!0!==n){var z=JSON.parse(k);if("back"==r){z.splice(-1,1);var C=z.slice(-1)[0];r=C.id,Q=C.page,x["action_"+i]="back"}else"numeric"===n||s?(z.splice(-1,1),z.push({id:r,page:Q,search:v})):(z.push({id:r,page:1}),Q=1);x["bwg_album_breadcrumb_"+i]=JSON.stringify(z)}if(x["bwg-preview-type"]=jQuery("#"+t).data("gallery-type"),x.gallery_type=jQuery("#"+t).data("gallery-type"),x.gallery_id=jQuery("#"+t).data("gallery-id"),x.tag=jQuery("#"+t).data("tag"),x.album_id=jQuery("#"+t).data("album-id"),x.theme_id=jQuery("#"+t).data("theme-id"),x.shortcode_id=jQuery("#"+t).data("shortcode-id"),x.bwg=i,x.current_url=encodeURI(jQuery("#bwg_container1_"+i).data("current-url")),s&&(Q=1),void 0===o||""==o)o="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();if(void 0===b)b=!0;if(1==b&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),x["page_number_"+i]=Q,x["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),x["album_gallery_id_"+i]=r,x["type_"+i]=_,x["title_"+i]=o,x["description_"+i]=g,x["sortImagesByValue_"+i]=l,x["bwg_random_seed_"+i]=parseInt(jQuery("#bwg_random_seed_"+i).val()),0<jQuery("#bwg_search_input_"+i).length&&(x["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val()),void 0!==x["bwg_album_breadcrumb_"+i]){var I=JSON.parse(x["bwg_album_breadcrumb_"+i]);jQuery.each(I,function(e,t){x["bwg_search_"+i]="",r==t.id&&(x["bwg_search_"+i]=t.search)})}var E=jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val();return j="string"==typeof E&&""!==E?E.split(","):[],"object"==typeof E&&(j=E),x["bwg_tag_id_"+a]=j,n?(jQuery(".bwg_loading_div_1").addClass("bwg_load_more_ajax_loading").removeClass("bwg_loading_div_1"),jQuery(".bwg_load_more_ajax_loading").css({top:jQuery("#bwg_container1_"+bwg).height()-jQuery(".bwg_load_more_ajax_loading").height()})):jQuery(".bwg_load_more_ajax_loading").addClass("bwg_loading_div_1").removeClass("bwg_load_more_ajax_loading").removeAttr("style"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery.ajax({type:"POST",url:y,data:x,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,f=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):a=="bwg_thumbnails_masonry_"+i?jQuery(".bwg-container-temp"+i).append(jQuery(e).closest(".bwg-container-"+i).html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e),bwg_remove_lazy_loader_icon()},complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-src")&&""!=jQuery(this).attr("data-src")&&jQuery(this).attr("src",jQuery(this).attr("data-src"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),""!=j&&null!==j||(j=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+a).val(j),j.forEach(function(t){jQuery(".bwg_tags_container_"+i+" .bwg_tags_filter_buttons").each(function(){var e=parseInt(2*jQuery(this).outerHeight(!0));jQuery(this).val()==t&&(jQuery(this).addClass("active"),e<jQuery(this).position().top&&jQuery(".bwg_tags_container_"+i+" .show_bottom_tag").val("1"),jQuery(".bwg_tags_container_"+i+" .bwg_all_tags").removeClass("active"))})}),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(jQuery("#bwg_container1_"+i));var e=jQuery("#bwg_container1_"+i).data("gallery-view-type");if(jQuery("#bwg_container1_"+i+" .bwg-album-thumbnails").length){bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i)}else{switch(e){case"thumbnails":case"thumbnail":case"masonry":case"mosaic":case"thumbnails_masonry":case"album_compact_preview":case"album_masonry_preview":case"album_extended_preview":bwg_all_thumnails_loaded(".bwg-container-"+i);break;case"slideshow":bwg_slideshow_ready(i);break;case"carousel":bwg_carousel_ready(i),bwg_carousel_onload(jQuery("#bwg_container1_"+i));break;case"image_browser":bwg_image_browser_ready(jQuery("#bwg_container1_"+i));break;case"blog_style":bwg_blog_style_ready(jQuery("#bwg_container1_"+i))}bwg_mosaic_ajax(i,f)}jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(x["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();jQuery("#bwg_container2_"+i+" .cur_gal_id").val();""!=j&&null!==j||(j=[]),jQuery(".bwg_tags_container_"+i+" #bwg_tag_id_"+i).val(j)}}),!1}function bwg_add_url_parameter(e,t,i){var a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+i+"$2"):e+r+t+"="+i}function bwg_remove_url_parameter(e,t){var i=t.split("?"),a=i[0]+"?",r="";if(void 0!==i[1]&&(r=i[1]),""===r)return t;var _,s,o=decodeURIComponent(r).split("&");for(s=0;s<o.length;s++)(_=o[s].split("="))[0]!=e&&(a=a+_[0]+"="+_[1]+"&");return a.substring(0,a.length-1)}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery(".bwg_tags_container_"+e+" #bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(void 0!==g&&""!==g){w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else b=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(g))return bwg_fallback(o,l,n,g);if(!bwg_testBrowser_cssTransforms3d(g))return bwg_fallback3d(o,l,n,g);function u(){if(jQuery(o).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+d).removeAttr("style"),jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),jQuery(".bwg_image_info").show(),jQuery(o).html(""),w){bwg_change_watermark_container(g),bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].data,t=bwg_params[g].event_stack}else{e="";gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}if(void 0!==t&&0<t.length){var i=t[0].split("-");t.shift(),bwg_change_image(i[0],i[1],e,!0,g)}bwg_change_watermark_container()}w?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g),jQuery(".bwg_slide_bg_"+g).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(o).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+d).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+d).css({transition:"all "+b+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+s+"deg)"})},20),jQuery(".bwg_slider"+d).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(u)),0==b&&u()}function bwg_cubeH(e,t,i,a){var r=jQuery(e).width()/2;"right"==i?bwg_cube(r,r,0,0,90,0,-90,e,t,i,a):"left"==i&&bwg_cube(r,-r,0,0,-90,0,90,e,t,i,a)}function bwg_cubeV(e,t,i,a){var r=jQuery(e).height()/2;"right"==i?bwg_cube(r,0,-r,90,0,-90,0,e,t,i,a):"left"==i&&bwg_cube(r,0,r,-90,0,90,0,e,t,i,a)}function bwg_fade(e,t,i,a){var r,_=!1;function s(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(s))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),s()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&s()}function bwg_grid(e,t,i,a,r,_,s,o,l,n,g){var b,w=!1,d="";if(event_stack=void 0!==g&&""!==g?(w=!0,bwg_params[g].bwg_trans_in_progress=!0,d="_"+g,b=bwg_params[g].bwg_transition_duration,bwg_params[g].event_stack):(b=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.event_stack),!bwg_testBrowser_cssTransitions())return bwg_fallback(o,l,n);w?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+d).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+d).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"));var u=b/(e+t);var h=jQuery(o).find("img"),m=jQuery(o).find("figure"),c=(jQuery(o).find("iframe").css("opacity",0),jQuery('<span style="display: block;" />').addClass("bwg_grid"+d));jQuery(o).prepend(c);var p,y,f,j,Q,v,x,k,z,C,I,E=jQuery(".bwg_slide_bg"+d),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),A=Math.floor(T/t),L=O-e*H,B=Math.ceil(L/e),W=T-t*A,D=Math.ceil(W/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+d).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P<e;P++){var U=0,V=Math.floor((jQuery(".bwg_slide_bg"+d).height()-h.height())/2),q=H;if(0<L){var J=B<=L?B:L;q+=J,L-=J}for(var G=0;G<t;G++){var Y=A,$=W;0<$&&(Y+=J=D<=$?D:W,$-=J),c.append((p=q,y=Y,f=U,j=V,Q=R,v=F,x=N,k=M,z=S,C=g,void 0,I=(P+G)*u,jQuery('<span class="bwg_gridlet'+d+'" />').css({display:"block",width:p,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:w?jQuery(".bwg_slideshow_image_wrap_"+C).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+z+"px",transition:"all "+b+"ms ease-in-out "+I+"ms",transform:"none"}))),U+=Y,V-=Y}F-=q,R+=q}var X=c.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),c.remove(),w){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0<e.length){var i=e[0].split("-");e.shift(),bwg_change_image(i[0],i[1],t,!0,g)}w?bwg_change_watermark_container(g):bwg_change_watermark_container()}c.show(),h.css("opacity",0),m.css("opacity",0),c.children().first().addClass("rs-top-left"),c.children().last().addClass("rs-bottom-right"),c.children().eq(t-1).addClass("rs-bottom-left"),c.children().eq(-t).addClass("rs-top-right"),setTimeout(function(){c.children().css({opacity:s,transform:"rotate("+i+"deg) translateX("+a+"px) translateY("+r+"px) scale("+_+")"})},1),jQuery(l).css("opacity",1),jQuery(X).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(K)),0==b&&K()}function bwg_sliceH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,8,0,r,0,1,0,e,t,i,a)}function bwg_sliceV(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(10,1,0,0,r,1,0,e,t,i,a)}function bwg_slideV(e,t,i,a){if("right"==i)var r="auto";else if("left"==i)r="min-auto";bwg_grid(1,1,0,0,r,1,1,e,t,i,a)}function bwg_slideH(e,t,i,a){if("right"==i)var r="min-auto";else if("left"==i)r="auto";bwg_grid(1,1,0,r,0,1,1,e,t,i,a)}function bwg_scaleOut(e,t,i,a){bwg_grid(1,1,0,0,0,1.5,0,e,t,i,a)}function bwg_scaleIn(e,t,i,a){bwg_grid(1,1,0,0,0,.5,0,e,t,i,a)}function bwg_blockScale(e,t,i,a){bwg_grid(8,6,0,0,0,.6,0,e,t,i,a)}function bwg_kaleidoscope(e,t,i,a){bwg_grid(10,8,0,0,0,1,0,e,t,i,a)}function bwg_fan(e,t,i,a){if("right"==i)var r=45,_=100;else if("left"==i)r=-45,_=-100;bwg_grid(1,10,r,_,0,1,0,e,t,i,a)}function bwg_blindV(e,t,i,a){bwg_grid(1,8,0,0,0,.7,0,e,t,"",a)}function bwg_blindH(e,t,i,a){bwg_grid(10,1,0,0,0,.7,0,e,t,"",a)}function bwg_random(e,t,i,a){var r=["sliceH","sliceV","slideH","slideV","scaleOut","scaleIn","blockScale","kaleidoscope","fan","blindH","blindV"];this["bwg_"+r[Math.floor(Math.random()*r.length)]](e,t,i,a)}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+o&&(o=0),0<n+s&&(s=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+o},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+s},{duration:500,complete:function(){void 0!==i&&bwg_disable_lightbox_filmstrip_left_right_arrow(i)}})}function bwg_slideshow_filmstrip_fix_dimension(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e&&void 0!==bwg_params[e].outerWidth_or_outerHeight?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e&&void 0!==bwg_params[e].left_or_top?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_slideshow_filmstrip_fix_count(e){var t,i,a,r,_,s,o=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip_fix_count"+o).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip_fix_count"+o).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).outerHeight(!0)),s="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+o).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().left+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+o).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+o).position().top+jQuery(".bwg"+l+"_thumb_active"+o).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-a},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-a},{duration:500}):s<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({left:-(r-t)},{duration:500}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+o).animate({top:-(r-t)},{duration:500})))}function bwg_resize_slideshow_filmstrip_fix_count(e){var _=e.bwg,t=e.parent_width,i=e.params,a=i.filmstrip_direction,r=i.data,s=i.filmstrip_thumb_margin_hor,o=jQuery(window).width()<=767&&5<i.slideshow_thumbnails_count,l=o?5:i.slideshow_thumbnails_count,n="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_container_"+_,g="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_,b="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_,w="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnails_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_,d="#bwg_container1_"+_+" #bwg_container2_"+_+" .bwg_slideshow_image_container_"+_,u=jQuery(d).data("filmstrip-position"),h=(jQuery(d).data("filmstrip-size"),i.slideshow_filmstrip_rl_btn_size);if(jQuery("#bwg_container1_"+_).css({width:"100%"}),jQuery("#bwg_container1_"+_+" #bwg_container2_"+_).css({width:t}),"undefined"==typeof resize_in_progress||!1===resize_in_progress){window.resize_in_progress=!0,void 0!==m&&clearTimeout(m);var m=setTimeout(function(){resize_in_progress=!1;var e={};"bottom"==u||"top"==u?e.left=0:e.top=0,jQuery(b).css(e);var t="horizontal"==a?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+_).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+_).css({display:t}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+_).css({display:"none"})},500)}if(bwg_resize_instagram_post(_),bwg_change_watermark_container(_),"horizontal"==a){var c=i.image_height/i.image_width,p=t-40,y=Math.round(c*p),f=(p-s*l)/l,j=Math.round(c*f);jQuery(n).css({width:t,height:j}),jQuery(g).css({width:p,height:j}),jQuery(w).css({width:f,height:j}),jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);i*=r=Math.max(f/i,j/a),a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(b).css({width:f*r.length+s*r.length,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:t*i.image_height/i.image_width}),(Q={width:t,height:t*(i.image_height/i.image_width)-j})[u]=j,jQuery(".bwg_slideshow_image_container_"+_).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+t+"px !important; max-height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+t+"px !important; height:"+(t*(i.image_height/i.image_width)-j)+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t+"px","max-height":t*(i.image_height/i.image_width)-j+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t),jQuery(".bwg_embed_frame_"+_).attr("data-height",t*(i.image_height/i.image_width)-j),j<h&&(h=j),jQuery(n).find(".bwg-icon-angle-left").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":h})}else{var Q,v=t*i.image_height/i.image_width;c=i.image_width/i.image_height,y=v-40,p=Math.round(c*y),j=(y-s*l)/l,f=Math.round(c*j);jQuery.each(r,function(e,t){var i=f,a=j;if(""!=t.image_width&&""!=t.image_height){var r=Math.max(f/t.image_width,j/t.image_height);i=t.image_width*r,a=t.thumb_height*r}""!=t.thumb_width&&""!=t.thumb_height&&(i=t.thumb_width,a=t.thumb_height);r=Math.max(f/i,j/a),i*=r,a*=r;jQuery(".bwg_slideshow_filmstrip_fix_count_"+_+" .bwg_slideshow_filmstrip_thumbnail_"+_+" .bwg_slideshow_filmstrip_thumbnail_img_"+_).css({width:f,height:j,"margin-left":0,"margin-top":0})}),jQuery(n).css({width:f,height:v}),jQuery(g).css({width:f,height:y}),jQuery(b).css({width:f,height:j*r.length+s*r.length}),jQuery(w).css({width:f,height:j}),jQuery(".bwg_slideshow_image_wrap_"+_).css({width:t,height:v}),(Q={width:t-f,height:v})[u]=f,jQuery(d).css(Q),jQuery(".bwg_slideshow_image_"+_).css({cssText:"max-width:"+(t-f)+"px !important; max-height:"+v+"px !important;"}),jQuery(".bwg_slideshow_embed_"+_).css({cssText:"width:"+(t-f)+"px !important; height:"+v+"px !important;"}),jQuery(".bwg_embed_frame_"+_).css({"max-width":t-f+"px","max-height":v+"px"}),jQuery(".bwg_embed_frame_"+_).attr("data-width",t-f),jQuery(".bwg_embed_frame_"+_).attr("data-height",v),f<h&&(h=f),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":h}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":h})}o&&(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"))}function bwg_resize_slideshow_filmstrip_fix_dimension(e){var t=e.bwg,i=e.parent_width,a=e.params,r=a.filmstrip_direction,_=a.slideshow_filmstrip_width,s=a.slideshow_filmstrip_height,o="#bwg_container1_"+t+" #bwg_container2_"+t,l=o+" .bwg_slideshow_image_wrap_"+t,n=o+" .bwg_slideshow_image_container_"+t,g=o+" .bwg_slideshow_image_"+t,b=o+" .bwg_slideshow_embed_"+t,w=l+" .bwg_slideshow_filmstrip_container_"+t,d=w+" .bwg_slideshow_filmstrip_"+t,u=i,h=u*(a.image_height/a.image_width);jQuery(l).css({width:u,height:h}),jQuery(n).css({width:u-("horizontal"==r?0:_),height:h-("horizontal"==r?s:0)}),jQuery(g).css({display:"inline-block","max-width":u-("horizontal"==r?0:_),"max-height":h-("horizontal"==r?s:0)}),jQuery(b).css({cssText:"width: "+(u-("horizontal"==r?0:_))+"px !important; height: "+(h-("horizontal"==r?s:0)-1)+"px !important;"}),bwg_resize_instagram_post(t),bwg_change_watermark_container(t),"horizontal"==r?(jQuery(w).css({width:u}),jQuery(d).css({width:u-40})):(jQuery(w).css({height:h}),jQuery(d).css({height:h-40}))}function bwg_calculate_slideshow_filmstrip_thumbnail_size(e){var t=e.bwg,i=e.params,a=i.slideshow_filmstrip_width;if(2==i.slideshow_filmstrip_type){var r="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_fix_count_"+t+" .bwg_slideshow_filmstrip_thumbnail_"+t;a=(i.left_or_top,"width"==i.width_or_height?jQuery(r).width():jQuery(r).height())}return parseFloat(a)}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,s=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500}):s<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),n=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),g=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),b=jQuery(s).height(),w=jQuery(s).width(),d='<span class="bwg_slideshow_image_spun1_'+r+'" style="display:  '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(d+='<span style="height: '+b+"px; width: "+w+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(d+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var u=jQuery(".bwg_embed_frame"),h=jQuery(".bwg_slideshow_image_container_"+r).width(),m=jQuery(".bwg_slideshow_image_container_"+r).height(),c=i[t].image_width,p=i[t].image_height,y=bwg_resizing_ratio(c,p,h,m);u.attr("data-width",h),u.attr("data-height",m);var f=y.width,j=y.height;f<j?f-=109:f+=109,d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame","data-width":h,"data-height":m,"data-instagram-width":c,"data-instagram-height":p,style:"width: 100%; height: 100%; max-width: 100%; max-height: 100%; vertical-align:middle; display:inline-block; position:relative;"})}else d+=spider_display_embed(i[t].filetype,decodeURIComponent(i[t].image_url),i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen","data-max-width":w,"data-max-height":b,style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});d+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var Q="";"open_lightbox"==bwg_params[r].thumb_click_action?Q+=' class="bwg_lightbox" data-image-id="'+i[t].id+'" data-elementor-open-lightbox="no"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(Q+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),d+="<a "+Q+">"}d+='<img style="max-height: '+b+"px !important; max-width: "+w+'px !important; display:inline-block;" ',d+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',d+=' id="bwg_slideshow_image_'+r+'" ',d+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}d+="</span></span>",jQuery(o).html(d),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),1==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_dimension(r):2==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_count(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox();var v="horizontal"==bwg_params[r].filmstrip_direction?"table-cell":"block",x=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).prev(),k=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).next(),z=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_"+r),C=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_disabled_"+r),I=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_"+r),E=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_disabled_"+r);x.length?(z.css({display:v}),C.css({display:"none"})):(z.css({display:"none"}),C.css({display:v}),I.css({display:v}),E.css({display:"none"})),k.length?(I.css({display:v}),E.css({display:"none"})):(I.css({display:"none"}),E.css({display:v}),z.css({display:v}),C.css({display:"none"})),void 0!==i[t]&&"EMBED_OEMBED_INSTAGRAM_POST"==i[t].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").css({"max-height":j+"px","min-width":f+"px !important"}),jQuery(".instagram-media").show())}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),s=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r<i.length;r++){s=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(s||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=".bwg_slideshow_filmstrip_"+e;2==bwg_params[e].slideshow_filmstrip_type&&(t=".bwg_slideshow_filmstrip_fix_count_"+e);var i=jQuery("#bwg_container1_"+e).parent();i.hasClass("content-area")&&i.width(i.closest(".content-area").width()),i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=bwg_params[e].data;if(a>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var _="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,s="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);if(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:_}),jQuery(t).css({cssText:s}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" :hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size}),2==bwg_params[e].slideshow_filmstrip_type){var o=bwg_params[e].filmstrip_direction,l="#bwg_container1_"+e+" #bwg_container2_"+e;jQuery(l).removeAttr("style");var n=l+" .bwg_slideshow_filmstrip_container_"+e,g=bwg_params[e].slideshow_filmstrip_rl_btn_size,b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).width();"horizontal"==o&&(b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).height());var w="horizontal"==o?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+e).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+e).css({display:"none"}),b<g?(g=b,jQuery(n).find(".bwg-icon-angle-left").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-right").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-up").css({"font-size":g}),jQuery(n).find(".bwg-icon-angle-down").css({"font-size":g})):(jQuery(n).find(".bwg-icon-angle-left").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-right").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-up").removeAttr("style"),jQuery(n).find(".bwg-icon-angle-down").removeAttr("style"));var d=l+" .bwg_slideshow_filmstrip_thumbnails_"+e;jQuery(d).removeAttr("style"),jQuery(d+" .bwg_slideshow_filmstrip_thumbnail_"+e).each(function(e,t){jQuery(t).attr("style",jQuery(t).attr("data-style")),jQuery(t).find("img").attr("style",jQuery(t).attr("data-style"))});var u="#bwg_container1_"+e+" #bwg_container2_"+e+" .bwg_slideshow_image_container_"+e,h=(jQuery(u).data("filmstrip-position"),jQuery(u).data("filmstrip-size"));jQuery(u).css({filmstrip_position:h});var m="bwg_slideshow_filmstrip_thumbnail_"+e;window.bwg_slideshow_filmstrip_thumb[m].next_prev_index&&(window.bwg_slideshow_filmstrip_thumb[m].next_prev_index=0)}}else 1==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_dimension({bwg:e,params:bwg_params[e],parent_width:a}),2==bwg_params[e].slideshow_filmstrip_type&&bwg_resize_slideshow_filmstrip_fix_count({bwg:e,params:bwg_params[e],parent_width:a}),0==bwg_params[e].slideshow_filmstrip_type&&(jQuery(".bwg_slideshow_image_wrap_"+e).css({width:a,height:a*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width),height:a*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(a-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(a*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_embed_frame_"+e+", .bwg_slideshow_embed_"+e).css({"max-width":a+"px","max-height":a*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1+"px"}),jQuery(".bwg_embed_frame_"+e).attr("data-width",a),jQuery(".bwg_embed_frame_"+e).attr("data-height",a*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)),jQuery(".bwg_slideshow_dots_container_"+e).css({width:a}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:a*(bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:a*(bwg_params[e].watermark_width/bwg_params[e].image_width),maxHeight:a*(bwg_params[e].watermark_height/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:a*(bwg_params[e].watermark_font_size/bwg_params[e].image_width)}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*a*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width});var c=jQuery(".bwg_slide_container_"+e),p=c.width(),y=c.height();jQuery(".bwg_popup_embed").css({width:p+"px",height:y+"px"}),r[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){var t=!1;if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){t=!0;var i=jQuery("#instagram-embed-"+e),a=jQuery(".bwg_slideshow_embed_"+e),r=jQuery(".bwg_embed_frame_"+e),_=void 0!==a.width()?a.width():jQuery(".bwg_slideshow_embed_"+e).width(),s=void 0!==a.height()?a.height():jQuery(".bwg_slideshow_embed_"+e).height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=!0;i=jQuery(".instagram-media"),r=jQuery(".bwg_embed_frame"),_=jQuery(".bwg_image_container").width(),s=jQuery(".bwg_image_container").height(),o=r.data("instagram-width"),l=r.data("instagram-height");bwg_change_watermark_container()}if(!0===t){var n=bwg_resizing_ratio(o,l,_,s);r.attr("data-width",_),r.attr("data-height",s);var g=n.width;g<n.height?g-=109:g+=109,r.css({width:"100%",height:"100%","max-width":_,"max-height":s}),i.css({"min-width":g+"px !important","max-height":s+"px"})}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}var i=(jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96;jQuery(".bwg_embed_frame_instapost_"+e).height(i),jQuery(".inner_instagram_iframe_bwg_embed_frame_instapost_"+e).find('iframe[id^="instagram-embed-"]').css({"max-height":i+"px"});var a=jQuery(".image_browser_images_"+e).width();a<=108?jQuery(".paging-input_"+e).css("display","none"):(a<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):a<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0%  14% 0%  14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}function bwg_resizing_ratio(e,t,i,a){var r=[i/e,a/t];return{width:e*(r=Math.min(r[0],r[1])),height:t*r}}function bwg_slideshow_filmstrip_next(e){var t=e.bwg,i=e.params,a=e.slideshow_filmstrip_class_name,r=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),_="bwg_slideshow_filmstrip_thumbnail_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,n="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,g="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-parseInt(i.filmstrip_thumb_margin_hor)+r)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-parseInt(i.filmstrip_thumb_margin_hor)+r},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[_].next_prev_index=bwg_slideshow_filmstrip_thumb[_].next_prev_index+1}function bwg_slideshow_filmstrip_prev(e){var t=e.bwg,i=e.params,a=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),r="bwg_slideshow_filmstrip_thumbnail_"+t,_="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,n="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[r].next_prev_index=bwg_slideshow_filmstrip_thumb[r].next_prev_index-1}jQuery(function(){isMobile&&(jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1"),jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({opacity:1,"background-color":"unset"}))}),jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0<jQuery(".bwg_play_pause").length&&window.clearInterval(gallery_box_data.bwg_playInterval)}function a(e){e&&bwg_main_ready(e),bwg_slideshow_focus(),bwg_carousel_focus(),jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")&&bwg_play(gallery_box_data.data)}var r=!1;jQuery(".bwg_container").each(function(){if(0<jQuery(this).find(".wd_error").length&&(r=!0),!r){var e=jQuery(this);if(e[0].offsetHeight)var t=0;else t=1;setInterval(function(){e[0].offsetHeight?1==t&&(t=0,a(e)):0==t&&i(!(t=1))},200)}}),r||jQuery(window).focus(function(){a()}).blur(function(){i(!0)})}),jQuery(window).on("resize",function(){setTimeout(function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),bwg_tags_button_section_visibility(),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()},0)}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
// source --> https://cbblanes.cat/wp-content/plugins/sportspress-pro/includes/sportspress-facebook/js/sportspress-facebook-sdk.js?ver=2.11 
window.fbAsyncInit = function() {
  FB.init({
    appId            : '229958377062169',
    autoLogAppEvents : true,
    xfbml            : true,
    version          : 'v2.11'
  });
};

(function(d, s, id){
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "https://connect.facebook.net/en_US/sdk.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// source --> https://cbblanes.cat/wp-content/plugins/sportspress-pro/includes/sportspress-tournaments/js/jquery.bracket.min.js?ver=0.11.0 
/* jQuery Bracket | Copyright (c) Teijo Laine 2011-2016 | Licenced under the MIT licence */
var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};!function(a){function b(a){return!isNaN(parseFloat(a))&&isFinite(a)}function c(){this.message="Root of information for this team",this.name="EndOfBranchException"}function d(a){function b(a,c){return a instanceof Array?b(a[0],c+1):c}return b(a,0)}function e(a,b){return b>0&&(a=e([a],b-1)),a}function f(b,c,d){var e=d.find(".team[data-teamid="+b+"]"),f=c?c:"highlight";return{highlight:function(){e.each(function(){a(this).addClass(f),a(this).hasClass("win")&&a(this).parent().find(".connector").addClass(f)})},deHighlight:function(){e.each(function(){a(this).removeClass(f),a(this).parent().find(".connector").removeClass(f)})}}}function g(b,c,d){var e=d||c,g=e.winner(),h=e.loser();g&&h&&(g.name.isEmpty()||f(g.seed.get(),"highlightWinner",b).highlight(),h.name.isEmpty()||f(h.seed.get(),"highlightLoser",b).highlight()),b.find(".team").mouseover(function(){var c=a(this).attr("data-teamid");if(void 0!==c){var d=f(parseInt(c,10),null,b);d.highlight(),a(this).mouseout(function(){d.deHighlight(),a(this).unbind("mouseout")})}})}function h(b,c,d){var e=a('<input type="text">');e.val(c),b.empty().append(e),e.focus(),e.blur(function(){d(e.val())}),e.keydown(function(a){var b=a.keyCode||a.which;9!==b&&13!==b&&27!==b||(a.preventDefault(),d(e.val(),27!==b))})}function i(a,b,c,d){switch(d){case"empty-bye":return void a.append("BYE");case"empty-tbd":return void a.append("TBD");case"entry-no-score":case"entry-default-win":case"entry-complete":return void a.append(b)}}function j(a){var b=a.el,c=b.find(".team.win");c.append('<div class="bubble">1st</div>');var d=b.find(".team.lose");return d.append('<div class="bubble">2nd</div>'),!0}function k(a){var b=a.el,c=b.find(".team.win");c.append('<div class="bubble third">3rd</div>');var d=b.find(".team.lose");return d.append('<div class="bubble fourth">4th</div>'),!0}function l(a,b,c,d,e){for(var f,g=Math.log(2*b.length)/Math.log(2),h=b.length,i=0;i<g;i+=1){f=a.addRound(u.empty());for(var l=0;l<h;l+=1){var m=0===i?A(b,l):null;if(i===g-1&&c||i===g-1&&e){var n=f.addMatch(m,u.of(j));e||n.setAlignCb(B(n,d.skipConsolationRound))}else f.addMatch(m,u.empty())}h/=2}if(c&&(a.final().setConnectorCb(u.empty()),b.length>1&&!d.skipConsolationRound)){var o=a.final().getRound().prev(),p=o.map(function(a){return function(){return a.match(0).loser()}}).toNull(),q=o.map(function(a){return function(){return a.match(1).loser()}}).toNull(),r=f.addMatch(function(){return[{source:p},{source:q}]},u.of(k));r.setAlignCb(function(b){var c=a.el.height()/2;r.el.css("height",c+"px");var e=b.height()/2+d.matchMargin;b.css("top",e+"px")}),r.setConnectorCb(u.empty())}}function m(a,b,c,d,e){for(var f=Math.log(2*c)/Math.log(2)-1,g=c/2,h=0;h<f;h+=1){for(var i=d&&h===f-1?1:2,j=0;j<i;j+=1)for(var l=b.addRound(u.empty()),m=0;m<g;m+=1){var n=j%2!==0||0===h?C(a,b,g,m,j,h):null,o=h===f-1&&d,p=l.addMatch(n,u.of(o?k:null));if(p.setAlignCb(D(p.el.find(".teamContainer"),p)),o)p.setConnectorCb(u.empty());else if(h<f-1||j<1){var q=j%2===0?function(a,b){var c=a.height()/4,d={height:0,shift:2*c};return b.winner().order.map(function(a){return a.map(e?d:{height:0,shift:c},e?d:{height:2*-c,shift:c})}).orElse(d)}:null;p.setConnectorCb(u.of(q))}}g/=2}}function n(a,b,c,d,e,f){var g=a.addRound(u.empty()),h=g.addMatch(function(){return[{source:function(){return b.winner()}},{source:function(){return c.winner()}}]},u.of(function(e){var g=!1;if(d.skipSecondaryFinal||e.winner().name.isEmpty()||e.winner().name!==c.winner().name){if(2===a.size())a.dropRound();else if(a.size()>2)throw new Error("Unexpected number of final rounds");return j(e)}if(2===a.size())return!1;var h=function(){var b=!e.winner().name.isEmpty()&&e.winner().name===c.winner().name;return g===!1&&b&&(g=!0,f()),!b&&g&&(g=!1,a.dropRound(),f()),b},i=a.addRound(u.of(h)),k=i.addMatch(function(){return[{source:function(){return e.first()}},{source:function(){return e.second()}}]},u.of(j));return e.setConnectorCb(u.of(function(a){return{height:0,shift:a.height()/2}})),k.setConnectorCb(u.empty()),k.setAlignCb(function(a){var d=b.el.height()+c.el.height();k.el.css("height",d+"px");var e=(b.el.height()/2+b.el.height()+c.el.height()/2)/2-a.height();a.css("top",e+"px")}),!1}));if(h.setAlignCb(function(a){var e=b.el.height()+c.el.height();d.skipConsolationRound||(e/=2),h.el.css("height",e+"px");var f=(b.el.height()/2+b.el.height()+c.el.height()/2)/2-a.height();a.css("top",f+"px")}),!d.skipConsolationRound){var i=c.final().getRound().prev(),l=g.addMatch(function(){return[{source:function(){return i.get().match(0).loser()}},{source:function(){return c.loser()}}]},u.of(k));l.setAlignCb(function(a){var d=(b.el.height()+c.el.height())/2;l.el.css("height",d+"px");var e=(b.el.height()/2+b.el.height()+c.el.height()/2)/2+a.height()/2-d;a.css("top",e+"px")}),h.setConnectorCb(u.empty()),l.setConnectorCb(u.empty())}b.final().setConnectorCb(u.of(function(a){var e=a.height()/4,f=(b.el.height()/2+b.el.height()+c.el.height()/2)/2-a.height()/2,g=f-b.el.height()/2,h=b.winner().order.map(function(a){return a.map({height:g+e*(d.centerConnectors?2:1),shift:e*(d.centerConnectors?2:1)},{height:g+e*(d.centerConnectors?2:0),shift:e*(d.centerConnectors?2:3)})}).orElse({height:g+e*(d.centerConnectors?2:1),shift:2*e}),i=h.height,j=h.shift;return i-=a.height()/2,{height:i,shift:j}})),c.final().setConnectorCb(u.of(function(a){var e=a.height()/4,f=(b.el.height()/2+b.el.height()+c.el.height()/2)/2-a.height()/2,g=f-b.el.height()/2,h=c.winner().order.map(function(a){return a.map({height:g+e*(d.centerConnectors?2:0),shift:e*(d.centerConnectors?2:3)},{height:g+2*e,shift:e*(d.centerConnectors?2:1)})}).orElse({height:g+e*(d.centerConnectors?2:1),shift:2*e}),i=h.height,j=h.shift;return i+=a.height()/2,{height:-i,shift:-j}}))}function o(b,c,d,e){var f=c.height,g=c.shift,h=b/2,i=!0;f<0&&(i=!1,f=-f),f<2&&(f=0);var j=a('<div class="connector"></div>').appendTo(d);j.css("height",f),j.css("width",h+"px"),j.css(e,-h-2+"px"),g>=0?j.css("top",g-1+"px"):j.css("bottom",-g-1+"px"),i?j.css("border-bottom","none"):j.css("border-top","none");var k=a('<div class="connector"></div>').appendTo(j);return k.css("width",h+"px"),k.css(e,-h+"px"),i?k.css("bottom","0px"):k.css("top","0px"),j}function p(a,b,c,d,e){if(b)return Math.log(2*a)/Math.log(2);if(c)return Math.max(2,2*(Math.log(2*a)/Math.log(2)-1)-1);var f=!d&&3===e.length&&2===e[2].length;return 2*(Math.log(2*a)/Math.log(2)-1)+1+(f?1:0)}function q(b){var c=a.extend(!0,{},b);return c.teams=c.teams.map(function(a){return a.map(function(a){return a.toNull()})}),c.results=c.results.map(function(a){return a.map(function(a){return a.map(function(a){var b=[a.first.toNull(),a.second.toNull()];return void 0!==a.userData&&b.push(a.userData),b})})}),c}function r(c,d,e,f,g,h,i,j,k,l){var m=e.name.isEmpty()||f.name.isEmpty()?"":'data-resultid="result-'+j.getNext()+'"',n=a('<div class="score" style="width: '+i.scoreWidth+'px;" '+m+"></div>"),o=e.name.isEmpty()||f.name.isEmpty()||!g?u.empty():e.score.map(function(a){return""+a}),p=o.orElse("--");n.text(p);var q=e.name.map(function(){return o.map(function(){return"entry-complete"}).orElseGet(function(){return f.emptyBranch()===t.BYE?"entry-default-win":"entry-no-score"})}).orElseGet(function(){var a=e.emptyBranch();switch(a){case t.BYE:return"empty-bye";case t.TBD:return"empty-tbd";default:throw new Error("Unexpected branch type "+a)}}),r=a('<div class="team" style="width: '+(i.teamWidth+i.scoreWidth)+'px;"></div>'),s=a('<div class="label" style="width: '+i.teamWidth+'px;"></div>').appendTo(r);if(i.decorator.render(s,e.name.toNull(),p,q),e.seed.forEach(function(a){r.attr("data-teamid",a)}),e.name.isEmpty()?r.addClass("na"):d.winner().name===e.name?r.addClass("win"):d.loser().name===e.name&&r.addClass("lose"),r.append(n),(!e.name.isEmpty()||e.name.isEmpty()&&0===c&&h)&&"function"==typeof i.save&&(i.disableTeamEdit||(s.addClass("editable"),s.click(function(){function b(){function f(f,g){var h=e.seed.get();i.init.teams[~~(h/2)][h%2]=u.of(f||null),l(!0),d.click(b);var j=i.el.find(".team[data-teamid="+(h+1)+"] div.label:first");j.length&&g===!0&&0===c&&a(j).click()}d.unbind(),i.decorator.edit(d,e.name.toNull(),f)}var d=a(this);b()})),!e.name.isEmpty()&&!f.name.isEmpty()&&g)){var w=j.get();n.addClass("editable"),n.click(function(){function c(){d.unbind();var f=b(e.score)?d.text():"0",g=a('<input type="text">');g.val(f),d.empty().append(g),g.focus().select(),g.keydown(function(c){b(a(this).val())?a(this).removeClass("error"):a(this).addClass("error");var d=c.keyCode||c.which;if(9===d||13===d||27===d){if(c.preventDefault(),a(this).blur(),27===d)return;var e=k.find("div.score[data-resultid=result-"+(w+1)+"]");e&&e.click()}}),g.blur(function(){var a=g.val();a&&b(a)||b(e.score)?a&&b(a)||!b(e.score)||(a=e.score):a="0",d.html(a),b(a)&&(e.score=v.of(parseInt(a,10)),l(!0)),d.click(c)})}var d=a(this);c()})}return r}function s(b,c,d){var e=a('<div class="tools"></div>').appendTo(b),f=a('<span class="increment">+</span>').appendTo(e);if(f.click(function(){for(var a=c.teams.length,b=0;b<a;b+=1)c.teams.push([u.empty(),u.empty()]);return K(d)}),c.teams.length>1&&1===c.results.length||c.teams.length>2&&3===c.results.length){var g=a('<span class="decrement">-</span>').appendTo(e);g.click(function(){if(c.teams.length>1)return c.teams=c.teams.slice(0,c.teams.length/2),K(d)})}if(1===c.results.length&&c.teams.length>1){var h=a('<span class="doubleElimination">de</span>').appendTo(e);h.click(function(){if(c.teams.length>1&&c.results.length<3)return c.results.push([],[]),K(d)})}else if(3===c.results.length&&c.teams.length>1){var h=a('<span class="singleElimination">se</span>').appendTo(e);h.click(function(){if(3===c.results.length)return c.results=c.results.slice(0,1),K(d)})}}var t,u=function(){function a(b){if(this.val=b,b instanceof a)throw new Error("Trying to wrap Option into an Option");if(void 0===this.val)throw new Error("Option cannot contain undefined")}return a.of=function(b){return new a(b)},a.empty=function(){return new a(null)},a.prototype.get=function(){if(null===this.val)throw new Error("Trying to get() empty Option");return this.val},a.prototype.orElse=function(a){return null===this.val?a:this.val},a.prototype.orElseGet=function(a){return null===this.val?a():this.val},a.prototype.map=function(b){return null===this.val?a.empty():new a(b(this.val))},a.prototype.forEach=function(a){return null!==this.val&&a(this.val),this},a.prototype.toNull=function(){return null===this.val?null:this.val},a.prototype.isEmpty=function(){return null===this.val},a}(),v=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.of=function(a){var b=typeof a,c="number";if(null!==a&&b!==c)throw new Error("Invalid score format, expected "+c+", got "+b);return u.of(a)},b.empty=function(){return u.empty()},b}(u),w=function(){function a(a,b,c){if(this.first=a,this.second=b,this.userData=c,!a||!b)throw new Error("Cannot create ResultObject with undefined scores")}return a}();!function(a){a[a.TBD=0]="TBD",a[a.BYE=1]="BYE"}(t||(t={}));var x=function(){function a(a){this.isFirst=a}return a.first=function(){return new a(!0)},a.second=function(){return new a(!1)},a.prototype.map=function(a,b){return this.isFirst?a:b},a}(),y=function(){function a(a,b,c,d,e){this.source=a,this.name=b,this.order=c,this.seed=d,this.score=e}return a.prototype.emptyBranch=function(){if(!this.name.isEmpty())return t.TBD;try{return this.source().emptyBranch()}catch(a){if(a instanceof c)return t.BYE;throw new Error("Unexpected exception type")}},a}(),z=function(){function a(a,b){this.a=a,this.b=b}return a.teamsInResultOrder=function(a){var b=a.a.name.isEmpty(),c=a.b.name.isEmpty();if(c&&!b)return a.b.emptyBranch()===t.BYE?[a.a,a.b]:[];if(b&&!c)return a.a.emptyBranch()===t.BYE?[a.b,a.a]:[];if(!a.a.score.isEmpty()&&!a.b.score.isEmpty()){if(a.a.score.get()>a.b.score.get())return[a.a,a.b];if(a.a.score.get()<a.b.score.get())return[a.b,a.a]}return[]},a.emptyTeam=function(a){return new y(a,u.empty(),u.empty(),u.empty(),v.empty())},a.prototype.winner=function(){return a.teamsInResultOrder(this)[0]||a.emptyTeam(this.a.source)},a.prototype.loser=function(){return a.teamsInResultOrder(this)[1]||a.emptyTeam(this.a.source)},a}(),A=function(a,b){return function(){return[{source:function(){return new y(function(){throw new c},a[b][0],u.of(x.first()),u.of(2*b),v.empty())}},{source:function(){return new y(function(){throw new c},a[b][1],u.of(x.second()),u.of(2*b+1),v.empty())}}]}},B=function(a,b){return function(c){c.css("top",""),c.css("position","absolute"),b?c.css("top",a.el.height()/2-c.height()/2+"px"):c.css("bottom",-c.height()/2+"px")}},C=function(a,b,c,d,e,f){return function(){if(e%2===0&&0===f)return[{source:function(){return a.round(0).match(2*d).loser()}},{source:function(){return a.round(0).match(2*d+1).loser()}}];var g=f%2===0?c-d-1:d;return[{source:function(){return b.round(2*f).match(d).winner()}},{source:function(){return a.round(f+1).match(g).loser()}}]}},D=function(a,b){return function(){return a.css("top",b.el.height()/2-a.height()/2+"px")}},E=function(){function b(b,c,d,e,f,g,h,i){this.bracket=b,this.previousRound=c,this.roundNumber=d,this._results=e,this.doRenderCb=f,this.mkMatch=g,this.isFirstBracket=h,this.opts=i,this.containerWidth=this.opts.teamWidth+this.opts.scoreWidth,this.roundCon=a('<div class="round" style="width: '+this.containerWidth+"px; margin-right: "+this.opts.roundMargin+'px"/>'),this.matches=[]}return Object.defineProperty(b.prototype,"el",{get:function(){return this.roundCon},enumerable:!0,configurable:!0}),b.prototype.addMatch=function(a,b){var c=this,d=this.matches.length,e=null!==a?a():[{source:function(){return c.bracket.round(c.roundNumber-1).match(2*d).winner()}},{source:function(){return c.bracket.round(c.roundNumber-1).match(2*d+1).winner()}}],f=function(){return e[0].source()},g=function(){return e[1].source()},h=new z(new y(f,f().name,u.of(x.first()),f().seed,v.empty()),new y(g,g().name,u.of(x.second()),g().seed,v.empty())),i=this.mkMatch(this,h,d,this._results.map(function(a){return void 0===a[d]?null:a[d]}),b,this.isFirstBracket,this.opts);return this.matches.push(i),i},b.prototype.match=function(a){return this.matches[a]},b.prototype.prev=function(){return this.previousRound},b.prototype.size=function(){return this.matches.length},b.prototype.render=function(){this.roundCon.empty(),(this.doRenderCb.isEmpty()||this.doRenderCb.get()())&&(this.roundCon.appendTo(this.bracket.el),this.matches.forEach(function(a){return a.render()}))},b.prototype.results=function(){return this.matches.reduce(function(a,b){return a.concat([b.results()])},[])},b}(),F=function(){function a(a,b,c,d,e){this.bracketCon=a,this.initResults=b,this.mkMatch=c,this.isFirstBracket=d,this.opts=e,this.rounds=[]}return Object.defineProperty(a.prototype,"el",{get:function(){return this.bracketCon},enumerable:!0,configurable:!0}),a.prototype.addRound=function(a){var b=this.rounds.length,c=b>0?u.of(this.rounds[b-1]):u.empty(),d=this.initResults.map(function(a){return void 0===a[b]?new w(v.empty(),v.empty(),void 0):a[b]}),e=new E(this,c,b,d,a,this.mkMatch,this.isFirstBracket,this.opts);return this.rounds.push(e),e},a.prototype.dropRound=function(){this.rounds.pop()},a.prototype.round=function(a){return this.rounds[a]},a.prototype.size=function(){return this.rounds.length},a.prototype.final=function(){return this.rounds[this.rounds.length-1].match(0)},a.prototype.winner=function(){return this.rounds[this.rounds.length-1].match(0).winner()},a.prototype.loser=function(){return this.rounds[this.rounds.length-1].match(0).loser()},a.prototype.render=function(){this.bracketCon.empty();for(var a=0;a<this.rounds.length;a+=1)this.rounds[a].render()},a.prototype.results=function(){return this.rounds.reduce(function(a,b){return a.concat([b.results()])},[])},a}(),G=function(){function a(){this.counter=0}return a.prototype.get=function(){return this.counter},a.prototype.getNext=function(){return++this.counter},a.prototype.reset=function(){this.counter=0},a}(),H=function(){function c(c,d,e,f,g,h,i,j,k,l){if(this.round=c,this.match=d,this.seed=e,this.renderCb=g,this.isFirstBracket=h,this.opts=i,this.resultId=j,this.topCon=k,this.renderAll=l,this.connectorCb=u.empty(),this.matchCon=a('<div class="match"></div>'),this.teamCon=a('<div class="teamContainer"></div>'),this.alignCb=null,this.matchUserData=f.isEmpty()?void 0:f.get().userData,!i.save){var m=this.matchUserData;i.onMatchHover&&this.teamCon.hover(function(){i.onMatchHover(m,!0)},function(){i.onMatchHover(m,!1)}),i.onMatchClick&&this.teamCon.click(function(){i.onMatchClick(m)})}d.a.name=d.a.source().name,d.b.name=d.b.source().name,d.a.score=f.map(function(a){return a.first.toNull()}),d.b.score=f.map(function(a){return a.second.toNull()}),d.a.name&&d.b.name||!b(d.a.score)&&!b(d.b.score)||(console.log("ERROR IN SCORE DATA: "+d.a.source().name+": "+d.a.score+", "+d.b.source().name+": "+d.b.score),d.a.score=d.b.score=v.empty())}return Object.defineProperty(c.prototype,"el",{get:function(){return this.matchCon},enumerable:!0,configurable:!0}),c.prototype.getRound=function(){return this.round},c.prototype.setConnectorCb=function(a){this.connectorCb=a},c.prototype.connect=function(a){var b=this,c="lr"===this.opts.dir?"right":"left",d=this.teamCon.height()/4,e=this.matchCon.height()/2,f=a.map(function(a){return a(b.teamCon,b)}).orElseGet(function(){return b.seed%2===0?b.winner().order.map(function(a){return a.map({shift:d*(b.opts.centerConnectors?2:1),height:e},{shift:d*(b.opts.centerConnectors?2:3),height:e-d*(b.opts.centerConnectors?0:2)})}).orElse({shift:2*d,height:e-d*(b.opts.centerConnectors?0:1)}):b.winner().order.map(function(a){return a.map({shift:-d*(b.opts.centerConnectors?2:3),height:-e+d*(b.opts.centerConnectors?0:2)},{shift:-d*(b.opts.centerConnectors?2:1),height:-e})}).orElse({shift:2*-d,height:-e+d*(b.opts.centerConnectors?0:1)})});this.teamCon.append(o(this.opts.roundMargin,f,this.teamCon,c))},c.prototype.winner=function(){return this.match.winner()},c.prototype.loser=function(){return this.match.loser()},c.prototype.first=function(){return this.match.a},c.prototype.second=function(){return this.match.b},c.prototype.setAlignCb=function(a){this.alignCb=a},c.prototype.render=function(){var a=this;this.matchCon.empty(),this.teamCon.empty(),this.match.a.name=this.match.a.source().name,this.match.b.name=this.match.b.source().name,this.match.a.seed=this.match.a.source().seed,this.match.b.seed=this.match.b.source().seed;var b=this.match.a.name.isEmpty()&&this.match.b.name.isEmpty();b?this.teamCon.addClass("np"):this.match.winner().name?this.teamCon.removeClass("np"):this.teamCon.addClass("np");var c=!this.match.a.name.isEmpty()&&!this.match.b.name.isEmpty();this.teamCon.append(r(this.round.roundNumber,this.match,this.match.a,this.match.b,c,this.isFirstBracket,this.opts,this.resultId,this.topCon,this.renderAll)),this.teamCon.append(r(this.round.roundNumber,this.match,this.match.b,this.match.a,c,this.isFirstBracket,this.opts,this.resultId,this.topCon,this.renderAll)),this.matchCon.appendTo(this.round.el),this.matchCon.append(this.teamCon),this.el.css("height",this.round.bracket.el.height()/this.round.size()+"px"),this.teamCon.css("top",this.el.height()/2-this.teamCon.height()/2+"px"),null!==this.alignCb&&this.alignCb(this.teamCon);var d=this.renderCb.map(function(b){return b(a)}).orElse(!1);d||this.connect(this.connectorCb)},c.prototype.results=function(){var a=this.match.a.name.isEmpty()||this.match.b.name.isEmpty();return a&&(this.match.a.score=this.match.b.score=v.empty()),new w(this.match.a.score,this.match.b.score,this.matchUserData)},c}(),I=function(a){return void 0===a?null:a},J=function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return new w(v.of(I(a[0])),v.of(I(a[1])),a[2])})})})},K=function(b){function c(){var a=p(j.teams.length,k,b.skipGrandFinalComeback,b.skipSecondaryFinal,j.results);b.disableToolbar?r.css("width",a*(b.teamWidth+b.scoreWidth+b.roundMargin)+10):r.css("width",a*(b.teamWidth+b.scoreWidth+b.roundMargin)+40),k&&j.teams.length<=2&&!b.skipConsolationRound&&r.css("height",o+40)}function d(a){i.reset(),e.render(),f&&f.render(),h&&!b.skipGrandFinalComeback&&h.render(),b.disableHighlight||g(r,e,h),a&&(j.results[0]=e.results(),f&&(j.results[1]=f.results()),h&&!b.skipGrandFinalComeback&&(j.results[2]=h.results()),c(),b.save&&b.save(q(j),b.userData))}var e,f,h,i=new G,j=b.init,k=j.results.length<=1,o=45*j.teams.length+j.teams.length*b.matchMargin,r=a('<div class="jQBracket '+b.dir+'"></div>').appendTo(b.el.empty());b.skipSecondaryFinal&&k&&a.error("skipSecondaryFinal setting is viable only in double elimination mode"),b.disableToolbar||s(r,j,b);var t,v,w;k?v=a('<div class="bracket"></div>').appendTo(r):(b.skipGrandFinalComeback||(t=a('<div class="finals"></div>').appendTo(r)),v=a('<div class="bracket"></div>').appendTo(r),w=a('<div class="loserBracket"></div>').appendTo(r)),v.css("height",o),w&&w.css("height",v.height()/2),c();var x=function(a,b,c,e,f,g,h){return new H(a,b,c,e,f,g,h,i,r,d)};return e=new F(v,u.of(j.results[0]||null),x,!0,b),k||(f=new F(w,u.of(j.results[1]||null),x,!1,b),b.skipGrandFinalComeback||(h=new F(t,u.of(j.results[2]||null),x,!1,b))),l(e,j.teams,k,b,b.skipGrandFinalComeback&&!k),k||(m(e,f,j.teams.length,b.skipGrandFinalComeback,b.centerConnectors),b.skipGrandFinalComeback||n(h,e,f,b,r,c)),d(!1),{data:function(){return q(b.init)}}},L=function(a,b){if(a.hasOwnProperty(b)){var c="number",d=typeof a[b];if(d!==c)throw new Error('Option "'+b+'" is '+d+" instead of "+c)}},M=function(a,b){var c=a[b],d="boolean",e=typeof c;if(e!==d)throw new Error("Value of "+b+" must be boolean, got "+d+", got "+e)},N=function(a,b,c){var d=b[c];if(d<a)throw new Error("Value of "+c+" must be greater than "+a+", got "+d)},O=function(a){return a&a-1},P={init:function(b){var c=a.extend(!0,{},b);if(!c)throw Error("Options not set");if(!c.init&&!c.save)throw Error("No bracket data or save callback given");if(void 0===c.userData&&(c.userData=null),!(!c.decorator||c.decorator.edit&&c.decorator.render))throw Error("Invalid decorator input");c.decorator||(c.decorator={edit:h,render:i}),c.init||(c.init={teams:[[u.empty(),u.empty()]],results:[]});var f=this;c.el=this,c.save&&(c.onMatchClick||c.onMatchHover)&&a.error("Match callbacks may not be passed in edit mode (in conjunction with save callback)");var g=typeof c.disableToolbar,j=c.hasOwnProperty("disableToolbar");j&&"boolean"!==g&&a.error("disableToolbar must be a boolean, got "+g),!c.save&&j&&a.error('disableToolbar can be used only if the bracket is editable, i.e. "save" callback given'),j||(c.disableToolbar=void 0===c.save);var k=typeof c.disableTeamEdit,l=c.hasOwnProperty("disableTeamEdit");l&&"boolean"!==k&&a.error("disableTeamEdit must be a boolean, got "+k),!c.save&&l&&a.error('disableTeamEdit can be used only if the bracket is editable, i.e. "save" callback given'),l||(c.disableTeamEdit=!1),!c.disableToolbar&&c.disableTeamEdit&&a.error('disableTeamEdit requires also resizing to be disabled, initialize with "disableToolbar: true"');var m=e(c.init.results,4-d(c.init.results));c.init.results=J(m),L(c,"teamWidth"),L(c,"scoreWidth"),L(c,"roundMargin"),L(c,"matchMargin"),c.hasOwnProperty("teamWidth")||(c.teamWidth=70),c.hasOwnProperty("scoreWidth")||(c.scoreWidth=30),c.hasOwnProperty("roundMargin")||(c.roundMargin=40),c.hasOwnProperty("matchMargin")||(c.matchMargin=20),N(0,c,"teamWidth"),N(0,c,"scoreWidth"),N(0,c,"roundMargin"),N(0,c,"matchMargin"),c.hasOwnProperty("centerConnectors")||(c.centerConnectors=!1),M(c,"centerConnectors"),c.hasOwnProperty("disableHighlight")||(c.disableHighlight=!1),M(c,"disableHighlight");var n=O(c.init.teams.length);n!==Math.floor(n)&&a.error('"teams" property must have 2^n number of team pairs, i.e. 1, 2, 4, etc. Got '+c.init.teams.length+" team pairs."),c.dir=c.dir||"lr",c.init.teams=c.init.teams&&0!==c.init.teams.length?c.init.teams:[[null,null]],c.init.teams=c.init.teams.map(function(a){return a.map(function(a){return null===a?u.empty():u.of(a)})}),c.skipConsolationRound=c.skipConsolationRound||!1,c.skipSecondaryFinal=c.skipSecondaryFinal||!1,"lr"!==c.dir&&"rl"!==c.dir&&a.error('Direction must be either: "lr" or "rl"');var o=K(c);return a(this).data("bracket",{target:f,obj:o}),o},data:function(){var b=a(this).data("bracket");return b.obj.data()}};a.fn.bracket=function(b){return P[b]?P[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.bracket"):P.init.apply(this,arguments)}}(jQuery);
// source --> https://cbblanes.cat/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.js?ver=4.16.13 
var flatpickr=function(){"use strict";var e,t={};var n,a,o,i,r,l,c,s,d,u,f,m,g,p,h,v,D,w,y,b,M,C,x,E,k=(e||(e=1,n||(n=1,a||(a=1,o||(o=1,i||(i=1,r||(r=1,l||(l=1,c||(c=1,s||(s=1,d||(d=1,u||(u=1,g={exports:{}},f||(f=1,g.exports=function(){var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var a=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],r=0,l=i.length;r<l;r++,o++)a[o]=i[r];return a}var n=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],a={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},r=function(e){return!0===e?1:0};function l(e,t){var n;return function(){var a=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(a,o)}),t)}}var c=function(e){return e instanceof Array?e:[e]};function s(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,t){return t(e)?e:e.parentNode?f(e.parentNode,t):void 0}function m(e,t){var n=d("div","numInputWrapper"),a=d("input","numInput "+e),o=d("span","arrowUp"),i=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(o),n.appendChild(i),n}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var p=function(){},h=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},v={D:p,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*r(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:p,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:p,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},D={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},w={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[w.w(e,t,n)]},F:function(e,t,n){return h(w.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(w.h(e,t,n))},H:function(e){return i(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[r(e.getHours()>11)]},M:function(e,t){return h(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return i(e.getFullYear(),4)},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},y=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i,l=e.isMobile,c=void 0!==l&&l;return function(e,t,a){var o=a||r;return void 0===n.formatDate||c?t.split("").map((function(t,a,i){return w[t]&&"\\"!==i[a-1]?w[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}},b=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,o,i){if(0===e||e){var l,c=i||r,s=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var d=t||(n||a).dateFormat,u=String(e).trim();if("today"===u)l=new Date,o=!0;else if(n&&n.parseDate)l=n.parseDate(e,d);else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else{for(var f=void 0,m=[],g=0,p=0,h="";g<d.length;g++){var w=d[g],y="\\"===w,b="\\"===d[g-1]||y;if(D[w]&&!b){h+=D[w];var M=new RegExp(h).exec(e);M&&(f=!0)&&m["Y"!==w?"push":"unshift"]({fn:v[w],val:M[++p]})}else y||(h+=".")}l=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),m.forEach((function(e){var t=e.fn,n=e.val;return l=t(l,n,c)||l})),l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===o&&l.setHours(0,0,0,0),l;n.errorHandler(new Error("Invalid date provided: "+s))}}};function M(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var C=function(e,t,n){return 3600*e+60*t+n};function x(e){var t=e.defaultHour,n=e.defaultMinute,a=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),i=e.minDate.getMinutes(),r=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<i&&(n=i),t===o&&n===i&&a<r&&(a=e.minDate.getSeconds())}if(void 0!==e.maxDate){var l=e.maxDate.getHours(),c=e.maxDate.getMinutes();(t=Math.min(t,l))===l&&(n=Math.min(c,n)),t===l&&n===c&&(a=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:a}}function E(p,v){var w={config:e(e({},a),T.defaultConfig),l10n:o};function E(){var e;return(null===(e=w.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function k(e){return e.bind(w)}function _(){var e=w.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==w.calendarContainer&&(w.calendarContainer.style.visibility="hidden",w.calendarContainer.style.display="block"),void 0!==w.daysContainer){var t=(w.days.offsetWidth+1)*e.showMonths;w.daysContainer.style.width=t+"px",w.calendarContainer.style.width=t+(void 0!==w.weekWrapper?w.weekWrapper.offsetWidth:0)+"px",w.calendarContainer.style.removeProperty("visibility"),w.calendarContainer.style.removeProperty("display")}}))}function O(e){if(0===w.selectedDates.length){var t=void 0===w.config.minDate||M(new Date,w.config.minDate)>=0?new Date:new Date(w.config.minDate.getTime()),n=x(w.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),w.selectedDates=[t],w.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=g(e),a=n;void 0!==w.amPM&&n===w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]);var o=parseFloat(a.getAttribute("min")),l=parseFloat(a.getAttribute("max")),c=parseFloat(a.getAttribute("step")),s=parseInt(a.value,10),d=s+c*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==a.value&&2===a.value.length){var u=a===w.hourElement,f=a===w.minuteElement;d<o?(d=l+d+r(!u)+(r(u)&&r(!w.amPM)),f&&H(void 0,-1,w.hourElement)):d>l&&(d=a===w.hourElement?d-l-r(!w.amPM):o,f&&H(void 0,1,w.hourElement)),w.amPM&&u&&(1===c?d+s===23:Math.abs(d-s)>c)&&(w.amPM.textContent=w.l10n.amPM[r(w.amPM.textContent===w.l10n.amPM[0])]),a.value=i(d)}}(e);var a=w._input.value;I(),Me(),w._input.value!==a&&w._debouncedChange()}function I(){if(void 0!==w.hourElement&&void 0!==w.minuteElement){var e,t,n=(parseInt(w.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(w.minuteElement.value,10)||0)%60,o=void 0!==w.secondElement?(parseInt(w.secondElement.value,10)||0)%60:0;void 0!==w.amPM&&(e=n,t=w.amPM.textContent,n=e%12+12*r(t===w.l10n.amPM[1]));var i=void 0!==w.config.minTime||w.config.minDate&&w.minDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.minDate,!0),l=void 0!==w.config.maxTime||w.config.maxDate&&w.maxDateHasTime&&w.latestSelectedDateObj&&0===M(w.latestSelectedDateObj,w.config.maxDate,!0);if(void 0!==w.config.maxTime&&void 0!==w.config.minTime&&w.config.minTime>w.config.maxTime){var c=C(w.config.minTime.getHours(),w.config.minTime.getMinutes(),w.config.minTime.getSeconds()),s=C(w.config.maxTime.getHours(),w.config.maxTime.getMinutes(),w.config.maxTime.getSeconds()),d=C(n,a,o);if(d>s&&d<c){var u=function(e){var t=Math.floor(e/3600),n=(e-3600*t)/60;return[t,n,e-3600*t-60*n]}(c);n=u[0],a=u[1],o=u[2]}}else{if(l){var f=void 0!==w.config.maxTime?w.config.maxTime:w.config.maxDate;(n=Math.min(n,f.getHours()))===f.getHours()&&(a=Math.min(a,f.getMinutes())),a===f.getMinutes()&&(o=Math.min(o,f.getSeconds()))}if(i){var m=void 0!==w.config.minTime?w.config.minTime:w.config.minDate;(n=Math.max(n,m.getHours()))===m.getHours()&&a<m.getMinutes()&&(a=m.getMinutes()),a===m.getMinutes()&&(o=Math.max(o,m.getSeconds()))}}P(n,a,o)}}function S(e){var t=e||w.latestSelectedDateObj;t&&t instanceof Date&&P(t.getHours(),t.getMinutes(),t.getSeconds())}function P(e,t,n){void 0!==w.latestSelectedDateObj&&w.latestSelectedDateObj.setHours(e%24,t,n||0,0),w.hourElement&&w.minuteElement&&!w.isMobile&&(w.hourElement.value=i(w.config.time_24hr?e:(12+e)%12+12*r(e%12==0)),w.minuteElement.value=i(t),void 0!==w.amPM&&(w.amPM.textContent=w.l10n.amPM[r(e>=12)]),void 0!==w.secondElement&&(w.secondElement.value=i(n)))}function F(e){var t=g(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&X(n)}function A(e,t,n,a){return t instanceof Array?t.forEach((function(t){return A(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return A(e,t,n,a)})):(e.addEventListener(t,n,a),void w._handlers.push({remove:function(){return e.removeEventListener(t,n,a)}}))}function N(){ve("onChange")}function Y(e,t){var n=void 0!==e?w.parseDate(e):w.latestSelectedDateObj||(w.config.minDate&&w.config.minDate>w.now?w.config.minDate:w.config.maxDate&&w.config.maxDate<w.now?w.config.maxDate:w.now),a=w.currentYear,o=w.currentMonth;try{void 0!==n&&(w.currentYear=n.getFullYear(),w.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,w.config.errorHandler(e)}t&&w.currentYear!==a&&(ve("onYearChange"),U()),!t||w.currentYear===a&&w.currentMonth===o||ve("onMonthChange"),w.redraw()}function j(e){var t=g(e);~t.className.indexOf("arrow")&&H(e,t.classList.contains("arrowUp")?1:-1)}function H(e,t,n){var a=e&&g(e),o=n||a&&a.parentNode&&a.parentNode.firstChild,i=De("increment");i.delta=t,o&&o.dispatchEvent(i)}function L(e,t,n,a){var o=ee(t,!0),i=d("span",e,t.getDate().toString());return i.dateObj=t,i.$i=a,i.setAttribute("aria-label",w.formatDate(t,w.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===M(t,w.now)&&(w.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),o?(i.tabIndex=-1,we(t)&&(i.classList.add("selected"),w.selectedDateElem=i,"range"===w.config.mode&&(s(i,"startRange",w.selectedDates[0]&&0===M(t,w.selectedDates[0],!0)),s(i,"endRange",w.selectedDates[1]&&0===M(t,w.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("flatpickr-disabled"),"range"===w.config.mode&&function(e){return!("range"!==w.config.mode||w.selectedDates.length<2)&&M(e,w.selectedDates[0])>=0&&M(e,w.selectedDates[1])<=0}(t)&&!we(t)&&i.classList.add("inRange"),w.weekNumbers&&1===w.config.showMonths&&"prevMonthDay"!==e&&a%7==6&&w.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+w.config.getWeek(t)+"</span>"),ve("onDayCreate",i),i}function R(e){e.focus(),"range"===w.config.mode&&oe(e)}function W(e){for(var t=e>0?0:w.config.showMonths-1,n=e>0?w.config.showMonths:-1,a=t;a!=n;a+=e)for(var o=w.daysContainer.children[a],i=e>0?0:o.children.length-1,r=e>0?o.children.length:-1,l=i;l!=r;l+=e){var c=o.children[l];if(-1===c.className.indexOf("hidden")&&ee(c.dateObj))return c}}function B(e,t){var n=E(),a=te(n||document.body),o=void 0!==e?e:a?n:void 0!==w.selectedDateElem&&te(w.selectedDateElem)?w.selectedDateElem:void 0!==w.todayDateElem&&te(w.todayDateElem)?w.todayDateElem:W(t>0?1:-1);void 0===o?w._input.focus():a?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():w.currentMonth,a=t>0?w.config.showMonths:-1,o=t>0?1:-1,i=n-w.currentMonth;i!=a;i+=o)for(var r=w.daysContainer.children[i],l=n-w.currentMonth===i?e.$i+t:t<0?r.children.length-1:0,c=r.children.length,s=l;s>=0&&s<c&&s!=(t>0?c:-1);s+=o){var d=r.children[s];if(-1===d.className.indexOf("hidden")&&ee(d.dateObj)&&Math.abs(e.$i-s)>=Math.abs(t))return R(d)}w.changeMonth(o),B(W(o),0)}(o,t):R(o)}function J(e,t){for(var n=(new Date(e,t,1).getDay()-w.l10n.firstDayOfWeek+7)%7,a=w.utils.getDaysInMonth((t-1+12)%12,e),o=w.utils.getDaysInMonth(t,e),i=window.document.createDocumentFragment(),r=w.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",s=a+1-n,u=0;s<=a;s++,u++)i.appendChild(L("flatpickr-day "+l,new Date(e,t-1,s),0,u));for(s=1;s<=o;s++,u++)i.appendChild(L("flatpickr-day",new Date(e,t,s),0,u));for(var f=o+1;f<=42-n&&(1===w.config.showMonths||u%7!=0);f++,u++)i.appendChild(L("flatpickr-day "+c,new Date(e,t+1,f%o),0,u));var m=d("div","dayContainer");return m.appendChild(i),m}function K(){if(void 0!==w.daysContainer){u(w.daysContainer),w.weekNumbers&&u(w.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<w.config.showMonths;t++){var n=new Date(w.currentYear,w.currentMonth,1);n.setMonth(w.currentMonth+t),e.appendChild(J(n.getFullYear(),n.getMonth()))}w.daysContainer.appendChild(e),w.days=w.daysContainer.firstChild,"range"===w.config.mode&&1===w.selectedDates.length&&oe()}}function U(){if(!(w.config.showMonths>1||"dropdown"!==w.config.monthSelectorType)){var e=function(e){return!(void 0!==w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&e<w.config.minDate.getMonth()||void 0!==w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()&&e>w.config.maxDate.getMonth())};w.monthsDropdownContainer.tabIndex=-1,w.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=d("option","flatpickr-monthDropdown-month");n.value=new Date(w.currentYear,t).getMonth().toString(),n.textContent=h(t,w.config.shorthandCurrentMonth,w.l10n),n.tabIndex=-1,w.currentMonth===t&&(n.selected=!0),w.monthsDropdownContainer.appendChild(n)}}}function $(){var e,t=d("div","flatpickr-month"),n=window.document.createDocumentFragment();w.config.showMonths>1||"static"===w.config.monthSelectorType?e=d("span","cur-month"):(w.monthsDropdownContainer=d("select","flatpickr-monthDropdown-months"),w.monthsDropdownContainer.setAttribute("aria-label",w.l10n.monthAriaLabel),A(w.monthsDropdownContainer,"change",(function(e){var t=g(e),n=parseInt(t.value,10);w.changeMonth(n-w.currentMonth),ve("onMonthChange")})),U(),e=w.monthsDropdownContainer);var a=m("cur-year",{tabindex:"-1"}),o=a.getElementsByTagName("input")[0];o.setAttribute("aria-label",w.l10n.yearAriaLabel),w.config.minDate&&o.setAttribute("min",w.config.minDate.getFullYear().toString()),w.config.maxDate&&(o.setAttribute("max",w.config.maxDate.getFullYear().toString()),o.disabled=!!w.config.minDate&&w.config.minDate.getFullYear()===w.config.maxDate.getFullYear());var i=d("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(a),n.appendChild(i),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function q(){u(w.monthNav),w.monthNav.appendChild(w.prevMonthNav),w.config.showMonths&&(w.yearElements=[],w.monthElements=[]);for(var e=w.config.showMonths;e--;){var t=$();w.yearElements.push(t.yearElement),w.monthElements.push(t.monthElement),w.monthNav.appendChild(t.container)}w.monthNav.appendChild(w.nextMonthNav)}function V(){w.weekdayContainer?u(w.weekdayContainer):w.weekdayContainer=d("div","flatpickr-weekdays");for(var e=w.config.showMonths;e--;){var t=d("div","flatpickr-weekdaycontainer");w.weekdayContainer.appendChild(t)}return z(),w.weekdayContainer}function z(){if(w.weekdayContainer){var e=w.l10n.firstDayOfWeek,n=t(w.l10n.weekdays.shorthand);e>0&&e<n.length&&(n=t(n.splice(e,n.length),n.splice(0,e)));for(var a=w.config.showMonths;a--;)w.weekdayContainer.children[a].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+n.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-w.currentMonth;n<0&&!0===w._hidePrevMonthArrow||n>0&&!0===w._hideNextMonthArrow||(w.currentMonth+=n,(w.currentMonth<0||w.currentMonth>11)&&(w.currentYear+=w.currentMonth>11?1:-1,w.currentMonth=(w.currentMonth+12)%12,ve("onYearChange"),U()),K(),ve("onMonthChange"),ye())}function Z(e){return w.calendarContainer.contains(e)}function Q(e){if(w.isOpen&&!w.config.inline){var t=g(e),n=Z(t),a=!(t===w.input||t===w.altInput||w.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(w.input)||~e.path.indexOf(w.altInput))||n||Z(e.relatedTarget)),o=!w.config.ignoredFocusElements.some((function(e){return e.contains(t)}));a&&o&&(w.config.allowInput&&w.setDate(w._input.value,!1,w.config.altInput?w.config.altFormat:w.config.dateFormat),void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement&&""!==w.input.value&&void 0!==w.input.value&&O(),w.close(),w.config&&"range"===w.config.mode&&1===w.selectedDates.length&&w.clear(!1))}}function X(e){if(!(!e||w.config.minDate&&e<w.config.minDate.getFullYear()||w.config.maxDate&&e>w.config.maxDate.getFullYear())){var t=e,n=w.currentYear!==t;w.currentYear=t||w.currentYear,w.config.maxDate&&w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth=Math.min(w.config.maxDate.getMonth(),w.currentMonth):w.config.minDate&&w.currentYear===w.config.minDate.getFullYear()&&(w.currentMonth=Math.max(w.config.minDate.getMonth(),w.currentMonth)),n&&(w.redraw(),ve("onYearChange"),U())}}function ee(e,t){var n;void 0===t&&(t=!0);var a=w.parseDate(e,void 0,t);if(w.config.minDate&&a&&M(a,w.config.minDate,void 0!==t?t:!w.minDateHasTime)<0||w.config.maxDate&&a&&M(a,w.config.maxDate,void 0!==t?t:!w.maxDateHasTime)>0)return!1;if(!w.config.enable&&0===w.config.disable.length)return!0;if(void 0===a)return!1;for(var o=!!w.config.enable,i=null!==(n=w.config.enable)&&void 0!==n?n:w.config.disable,r=0,l=void 0;r<i.length;r++){if("function"==typeof(l=i[r])&&l(a))return o;if(l instanceof Date&&void 0!==a&&l.getTime()===a.getTime())return o;if("string"==typeof l){var c=w.parseDate(l,void 0,!0);return c&&c.getTime()===a.getTime()?o:!o}if("object"==typeof l&&void 0!==a&&l.from&&l.to&&a.getTime()>=l.from.getTime()&&a.getTime()<=l.to.getTime())return o}return!o}function te(e){return void 0!==w.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&w.daysContainer.contains(e)}function ne(e){var t=e.target===w._input,n=w._input.value.trimEnd()!==be();!t||!n||e.relatedTarget&&Z(e.relatedTarget)||w.setDate(w._input.value,!0,e.target===w.altInput?w.config.altFormat:w.config.dateFormat)}function ae(e){var t=g(e),n=w.config.wrap?p.contains(t):t===w._input,a=w.config.allowInput,o=w.isOpen&&(!a||!n),i=w.config.inline&&n&&!a;if(13===e.keyCode&&n){if(a)return w.setDate(w._input.value,!0,t===w.altInput?w.config.altFormat:w.config.dateFormat),w.close(),t.blur();w.open()}else if(Z(t)||o||i){var r=!!w.timeContainer&&w.timeContainer.contains(t);switch(e.keyCode){case 13:r?(e.preventDefault(),O(),ue()):fe(e);break;case 27:e.preventDefault(),ue();break;case 8:case 46:n&&!w.config.allowInput&&(e.preventDefault(),w.clear());break;case 37:case 39:if(r||n)w.hourElement&&w.hourElement.focus();else{e.preventDefault();var l=E();if(void 0!==w.daysContainer&&(!1===a||l&&te(l))){var c=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(c),B(W(1),0)):B(void 0,c)}}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;w.daysContainer&&void 0!==t.$i||t===w.input||t===w.altInput?e.ctrlKey?(e.stopPropagation(),X(w.currentYear-s),B(W(1),0)):r||B(void 0,7*s):t===w.currentYearElement?X(w.currentYear-s):w.config.enableTime&&(!r&&w.hourElement&&w.hourElement.focus(),O(e),w._debouncedChange());break;case 9:if(r){var d=[w.hourElement,w.minuteElement,w.secondElement,w.amPM].concat(w.pluginElements).filter((function(e){return e})),u=d.indexOf(t);if(-1!==u){var f=d[u+(e.shiftKey?-1:1)];e.preventDefault(),(f||w._input).focus()}}else!w.config.noCalendar&&w.daysContainer&&w.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),w._input.focus())}}if(void 0!==w.amPM&&t===w.amPM)switch(e.key){case w.l10n.amPM[0].charAt(0):case w.l10n.amPM[0].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[0],I(),Me();break;case w.l10n.amPM[1].charAt(0):case w.l10n.amPM[1].charAt(0).toLowerCase():w.amPM.textContent=w.l10n.amPM[1],I(),Me()}(n||Z(t))&&ve("onKeyDown",e)}function oe(e,t){if(void 0===t&&(t="flatpickr-day"),1===w.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var n=e?e.dateObj.getTime():w.days.firstElementChild.dateObj.getTime(),a=w.parseDate(w.selectedDates[0],void 0,!0).getTime(),o=Math.min(n,w.selectedDates[0].getTime()),i=Math.max(n,w.selectedDates[0].getTime()),r=!1,l=0,c=0,s=o;s<i;s+=864e5)ee(new Date(s),!0)||(r=r||s>o&&s<i,s<a&&(!l||s>l)?l=s:s>a&&(!c||s<c)&&(c=s));Array.from(w.rContainer.querySelectorAll("*:nth-child(-n+"+w.config.showMonths+") > ."+t)).forEach((function(t){var o,i,s,d=t.dateObj.getTime(),u=l>0&&d<l||c>0&&d>c;if(u)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));r&&!u||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(n<=w.selectedDates[0].getTime()?"startRange":"endRange"),a<n&&d===a?t.classList.add("startRange"):a>n&&d===a&&t.classList.add("endRange"),d>=l&&(0===c||d<=c)&&(i=a,s=n,(o=d)>Math.min(i,s)&&o<Math.max(i,s))&&t.classList.add("inRange")))}))}}function ie(){!w.isOpen||w.config.static||w.config.inline||se()}function re(e){return function(t){var n=w.config["_"+e+"Date"]=w.parseDate(t,w.config.dateFormat),a=w.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(w["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),w.selectedDates&&(w.selectedDates=w.selectedDates.filter((function(e){return ee(e)})),w.selectedDates.length||"min"!==e||S(n),Me()),w.daysContainer&&(de(),void 0!==n?w.currentYearElement[e]=n.getFullYear().toString():w.currentYearElement.removeAttribute(e),w.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function le(){return w.config.wrap?p.querySelector("[data-input]"):p}function ce(){"object"!=typeof w.config.locale&&void 0===T.l10ns[w.config.locale]&&w.config.errorHandler(new Error("flatpickr: invalid locale "+w.config.locale)),w.l10n=e(e({},T.l10ns.default),"object"==typeof w.config.locale?w.config.locale:"default"!==w.config.locale?T.l10ns[w.config.locale]:void 0),D.D="("+w.l10n.weekdays.shorthand.join("|")+")",D.l="("+w.l10n.weekdays.longhand.join("|")+")",D.M="("+w.l10n.months.shorthand.join("|")+")",D.F="("+w.l10n.months.longhand.join("|")+")",D.K="("+w.l10n.amPM[0]+"|"+w.l10n.amPM[1]+"|"+w.l10n.amPM[0].toLowerCase()+"|"+w.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(p.dataset||{}))).time_24hr&&void 0===T.defaultConfig.time_24hr&&(w.config.time_24hr=w.l10n.time_24hr),w.formatDate=y(w),w.parseDate=b({config:w.config,l10n:w.l10n})}function se(e){if("function"!=typeof w.config.position){if(void 0!==w.calendarContainer){ve("onPreCalendarPosition");var t=e||w._positionElement,n=Array.prototype.reduce.call(w.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),a=w.calendarContainer.offsetWidth,o=w.config.position.split(" "),i=o[0],r=o.length>1?o[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,d="above"===i||"below"!==i&&c<n&&l.top>n,u=window.pageYOffset+l.top+(d?-n-2:t.offsetHeight+2);if(s(w.calendarContainer,"arrowTop",!d),s(w.calendarContainer,"arrowBottom",d),!w.config.inline){var f=window.pageXOffset+l.left,m=!1,g=!1;"center"===r?(f-=(a-l.width)/2,m=!0):"right"===r&&(f-=a-l.width,g=!0),s(w.calendarContainer,"arrowLeft",!m&&!g),s(w.calendarContainer,"arrowCenter",m),s(w.calendarContainer,"arrowRight",g);var p=window.document.body.offsetWidth-(window.pageXOffset+l.right),h=f+a>window.document.body.offsetWidth,v=p+a>window.document.body.offsetWidth;if(s(w.calendarContainer,"rightMost",h),!w.config.static)if(w.calendarContainer.style.top=u+"px",h)if(v){var D=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];if(n.cssRules){try{n.cssRules}catch(e){continue}e=n;break}}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===D)return;var y=window.document.body.offsetWidth,b=Math.max(0,y/2-a/2),M=D.cssRules.length,C="{left:"+l.left+"px;right:auto;}";s(w.calendarContainer,"rightMost",!1),s(w.calendarContainer,"centerMost",!0),D.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+C,M),w.calendarContainer.style.left=b+"px",w.calendarContainer.style.right="auto"}else w.calendarContainer.style.left="auto",w.calendarContainer.style.right=p+"px";else w.calendarContainer.style.left=f+"px",w.calendarContainer.style.right="auto"}}}else w.config.position(w,e)}function de(){w.config.noCalendar||w.isMobile||(U(),ye(),K())}function ue(){w._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(w.close,0):w.close()}function fe(e){e.preventDefault(),e.stopPropagation();var t=f(g(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var n=t,a=w.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(a.getMonth()<w.currentMonth||a.getMonth()>w.currentMonth+w.config.showMonths-1)&&"range"!==w.config.mode;if(w.selectedDateElem=n,"single"===w.config.mode)w.selectedDates=[a];else if("multiple"===w.config.mode){var i=we(a);i?w.selectedDates.splice(parseInt(i),1):w.selectedDates.push(a)}else"range"===w.config.mode&&(2===w.selectedDates.length&&w.clear(!1,!1),w.latestSelectedDateObj=a,w.selectedDates.push(a),0!==M(a,w.selectedDates[0],!0)&&w.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(I(),o){var r=w.currentYear!==a.getFullYear();w.currentYear=a.getFullYear(),w.currentMonth=a.getMonth(),r&&(ve("onYearChange"),U()),ve("onMonthChange")}if(ye(),K(),Me(),o||"range"===w.config.mode||1!==w.config.showMonths?void 0!==w.selectedDateElem&&void 0===w.hourElement&&w.selectedDateElem&&w.selectedDateElem.focus():R(n),void 0!==w.hourElement&&void 0!==w.hourElement&&w.hourElement.focus(),w.config.closeOnSelect){var l="single"===w.config.mode&&!w.config.enableTime,c="range"===w.config.mode&&2===w.selectedDates.length&&!w.config.enableTime;(l||c)&&ue()}N()}}w.parseDate=b({config:w.config,l10n:w.l10n}),w._handlers=[],w.pluginElements=[],w.loadedPlugins=[],w._bind=A,w._setHoursFromDate=S,w._positionCalendar=se,w.changeMonth=G,w.changeYear=X,w.clear=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!0),w.input.value="",void 0!==w.altInput&&(w.altInput.value=""),void 0!==w.mobileInput&&(w.mobileInput.value=""),w.selectedDates=[],w.latestSelectedDateObj=void 0,!0===t&&(w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth()),!0===w.config.enableTime){var n=x(w.config);P(n.hours,n.minutes,n.seconds)}w.redraw(),e&&ve("onChange")},w.close=function(){w.isOpen=!1,w.isMobile||(void 0!==w.calendarContainer&&w.calendarContainer.classList.remove("open"),void 0!==w._input&&w._input.classList.remove("active")),ve("onClose")},w.onMouseOver=oe,w._createElement=d,w.createDay=L,w.destroy=function(){void 0!==w.config&&ve("onDestroy");for(var e=w._handlers.length;e--;)w._handlers[e].remove();if(w._handlers=[],w.mobileInput)w.mobileInput.parentNode&&w.mobileInput.parentNode.removeChild(w.mobileInput),w.mobileInput=void 0;else if(w.calendarContainer&&w.calendarContainer.parentNode)if(w.config.static&&w.calendarContainer.parentNode){var t=w.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else w.calendarContainer.parentNode.removeChild(w.calendarContainer);w.altInput&&(w.input.type="text",w.altInput.parentNode&&w.altInput.parentNode.removeChild(w.altInput),delete w.altInput),w.input&&(w.input.type=w.input._type,w.input.classList.remove("flatpickr-input"),w.input.removeAttribute("readonly")),
["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete w[e]}catch(e){}}))},w.isEnabled=ee,w.jumpToDate=Y,w.updateValue=Me,w.open=function(e,t){if(void 0===t&&(t=w._positionElement),!0===w.isMobile){if(e){e.preventDefault();var n=g(e);n&&n.blur()}return void 0!==w.mobileInput&&(w.mobileInput.focus(),w.mobileInput.click()),void ve("onOpen")}if(!w._input.disabled&&!w.config.inline){var a=w.isOpen;w.isOpen=!0,a||(w.calendarContainer.classList.add("open"),w._input.classList.add("active"),ve("onOpen"),se(t)),!0===w.config.enableTime&&!0===w.config.noCalendar&&(!1!==w.config.allowInput||void 0!==e&&w.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return w.hourElement.select()}),50))}},w.redraw=de,w.set=function(e,t){if(null!==e&&"object"==typeof e)for(var a in Object.assign(w.config,e),e)void 0!==me[a]&&me[a].forEach((function(e){return e()}));else w.config[e]=t,void 0!==me[e]?me[e].forEach((function(e){return e()})):n.indexOf(e)>-1&&(w.config[e]=c(t));w.redraw(),Me(!0)},w.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=w.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return w.clear(t);ge(e,n),w.latestSelectedDateObj=w.selectedDates[w.selectedDates.length-1],w.redraw(),Y(void 0,t),S(),0===w.selectedDates.length&&w.clear(!1),Me(t),t&&ve("onChange")},w.toggle=function(e){if(!0===w.isOpen)return w.close();w.open(e)};var me={locale:[ce,z],showMonths:[q,_,V],minDate:[Y],maxDate:[Y],positionElement:[he],clickOpens:[function(){!0===w.config.clickOpens?(A(w._input,"focus",w.open),A(w._input,"click",w.open)):(w._input.removeEventListener("focus",w.open),w._input.removeEventListener("click",w.open))}]};function ge(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return w.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[w.parseDate(e,t)];else if("string"==typeof e)switch(w.config.mode){case"single":case"time":n=[w.parseDate(e,t)];break;case"multiple":n=e.split(w.config.conjunction).map((function(e){return w.parseDate(e,t)}));break;case"range":n=e.split(w.l10n.rangeSeparator).map((function(e){return w.parseDate(e,t)}))}else w.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));w.selectedDates=w.config.allowInvalidPreload?n:n.filter((function(e){return e instanceof Date&&ee(e,!1)})),"range"===w.config.mode&&w.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function pe(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?w.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:w.parseDate(e.from,void 0),to:w.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(){w._positionElement=w.config.positionElement||w._input}function ve(e,t){if(void 0!==w.config){var n=w.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a<n.length;a++)n[a](w.selectedDates,w.input.value,w,t);"onChange"===e&&(w.input.dispatchEvent(De("change")),w.input.dispatchEvent(De("input")))}}function De(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function we(e){for(var t=0;t<w.selectedDates.length;t++){var n=w.selectedDates[t];if(n instanceof Date&&0===M(n,e))return""+t}return!1}function ye(){w.config.noCalendar||w.isMobile||!w.monthNav||(w.yearElements.forEach((function(e,t){var n=new Date(w.currentYear,w.currentMonth,1);n.setMonth(w.currentMonth+t),w.config.showMonths>1||"static"===w.config.monthSelectorType?w.monthElements[t].textContent=h(n.getMonth(),w.config.shorthandCurrentMonth,w.l10n)+" ":w.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),w._hidePrevMonthArrow=void 0!==w.config.minDate&&(w.currentYear===w.config.minDate.getFullYear()?w.currentMonth<=w.config.minDate.getMonth():w.currentYear<w.config.minDate.getFullYear()),w._hideNextMonthArrow=void 0!==w.config.maxDate&&(w.currentYear===w.config.maxDate.getFullYear()?w.currentMonth+1>w.config.maxDate.getMonth():w.currentYear>w.config.maxDate.getFullYear()))}function be(e){var t=e||(w.config.altInput?w.config.altFormat:w.config.dateFormat);return w.selectedDates.map((function(e){return w.formatDate(e,t)})).filter((function(e,t,n){return"range"!==w.config.mode||w.config.enableTime||n.indexOf(e)===t})).join("range"!==w.config.mode?w.config.conjunction:w.l10n.rangeSeparator)}function Me(e){void 0===e&&(e=!0),void 0!==w.mobileInput&&w.mobileFormatStr&&(w.mobileInput.value=void 0!==w.latestSelectedDateObj?w.formatDate(w.latestSelectedDateObj,w.mobileFormatStr):""),w.input.value=be(w.config.dateFormat),void 0!==w.altInput&&(w.altInput.value=be(w.config.altFormat)),!1!==e&&ve("onValueUpdate")}function Ce(e){var t=g(e),n=w.prevMonthNav.contains(t),a=w.nextMonthNav.contains(t);n||a?G(n?-1:1):w.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?w.changeYear(w.currentYear+1):t.classList.contains("arrowDown")&&w.changeYear(w.currentYear-1)}return function(){w.element=w.input=p,w.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=e(e({},JSON.parse(JSON.stringify(p.dataset||{}))),v),i={};w.config.parseDate=o.parseDate,w.config.formatDate=o.formatDate,Object.defineProperty(w.config,"enable",{get:function(){return w.config._enable},set:function(e){w.config._enable=pe(e)}}),Object.defineProperty(w.config,"disable",{get:function(){return w.config._disable},set:function(e){w.config._disable=pe(e)}});var r="time"===o.mode;if(!o.dateFormat&&(o.enableTime||r)){var l=T.defaultConfig.dateFormat||a.dateFormat;i.dateFormat=o.noCalendar||r?"H:i"+(o.enableSeconds?":S":""):l+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||r)&&!o.altFormat){var s=T.defaultConfig.altFormat||a.altFormat;i.altFormat=o.noCalendar||r?"h:i"+(o.enableSeconds?":S K":" K"):s+" h:i"+(o.enableSeconds?":S":"")+" K"}Object.defineProperty(w.config,"minDate",{get:function(){return w.config._minDate},set:re("min")}),Object.defineProperty(w.config,"maxDate",{get:function(){return w.config._maxDate},set:re("max")});var d=function(e){return function(t){w.config["min"===e?"_minTime":"_maxTime"]=w.parseDate(t,"H:i:S")}};Object.defineProperty(w.config,"minTime",{get:function(){return w.config._minTime},set:d("min")}),Object.defineProperty(w.config,"maxTime",{get:function(){return w.config._maxTime},set:d("max")}),"time"===o.mode&&(w.config.noCalendar=!0,w.config.enableTime=!0),Object.assign(w.config,i,o);for(var u=0;u<t.length;u++)w.config[t[u]]=!0===w.config[t[u]]||"true"===w.config[t[u]];for(n.filter((function(e){return void 0!==w.config[e]})).forEach((function(e){w.config[e]=c(w.config[e]||[]).map(k)})),w.isMobile=!w.config.disableMobile&&!w.config.inline&&"single"===w.config.mode&&!w.config.disable.length&&!w.config.enable&&!w.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),u=0;u<w.config.plugins.length;u++){var f=w.config.plugins[u](w)||{};for(var m in f)n.indexOf(m)>-1?w.config[m]=c(f[m]).map(k).concat(w.config[m]):void 0===o[m]&&(w.config[m]=f[m])}o.altInputClass||(w.config.altInputClass=le().className+" "+w.config.altInputClass),ve("onParseConfig")}(),ce(),w.input=le(),w.input?(w.input._type=w.input.type,w.input.type="text",w.input.classList.add("flatpickr-input"),w._input=w.input,w.config.altInput&&(w.altInput=d(w.input.nodeName,w.config.altInputClass),w._input=w.altInput,w.altInput.placeholder=w.input.placeholder,w.altInput.disabled=w.input.disabled,w.altInput.required=w.input.required,w.altInput.tabIndex=w.input.tabIndex,w.altInput.type="text",w.input.setAttribute("type","hidden"),!w.config.static&&w.input.parentNode&&w.input.parentNode.insertBefore(w.altInput,w.input.nextSibling)),w.config.allowInput||w._input.setAttribute("readonly","readonly"),he()):w.config.errorHandler(new Error("Invalid input element specified")),function(){w.selectedDates=[],w.now=w.parseDate(w.config.now)||new Date;var e=w.config.defaultDate||("INPUT"!==w.input.nodeName&&"TEXTAREA"!==w.input.nodeName||!w.input.placeholder||w.input.value!==w.input.placeholder?w.input.value:null);e&&ge(e,w.config.dateFormat),w._initialDate=w.selectedDates.length>0?w.selectedDates[0]:w.config.minDate&&w.config.minDate.getTime()>w.now.getTime()?w.config.minDate:w.config.maxDate&&w.config.maxDate.getTime()<w.now.getTime()?w.config.maxDate:w.now,w.currentYear=w._initialDate.getFullYear(),w.currentMonth=w._initialDate.getMonth(),w.selectedDates.length>0&&(w.latestSelectedDateObj=w.selectedDates[0]),void 0!==w.config.minTime&&(w.config.minTime=w.parseDate(w.config.minTime,"H:i")),void 0!==w.config.maxTime&&(w.config.maxTime=w.parseDate(w.config.maxTime,"H:i")),w.minDateHasTime=!!w.config.minDate&&(w.config.minDate.getHours()>0||w.config.minDate.getMinutes()>0||w.config.minDate.getSeconds()>0),w.maxDateHasTime=!!w.config.maxDate&&(w.config.maxDate.getHours()>0||w.config.maxDate.getMinutes()>0||w.config.maxDate.getSeconds()>0)}(),w.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=w.currentMonth),void 0===t&&(t=w.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:w.l10n.daysInMonth[e]}},w.isMobile||function(){var e=window.document.createDocumentFragment();if(w.calendarContainer=d("div","flatpickr-calendar"),w.calendarContainer.tabIndex=-1,!w.config.noCalendar){if(e.appendChild((w.monthNav=d("div","flatpickr-months"),w.yearElements=[],w.monthElements=[],w.prevMonthNav=d("span","flatpickr-prev-month"),w.prevMonthNav.innerHTML=w.config.prevArrow,w.nextMonthNav=d("span","flatpickr-next-month"),w.nextMonthNav.innerHTML=w.config.nextArrow,q(),Object.defineProperty(w,"_hidePrevMonthArrow",{get:function(){return w.__hidePrevMonthArrow},set:function(e){w.__hidePrevMonthArrow!==e&&(s(w.prevMonthNav,"flatpickr-disabled",e),w.__hidePrevMonthArrow=e)}}),Object.defineProperty(w,"_hideNextMonthArrow",{get:function(){return w.__hideNextMonthArrow},set:function(e){w.__hideNextMonthArrow!==e&&(s(w.nextMonthNav,"flatpickr-disabled",e),w.__hideNextMonthArrow=e)}}),w.currentYearElement=w.yearElements[0],ye(),w.monthNav)),w.innerContainer=d("div","flatpickr-innerContainer"),w.config.weekNumbers){var t=function(){w.calendarContainer.classList.add("hasWeeks");var e=d("div","flatpickr-weekwrapper");e.appendChild(d("span","flatpickr-weekday",w.l10n.weekAbbreviation));var t=d("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;w.innerContainer.appendChild(n),w.weekNumbers=a,w.weekWrapper=n}w.rContainer=d("div","flatpickr-rContainer"),w.rContainer.appendChild(V()),w.daysContainer||(w.daysContainer=d("div","flatpickr-days"),w.daysContainer.tabIndex=-1),K(),w.rContainer.appendChild(w.daysContainer),w.innerContainer.appendChild(w.rContainer),e.appendChild(w.innerContainer)}w.config.enableTime&&e.appendChild(function(){w.calendarContainer.classList.add("hasTime"),w.config.noCalendar&&w.calendarContainer.classList.add("noCalendar");var e=x(w.config);w.timeContainer=d("div","flatpickr-time"),w.timeContainer.tabIndex=-1;var t=d("span","flatpickr-time-separator",":"),n=m("flatpickr-hour",{"aria-label":w.l10n.hourAriaLabel});w.hourElement=n.getElementsByTagName("input")[0];var a=m("flatpickr-minute",{"aria-label":w.l10n.minuteAriaLabel});if(w.minuteElement=a.getElementsByTagName("input")[0],w.hourElement.tabIndex=w.minuteElement.tabIndex=-1,w.hourElement.value=i(w.latestSelectedDateObj?w.latestSelectedDateObj.getHours():w.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),w.minuteElement.value=i(w.latestSelectedDateObj?w.latestSelectedDateObj.getMinutes():e.minutes),w.hourElement.setAttribute("step",w.config.hourIncrement.toString()),w.minuteElement.setAttribute("step",w.config.minuteIncrement.toString()),w.hourElement.setAttribute("min",w.config.time_24hr?"0":"1"),w.hourElement.setAttribute("max",w.config.time_24hr?"23":"12"),w.hourElement.setAttribute("maxlength","2"),w.minuteElement.setAttribute("min","0"),w.minuteElement.setAttribute("max","59"),w.minuteElement.setAttribute("maxlength","2"),w.timeContainer.appendChild(n),w.timeContainer.appendChild(t),w.timeContainer.appendChild(a),w.config.time_24hr&&w.timeContainer.classList.add("time24hr"),w.config.enableSeconds){w.timeContainer.classList.add("hasSeconds");var o=m("flatpickr-second");w.secondElement=o.getElementsByTagName("input")[0],w.secondElement.value=i(w.latestSelectedDateObj?w.latestSelectedDateObj.getSeconds():e.seconds),w.secondElement.setAttribute("step",w.minuteElement.getAttribute("step")),w.secondElement.setAttribute("min","0"),w.secondElement.setAttribute("max","59"),w.secondElement.setAttribute("maxlength","2"),w.timeContainer.appendChild(d("span","flatpickr-time-separator",":")),w.timeContainer.appendChild(o)}return w.config.time_24hr||(w.amPM=d("span","flatpickr-am-pm",w.l10n.amPM[r((w.latestSelectedDateObj?w.hourElement.value:w.config.defaultHour)>11)]),w.amPM.title=w.l10n.toggleTitle,w.amPM.tabIndex=-1,w.timeContainer.appendChild(w.amPM)),w.timeContainer}()),s(w.calendarContainer,"rangeMode","range"===w.config.mode),s(w.calendarContainer,"animate",!0===w.config.animate),s(w.calendarContainer,"multiMonth",w.config.showMonths>1),w.calendarContainer.appendChild(e);var o=void 0!==w.config.appendTo&&void 0!==w.config.appendTo.nodeType;if((w.config.inline||w.config.static)&&(w.calendarContainer.classList.add(w.config.inline?"inline":"static"),w.config.inline&&(!o&&w.element.parentNode?w.element.parentNode.insertBefore(w.calendarContainer,w._input.nextSibling):void 0!==w.config.appendTo&&w.config.appendTo.appendChild(w.calendarContainer)),w.config.static)){var l=d("div","flatpickr-wrapper");w.element.parentNode&&w.element.parentNode.insertBefore(l,w.element),l.appendChild(w.element),w.altInput&&l.appendChild(w.altInput),l.appendChild(w.calendarContainer)}w.config.static||w.config.inline||(void 0!==w.config.appendTo?w.config.appendTo:window.document.body).appendChild(w.calendarContainer)}(),function(){if(w.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(w.element.querySelectorAll("[data-"+e+"]"),(function(t){return A(t,"click",w[e])}))})),w.isMobile)!function(){var e=w.config.enableTime?w.config.noCalendar?"time":"datetime-local":"date";w.mobileInput=d("input",w.input.className+" flatpickr-mobile"),w.mobileInput.tabIndex=1,w.mobileInput.type=e,w.mobileInput.disabled=w.input.disabled,w.mobileInput.required=w.input.required,w.mobileInput.placeholder=w.input.placeholder,w.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",w.selectedDates.length>0&&(w.mobileInput.defaultValue=w.mobileInput.value=w.formatDate(w.selectedDates[0],w.mobileFormatStr)),w.config.minDate&&(w.mobileInput.min=w.formatDate(w.config.minDate,"Y-m-d")),w.config.maxDate&&(w.mobileInput.max=w.formatDate(w.config.maxDate,"Y-m-d")),w.input.getAttribute("step")&&(w.mobileInput.step=String(w.input.getAttribute("step"))),w.input.type="hidden",void 0!==w.altInput&&(w.altInput.type="hidden");try{w.input.parentNode&&w.input.parentNode.insertBefore(w.mobileInput,w.input.nextSibling)}catch(e){}A(w.mobileInput,"change",(function(e){w.setDate(g(e).value,!1,w.mobileFormatStr),ve("onChange"),ve("onClose")}))}();else{var e=l(ie,50);w._debouncedChange=l(N,300),w.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(w.daysContainer,"mouseover",(function(e){"range"===w.config.mode&&oe(g(e))})),A(w._input,"keydown",ae),void 0!==w.calendarContainer&&A(w.calendarContainer,"keydown",ae),w.config.inline||w.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"touchstart",Q):A(window.document,"mousedown",Q),A(window.document,"focus",Q,{capture:!0}),!0===w.config.clickOpens&&(A(w._input,"focus",w.open),A(w._input,"click",w.open)),void 0!==w.daysContainer&&(A(w.monthNav,"click",Ce),A(w.monthNav,["keyup","increment"],F),A(w.daysContainer,"click",fe)),void 0!==w.timeContainer&&void 0!==w.minuteElement&&void 0!==w.hourElement&&(A(w.timeContainer,["increment"],O),A(w.timeContainer,"blur",O,{capture:!0}),A(w.timeContainer,"click",j),A([w.hourElement,w.minuteElement],["focus","click"],(function(e){return g(e).select()})),void 0!==w.secondElement&&A(w.secondElement,"focus",(function(){return w.secondElement&&w.secondElement.select()})),void 0!==w.amPM&&A(w.amPM,"click",(function(e){O(e)}))),w.config.allowInput&&A(w._input,"blur",ne)}}(),(w.selectedDates.length||w.config.noCalendar)&&(w.config.enableTime&&S(w.config.noCalendar?w.latestSelectedDateObj:void 0),Me(!1)),_();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!w.isMobile&&t&&se(),ve("onReady")}(),w}function k(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],o=0;o<n.length;o++){var i=n[o];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=E(i,t||{}),a.push(i._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},o=0,i=t;o<i.length;o++)a(i[o]);return e}),"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return k(this,e)},HTMLElement.prototype.flatpickr=function(e){return k([this],e)});var T=function(e,t){return"string"==typeof e?k(window.document.querySelectorAll(e),t):e instanceof Node?k([e],t):k(e,t)};return T.defaultConfig={},T.l10ns={en:e({},o),default:e({},o)},T.localize=function(t){T.l10ns.default=e(e({},T.l10ns.default),t)},T.setDefaults=function(t){T.defaultConfig=e(e({},T.defaultConfig),t)},T.parseDate=b({}),T.formatDate=y({}),T.compareDates=M,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return k(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=T),T}()),(m=g.exports)&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")&&m.default),(p={})&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")&&p.default),(h={})&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")&&h.default),(v={})&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")&&v.default),(D={})&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")&&D.default),(w={})&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")&&w.default),(y={})&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")&&y.default),(b={})&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")&&b.default),(M={})&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")&&M.default),(C={})&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")&&C.default),(x={})&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")&&x.default),t);return(E=k)&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}();
// source --> https://cbblanes.cat/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.js?ver=4.16.13 
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),--u;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;--u){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">&times;</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t,n=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===n.id}).length){var r=i.option(n);r.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([r])}t=n,i.trigger("select",{data:t})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});
// source --> https://cbblanes.cat/wp-content/plugins/pro-elements/assets/js/page-transitions.min.js?ver=3.35.0 
/*! pro-elements - v3.35.0 - 02-02-2026 */
(()=>{var e={7772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PageTransition",{enumerable:!0,get:function(){return a.PageTransition}}),Object.defineProperty(t,"Preloader",{enumerable:!0,get:function(){return n.Preloader}});var a=r(7539),n=r(7739)},6017:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/.*#[\w\-/$.+()*@?~!&',;=:%]*$/;t.default={isDisabled:e=>Object.prototype.hasOwnProperty.call(e.dataset,"eDisablePageTransition"),isEmptyHref:e=>!e.getAttribute("href"),isTargetBlank:e=>"_blank"===e.target,notSameOrigin:e=>!e.href.startsWith(window.location.origin),hasFragment:e=>!!e.href.match(r),isPopup:e=>"true"===e.getAttribute("aria-haspopup")&&"false"===e.getAttribute("aria-expanded"),isWoocommerce:e=>{const t=e.href.match(/\?add-to-cart=/),r=e.href.match(/\?remove_item=/),a=e.href.match(/\?undo_item=/),n=e.href.match(/\?product-page=/),o=e.href.match(/\?elementor_wc_logout=/),s=e.parentElement?.classList.contains("woocommerce-MyAccount-navigation-link");return t||r||a||n||o||s},isExcluded:(e,t)=>e.href.match(new RegExp(t))}},7539:(e,t,r)=>{"use strict";var a=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PageTransition=void 0;var n=a(r(9733)),o=a(r(6017));class PageTransition extends HTMLElement{constructor(){super(),this.classes=this.getClasses(),this.elements=this.getElements(),this.bindEvents()}getClasses(){return{preloader:"e-page-transition--preloader",entering:"e-page-transition--entering",exiting:"e-page-transition--exiting",entered:"e-page-transition--entered",preview:"e-page-transition--preview"}}getStyle(){return`<style>${n.default.toString()}</style>`}static get observedAttributes(){return["preloader-type","preloader-icon","preloader-image-url","preloader-animation-type","disabled"]}getElements(){const e=this.getAttribute("triggers")||'a:not( [data-elementor-open-lightbox="yes"] )';return{links:document.querySelectorAll(e)}}shouldPageTriggerTransition(e){return Object.values(o.default).every((t=>!t(e,this.getAttribute("exclude"))))}onPageShow(){this.classList.contains(this.classes.exiting)&&(this.classList.add(this.classes.entered),this.classList.remove(this.classes.exiting)),this.animateState("entering").then((()=>{this.classList.add(this.classes.entered)}))}onLinkClick(e){if(!this.shouldPageTriggerTransition(e.currentTarget))return;e.preventDefault();const t=e.currentTarget.href;this.classList.remove(this.classes.entered),this.animateState("exiting",this.getPreloaderDelay()).then((()=>{this.classList.add(this.classes.exiting),location.href=t}))}prerender(e){if(document.querySelector(`link[href="${e}"]`))return;const t=document.createElement("link");t.setAttribute("rel","prerender"),t.setAttribute("href",e),document.head.appendChild(t)}onLinkMouseEnter(e){this.shouldPageTriggerTransition(e.currentTarget)&&this.prerender(e.currentTarget.href)}bindEvents(){window.addEventListener("pageshow",this.onPageShow.bind(this)),window.addEventListener("DOMContentLoaded",(()=>{this.elements=this.getElements(),this.elements.links.forEach((e=>{e.addEventListener("click",this.onLinkClick.bind(this)),e.addEventListener("mouseenter",this.onLinkMouseEnter.bind(this)),e.addEventListener("touchstart",this.onLinkMouseEnter.bind(this))}))}))}escapeHTML(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};return e.replace(/[&<>'"]/g,(e=>t[e]||e))}getIconLoader(){const e=this.getAttribute("preloader-icon")||"";return`\n\t\t\t<i class="${this.escapeHTML(e)} ${this.classes.preloader}"></i>\n\t\t`}getImageLoader(){const e=this.getAttribute("preloader-image-url")||"";return`\n\t\t\t<img class="${this.classes.preloader}" src="${this.escapeHTML(e)}" />\n\t\t`}getAnimationLoader(){const e=this.getAttribute("preloader-animation-type");return e?`\n\t\t\t<e-preloader type="${e}"></e-preloader>\n\t\t`:""}render(){if(this.hasAttribute("disabled"))return void(this.innerHTML="");switch(this.getAttribute("preloader-type")){case"icon":this.innerHTML=this.getIconLoader();break;case"image":this.innerHTML=this.getImageLoader();break;case"animation":this.innerHTML=this.getAnimationLoader();break;default:this.innerHTML=""}this.innerHTML+=this.getStyle()}getCssVar(e,t="e-page-transition-"){return window.getComputedStyle(this).getPropertyValue(`--${t}${e}`)}getAnimationDuration(){return parseInt(this.getCssVar("animation-duration"))||0}getPreloaderDelay(){return parseInt(this.getCssVar("delay","e-preloader-"))||0}animate(){if(this.isAnimating)return new Promise(((e,t)=>{t("Animation is already in progress.")}));this.isAnimating=!0;const e=this.getPreloaderDelay()+1500;return this.classList.remove(this.classes.entered),new Promise((t=>{setTimeout((()=>{this.animateState("exiting",e).then((()=>{this.animateState("entering").then((()=>{this.classList.add(this.classes.entered),this.isAnimating=!1,t()}))}))}))}))}animateState(e,t=0){const r=this.classes?.[e];if(!r)return new Promise(((t,r)=>{r(e)}));this.classList.remove(r),this.classList.add(r);const a=this.getAnimationDuration();return new Promise((n=>{setTimeout((()=>{this.classList.remove(r),n(e)}),a+t)}))}attributeChangedCallback(){this.render()}connectedCallback(){this.render()}}t.PageTransition=PageTransition;t.default=PageTransition},7739:(e,t,r)=>{"use strict";var a=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Preloader=void 0;var n=a(r(9653));class Preloader extends HTMLElement{static get observedAttributes(){return["type"]}attributeChangedCallback(){this.render()}getStyle(){return`<style>${n.default.toString()}</style>`}render(){const e=this.getAttribute("type");this.innerHTML="",e&&(["bouncing-dots","pulsing-dots"].includes(e)&&(this.innerHTML+="\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t\t<i></i>\n\t\t\t"),this.innerHTML+=this.getStyle())}connectedCallback(){this.render()}}t.Preloader=Preloader;t.default=Preloader},9733:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var a=r(8645),n=r.n(a),o=r(278),s=r.n(o)()(n());s.push([e.id,"e-page-transition{--preloader-fade-duration: .5s;--preloader-delay: calc( var( --e-page-transition-animation-duration, 0s ) + var( --e-preloader-delay, 0s ) );--page-transition-delay: var( --preloader-fade-duration );position:fixed;inset:0;display:grid;place-items:center;z-index:10000;background:#fff;animation-fill-mode:both;animation-duration:var(--e-page-transition-animation-duration)}e-page-transition[disabled]{display:none}e-page-transition e-preloader,e-page-transition .e-page-transition--preloader{opacity:0}e-page-transition .e-page-transition--preloader{position:absolute;font-size:var(--e-preloader-size);color:var(--e-preloader-color);fill:var(--e-preloader-color);width:var(--e-preloader-width);max-width:var(--e-preloader-max-width);transform:rotate(var(--e-preloader-rotate, 0deg));animation-name:var(--e-preloader-animation);animation-duration:var(--e-preloader-animation-duration, 1000ms);animation-iteration-count:infinite;animation-timing-function:linear}e-page-transition svg.e-page-transition--preloader{width:var(--e-preloader-size)}.e-page-transition--entering{animation-name:var(--e-page-transition-entrance-animation);animation-delay:var(--preloader-fade-duration, 0s)}.e-page-transition--entering e-preloader,.e-page-transition--entering .e-page-transition--preloader{animation:var(--e-preloader-animation, none) var(--e-preloader-animation-duration, 0s) linear infinite,e-page-transition-fade-out var(--preloader-fade-duration) both;transition:none}.e-page-transition--exiting{animation-name:var(--e-page-transition-exit-animation)}.e-page-transition--exiting e-preloader,.e-page-transition--exiting .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1);transition:var(--preloader-fade-duration) all;transition-delay:var(--preloader-delay, 0s)}.e-page-transition--entered:not(.e-page-transition--preview){display:none}.e-page-transition--preview{animation-fill-mode:initial}.e-page-transition--preview.e-page-transition--entered e-preloader,.e-page-transition--preview.e-page-transition--entered .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1)}@media(prefers-reduced-motion: reduce){e-page-transition{display:none}}@keyframes e-page-transition-fade-in{from{opacity:0}to{opacity:1}}@keyframes e-page-transition-fade-in-down{from{opacity:0;transform:translate3d(0, -100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-left{from{opacity:0;transform:translate3d(-100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-right{from{opacity:0;transform:translate3d(100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-up{from{opacity:0;transform:translate3d(0, 100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-zoom-in{from{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}50%{opacity:1}}@keyframes e-page-transition-slide-in-down{from{transform:translate3d(0, -100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-left{from{transform:translate3d(-100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-right{from{transform:translate3d(100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-up{from{transform:translate3d(0, 100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-fade-out{from{opacity:1}to{opacity:0}}@keyframes e-page-transition-fade-out-up{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, -100%, 0)}}@keyframes e-page-transition-fade-out-left{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(-100%, 0, 0)}}@keyframes e-page-transition-fade-out-right{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(100%, 0, 0)}}@keyframes e-page-transition-fade-out-down{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, 100%, 0)}}@keyframes e-page-transition-slide-out-up{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, -100%, 0);visibility:visible}}@keyframes e-page-transition-slide-out-left{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(-100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-right{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-down{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, 100%, 0);visibility:visible}}@keyframes e-page-transition-zoom-out{from{opacity:1}50%{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}}",""]);const d=s},9653:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var a=r(8645),n=r.n(a),o=r(278),s=r.n(o)()(n());s.push([e.id,'e-preloader{--default-duartion: 1000ms;--duration: var( --e-preloader-animation-duration, var( --default-duration ) );display:block;font-size:var(--e-preloader-size)}e-preloader[type=circle],e-preloader[type=circle-dashed],e-preloader[type=spinners]{--e-preloader-animation: e-preloader-spin;height:1em;width:1em;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);border-radius:100%;animation:var(--duration) var(--e-preloader-animation) linear infinite}e-preloader[type=circle-dashed]{border:.1em solid hsla(0,0%,100%,.3);border-top-color:var(--e-preloader-color)}e-preloader[type=spinners]{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=bouncing-dots],e-preloader[type=pulsing-dots]{display:flex;gap:1em}e-preloader[type=bouncing-dots] i,e-preloader[type=pulsing-dots] i{height:1em;width:1em;border-radius:100%;background-color:var(--e-preloader-color)}e-preloader[type=bouncing-dots] i:nth-child(2),e-preloader[type=pulsing-dots] i:nth-child(2){animation-delay:var(--delay)}e-preloader[type=bouncing-dots] i:nth-child(3),e-preloader[type=pulsing-dots] i:nth-child(3){animation-delay:calc(var(--delay)*2)}e-preloader[type=bouncing-dots] i:nth-child(4),e-preloader[type=pulsing-dots] i:nth-child(4){animation-delay:calc(var(--delay)*3)}e-preloader[type=bouncing-dots] i{--delay: calc( var( --duration ) / 10 );animation:var(--duration) e-preloader-bounce linear infinite}e-preloader[type=pulsing-dots] i{--delay: calc( var( --duration ) / 6 );animation:var(--duration) e-preloader-pulsing-dots linear infinite}e-preloader[type=pulse]{height:1em;width:1em;position:relative}e-preloader[type=pulse]::before,e-preloader[type=pulse]::after{content:"";position:absolute;inset:0;border:.05em solid var(--e-preloader-color);border-radius:100%;animation:1.2s e-preloader-pulse infinite both ease-out}e-preloader[type=pulse]::after{animation-delay:.6s}e-preloader[type=overlap]{height:1em;width:1em;position:relative}e-preloader[type=overlap]::before,e-preloader[type=overlap]::after{content:"";inset:0;position:absolute;background:var(--e-preloader-color);border-radius:100%;opacity:.5;animation:2s e-preloader-overlap infinite both ease-in-out}e-preloader[type=overlap]::after{animation-delay:-1s;animation-direction:reverse}e-preloader[type=nested-spinners],e-preloader[type=opposing-nested-spinners],e-preloader[type=opposing-nested-rings]{height:1em;width:1em;position:relative}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::before,e-preloader[type=opposing-nested-rings]::after{content:"";display:block;position:absolute;border-radius:100%;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);animation:var(--duration) e-preloader-spin linear infinite}e-preloader[type=nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-rings]::before{inset:-0.3em}e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::after{animation-duration:calc(var(--duration) - .2s);inset:0;opacity:.5}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=opposing-nested-rings]::after,e-preloader[type=opposing-nested-spinners]::after{animation-direction:reverse}e-preloader[type=progress-bar],e-preloader[type=two-way-progress-bar],e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-progress-bar;height:.05em;width:5em;max-width:50vw;background:var(--e-preloader-color);animation:var(--duration) var(--e-preloader-animation) linear infinite both}e-preloader[type=progress-bar]{transform-origin:0 50%}e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-repeating-bar}@media(prefers-reduced-motion: reduce){e-preloader{display:none}}@keyframes e-preloader-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes e-preloader-bounce{0%,40%,100%{transform:translateY(0)}20%{transform:translateY(-80%)}}@keyframes e-preloader-pulsing-dots{0%,40%,100%{transform:scale(1)}20%{transform:scale(1.5)}}@keyframes e-preloader-pulse{from{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}@keyframes e-preloader-overlap{0%,100%{transform:scale(0.2)}50%{transform:scale(1)}}@keyframes e-preloader-progress-bar{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes e-preloader-repeating-bar{0%{transform:scaleX(0);transform-origin:0 50%}49%{transform-origin:0 50%}50%{transform:scaleX(1);transform-origin:100% 50%}100%{transform:scaleX(0);transform-origin:100% 50%}}',""]);const d=s},278:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function toString(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function i(e,r,a,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(a)for(var d=0;d<this.length;d++){var l=this[d][0];null!=l&&(s[l]=!0)}for(var p=0;p<e.length;p++){var c=[].concat(e[p]);a&&s[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},8645:e=>{"use strict";e.exports=function(e){return e[1]}},6784:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function __webpack_require__(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={id:r,exports:{}};return e[r](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";var e=__webpack_require__(7772);class PageTransitionsFrontend{constructor(){customElements.define("e-preloader",e.Preloader),customElements.define("e-page-transition",e.PageTransition)}}new PageTransitionsFrontend})()})();
// source --> https://cbblanes.cat/wp-content/plugins/elementor/assets/lib/font-awesome/js/v4-shims.min.js?ver=4.0.1 
/*!
 * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 */
(function(){var l,a;l=this,a=function(){"use strict";var l={},a={};try{"undefined"!=typeof window&&(l=window),"undefined"!=typeof document&&(a=document)}catch(l){}var e=(l.navigator||{}).userAgent,r=void 0===e?"":e,n=l,o=a,u=(n.document,!!o.documentElement&&!!o.head&&"function"==typeof o.addEventListener&&o.createElement,~r.indexOf("MSIE")||r.indexOf("Trident/"),"___FONT_AWESOME___"),t=function(){try{return"production"===process.env.NODE_ENV}catch(l){return!1}}();var f=n||{};f[u]||(f[u]={}),f[u].styles||(f[u].styles={}),f[u].hooks||(f[u].hooks={}),f[u].shims||(f[u].shims=[]);var i=f[u],s=[["glass",null,"glass-martini"],["meetup","fab",null],["star-o","far","star"],["remove",null,"times"],["close",null,"times"],["gear",null,"cog"],["trash-o","far","trash-alt"],["file-o","far","file"],["clock-o","far","clock"],["arrow-circle-o-down","far","arrow-alt-circle-down"],["arrow-circle-o-up","far","arrow-alt-circle-up"],["play-circle-o","far","play-circle"],["repeat",null,"redo"],["rotate-right",null,"redo"],["refresh",null,"sync"],["list-alt","far",null],["dedent",null,"outdent"],["video-camera",null,"video"],["picture-o","far","image"],["photo","far","image"],["image","far","image"],["pencil",null,"pencil-alt"],["map-marker",null,"map-marker-alt"],["pencil-square-o","far","edit"],["share-square-o","far","share-square"],["check-square-o","far","check-square"],["arrows",null,"arrows-alt"],["times-circle-o","far","times-circle"],["check-circle-o","far","check-circle"],["mail-forward",null,"share"],["expand",null,"expand-alt"],["compress",null,"compress-alt"],["eye","far",null],["eye-slash","far",null],["warning",null,"exclamation-triangle"],["calendar",null,"calendar-alt"],["arrows-v",null,"arrows-alt-v"],["arrows-h",null,"arrows-alt-h"],["bar-chart","far","chart-bar"],["bar-chart-o","far","chart-bar"],["twitter-square","fab",null],["facebook-square","fab",null],["gears",null,"cogs"],["thumbs-o-up","far","thumbs-up"],["thumbs-o-down","far","thumbs-down"],["heart-o","far","heart"],["sign-out",null,"sign-out-alt"],["linkedin-square","fab","linkedin"],["thumb-tack",null,"thumbtack"],["external-link",null,"external-link-alt"],["sign-in",null,"sign-in-alt"],["github-square","fab",null],["lemon-o","far","lemon"],["square-o","far","square"],["bookmark-o","far","bookmark"],["twitter","fab",null],["facebook","fab","facebook-f"],["facebook-f","fab","facebook-f"],["github","fab",null],["credit-card","far",null],["feed",null,"rss"],["hdd-o","far","hdd"],["hand-o-right","far","hand-point-right"],["hand-o-left","far","hand-point-left"],["hand-o-up","far","hand-point-up"],["hand-o-down","far","hand-point-down"],["arrows-alt",null,"expand-arrows-alt"],["group",null,"users"],["chain",null,"link"],["scissors",null,"cut"],["files-o","far","copy"],["floppy-o","far","save"],["navicon",null,"bars"],["reorder",null,"bars"],["pinterest","fab",null],["pinterest-square","fab",null],["google-plus-square","fab",null],["google-plus","fab","google-plus-g"],["money","far","money-bill-alt"],["unsorted",null,"sort"],["sort-desc",null,"sort-down"],["sort-asc",null,"sort-up"],["linkedin","fab","linkedin-in"],["rotate-left",null,"undo"],["legal",null,"gavel"],["tachometer",null,"tachometer-alt"],["dashboard",null,"tachometer-alt"],["comment-o","far","comment"],["comments-o","far","comments"],["flash",null,"bolt"],["clipboard","far",null],["paste","far","clipboard"],["lightbulb-o","far","lightbulb"],["exchange",null,"exchange-alt"],["cloud-download",null,"cloud-download-alt"],["cloud-upload",null,"cloud-upload-alt"],["bell-o","far","bell"],["cutlery",null,"utensils"],["file-text-o","far","file-alt"],["building-o","far","building"],["hospital-o","far","hospital"],["tablet",null,"tablet-alt"],["mobile",null,"mobile-alt"],["mobile-phone",null,"mobile-alt"],["circle-o","far","circle"],["mail-reply",null,"reply"],["github-alt","fab",null],["folder-o","far","folder"],["folder-open-o","far","folder-open"],["smile-o","far","smile"],["frown-o","far","frown"],["meh-o","far","meh"],["keyboard-o","far","keyboard"],["flag-o","far","flag"],["mail-reply-all",null,"reply-all"],["star-half-o","far","star-half"],["star-half-empty","far","star-half"],["star-half-full","far","star-half"],["code-fork",null,"code-branch"],["chain-broken",null,"unlink"],["shield",null,"shield-alt"],["calendar-o","far","calendar"],["maxcdn","fab",null],["html5","fab",null],["css3","fab",null],["ticket",null,"ticket-alt"],["minus-square-o","far","minus-square"],["level-up",null,"level-up-alt"],["level-down",null,"level-down-alt"],["pencil-square",null,"pen-square"],["external-link-square",null,"external-link-square-alt"],["compass","far",null],["caret-square-o-down","far","caret-square-down"],["toggle-down","far","caret-square-down"],["caret-square-o-up","far","caret-square-up"],["toggle-up","far","caret-square-up"],["caret-square-o-right","far","caret-square-right"],["toggle-right","far","caret-square-right"],["eur",null,"euro-sign"],["euro",null,"euro-sign"],["gbp",null,"pound-sign"],["usd",null,"dollar-sign"],["dollar",null,"dollar-sign"],["inr",null,"rupee-sign"],["rupee",null,"rupee-sign"],["jpy",null,"yen-sign"],["cny",null,"yen-sign"],["rmb",null,"yen-sign"],["yen",null,"yen-sign"],["rub",null,"ruble-sign"],["ruble",null,"ruble-sign"],["rouble",null,"ruble-sign"],["krw",null,"won-sign"],["won",null,"won-sign"],["btc","fab",null],["bitcoin","fab","btc"],["file-text",null,"file-alt"],["sort-alpha-asc",null,"sort-alpha-down"],["sort-alpha-desc",null,"sort-alpha-down-alt"],["sort-amount-asc",null,"sort-amount-down"],["sort-amount-desc",null,"sort-amount-down-alt"],["sort-numeric-asc",null,"sort-numeric-down"],["sort-numeric-desc",null,"sort-numeric-down-alt"],["youtube-square","fab",null],["youtube","fab",null],["xing","fab",null],["xing-square","fab",null],["youtube-play","fab","youtube"],["dropbox","fab",null],["stack-overflow","fab",null],["instagram","fab",null],["flickr","fab",null],["adn","fab",null],["bitbucket","fab",null],["bitbucket-square","fab","bitbucket"],["tumblr","fab",null],["tumblr-square","fab",null],["long-arrow-down",null,"long-arrow-alt-down"],["long-arrow-up",null,"long-arrow-alt-up"],["long-arrow-left",null,"long-arrow-alt-left"],["long-arrow-right",null,"long-arrow-alt-right"],["apple","fab",null],["windows","fab",null],["android","fab",null],["linux","fab",null],["dribbble","fab",null],["skype","fab",null],["foursquare","fab",null],["trello","fab",null],["gratipay","fab",null],["gittip","fab","gratipay"],["sun-o","far","sun"],["moon-o","far","moon"],["vk","fab",null],["weibo","fab",null],["renren","fab",null],["pagelines","fab",null],["stack-exchange","fab",null],["arrow-circle-o-right","far","arrow-alt-circle-right"],["arrow-circle-o-left","far","arrow-alt-circle-left"],["caret-square-o-left","far","caret-square-left"],["toggle-left","far","caret-square-left"],["dot-circle-o","far","dot-circle"],["vimeo-square","fab",null],["try",null,"lira-sign"],["turkish-lira",null,"lira-sign"],["plus-square-o","far","plus-square"],["slack","fab",null],["wordpress","fab",null],["openid","fab",null],["institution",null,"university"],["bank",null,"university"],["mortar-board",null,"graduation-cap"],["yahoo","fab",null],["google","fab",null],["reddit","fab",null],["reddit-square","fab",null],["stumbleupon-circle","fab",null],["stumbleupon","fab",null],["delicious","fab",null],["digg","fab",null],["pied-piper-pp","fab",null],["pied-piper-alt","fab",null],["drupal","fab",null],["joomla","fab",null],["spoon",null,"utensil-spoon"],["behance","fab",null],["behance-square","fab",null],["steam","fab",null],["steam-square","fab",null],["automobile",null,"car"],["envelope-o","far","envelope"],["spotify","fab",null],["deviantart","fab",null],["soundcloud","fab",null],["file-pdf-o","far","file-pdf"],["file-word-o","far","file-word"],["file-excel-o","far","file-excel"],["file-powerpoint-o","far","file-powerpoint"],["file-image-o","far","file-image"],["file-photo-o","far","file-image"],["file-picture-o","far","file-image"],["file-archive-o","far","file-archive"],["file-zip-o","far","file-archive"],["file-audio-o","far","file-audio"],["file-sound-o","far","file-audio"],["file-video-o","far","file-video"],["file-movie-o","far","file-video"],["file-code-o","far","file-code"],["vine","fab",null],["codepen","fab",null],["jsfiddle","fab",null],["life-ring","far",null],["life-bouy","far","life-ring"],["life-buoy","far","life-ring"],["life-saver","far","life-ring"],["support","far","life-ring"],["circle-o-notch",null,"circle-notch"],["rebel","fab",null],["ra","fab","rebel"],["resistance","fab","rebel"],["empire","fab",null],["ge","fab","empire"],["git-square","fab",null],["git","fab",null],["hacker-news","fab",null],["y-combinator-square","fab","hacker-news"],["yc-square","fab","hacker-news"],["tencent-weibo","fab",null],["qq","fab",null],["weixin","fab",null],["wechat","fab","weixin"],["send",null,"paper-plane"],["paper-plane-o","far","paper-plane"],["send-o","far","paper-plane"],["circle-thin","far","circle"],["header",null,"heading"],["sliders",null,"sliders-h"],["futbol-o","far","futbol"],["soccer-ball-o","far","futbol"],["slideshare","fab",null],["twitch","fab",null],["yelp","fab",null],["newspaper-o","far","newspaper"],["paypal","fab",null],["google-wallet","fab",null],["cc-visa","fab",null],["cc-mastercard","fab",null],["cc-discover","fab",null],["cc-amex","fab",null],["cc-paypal","fab",null],["cc-stripe","fab",null],["bell-slash-o","far","bell-slash"],["trash",null,"trash-alt"],["copyright","far",null],["eyedropper",null,"eye-dropper"],["area-chart",null,"chart-area"],["pie-chart",null,"chart-pie"],["line-chart",null,"chart-line"],["lastfm","fab",null],["lastfm-square","fab",null],["ioxhost","fab",null],["angellist","fab",null],["cc","far","closed-captioning"],["ils",null,"shekel-sign"],["shekel",null,"shekel-sign"],["sheqel",null,"shekel-sign"],["meanpath","fab","font-awesome"],["buysellads","fab",null],["connectdevelop","fab",null],["dashcube","fab",null],["forumbee","fab",null],["leanpub","fab",null],["sellsy","fab",null],["shirtsinbulk","fab",null],["simplybuilt","fab",null],["skyatlas","fab",null],["diamond","far","gem"],["intersex",null,"transgender"],["facebook-official","fab","facebook"],["pinterest-p","fab",null],["whatsapp","fab",null],["hotel",null,"bed"],["viacoin","fab",null],["medium","fab",null],["y-combinator","fab",null],["yc","fab","y-combinator"],["optin-monster","fab",null],["opencart","fab",null],["expeditedssl","fab",null],["battery-4",null,"battery-full"],["battery",null,"battery-full"],["battery-3",null,"battery-three-quarters"],["battery-2",null,"battery-half"],["battery-1",null,"battery-quarter"],["battery-0",null,"battery-empty"],["object-group","far",null],["object-ungroup","far",null],["sticky-note-o","far","sticky-note"],["cc-jcb","fab",null],["cc-diners-club","fab",null],["clone","far",null],["hourglass-o","far","hourglass"],["hourglass-1",null,"hourglass-start"],["hourglass-2",null,"hourglass-half"],["hourglass-3",null,"hourglass-end"],["hand-rock-o","far","hand-rock"],["hand-grab-o","far","hand-rock"],["hand-paper-o","far","hand-paper"],["hand-stop-o","far","hand-paper"],["hand-scissors-o","far","hand-scissors"],["hand-lizard-o","far","hand-lizard"],["hand-spock-o","far","hand-spock"],["hand-pointer-o","far","hand-pointer"],["hand-peace-o","far","hand-peace"],["registered","far",null],["creative-commons","fab",null],["gg","fab",null],["gg-circle","fab",null],["tripadvisor","fab",null],["odnoklassniki","fab",null],["odnoklassniki-square","fab",null],["get-pocket","fab",null],["wikipedia-w","fab",null],["safari","fab",null],["chrome","fab",null],["firefox","fab",null],["opera","fab",null],["internet-explorer","fab",null],["television",null,"tv"],["contao","fab",null],["500px","fab",null],["amazon","fab",null],["calendar-plus-o","far","calendar-plus"],["calendar-minus-o","far","calendar-minus"],["calendar-times-o","far","calendar-times"],["calendar-check-o","far","calendar-check"],["map-o","far","map"],["commenting",null,"comment-dots"],["commenting-o","far","comment-dots"],["houzz","fab",null],["vimeo","fab","vimeo-v"],["black-tie","fab",null],["fonticons","fab",null],["reddit-alien","fab",null],["edge","fab",null],["credit-card-alt",null,"credit-card"],["codiepie","fab",null],["modx","fab",null],["fort-awesome","fab",null],["usb","fab",null],["product-hunt","fab",null],["mixcloud","fab",null],["scribd","fab",null],["pause-circle-o","far","pause-circle"],["stop-circle-o","far","stop-circle"],["bluetooth","fab",null],["bluetooth-b","fab",null],["gitlab","fab",null],["wpbeginner","fab",null],["wpforms","fab",null],["envira","fab",null],["wheelchair-alt","fab","accessible-icon"],["question-circle-o","far","question-circle"],["volume-control-phone",null,"phone-volume"],["asl-interpreting",null,"american-sign-language-interpreting"],["deafness",null,"deaf"],["hard-of-hearing",null,"deaf"],["glide","fab",null],["glide-g","fab",null],["signing",null,"sign-language"],["viadeo","fab",null],["viadeo-square","fab",null],["snapchat","fab",null],["snapchat-ghost","fab",null],["snapchat-square","fab",null],["pied-piper","fab",null],["first-order","fab",null],["yoast","fab",null],["themeisle","fab",null],["google-plus-official","fab","google-plus"],["google-plus-circle","fab","google-plus"],["font-awesome","fab",null],["fa","fab","font-awesome"],["handshake-o","far","handshake"],["envelope-open-o","far","envelope-open"],["linode","fab",null],["address-book-o","far","address-book"],["vcard",null,"address-card"],["address-card-o","far","address-card"],["vcard-o","far","address-card"],["user-circle-o","far","user-circle"],["user-o","far","user"],["id-badge","far",null],["drivers-license",null,"id-card"],["id-card-o","far","id-card"],["drivers-license-o","far","id-card"],["quora","fab",null],["free-code-camp","fab",null],["telegram","fab",null],["thermometer-4",null,"thermometer-full"],["thermometer",null,"thermometer-full"],["thermometer-3",null,"thermometer-three-quarters"],["thermometer-2",null,"thermometer-half"],["thermometer-1",null,"thermometer-quarter"],["thermometer-0",null,"thermometer-empty"],["bathtub",null,"bath"],["s15",null,"bath"],["window-maximize","far",null],["window-restore","far",null],["times-rectangle",null,"window-close"],["window-close-o","far","window-close"],["times-rectangle-o","far","window-close"],["bandcamp","fab",null],["grav","fab",null],["etsy","fab",null],["imdb","fab",null],["ravelry","fab",null],["eercast","fab","sellcast"],["snowflake-o","far","snowflake"],["superpowers","fab",null],["wpexplorer","fab",null],["cab",null,"taxi"]];return function(l){try{l()}catch(l){if(!t)throw l}}(function(){var l;"function"==typeof i.hooks.addShims?i.hooks.addShims(s):(l=i.shims).push.apply(l,s)}),s},"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):l["fontawesome-free-shims"]=a();})();
// source --> https://cbblanes.cat/wp-content/plugins/bdthemes-prime-slider-lite/assets/js/bdt-uikit.min.js?ver=3.21.7 
/*! bdtUIkit 3.21.7 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */!function(t,e){"object"==typeof exports&&typeof module<"u"?module.exports=e():"function"==typeof define&&define.amd?define("uikit",e):(t=typeof globalThis<"u"?globalThis:t||self).bdtUIkit=e()}(this,function(){"use strict";const{hasOwnProperty:t,toString:e}=Object.prototype;function i(e,i){return t.call(e,i)}const n=/\B([A-Z])/g,s=Z(t=>t.replace(n,"-$1").toLowerCase()),o=/-(\w)/g,r=Z(t=>(t.charAt(0).toLowerCase()+t.slice(1)).replace(o,(t,e)=>e.toUpperCase())),a=Z(t=>t.charAt(0).toUpperCase()+t.slice(1));function l(t,e){var i;return null==(i=null==t?void 0:t.startsWith)?void 0:i.call(t,e)}function h(t,e){var i;return null==(i=null==t?void 0:t.endsWith)?void 0:i.call(t,e)}function c(t,e){var i;return null==(i=null==t?void 0:t.includes)?void 0:i.call(t,e)}function d(t,e){var i;return null==(i=null==t?void 0:t.findIndex)?void 0:i.call(t,e)}const{isArray:u,from:f}=Array,{assign:p}=Object;function g(t){return"function"==typeof t}function m(t){return null!==t&&"object"==typeof t}function v(t){return"[object Object]"===e.call(t)}function b(t){return m(t)&&t===t.window}function w(t){return 9===y(t)}function $(t){return y(t)>=1}function x(t){return 1===y(t)}function y(t){return!b(t)&&m(t)&&t.nodeType}function S(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function k(t){return"number"==typeof t}function C(t){return k(t)||I(t)&&!isNaN(t-parseFloat(t))}function T(t){return!(u(t)?t.length:m(t)&&Object.keys(t).length)}function E(t){return void 0===t}function A(t){return S(t)?t:"true"===t||"1"===t||""===t||"false"!==t&&"0"!==t&&t}function D(t){const e=Number(t);return!isNaN(e)&&e}function _(t){return parseFloat(t)||0}function M(t){return t&&P(t)[0]}function P(t){return $(t)?[t]:Array.from(t||[]).filter($)}function O(t){if(b(t))return t;const e=w(t=M(t))?t:null==t?void 0:t.ownerDocument;return(null==e?void 0:e.defaultView)||window}function B(t,e){return t===e||m(t)&&m(e)&&Object.keys(t).length===Object.keys(e).length&&H(t,(t,i)=>t===e[i])}function N(t,e,i){return t.replace(new RegExp(`${e}|${i}`,"g"),t=>t===e?i:e)}function z(t){return t[t.length-1]}function H(t,e){for(const i in t)if(!1===e(t[i],i))return!1;return!0}function F(t,e){return t.slice().sort(({[e]:t=0},{[e]:i=0})=>t>i?1:i>t?-1:0)}function j(t,e){return t.reduce((t,i)=>t+_(g(e)?e(i):i[e]),0)}function L(t,e){const i=new Set;return t.filter(({[e]:t})=>!i.has(t)&&i.add(t))}function W(t,e){return e.reduce((e,i)=>({...e,[i]:t[i]}),{})}function q(t,e=0,i=1){return Math.min(Math.max(D(t)||0,e),i)}function V(){}function R(...t){return[["bottom","top"],["right","left"]].every(([e,i])=>Math.min(...t.map(({[e]:t})=>t))-Math.max(...t.map(({[i]:t})=>t))>0)}function U(t,e){return t.x<=e.right&&t.x>=e.left&&t.y<=e.bottom&&t.y>=e.top}function Y(t,e,i){const n="width"===e?"height":"width";return{[n]:t[e]?Math.round(i*t[n]/t[e]):t[n],[e]:i}}function X(t,e){t={...t};for(const i in t)t=t[i]>e[i]?Y(t,i,e[i]):t;return t}const J={ratio:Y,contain:X,cover:function(t,e){t=X(t,e);for(const i in t)t=t[i]<e[i]?Y(t,i,e[i]):t;return t}};function G(t,e,i=0,n=!1){e=P(e);const{length:s}=e;return s?(t=C(t)?D(t):"next"===t?i+1:"previous"===t?i-1:"last"===t?s-1:e.indexOf(M(t)),n?q(t,0,s-1):(t%=s)<0?t+s:t):-1}function Z(t){const e=Object.create(null);return(i,...n)=>e[i]||(e[i]=t(i,...n))}function K(t,...e){for(const i of P(t)){const t=nt(e).filter(t=>!et(i,t));t.length&&i.classList.add(...t)}}function Q(t,...e){for(const i of P(t)){const t=nt(e).filter(t=>et(i,t));t.length&&i.classList.remove(...t)}}function tt(t,e,i){i=nt(i),Q(t,e=nt(e).filter(t=>!c(i,t))),K(t,i)}function et(t,e){return[e]=nt(e),P(t).some(t=>t.classList.contains(e))}function it(t,e,i){const n=nt(e);E(i)||(i=!!i);for(const e of P(t))for(const t of n)e.classList.toggle(t,i)}function nt(t){return t?u(t)?t.map(nt).flat():String(t).split(" ").filter(Boolean):[]}function st(t,e,i){var n;if(m(e))for(const i in e)st(t,i,e[i]);else{if(E(i))return null==(n=M(t))?void 0:n.getAttribute(e);for(const n of P(t))g(i)&&(i=i.call(n,st(n,e))),null===i?rt(n,e):n.setAttribute(e,i)}}function ot(t,e){return P(t).some(t=>t.hasAttribute(e))}function rt(t,e){P(t).forEach(t=>t.removeAttribute(e))}function at(t,e){for(const i of[e,`data-${e}`])if(ot(t,i))return st(t,i)}const lt=typeof window<"u",ht=lt&&"rtl"===document.dir,ct=lt&&"ontouchstart"in window,dt=lt&&window.PointerEvent,ut=dt?"pointerdown":ct?"touchstart":"mousedown",ft=dt?"pointermove":ct?"touchmove":"mousemove",pt=dt?"pointerup":ct?"touchend":"mouseup",gt=dt?"pointerenter":ct?"":"mouseenter",mt=dt?"pointerleave":ct?"":"mouseleave",vt=dt?"pointercancel":"touchcancel",bt={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function wt(t){return P(t).some(t=>bt[t.tagName.toLowerCase()])}const $t=lt&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function xt(t){return P(t).some(t=>$t.call(t))}const yt="input,select,textarea,button";function St(t){return P(t).some(t=>Et(t,yt))}const It=`${yt},a[href],[tabindex]`;function kt(t){return Et(t,It)}function Ct(t){var e;return null==(e=M(t))?void 0:e.parentElement}function Tt(t,e){return P(t).filter(t=>Et(t,e))}function Et(t,e){return P(t).some(t=>t.matches(e))}function At(t,e){const i=[];for(;t=Ct(t);)(!e||Et(t,e))&&i.push(t);return i}function Dt(t,e){const i=(t=M(t))?f(t.children):[];return e?Tt(i,e):i}function _t(t,e){return e?P(t).indexOf(M(e)):Dt(Ct(t)).indexOf(t)}function Mt(t){return(t=M(t))&&["origin","pathname","search"].every(e=>t[e]===location[e])}function Pt(t){if(Mt(t)){const{hash:e,ownerDocument:i}=M(t),n=decodeURIComponent(e).slice(1);return i.getElementById(n)||i.getElementsByName(n)[0]}}function Ot(t,e){return Nt(t,Ht(t,e))}function Bt(t,e){return zt(t,Ht(t,e))}function Nt(t,e){return M(Vt(t,M(e),"querySelector"))}function zt(t,e){return P(Vt(t,M(e),"querySelectorAll"))}function Ht(t,e=document){return I(t)&&Lt(t).isContextSelector||w(e)?e:e.ownerDocument}const Ft=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,jt=/(\([^)]*\)|[^,])+/g,Lt=Z(t=>{t=t.replace(Ft,"$1 *");let e=!1;const i=[];for(let n of t.match(jt))n=n.trim(),e||(e=["!","+","~","-",">"].includes(n[0])),i.push(n);return{selector:i.join(","),selectors:i,isContextSelector:e}}),Wt=/(\([^)]*\)|\S)*/,qt=Z(t=>{t=t.slice(1).trim();const[e]=t.match(Wt);return[e,t.slice(e.length+1)]});function Vt(t,e=document,i){if(!t||!I(t))return t;const n=Lt(t);if(!n.isContextSelector)return Rt(e,i,n.selector);t="";const s=1===n.selectors.length;for(let o of n.selectors){let n,r=e;if("!"===o[0]&&([n,o]=qt(o),r=e.parentElement.closest(n),!o&&s)||r&&"-"===o[0]&&([n,o]=qt(o),r=r.previousElementSibling,r=Et(r,n)?r:null,!o&&s))return r;if(r){if(s)return"~"===o[0]||"+"===o[0]?(o=`:scope > :nth-child(${_t(r)+1}) ${o}`,r=r.parentElement):">"===o[0]&&(o=`:scope ${o}`),Rt(r,i,o);t+=`${t?",":""}${Ut(r)} ${o}`}}return w(e)||(e=e.ownerDocument),Rt(e,i,t)}function Rt(t,e,i){try{return t[e](i)}catch{return null}}function Ut(t){const e=[];for(;t.parentNode;){const i=st(t,"id");if(i){e.unshift(`#${Yt(i)}`);break}{let{tagName:i}=t;"HTML"!==i&&(i+=`:nth-child(${_t(t)+1})`),e.unshift(i),t=t.parentNode}}return e.join(" > ")}function Yt(t){return I(t)?CSS.escape(t):""}function Xt(...t){let[e,i,n,s,o=!1]=Qt(t);s.length>1&&(s=function(t){return e=>u(e.detail)?t(e,...e.detail):t(e)}(s)),null!=o&&o.self&&(s=function(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}(s)),n&&(s=function(t,e){return i=>{const n=">"===t[0]?zt(t,i.currentTarget).reverse().find(t=>t.contains(i.target)):i.target.closest(t);n&&(i.current=n,e.call(this,i),delete i.current)}}(n,s));for(const t of i)for(const i of e)i.addEventListener(t,s,o);return()=>Jt(e,i,s,o)}function Jt(...t){let[e,i,,n,s=!1]=Qt(t);for(const t of i)for(const i of e)i.removeEventListener(t,n,s)}function Gt(...t){const[e,i,n,s,o=!1,r]=Qt(t),a=Xt(e,i,n,t=>{const e=!r||r(t);e&&(a(),s(t,e))},o);return a}function Zt(t,e,i){return ie(t).every(t=>t.dispatchEvent(Kt(e,!0,!0,i)))}function Kt(t,e=!0,i=!1,n){return I(t)&&(t=new CustomEvent(t,{bubbles:e,cancelable:i,detail:n})),t}function Qt(t){return t[0]=ie(t[0]),I(t[1])&&(t[1]=t[1].split(" ")),g(t[2])&&t.splice(2,0,!1),t}function te(t){return t&&"addEventListener"in t}function ee(t){return te(t)?t:M(t)}function ie(t){return u(t)?t.map(ee).filter(Boolean):I(t)?zt(t):te(t)?[t]:P(t)}function ne(t){return"touch"===t.pointerType||!!t.touches}function se(t){var e,i;const{clientX:n,clientY:s}=(null==(e=t.touches)?void 0:e[0])||(null==(i=t.changedTouches)?void 0:i[0])||t;return{x:n,y:s}}const oe={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function re(t,e,i,n){const s=P(t);for(const t of s)if(I(e)){if(e=ae(e),E(i))return getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,C(i)&&!oe[e]?`${i}px`:i||k(i)?i:"",n)}else{if(u(e)){const i={};for(const n of e)i[n]=re(t,n);return i}if(m(e))for(const n in e)re(t,n,e[n],i)}return s[0]}const ae=Z(t=>{if(l(t,"--"))return t;t=s(t);const{style:e}=document.documentElement;if(t in e)return t;for(const i of["webkit","moz"]){const n=`-${i}-${t}`;if(n in e)return n}}),le="bdt-transition",he="transitionend",ce="transitioncanceled";const de={start:function(t,e,i=400,n="linear"){return i=Math.round(i),Promise.all(P(t).map(t=>new Promise((s,o)=>{for(const i in e)re(t,i);const r=setTimeout(()=>Zt(t,he),i);Gt(t,[he,ce],({type:e})=>{clearTimeout(r),Q(t,le),re(t,{transitionProperty:"",transitionDuration:"",transitionTimingFunction:""}),e===ce?o():s(t)},{self:!0}),K(t,le),re(t,{transitionProperty:Object.keys(e).map(ae).join(","),transitionDuration:`${i}ms`,transitionTimingFunction:n,...e})})))},async stop(t){Zt(t,he),await Promise.resolve()},async cancel(t){Zt(t,ce),await Promise.resolve()},inProgress:t=>et(t,le)},ue="bdt-animation",fe="animationend",pe="animationcanceled";function ge(t,e,i=200,n,s){return Promise.all(P(t).map(t=>new Promise((o,r)=>{et(t,ue)&&Zt(t,pe);const a=[e,ue,`${ue}-${s?"leave":"enter"}`,n&&`bdt-transform-origin-${n}`,s&&`${ue}-reverse`],l=setTimeout(()=>Zt(t,fe),i);Gt(t,[fe,pe],({type:e})=>{clearTimeout(l),e===pe?r():o(t),re(t,"animationDuration",""),Q(t,a)},{self:!0}),re(t,"animationDuration",`${i}ms`),K(t,a)})))}const me={in:ge,out:(t,e,i,n)=>ge(t,e,i,n,!0),inProgress:t=>et(t,ue),cancel(t){Zt(t,pe)}};function ve(t,...e){return e.some(e=>{var i;return(null==(i=null==t?void 0:t.tagName)?void 0:i.toLowerCase())===e.toLowerCase()})}function be(t){return(t=Pe(t)).innerHTML="",t}function we(t,e){return E(e)?Pe(t).innerHTML:xe(be(t),e)}const $e=Ie("prepend"),xe=Ie("append"),ye=Ie("before"),Se=Ie("after");function Ie(t){return function(e,i){var n;const s=P(I(i)?De(i):i);return null==(n=Pe(e))||n[t](...s),_e(s)}}function ke(t){P(t).forEach(t=>t.remove())}function Ce(t,e){for(e=M(ye(t,e));e.firstElementChild;)e=e.firstElementChild;return xe(e,t),e}function Te(t,e){return P(P(t).map(t=>t.hasChildNodes()?Ce(f(t.childNodes),e):xe(t,e)))}function Ee(t){P(t).map(Ct).filter((t,e,i)=>i.indexOf(t)===e).forEach(t=>t.replaceWith(...t.childNodes))}const Ae=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function De(t){const e=Ae.exec(t);if(e)return document.createElement(e[1]);const i=document.createElement("template");return i.innerHTML=t.trim(),_e(i.content.childNodes)}function _e(t){return t.length>1?t:t[0]}function Me(t,e){if(x(t))for(e(t),t=t.firstElementChild;t;)Me(t,e),t=t.nextElementSibling}function Pe(t,e){return Be(t)?M(De(t)):Nt(t,e)}function Oe(t,e){return Be(t)?P(De(t)):zt(t,e)}function Be(t){return I(t)&&l(t.trim(),"<")}const Ne={width:["left","right"],height:["top","bottom"]};function ze(t){const e=x(t)?M(t).getBoundingClientRect():{height:Le(t),width:We(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function He(t,e){e&&re(t,{left:0,top:0});const i=ze(t);if(t){const{scrollY:e,scrollX:n}=O(t),s={height:e,width:n};for(const t in Ne)for(const e of Ne[t])i[e]+=s[t]}if(!e)return i;for(const n of["left","top"])re(t,n,e[n]-i[n])}function Fe(t){let{top:e,left:i}=He(t);const{ownerDocument:{body:n,documentElement:s},offsetParent:o}=M(t);let r=o||s;for(;r&&(r===n||r===s)&&"static"===re(r,"position");)r=r.parentNode;if(x(r)){const t=He(r);e-=t.top+_(re(r,"borderTopWidth")),i-=t.left+_(re(r,"borderLeftWidth"))}return{top:e-_(re(t,"marginTop")),left:i-_(re(t,"marginLeft"))}}function je(t){const e=[(t=M(t)).offsetTop,t.offsetLeft];for(;t=t.offsetParent;)if(e[0]+=t.offsetTop+_(re(t,"borderTopWidth")),e[1]+=t.offsetLeft+_(re(t,"borderLeftWidth")),"fixed"===re(t,"position")){const i=O(t);return e[0]+=i.scrollY,e[1]+=i.scrollX,e}return e}const Le=qe("height"),We=qe("width");function qe(t){const e=a(t);return(i,n)=>{if(E(n)){if(b(i))return i[`inner${e}`];if(w(i)){const t=i.documentElement;return Math.max(t[`offset${e}`],t[`scroll${e}`])}return(n="auto"===(n=re(i=M(i),t))?i[`offset${e}`]:_(n)||0)-Ve(i,t)}return re(i,t,n||0===n?+n+Ve(i,t)+"px":"")}}function Ve(t,e,i="border-box"){return re(t,"boxSizing")===i?j(Ne[e].map(a),e=>_(re(t,`padding${e}`))+_(re(t,`border${e}Width`))):0}function Re(t){for(const e in Ne)for(const i in Ne[e])if(Ne[e][i]===t)return Ne[e][1-i];return t}function Ue(t,e="width",i=window,n=!1){return I(t)?j(Xe(t),t=>{const s=Ge(t);return s?function(t,e){return t*_(e)/100}("vh"===s?Ze||(Ke||(Ke=Pe("<div>"),re(Ke,{height:"100vh",position:"fixed"}),Xt(window,"resize",()=>Ze=null)),xe(document.body,Ke),Ze=Ke.clientHeight,ke(Ke),Ze):"vw"===s?We(O(i)):n?i[`offset${a(e)}`]:ze(i)[e],t):t}):_(t)}const Ye=/-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g,Xe=Z(t=>t.toString().replace(/\s/g,"").match(Ye)||[]),Je=/(?:v[hw]|%)$/,Ge=Z(t=>(t.match(Je)||[])[0]);let Ze,Ke;const Qe={read:function(t){return ti.push(t),si(),t},write:function(t){return ei.push(t),si(),t},clear:function(t){ri(ti,t),ri(ei,t)},flush:ni},ti=[],ei=[];let ii=!1;function ni(){oi(ti),oi(ei.splice(0)),ii=!1,(ti.length||ei.length)&&si()}function si(){ii||(ii=!0,queueMicrotask(ni))}function oi(t){let e;for(;e=t.shift();)try{e()}catch(t){console.error(t)}}function ri(t,e){const i=t.indexOf(e);return~i&&t.splice(i,1)}class ai{init(){let t;this.positions=[],this.unbind=Xt(document,"mousemove",e=>t=se(e)),this.interval=setInterval(()=>{t&&(this.positions.push(t),this.positions.length>5&&this.positions.shift())},50)}cancel(){var t;null==(t=this.unbind)||t.call(this),clearInterval(this.interval)}movesTo(t){if(!this.positions||this.positions.length<2)return!1;const e=ze(t),{left:i,right:n,top:s,bottom:o}=e,[r]=this.positions,a=z(this.positions),l=[r,a];return!U(a,e)&&[[{x:i,y:s},{x:n,y:o}],[{x:i,y:o},{x:n,y:s}]].some(t=>{const i=function([{x:t,y:e},{x:i,y:n}],[{x:s,y:o},{x:r,y:a}]){const l=(a-o)*(i-t)-(r-s)*(n-e);if(0===l)return!1;const h=((r-s)*(e-o)-(a-o)*(t-s))/l;return!(h<0)&&{x:t+h*(i-t),y:e+h*(n-e)}}(l,t);return i&&U(i,e)})}}function li(t,e,i={},{intersecting:n=!0}={}){const s=new IntersectionObserver(n?(t,i)=>{t.some(t=>t.isIntersecting)&&e(t,i)}:e,i);for(const e of P(t))s.observe(e);return s}const hi=lt&&window.ResizeObserver;function ci(t,e,i={box:"border-box"}){if(hi)return fi(ResizeObserver,t,e,i);const n=[Xt(window,"load resize",e),Xt(document,"loadedmetadata load",e,!0)];return{disconnect:()=>n.map(t=>t())}}function di(t){return{disconnect:Xt([window,window.visualViewport],"resize",t)}}function ui(t,e,i){return fi(MutationObserver,t,e,i)}function fi(t,e,i,n){const s=new t(i);for(const t of P(e))s.observe(t,n);return s}function pi(t){wi(t)&&yi(t,{func:"playVideo",method:"play"}),bi(t)&&t.play().catch(V)}function gi(t){wi(t)&&yi(t,{func:"pauseVideo",method:"pause"}),bi(t)&&t.pause()}function mi(t){wi(t)&&yi(t,{func:"mute",method:"setVolume",value:0}),bi(t)&&(t.muted=!0)}function vi(t){return bi(t)||wi(t)}function bi(t){return ve(t,"video")}function wi(t){return ve(t,"iframe")&&($i(t)||xi(t))}function $i(t){return!!t.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/)}function xi(t){return!!t.src.match(/vimeo\.com\/video\/.*/)}async function yi(t,e){await function(t){if(t[Ii])return t[Ii];const e=$i(t),i=xi(t),n=++ki;let s;return t[Ii]=new Promise(o=>{e&&Gt(t,"load",()=>{const e=()=>Si(t,{event:"listening",id:n});s=setInterval(e,100),e()}),Gt(window,"message",o,!1,({data:t})=>{try{return t=JSON.parse(t),e&&(null==t?void 0:t.id)===n&&"onReady"===t.event||i&&Number(null==t?void 0:t.player_id)===n}catch{}}),t.src=`${t.src}${c(t.src,"?")?"&":"?"}${e?"enablejsapi=1":`api=1&player_id=${n}`}`}).then(()=>clearInterval(s))}(t),Si(t,e)}function Si(t,e){t.contentWindow.postMessage(JSON.stringify({event:"command",...e}),"*")}const Ii="_ukPlayer";let ki=0;function Ci(t,{offset:e=0}={}){const i=xt(t)?Ei(t,!1,["hidden"]):[];return i.reduce((n,s,o)=>{const{scrollTop:r,scrollHeight:a,offsetHeight:l}=s,h=_i(s),c=a-h.height,{height:d,top:u}=i[o-1]?_i(i[o-1]):He(t);let f=Math.ceil(u-h.top-e+r);return e>0&&l<d+e?f+=e:e=0,f>c?(e-=f-c,f=c):f<0&&(e-=f,f=0),()=>function(t,e,n,s){return new Promise(o=>{const r=t.scrollTop,a=function(t){return 40*Math.pow(t,.375)}(Math.abs(e)),l=Date.now(),h=Bi(t)===t,c=He(n).top+(h?0:r);let d=0,u=15;!function f(){const p=function(t){return.5*(1-Math.cos(Math.PI*t))}(q((Date.now()-l)/a));let g=0;i[0]===t&&r+e<s&&(g=He(n).top+(h?0:t.scrollTop)-c-ze(Mi(n)).height),t.scrollTop=r+(e+g)*p,1!==p||d!==g&&u--?(d=g,requestAnimationFrame(f)):o()}()})}(s,f-r,t,c).then(n)},()=>Promise.resolve())()}function Ti(t,e=0,i=0){if(!xt(t))return 0;const n=Ai(t,!0),{scrollHeight:s,scrollTop:o}=n,{height:r}=_i(n),a=s-r,l=je(t)[0]-je(n)[0],h=Math.max(0,l-r+e),c=Math.min(a,l+t.offsetHeight-i);return h<c?q((o-h)/(c-h)):1}function Ei(t,e=!1,i=[]){const n=Bi(t);let s=At(t).reverse();s=s.slice(s.indexOf(n)+1);const o=d(s,t=>"fixed"===re(t,"position"));return~o&&(s=s.slice(o)),[n].concat(s.filter(t=>re(t,"overflow").split(" ").some(t=>c(["auto","scroll",...i],t))&&(!e||t.scrollHeight>_i(t).height))).reverse()}function Ai(...t){return Ei(...t)[0]}function Di(t){return Ei(t,!1,["hidden","clip"])}function _i(t){const e=O(t),i=Bi(t),n=t.contains(i);if(n&&e.visualViewport){let{height:t,width:i,scale:n,pageTop:s,pageLeft:o}=e.visualViewport;return t=Math.round(t*n),i=Math.round(i*n),{height:t,width:i,top:s,left:o,bottom:s+t,right:o+i}}let s=He(n?e:t);if("inline"===re(t,"display"))return s;const{body:o,documentElement:r}=e.document,l=n?i===r||i.clientHeight<o.clientHeight?i:o:t;for(let[t,e,i,n]of[["width","x","left","right"],["height","y","top","bottom"]]){const o=s[t]%1;s[i]+=_(re(l,`border-${i}-width`)),s[t]=s[e]=l[`client${a(t)}`]-(o?o<.5?-o:1-o:0),s[n]=s[t]+s[i]}return s}function Mi(t){const{left:e,width:i,top:n}=ze(t);for(const s of n?[0,n]:[0]){let n;for(const o of O(t).document.elementsFromPoint(e+i/2,s))!o.contains(t)&&!et(o,"bdt-togglable-leave")&&(Oi(o,"fixed")&&Pi(At(t).reverse().find(t=>!t.contains(o)&&!Oi(t,"static")))<Pi(o)||Oi(o,"sticky")&&Ct(o).contains(t))&&(!n||ze(n).height<ze(o).height)&&(n=o);if(n)return n}}function Pi(t){return _(re(t,"zIndex"))}function Oi(t,e){return re(t,"position")===e}function Bi(t){return O(t).document.scrollingElement}const Ni=[["width","x","left","right"],["height","y","top","bottom"]];function zi(t,e,i){i={attach:{element:["left","top"],target:["left","top"],...i.attach},offset:[0,0],placement:[],...i},u(e)||(e=[e,e]),He(t,Hi(t,e,i))}function Hi(t,e,i){const n=Fi(t,e,i),{boundary:s,viewportOffset:o=0,placement:r}=i;let a=n;for(const[l,[h,,c,d]]of Object.entries(Ni)){const u=Wi(t,e[l],o,s,l);if(Ui(n,u,l))continue;let f=0;if("flip"===r[l]){const s=i.attach.target[l];if(s===d&&n[d]<=u[d]||s===c&&n[c]>=u[c])continue;f=Yi(t,e,i,l)[c]-n[c];const r=qi(t,e[l],o,l);if(!Ui(ji(n,f,l),r,l)){if(Ui(n,r,l))continue;if(i.recursion)return!1;const s=Xi(t,e,i);if(s&&Ui(s,r,1-l))return s;continue}}else if("shift"===r[l]){const t=He(e[l]),{offset:s}=i;f=q(q(n[c],u[c],u[d]-n[h]),t[c]-n[h]+s[l],t[d]-s[l])-n[c]}a=ji(a,f,l)}return a}function Fi(t,e,i){let{attach:n,offset:s}={attach:{element:["left","top"],target:["left","top"],...i.attach},offset:[0,0],...i},o=He(t);for(const[t,[i,,r,a]]of Object.entries(Ni)){const l=n.target[t]===n.element[t]?_i(e[t]):He(e[t]);o=ji(o,l[r]-o[r]+Li(n.target[t],a,l[i])-Li(n.element[t],a,o[i])+ +s[t],t)}return o}function ji(t,e,i){const[,n,s,o]=Ni[i],r={...t};return r[s]=t[n]=t[s]+e,r[o]+=e,r}function Li(t,e,i){return"center"===t?i/2:t===e?i:0}function Wi(t,e,i,n,s){let o=Ri(...Vi(t,e).map(_i));return i&&(o[Ni[s][2]]+=i,o[Ni[s][3]]-=i),n&&(o=Ri(o,He(u(n)?n[s]:n))),o}function qi(t,e,i,n){const[s,o,r,l]=Ni[n],[h]=Vi(t,e),c=_i(h);return["auto","scroll"].includes(re(h,`overflow-${o}`))&&(c[r]-=h[`scroll${a(r)}`],c[l]=c[r]+h[`scroll${a(s)}`]),c[r]+=i,c[l]-=i,c}function Vi(t,e){return Di(e).filter(e=>e.contains(t))}function Ri(...t){let e={};for(const i of t)for(const[,,t,n]of Ni)e[t]=Math.max(e[t]||0,i[t]),e[n]=Math.min(...[e[n],i[n]].filter(Boolean));return e}function Ui(t,e,i){const[,,n,s]=Ni[i];return t[n]>=e[n]&&t[s]<=e[s]}function Yi(t,e,{offset:i,attach:n},s){return Fi(t,e,{attach:{element:Ji(n.element,s),target:Ji(n.target,s)},offset:Zi(i,s)})}function Xi(t,e,i){return Hi(t,e,{...i,attach:{element:i.attach.element.map(Gi).reverse(),target:i.attach.target.map(Gi).reverse()},offset:i.offset.reverse(),placement:i.placement.reverse(),recursion:!0})}function Ji(t,e){const i=[...t],n=Ni[e].indexOf(t[e]);return~n&&(i[e]=Ni[e][1-n%2+2]),i}function Gi(t){for(let e=0;e<Ni.length;e++){const i=Ni[e].indexOf(t);if(~i)return Ni[1-e][i%2+2]}}function Zi(t,e){return(t=[...t])[e]*=-1,t}var Ki=Object.freeze({__proto__:null,$:Pe,$$:Oe,Animation:me,Dimensions:J,MouseTracker:ai,Transition:de,addClass:K,after:Se,append:xe,apply:Me,assign:p,attr:st,before:ye,boxModelAdjust:Ve,camelize:r,children:Dt,clamp:q,createEvent:Kt,css:re,data:at,dimensions:ze,each:H,empty:be,endsWith:h,escape:Yt,fastdom:Qe,filter:Tt,find:Nt,findAll:zt,findIndex:d,flipPosition:Re,fragment:De,getCoveringElement:Mi,getEventPos:se,getIndex:G,getTargetedElement:Pt,hasAttr:ot,hasClass:et,hasOwn:i,hasTouch:ct,height:Le,html:we,hyphenate:s,inBrowser:lt,includes:c,index:_t,intersectRect:R,isArray:u,isBoolean:S,isDocument:w,isElement:x,isEmpty:T,isEqual:B,isFocusable:kt,isFunction:g,isInView:function(t,e=0,i=0){return!!xt(t)&&R(...Di(t).map(t=>{const{top:n,left:s,bottom:o,right:r}=_i(t);return{top:n-e,left:s-i,bottom:o+e,right:r+i}}).concat(He(t)))},isInput:St,isNode:$,isNumber:k,isNumeric:C,isObject:m,isPlainObject:v,isRtl:ht,isSameSiteAnchor:Mt,isString:I,isTag:ve,isTouch:ne,isUndefined:E,isVideo:vi,isVisible:xt,isVoidElement:wt,isWindow:b,last:z,matches:Et,memoize:Z,mute:mi,noop:V,observeIntersection:li,observeMutation:ui,observeResize:ci,observeViewportResize:di,off:Jt,offset:He,offsetPosition:je,offsetViewport:_i,on:Xt,once:Gt,overflowParents:Di,parent:Ct,parents:At,pause:gi,pick:W,play:pi,pointInRect:U,pointerCancel:vt,pointerDown:ut,pointerEnter:gt,pointerLeave:mt,pointerMove:ft,pointerUp:pt,position:Fe,positionAt:zi,prepend:$e,propName:ae,query:Ot,queryAll:Bt,ready:function(t){"loading"===document.readyState?Gt(document,"DOMContentLoaded",t):t()},remove:ke,removeAttr:rt,removeClass:Q,replaceClass:tt,scrollIntoView:Ci,scrollParent:Ai,scrollParents:Ei,scrolledOver:Ti,selFocusable:It,selInput:yt,sortBy:F,startsWith:l,sumBy:j,swap:N,toArray:f,toBoolean:A,toEventTargets:ie,toFloat:_,toNode:M,toNodes:P,toNumber:D,toPx:Ue,toWindow:O,toggleClass:it,trigger:Zt,ucfirst:a,uniqueBy:L,unwrap:Ee,width:We,wrapAll:Ce,wrapInner:Te}),Qi={connected(){K(this.$el,this.$options.id)}};const tn=["days","hours","minutes","seconds"];var en={mixins:[Qi],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".bdt-countdown-%unit%",role:"timer"},connected(){st(this.$el,"role",this.role),this.date=_(Date.parse(this.$props.date)),this.end=!1,this.start()},disconnected(){this.stop()},events:{name:"visibilitychange",el:()=>document,handler(){document.hidden?this.stop():this.start()}},methods:{start(){this.stop(),this.update(),this.timer||(Zt(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),Zt(this.$el,"countdownstop"),this.timer=null)},update(){const t=function(t){const e=Math.max(0,t-Date.now())/1e3;return{total:e,seconds:e%60,minutes:e/60%60,hours:e/60/60%24,days:e/60/60/24}}(this.date);t.total||(this.stop(),this.end||(Zt(this.$el,"countdownend"),this.end=!0));for(const e of tn){const i=Pe(this.clsWrapper.replace("%unit%",e),this.$el);if(!i)continue;let n=Math.trunc(t[e]).toString().padStart(2,"0");i.textContent!==n&&(n=n.split(""),n.length!==i.children.length&&we(i,n.map(()=>"<span></span>").join("")),n.forEach((t,e)=>i.children[e].textContent=t))}}}};const nn={};function sn(t,e,i){return nn.computed(g(t)?t.call(i,i):t,g(e)?e.call(i,i):e)}function on(t,e){return t=t&&!u(t)?[t]:t,e?t?t.concat(e):u(e)?e:[e]:t}function rn(t,e){return E(e)?t:e}function an(t,e,n){const s={};if(g(e)&&(e=e.options),e.extends&&(t=an(t,e.extends,n)),e.mixins)for(const i of e.mixins)t=an(t,i,n);for(const e in t)o(e);for(const n in e)i(t,n)||o(n);function o(i){s[i]=(nn[i]||rn)(t[i],e[i],n)}return s}function ln(t,e=[]){try{return t?l(t,"{")?JSON.parse(t):e.length&&!c(t,":")?{[e[0]]:t}:t.split(";").reduce((t,e)=>{const[i,n]=e.split(/:(.*)/);return i&&!E(n)&&(t[i.trim()]=n.trim()),t},{}):{}}catch{return{}}}function hn(t,e){return t===Boolean?A(e):t===Number?D(e):"list"===t?function(t){return u(t)?t:I(t)?t.split(cn).map(t=>C(t)?D(t):A(t.trim())):[t]}(e):t===Object&&I(e)?ln(e):t?t(e):e}nn.events=nn.watch=nn.observe=nn.created=nn.beforeConnect=nn.connected=nn.beforeDisconnect=nn.disconnected=nn.destroy=on,nn.args=function(t,e){return!1!==e&&on(e||t)},nn.update=function(t,e){return F(on(t,g(e)?{read:e}:e),"order")},nn.props=function(t,e){if(u(e)){const t={};for(const i of e)t[i]=String;e=t}return nn.methods(t,e)},nn.computed=nn.methods=function(t,e){return e?t?{...t,...e}:e:t},nn.i18n=nn.data=function(t,e,i){return i?sn(t,e,i):e?t?function(i){return sn(t,e,i)}:e:t};const cn=/,(?![^(]*\))/;function dn(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,Qe.read(()=>{t._connected&&function(t,e){for(const{read:i,write:n,events:s=[]}of t._updates){if(!e.has("update")&&!s.some(t=>e.has(t)))continue;let o;i&&(o=i.call(t,t._data,e),o&&v(o)&&p(t._data,o)),n&&!1!==o&&Qe.write(()=>{t._connected&&n.call(t,t._data,e)})}}(t,t._queued),t._queued=null})),t._queued.add(e.type||e))}function un(t){return wn(ci,t,"resize")}function fn(t){return wn(li,t)}function pn(t){return wn(ui,t)}function gn(t={}){return fn({handler:function(e,i){const{targets:n=this.$el,preload:s=5}=t;for(const t of P(g(n)?n(this):n))Oe('[loading="lazy"]',t).slice(0,s-1).forEach(t=>rt(t,"loading"));for(const t of e.filter(({isIntersecting:t})=>t).map(({target:t})=>t))i.unobserve(t)},...t})}function mn(t){return wn((t,e)=>di(e),t,"resize")}function vn(t){return wn((t,e)=>({disconnect:Xt($n(t),"scroll",e,{passive:!0})}),t,"scroll")}function bn(t){return{observe:(t,e)=>({observe:V,unobserve:V,disconnect:Xt(t,ut,e,{passive:!0})}),handler(t){if(!ne(t))return;const e=se(t),i="tagName"in t.target?t.target:Ct(t.target);Gt(document,`${pt} ${vt} scroll`,t=>{const{x:n,y:s}=se(t);("scroll"!==t.type&&i&&n&&Math.abs(e.x-n)>100||s&&Math.abs(e.y-s)>100)&&setTimeout(()=>{Zt(i,"swipe"),Zt(i,`swipe${function(t,e,i,n){return Math.abs(t-i)>=Math.abs(e-n)?t-i>0?"Left":"Right":e-n>0?"Up":"Down"}(e.x,e.y,n,s)}`)})})},...t}}function wn(t,e,i){return{observe:t,handler(){dn(this,i)},...e}}function $n(t){return P(t).map(t=>{const{ownerDocument:e}=t,i=Ai(t,!0);return i===e.scrollingElement?e:i})}var xn={props:{margin:String,firstColumn:Boolean},data:{margin:"bdt-margin-small-top",firstColumn:"bdt-first-column"},observe:[pn({options:{childList:!0}}),pn({options:{attributes:!0,attributeFilter:["style"]},target:({$el:t})=>[t,...Dt(t)]}),un({target:({$el:t})=>[t,...Dt(t)]})],update:{read(){return{rows:yn(Dt(this.$el))}},write({rows:t}){for(const e of t)for(const i of e)it(i,this.margin,t[0]!==e),it(i,this.firstColumn,e[ht?e.length-1:0]===i)},events:["resize"]}};function yn(t){const e=[[]],i=t.some((e,i)=>i&&t[i-1].offsetParent!==e.offsetParent);for(const n of t){if(!xt(n))continue;const t=Sn(n,i);for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o[0]){o.push(n);break}const r=Sn(o[0],i);if(t.top>=r.bottom-1&&t.top!==r.top){e.push([n]);break}if(t.bottom-1>r.top||t.top===r.top){let e=o.length-1;for(;e>=0;e--){const n=Sn(o[e],i);if(t.left>=n.left)break}o.splice(e+1,0,n);break}if(0===s){e.unshift([n]);break}}}return e}function Sn(t,e=!1){let{offsetTop:i,offsetLeft:n,offsetHeight:s,offsetWidth:o}=t;return e&&([i,n]=je(t)),{top:i,left:n,bottom:i+s,right:n+o}}async function In(t,e,i){await Tn();let n=Dt(e);const s=n.map(t=>kn(t,!0)),o={...re(e,["height","padding"]),display:"block"},r=n.concat(e);await Promise.all(r.map(de.cancel)),re(r,"transitionProperty","none"),await t(),n=n.concat(Dt(e).filter(t=>!c(n,t))),await Promise.resolve(),re(r,"transitionProperty","");const a=st(e,"style"),l=re(e,["height","padding"]),[h,d]=function(t,e,i){const n=e.map((t,e)=>!(!Ct(t)||!(e in i))&&(i[e]?xt(t)?Cn(t):{opacity:0}:{opacity:xt(t)?1:0})),s=n.map((n,s)=>{const o=Ct(e[s])===t&&(i[s]||kn(e[s]));if(!o)return!1;if(n){if(!("opacity"in n)){const{opacity:t}=o;t%1?n.opacity=1:delete o.opacity}}else delete o.opacity;return o});return[n,s]}(e,n,s),u=n.map(t=>({style:st(t,"style")}));n.forEach((t,e)=>d[e]&&re(t,d[e])),re(e,o),Zt(e,"scroll"),await Tn();const f=n.map((t,n)=>Ct(t)===e&&de.start(t,h[n],i,"ease")).concat(de.start(e,l,i,"ease"));try{await Promise.all(f),n.forEach((t,i)=>{st(t,u[i]),Ct(t)===e&&re(t,"display",0===h[i].opacity?"none":"")}),st(e,"style",a)}catch{st(n,"style",""),function(t,e){for(const i in e)re(t,i,"")}(e,o)}}function kn(t,e){const i=re(t,"zIndex");return!!xt(t)&&{display:"",opacity:e?re(t,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===i?_t(t):i,...Cn(t)}}function Cn(t){const{height:e,width:i}=ze(t);return{height:e,width:i,transform:"",...Fe(t),...re(t,["marginTop","marginLeft"])}}function Tn(){return new Promise(t=>requestAnimationFrame(t))}const En="bdt-transition-leave",An="bdt-transition-enter";function Dn(t,e,i,n=0){const s=_n(e,!0),o={opacity:1},r={opacity:0},a=t=>()=>s===_n(e)?t():Promise.reject(),l=a(async()=>{K(e,En),await Promise.all(Pn(e).map((t,e)=>new Promise(s=>setTimeout(()=>de.start(t,r,i/2,"ease").then(s),e*n)))),Q(e,En)}),h=a(async()=>{const a=Le(e);K(e,An),t(),re(Dt(e),{opacity:0}),await Tn();const l=Dt(e),h=Le(e);re(e,"alignContent","flex-start"),Le(e,a);const c=Pn(e);re(l,r);const d=c.map(async(t,e)=>{await function(t){return new Promise(e=>setTimeout(e,t))}(e*n),await de.start(t,o,i/2,"ease")});a!==h&&d.push(de.start(e,{height:h},i/2+c.length*n,"ease")),await Promise.all(d).then(()=>{Q(e,An),s===_n(e)&&(re(e,{height:"",alignContent:""}),re(l,{opacity:""}),delete e.dataset.transition)})});return et(e,En)?Mn(e).then(h):et(e,An)?Mn(e).then(l).then(h):l().then(h)}function _n(t,e){return e&&(t.dataset.transition=1+_n(t)),D(t.dataset.transition)||0}function Mn(t){return Promise.all(Dt(t).filter(de.inProgress).map(t=>new Promise(e=>Gt(t,"transitionend transitioncanceled",e))))}function Pn(t){return yn(Dt(t)).flat().filter(xt)}var On={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(t,e=this.$el){const i=this.animation;return("fade"===i?Dn:"delayed-fade"===i?(...t)=>Dn(...t,40):i?In:()=>(t(),Promise.resolve()))(t,e,this.duration).catch(V)}}};const Bn=9,Nn=27,zn=32,Hn=35,Fn=36,jn=37,Ln=38,Wn=39,qn=40;var Vn={mixins:[On],args:"target",props:{target:String,selActive:Boolean},data:{target:"",selActive:!1,attrItem:"bdt-filter-control",cls:"bdt-active",duration:250},computed:{children:({target:t},e)=>Oe(`${t} > *`,e),toggles:({attrItem:t},e)=>Oe(`[${t}],[data-${t}]`,e)},watch:{toggles(t){this.updateState();const e=Oe(this.selActive,this.$el);for(const i of t){!1!==this.selActive&&it(i,this.cls,c(e,i));const t=Xn(i);ve(t,"a")&&st(t,"role","button")}},children(t,e){e&&this.updateState()}},events:{name:"click keydown",delegate:({attrItem:t})=>`[${t}],[data-${t}]`,handler(t){"keydown"===t.type&&t.keyCode!==zn||t.target.closest("a,button")&&(t.preventDefault(),this.apply(t.current))}},methods:{apply(t){const e=this.getState(),i=Un(t,this.attrItem,this.getState());(function(t,e){return["filter","sort"].every(i=>B(t[i],e[i]))})(e,i)||this.setState(i)},getState(){return this.toggles.filter(t=>et(t,this.cls)).reduce((t,e)=>Un(e,this.attrItem,t),{filter:{"":""},sort:[]})},async setState(t,e=!0){t={filter:{"":""},sort:[],...t},Zt(this.$el,"beforeFilter",[this,t]);for(const e of this.toggles)it(e,this.cls,Yn(e,this.attrItem,t));await Promise.all(Oe(this.target,this.$el).map(i=>{const n=()=>function(t,e,i){const n=Object.values(t.filter).join("");for(const t of i)re(t,"display",n&&!Et(t,n)?"none":"");const[s,o]=t.sort;if(s){const t=function(t,e,i){return[...t].sort((t,n)=>at(t,e).localeCompare(at(n,e),void 0,{numeric:!0})*("asc"===i||-1))}(i,s,o);B(t,i)||xe(e,t)}}(t,i,Dt(i));return e?this.animate(n,i):n()})),Zt(this.$el,"afterFilter",[this])},updateState(){Qe.write(()=>this.setState(this.getState(),!1))}}};function Rn(t,e){return ln(at(t,e),["filter"])}function Un(t,e,i){const{filter:n,group:s,sort:o,order:r="asc"}=Rn(t,e);return(n||E(o))&&(s?n?(delete i.filter[""],i.filter[s]=n):(delete i.filter[s],(T(i.filter)||""in i.filter)&&(i.filter={"":n||""})):i.filter={"":n||""}),E(o)||(i.sort=[o,r]),i}function Yn(t,e,{filter:i={"":""},sort:[n,s]}){const{filter:o="",group:r="",sort:a,order:l="asc"}=Rn(t,e);return E(a)?r in i&&o===i[r]||!o&&r&&!(r in i)&&!i[""]:n===a&&s===l}function Xn(t){return Pe("a,button",t)||t}let Jn;function Gn(t){const e=Xt(t,"touchstart",e=>{if(1!==e.targetTouches.length||Et(e.target,'input[type="range"'))return;let i=se(e).y;const n=Xt(t,"touchmove",e=>{const n=se(e).y;n!==i&&(i=n,Ei(e.target).some(e=>{if(!t.contains(e))return!1;let{scrollHeight:i,clientHeight:n}=e;return n<i})||e.preventDefault())},{passive:!1});Gt(t,"scroll touchend touchcanel",n,{capture:!0})},{passive:!0});if(Jn)return e;Jn=!0;const{scrollingElement:i}=document;return re(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:We(window)-i.clientWidth||""}),()=>{Jn=!1,e(),re(i,{overflowY:"",touchAction:"",paddingRight:""})}}var Zn={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return!0===t&&this.$container||t&&Pe(t)}}},Kn={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"bdt-togglable-enter",clsLeave:"bdt-togglable-leave"},computed:{hasAnimation:({animation:t})=>!!t[0],hasTransition:({animation:t})=>["slide","reveal"].some(e=>l(t[0],e))},methods:{async toggleElement(t,e,i){try{return await Promise.all(P(t).map(t=>{const n=S(e)?e:!this.isToggled(t);if(!Zt(t,"before"+(n?"show":"hide"),[this]))return Promise.reject();const s=(g(i)?i:!1!==i&&this.hasAnimation?this.hasTransition?ts:es:Qn)(t,n,this),o=n?this.clsEnter:this.clsLeave;K(t,o),Zt(t,n?"show":"hide",[this]);const r=()=>{Q(t,o),Zt(t,n?"shown":"hidden",[this])};return s?s.then(r,()=>(Q(t,o),Promise.reject())):r()})),!0}catch{return!1}},isToggled(t=this.$el){return!!et(t=M(t),this.clsEnter)||!et(t,this.clsLeave)&&(this.cls?et(t,this.cls.split(" ")[0]):xt(t))},_toggle(t,e){if(!t)return;let i;e=!!e,this.cls?(i=c(this.cls," ")||e!==et(t,this.cls),i&&it(t,this.cls,c(this.cls," ")?void 0:e)):(i=e===t.hidden,i&&(t.hidden=!e)),Oe("[autofocus]",t).some(t=>xt(t)?t.focus()||!0:t.blur()),i&&Zt(t,"toggled",[e,this])}}};function Qn(t,e,{_toggle:i}){return me.cancel(t),de.cancel(t),i(t,e)}async function ts(t,e,{animation:i,duration:n,velocity:s,transition:o,_toggle:r}){var a;const[l="reveal",h="top"]=(null==(a=i[0])?void 0:a.split("-"))||[],d=[["left","right"],["top","bottom"]],u=d[c(d[0],h)?0:1],f=u[1]===h,p=["width","height"][d.indexOf(u)],g=`margin-${u[0]}`,m=`margin-${h}`;let v=ze(t)[p];const b=de.inProgress(t);await de.cancel(t),e&&r(t,!0);const w=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",g,m].map(e=>[e,t.style[e]])),$=ze(t),x=_(re(t,g)),y=_(re(t,m)),S=$[p]+y;!b&&!e&&(v+=y);const[I]=Te(t,"<div>");re(I,{boxSizing:"border-box",height:$.height,width:$.width,...re(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",m])}),re(t,{padding:0,border:0,minWidth:0,minHeight:0,[m]:0,width:$.width,height:$.height,overflow:"hidden",[p]:v});const k=v/S;n=(s*S+n)*(e?1-k:k);const C={[p]:e?S:0};f&&(re(t,g,S-v+x),C[g]=e?x:S+x),!f^"reveal"===l&&(re(I,g,-S+v),de.start(I,{[g]:e?0:-S},n,o));try{await de.start(t,C,n,o)}finally{re(t,w),Ee(I.firstChild),e||r(t,!1)}}function es(t,e,i){const{animation:n,duration:s,_toggle:o}=i;return e?(o(t,!0),me.in(t,n[0],s,i.origin)):me.out(t,n[1]||n[0],s,i.origin).then(()=>o(t,!1))}const is=[];var ns={mixins:[Qi,Zn,Kn],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"bdt-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel:({selPanel:t},e)=>Pe(t,e),transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){st(this.panel||this.$el,"role",this.role),this.overlay&&st(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){c(is,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate:({selClose:t})=>`${t},a[href*="#"]`,handler(t){const{current:e,defaultPrevented:i}=t,{hash:n}=e;!i&&n&&Mt(e)&&!this.$el.contains(Pe(n))?this.hide():Et(e,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===c(is,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(c(is,this))return!1;!this.stack&&is.length?(Promise.all(is.map(t=>t.hide())).then(this.show),t.preventDefault()):is.push(this)}},{name:"show",self:!0,handler(){this.stack&&re(this.$el,"zIndex",_(re(this.$el,"zIndex"))+is.length);const t=[this.overlay&&os(this),this.overlay&&Gn(this.$el),this.bgClose&&rs(this),this.escClose&&as(this)];Gt(this.$el,"hidden",()=>t.forEach(t=>t&&t()),{self:!0}),K(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){kt(this.$el)||st(this.$el,"tabindex","-1"),Et(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){c(is,this)&&is.splice(is.indexOf(this),1),re(this.$el,"zIndex",""),is.some(t=>t.clsPage===this.clsPage)||Q(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&Ct(this.$el)!==this.container?(xe(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,ss)},hide(){return this.toggleElement(this.$el,!1,ss)}}};function ss(t,e,{transitionElement:i,_toggle:n}){return new Promise((s,o)=>Gt(t,"show hide",()=>{var r;null==(r=t._reject)||r.call(t),t._reject=o,n(t,e);const a=Gt(i,"transitionstart",()=>{Gt(i,"transitionend transitioncancel",s,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{a(),s()},function(t){return t?h(t,"ms")?_(t):1e3*_(t):0}(re(i,"transitionDuration")))})).then(()=>delete t._reject)}function os(t){return Xt(document,"focusin",e=>{z(is)===t&&!t.$el.contains(e.target)&&t.$el.focus()})}function rs(t){return Xt(document,ut,({target:e})=>{z(is)!==t||t.overlay&&!t.$el.contains(e)||t.panel.contains(e)||Gt(document,`${pt} ${vt} scroll`,({defaultPrevented:i,type:n,target:s})=>{!i&&n===pt&&e===s&&t.hide()},!0)})}function as(t){return Xt(document,"keydown",e=>{27===e.keyCode&&z(is)===t&&t.hide()})}var ls={slide:{show:t=>[{transform:cs(-100*t)},{transform:cs()}],percent:t=>hs(t),translate:(t,e)=>[{transform:cs(-100*e*t)},{transform:cs(100*e*(1-t))}]}};function hs(t){return Math.abs(new DOMMatrix(re(t,"transform")).m41/t.offsetWidth)}function cs(t=0,e="%"){return`translate3d(${t+=t?e:""}, 0, 0)`}function ds(t){return`scale3d(${t}, ${t}, 1)`}function us(t,e,i){Zt(t,Kt(e,!1,!1,i))}function fs(){let t;return{promise:new Promise(e=>t=e),resolve:t}}var ps={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,s;let o=0;return(null==(s=(null==(i=this.i18n)?void 0:i[t])||(null==(n=this.$options.i18n)?void 0:n[t]))?void 0:s.replace(/%s/g,()=>e[o++]||""))||""}}},gs={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){st(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){st(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter:({autoplay:t})=>t,handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&Et(this.$el,":focus-within")&&!Et(this.$el,":focus")||this.pauseOnHover&&Et(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const ms={passive:!1,capture:!0},vs={passive:!0,capture:!0},bs="touchmove mousemove",ws="touchend touchcancel mouseup click input scroll",$s=t=>t.preventDefault();var xs={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=t=>{const i=se(t).x*(ht?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,e(t)}}},events:[{name:"touchstart mousedown",passive:!0,delegate:({selList:t})=>`${t} > *`,handler(t){!this.draggable||this.parallax||!ne(t)&&function(t){return"none"!==re(t,"userSelect")&&f(t.childNodes).some(t=>3===t.nodeType&&t.textContent.trim())}(t.target)||t.target.closest(yt)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:bs,el:({list:t})=>t,handler:V,...ms}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,Xt(document,bs,this.move,ms),Xt(document,ws,this.end,vs),re(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(0===e||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;this.dragging||Xt(this.list,"click",$s,ms),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;let{slides:i,prevIndex:n}=this,s=Math.abs(e),o=this.getIndex(n+this.dir),r=ys.call(this,n,o);for(;o!==n&&s>r;)this.drag-=r*this.dir,n=o,s-=r,o=this.getIndex(n+this.dir),r=ys.call(this,n,o);this.percent=s/r;const a=i[n],l=i[o],h=this.index!==o,d=n===o;let u;for(const t of[this.index,this.prevIndex])c([o,n],t)||(Zt(i[t],"itemhidden",[this]),d&&(u=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||u)&&Zt(i[this.index],"itemshown",[this]),h&&(this.prevIndex=n,this.index=o,d||(Zt(a,"beforeitemhide",[this]),Zt(a,"itemhide",[this])),Zt(l,"beforeitemshow",[this]),Zt(l,"itemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!d&&l)},end(){if(Jt(document,bs,this.move,ms),Jt(document,ws,this.end,vs),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(ht?this.dir*(ht?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}setTimeout(()=>Jt(this.list,"click",$s,ms)),re(this.list,{userSelect:""}),this.drag=this.percent=null}}};function ys(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}function Ss(t,e,i){t._watches.push({name:i,...v(e)?e:{handler:e}})}const Is={subtree:!0,childList:!0};function ks(t,e,n){t._hasComputed=!0,Object.defineProperty(t,e,{enumerable:!0,get(){const{_computed:s,$props:o,$el:r}=t;if(!i(s,e)&&(s[e]=(n.get||n).call(t,o,r),n.observe&&t._computedObserver)){const e=n.observe.call(t,o);t._computedObserver.observe(["~","+","-"].includes(e[0])?r.parentElement:r.getRootNode(),Is)}return s[e]},set(i){const{_computed:s}=t;s[e]=n.set?n.set.call(t,i):i,E(s[e])&&delete s[e]}})}function Cs(t){t._hasComputed&&(function(t,e){t._updates.unshift(e)}(t,{read:()=>function(t,e){for(const{name:n,handler:s,immediate:o=!0}of t._watches)(t._initial&&o||i(e,n)&&!B(e[n],t[n]))&&s.call(t,t[n],e[n]);t._initial=!1}(t,Ts(t)),events:["resize","computed"]}),t._computedObserver=ui(t.$el,()=>dn(t,"computed"),Is))}function Ts(t){const e={...t._computed};return t._computed={},e}function Es(t,e,i){let{name:n,el:s,handler:o,capture:r,passive:a,delegate:l,filter:h,self:c}=v(e)?e:{name:i,handler:e};s=g(s)?s.call(t,t):s||t.$el,!(!s||u(s)&&!s.length||h&&!h.call(t,t))&&t._events.push(Xt(s,n,l?I(l)?l:l.call(t,t):null,I(o)?t[o]:o.bind(t),{passive:a,capture:r,self:c}))}function As(t,...e){t._observers.push(...e)}function Ds(t,e){let{observe:n,target:s=t.$el,handler:o,options:r,filter:a,args:l}=e;if(a&&!a.call(t,t))return;const h=`_observe${t._observers.length}`;g(s)&&!i(t,h)&&ks(t,h,()=>{const e=s.call(t,t);return u(e)?P(e):e}),o=I(o)?t[o]:o.bind(t),g(r)&&(r=r.call(t,t));const c=n(i(t,h)?t[h]:s,o,r,l);g(s)&&u(t[h])&&Ss(t,{handler:_s(c,r),immediate:!1},h),As(t,c)}function _s(t,e){return(i,n)=>{for(const e of n)c(i,e)||(t.unobserve?t.unobserve(e):t.observe&&t.disconnect());for(const s of i)(!c(n,s)||!t.unobserve)&&t.observe(s,e)}}function Ms(t){const e={},{args:i=[],props:n={},el:o,id:a}=t;if(!n)return e;for(const t in n){const i=s(t);let r=at(o,i);E(r)||(r=n[t]===Boolean&&""===r||hn(n[t],r),("target"!==i||!l(r,"_"))&&(e[t]=r))}const h=ln(at(o,a),i);for(const t in h){const i=r(t);E(n[i])||(e[i]=hn(n[i],h[t]))}return e}const Ps=Z((t,e)=>{const i=Object.keys(e),n=i.concat(t).map(t=>[s(t),`data-${s(t)}`]).flat();return{attributes:i,filter:n}});function Os(t,e){var i;null==(i=t.$options[e])||i.forEach(e=>e.call(t))}function Bs(t){t._connected||(function(t){const{$options:e,$props:n}=t,s=Ms(e);p(n,s);const{computed:o,methods:r}=e;for(let e in n)e in s&&(!o||!i(o,e))&&(!r||!i(r,e))&&(t[e]=n[e])}(t),Os(t,"beforeConnect"),t._connected=!0,function(t){t._events=[];for(const e of t.$options.events||[])if(i(e,"handler"))Es(t,e);else for(const i in e)Es(t,e[i],i)}(t),function(t){t._data={},t._updates=[...t.$options.update||[]]}(t),function(t){t._watches=[];for(const e of t.$options.watch||[])for(const[i,n]of Object.entries(e))Ss(t,n,i);t._initial=!0}(t),function(t){t._observers=[];for(const e of t.$options.observe||[])Ds(t,e)}(t),function(t){const{$options:e,$props:i}=t,{id:n,props:s,el:o}=e;if(!s)return;const{attributes:a,filter:l}=Ps(n,s),h=new MutationObserver(s=>{const o=Ms(e);s.some(({attributeName:t})=>{const e=t.replace("data-","");return(e===n?a:[r(e),r(t)]).some(t=>!E(o[t])&&o[t]!==i[t])})&&t.$reset()});h.observe(o,{attributes:!0,attributeFilter:l}),As(t,h)}(t),Cs(t),Os(t,"connected"),dn(t))}function Ns(t){t._connected&&(Os(t,"beforeDisconnect"),function(t){t._events.forEach(t=>t()),delete t._events}(t),function(t){t._data=null}(t),function(t){for(const e of t._observers)e.disconnect()}(t),function(t){var e;null==(e=t._computedObserver)||e.disconnect(),delete t._computedObserver,Ts(t)}(t),Os(t,"disconnected"),t._connected=!1)}let zs=0;function Hs(t,e={}){e.data=function({data:t={}},{args:e=[],props:i={}}){u(t)&&(t=t.slice(0,e.length).reduce((t,i,n)=>(v(i)?p(t,i):t[e[n]]=i,t),{}));for(const e in t)E(t[e])?delete t[e]:i[e]&&(t[e]=hn(i[e],t[e]));return t}(e,t.constructor.options),t.$options=an(t.constructor.options,e,t),t.$props={},t._uid=zs++,function(t){const{data:e={}}=t.$options;for(const i in e)t.$props[i]=t[i]=e[i]}(t),function(t){const{methods:e}=t.$options;if(e)for(const i in e)t[i]=e[i].bind(t)}(t),function(t){const{computed:e}=t.$options;if(t._computed={},e)for(const i in e)ks(t,i,e[i])}(t),Os(t,"created"),e.el&&t.$mount(e.el)}const Fs=function(t){Hs(this,t)};Fs.util=Ki,Fs.options={},Fs.version="3.21.7";const js="__uikit__",Ls={};function Ws(t,e){var i,n;const o="bdt-"+s(t);if(!e)return Ls[o].options||(Ls[o]=Fs.extend(Ls[o])),Ls[o];t=r(t),Fs[t]=(e,i)=>qs(t,e,i);const a=null!=(i=e.options)?i:{...e};return a.id=o,a.name=t,null==(n=a.install)||n.call(a,Fs,a,t),Fs._initialized&&!a.functional&&requestAnimationFrame(()=>qs(t,`[${o}],[data-${o}]`)),Ls[o]=a}function qs(t,e,i,...n){const s=Ws(t);return s.options.functional?new s({data:v(e)?e:[e,i,...n]}):e?Oe(e).map(o)[0]:o();function o(e){const n=Rs(e,t);if(n){if(!i)return n;n.$destroy()}return new s({el:e,data:i})}}function Vs(t){return(null==t?void 0:t[js])||{}}function Rs(t,e){return Vs(t)[e]}function Us(t,e){t=t?M(t):document.body;for(const i of At(t).reverse())Ys(i,e);Me(t,t=>Ys(t,e))}function Ys(t,e){const i=Vs(t);for(const t in i)dn(i[t],e)}let Xs=1;function Js(t,e=null){return(null==e?void 0:e.id)||`${t.$options.id}-${Xs++}`}var Gs={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav:({selNav:t},e)=>Pe(t,e),navChildren(){return Dt(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return Oe(this.selNavItem,e)}},watch:{nav(t,e){st(t,"role","tablist"),this.padNavitems(),e&&this.$emit()},list(t){ve(t,"ul")&&st(t,"role","presentation")},navChildren(t){st(t,"role","presentation"),this.padNavitems(),this.updateNav()},navItems(t){for(const e of t){const t=at(e,this.attrItem),i=Pe("a,button",e)||e;let n,s=null;if(C(t)){const e=D(t),o=this.slides[e];o&&(o.id||(o.id=Js(this,o)),s=o.id),n=this.t("slideX",_(t)+1),st(i,"role","tab")}else this.list&&(this.list.id||(this.list.id=Js(this,this.list)),s=this.list.id),n=this.t(t);st(i,{"aria-controls":s,"aria-label":st(i,"aria-label")||n})}},slides(t){t.forEach((t,e)=>st(t,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",e+1,this.length),"aria-roledescription":this.nav?null:"slide"})),this.padNavitems()}},connected(){st(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate:({selNavItem:t})=>t,filter:({parallax:t})=>!t,handler(t){t.target.closest("a,button")&&("click"===t.type||t.keyCode===zn)&&(t.preventDefault(),this.show(at(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate:({selNavItem:t})=>t,filter:({parallax:t})=>!t,handler(t){const{current:e,keyCode:i}=t;if(!C(at(e,this.attrItem)))return;let n=i===Fn?0:i===Hn?"last":i===jn?"previous":i===Wn?"next":-1;~n&&(t.preventDefault(),this.show(n))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=at(e,this.attrItem),n=Pe("a,button",e)||e;if(C(i)){const s=D(i)===t;it(e,this.clsActive,s),it(n,"bdt-disabled",this.parallax),st(n,{"aria-selected":s,tabindex:s&&!this.parallax?null:-1}),s&&n&&Et(Ct(e),":focus-within")&&n.focus()}else it(e,"bdt-invisible",this.finite&&("previous"===i&&0===t||"next"===i&&t>=this.maxIndex))}},padNavitems(){if(!this.nav)return;const t=[];for(let e=0;e<this.length;e++){const i=`${this.attrItem}="${e}"`;t[e]=this.navChildren.findLast(t=>t.matches(`[${i}]`))||Pe(`<li ${i}><a href></a></li>`)}B(t,this.navChildren)||we(this.nav,t)}}};var Zs={mixins:[gs,xs,Gs,ps],props:{clsActivated:String,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"bdt-active",clsActivated:"",clsEnter:"bdt-slide-enter",clsLeave:"bdt-slide-leave",clsSlideActive:"bdt-slide-active",Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){Q(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>Ks(e.offsetWidth/t),list:({selList:t},e)=>Pe(t,e),maxIndex(){return this.length-1},slides(){return Dt(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},events:{itemshow({target:t}){K(t,this.clsEnter,this.clsSlideActive)},itemshown({target:t}){Q(t,this.clsEnter)},itemhide({target:t}){K(t,this.clsLeave)},itemhidden({target:t}){Q(t,this.clsLeave,this.clsSlideActive)}},methods:{show(t,e=!1){var i;if(this.dragging||!this.length||this.parallax)return;const{stack:n}=this,s=e?0:n.length,o=()=>{n.splice(s,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1)return void(2===n.length&&(null==(i=this._transitioner)||i.forward(Math.min(this.duration,200))));const r=this.getIndex(this.index),a=et(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(t,this.index),h=this.slides[l];if(a===h)return void o();if(this.dir=function(t,e){return"next"===t?1:"previous"===t||t<e?-1:1}(t,r),this.prevIndex=r,this.index=l,a&&!Zt(a,"beforeitemhide",[this])||!Zt(h,"beforeitemshow",[this,a]))return this.index=this.prevIndex,void o();const c=this._show(a,h,e).then(()=>{a&&Zt(a,"itemhidden",[this]),Zt(h,"itemshown",[this]),n.shift(),this._transitioner=null,n.length&&requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&Zt(a,"itemhide",[this]),Zt(h,"itemshow",[this]),c},getIndex(t=this.index,e=this.index){return q(G(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},async _show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!t)return void this._translate(1);const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e!==i&&e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(k(t)?this.slides[t]:t,k(e)?this.slides[e]:e,i*(ht?-1:1),n)}}};function Ks(t){return.5*t+300}var Qs={mixins:[Zs],props:{animation:String},data:{animation:"slide",clsActivated:"bdt-transition-active",Animations:ls,Transitioner:function(t,e,i,{animation:n,easing:s}){const{percent:o,translate:r,show:a=V}=n,l=a(i),{promise:h,resolve:c}=fs();return{dir:i,show(n,o=0,r){const a=r?"linear":s;return n-=Math.round(n*q(o,-1,1)),this.translate(o),us(e,"itemin",{percent:o,duration:n,timing:a,dir:i}),us(t,"itemout",{percent:1-o,duration:n,timing:a,dir:i}),Promise.all([de.start(e,l[1],n,a),de.start(t,l[0],n,a)]).then(()=>{this.reset(),c()},V),h},cancel:()=>de.cancel([e,t]),reset(){for(const i in l[0])re([e,t],i,"")},async forward(t,e=this.percent()){return await this.cancel(),this.show(t,e,!0)},translate(n){this.reset();const s=r(n,i);re(e,s[1]),re(t,s[0]),us(e,"itemtranslatein",{percent:n,dir:i}),us(t,"itemtranslateout",{percent:1-n,dir:i})},percent:()=>o(t||e,e,i),getDistance:()=>null==t?void 0:t.offsetWidth}}},computed:{animation:({animation:t,Animations:e})=>({...e[t]||e.slide,name:t}),transitionOptions(){return{animation:this.animation}}},observe:un(),events:{beforeitemshow({target:t}){K(t,this.clsActive)},itemshown({target:t}){K(t,this.clsActivated)},itemhidden({target:t}){Q(t,this.clsActive,this.clsActivated)}}},to={...ls,fade:{show:()=>[{opacity:0},{opacity:1}],percent:t=>1-re(t,"opacity"),translate:t=>[{opacity:1-t},{opacity:t}]},scale:{show:()=>[{opacity:0,transform:ds(.8)},{opacity:1,transform:ds(1)}],percent:t=>1-re(t,"opacity"),translate:t=>[{opacity:1-t,transform:ds(1-.2*t)},{opacity:t,transform:ds(.8+.2*t)}]}},eo={mixins:[ns,Qs],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"bdt-open",clsPage:"bdt-lightbox-page",selList:".bdt-lightbox-items",attrItem:"bdt-lightbox-item",selClose:".bdt-close-large",selCaption:".bdt-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:to,template:'<div class="bdt-lightbox bdt-overflow-hidden"> <div class="bdt-lightbox-items"></div> <div class="bdt-lightbox-toolbar bdt-position-top bdt-text-right bdt-transition-slide-top bdt-transition-opaque"> <button class="bdt-lightbox-toolbar-icon bdt-close-large" type="button" bdt-close></button> </div> <a class="bdt-lightbox-button bdt-position-center-left bdt-position-medium bdt-transition-fade" href bdt-slidenav-previous bdt-lightbox-item="previous"></a> <a class="bdt-lightbox-button bdt-position-center-right bdt-position-medium bdt-transition-fade" href bdt-slidenav-next bdt-lightbox-item="next"></a> <div class="bdt-lightbox-toolbar bdt-lightbox-caption bdt-position-bottom bdt-text-center bdt-transition-slide-bottom bdt-transition-opaque"></div> </div>'}),created(){const t=Pe(this.template),e=Pe(this.selList,t);this.items.forEach(()=>xe(e,"<div>"));const i=Pe("[bdt-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(xe(this.container,t))},events:[{name:`${ft} ${ut} keydown`,handler:"showControls"},{name:"click",self:!0,delegate:({selList:t})=>`${t} > *`,handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler:"showControls"},{name:"hide",self:!0,handler(){this.hideControls(),Q(this.slides,this.clsActive),de.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el:()=>document,handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let e=-1;t===jn?e="previous":t===Wn?e="next":t===Fn?e=0:t===Hn&&(e="last"),~e&&this.show(e)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=to.scale,Q(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){we(Pe(this.selCaption,this.$el),this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,e){const{source:i,type:n,alt:s="",poster:o,attrs:r={}}=e;if(this.setItem(e,"<span bdt-spinner></span>"),!i)return;let a;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","bdt-responsive":"","bdt-video":`${this.videoAutoplay}`};if("image"===n||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const t=io("img",{src:i,alt:s,...r});Xt(t,"load",()=>this.setItem(e,t)),Xt(t,"error",()=>this.setError(e))}else if("video"===n||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const t=io("video",{src:i,poster:o,controls:"",playsinline:"","bdt-video":`${this.videoAutoplay}`,...r});Xt(t,"loadedmetadata",()=>this.setItem(e,t)),Xt(t,"error",()=>this.setError(e))}else if("iframe"===n||i.match(/\.(html|php)($|\?)/i))this.setItem(e,io("iframe",{src:i,allowfullscreen:"",class:"bdt-lightbox-iframe",...r}));else if(a=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(e,io("iframe",{src:`https://www.youtube${a[1]||""}.com/embed/${a[2]}${a[3]?`?${a[3]}`:""}`,width:1920,height:1080,...l,...r}));else if(a=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:t,width:n}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(e,io("iframe",{src:`https://player.vimeo.com/video/${a[1]}${a[2]?`?${a[2]}`:""}`,width:n,height:t,...l,...r}))}catch{this.setError(e)}}}],methods:{loadItem(t=this.index){const e=this.getItem(t);this.getSlide(e).childElementCount||Zt(this.$el,"itemload",[e])},getItem(t=this.index){return this.items[G(t,this.slides)]},setItem(t,e){Zt(this.$el,"itemloaded",[this,we(this.getSlide(t),e)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span bdt-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),K(this.$el,"bdt-active","bdt-transition-active")},hideControls(){Q(this.$el,"bdt-active","bdt-transition-active")}}};function io(t,e){const i=De(`<${t}>`);return st(i,e),i}var no={install:function(t,e){t.lightboxPanel||t.component("lightboxPanel",eo),p(e.props,t.component("lightboxPanel").options.props)},props:{toggle:String},data:{toggle:"a"},computed:{toggles:({toggle:t},e)=>Oe(t,e)},watch:{toggles(t){this.hide();for(const e of t)ve(e,"a")&&st(e,"role","button")}},disconnected(){this.hide()},events:{name:"click",delegate:({toggle:t})=>`${t}:not(.bdt-disabled)`,handler(t){t.defaultPrevented||(t.preventDefault(),this.show(t.current))}},methods:{show(t){const e=L(this.toggles.map(so),"source");if(x(t)){const{source:i}=so(t);t=d(e,({source:t})=>i===t)}return this.panel=this.panel||this.$create("lightboxPanel",{...this.$props,items:e}),Xt(this.panel.$el,"hidden",()=>this.panel=null),this.panel.show(t)},hide(){var t;return null==(t=this.panel)?void 0:t.hide()}}};function so(t){const e={};for(const i of["href","caption","type","poster","alt","attrs"])e["href"===i?"source":i]=at(t,i);return e.attrs=ln(e.attrs),e}var oo={mixins:[Zn],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:"",pos:"top-center",clsContainer:"bdt-notification",clsClose:"bdt-notification-close",clsMsg:"bdt-notification-message"},install:function(t){t.notification.closeAll=function(e,i){Me(document.body,n=>{const s=t.getComponent(n,"notification");s&&(!e||e===s.group)&&s.close(i)})}},computed:{marginProp:({pos:t})=>`margin-${t.match(/[a-z]+(?=-)/)[0]}`,startProps(){return{opacity:0,[this.marginProp]:-this.$el.offsetHeight}}},created(){const t=`${this.clsContainer}-${this.pos}`,e=`data-${this.clsContainer}-container`,i=Pe(`.${t}[${e}]`,this.container)||xe(this.container,`<div class="${this.clsContainer} ${t}" ${e}></div>`);this.$mount(xe(i,`<div class="${this.clsMsg}${this.status?` ${this.clsMsg}-${this.status}`:""}" role="alert"> <a href class="${this.clsClose}" data-bdt-close></a> <div>${this.message}</div> </div>`))},async connected(){const t=_(re(this.$el,this.marginProp));await de.start(re(this.$el,this.startProps),{opacity:1,[this.marginProp]:t}),this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},events:{click(t){t.target.closest('a[href="#"],a[href=""]')&&t.preventDefault(),this.close()},[gt](){this.timer&&clearTimeout(this.timer)},[mt](){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))}},methods:{async close(t){this.timer&&clearTimeout(this.timer),t||await de.start(this.$el,this.startProps),(t=>{const e=Ct(t);Zt(t,"close",[this]),ke(t),null!=e&&e.hasChildNodes()||ke(e)})(this.$el)}}};var ro={props:{media:Boolean},data:{media:!1},connected(){const t=function(t,e){if(I(t))if(l(t,"@"))t=_(re(e,`--bdt-breakpoint-${t.slice(1)}`));else if(isNaN(t))return t;return t&&C(t)?`(min-width: ${t}px)`:""}(this.media,this.$el);if(this.matchMedia=!0,t){this.mediaObj=window.matchMedia(t);const e=()=>{this.matchMedia=this.mediaObj.matches,Zt(this.$el,Kt("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=Xt(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var t;null==(t=this.offMediaObj)||t.call(this)}};function ao(t){return xt(t)?Math.ceil(Math.max(0,...Oe("[stroke]",t).map(t=>{var e;return(null==(e=t.getTotalLength)?void 0:e.call(t))||0}))):0}const lo={x:uo,y:uo,rotate:uo,scale:uo,color:fo,backgroundColor:fo,borderColor:fo,blur:po,hue:po,fopacity:po,grayscale:po,invert:po,saturate:po,sepia:po,opacity:function(t,e,i){return 1===i.length&&i.unshift(Co(e,t,"")),i=xo(i),(e,n)=>{e[t]=So(i,n)}},stroke:function(t,e,i){1===i.length&&i.unshift(0);const n=ko(i),s=ao(e);return(i=xo(i.reverse(),t=>(t=_(t),"%"===n?t*s/100:t))).some(([t])=>t)?(re(e,"strokeDasharray",s),(t,e)=>{t.strokeDashoffset=So(i,e)}):V},bgx:go,bgy:go},{keys:ho}=Object;var co={mixins:[ro],props:To(ho(lo),"list"),data:To(ho(lo),void 0),computed:{props(t,e){const i={};for(const e in t)e in lo&&!E(t[e])&&(i[e]=t[e].slice());const n={};for(const t in i)n[t]=lo[t](t,e,i[t],i);return n}},events:{load(){this.$emit()}},methods:{reset(){for(const t in this.getCss(0))re(this.$el,t,"")},getCss(t){const e={};for(const i in this.props)this.props[i](e,q(t));return e.willChange=Object.keys(e).map(ae).join(","),e}}};function uo(t,e,i){let n,s=ko(i)||{x:"px",y:"px",rotate:"deg"}[t]||"";return"x"===t||"y"===t?(t=`translate${a(t)}`,n=t=>_(_(t).toFixed("px"===s?0:6))):"scale"===t&&(s="",n=t=>{var i;return ko([t])?Ue(t,"width",e,!0)/e["offset"+(null!=(i=t.endsWith)&&i.call(t,"vh")?"Height":"Width")]:_(t)}),1===i.length&&i.unshift("scale"===t?1:0),i=xo(i,n),(e,n)=>{e.transform=`${e.transform||""} ${t}(${So(i,n)}${s})`}}function fo(t,e,i){return 1===i.length&&i.unshift(Co(e,t,"")),i=xo(i,t=>function(t,e){return Co(t,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(_)}(e,t)),(e,n)=>{const[s,o,r]=yo(i,n),a=s.map((t,e)=>(t+=r*(o[e]-t),3===e?_(t):parseInt(t,10))).join(",");e[t]=`rgba(${a})`}}function po(t,e,i){1===i.length&&i.unshift(0);const n=ko(i)||{blur:"px",hue:"deg"}[t]||"%";return t={fopacity:"opacity",hue:"hue-rotate"}[t]||t,i=xo(i),(e,s)=>{const o=So(i,s);e.filter=`${e.filter||""} ${t}(${o+n})`}}function go(t,e,i,n){1===i.length&&i.unshift(0);const s="bgy"===t?"height":"width";n[t]=xo(i,t=>Ue(t,s,e));const o=["bgx","bgy"].filter(t=>t in n);if(2===o.length&&"bgx"===t)return V;if("cover"===Co(e,"backgroundSize",""))return function(t,e,i,n){const s=function(t){const e=re(t,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(wo[e])return wo[e];const i=new Image;return!e||(i.src=e,i.naturalWidth||bo[e])?wo[e]=$o(i):(Gt(i,"error load",()=>{wo[e]=$o(i),Zt(t,Kt("load",!1))}),bo[e]=!0,$o(i))}(e);if(!s.width)return V;const o={width:e.offsetWidth,height:e.offsetHeight},r=["bgx","bgy"].filter(t=>t in n),a={};for(const t of r){const e=n[t].map(([t])=>t),i=Math.min(...e),s=Math.max(...e),r=e.indexOf(i)<e.indexOf(s),l=s-i;a[t]=(r?-l:0)-(r?i:s)+"px",o["bgy"===t?"height":"width"]+=l}const l=J.cover(s,o);for(const t of r){const i="bgy"===t?"height":"width",n=l[i]-o[i];a[t]=`max(${mo(e,t)},-${n}px) + ${a[t]}`}const h=vo(r,a,n);return(t,e)=>{h(t,e),t.backgroundSize=`${l.width}px ${l.height}px`,t.backgroundRepeat="no-repeat"}}(0,e,0,n);const r={};for(const t of o)r[t]=mo(e,t);return vo(o,r,n)}function mo(t,e){return Co(t,`background-position-${e.slice(-1)}`,"")}function vo(t,e,i){return function(n,s){for(const o of t){const t=So(i[o],s);n[`background-position-${o.slice(-1)}`]=`calc(${e[o]} + ${t}px)`}}}const bo={},wo={};function $o(t){return{width:t.naturalWidth,height:t.naturalHeight}}function xo(t,e=_){const i=[],{length:n}=t;let s=0;for(let o=0;o<n;o++){let[r,a]=I(t[o])?t[o].trim().split(/ (?![^(]*\))/):[t[o]];if(r=e(r),a=a?_(a)/100:null,0===o?null===a?a=0:a&&i.push([r,0]):o===n-1&&(null===a?a=1:1!==a&&(i.push([r,a]),a=1)),i.push([r,a]),null===a)s++;else if(s){const t=i[o-s-1][1],e=(a-t)/(s+1);for(let n=s;n>0;n--)i[o-n][1]=t+e*(s-n+1);s=0}}return i}function yo(t,e){const i=d(t.slice(1),([,t])=>e<=t)+1;return[t[i-1][0],t[i][0],(e-t[i-1][1])/(t[i][1]-t[i-1][1])]}function So(t,e){const[i,n,s]=yo(t,e);return i+Math.abs(i-n)*s*(i<n?1:-1)}const Io=/^-?\d+(?:\.\d+)?(\S+)?/;function ko(t,e){var i;for(const e of t){const t=null==(i=e.match)?void 0:i.call(e,Io);if(t)return t[1]}return e}function Co(t,e,i){const n=t.style[e],s=re(re(t,e,i),e);return t.style[e]=n,s}function To(t,e){return t.reduce((t,i)=>(t[i]=e,t),{})}function Eo(t,e){return e>=0?Math.pow(t,e+1):1-Math.pow(1-t,1-e)}var Ao={mixins:[co],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:t},e)=>Do(t&&Ot(t,e)||e),start({start:t}){return Ue(t,"height",this.target,!0)},end({end:t,viewport:e}){return Ue(t||(e=100*(1-e))&&`${e}vh+${e}%`,"height",this.target,!0)}},observe:[mn(),vn({target:({target:t})=>t}),un({target:({$el:t,target:e})=>[t,e,Ai(e,!0)]})],update:{read({percent:t},e){if(e.has("scroll")||(t=!1),!xt(this.$el))return!1;if(!this.matchMedia)return;const i=t;return{percent:t=Eo(Ti(this.target,this.start,this.end),this.easing),style:i!==t&&this.getCss(t)}},write({style:t}){this.matchMedia?t&&re(this.$el,t):this.reset()},events:["scroll","resize"]}};function Do(t){return t?"offsetTop"in t?t:Do(Ct(t)):document.documentElement}var _o={props:{parallax:Boolean,parallaxTarget:Boolean,parallaxStart:String,parallaxEnd:String,parallaxEasing:Number},data:{parallax:!1,parallaxTarget:!1,parallaxStart:0,parallaxEnd:0,parallaxEasing:0},observe:[un({target:({$el:t,parallaxTarget:e})=>[t,e],filter:({parallax:t})=>t}),vn({filter:({parallax:t})=>t})],computed:{parallaxTarget({parallaxTarget:t},e){return t&&Ot(t,e)||this.list}},update:{read(){if(!this.parallax)return!1;const t=this.parallaxTarget;if(!t)return!1;const e=Eo(Ti(t,Ue(this.parallaxStart,"height",t,!0),Ue(this.parallaxEnd,"height",t,!0)),this.parallaxEasing);return{parallax:this.getIndexAt(e)}},write({parallax:t}){const[e,i]=t,n=this.getValidIndex(e+Math.ceil(i)),s=this.slides[e],o=this.slides[n],{triggerShow:r,triggerShown:a,triggerHide:l,triggerHidden:h}=function(t){const{clsSlideActive:e,clsEnter:i,clsLeave:n}=t;return{triggerShow:s,triggerShown:o,triggerHide:r,triggerHidden:a};function s(i){et(i,n)&&(r(i),a(i)),et(i,e)||(Zt(i,"beforeitemshow",[t]),Zt(i,"itemshow",[t]))}function o(e){et(e,i)&&Zt(e,"itemshown",[t])}function r(r){et(r,e)||s(r),et(r,i)&&o(r),et(r,n)||(Zt(r,"beforeitemhide",[t]),Zt(r,"itemhide",[t]))}function a(e){et(e,n)&&Zt(e,"itemhidden",[t])}}(this);if(~this.prevIndex)for(const t of new Set([this.index,this.prevIndex]))c([n,e],t)||(l(this.slides[t]),h(this.slides[t]));const d=this.prevIndex!==e||this.index!==n;this.dir=1,this.prevIndex=e,this.index=n,s!==o&&l(s),r(o),d&&a(s),this._translate(s===o?1:i,s,o)},events:["scroll","resize"]},methods:{getIndexAt(t){const e=t*(this.length-1);return[Math.floor(e),e%1]}}};var Mo={update:{write(){if(this.stack.length||this.dragging||this.parallax)return;const t=this.getValidIndex();~this.prevIndex&&this.index===t?this._translate(1):this.show(t)},events:["resize"]}},Po={observe:gn({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()}),methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};function Oo(t,e,i){const n=zo(t,e);return i?n-function(t,e){return ze(e).width/2-ze(t).width/2}(t,e):Math.min(n,Bo(e))}function Bo(t){return Math.max(0,No(t)-ze(t).width)}function No(t,e){return j(Dt(t).slice(0,e),t=>ze(t).width)}function zo(t,e){return t&&(Fe(t).left+(ht?ze(t).width-ze(e).width:0))*(ht?-1:1)||0}function Ho(t,e){e-=1;const i=ze(t).width,n=e+i+2;return Dt(t).filter(s=>{const o=zo(s,t),r=o+Math.min(ze(s).width,i);return o>=e&&r<=n})}var Fo={mixins:[Qi,Zs,Mo,_o,Po],props:{center:Boolean,sets:Boolean,active:String},data:{center:!1,sets:!1,attrItem:"bdt-slider-item",selList:".bdt-slider-items",selNav:".bdt-slider-nav",clsContainer:"bdt-slider-container",active:"all",Transitioner:function(t,e,i,{center:n,easing:s,list:o}){const r=t?Oo(t,o,n):Oo(e,o,n)+ze(e).width*i,a=e?Oo(e,o,n):r+ze(t).width*i*(ht?-1:1),{promise:l,resolve:h}=fs();return{dir:i,show(e,n=0,r){const c=r?"linear":s;return e-=Math.round(e*q(n,-1,1)),re(o,"transitionProperty","none"),this.translate(n),re(o,"transitionProperty",""),n=t?n:q(n,0,1),us(this.getItemIn(),"itemin",{percent:n,duration:e,timing:c,dir:i}),t&&us(this.getItemIn(!0),"itemout",{percent:1-n,duration:e,timing:c,dir:i}),de.start(o,{transform:cs(-a*(ht?-1:1),"px")},e,c).then(h,V),l},cancel:()=>de.cancel(o),reset(){re(o,"transform","")},async forward(t,e=this.percent()){return await this.cancel(),this.show(t,e,!0)},translate(n){if(n===this.percent())return;const s=this.getDistance()*i*(ht?-1:1);re(o,"transform",cs(q(s-s*n-a,-No(o),ze(o).width)*(ht?-1:1),"px"));const r=this.getActives(),l=this.getItemIn(),h=this.getItemIn(!0);n=t?q(n,-1,1):0;for(const s of Dt(o)){const a=c(r,s),d=s===l,u=s===h;us(s,"itemtranslate"+(d||!u&&(a||i*(ht?-1:1)==-1^zo(s,o)>zo(t||e))?"in":"out"),{dir:i,percent:u?1-n:d?n:a?1:0})}},percent:()=>Math.abs((new DOMMatrix(re(o,"transform")).m41*(ht?-1:1)+r)/(a-r)),getDistance:()=>Math.abs(a-r),getItemIn(i=!1){let s=this.getActives(),r=Ho(o,Oo(e||t,o,n));if(i){const t=s;s=r,r=t}return r[d(r,t=>!c(s,t))]},getActives:()=>Ho(o,Oo(t||e,o,n))}}},computed:{finite({finite:t}){return t||function(t,e){if(!t||t.length<2)return!0;const{width:i}=ze(t);if(!e)return Math.ceil(No(t))<Math.trunc(i+function(t){return Math.max(0,...Dt(t).map(t=>ze(t).width))}(t));const n=Dt(t),s=Math.trunc(i/2);for(const t in n){const e=n[t],i=ze(e).width,o=new Set([e]);let r=0;for(const e of[-1,1]){let a=i/2,l=0;for(;a<s;){const i=n[G(+t+e+l++*e,n)];if(o.has(i))return!0;a+=ze(i).width,o.add(i)}r=Math.max(r,i/2+ze(n[G(+t+e,n)]).width/2-(a-s))}if(Math.trunc(r)>j(n.filter(t=>!o.has(t)),t=>ze(t).width))return!0}return!1}(this.list,this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return z(this.sets);let t=0;const e=Bo(this.list),i=d(this.slides,i=>{if(t>=e)return!0;t+=ze(i).width});return~i?i:this.length-1},sets({sets:t}){if(!t||this.parallax)return;let e=0;const i=[],n=ze(this.list).width;for(let t=0;t<this.length;t++){const s=ze(this.slides[t]).width;e+s>n&&(e=0),this.center?e<n/2&&e+s+ze(this.slides[G(t+1,this.slides)]).width/2>n/2&&(i.push(t),e=n/2-s/2):0===e&&i.push(Math.min(t,this.maxIndex)),e+=s}return i.length?i:void 0},transitionOptions(){return{center:this.center,list:this.list}},slides(){return Dt(this.list).filter(xt)}},connected(){it(this.$el,this.clsContainer,!Pe(`.${this.clsContainer}`,this.$el))},observe:un({target:({slides:t,$el:e})=>[e,...t]}),update:{write(){for(const t of this.navItems){const e=D(at(t,this.attrItem));!1!==e&&(t.hidden=!this.maxIndex||e>this.maxIndex||this.sets&&!c(this.sets,e))}this.reorder(),this.parallax||this._translate(1),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(t){!this.dragging&&this.sets&&this.stack.length<2&&!c(this.sets,this.index)&&(this.index=this.getValidIndex());const e=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&e>1){for(let t=0;t<e;t++)this.stack.splice(1,0,this.dir>0?"next":"previous");return void t.preventDefault()}const i=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex,n=No(this.list)/this.length;this.duration=Ks(n/this.velocity)*(ze(this.slides[i]).width/n),this.reorder()},itemshow(){~this.prevIndex&&K(this._getTransitioner().getItemIn(),this.clsActive),this.updateActiveClasses(this.prevIndex)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite)return void re(this.slides,"order","");const t=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((e,i)=>re(e,"order",this.dir>0&&i<t?1:this.dir<0&&i>=this.index?-1:"")),!this.center||!this.length)return;const e=this.slides[t];let i=ze(this.list).width/2-ze(e).width/2,n=0;for(;i>0;){const e=this.getIndex(--n+t,t),s=this.slides[e];re(s,"order",e>t?-2:-1),i-=ze(s).width}},updateActiveClasses(t=this.index){let e=this._getTransitioner(t).getActives();"all"!==this.active&&(e=[this.slides[this.getValidIndex(t)]]);const n=[this.clsActive,!this.sets||c(this.sets,_(this.index))?this.clsActivated:""];for(const t of this.slides){const s=c(e,t);it(t,n,s),st(t,"aria-hidden",!s);for(const e of Oe(It,t))i(e,"_tabindex")||(e._tabindex=st(e,"tabindex")),st(e,"tabindex",s?e._tabindex:-1)}},getValidIndex(t=this.index,e=this.prevIndex){if(t=this.getIndex(t,e),!this.sets)return t;let i;do{if(c(this.sets,t))return t;i=t,t=this.getIndex(t+this.dir,e)}while(t!==i);return t},getAdjacentSlides(){const{width:t}=ze(this.list),e=-t,i=2*t,n=ze(this.slides[this.index]).width,s=this.center?t/2-n/2:0,o=new Set;for(const t of[-1,1]){let r=s+(t>0?n:0),a=0;do{const e=this.slides[this.getIndex(this.index+t+a++*t)];r+=ze(e).width*t,o.add(e)}while(this.length>a&&r>e&&r<i)}return Array.from(o)},getIndexAt(t){let e=-1;let i=t*(this.center?No(this.list)-(ze(this.slides[0]).width/2+ze(z(this.slides)).width/2):No(this.list,this.maxIndex)),n=0;do{const t=ze(this.slides[++e]).width,s=this.center?t/2+ze(this.slides[e+1]).width/2:t;n=i/s%1,i-=s}while(i>=0&&e<this.maxIndex);return[e,n]}}};var jo={mixins:[co],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el:({item:t})=>t,handler({type:t,detail:{percent:e,duration:i,timing:n,dir:s}}){Qe.read(()=>{if(!this.matchMedia)return;const o=this.getCss(Wo(t,s,e)),r=this.getCss(Lo(t)?.5:s>0?1:0);Qe.write(()=>{re(this.$el,o),de.start(this.$el,r,i,n).catch(V)})})}},{name:"transitioncanceled transitionend",self:!0,el:({item:t})=>t,handler(){de.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:({item:t})=>t,handler({type:t,detail:{percent:e,dir:i}}){Qe.read(()=>{if(!this.matchMedia)return void this.reset();const n=this.getCss(Wo(t,i,e));Qe.write(()=>re(this.$el,n))})}}]};function Lo(t){return h(t,"in")}function Wo(t,e,i){return i/=2,Lo(t)^e<0?i:1-i}var qo={...ls,fade:{show:()=>[{opacity:0,zIndex:0},{zIndex:-1}],percent:t=>1-re(t,"opacity"),translate:t=>[{opacity:1-t,zIndex:0},{zIndex:-1}]},scale:{show:()=>[{opacity:0,transform:ds(1.5),zIndex:0},{zIndex:-1}],percent:t=>1-re(t,"opacity"),translate:t=>[{opacity:1-t,transform:ds(1+.5*t),zIndex:0},{zIndex:-1}]},pull:{show:t=>t<0?[{transform:cs(30),zIndex:-1},{transform:cs(),zIndex:0}]:[{transform:cs(-100),zIndex:0},{transform:cs(),zIndex:-1}],percent:(t,e,i)=>i<0?1-hs(e):hs(t),translate:(t,e)=>e<0?[{transform:cs(30*t),zIndex:-1},{transform:cs(-100*(1-t)),zIndex:0}]:[{transform:cs(100*-t),zIndex:0},{transform:cs(30*(1-t)),zIndex:-1}]},push:{show:t=>t<0?[{transform:cs(100),zIndex:0},{transform:cs(),zIndex:-1}]:[{transform:cs(-30),zIndex:-1},{transform:cs(),zIndex:0}],percent:(t,e,i)=>i>0?1-hs(e):hs(t),translate:(t,e)=>e<0?[{transform:cs(100*t),zIndex:0},{transform:cs(-30*(1-t)),zIndex:-1}]:[{transform:cs(-30*t),zIndex:-1},{transform:cs(100*(1-t)),zIndex:0}]}},Vo={mixins:[Qi,Qs,Mo,_o,Po],props:{ratio:String,minHeight:String,maxHeight:String},data:{ratio:"16:9",minHeight:void 0,maxHeight:void 0,selList:".bdt-slideshow-items",attrItem:"bdt-slideshow-item",selNav:".bdt-slideshow-nav",Animations:qo},watch:{list(t){re(t,{aspectRatio:this.ratio?this.ratio.replace(":","/"):void 0,minHeight:this.minHeight,maxHeight:this.maxHeight,minWidth:"100%",maxWidth:"100%"})}},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}},Ro={mixins:[Qi,On],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"bdt-sortable-item",clsPlaceholder:"bdt-sortable-placeholder",clsDrag:"bdt-sortable-drag",clsDragState:"bdt-drag",clsBase:"bdt-sortable",clsNoDrag:"bdt-sortable-nodrag",clsEmpty:"bdt-sortable-empty",clsCustom:"",handle:!1,pos:{}},events:{name:ut,passive:!1,handler:"init"},computed:{target:(t,e)=>(e.tBodies||[e])[0],items(){return Dt(this.target)},isEmpty(){return!this.items.length},handles({handle:t},e){return t?Oe(t,e):this.items}},watch:{isEmpty(t){it(this.target,this.clsEmpty,t)},handles(t,e){re(e,{touchAction:"",userSelect:""}),re(t,{touchAction:"none",userSelect:"none"})}},update:{write(t){if(!this.drag||!Ct(this.placeholder))return;const{pos:{x:e,y:i},origin:{offsetTop:n,offsetLeft:s},placeholder:o}=this;re(this.drag,{top:i-n,left:e-s});const r=this.getSortable(document.elementFromPoint(e,i));if(!r)return;const{items:a}=r;if(a.some(de.inProgress))return;const l=function(t,e){return t[d(t,t=>U(e,ze(t)))]}(a,{x:e,y:i});if(a.length&&(!l||l===o))return;const h=this.getSortable(o),c=function(t,e,i,n,s,o){if(!Dt(t).length)return;const r=ze(e);if(!o)return function(t,e){const i=1===Dt(t).length;i&&xe(t,e);const n=Dt(t),s=n.some((t,e)=>{const i=ze(t);return n.slice(e+1).some(t=>{const e=ze(t);return!Yo([i.left,i.right],[e.left,e.right])})});return i&&ke(e),s}(t,i)||s<r.top+r.height/2?e:e.nextElementSibling;const a=ze(i),l=Yo([r.top,r.bottom],[a.top,a.bottom]),[h,c,d,u]=l?[n,"width","left","right"]:[s,"height","top","bottom"],f=a[c]<r[c]?r[c]-a[c]:0;return a[d]<r[d]?!(f&&h<r[d]+f)&&e.nextElementSibling:!(f&&h>r[u]-f)&&e}(r.target,l,o,e,i,r===h&&t.moved!==l);!1!==c&&(c&&o===c||(r!==h?(h.remove(o),t.moved=l):delete t.moved,r.insert(o,c),this.touched.add(r)))},events:["move"]},methods:{init(t){const{target:e,button:i,defaultPrevented:n}=t,[s]=this.items.filter(t=>t.contains(e));!s||n||i>0||St(e)||e.closest(`.${this.clsNoDrag}`)||this.handle&&!e.closest(this.handle)||(t.preventDefault(),this.pos=se(t),this.touched=new Set([this]),this.placeholder=s,this.origin={target:e,index:_t(s),...this.pos},Xt(document,ft,this.move),Xt(document,pt,this.end),this.threshold||this.start(t))},start(t){this.drag=function(t,e){let i;if(ve(e,"li","tr")){i=Pe("<div>"),xe(i,e.cloneNode(!0).children);for(const t of e.getAttributeNames())st(i,t,e.getAttribute(t))}else i=e.cloneNode(!0);return xe(t,i),re(i,"margin","0","important"),re(i,{boxSizing:"border-box",width:e.offsetWidth,height:e.offsetHeight,padding:re(e,"padding")}),Le(i.firstElementChild,Le(e.firstElementChild)),i}(this.$container,this.placeholder);const{left:e,top:i}=ze(this.placeholder);p(this.origin,{offsetLeft:this.pos.x-e,offsetTop:this.pos.y-i}),K(this.drag,this.clsDrag,this.clsCustom),K(this.placeholder,this.clsPlaceholder),K(this.items,this.clsItem),K(document.documentElement,this.clsDragState),Zt(this.$el,"start",[this,this.placeholder]),function(t){let e=Date.now();Uo=setInterval(()=>{let{x:i,y:n}=t;n+=document.scrollingElement.scrollTop;const s=.3*(Date.now()-e);e=Date.now(),Ei(document.elementFromPoint(i,t.y)).reverse().some(t=>{let{scrollTop:e,scrollHeight:i}=t;const{top:o,bottom:r,height:a}=_i(t);if(o<n&&o+35>n)e-=s;else{if(!(r>n&&r-35<n))return;e+=s}if(e>0&&e<i-a)return t.scrollTop=e,!0})},15)}(this.pos),this.move(t)},move:function(t){let e;return function(...i){e||(e=!0,t.call(this,...i),requestAnimationFrame(()=>e=!1))}}(function(t){p(this.pos,se(t)),!this.drag&&(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(t),this.$emit("move")}),end(){if(Jt(document,ft,this.move),Jt(document,pt,this.end),!this.drag)return;clearInterval(Uo);const t=this.getSortable(this.placeholder);this===t?this.origin.index!==_t(this.placeholder)&&Zt(this.$el,"moved",[this,this.placeholder]):(Zt(t.$el,"added",[t,this.placeholder]),Zt(this.$el,"removed",[this,this.placeholder])),Zt(this.$el,"stop",[this,this.placeholder]),ke(this.drag),this.drag=null;for(const{clsPlaceholder:t,clsItem:e}of this.touched)for(const i of this.touched)Q(i.items,t,e);this.touched=null,Q(document.documentElement,this.clsDragState)},insert(t,e){K(this.items,this.clsItem),e&&e.previousElementSibling!==t?this.animate(()=>ye(e,t)):!e&&this.target.lastElementChild!==t&&this.animate(()=>xe(this.target,t))},remove(t){this.target.contains(t)&&this.animate(()=>ke(t))},getSortable(t){do{const e=this.$getComponent(t,"sortable");if(e&&(e===this||!1!==this.group&&e.group===this.group))return e}while(t=Ct(t))}}};let Uo;function Yo(t,e){return t[1]>e[0]&&e[1]>t[0]}var Xo={props:{pos:String,offset:Boolean,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:"bottom-"+(ht?"right":"left"),offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=c(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(t,e,i){let n=[this.getPositionOffset(t),this.getShiftOffset(t)];const s=[this.flip&&"flip",this.shift&&"shift"],o={element:[this.inset?this.dir:Re(this.dir),this.align],target:[this.dir,this.align]};if("y"===this.axis){for(const t in o)o[t].reverse();n.reverse(),s.reverse()}const r=Jo(t),a=ze(t);re(t,{top:-a.height,left:-a.width}),zi(t,e,{attach:o,offset:n,boundary:i,placement:s,viewportOffset:this.getViewportOffset(t)}),r()},getPositionOffset(t=this.$el){return Ue(!1===this.offset?re(t,"--bdt-position-offset"):this.offset,"x"===this.axis?"width":"height",t)*(c(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(t=this.$el){return"center"===this.align?0:Ue(re(t,"--bdt-position-shift-offset"),"y"===this.axis?"width":"height",t)*(c(["left","top"],this.align)?1:-1)},getViewportOffset:t=>Ue(re(t,"--bdt-position-viewport-offset"))}};function Jo(t){const e=Ai(t),{scrollTop:i}=e;return()=>{i!==e.scrollTop&&(e.scrollTop=i)}}var Go={mixins:[Zn,Kn,Xo],data:{pos:"top",animation:["bdt-animation-scale-up"],duration:100,cls:"bdt-active"},connected(){var t;kt(t=this.$el)||st(t,"tabindex","0")},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:t=0,title:e}=function(t){const{el:e,id:i,data:n}=t;return["delay","title"].reduce((t,i)=>({[i]:at(e,i),...t}),{...ln(at(e,i),["title"]),...n})}(this.$options);if(!e)return;const i=st(this.$el,"title"),n=Xt(this.$el,["blur",mt],t=>!ne(t)&&this.hide());this.reset=()=>{st(this.$el,{title:i,"aria-describedby":null}),n()};const s=Js(this);st(this.$el,{title:null,"aria-describedby":s}),clearTimeout(this.showTimer),this.showTimer=setTimeout(()=>this._show(e,s),t)},async hide(){var t;Et(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),null==(t=this.reset)||t.call(this),ke(this.tooltip),this.tooltip=null)},async _show(t,e){this.tooltip=xe(this.container,`<div id="${e}" class="bdt-${this.$options.name}" role="tooltip"> <div class="bdt-${this.$options.name}-inner">${t}</div> </div>`),Xt(this.tooltip,"toggled",(t,e)=>{if(!e)return;const i=()=>this.positionAt(this.tooltip,this.$el);i();const[n,s]=function(t,e,[i,n]){const s=He(t),o=He(e),r=[["left","right"],["top","bottom"]];for(const t of r){if(s[t[0]]>=o[t[1]]){i=t[1];break}if(s[t[1]]<=o[t[0]]){i=t[0];break}}return n=(c(r[0],i)?r[1]:r[0]).find(t=>s[t]===o[t])||"center",[i,n]}(this.tooltip,this.$el,this.pos);this.origin="y"===this.axis?`${Re(n)}-${s}`:`${s}-${Re(n)}`;const o=[Gt(document,`keydown ${ut}`,this.hide,!1,t=>t.type===ut&&!this.$el.contains(t.target)||"keydown"===t.type&&t.keyCode===Nn),Xt([document,...Di(this.$el)],"scroll",i,{passive:!0})];Gt(this.tooltip,"hide",()=>o.forEach(t=>t()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${gt} ${ut}`](t){(!ne(t)||t.type===ut)&&this.show()}}};var Zo={mixins:[ps],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"bdt-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,multiple:!1,name:"files[]",params:{},type:"",url:"",abort:V,beforeAll:V,beforeSend:V,complete:V,completeAll:V,error:V,fail:V,load:V,loadEnd:V,loadStart:V,progress:V},events:{change(t){Et(t.target,'input[type="file"]')&&(t.preventDefault(),t.target.files&&this.upload(t.target.files),t.target.value="")},drop(t){Qo(t);const e=t.dataTransfer;null!=e&&e.files&&(Q(this.$el,this.clsDragover),this.upload(e.files))},dragenter(t){Qo(t)},dragover(t){Qo(t),K(this.$el,this.clsDragover)},dragleave(t){Qo(t),Q(this.$el,this.clsDragover)}},methods:{async upload(t){if(!(t=f(t)).length)return;Zt(this.$el,"upload",[t]);for(const e of t){if(this.maxSize&&1e3*this.maxSize<e.size)return void this.fail(this.t("invalidSize",this.maxSize));if(this.allow&&!Ko(this.allow,e.name))return void this.fail(this.t("invalidName",this.allow));if(this.mime&&!Ko(this.mime,e.type))return void this.fail(this.t("invalidMime",this.mime))}this.multiple||(t=t.slice(0,1)),this.beforeAll(this,t);const e=function(t,e){const i=[];for(let n=0;n<t.length;n+=e)i.push(t.slice(n,n+e));return i}(t,this.concurrent),i=async t=>{const n=new FormData;t.forEach(t=>n.append(this.name,t));for(const t in this.params)n.append(t,this.params[t]);try{const t=await async function(t,e){const i={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:V,responseType:"",...e};return await i.beforeSend(i),function(t,e){return new Promise((i,n)=>{const{xhr:s}=e;for(const t in e)if(t in s)try{s[t]=e[t]}catch{}s.open(e.method.toUpperCase(),t);for(const t in e.headers)s.setRequestHeader(t,e.headers[t]);Xt(s,"load",()=>{0===s.status||s.status>=200&&s.status<300||304===s.status?i(s):n(p(Error(s.statusText),{xhr:s,status:s.status}))}),Xt(s,"error",()=>n(p(Error("Network Error"),{xhr:s}))),Xt(s,"timeout",()=>n(p(Error("Network Timeout"),{xhr:s}))),s.send(e.data)})}(t,i)}(this.url,{data:n,method:this.method,responseType:this.type,beforeSend:t=>{const{xhr:e}=t;Xt(e.upload,"progress",this.progress);for(const t of["loadStart","load","loadEnd","abort"])Xt(e,t.toLowerCase(),this[t]);return this.beforeSend(t)}});this.complete(t),e.length?await i(e.shift()):this.completeAll(t)}catch(t){this.error(t)}};await i(e.shift())}}};function Ko(t,e){return e.match(new RegExp(`^${t.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")}$`,"i"))}function Qo(t){t.preventDefault(),t.stopPropagation()}var tr,er=Object.freeze({__proto__:null,Countdown:en,Filter:Vn,Lightbox:no,LightboxPanel:eo,Notification:oo,Parallax:Ao,Slider:Fo,SliderParallax:jo,Slideshow:Vo,SlideshowParallax:jo,Sortable:Ro,Tooltip:Go,Upload:Zo});function ir(t){Zt(document,"uikit:init",t),document.body&&Me(document.body,or),new MutationObserver(t=>t.forEach(nr)).observe(document,{subtree:!0,childList:!0}),new MutationObserver(t=>t.forEach(sr)).observe(document,{subtree:!0,attributes:!0}),t._initialized=!0}function nr({addedNodes:t,removedNodes:e}){for(const e of t)Me(e,or);for(const t of e)Me(t,rr)}function sr({target:t,attributeName:e}){var i;const n=ar(e);n&&(ot(t,e)?qs(n,t):null==(i=Rs(t,n))||i.$destroy())}function or(t){const e=Vs(t);for(const t in e)Bs(e[t]);for(const e of t.getAttributeNames()){const i=ar(e);i&&qs(i,t)}}function rr(t){const e=Vs(t);for(const t in e)Ns(e[t])}function ar(t){l(t,"data-")&&(t=t.slice(5));const e=Ls[t];return e&&(e.options||e).name}(function(t){let e;t.component=Ws,t.getComponents=Vs,t.getComponent=Rs,t.update=Us,t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(t,e){(e=(I(e)?this.component(e):e)||this).options=an(e.options,t)},t.extend=function(t){t||(t={});const e=this,i=function(t){Hs(this,t)};return(i.prototype=Object.create(e.prototype)).constructor=i,i.options=an(e.options,t),i.super=e,i.extend=e.extend,i},Object.defineProperty(t,"container",{get:()=>e||document.body,set(t){e=Pe(t)}})})(Fs),(tr=Fs).prototype.$mount=function(t){const e=this;(function(t,e){t[js]||(t[js]={}),t[js][e.$options.name]=e})(t,e),e.$options.el=t,document.contains(t)&&Bs(e)},tr.prototype.$destroy=function(t=!1){const e=this,{el:i}=e.$options;i&&Ns(e),Os(e,"destroy"),function(t,e){var i;null==(i=t[js])||delete i[e.$options.name],T(t[js])&&delete t[js]}(i,e),t&&ke(e.$el)},tr.prototype.$create=qs,tr.prototype.$emit=function(t){dn(this,t)},tr.prototype.$update=function(t=this.$el,e){Us(t,e)},tr.prototype.$reset=function(){Ns(this),Bs(this)},tr.prototype.$getComponent=Rs,Object.defineProperties(tr.prototype,{$el:{get(){return this.$options.el}},$container:Object.getOwnPropertyDescriptor(tr,"container")});var lr={mixins:[Qi,Kn],props:{animation:Boolean,targets:String,active:null,collapsible:Boolean,multiple:Boolean,toggle:String,content:String,offset:Number},data:{targets:"> *",active:!1,animation:!0,collapsible:!0,multiple:!1,clsOpen:"bdt-open",toggle:"> .bdt-accordion-title",content:"> .bdt-accordion-content",offset:0},computed:{items:({targets:t},e)=>Oe(t,e),toggles({toggle:t}){return this.items.map(e=>Pe(t,e))},contents({content:t}){return this.items.map(e=>{var i;return(null==(i=e._wrapper)?void 0:i.firstElementChild)||Pe(t,e)})}},watch:{items(t,e){if(e||et(t,this.clsOpen))return;const i=!1!==this.active&&t[Number(this.active)]||!this.collapsible&&t[0];i&&this.toggle(i,!1)},toggles(){this.$emit()},contents(t){for(const e of t){const t=et(this.items.find(t=>t.contains(e)),this.clsOpen);hr(e,!t)}this.$emit()}},observe:gn(),events:[{name:"click keydown",delegate:({targets:t,$props:e})=>`${t} ${e.toggle}`,async handler(t){var e;"keydown"===t.type&&t.keyCode!==zn||(t.preventDefault(),null==(e=this._off)||e.call(this),this._off=function(t){const e=Ai(t,!0);let i;return function n(){i=requestAnimationFrame(()=>{const{top:i}=ze(t);i<0&&(e.scrollTop+=i),n()})}(),()=>requestAnimationFrame(()=>cancelAnimationFrame(i))}(t.target),await this.toggle(_t(this.toggles,t.current)),this._off())}},{name:"shown hidden",self:!0,delegate:({targets:t})=>t,handler(){this.$emit()}}],update(){const t=Tt(this.items,`.${this.clsOpen}`);for(const e in this.items){const i=this.toggles[e],n=this.contents[e];if(!i||!n)continue;i.id=Js(this,i),n.id=Js(this,n);const s=c(t,this.items[e]);st(i,{role:ve(i,"a")?"button":null,"aria-controls":n.id,"aria-expanded":s,"aria-disabled":!this.collapsible&&t.length<2&&s}),st(n,{role:"region","aria-labelledby":i.id}),ve(n,"ul")&&st(Dt(n),"role","presentation")}},methods:{toggle(t,e){let i=[t=this.items[G(t,this.items)]];const n=Tt(this.items,`.${this.clsOpen}`);if(!this.multiple&&!c(n,i[0])&&(i=i.concat(n)),!(!this.collapsible&&n.length<2&&c(n,t)))return Promise.all(i.map(t=>this.toggleElement(t,!c(n,t),(t,i)=>{if(it(t,this.clsOpen,i),!1!==e&&this.animation)return async function(t,e,{content:i,duration:n,velocity:s,transition:o}){var r;i=(null==(r=t._wrapper)?void 0:r.firstElementChild)||Pe(i,t),t._wrapper||(t._wrapper=Ce(i,"<div>"));const a=t._wrapper;re(a,"overflow","hidden");const l=_(re(a,"height"));await de.cancel(a),hr(i,!1);const h=j(["marginTop","marginBottom"],t=>re(i,t))+ze(i).height,c=l/h;n=(s*h+n)*(e?1-c:c),re(a,"height",l),await de.start(a,{height:e?h:0},n,o),Ee(i),delete t._wrapper,e||hr(i,!0)}(t,i,this);hr(Pe(this.content,t),!i)})))}}};function hr(t,e){t&&(t.hidden=e)}var cr={mixins:[Qi,Kn],args:"animation",props:{animation:Boolean,close:String},data:{animation:!0,selClose:".bdt-alert-close",duration:150},events:{name:"click",delegate:({selClose:t})=>t,handler(t){t.preventDefault(),this.close()}},methods:{async close(){await this.toggleElement(this.$el,!1,dr),this.$destroy(!0)}}};function dr(t,e,{duration:i,transition:n,velocity:s}){const o=_(re(t,"height"));return re(t,"height",o),de.start(t,{height:0,marginTop:0,marginBottom:0,paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,opacity:0},s*o+i,n)}var ur={args:"autoplay",props:{automute:Boolean,autoplay:Boolean},data:{automute:!1,autoplay:!0},beforeConnect(){"inview"===this.autoplay&&!ot(this.$el,"preload")&&(this.$el.preload="none"),ve(this.$el,"iframe")&&!ot(this.$el,"allow")&&(this.$el.allow="autoplay"),"hover"===this.autoplay&&(ve(this.$el,"video")?this.$el.tabindex=0:this.autoplay=!0),this.automute&&mi(this.$el)},events:[{name:`${gt} focusin`,filter:({autoplay:t})=>c(t,"hover"),handler(t){ne(t)&&function(t){return!t.paused&&!t.ended}(this.$el)?gi(this.$el):pi(this.$el)}},{name:`${mt} focusout`,filter:({autoplay:t})=>c(t,"hover"),handler(t){ne(t)||gi(this.$el)}}],observe:[fn({filter:({$el:t,autoplay:e})=>e&&"hover"!==e&&vi(t),handler([{isIntersecting:t}]){document.fullscreenElement||(t?pi(this.$el):gi(this.$el))},args:{intersecting:!1},options:({$el:t,autoplay:e})=>({root:"inview"===e?null:Ct(t)})})]};var fr={mixins:[ur],props:{width:Number,height:Number},data:{automute:!0},created(){this.useObjectFit=ve(this.$el,"img","video")},observe:un({target:({$el:t})=>pr(t)||Ct(t),filter:({useObjectFit:t})=>!t}),update:{read(){if(this.useObjectFit)return!1;const{ratio:t,cover:e}=J,{$el:i,width:n,height:s}=this;let o={width:n,height:s};if(!n||!s){const e={width:i.naturalWidth||i.videoWidth||i.clientWidth,height:i.naturalHeight||i.videoHeight||i.clientHeight};o=n?t(e,"width",n):s?t(e,"height",s):e}const{offsetHeight:r,offsetWidth:a}=pr(i)||Ct(i),l=e(o,{width:a,height:r});return!(!l.width||!l.height)&&l},write({height:t,width:e}){re(this.$el,{height:t,width:e})},events:["resize"]}};function pr(t){for(;t=Ct(t);)if("static"!==re(t,"position"))return t}let gr;var mr={mixins:[Zn,Xo,Kn],args:"pos",props:{mode:"list",toggle:Boolean,boundary:Boolean,boundaryX:Boolean,boundaryY:Boolean,target:Boolean,targetX:Boolean,targetY:Boolean,stretch:Boolean,delayShow:Number,delayHide:Number,autoUpdate:Boolean,clsDrop:String,animateOut:Boolean,bgScroll:Boolean,closeOnScroll:Boolean},data:{mode:["click","hover"],toggle:"- *",boundary:!1,boundaryX:!1,boundaryY:!1,target:!1,targetX:!1,targetY:!1,stretch:!1,delayShow:0,delayHide:800,autoUpdate:!0,clsDrop:!1,animateOut:!1,bgScroll:!0,animation:["bdt-animation-fade"],cls:"bdt-open",container:!1,closeOnScroll:!1},computed:{boundary:({boundary:t,boundaryX:e,boundaryY:i},n)=>[Ot(e||t,n)||window,Ot(i||t,n)||window],target({target:t,targetX:e,targetY:i},n){return e||(e=t||this.targetEl),i||(i=t||this.targetEl),[!0===e?window:Ot(e,n),!0===i?window:Ot(i,n)]}},created(){this.tracker=new ai},beforeConnect(){this.clsDrop=this.$props.clsDrop||this.$options.id},connected(){K(this.$el,"bdt-drop",this.clsDrop),this.toggle&&!this.targetEl&&(this.targetEl=function(t){const{$el:e}=t.$create("toggle",Ot(t.toggle,t.$el),{target:t.$el,mode:t.mode});return st(e,"aria-haspopup",!0),e}(this)),this._style=W(this.$el.style,["width","height"])},disconnected(){this.isActive()&&(this.hide(!1),gr=null),re(this.$el,this._style)},events:[{name:"click",delegate:()=>".bdt-drop-close",handler(t){t.preventDefault(),this.hide(!1)}},{name:"click",delegate:()=>'a[href*="#"]',handler({defaultPrevented:t,current:e}){const{hash:i}=e;!t&&i&&Mt(e)&&!this.$el.contains(Pe(i))&&this.hide(!1)}},{name:"beforescroll",handler(){this.hide(!1)}},{name:"toggle",self:!0,handler(t,e){t.preventDefault(),this.isToggled()?this.hide(!1):this.show(null==e?void 0:e.$el,!1)}},{name:"toggleshow",self:!0,handler(t,e){t.preventDefault(),this.show(null==e?void 0:e.$el)}},{name:"togglehide",self:!0,handler(t){t.preventDefault(),Et(this.$el,":focus,:hover")||this.hide()}},{name:`${gt} focusin`,filter:({mode:t})=>c(t,"hover"),handler(t){ne(t)||this.clearTimers()}},{name:`${mt} focusout`,filter:({mode:t})=>c(t,"hover"),handler(t){!ne(t)&&t.relatedTarget&&this.hide()}},{name:"toggled",self:!0,handler(t,e){e&&(this.clearTimers(),this.position())}},{name:"show",self:!0,handler(){gr=this,this.tracker.init(),st(this.targetEl,"aria-expanded",!0);const t=[vr(this),wr(this),xr(this),this.autoUpdate&&br(this),this.closeOnScroll&&$r(this)];Gt(this.$el,"hide",()=>t.forEach(t=>t&&t()),{self:!0}),this.bgScroll||Gt(this.$el,"hidden",Gn(this.$el),{self:!0})}},{name:"beforehide",self:!0,handler:"clearTimers"},{name:"hide",handler({target:t}){this.$el===t?(gr=this.isActive()?null:gr,this.tracker.cancel(),st(this.targetEl,"aria-expanded",null)):gr=null===gr&&this.$el.contains(t)&&this.isToggled()?this:gr}}],update:{write(){this.isToggled()&&!et(this.$el,this.clsEnter)&&this.position()}},methods:{show(t=this.targetEl,e=!0){if(this.isToggled()&&t&&this.targetEl&&t!==this.targetEl&&this.hide(!1,!1),this.targetEl=t,this.clearTimers(),!this.isActive()){if(gr){if(e&&gr.isDelaying())return void(this.showTimer=setTimeout(()=>Et(t,":hover")&&this.show(),10));let i;for(;gr&&i!==gr&&!gr.$el.contains(this.$el);)i=gr,gr.hide(!1,!1)}this.container&&Ct(this.$el)!==this.container&&xe(this.container,this.$el),this.showTimer=setTimeout(()=>this.toggleElement(this.$el,!0),e&&this.delayShow||0)}},hide(t=!0,e=!0){const i=()=>this.toggleElement(this.$el,!1,this.animateOut&&e);this.clearTimers(),this.isDelayedHide=t,t&&this.isDelaying()?this.hideTimer=setTimeout(this.hide,50):t&&this.delayHide?this.hideTimer=setTimeout(i,this.delayHide):i()},clearTimers(){clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.showTimer=null,this.hideTimer=null},isActive(){return gr===this},isDelaying(){return[this.$el,...Oe(".bdt-drop",this.$el)].some(t=>this.tracker.movesTo(t))},position(){const t=Jo(this.$el);Q(this.$el,"bdt-drop-stack"),re(this.$el,this._style),this.$el.hidden=!0;const e=this.target.map(t=>function(t,e){return _i(Di(e).find(e=>e.contains(t)))}(this.$el,t)),i=this.getViewportOffset(this.$el),n=[[0,["x","width","left","right"]],[1,["y","height","top","bottom"]]];for(const[t,[s,o]]of n)this.axis!==s&&c([s,!0],this.stretch)&&re(this.$el,{[o]:Math.min(He(this.boundary[t])[o],e[t][o]-2*i),[`overflow-${s}`]:"auto"});const s=e[0].width-2*i;this.$el.hidden=!1,re(this.$el,"maxWidth",""),this.$el.offsetWidth>s&&K(this.$el,"bdt-drop-stack"),re(this.$el,"maxWidth",s),this.positionAt(this.$el,this.target,this.boundary);for(const[t,[s,o,r,a]]of n)if(this.axis===s&&c([s,!0],this.stretch)){const n=Math.abs(this.getPositionOffset()),l=He(this.target[t]),h=He(this.$el);re(this.$el,{[o]:(l[r]>h[r]?l[this.inset?a:r]-Math.max(He(this.boundary[t])[r],e[t][r]+i):Math.min(He(this.boundary[t])[a],e[t][a]-i)-l[this.inset?r:a])-n,[`overflow-${s}`]:"auto"}),this.positionAt(this.$el,this.target,this.boundary)}t()}}};function vr(t){const e=()=>t.$emit(),i=[di(e),ci(Di(t.$el).concat(t.target),e)];return()=>i.map(t=>t.disconnect())}function br(t,e=()=>t.$emit()){return Xt([document,...Di(t.$el)],"scroll",e,{passive:!0})}function wr(t){return Xt(document,"keydown",e=>{e.keyCode===Nn&&t.hide(!1)})}function $r(t){return br(t,()=>t.hide(!1))}function xr(t){return Xt(document,ut,({target:e})=>{t.$el.contains(e)||Gt(document,`${pt} ${vt} scroll`,({defaultPrevented:i,type:n,target:s})=>{var o;!i&&n===pt&&e===s&&(null==(o=t.targetEl)||!o.contains(e))&&t.hide(!1)},!0)})}var yr={mixins:[Qi,Zn],props:{align:String,clsDrop:String,boundary:Boolean,dropbar:Boolean,dropbarAnchor:Boolean,duration:Number,mode:Boolean,offset:Boolean,stretch:Boolean,delayShow:Boolean,delayHide:Boolean,target:Boolean,targetX:Boolean,targetY:Boolean,animation:Boolean,animateOut:Boolean,closeOnScroll:Boolean},data:{align:ht?"right":"left",clsDrop:"bdt-dropdown",clsDropbar:"bdt-dropnav-dropbar",boundary:!0,dropbar:!1,dropbarAnchor:!1,duration:200,container:!1,selNavItem:"> li > a, > ul > li > a"},computed:{dropbarAnchor:({dropbarAnchor:t},e)=>Ot(t,e)||e,dropbar({dropbar:t}){return t?(t=this._dropbar||Ot(t,this.$el)||Pe(`+ .${this.clsDropbar}`,this.$el))||(this._dropbar=Pe("<div></div>")):null},dropContainer(t,e){return this.container||e},dropdowns({clsDrop:t},e){var i;const n=Oe(`.${t}`,e);if(this.dropContainer!==e)for(const e of Oe(`.${t}`,this.dropContainer)){const t=null==(i=this.getDropdown(e))?void 0:i.targetEl;!c(n,e)&&t&&this.$el.contains(t)&&n.push(e)}return n},items:({selNavItem:t},e)=>Oe(t,e)},watch:{dropbar(t){K(t,"bdt-dropbar","bdt-dropbar-top",this.clsDropbar,`bdt-${this.$options.name}-dropbar`)},dropdowns(){this.initializeDropdowns()}},connected(){this.initializeDropdowns()},disconnected(){ke(this._dropbar),delete this._dropbar},events:[{name:"mouseover focusin",delegate:({selNavItem:t})=>t,handler({current:t}){const e=this.getActive();e&&c(e.mode,"hover")&&e.targetEl&&!t.contains(e.targetEl)&&!e.isDelaying()&&e.hide(!1)}},{name:"keydown",self:!0,delegate:({selNavItem:t})=>t,handler(t){var e;const{current:i,keyCode:n}=t,s=this.getActive();n===qn&&(null==s?void 0:s.targetEl)===i&&(t.preventDefault(),null==(e=Pe(It,s.$el))||e.focus()),Sr(t,this.items,s)}},{name:"keydown",el:({dropContainer:t})=>t,delegate:({clsDrop:t})=>`.${t}`,handler(t){var e;const{current:i,keyCode:n,target:s}=t;if(St(s)||!c(this.dropdowns,i))return;const o=this.getActive();let r=-1;if(n===Fn?r=0:n===Hn?r="last":n===Ln?r="previous":n===qn?r="next":n===Nn&&(null==(e=o.targetEl)||e.focus()),~r){t.preventDefault();const e=Oe(It,i);e[G(r,e,d(e,t=>Et(t,":focus")))].focus()}Sr(t,this.items,o)}},{name:"mouseleave",el:({dropbar:t})=>t,filter:({dropbar:t})=>t,handler(){const t=this.getActive();t&&c(t.mode,"hover")&&!this.dropdowns.some(t=>Et(t,":hover"))&&t.hide()}},{name:"beforeshow",el:({dropContainer:t})=>t,filter:({dropbar:t})=>t,handler({target:t}){this.isDropbarDrop(t)&&(this.dropbar.previousElementSibling!==this.dropbarAnchor&&Se(this.dropbarAnchor,this.dropbar),K(t,`${this.clsDrop}-dropbar`))}},{name:"show",el:({dropContainer:t})=>t,filter:({dropbar:t})=>t,handler({target:t}){if(!this.isDropbarDrop(t))return;const e=this.getDropdown(t),i=()=>{const i=Math.max(...At(t,`.${this.clsDrop}`).concat(t).map(t=>He(t).bottom));He(this.dropbar,{left:He(this.dropbar).left,top:this.getDropbarOffset(e.getPositionOffset())}),this.transitionTo(i-He(this.dropbar).top+_(re(t,"marginBottom")),t)};this._observer=ci([e.$el,...e.target],i),i()}},{name:"beforehide",el:({dropContainer:t})=>t,filter:({dropbar:t})=>t,handler(t){const e=this.getActive();Et(this.dropbar,":hover")&&e.$el===t.target&&this.isDropbarDrop(e.$el)&&c(e.mode,"hover")&&e.isDelayedHide&&!this.items.some(t=>e.targetEl!==t&&Et(t,":focus"))&&t.preventDefault()}},{name:"hide",el:({dropContainer:t})=>t,filter:({dropbar:t})=>t,handler({target:t}){var e;if(!this.isDropbarDrop(t))return;null==(e=this._observer)||e.disconnect();const i=this.getActive();(!i||i.$el===t)&&this.transitionTo(0)}}],methods:{getActive(){var t;return c(this.dropdowns,null==(t=gr)?void 0:t.$el)&&gr},async transitionTo(t,e){const{dropbar:i}=this,n=Le(i);if(e=n<t&&e,await de.cancel([e,i]),e){const s=He(e).top-He(i).top-n;s>0&&re(e,"transitionDelay",s/t*this.duration+"ms")}re(e,"clipPath",`polygon(0 0,100% 0,100% ${n}px,0 ${n}px)`),Le(i,n),await Promise.all([de.start(i,{height:t},this.duration),de.start(e,{clipPath:`polygon(0 0,100% 0,100% ${t}px,0 ${t}px)`},this.duration).finally(()=>re(e,{clipPath:"",transitionDelay:""}))]).catch(V)},getDropdown(t){return this.$getComponent(t,"drop")||this.$getComponent(t,"dropdown")},isDropbarDrop(t){return c(this.dropdowns,t)&&et(t,this.clsDrop)},getDropbarOffset(t){const{$el:e,target:i,targetY:n}=this,{top:s,height:o}=He(Ot(n||i||e,e));return s+o+t},initializeDropdowns(){this.$create("drop",this.dropdowns.filter(t=>!this.getDropdown(t)),{...this.$props,flip:!1,shift:!0,pos:`bottom-${this.align}`,boundary:!0===this.boundary?this.$el:this.boundary})}}};function Sr(t,e,i){var n,s,o;const{current:r,keyCode:a}=t;let l=-1;a===Fn?l=0:a===Hn?l="last":a===jn?l="previous":a===Wn?l="next":a===Bn&&(null==(n=i.targetEl)||n.focus(),null==(s=i.hide)||s.call(i,!1)),~l&&(t.preventDefault(),null==(o=i.hide)||o.call(i,!1),e[G(l,e,e.indexOf(i.targetEl||r))].focus())}var Ir={mixins:[Qi],args:"target",props:{target:Boolean},data:{target:!1},computed:{input:(t,e)=>Pe(yt,e),state(){return this.input.nextElementSibling},target({target:t},e){return t&&(!0===t&&Ct(this.input)===e&&this.input.nextElementSibling||Pe(t,e))}},update(){var t;const{target:e,input:i}=this;if(!e)return;let n;const s=St(e)?"value":"textContent",o=e[s],r=null!=(t=i.files)&&t[0]?i.files[0].name:Et(i,"select")&&(n=Oe("option",i).filter(t=>t.selected)[0])?n.textContent:i.value;o!==r&&(e[s]=r)},events:[{name:"change",handler(){this.$emit()}},{name:"reset",el:({$el:t})=>t.closest("form"),handler(){this.$emit()}}]},kr={extends:xn,mixins:[Qi],name:"grid",props:{masonry:Boolean,parallax:String,parallaxStart:String,parallaxEnd:String,parallaxJustify:Boolean},data:{margin:"bdt-grid-margin",clsStack:"bdt-grid-stack",masonry:!1,parallax:0,parallaxStart:0,parallaxEnd:0,parallaxJustify:!1},connected(){this.masonry&&K(this.$el,"bdt-flex-top","bdt-flex-wrap-top")},observe:vn({filter:({parallax:t,parallaxJustify:e})=>t||e}),update:[{write({rows:t}){it(this.$el,this.clsStack,!t.some(t=>t.length>1))},events:["resize"]},{read(t){const{rows:e}=t;let{masonry:i,parallax:n,parallaxJustify:s,margin:o}=this;if(n=Math.max(0,Ue(n)),!(i||n||s)||Cr(e)||e[0].some((t,i)=>e.some(e=>e[i]&&e[i].offsetWidth!==t.offsetWidth)))return t.translates=t.scrollColumns=!1;let r,a,l=function(t,e){const i=t.flat().find(t=>et(t,e));return _(i?re(i,"marginTop"):re(t[0][0],"paddingLeft"))}(e,o);i?[r,a]=function(t,e,i){const n=[],s=[],o=Array(t[0].length).fill(0);let r=0;for(let a of t){ht&&(a=a.reverse());let t=0;for(const l in a){const{offsetWidth:h,offsetHeight:c}=a[l],d=i?l:o.indexOf(Math.min(...o));Tr(n,d,a[l]),Tr(s,d,[(d-l)*h*(ht?-1:1),o[d]-r]),o[d]+=c+e,t=Math.max(t,c)}r+=t+e}return[n,s]}(e,l,"next"===i):r=function(t){const e=[];for(const i of t)for(const t in i)Tr(e,t,i[t]);return e}(e);const h=r.map(t=>j(t,"offsetHeight")+l*(t.length-1)),c=Math.max(0,...h);let d,u,f;return(n||s)&&(d=h.map((t,e)=>s?c-t+n:n/(e%2||8)),s||(n=Math.max(...h.map((t,e)=>t+d[e]-c))),u=Ue(this.parallaxStart,"height",this.$el,!0),f=Ue(this.parallaxEnd,"height",this.$el,!0)),{columns:r,translates:a,scrollColumns:d,parallaxStart:u,parallaxEnd:f,padding:n,height:a?c:""}},write({height:t,padding:e}){re(this.$el,"paddingBottom",e||""),!1!==t&&re(this.$el,"height",t)},events:["resize"]},{read({rows:t,scrollColumns:e,parallaxStart:i,parallaxEnd:n}){return{scrolled:!(!e||Cr(t))&&Ti(this.$el,i,n)}},write({columns:t,scrolled:e,scrollColumns:i,translates:n}){!e&&!n||t.forEach((t,s)=>t.forEach((t,o)=>{let[r,a]=n&&n[s][o]||[0,0];e&&(a+=e*i[s]),re(t,"transform",`translate(${r}px, ${a}px)`)}))},events:["scroll","resize"]}]};function Cr(t){return t.flat().some(t=>"absolute"===re(t,"position"))}function Tr(t,e,i){t[e]||(t[e]=[]),t[e].push(i)}var Er={args:"target",props:{target:String,row:Boolean},data:{target:"> *",row:!0},computed:{elements:({target:t},e)=>Oe(t,e)},observe:un({target:({$el:t,elements:e})=>e.reduce((t,e)=>t.concat(e,...e.children),[t])}),events:{name:"loadingdone",el:()=>document.fonts,handler(){this.$emit("resize")}},update:{read(){return{rows:(this.row?yn(this.elements):[this.elements]).map(Ar)}},write({rows:t}){for(const{heights:e,elements:i}of t)i.forEach((t,i)=>re(t,"minHeight",e[i]))},events:["resize"]}};function Ar(t){if(t.length<2)return{heights:[""],elements:t};let e=t.map(Dr);const i=Math.max(...e);return{heights:t.map((t,n)=>e[n].toFixed(2)===i.toFixed(2)?"":i),elements:t}}function Dr(t){const e=W(t.style,["display","minHeight"]);xt(t)||re(t,"display","block","important"),re(t,"minHeight","");const i=ze(t).height-Ve(t,"height","content-box");return re(t,e),i}var _r={args:"target",props:{target:String},data:{target:""},computed:{target:{get:({target:t},e)=>Ot(t,e),observe:({target:t})=>t}},observe:un({target:({target:t})=>t}),update:{read(){return!!this.target&&{height:this.target.offsetHeight}},write({height:t}){re(this.$el,{minHeight:t})},events:["resize"]}},Mr={props:{expand:Boolean,offsetTop:Boolean,offsetBottom:Boolean,minHeight:Number},data:{expand:!1,offsetTop:!1,offsetBottom:!1,minHeight:0},observe:[mn({filter:({expand:t})=>t}),un({target:({$el:t})=>Ei(t)})],update:{read(){if(!xt(this.$el))return!1;let t="";const e=Ve(this.$el,"height","content-box"),{body:i,scrollingElement:n}=document,s=Ai(this.$el),{height:o}=_i(s===i?n:s),r=n===s||i===s;if(t="calc("+(r?"100vh":`${o}px`),this.expand){t+=` - ${ze(s).height-ze(this.$el).height}px`}else{if(this.offsetTop)if(r){const e=!0===this.offsetTop?this.$el:Ot(this.offsetTop,this.$el),{top:i}=He(e);t+=i>0&&i<o/2?` - ${i}px`:""}else t+=` - ${Ve(s,"height",re(s,"boxSizing"))}px`;!0===this.offsetBottom?t+=` - ${ze(this.$el.nextElementSibling).height}px`:C(this.offsetBottom)?t+=` - ${this.offsetBottom}vh`:this.offsetBottom&&h(this.offsetBottom,"px")?t+=` - ${_(this.offsetBottom)}px`:I(this.offsetBottom)&&(t+=` - ${ze(Ot(this.offsetBottom,this.$el)).height}px`)}return t+=(e?` - ${e}px`:"")+")",{minHeight:t}},write({minHeight:t}){re(this.$el,"minHeight",`max(${this.minHeight||0}px, ${t})`)},events:["resize"]}},Pr='<svg width="20" height="20" viewBox="0 0 20 20"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"/><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"/></svg>',Or={args:"src",props:{width:Number,height:Number,ratio:Number},data:{ratio:1},connected(){this.svg=this.getSvg().then(t=>{if(!this._connected)return;const e=function(t,e){if(wt(e)||ve(e,"canvas")){e.hidden=!0;const i=e.nextElementSibling;return Br(t,i)?i:Se(e,t)}const i=e.lastElementChild;return Br(t,i)?i:xe(e,t)}(t,this.$el);return this.svgEl&&e!==this.svgEl&&ke(this.svgEl),Nr.call(this,e,t),this.svgEl=e},V)},disconnected(){this.svg.then(t=>{this._connected||(wt(this.$el)&&(this.$el.hidden=!1),ke(t),this.svgEl=null)}),this.svg=null},methods:{async getSvg(){}}};function Br(t,e){return ve(t,"svg")&&ve(e,"svg")&&t.innerHTML===e.innerHTML}function Nr(t,e){const i=["width","height"];let n=i.map(t=>this[t]);n.some(t=>t)||(n=i.map(t=>st(e,t)));const s=st(e,"viewBox");s&&!n.some(t=>t)&&(n=s.split(" ").slice(2)),n.forEach((e,n)=>st(t,i[n],_(e)*this.ratio||null))}var zr={mixins:[Or],args:"src",props:{src:String,icon:String,attributes:"list",strokeAnimation:Boolean},data:{strokeAnimation:!1},observe:[pn({async handler(){const t=await this.svg;t&&Hr.call(this,t)},options:{attributes:!0,attributeFilter:["id","class","style"]}})],async connected(){c(this.src,"#")&&([this.src,this.icon]=this.src.split("#"));const t=await this.svg;t&&(Hr.call(this,t),this.strokeAnimation&&function(t){const e=ao(t);e&&re(t,"--bdt-animation-stroke",e)}(t))},methods:{async getSvg(){return ve(this.$el,"img")&&!this.$el.complete&&"lazy"===this.$el.loading&&await new Promise(t=>Gt(this.$el,"load",t)),function(t,e){return e&&c(t,"<symbol")&&(t=Lr(t)[e]||t),Wr(t)}(await Fr(this.src),this.icon)||Promise.reject("SVG not found.")}}};function Hr(t){const{$el:e}=this;K(t,st(e,"class"),"bdt-svg");for(let i=0;i<e.style.length;i++){const n=e.style[i];re(t,n,re(e,n))}for(const e in this.attributes){const[i,n]=this.attributes[e].split(":",2);st(t,i,n)}this.$el.id||rt(t,"id")}const Fr=Z(async t=>t?l(t,"data:")?decodeURIComponent(t.split(",")[1]):(await fetch(t)).text():Promise.reject());const jr=/<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g,Lr=Z(function(t){const e={};let i;for(jr.lastIndex=0;i=jr.exec(t);)e[i[3]]=`<svg ${i[1]}svg>`;return e});function Wr(t){const e=document.createElement("template");return e.innerHTML=t,e.content.firstElementChild}const qr={spinner:'<svg width="30" height="30" viewBox="0 0 30 30"><circle fill="none" stroke="#000" cx="15" cy="15" r="14"/></svg>',totop:'<svg width="18" height="10" viewBox="0 0 18 10"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9"/></svg>',marker:'<svg width="20" height="20" viewBox="0 0 20 20"><rect width="1" height="11" x="9" y="4"/><rect width="11" height="1" x="4" y="9"/></svg>',"close-icon":'<svg width="14" height="14" viewBox="0 0 14 14"><line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"/><line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"/></svg>',"close-large":'<svg width="20" height="20" viewBox="0 0 20 20"><line fill="none" stroke="#000" stroke-width="1.4" x1="1" y1="1" x2="19" y2="19"/><line fill="none" stroke="#000" stroke-width="1.4" x1="19" y1="1" x2="1" y2="19"/></svg>',"drop-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"nav-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"nav-parent-icon-large":'<svg width="14" height="14" viewBox="0 0 14 14"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 4 7 10 13 4"/></svg>',"navbar-parent-icon":'<svg width="12" height="12" viewBox="0 0 12 12"><polyline fill="none" stroke="#000" stroke-width="1.1" points="1 3.5 6 8.5 11 3.5"/></svg>',"navbar-toggle-icon":'<svg width="20" height="20" viewBox="0 0 20 20"><style>.bdt-navbar-toggle-icon svg&gt;[class*=&quot;line-&quot;]{transition:0.2s ease-in-out;transition-property:transform, opacity;transform-origin:center;opacity:1}.bdt-navbar-toggle-icon svg&gt;.line-3{opacity:0}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{opacity:1}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-2{transform:rotate(45deg)}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-3{transform:rotate(-45deg)}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1,.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{opacity:0}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-1{transform:translateY(6px) scaleX(0)}.bdt-navbar-toggle-animate[aria-expanded=&quot;true&quot;] svg&gt;.line-4{transform:translateY(-6px) scaleX(0)}</style><rect width="20" height="2" y="3" class="line-1"/><rect width="20" height="2" y="9" class="line-2"/><rect width="20" height="2" y="9" class="line-3"/><rect width="20" height="2" y="15" class="line-4"/></svg>',"overlay-icon":'<svg width="40" height="40" viewBox="0 0 40 40"><rect width="1" height="40" x="19" y="0"/><rect width="40" height="1" x="0" y="19"/></svg>',"pagination-next":'<svg width="7" height="12" viewBox="0 0 7 12"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 1 6 6 1 11"/></svg>',"pagination-previous":'<svg width="7" height="12" viewBox="0 0 7 12"><polyline fill="none" stroke="#000" stroke-width="1.2" points="6 1 1 6 6 11"/></svg>',"search-icon":Pr,"search-medium":'<svg width="24" height="24" viewBox="0 0 24 24"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10.5" cy="10.5" r="9.5"/><line fill="none" stroke="#000" stroke-width="1.1" x1="23" y1="23" x2="17" y2="17"/></svg>',"search-large":'<svg width="40" height="40" viewBox="0 0 40 40"><circle fill="none" stroke="#000" stroke-width="1.8" cx="17.5" cy="17.5" r="16.5"/><line fill="none" stroke="#000" stroke-width="1.8" x1="38" y1="39" x2="29" y2="30"/></svg>',"search-toggle-icon":Pr,"slidenav-next":'<svg width="14" height="24" viewBox="0 0 14 24"><polyline fill="none" stroke="#000" stroke-width="1.4" points="1.225,23 12.775,12 1.225,1"/></svg>',"slidenav-next-large":'<svg width="25" height="40" viewBox="0 0 25 40"><polyline fill="none" stroke="#000" stroke-width="2" points="4.002,38.547 22.527,20.024 4,1.5"/></svg>',"slidenav-previous":'<svg width="14" height="24" viewBox="0 0 14 24"><polyline fill="none" stroke="#000" stroke-width="1.4" points="12.775,1 1.225,12 12.775,23"/></svg>',"slidenav-previous-large":'<svg width="25" height="40" viewBox="0 0 25 40"><polyline fill="none" stroke="#000" stroke-width="2" points="20.527,1.5 2,20.024 20.525,38.547"/></svg>'},Vr={install:function(t){t.icon.add=(e,i)=>{const n=I(e)?{[e]:i}:e;H(n,(t,e)=>{qr[e]=t,delete na[e]}),t._initialized&&Me(document.body,e=>H(t.getComponents(e),t=>{t.$options.isIcon&&t.icon in n&&t.$reset()}))}},mixins:[Or],args:"icon",props:{icon:String},isIcon:!0,beforeConnect(){K(this.$el,"bdt-icon")},methods:{async getSvg(){const t=function(t){return t=sa[t]||t,qr[t]?(na[t]||(na[t]=Wr(qr[function(t){return ht?N(N(t,"left","right"),"previous","next"):t}(t)]||qr[t])),na[t].cloneNode(!0)):null}(this.icon);if(!t)throw"Icon not found.";return t}}},Rr={args:!1,extends:Vr,data:t=>({icon:s(t.constructor.options.name)}),beforeConnect(){K(this.$el,this.$options.id)}},Ur={extends:Rr,beforeConnect(){const t=this.$props.icon;this.icon=this.$el.closest(".bdt-nav-primary")?`${t}-large`:t}},Yr={extends:Rr,mixins:[ps],i18n:{toggle:"Open Search",submit:"Submit Search"},beforeConnect(){const t=et(this.$el,"bdt-search-toggle")||et(this.$el,"bdt-navbar-toggle");if(this.icon=t?"search-toggle-icon":et(this.$el,"bdt-search-icon")&&this.$el.closest(".bdt-search-large")?"search-large":this.$el.closest(".bdt-search-medium")?"search-medium":this.$props.icon,!ot(this.$el,"aria-label"))if(t){const t=this.t("toggle");st(this.$el,"aria-label",t)}else{const t=this.$el.closest("a,button");if(t){st(t,"aria-label",this.t("submit"))}}}},Xr={extends:Rr,beforeConnect(){st(this.$el,"role","status")},methods:{async getSvg(){const t=await Vr.methods.getSvg.call(this);return 1!==this.ratio&&re(Pe("circle",t),"strokeWidth",1/this.ratio),t}}},Jr={extends:Rr,mixins:[ps],beforeConnect(){const t=this.$el.closest("a,button");st(t,"role",null!==this.role&&ve(t,"a")?"button":this.role);const e=this.t("label");e&&!ot(t,"aria-label")&&st(t,"aria-label",e)}},Gr={extends:Jr,beforeConnect(){K(this.$el,"bdt-slidenav");const t=this.$props.icon;this.icon=et(this.$el,"bdt-slidenav-large")?`${t}-large`:t}},Zr={extends:Jr,i18n:{label:"Open menu"}},Kr={extends:Jr,i18n:{label:"Close"},beforeConnect(){this.icon="close-"+(et(this.$el,"bdt-close-large")?"large":"icon")}},Qr={extends:Jr,i18n:{label:"Open"}},ta={extends:Jr,i18n:{label:"Back to top"}},ea={extends:Jr,i18n:{label:"Next page"},data:{role:null}},ia={extends:Jr,i18n:{label:"Previous page"},data:{role:null}},na={};const sa={twitter:"x"};var oa={args:"dataSrc",props:{dataSrc:String,sources:String,margin:String,target:String,loading:String},data:{dataSrc:"",sources:!1,margin:"50%",target:!1,loading:"lazy"},connected(){"lazy"!==this.loading?this.load():ha(this.$el)&&(this.$el.loading="lazy",ra(this.$el))},disconnected(){this.img&&(this.img.onload=""),delete this.img},observe:fn({handler(t,e){this.load(),e.disconnect()},options:({margin:t})=>({rootMargin:t}),filter:({loading:t})=>"lazy"===t,target:({$el:t,$props:e})=>e.target?[t,...Bt(e.target,t)]:t}),methods:{load(){if(this.img)return this.img;const t=ha(this.$el)?this.$el:function(t,e,i){const n=new Image;return function(t,e){if(e=function(t){if(!t)return[];if(l(t,"["))try{t=JSON.parse(t)}catch{t=[]}else t=ln(t);return u(t)||(t=[t]),t.filter(t=>!T(t))}(e),e.length){const i=De("<picture>");for(const t of e){const e=De("<source>");st(e,t),xe(i,e)}xe(i,t)}}(n,i),la(t,n),n.onload=()=>{ra(t,n.currentSrc)},st(n,"src",e),n}(this.$el,this.dataSrc,this.sources);return rt(t,"loading"),ra(this.$el,t.currentSrc),this.img=t}}};function ra(t,e){if(ha(t)){const e=Ct(t);(ve(e,"picture")?Dt(e):[t]).forEach(t=>la(t,t))}else e&&!c(t.style.backgroundImage,e)&&(re(t,"backgroundImage",`url(${Yt(e)})`),Zt(t,Kt("load",!1)))}const aa=["data-src","data-srcset","sizes"];function la(t,e){for(const i of aa){const n=at(t,i);n&&st(e,i.replace(/^(data-)+/,""),n)}}function ha(t){return ve(t,"img")}var ca={props:{target:String,selActive:String},data:{target:!1,selActive:!1},computed:{target:({target:t},e)=>t?Oe(t,e):e},observe:[fn({handler(t){this.isIntersecting=t.some(({isIntersecting:t})=>t),this.$emit()},target:({target:t})=>t,args:{intersecting:!1}}),pn({target:({target:t})=>t,options:{attributes:!0,attributeFilter:["class"],attributeOldValue:!0}}),{target:({target:t})=>t,observe:(t,e)=>{const i=ci([...P(t),document.documentElement],e),n=[Xt(document,"scroll itemshown itemhidden",e,{passive:!0,capture:!0}),Xt(document,"show hide transitionstart",t=>(e(),i.observe(t.target))),Xt(document,"shown hidden transitionend transitioncancel",t=>(e(),i.unobserve(t.target)))];return{observe:i.observe.bind(i),unobserve:i.unobserve.bind(i),disconnect(){i.disconnect(),n.map(t=>t())}}},handler(){this.$emit()}}],update:{read(){if(!this.isIntersecting)return!1;for(const t of P(this.target)){let e=!this.selActive||Et(t,this.selActive)?da(t):"";!1!==e&&tt(t,"bdt-light bdt-dark",e)}}}};function da(t){const e=ze(t),i=ze(window);if(!R(e,i))return!1;const{left:n,top:s,height:o,width:r}=e;let a;for(const e of[.25,.5,.75]){const l=t.ownerDocument.elementsFromPoint(Math.max(0,Math.min(n+r*e,i.width-1)),Math.max(0,Math.min(s+o/2,i.height-1)));for(const e of l){if(t.contains(e)||!ua(e)||e.closest('[class*="-leave"]')&&l.some(t=>e!==t&&Et(t,'[class*="-enter"]')))continue;const i=re(e,"--bdt-inverse");if(i){if(i===a)return`bdt-${i}`;a=i;break}}}return a?`bdt-${a}`:""}function ua(t){if("visible"!==re(t,"visibility"))return!1;for(;t;){if("0"===re(t,"opacity"))return!1;t=Ct(t)}return!0}var fa={mixins:[Qi,ro],props:{fill:String},data:{fill:"",clsWrapper:"bdt-leader-fill",clsHide:"bdt-leader-hide",attrFill:"data-fill"},computed:{fill:({fill:t},e)=>t||re(e,"--bdt-leader-fill-content")},connected(){[this.wrapper]=Te(this.$el,`<span class="${this.clsWrapper}">`)},disconnected(){Ee(this.wrapper.childNodes)},observe:un(),update:{read(){return{width:Math.trunc(this.$el.offsetWidth/2),fill:this.fill,hide:!this.matchMedia}},write({width:t,fill:e,hide:i}){it(this.wrapper,this.clsHide,i),st(this.wrapper,this.attrFill,new Array(t).join(e))},events:["resize"]}},pa={install:function({modal:t}){function e(e,i,n=V,s=V){i={bgClose:!1,escClose:!0,...i,i18n:{...t.i18n,...null==i?void 0:i.i18n}};const o=t.dialog(e(i),i);return p(new Promise(t=>{const e=Xt(o.$el,"hide",()=>t(n()));Xt(o.$el,"submit","form",i=>{i.preventDefault(),t(s(o)),e(),o.hide()})}),{dialog:o})}t.dialog=function(e,i){const n=t(Pe(`<div><div class="bdt-modal-dialog">${e}</div></div>`),{stack:!0,role:"alertdialog",...i});return n.show(),Xt(n.$el,"hidden",async()=>{await Promise.resolve(),n.$destroy(!0)},{self:!0}),n},t.alert=function(t,i){return e(({i18n:e})=>`<div class="bdt-modal-body">${I(t)?t:we(t)}</div> <div class="bdt-modal-footer bdt-text-right"> <button class="bdt-button bdt-button-primary bdt-modal-close" autofocus>${e.ok}</button> </div>`,i)},t.confirm=function(t,i){return e(({i18n:e})=>`<form> <div class="bdt-modal-body">${I(t)?t:we(t)}</div> <div class="bdt-modal-footer bdt-text-right"> <button class="bdt-button bdt-button-default bdt-modal-close" type="button">${e.cancel}</button> <button class="bdt-button bdt-button-primary" autofocus>${e.ok}</button> </div> </form>`,i,()=>Promise.reject())},t.prompt=function(t,i,n){const s=e(({i18n:e})=>`<form class="bdt-form-stacked"> <div class="bdt-modal-body"> <label>${I(t)?t:we(t)}</label> <input class="bdt-input" autofocus> </div> <div class="bdt-modal-footer bdt-text-right"> <button class="bdt-button bdt-button-default bdt-modal-close" type="button">${e.cancel}</button> <button class="bdt-button bdt-button-primary">${e.ok}</button> </div> </form>`,n,()=>null,()=>r.value),{$el:o}=s.dialog,r=Pe("input",o);return r.value=i||"",Xt(o,"show",()=>r.select()),s},t.i18n={ok:"Ok",cancel:"Cancel"}},mixins:[ns],data:{clsPage:"bdt-modal-page",selPanel:".bdt-modal-dialog",selClose:'[class*="bdt-modal-close"]'},events:[{name:"fullscreenchange webkitendfullscreen",capture:!0,handler(t){ve(t.target,"video")&&this.isToggled()&&!document.fullscreenElement&&this.hide()}},{name:"show",self:!0,handler(){et(this.panel,"bdt-margin-auto-vertical")?K(this.$el,"bdt-flex"):re(this.$el,"display","block"),Le(this.$el)}},{name:"hidden",self:!0,handler(){re(this.$el,"display",""),Q(this.$el,"bdt-flex")}}]};var ga={extends:lr,data:{targets:"> .bdt-parent",toggle:"> a",content:"> ul"}};const ma="bdt-navbar-transparent";var va={extends:yr,props:{dropbarTransparentMode:Boolean},data:{clsDrop:"bdt-navbar-dropdown",selNavItem:".bdt-navbar-nav > li > a,a.bdt-navbar-item,button.bdt-navbar-item,.bdt-navbar-item a,.bdt-navbar-item button,.bdt-navbar-toggle",dropbarTransparentMode:!1},computed:{navbarContainer:(t,e)=>e.closest(".bdt-navbar-container")},watch:{items(){const t=et(this.$el,"bdt-navbar-justify"),e=Oe(".bdt-navbar-nav, .bdt-navbar-left, .bdt-navbar-right",this.$el);for(const i of e){re(i,"flexGrow",t?Oe(".bdt-navbar-nav > li > a, .bdt-navbar-item, .bdt-navbar-toggle",i).length:"")}}},events:[{name:"show",el:({dropContainer:t})=>t,handler({target:t}){"remove"===this.getTransparentMode(t)&&et(this.navbarContainer,ma)&&(Q(this.navbarContainer,ma),this._transparent=!0)}},{name:"hide",el:({dropContainer:t})=>t,async handler(){await new Promise(t=>setTimeout(t)),!this.getActive()&&this._transparent&&(K(this.navbarContainer,ma),this._transparent=null)}}],methods:{getTransparentMode(t){if(!this.navbarContainer)return;if(this.dropbar&&this.isDropbarDrop(t))return this.dropbarTransparentMode;const e=this.getDropdown(t);return e&&et(t,"bdt-dropbar")?e.inset?"behind":"remove":void 0},getDropbarOffset(t){const{top:e,height:i}=He(this.navbarContainer);return e+("behind"===this.dropbarTransparentMode?0:i+t)}}};var ba={mixins:[ns],args:"mode",props:{mode:String,flip:Boolean,overlay:Boolean,swiping:Boolean},data:{mode:"slide",flip:!1,overlay:!1,clsPage:"bdt-offcanvas-page",clsContainer:"bdt-offcanvas-container",selPanel:".bdt-offcanvas-bar",clsFlip:"bdt-offcanvas-flip",clsContainerAnimation:"bdt-offcanvas-container-animation",clsSidebarAnimation:"bdt-offcanvas-bar-animation",clsMode:"bdt-offcanvas",clsOverlay:"bdt-offcanvas-overlay",selClose:".bdt-offcanvas-close",container:!1,swiping:!0},computed:{clsFlip:({flip:t,clsFlip:e})=>t?e:"",clsOverlay:({overlay:t,clsOverlay:e})=>t?e:"",clsMode:({mode:t,clsMode:e})=>`${e}-${t}`,clsSidebarAnimation:({mode:t,clsSidebarAnimation:e})=>"none"===t||"reveal"===t?"":e,clsContainerAnimation:({mode:t,clsContainerAnimation:e})=>"push"!==t&&"reveal"!==t?"":e,transitionElement({mode:t}){return"reveal"===t?Ct(this.panel):this.panel}},observe:bn({filter:({swiping:t})=>t}),update:{read(){this.isToggled()&&!xt(this.$el)&&this.hide()},events:["resize"]},events:[{name:"touchmove",self:!0,passive:!1,filter:({overlay:t})=>t,handler(t){t.cancelable&&t.preventDefault()}},{name:"show",self:!0,handler(){"reveal"===this.mode&&!et(Ct(this.panel),this.clsMode)&&(Ce(this.panel,"<div>"),K(Ct(this.panel),this.clsMode));const{body:t,scrollingElement:e}=document;K(t,this.clsContainer,this.clsFlip),re(t,"touch-action","pan-y pinch-zoom"),re(this.$el,"display","block"),re(this.panel,"maxWidth",e.clientWidth),K(this.$el,this.clsOverlay),K(this.panel,this.clsSidebarAnimation,"reveal"===this.mode?"":this.clsMode),Le(t),K(t,this.clsContainerAnimation),this.clsContainerAnimation&&(wa().content+=",user-scalable=0")}},{name:"hide",self:!0,handler(){Q(document.body,this.clsContainerAnimation),re(document.body,"touch-action","")}},{name:"hidden",self:!0,handler(){this.clsContainerAnimation&&function(){const t=wa();t.content=t.content.replace(/,user-scalable=0$/,"")}(),"reveal"===this.mode&&Ee(this.panel),Q(this.panel,this.clsSidebarAnimation,this.clsMode),Q(this.$el,this.clsOverlay),re(this.$el,"display",""),re(this.panel,"maxWidth",""),Q(document.body,this.clsContainer,this.clsFlip)}},{name:"swipeLeft swipeRight",handler(t){this.isToggled()&&h(t.type,"Left")^this.flip&&this.hide()}}]};function wa(){return Pe('meta[name="viewport"]',document.head)||xe(document.head,'<meta name="viewport">')}var $a={mixins:[Qi],props:{selContainer:String,selContent:String,minHeight:Number},data:{selContainer:".bdt-modal",selContent:".bdt-modal-dialog",minHeight:150},computed:{container:({selContainer:t},e)=>e.closest(t),content:({selContent:t},e)=>e.closest(t)},observe:un({target:({container:t,content:e})=>[t,e]}),update:{read(){return!!(this.content&&this.container&&xt(this.$el))&&{max:Math.max(this.minHeight,Le(this.container)-(ze(this.content).height-Le(this.$el)))}},write({max:t}){re(this.$el,{minHeight:this.minHeight,maxHeight:t})},events:["resize"]}},xa={props:["width","height"],connected(){K(this.$el,"bdt-responsive-width"),re(this.$el,"aspectRatio",`${this.width}/${this.height}`)}},ya={props:{offset:Number},data:{offset:0},connected(){!function(t){Sa.size||Xt(document,"click",Ia),Sa.add(t)}(this)},disconnected(){!function(t){Sa.delete(t),Sa.size||Jt(document,"click",Ia)}(this)},methods:{async scrollTo(t){t=t&&Pe(t)||document.body,Zt(this.$el,"beforescroll",[this,t])&&(await Ci(t,{offset:this.offset}),Zt(this.$el,"scrolled",[this,t]))}}};const Sa=new Set;function Ia(t){if(!t.defaultPrevented)for(const e of Sa)e.$el.contains(t.target)&&Mt(e.$el)&&(t.preventDefault(),window.location.href!==e.$el.href&&window.history.pushState({},"",e.$el.href),e.scrollTo(Pt(e.$el)))}const ka="bdt-scrollspy-inview";var Ca={args:"cls",props:{cls:String,target:String,hidden:Boolean,margin:String,repeat:Boolean,delay:Number},data:()=>({cls:"",target:!1,hidden:!0,margin:"-1px",repeat:!1,delay:0}),computed:{elements:({target:t},e)=>t?Oe(t,e):[e]},watch:{elements(t){this.hidden&&re(Tt(t,`:not(.${ka})`),"opacity",0)}},connected(){this.elementData=new Map},disconnected(){for(const[t,e]of this.elementData.entries())Q(t,ka,(null==e?void 0:e.cls)||"");delete this.elementData},observe:fn({target:({elements:t})=>t,handler(t){const e=this.elementData;for(const{target:i,isIntersecting:n}of t){e.has(i)||e.set(i,{cls:at(i,"bdt-scrollspy-class")||this.cls});const t=e.get(i);!this.repeat&&t.show||(t.show=n)}this.$emit()},options:({margin:t})=>({rootMargin:t}),args:{intersecting:!1}}),update:[{write(t){for(const[e,i]of this.elementData.entries())!i.show||i.inview||i.queued?!i.show&&i.inview&&!i.queued&&this.repeat&&this.toggle(e,!1):(i.queued=!0,t.promise=(t.promise||Promise.resolve()).then(()=>new Promise(t=>setTimeout(t,this.delay))).then(()=>{this.toggle(e,!0),setTimeout(()=>{i.queued=!1,this.$emit()},300)}))}}],methods:{toggle(t,e){var i,n;const s=null==(i=this.elementData)?void 0:i.get(t);if(!s)return;let o;if(null==(n=s.off)||n.call(s),re(t,"opacity",!e&&this.hidden?0:""),it(t,ka,e),it(t,s.cls),o=s.cls.match(/\bbdt-animation-[\w-]+/g)){const i=()=>Q(t,o);e?s.off=Gt(t,"animationcancel animationend",i,{self:!0}):i()}Zt(t,e?"inview":"outview"),s.inview=e}}},Ta={props:{cls:String,closest:Boolean,scroll:Boolean,target:String,offset:Number},data:{cls:"bdt-active",closest:!1,scroll:!1,target:'a[href]:not([role="button"])',offset:0},computed:{links:({target:t},e)=>Oe(t,e).filter(t=>Mt(t)),elements({closest:t}){return this.links.map(e=>e.closest(t||"*"))}},watch:{links(t){this.scroll&&this.$create("scroll",t,{offset:this.offset})}},observe:[fn(),vn()],update:[{read(){const t=this.links.map(t=>Pt(t)||t.ownerDocument),{length:e}=t;if(!e||!xt(this.$el))return!1;const i=Ai(t,!0),{scrollTop:n,scrollHeight:s}=i,o=_i(i);let r=!1;if(n>=s-o.height)r=e-1;else{const e=this.offset+ze(Mi()).height+.1*o.height;for(let i=0;i<t.length&&!(He(t[i]).top-o.top-e>0);i++)r=+i}return{active:r}},write({active:t}){const e=!1!==t&&!et(this.elements[t],this.cls);this.links.forEach(t=>t.blur());for(let e=0;e<this.elements.length;e++)it(this.elements[e],this.cls,+e===t);e&&Zt(this.$el,"active",[t,this.elements[t]])},events:["scroll","resize"]}]},Ea={mixins:[Qi,ro],props:{position:String,top:null,bottom:null,start:null,end:null,offset:String,overflowFlip:Boolean,animation:String,clsActive:String,clsInactive:String,clsFixed:String,clsBelow:String,selTarget:String,showOnUp:Boolean,targetOffset:Number},data:{position:"top",top:!1,bottom:!1,start:!1,end:!1,offset:0,overflowFlip:!1,animation:"",clsActive:"bdt-active",clsInactive:"",clsFixed:"bdt-sticky-fixed",clsBelow:"bdt-sticky-below",selTarget:"",showOnUp:!1,targetOffset:!1},computed:{target:({selTarget:t},e)=>t&&Pe(t,e)||e},connected(){this.start=Da(this.start||this.top),this.end=Da(this.end||this.bottom),this.placeholder=Pe("+ .bdt-sticky-placeholder",this.$el)||Pe('<div class="bdt-sticky-placeholder"></div>'),this.isFixed=!1,this.setActive(!1)},beforeDisconnect(){this.isFixed&&(this.hide(),Q(this.target,this.clsInactive)),_a(this.$el),ke(this.placeholder),this.placeholder=null},observe:[mn(),vn({target:()=>document.scrollingElement}),un({target:({$el:t})=>[t,Oa(t),document.scrollingElement],handler(t){this.$emit(this._data.resized&&t.some(({target:t})=>t===Oa(this.$el))?"update":"resize"),this._data.resized=!0}})],events:[{name:"load hashchange popstate",el:()=>window,filter:({targetOffset:t})=>!1!==t,handler(){const{scrollingElement:t}=document;!location.hash||0===t.scrollTop||setTimeout(()=>{const e=He(Pe(location.hash)),i=He(this.$el);this.isFixed&&R(e,i)&&(t.scrollTop=Math.ceil(e.top-i.height-Ue(this.targetOffset,"height",this.placeholder)-Ue(this.offset,"height",this.placeholder)))})}}],update:[{read({height:t,width:e,margin:i,sticky:n},s){if(this.inactive=!this.matchMedia||!xt(this.$el)||!this.$el.offsetHeight,this.inactive)return;const o=this.isFixed&&s.has("update");o&&(Pa(this.target),this.hide()),this.active||(({height:t,width:e}=ze(this.$el)),i=re(this.$el,"margin")),o&&this.show();const r=Ue("100vh","height"),a=Le(window),l=Math.max(0,document.scrollingElement.scrollHeight-r);let h=this.position;this.overflowFlip&&t>r&&(h="top"===h?"bottom":"top");const c=this.isFixed?this.placeholder:this.$el;let d=Ue(this.offset,"height",n?this.$el:c);"bottom"===h&&(t<a||this.overflowFlip)&&(d+=a-t);const u=this.overflowFlip?0:Math.max(0,t+d-r),f=He(c).top,p=ze(this.$el).height,g=(!1===this.start?f:Aa(this.start,this.$el,f))-d,m=!1===this.end?l:Math.min(l,Aa(this.end,this.$el,f+t,!0)-p-d+u);return n=l&&!this.showOnUp&&g+d===f&&m===Math.min(l,Aa(!0,this.$el,0,!0)-p-d+u)&&"visible"===re(Oa(this.$el),"overflowY"),{start:g,end:m,offset:d,overflow:u,height:t,elHeight:p,width:e,margin:i,top:je(c)[0],sticky:n,viewport:r,maxScrollHeight:l}},write({height:t,width:e,margin:i,offset:n,sticky:s}){if((this.inactive||s||!this.isFixed)&&_a(this.$el),this.inactive)return;s&&(t=e=i=0,re(this.$el,{position:"sticky",top:n}));const{placeholder:o}=this;re(o,{height:t,width:e,margin:i}),(Ct(o)!==Ct(this.$el)||s^_t(o)<_t(this.$el))&&((s?ye:Se)(this.$el,o),o.hidden=!0)},events:["resize"]},{read({scroll:t=0,dir:e="down",overflow:i,overflowScroll:n=0,start:s,end:o,elHeight:r,height:a,sticky:l,maxScrollHeight:h}){const c=Math.min(document.scrollingElement.scrollTop,h),d=t<=c?"down":"up",u=this.isFixed?this.placeholder:this.$el;return{dir:d,prevDir:e,scroll:c,prevScroll:t,below:c>He(u).top+(l?Math.min(a,r):a),offsetParentTop:He(u.offsetParent).top,overflowScroll:q(n+q(c,s,o)-q(t,s,o),0,i)}},write(t,e){const i=e.has("scroll"),{initTimestamp:n=0,dir:s,prevDir:o,scroll:r,prevScroll:a=0,top:l,start:h,below:c}=t;if(r<0||r===a&&i||this.showOnUp&&!i&&!this.isFixed)return;const d=Date.now();if((d-n>300||s!==o)&&(t.initScroll=r,t.initTimestamp=d),!(this.showOnUp&&!this.isFixed&&Math.abs(t.initScroll-r)<=30&&Math.abs(a-r)<=10))if(this.inactive||r<h||this.showOnUp&&(r<=h||"down"===s&&i||"up"===s&&!this.isFixed&&!c)){if(!this.isFixed)return void(me.inProgress(this.$el)&&l>r&&(me.cancel(this.$el),this.hide()));if(this.animation&&c){if(et(this.$el,"bdt-animation-leave"))return;me.out(this.$el,this.animation).then(()=>this.hide(),V)}else this.hide()}else this.isFixed?this.update():this.animation&&c?(this.show(),me.in(this.$el,this.animation).catch(V)):(Pa(this.target),this.show())},events:["resize","resizeViewport","scroll"]}],methods:{show(){this.isFixed=!0,this.update(),this.placeholder.hidden=!1},hide(){const{offset:t,sticky:e}=this._data;this.setActive(!1),Q(this.$el,this.clsFixed,this.clsBelow),e?re(this.$el,"top",t):re(this.$el,{position:"",top:"",width:"",marginTop:""}),this.placeholder.hidden=!0,this.isFixed=!1},update(){let{width:t,scroll:e=0,overflow:i,overflowScroll:n=0,start:s,end:o,offset:r,offsetParentTop:a,sticky:l,below:h}=this._data;const c=0!==s||e>s;if(!l){let s="fixed";e>o&&(r+=o-a+n-i,s="absolute"),re(this.$el,{position:s,width:t,marginTop:0},"important")}re(this.$el,"top",r-n),this.setActive(c),it(this.$el,this.clsBelow,h),K(this.$el,this.clsFixed)},setActive(t){const e=this.active;this.active=t,t?(tt(this.target,this.clsInactive,this.clsActive),e!==t&&Zt(this.$el,"active")):(tt(this.target,this.clsActive,this.clsInactive),e!==t&&(Pa(this.target),Zt(this.$el,"inactive")))}}};function Aa(t,e,i,n){if(!t)return 0;if(C(t)||I(t)&&t.match(/^-?\d/))return i+Ue(t,"height",e,!0);{const i=!0===t?Oa(e):Ot(t,e);return He(i).bottom-(n&&null!=i&&i.contains(e)?_(re(i,"paddingBottom")):0)}}function Da(t){return"true"===t||"false"!==t&&t}function _a(t){re(t,{position:"",top:"",marginTop:"",width:""})}const Ma="bdt-transition-disable";function Pa(t){et(t,Ma)||(K(t,Ma),requestAnimationFrame(()=>Q(t,Ma)))}function Oa(t){for(;t=Ct(t);)if(xt(t))return t}const Ba=".bdt-disabled *, .bdt-disabled, [disabled]";var Na={mixins:[Kn],args:"connect",props:{connect:String,toggle:String,itemNav:String,active:Number,followFocus:Boolean,swiping:Boolean},data:{connect:"~.bdt-switcher",toggle:"> * > :first-child",itemNav:!1,active:0,cls:"bdt-active",attrItem:"bdt-switcher-item",selVertical:".bdt-nav",followFocus:!1,swiping:!0},computed:{connects:{get:({connect:t},e)=>Bt(t,e),observe:({connect:t})=>t},connectChildren(){return this.connects.map(t=>Dt(t)).flat()},toggles:({toggle:t},e)=>Oe(t,e),children(t,e){return Dt(e).filter(t=>this.toggles.some(e=>t.contains(e)))}},watch:{connects(t){this.swiping&&re(t,"touchAction","pan-y pinch-zoom"),this.$emit()},connectChildren(){let t=Math.max(0,this.index());for(const e of this.connects)Dt(e).forEach((e,i)=>it(e,this.cls,i===t));this.$emit()},toggles(t){this.$emit();const e=this.index();this.show(~e?e:t[this.active]||t[0])}},connected(){st(this.$el,"role","tablist")},observe:[gn({targets:({connectChildren:t})=>t}),bn({target:({connects:t})=>t,filter:({swiping:t})=>t})],events:[{name:"click keydown",delegate:({toggle:t})=>t,handler(t){!Et(t.current,Ba)&&("click"===t.type||t.keyCode===zn)&&(t.preventDefault(),this.show(t.current))}},{name:"keydown",delegate:({toggle:t})=>t,handler(t){const{current:e,keyCode:i}=t,n=Et(this.$el,this.selVertical);let s=i===Fn?0:i===Hn?"last":i===jn&&!n||i===Ln&&n?"previous":i===Wn&&!n||i===qn&&n?"next":-1;if(~s){t.preventDefault();const i=this.toggles.filter(t=>!Et(t,Ba)),n=i[G(s,i,i.indexOf(e))];n.focus(),this.followFocus&&this.show(n)}}},{name:"click",el:({$el:t,connects:e,itemNav:i})=>e.concat(i?Bt(i,t):[]),delegate:({attrItem:t})=>`[${t}],[data-${t}]`,handler(t){t.target.closest("a,button")&&(t.preventDefault(),this.show(at(t.current,this.attrItem)))}},{name:"swipeRight swipeLeft",filter:({swiping:t})=>t,el:({connects:t})=>t,handler({type:t}){this.show(h(t,"Left")?"next":"previous")}}],update(){var t;for(const t of this.connects)ve(t,"ul")&&st(t,"role","presentation");st(Dt(this.$el),"role","presentation");for(const e in this.toggles){const i=this.toggles[e],n=null==(t=this.connects[0])?void 0:t.children[e];st(i,"role","tab"),n&&(i.id=Js(this,i),n.id=Js(this,n),st(i,"aria-controls",n.id),st(n,{role:"tabpanel","aria-labelledby":i.id}))}st(this.$el,"aria-orientation",Et(this.$el,this.selVertical)?"vertical":null)},methods:{index(){return d(this.children,t=>et(t,this.cls))},show(t){const e=this.toggles.filter(t=>!Et(t,Ba)),i=this.index(),n=G(!$(t)||c(e,t)?t:0,e,G(this.toggles[i],e)),s=G(e[n],this.toggles);this.children.forEach((t,e)=>{it(t,this.cls,s===e),st(this.toggles[e],{"aria-selected":s===e,tabindex:s===e?null:-1})});const o=i>=0&&i!==n;this.connects.forEach(async({children:t})=>{const e=f(t).filter((t,e)=>e!==s&&et(t,this.cls));await this.toggleElement(e,!1,o)&&await this.toggleElement(t[s],!0,o)})}}},za={mixins:[Qi],extends:Na,props:{media:Boolean},data:{media:960,attrItem:"bdt-tab-item",selVertical:".bdt-tab-left,.bdt-tab-right"},connected(){const t=et(this.$el,"bdt-tab-left")?"bdt-tab-left":!!et(this.$el,"bdt-tab-right")&&"bdt-tab-right";t&&this.$create("toggle",this.$el,{cls:t,mode:"media",media:this.media})}};var Ha={mixins:[ro,Kn],args:"target",props:{href:String,target:null,mode:"list",queued:Boolean},data:{href:!1,target:!1,mode:"click",queued:!0},computed:{target:{get:({target:t},e)=>(t=Bt(t||e.hash,e)).length?t:[e],observe:({target:t})=>t}},connected(){c(this.mode,"media")||(kt(this.$el)||st(this.$el,"tabindex","0"),!this.cls&&ve(this.$el,"a")&&st(this.$el,"role","button"))},observe:gn({targets:({target:t})=>t}),events:[{name:ut,filter:({mode:t})=>c(t,"hover"),handler(t){this._preventClick=null,ne(t)&&!S(this._showState)&&!this.$el.disabled&&(Zt(this.$el,"focus"),Gt(document,ut,()=>Zt(this.$el,"blur"),!0,t=>!this.$el.contains(t.target)),c(this.mode,"click")&&(this._preventClick=!0))}},{name:`mouseenter mouseleave ${gt} ${mt} focus blur`,filter:({mode:t})=>c(t,"hover"),handler(t){if(ne(t)||this.$el.disabled)return;const e=c(["mouseenter",gt,"focus"],t.type),i=this.isToggled(this.target);e||!(!S(this._showState)||"blur"!==t.type&&Et(this.$el,":focus")||"blur"===t.type&&Et(this.$el,":hover"))?e&&S(this._showState)&&i!==this._showState||(this._showState=e?i:null,this.toggle("toggle"+(e?"show":"hide"))):i===this._showState&&(this._showState=null)}},{name:"keydown",filter:({$el:t,mode:e})=>c(e,"click")&&!ve(t,"input"),handler(t){32===t.keyCode&&(t.preventDefault(),this.$el.click())}},{name:"click",filter:({mode:t})=>["click","hover"].some(e=>c(t,e)),handler(t){let e;(this._preventClick||t.target.closest('a[href="#"], a[href=""]')||(e=t.target.closest("a[href]"))&&(!this.isToggled(this.target)||e.hash&&Et(this.target,e.hash)))&&t.preventDefault(),!this._preventClick&&c(this.mode,"click")&&this.toggle()}},{name:"mediachange",filter:({mode:t})=>c(t,"media"),el:({target:t})=>t,handler(t,e){e.matches^this.isToggled(this.target)&&this.toggle()}}],methods:{async toggle(t){if(!Zt(this.target,t||"toggle",[this]))return;if(ot(this.$el,"aria-expanded")&&st(this.$el,"aria-expanded",!this.isToggled(this.target)),!this.queued)return this.toggleElement(this.target);const e=this.target.filter(t=>et(t,this.clsLeave));if(e.length){for(const t of this.target){const i=c(e,t);this.toggleElement(t,i,i)}return}const i=this.target.filter(this.isToggled);await this.toggleElement(i,!1)&&await this.toggleElement(this.target.filter(t=>!c(i,t)),!0)}}};return H(Object.freeze({__proto__:null,Accordion:lr,Alert:cr,Close:Kr,Cover:fr,Drop:mr,DropParentIcon:Rr,Dropdown:mr,Dropnav:yr,FormCustom:Ir,Grid:kr,HeightMatch:Er,HeightPlaceholder:_r,HeightViewport:Mr,Icon:Vr,Img:oa,Inverse:ca,Leader:fa,Margin:xn,Marker:Qr,Modal:pa,Nav:ga,NavParentIcon:Ur,Navbar:va,NavbarParentIcon:Rr,NavbarToggleIcon:Zr,Offcanvas:ba,OverflowAuto:$a,OverlayIcon:Rr,PaginationNext:ea,PaginationPrevious:ia,Responsive:xa,Scroll:ya,Scrollspy:Ca,ScrollspyNav:Ta,SearchIcon:Yr,SlidenavNext:Gr,SlidenavPrevious:Gr,Spinner:Xr,Sticky:Ea,Svg:zr,Switcher:Na,Tab:za,Toggle:Ha,Totop:ta,Video:ur}),(t,e)=>Fs.component(e,t)),function(t){lt&&window.MutationObserver&&(document.body?requestAnimationFrame(()=>ir(t)):new MutationObserver((e,i)=>{document.body&&(ir(t),i.disconnect())}).observe(document.documentElement,{childList:!0}))}(Fs),H(er,(t,e)=>Fs.component(e,t)),Fs});