var wpAjaxUrl='https://biancadata.com/wp-admin/admin-ajax.php';var flBuilderUrl='https://biancadata.com/wp-content/plugins/bb-plugin/';var FLBuilderLayoutConfig={
anchorLinkAnimations:{
duration:1000,
easing:'swing',
offset:100
},
paths:{
pluginUrl:'https://biancadata.com/wp-content/plugins/bb-plugin/',
wpAjaxUrl:'https://biancadata.com/wp-admin/admin-ajax.php'
},
breakpoints:{
small:768,
medium:992,
large:1200	},
waypoint: {
offset: 80
},
emptyColWidth: '0%'
};
(function($){
if(typeof FLBuilderLayout!='undefined'){
return;
}
FLBuilderLayout={
init: function(){
FLBuilderLayout._destroy();
FLBuilderLayout._initClasses();
FLBuilderLayout._initBackgrounds();
FLBuilderLayout._initButtons();
FLBuilderLayout._initRowShapeLayerHeight();
if(0===$('.fl-builder-edit').length){
FLBuilderLayout._initAnchorLinks();
FLBuilderLayout._initHash();
FLBuilderLayout._initForms();
FLBuilderLayout._reorderMenu();
}else{
FLBuilderLayout._initNestedColsWidth();
}
$('body').removeClass('fl-no-js');
},
refreshGalleries: function(element){
var $element='undefined'==typeof element ? $('body'):$(element),
mfContent=$element.find('.fl-mosaicflow-content'),
wmContent=$element.find('.fl-gallery'),
mfObject=null;
if(mfContent){
mfObject=mfContent.data('mosaicflow');
if(mfObject){
mfObject.columns=$([]);
mfObject.columnsHeights=[];
mfContent.data('mosaicflow', mfObject);
mfContent.mosaicflow('refill');
}}
if(wmContent){
wmContent.trigger('refreshWookmark');
}},
refreshGridLayout: function(element){
var $element='undefined'==typeof element ? $('body'):$(element),
msnryContent=$element.find('.masonry');
if(msnryContent.length){
msnryContent.masonry('layout');
}},
reloadSlider: function(content){
var $content='undefined'==typeof content ? $('body'):$(content);
if($content.find('.bx-viewport > div').length > 0){
$.each($content.find('.bx-viewport > div'), function (key, slider){
setTimeout(function (){
$(slider).data('bxSlider').reloadSlider();
}, 100);
});
}},
resizeAudio: function(element){
var $element='undefined'==typeof element ? $('body'):$(element),
audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio'),
player=null,
mejsPlayer=null,
rail=null,
railWidth=400;
if(audioPlayers.length&&typeof mejs!=='undefined'){
audioPlayers.each(function(){
player=$(this);
mejsPlayer=mejs.players[player.attr('id')];
rail=player.find('.mejs-controls .mejs-time-rail');
var innerMejs=player.find('.mejs-inner'),
total=player.find('.mejs-controls .mejs-time-total');
if(typeof mejsPlayer!=='undefined'){
railWidth=Math.ceil(player.width() * 0.8);
if(innerMejs.length){
rail.css('width', railWidth +'px!important');
mejsPlayer.options.autosizeProgress=true;
setTimeout(function (){
mejsPlayer.setControlsSize();
}, 50);
player.find('.mejs-inner').css({
visibility: 'visible',
height: 'inherit'
});
}}
});
}},
preloadAudio: function(element){
var $element='undefined'==typeof element ? $('body'):$(element),
contentWrap=$element.closest('.fl-accordion-item'),
audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio');
if(! contentWrap.hasClass('fl-accordion-item-active')&&audioPlayers.find('.mejs-inner').length){
audioPlayers.find('.mejs-inner').css({
visibility:'hidden',
height: 0
});
}},
resizeSlideshow: function(){
if(typeof YUI!=='undefined'){
YUI().use('node-event-simulate', function(Y){
Y.one(window).simulate("resize");
});
}},
reloadGoogleMap: function(element){
var $element='undefined'==typeof element ? $('body'):$(element),
googleMap=$element.find('iframe[src*="google.com/maps"]');
if(googleMap.length){
googleMap.attr('src', function(i, val){
return val;
});
}},
_destroy: function(){
var win=$(window);
win.off('scroll.fl-bg-parallax');
win.off('resize.fl-bg-video');
},
_isTouch: function(){
if(('ontouchstart' in window)||(window.DocumentTouch&&document instanceof DocumentTouch)){
return true;
}
return false;
},
_isMobile: function(){
return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent);
},
_initClasses: function(){
var body=$('body'),
ua=navigator.userAgent;
if(! body.hasClass('fl-builder-blocks-only')&&! body.hasClass('archive')&&$('.fl-builder-content-primary').length > 0){
body.addClass('fl-builder');
}
if(FLBuilderLayout._isTouch()){
body.addClass('fl-builder-touch');
}
if(FLBuilderLayout._isMobile()){
body.addClass('fl-builder-mobile');
}
if($(window).width() < FLBuilderLayoutConfig.breakpoints.small){
body.addClass('fl-builder-breakpoint-small');
}
if($(window).width() > FLBuilderLayoutConfig.breakpoints.small&&$(window).width() < FLBuilderLayoutConfig.breakpoints.medium){
body.addClass('fl-builder-breakpoint-medium');
}
if($(window).width() > FLBuilderLayoutConfig.breakpoints.medium&&$(window).width() < FLBuilderLayoutConfig.breakpoints.large){
body.addClass('fl-builder-breakpoint-large');
}
if($(window).width() > FLBuilderLayoutConfig.breakpoints.large){
body.addClass('fl-builder-breakpoint-default');
}
if(ua.indexOf('Trident/7.0') > -1&&ua.indexOf('rv:11.0') > -1){
body.addClass('fl-builder-ie-11');
}},
_initBackgrounds: function(){
var win=$(window);
if($('.fl-row-bg-parallax').length > 0&&!FLBuilderLayout._isMobile()){
FLBuilderLayout._scrollParallaxBackgrounds();
FLBuilderLayout._initParallaxBackgrounds();
win.on('resize.fl-bg-parallax', FLBuilderLayout._initParallaxBackgrounds);
win.on('scroll.fl-bg-parallax', FLBuilderLayout._scrollParallaxBackgrounds);
}
if($('.fl-bg-video').length > 0){
FLBuilderLayout._initBgVideos();
FLBuilderLayout._resizeBgVideos();
var resizeBGTimer=null;
win.on('resize.fl-bg-video', function(e){
clearTimeout(resizeBGTimer);
resizeBGTimer=setTimeout(function(){
FLBuilderLayout._resizeBgVideos(e);
}, 100);
});
}},
_initButtons: function(){
$('a.fl-button[role="button"]').on('keydown', function(event){
if(event.key==='Enter'||event.key===' '){
event.preventDefault();
$(this).trigger('click');
}});
},
_initParallaxBackgrounds: function(){
$('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);
},
_initParallaxBackground: function(){
var row=$(this),
content=row.find('> .fl-row-content-wrap'),
winWidth=$(window).width(),
screenSize='',
imageSrc={
default: '',
medium: '',
responsive: '',
};
imageSrc.default=row.data('parallax-image')||'';
imageSrc.medium=row.data('parallax-image-medium')||imageSrc.default;
imageSrc.responsive=row.data('parallax-image-responsive')||imageSrc.medium;
if(winWidth > FLBuilderLayoutConfig.breakpoints.medium){
screenSize='default';
}else if(winWidth > FLBuilderLayoutConfig.breakpoints.small&&winWidth <=FLBuilderLayoutConfig.breakpoints.medium){
screenSize='medium';
}else if(winWidth <=FLBuilderLayoutConfig.breakpoints.small){
screenSize='responsive';
}
content.css('background-image', 'url(' + imageSrc[screenSize] + ')');
row.data('current-image-loaded', screenSize);
},
_scrollParallaxBackgrounds: function(){
$('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);
},
_scrollParallaxBackground: function(){
var win=$(window),
row=$(this),
content=row.find('> .fl-row-content-wrap'),
speed=row.data('parallax-speed'),
offset=content.offset(),
yPos=-((win.scrollTop() - offset.top) / speed),
initialOffset=(row.data('parallax-offset')!=null) ? row.data('parallax-offset'):0,
totalOffset=yPos - initialOffset;
content.css('background-position', 'center ' + totalOffset + 'px');
},
_initBgVideos: function(){
$('.fl-bg-video').each(FLBuilderLayout._initBgVideo);
},
_initBgVideo: function(){
var wrap=$(this),
width=wrap.data('width'),
height=wrap.data('height'),
mp4=wrap.data('mp4'),
youtube=wrap.data('youtube'),
vimeo=wrap.data('vimeo'),
mp4Type=wrap.data('mp4-type'),
webm=wrap.data('webm'),
webmType=wrap.data('webm-type'),
fallback=wrap.data('fallback'),
loaded=wrap.data('loaded'),
videoMobile=wrap.data('video-mobile'),
playPauseButton=wrap.find('.fl-bg-video-play-pause-control'),
fallbackTag='',
videoTag=null,
mp4Tag=null,
webmTag=null;
if(loaded){
return;
}
videoTag=$('<video autoplay loop muted playsinline></video>');
if('undefined'!=typeof fallback&&''!=fallback){
videoTag.attr('poster', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')
videoTag.css({
backgroundImage: 'url("' + fallback + '")',
backgroundColor: 'transparent',
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
backgroundPosition: 'center center',
})
}
if('undefined'!=typeof mp4&&''!=mp4){
mp4Tag=$('<source />');
mp4Tag.attr('src', mp4);
mp4Tag.attr('type', mp4Type);
videoTag.append(mp4Tag);
}
if('undefined'!=typeof webm&&''!=webm){
webmTag=$('<source />');
webmTag.attr('src', webm);
webmTag.attr('type', webmType);
videoTag.append(webmTag);
}
if(! FLBuilderLayout._isMobile()||(FLBuilderLayout._isMobile()&&"yes"==videoMobile) ){
if('undefined'!=typeof youtube){
FLBuilderLayout._initYoutubeBgVideo.apply(this);
}
else if('undefined'!=typeof vimeo){
FLBuilderLayout._initVimeoBgVideo.apply(this);
}else{
wrap.append(videoTag);
if(playPauseButton.length > 0){
var video=videoTag[0];
playPauseButton.on('click', { video: video }, function(e){
var video=e.data.video;
if(video.paused){
video.play();
}else{
video.pause();
}});
$(video).on('play playing', function (){
playPauseButton.removeClass('fa-play').addClass('fa-pause');
});
$(video).on('pause ended waiting', function (){
playPauseButton.removeClass('fa-pause').addClass('fa-play');
});
}}
}else{
videoTag.attr('src', '')
wrap.append(videoTag);
}
wrap.data('loaded', true);
},
_initYoutubeBgVideo: function(){
var playerWrap=$(this),
videoId=playerWrap.data('video-id'),
videoPlayer=playerWrap.find('.fl-bg-video-player'),
enableAudio=playerWrap.data('enable-audio'),
audioButton=playerWrap.find('.fl-bg-video-audio'),
playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),
startTime='undefined'!==typeof playerWrap.data('start') ? playerWrap.data('start'):0,
startTime='undefined'!==typeof playerWrap.data('t')&&startTime===0 ? playerWrap.data('t'):startTime,
endTime='undefined'!==typeof playerWrap.data('end') ? playerWrap.data('end'):0,
loop='undefined'!==typeof playerWrap.data('loop') ? playerWrap.data('loop'):1,
stateCount=0,
player,fallback_showing;
if(videoId){
fallback=playerWrap.data('fallback')||false
if(fallback){
playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');
fallbackTag.addClass('fl-bg-video-fallback');
fallbackTag.css('background-image', 'url(' + playerWrap.data('fallback') + ')');
fallbackTag.css('background-size', 'cover');
fallbackTag.css('transition', 'background-image 1s')
playerWrap.append(fallbackTag);
fallback_showing=true;
}
FLBuilderLayout._onYoutubeApiReady(function(YT){
setTimeout(function(){
player=new YT.Player(videoPlayer[0], {
videoId: videoId,
events: {
onReady: function(event){
if("no"===enableAudio||FLBuilderLayout._isMobile()){
event.target.mute();
}
else if("yes"===enableAudio&&event.target.isMuted){
event.target.unMute();
}
playerWrap.data('YTPlayer', player);
FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);
event.target.playVideo();
if(audioButton.length > 0&&! FLBuilderLayout._isMobile()){
audioButton.on('click', {button: audioButton, player: player}, FLBuilderLayout._toggleBgVideoAudio);
}
if(playPauseButton.length > 0){
playPauseButton.on('click', {player: player}, function(e){
var player=e.data.player;
if(1===player.getPlayerState()){
player.pauseVideo();
}else{
player.playVideo();
}});
}},
onStateChange: function(event){
if(event.data===1){
if(fallback_showing){
$('.fl-bg-video-fallback').css('background-image', 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)')
}}
if(stateCount < 4){
stateCount++;
}
if(stateCount > 1&&-1===event.data&&"yes"===enableAudio){
player.mute();
player.playVideo();
audioButton.show();
}
if(event.data===YT.PlayerState.ENDED&&1===loop){
if(startTime > 0){
player.seekTo(startTime);
}else{
player.playVideo();
}}
if(event.data===YT.PlayerState.PLAYING){
playPauseButton.removeClass('fa-play').addClass('fa-pause');
}else if(event.data===YT.PlayerState.PAUSED){
playPauseButton.removeClass('fa-pause').addClass('fa-play');
}else if(event.data===YT.PlayerState.BUFFERING){
playPauseButton.removeClass('fa-play').addClass('fa-pause');
}else if(event.data===YT.PlayerState.CUED){
playPauseButton.removeClass('fa-pause').addClass('fa-play');
}else if(event.data===YT.PlayerState.ENDED){
playPauseButton.removeClass('fa-pause').addClass('fa-play');
}},
onError: function(event){
console.info('YT Error: ' + event.data)
FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)
}},
playerVars: {
playsinline: FLBuilderLayout._isMobile() ? 1:0,
controls: 0,
showinfo: 0,
rel:0,
start: startTime,
end: endTime,
}});
}, 1);
});
}},
_onErrorYoutubeVimeo: function(playerWrap){
fallback=playerWrap.data('fallback')||false
if(! fallback){
return false;
}
playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');
fallbackTag.addClass('fl-bg-video-fallback');
fallbackTag.css('background-image', 'url(' + playerWrap.data('fallback') + ')');
playerWrap.append(fallbackTag);
},
_onYoutubeApiReady: function(callback){
if(window.YT&&YT.loaded){
callback(YT);
}else{
setTimeout(function(){
FLBuilderLayout._onYoutubeApiReady(callback);
}, 350);
}},
_initVimeoBgVideo: function(){
var playerWrap=$(this),
videoId=playerWrap.data('video-id'),
videoHash=playerWrap.data('video-hash'),
videoPlayer=playerWrap.find('.fl-bg-video-player'),
enableAudio=playerWrap.data('enable-audio'),
audioButton=playerWrap.find('.fl-bg-video-audio'),
playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),
playerState='',
player,
width=playerWrap.outerWidth(),
ua=navigator.userAgent;
if(typeof Vimeo!=='undefined'&&videoId){
const vimOptions={
loop:true,
title:false,
portrait:false,
background:true,
autopause:false,
muted:true,
};
if(videoHash.length){
vimOptions.url=`https://player.vimeo.com/video/${ videoId }?h=${ videoHash }`;
}else{
vimOptions.id=videoId;
}
player=new Vimeo.Player(videoPlayer[0], vimOptions);
playerWrap.data('VMPlayer', player);
if("no"===enableAudio){
player.setVolume(0);
}
else if("yes"===enableAudio){
if(ua.indexOf("Safari") > -1||ua.indexOf("Chrome") > -1||ua.indexOf("Firefox") > -1){
player.setVolume(0);
audioButton.show();
}else{
player.setVolume(1);
}}
player.play().catch(function(error){
FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)
});
if(audioButton.length > 0){
audioButton.on('click', {button: audioButton, player: player}, FLBuilderLayout._toggleBgVideoAudio);
}
player.on('play', function(){
playerState='play';
playPauseButton.removeClass('fa-play').addClass('fa-pause');
});
player.on('pause', function(){
playerState='pause';
playPauseButton.removeClass('fa-pause').addClass('fa-play');
});
player.on('ended', function(){
playerState='ended';
playPauseButton.removeClass('fa-pause').addClass('fa-play');
});
player.on('bufferstart', function(){
playerState='bufferstart';
playPauseButton.removeClass('fa-play').addClass('fa-pause');
});
if(playPauseButton.length > 0){
playPauseButton.on('click', { player: player }, function(e){
var player=e.data.player;
if(playerState==='play'){
player.pause();
}else{
player.play();
}});
}}
},
_toggleBgVideoAudio: function(e){
var player=e.data.player,
control=e.data.button.find('.fl-audio-control');
if(control.hasClass('fa-volume-off') ){
control
.removeClass('fa-volume-off')
.addClass('fa-volume-up');
e.data.button.find('.fa-times').hide();
if('function'===typeof player.unMute){
player.unMute();
}else{
player.setVolume(1);
}}else{
control
.removeClass('fa-volume-up')
.addClass('fa-volume-off');
e.data.button.find('.fa-times').show();
if('function'===typeof player.unMute){
player.mute();
}else{
player.setVolume(0);
}}
},
_videoBgSourceError: function(e){
var source=$(e.target),
wrap=source.closest('.fl-bg-video'),
vid=wrap.find('video'),
fallback=wrap.data('fallback'),
fallbackTag='';
source.remove();
if(vid.find('source').length){
return;
}else if(''!==fallback){
fallbackTag=$('<div></div>');
fallbackTag.addClass('fl-bg-video-fallback');
fallbackTag.css('background-image', 'url(' + fallback + ')');
wrap.append(fallbackTag);
vid.remove();
}},
_resizeBgVideos: function(){
$('.fl-bg-video').each(function(){
FLBuilderLayout._resizeBgVideo.apply(this);
if($(this).parent().find('img').length > 0){
$(this).parent().imagesLoaded($.proxy(FLBuilderLayout._resizeBgVideo, this) );
}});
},
_resizeBgVideo: function(){
if(0===$(this).find('video').length&&0===$(this).find('iframe').length){
return;
}
var wrap=$(this),
wrapHeight=wrap.outerHeight(),
wrapWidth=wrap.outerWidth(),
vid=wrap.find('video'),
vidHeight=wrap.data('height'),
vidWidth=wrap.data('width'),
newWidth=wrapWidth,
newHeight=Math.round(vidHeight * wrapWidth/vidWidth),
newLeft=0,
newTop=0,
iframe=wrap.find('iframe'),
isRowFullHeight=$(this).closest('.fl-row-bg-video').hasClass('fl-row-full-height'),
vidCSS={
top:       '50%',
left:      '50%',
transform: 'translate(-50%,-50%)',
};
if(vid.length){
if(vidHeight===''||typeof vidHeight==='undefined'||vidWidth===''||typeof vidWidth==='undefined'){
vid.css({
'left':'0px',
'top':'0px',
'width':newWidth + 'px'
});
vid.on('loadedmetadata', FLBuilderLayout._resizeOnLoadedMeta);
return;
}
if(! isRowFullHeight){
if(newHeight < wrapHeight){
newHeight=wrapHeight;
newLeft=-((newWidth - wrapWidth) / 2);
newWidth=vidHeight ? Math.round(vidWidth * wrapHeight/vidHeight):newWidth;
}else{
newTop=-((newHeight - wrapHeight)/2);
}
vidCSS={
left:newLeft + 'px',
top:newTop + 'px',
height:newHeight + 'px',
width:newWidth + 'px',
}}
vid.css(vidCSS);
}
else if(iframe.length){
if(typeof wrap.data('youtube')!=='undefined'){
FLBuilderLayout._resizeYoutubeBgVideo.apply(this);
}}
},
_resizeOnLoadedMeta: function(){
var video=$(this),
wrapHeight=video.parent().outerHeight(),
wrapWidth=video.parent().outerWidth(),
vidWidth=video[0].videoWidth,
vidHeight=video[0].videoHeight,
newHeight=Math.round(vidHeight * wrapWidth/vidWidth),
newWidth=wrapWidth,
newLeft=0,
newTop=0;
if(newHeight < wrapHeight){
newHeight=wrapHeight;
newWidth=Math.round(vidWidth * wrapHeight/vidHeight);
newLeft=-((newWidth - wrapWidth)/2);
}else{
newTop=-((newHeight - wrapHeight)/2);
}
video.parent().data('width', vidWidth);
video.parent().data('height', vidHeight);
video.css({
'left':newLeft + 'px',
'top':newTop + 'px',
'width':newWidth + 'px',
'height':newHeight + 'px'
});
},
_resizeYoutubeBgVideo: function(){
var wrap=$(this),
wrapWidth=wrap.outerWidth(),
wrapHeight=wrap.outerHeight(),
player=wrap.data('YTPlayer'),
video=player ? player.getIframe():null,
aspectRatioSetting='16:9',
aspectRatioArray=aspectRatioSetting.split(':'),
aspectRatio=aspectRatioArray[0] / aspectRatioArray[1],
ratioWidth=wrapWidth / aspectRatio,
ratioHeight=wrapHeight * aspectRatio,
isWidthFixed=wrapWidth / wrapHeight > aspectRatio,
width=isWidthFixed ? wrapWidth:ratioHeight,
height=isWidthFixed ? ratioWidth:wrapHeight;
if(video){
$(video).width(width).height(height);
}},
_initHash: function(){
var hash=window.location.hash.replace('#', '').split('/').shift(),
element=null,
tabs=null,
responsiveLabel=null,
tabIndex=null,
label=null;
if(''!==hash){
try {
element=$('#' + hash);
if(element.length > 0){
if(element.hasClass('fl-accordion-item') ){
setTimeout(function(){
element.find('.fl-accordion-button').trigger('click');
}, 100);
}
if(element.hasClass('fl-tabs-panel') ){
setTimeout(function(){
tabs=element.closest('.fl-tabs');
responsiveLabel=element.find('.fl-tabs-panel-label');
tabIndex=responsiveLabel.data('index');
label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']');
label[0].click();
FLBuilderLayout._scrollToElement(element);
}, 100);
}}
}
catch(e){}}
},
_initAnchorLinks: function(){
$('a, [role="link"]').each(FLBuilderLayout._initAnchorLink);
},
_initAnchorLink: function(){
var link=$(this),
href=link.data('url') ? link.data('url'):link.attr('href'),
target=link.data('url') ? new URL(href, window.location.href):this,
loc=window.location,
id=null,
element=null,
flNode=false;
if('undefined'!=typeof href&&href.indexOf('#') > -1&&link.closest('svg').length < 1){
if(loc.pathname.replace(/^\//, '')==target.pathname.replace(/^\//, '')&&loc.hostname==target.hostname){
try {
id=href.split('#').pop();
if(! id){
return;
}
element=$('#' + id);
if(element.length > 0){
flNode=element.hasClass('fl-row')||element.hasClass('fl-col')||element.hasClass('fl-module');
if(!element.hasClass('fl-no-scroll')&&(link.hasClass('fl-scroll-link')||flNode) ){
$(link).on('click', FLBuilderLayout._scrollToElementOnLinkClick);
}
if(element.hasClass('fl-accordion-item') ){
$(link).on('click', FLBuilderLayout._scrollToAccordionOnLinkClick);
}
if(element.hasClass('fl-tabs-panel') ){
$(link).on('click', FLBuilderLayout._scrollToTabOnLinkClick);
}}
}
catch(e){}}
}},
_scrollToElementOnLinkClick: function(e, callback){
var attribute=$(this).data('url') ? $(this).data('url'):$(this).attr('href');
var element=$('#' + attribute.split('#').pop());
FLBuilderLayout._scrollToElement(element, callback);
e.preventDefault();
},
_scrollToElement: function(element, callback){
var config=FLBuilderLayoutConfig.anchorLinkAnimations,
dest=0,
win=$(window),
doc=$(document);
if(element.length > 0){
if('fixed'===element.css('position')||'fixed'===element.parent().css('position')){
dest=element.position().top;
}
else if(element.offset().top > doc.height() - win.height()){
dest=doc.height() - win.height();
}else{
dest=element.offset().top - config.offset;
}
$('html, body').stop(true).animate({ scrollTop: dest }, config.duration, config.easing, function(){
if('undefined'!=typeof callback){
callback();
}
if(undefined!=element.attr('id')&&window.location.hash!=='#' + element.attr('id') ){
var firefox_version=window.navigator.userAgent.match(/Firefox\/(\d+)\./),
firefox_version=firefox_version ? parseInt(firefox_version[1], 10):null;
if(firefox_version!==null&&firefox_version < 135){
window.location.hash=element.attr('id');
}else{
if(history.pushState){
history.pushState(null, null, '#' + element.attr('id') );
}else{
window.location.hash=element.attr('id');
}}
}});
}},
_scrollToAccordionOnLinkClick: function(e){
var element=$('#' + $(this).attr('href').split('#').pop());
if(element.length > 0){
var callback=function(){
if(element){
element.find('.fl-accordion-button').trigger('click');
element=false;
}};
FLBuilderLayout._scrollToElementOnLinkClick.call(this, e, callback);
}},
_scrollToTabOnLinkClick: function(e){
var element=$('#' + $(this).attr('href').split('#').pop()),
tabs=null,
label=null,
responsiveLabel=null;
if(element.length > 0){
tabs=element.closest('.fl-tabs');
responsiveLabel=element.find('.fl-tabs-panel-label');
tabIndex=responsiveLabel.data('index');
label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index=' + tabIndex + ']');
if(responsiveLabel.is(':visible') ){
var callback=function(){
if(element){
responsiveLabel.trigger($.Event('click', { which: 1 }) );
}};
FLBuilderLayout._scrollToElementOnLinkClick.call(this, e, callback);
}else{
label[0].click();
FLBuilderLayout._scrollToElement(element);
}
e.preventDefault();
}},
_initForms: function(){
if(! FLBuilderLayout._hasPlaceholderSupport){
$('.fl-form-field input').each(FLBuilderLayout._initFormFieldPlaceholderFallback);
}
$('.fl-form-field input').on('focus', FLBuilderLayout._clearFormFieldError);
},
_hasPlaceholderSupport: function(){
var input=document.createElement('input');
return 'undefined'!=input.placeholder;
},
_initFormFieldPlaceholderFallback: function(){
var field=$(this),
val=field.val(),
placeholder=field.attr('placeholder');
if('undefined'!=placeholder&&''===val){
field.val(placeholder);
field.on('focus', FLBuilderLayout._hideFormFieldPlaceholderFallback);
field.on('blur', FLBuilderLayout._showFormFieldPlaceholderFallback);
}},
_hideFormFieldPlaceholderFallback: function(){
var field=$(this),
val=field.val(),
placeholder=field.attr('placeholder');
if(val==placeholder){
field.val('');
}},
_showFormFieldPlaceholderFallback: function(){
var field=$(this),
val=field.val(),
placeholder=field.attr('placeholder');
if(''===val){
field.val(placeholder);
}},
_clearFormFieldError: function(){
var field=$(this);
field.removeAttr('aria-invalid');
field.removeClass('fl-form-error');
const message=field.attr('aria-describedby');
message ? $('#' + message).hide():field.siblings('.fl-form-error-message').hide();
},
_initRowShapeLayerHeight: function (){
FLBuilderLayout._adjustRowShapeLayerHeight();
$(window).on('resize', FLBuilderLayout._adjustRowShapeLayerHeight);
},
_initNestedColsWidth: function(){
var nestedCols=$('.fl-col-has-cols');
if(nestedCols.length <=0){
return;
}
$(nestedCols).each(function(index, col){
if($(col).width() <=0){
$(col).css('width', FLBuilderLayoutConfig.emptyColWidth);
}});
},
_adjustRowShapeLayerHeight: function(){
var rowShapeLayers=$('.fl-builder-shape-layer');
$(rowShapeLayers).each(function (index){
var rowShapeLayer=$(this),
shape=$(rowShapeLayer).find('svg'),
height=shape.height(),
excludeShapes='.fl-builder-shape-circle, .fl-builder-shape-dot-cluster, .fl-builder-shape-topography, .fl-builder-shape-rect';
if(! rowShapeLayer.is(excludeShapes) ){
$(shape).css('height', Math.ceil(height) );
}});
},
_string_to_slug: function(str){
str=str.replace(/^\s+|\s+$/g, '');
if('undefined'==typeof window._fl_string_to_slug_regex){
regex=new RegExp('[^a-zA-Z0-9\'":() !.,-_|]', 'g');
}else{
regex=new RegExp('[^' + window._fl_string_to_slug_regex + '\'":\(\) !.,-_|\\\p{Letter}]', 'ug');
}
str=str.replace(regex, '')
.replace(/\s+/g, ' ');
return str;
},
_reorderMenu: function(){
if($('#wp-admin-bar-fl-builder-frontend-edit-link-default li').length > 1){
$('#wp-admin-bar-fl-builder-frontend-duplicate-link')
.appendTo('#wp-admin-bar-fl-builder-frontend-edit-link-default')
.css('padding-top', '5px')
.css('border-top', '2px solid #1D2125')
.css('margin-top', '5px')
}}
};
$(function(){
FLBuilderLayout.init();
});
})(jQuery);
(function($){
if(typeof FLBuilderLayoutModules!=='undefined'){
return;
}
FLBuilderLayoutModules={
init: function(){
if(0===$('.fl-builder-edit').length){
FLBuilderLayoutModules._initModuleAnimations();
}},
_initModuleAnimations: function(){
if(typeof jQuery.fn.waypoint!=='undefined'){
$('.fl-animation').each(function(){
var node=$(this),
nodeTop=node.offset().top,
winHeight=$(window).height(),
bodyHeight=$('body').height(),
waypoint=FLBuilderLayoutConfig.waypoint,
offset='80%';
if(typeof waypoint.offset!==undefined){
offset=FLBuilderLayoutConfig.waypoint.offset + '%';
}
if(bodyHeight - nodeTop < winHeight * 0.2){
offset='100%';
}
node.waypoint({
offset: offset,
handler: FLBuilderLayoutModules._doModuleAnimation
});
});
}},
_doModuleAnimation: function(){
var module='undefined'==typeof this.element ? $(this):$(this.element),
delay=parseFloat(module.data('animation-delay')),
duration=parseFloat(module.data('animation-duration'));
if(! isNaN(duration) ){
module.css('animation-duration', duration + 's');
}
if(!isNaN(delay)&&delay > 0){
setTimeout(function(){
module.addClass('fl-animated');
}, delay * 1000);
}else{
setTimeout(function(){
module.addClass('fl-animated');
}, 1);
}}
};
$(function(){
FLBuilderLayoutModules.init();
});
})(jQuery);
(function($){
})(jQuery);
(function($){
})(jQuery);
(function($){
})(jQuery);
(function($){
})(jQuery);
function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count");if(e){var o=e.innerHTML;e.setAttribute("aria-hidden","true");var t=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=o,clearTimeout(t)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id");e(this).append('<button type="button" class="show-password-input" aria-label="'+woocommerce_params.i18n_password_show+'" aria-describedBy="'+o+'"></button>')}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").focus()}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready);
(function($){
var quickView={
css: '',
js: '',
html: {},
height: {},
node: ''
};
var scriptsEnqueued={
css: false,
js: false,
};
$('body').on('click', '.woopack-product-quick-view', function(e){
e.preventDefault();
e.stopPropagation();
var nodeId=$(this).parents('.fl-module').attr('data-node'),
products=$('.fl-node-' + nodeId).find('.woopack-products');
var product=$(this).parents('.product'),
productId=product.data('product-id')||$(this).data('product'),
template=$(this).data('template')||false,
processAjax=true;
quickView.node=$('.fl-node-' + nodeId);
if('undefined'!==typeof quickView.html[productId]){
processAjax=false;
}
if(products.hasClass('owl-carousel')){
products.trigger('stop.owl.autoplay');
}
new WooPackModal({
source: 'ajax',
ajaxUrl: woopack_config.ajaxurl,
ajaxData: {
action: 'woopack_product_quick_view',
node_id: nodeId,
product_id: productId,
template: template,
templateJS: ''===quickView.js,
templateCSS: ''===quickView.css,
},
processAjax: processAjax,
breakpoint: 767,
animationSpeed: 0,
cssClass: 'woopack-modal-' + nodeId,
responseHandler: function(response, object){
var contentWrap=object.contentWrap;
if('undefined'!==typeof quickView.height[productId]){
}
if(''===quickView.css&&'undefined'!==typeof response.css){
quickView.css=response.css;
}
if(''===quickView.js&&'undefined'!==typeof response.js){
quickView.js=response.js;
}
if(! scriptsEnqueued.css){
$('head').prepend(quickView.css);
scriptsEnqueued.css=true;
}
if('undefined'!==typeof quickView.html[productId]){
contentWrap.html(quickView.html[productId]);
}else{
contentWrap.html(response.html);
quickView.html[productId]=response.html;
}
if(template){
contentWrap.imagesLoaded(function(){
if(! scriptsEnqueued.js){
$('body').append(quickView.js);
scriptsEnqueued.js=true;
}else{
contentWrap.find('.woocommerce-product-gallery').each(function(){
$(this).trigger('wc-product-gallery-before-init', [ this, wc_single_product_params ]);
$(this).wc_product_gallery(wc_single_product_params);
$(this).trigger('wc-product-gallery-after-init', [ this, wc_single_product_params ]);
});
contentWrap.find('.wc-tabs-wrapper, .woocommerce-tabs, #rating').trigger('init');
}
$(quickView.html[productId]).find('.woopack-product').html(contentWrap.find('.woopack-product').html());
object._resetHeight();
setTimeout(function(){
object.wrapper.addClass('woopack-ajax-loaded');
}, 100);
});
}else{
setTimeout(function(){
object.wrapper.addClass('woopack-ajax-loaded');
}, 100);
}},
onAjaxLoad: function(object){
var wrapper=object.wrapper;
if('undefined'===typeof quickView.height[productId]){
quickView.height[productId]=wrapper.find('.woopack-modal-inner').outerHeight();
}
wrapper.find('.woocommerce-product-gallery .woocommerce-product-gallery__image a').on('click', function(e){
e.preventDefault();
e.stopPropagation();
var imageEl=$(this).parents('.woocommerce-product-gallery__image');
var firstEl=imageEl.parents('.woocommerce-product-gallery').find('.woocommerce-product-gallery__image:first');
imageEl.insertBefore(firstEl);
});
if(typeof $.fn.wc_variation_form!=='undefined'){
if(wrapper.find('form.variations_form').length > 0){
wrapper.find('form.variations_form').wc_variation_form();
}}
wrapper.find('.product-type-external form.cart').attr('target', '_blank');
if(wrapper.find('.woo-variation-gallery-wrapper').length > 0&&'undefined'!==typeof jQuery.fn.WooVariationGallery){
wrapper.find('.woo-variation-gallery-wrapper').WooVariationGallery();
}
if(wrapper.find('.form.variations_form').length > 0&&'undefined'!==typeof jQuery.fn.WooVariationSwatches){
if(wrapper.find('.woo-variation-items-wrapper').length > 0){
wrapper.find('.form.variations_form').WooVariationSwatches();
}}
wrapper.trigger('quick-view-displayed');
$('body').trigger('woopack.quickview.ajaxload', [wrapper]);
},
onClose: function(wrapper){
wrapper.removeClass('woopack-modal-' + nodeId);
wrapper.removeClass('woopack-ajax-loaded');
wrapper.removeClass('woopack-images-loaded');
$('body').remove('woopack-pswp');
setTimeout(function(){
if(products.hasClass('owl-carousel')){
products.trigger('refresh.owl.carousel');
}}, 500);
},
});
});
$(window).on('resize', function(){
if(window.innerWidth > 767){
$('.woopack-modal .woopack-modal-inner').css({
height: 'auto'
});
}});
$(document).on('added_to_cart', function(e, fragments, cart_hash, $button){
if($button&&$button.length > 0&&$button.parents('.woopack-modal').length > 0){
if(''!==quickView.node&&quickView.node.length > 0&&quickView.node.hasClass('woopack-qv-close-on-add') ){
setTimeout(function(){
$button.parents('.woopack-modal').fadeOut(function(){
$(this).find('.woopack-modal-close').trigger('click')
});
}, 500);
}}
});
$('body').on('change keyup blur', '.woopack-products .quantity input.qty', function(){
var qty=parseFloat($(this).val());
qty=(0===qty||''===qty) ? 1:qty;
$(this).val(qty);
$(this).parents('.woopack-product-action').find('a.button').attr('data-quantity', qty);
});
if('undefined'===typeof wc_add_to_cart_params){
return false;
}
var getAjaxExtraData=function(){
var data={};
if('undefined'!==typeof wc_cart_fragments_params){
var ajaxUrl=wc_cart_fragments_params.wc_ajax_url;
var fragments=ajaxUrl.split('&');
fragments=fragments.slice(1, fragments.length);
fragments.forEach(function(item){
var queryArg=item.split('=');
var value='undefined'===typeof queryArg[1] ? true:queryArg[1];
data[ queryArg[0] ]=value;
});
}
return data;
};
$('body').on('submit', '.woopack-modal form.cart, .woopack-single-product form.cart', function(e){
if($(this).hasClass('variations_form')&&typeof $.fn.wc_variation_form==='undefined'){
return;
}
if($(this).parents('.product-type-external').length > 0){
return;
}
if($(this).parents('.woopack-no-ajax').length > 0){
return;
}
e.preventDefault();
e.stopPropagation();
var form=$(this);
var grouped=$(this).hasClass('grouped_form');
var $thisbutton=$(this).find('button[type="submit"]');
if(grouped){
$(this).find('.woocommerce-grouped-product-list tr').each(function(){
var qty=$(this).find('input.qty').val();
var productId=$(this).attr('id').split('-')[1];
if(qty > 0){
var data={
'quantity': qty,
'product_id': productId,
};
$thisbutton.removeClass('added');
$thisbutton.addClass('loading');
$(document.body).trigger('adding_to_cart', [ $thisbutton, data ]);
addToCart($thisbutton, data);
}});
}else{
if($(this).find('input[name="variation_id"]').length > 0){
handleVariationForm($(this));
}else{
var data={
'action': 'woopack_add_to_cart',
'quantity': $(this).find('.qty').val(),
'product_id': $(this).find('.single_add_to_cart_button').val(),
};
var formData=form.serializeArray();
formData.forEach(function(field, index){
if('undefined'!==typeof field&&'undefined'===typeof data[field.name]&&'add-to-cart'!==field.name){
data[field.name]=field.value;
}});
if(form.find('.wc-bookings-booking-form').length > 0){
data.product_id=form.find('.wc-booking-product-id').val();
}
if(form.find('.wc-appointment-product-id').length > 0){
data.product_id=form.find('.wc-appointment-product-id').val();
}
$thisbutton.removeClass('added');
$thisbutton.addClass('loading');
$(document.body).trigger('adding_to_cart', [ $thisbutton, data ]);
addToCart($thisbutton, data);
}}
});
$('body').on('submit', '.woopack-products .product .variations_form, .woopack-product-add-to-cart .variations_form', function(e){
if(typeof wc_add_to_cart_params==='undefined'){
return;
}
if($(this).parents('.woopack-no-ajax').length > 0){
return;
}
e.preventDefault();
e.stopPropagation();
handleVariationForm($(this));
});
$('body').on('submit', '.woopack-products .product .grouped_form', function(e){
e.preventDefault();
e.stopPropagation();
var $thisbutton=$(this).find('button[type="submit"]');
$(this).find('.woocommerce-grouped-product-list tr').each(function(){
var qty=$(this).find('input.qty').val();
var productId=$(this).attr('id').split('-')[1];
if(qty > 0){
var data={
'quantity': qty,
'product_id': productId,
};
$thisbutton.removeClass('added');
$thisbutton.addClass('loading');
$(document.body).trigger('adding_to_cart', [ $thisbutton, data ]);
addToCart($thisbutton, data);
}});
});
var handleVariationForm=function($form){
var data={
'action': 'woopack_add_to_cart',
'quantity': $form.find('.qty').val(),
'product_id': $form.find('input[name="product_id"]').val(),
'variation_id': $form.find('input[name="variation_id"]').val(),
};
var variations=$form.data('product_variations')[0];
var attributes=[];
var attrKeys=[];
if(variations&&'undefined'!==typeof variations.attributes){
Object.keys(variations.attributes).map(function(attr){
if($form.find('[name="' + attr + '"]').length > 0){
var attr_string=attr + '|' + $form.find('[name="' + attr + '"]').val();
attributes.push(attr_string);
attrKeys.push(attr);
}});
data['variation']=attributes;
}
var formData=$form.serializeArray();
formData.forEach(function(d, i){
if('undefined'!==typeof d&&'undefined'===typeof data[d.name]&&'add-to-cart'!==d.name&&-1===$.inArray(d.name, attrKeys) ){
data[d.name]=d.value;
}});
var $thisbutton=$form.find('button[type="submit"]');
$thisbutton.removeClass('added');
$thisbutton.addClass('loading');
$(document.body).trigger('adding_to_cart', [ $thisbutton, data ]);
addToCart($thisbutton, data);
};
var addToCart=function($thisbutton, data){
var url=wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'add_to_cart');
if(typeof data.action!=='undefined'){
url=woopack_config.ajaxurl;
data=$.extend(data, getAjaxExtraData());
}
$.post(url, data, function(response){
if(! response){
return;
}
if(response.error&&response.product_url){
window.location=response.product_url;
return;
}
if(wc_add_to_cart_params.cart_redirect_after_add==='yes'){
window.location=wc_add_to_cart_params.cart_url;
return;
}
$(document.body).trigger('added_to_cart', [ response.fragments, response.cart_hash, $thisbutton ]);
});
};
$('body').on('change', '.woopack-products .product .variations_form select, .woopack-single-product .variations_form select', function(){
var $this=$(this), attr=$this.attr('name'), val=$this.val(),
form=$this.parents('.variations_form');
if($this.parents('.woopack-product-grid.product').length > 0){
var img=$this.parents('.woopack-product-grid.product').find('.woopack-product-image img');
}else{
var img=$this.parents('.woopack-single-product').find('.single-product-image img');
}
var variations=form.data('product_variations');
if(! variations){
return;
}
variations.forEach(function (item){
if('undefined'!==typeof item.attributes[ attr ]&&val===item.attributes[ attr ]){
if('undefined'!==typeof item.image){
img.attr('src', item.image.thumb_src);
img.attr('srcset', item.image.srcset);
}}
});
});
$(document).on('wc_cart_button_updated', function(e, $button){
if($button&&$button.length > 0){
$button.parent().find('a.added_to_cart').addClass('button alt');
}});
var w=$('.woopack-product-image').find('.woopack-product-featured-image').attr('width');
$('.woopack-product-image').find('.woocommerce-placeholder.wp-post-image').width(w);
var setCustomQty=function(){
if($('.woopack-qty-custom').length > 0&&$('.woopack-qty-custom .qty-minus').length===0){
var minus='<span class="qty-minus"></span>';
var plus='<span class="qty-plus"></span>';
$('.woopack-qty-custom input.qty').each(function(){
if(! $(this).parent().hasClass('woopack-qty-input')){
$(this).parent().addClass('woopack-qty-input');
}
$(minus).insertBefore($(this));
$(plus).insertAfter($(this));
var qty=$(this);
$(this).parent().find('.qty-minus').on('click', function(){
qty[0].stepDown();
qty.trigger('change');
});
$(this).parent().find('.qty-plus').on('click', function(){
qty[0].stepUp();
qty.trigger('change');
});
});
}};
setCustomQty();
$(document).on('woopack.grid.rendered', function(){
setCustomQty();
});
$('.woopack-checkout.style-enhanced button[name="apply_coupon"]').on('click', function(e){
e.preventDefault();
if(! wc_checkout_params){
return;
}
var $form=$(this).parents('.woopack-checkout-coupon');
startFormProcessing($form);
var data={
security: wc_checkout_params.apply_coupon_nonce,
coupon_code: $form.find('input[name="coupon_code"]').val()
};
$.ajax({
type: 'POST',
url: wc_checkout_params.wc_ajax_url.toString().replace('%%endpoint%%', 'apply_coupon'),
context: this,
data,
success: function(code){
$('.woocommerce-error, .woocommerce-message').remove();
stopFormProcessing($form);
if(code){
$form.append(code);
$form.find('input[name="coupon_code"]').val('');
$('body').trigger('applied_coupon_in_checkout', [data.coupon_code]);
$('body').trigger('update_checkout', {
update_shipping_method: false
});
}},
dataType: 'html'
});
});
var startFormProcessing=function($form){
if($form.is('.processing')){
return;
}
$form.addClass('processing').block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}});
}
var stopFormProcessing=function($form){
$form.removeClass('processing').unblock();
};})(jQuery);
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
;
(function($){
FLBuilderMenu=function(settings){
this.nodeId=settings.id;
this.nodeClass='.fl-node-' + settings.id;
this.wrapperClass=this.nodeClass + ' .fl-menu';
this.type=settings.type;
this.mobileToggle=settings.mobile;
this.mobileBelowRow=settings.mobileBelowRow;
this.mobileFlyout=settings.mobileFlyout;
this.breakPoints=settings.breakPoints;
this.mobileBreakpoint=settings.mobileBreakpoint;
this.currentBrowserWidth=$(window).width();
this.postId=settings.postId;
this.mobileStacked=settings.mobileStacked;
this.submenuIcon=settings.submenuIcon;
this.flyoutWidth=settings.flyoutWidth;
this._initMenu();
$(window).on('resize', $.proxy(function(){
var width=$(window).width();
if(width!=this.currentBrowserWidth){
this.currentBrowserWidth=width;
this._initMenu(true);
this._clickOrHover(true);
}
this._resizeFlyoutMenuPanel();
}, this) );
$(window).on('scroll', $.proxy(function(){
this._resizeFlyoutMenuPanel();
}, this) );
$(this.wrapperClass).on('keydown', '.fl-menu-mobile-toggle, .menu-item:first a:first', $.proxy(function(event){
if(event.key!=='Tab'||! this._isMenuToggle()||! this._isMobileBelowRowEnabled()){
return;
}
if(event.shiftKey&&$(event.currentTarget).is('a') ){
event.preventDefault();
$(this.wrapperClass).find('.fl-menu-mobile-toggle').trigger('focus');
}
else if(! event.shiftKey&&$(event.currentTarget).hasClass('fl-menu-mobile-toggle')&&$(event.currentTarget).hasClass('fl-active') ){
event.preventDefault();
$(this.wrapperClass).find('.menu-item:first a:first').trigger('focus');
}}, this) );
$(this.wrapperClass).on('focusout', $.proxy(function(event){
if($(this.wrapperClass + ' nav').has($(event.relatedTarget) ).length===0){
if(this.type==='accordion'){
this._toggleSubmenu($(event.target).parents('.fl-has-submenu:last'), false);
}else{
this._clickOrHover(true);
}
const mobileToggle=$(this.wrapperClass).find('.fl-menu-mobile-toggle');
if(this._isMenuToggle()&&mobileToggle.hasClass('fl-active')&&! $(event.relatedTarget).is(mobileToggle)&&'expanded'!==this.mobileToggle){
mobileToggle.trigger('click');
}}
}, this) );
};
FLBuilderMenu.prototype={
nodeClass:'',
wrapperClass: '',
type:'',
breakPoints:{},
$submenus:null,
_isMobile: function(){
return this.currentBrowserWidth <=this.breakPoints.small ? true:false;
},
_isMouseAvailable: function(){
return window.matchMedia("(pointer: fine) and (hover: hover)").matches;
},
_isMedium: function(){
return this.currentBrowserWidth <=this.breakPoints.medium ? true:false;
},
_isLarge: function(){
return this.currentBrowserWidth <=this.breakPoints.large ? true:false;
},
_isMenuToggle: function(){
if(( 'always'==this.mobileBreakpoint
||(this._isMobile()&&'mobile'==this.mobileBreakpoint)
||(this._isMedium()&&'medium-mobile'==this.mobileBreakpoint)
||(this._isLarge()&&'large-mobile'==this.mobileBreakpoint)
)&&($(this.wrapperClass).find('.fl-menu-mobile-toggle').is(':visible')||'expanded'==this.mobileToggle) ){
return true;
}
return false;
},
_initMenu: function(resized=false){
this._setupSubmenu();
if(! resized){
this._menuOnFocus();
this._menuOnClick();
this._menuOnEscape();
}
if($(this.nodeClass).length&&this.type=='horizontal'){
this._initMegaMenus();
}
if(this._isMenuToggle()||this.type=='accordion'){
$(this.wrapperClass).off('mouseenter mouseleave');
this._clickOrHover();
}else{
this._submenuOnRight();
this._submenuRowZindexFix();
}
if(this.mobileToggle!='expanded'){
this._toggleForMobile();
}
if($(this.wrapperClass).find('.fl-menu-search-item').length){
this._toggleMenuSearch();
}
if($(this.wrapperClass).find('.fl-menu-cart-item').length){
this._wooUpdateParams();
}},
_setupSubmenu: function(){
if(! this._isMouseAvailable()||this._isMenuToggle()||this.type==='accordion'){
$(this.wrapperClass).addClass('no-hover');
}else{
$(this.wrapperClass).removeClass('no-hover');
}},
_menuOnFocus: function(){
$(this.wrapperClass).on('focus', 'a, .fl-menu-toggle', $.proxy(function(event){
const focusedMenuItem=$(event.currentTarget).closest('.menu-item');
const blurredMenuItem=$(event.relatedTarget).closest('.menu-item');
if(focusedMenuItem.closest('ul').is(blurredMenuItem.closest('ul') )){
if(! focusedMenuItem.is(blurredMenuItem) ){
this._toggleSubmenu(blurredMenuItem, false);
}}
else if(focusedMenuItem.has(blurredMenuItem).length===blurredMenuItem.has(focusedMenuItem).length){
blurredMenuItem.parents('.fl-has-submenu').each(( _, parent)=> {
if(focusedMenuItem.closest('ul').is($(parent).closest('ul') )){
this._toggleSubmenu($(parent), false);
return false;
}});
}
else if(focusedMenuItem.has(blurredMenuItem).length){
if(this.type!=='accordion'&&this.submenuIcon==='none'){
this._toggleSubmenu(blurredMenuItem, false);
}}
}, this) );
},
_menuOnEscape: function(){
$(this.wrapperClass).on('keydown', $.proxy(function(event){
if(event.key!=='Escape') return;
const menuItem=$(event.target).closest('.menu-item');
const mobileToggle=$(this.wrapperClass).find('.fl-menu-mobile-toggle');
if(menuItem.length||$(event.target).hasClass('fl-menu-mobile-close') ){
if(menuItem.hasClass('fl-has-submenu')&&menuItem.find('.sub-menu:first').is(':visible') ){
this._toggleSubmenu(menuItem, false);
}else{
const parentMenuItem=menuItem.parents('.fl-has-submenu').not('.mega-menu.hide-heading, .mega-menu-disabled.hide-heading').first();
if(parentMenuItem.length===0&&this._isMenuToggle()&&mobileToggle.hasClass('fl-active') ){
mobileToggle.trigger('blur').trigger('focus');
}
else if(parentMenuItem.length!==0){
this._toggleSubmenu(parentMenuItem, false);
parentMenuItem.find('a:first').trigger('focus');
}}
}
else if($(event.target).hasClass('fl-menu-mobile-toggle')&&mobileToggle.hasClass('fl-active') ){
mobileToggle.trigger('blur').trigger('focus');
}}, this) );
},
_menuOnClick: function(){
$(this.wrapperClass).on('keydown', 'span.fl-menu-toggle', $.proxy(function(event){
if(event.key==='Enter'||event.key===' '){
event.preventDefault();
$(event.currentTarget).trigger('click');
}}, this) );
$(this.wrapperClass).on('click', 'a, .fl-menu-toggle', $.proxy(function(event){
event.stopPropagation();
if(this._isMouseAvailable()&&! this._isMenuToggle()&&event.detail&&this.type!=='accordion') return;
if($(event.currentTarget).is('a')&&(this.submenuIcon!=='none'||this.type==='accordion') ) return;
const menuItem=$(event.currentTarget).closest('.menu-item, .fl-menu-logo');
const menuLink=menuItem.find('a:first').attr('href');
const submenuHidden=menuItem.find('.sub-menu:first').is(':hidden');
if(typeof menuLink==='undefined'||menuLink==='#'||submenuHidden){
event.preventDefault();
}
if($(event.currentTarget).hasClass('fl-menu-toggle')||submenuHidden){
this._toggleSubmenu(menuItem, submenuHidden);
}}, this) );
},
_toggleSubmenu: function(menuItem, opened){
const togglingClass=this._isMenuToggle()||this.type==='accordion' ? 'fl-active':'focus';
const toggleElement=this.submenuIcon==='none' ? 'a':'.fl-menu-toggle';
const hiddenMenu='.mega-menu.hide-heading, .mega-menu-disabled.hide-heading';
if(opened&&menuItem.hasClass('fl-has-submenu')&&! menuItem.is(hiddenMenu) ){
menuItem.addClass(togglingClass);
menuItem.find(toggleElement).first().attr('aria-expanded', true);
if(this._isMenuToggle()||this.type==='accordion'){
menuItem.find('.sub-menu:first:hidden').slideDown();
}}else{
menuItem.parent().find('.menu-item').removeClass(togglingClass);
menuItem.parent().find('.fl-has-submenu').not(hiddenMenu).find(toggleElement).attr('aria-expanded', false);
if(this._isMenuToggle()||this.type==='accordion'){
menuItem.find('.sub-menu:visible').slideUp();
}}
},
_clickOrHover: function(clear=false){
const selector=this._isMobileBelowRowEnabled() ? this.nodeClass + '-clone':this.nodeClass;
this.$submenus=this.$submenus||$(selector).find('.sub-menu');
const className=this._isMenuToggle()||this.type==='accordion' ? 'fl-active':'focus';
const toggleElement=this.submenuIcon==='none' ? 'a':'.fl-menu-toggle';
const hiddenMenu='.mega-menu.hide-heading, .mega-menu-disabled.hide-heading';
$(selector).find('.fl-has-submenu').not(hiddenMenu).each(function(){
if(clear||! $(this).hasClass(className) ){
if(clear) $(this).removeClass(className);
$(this).find(toggleElement + ':first').attr('aria-expanded', false);
if(className==='fl-active'){
$(this).find('.sub-menu').fadeOut();
}else if(className==='focus'){
$(this).find('.sub-menu').css({
'display':'',
'opacity':''
});
}}
});
},
_submenuOnRight: function(){
$(this.wrapperClass)
.on('mouseenter focus', '.fl-has-submenu', $.proxy(function(e){
if($(e.currentTarget).find('.sub-menu').length===0){
return;
}
var $link=$(e.currentTarget),
$parent=$link.parent(),
$subMenu=$link.find('.sub-menu'),
subMenuWidth=$subMenu.width(),
subMenuPos=0,
bodyWidth=$('body').width();
if($link.closest('.fl-menu-submenu-right').length!==0){
$link.addClass('fl-menu-submenu-right');
}else if($('body').hasClass('rtl') ){
subMenuPos=$parent.is('.sub-menu') ?
$parent.offset().left - subMenuWidth:
$link.offset().left - $link.width() - subMenuWidth;
if(subMenuPos <=0){
$link.addClass('fl-menu-submenu-right');
}}else{
subMenuPos=$parent.is('.sub-menu') ?
$parent.offset().left + $parent.width() + subMenuWidth :
$link.offset().left + $link.width() + subMenuWidth;
if(subMenuPos > bodyWidth){
$link.addClass('fl-menu-submenu-right');
}}
}, this) )
.on('mouseleave', '.fl-has-submenu', $.proxy(function(e){
$(e.currentTarget).removeClass('fl-menu-submenu-right');
}, this) );
},
_submenuRowZindexFix: function(){
$(this.wrapperClass)
.on('mouseenter', 'ul.menu > .fl-has-submenu', $.proxy(function(e){
if($(e.currentTarget).find('.sub-menu').length===0){
return;
}
$(this.nodeClass)
.closest('.fl-row')
.find('.fl-row-content')
.css('z-index', '10');
}, this) )
.on('mouseleave', 'ul.menu > .fl-has-submenu', $.proxy(function(){
$(this.nodeClass)
.closest('.fl-row')
.find('.fl-row-content')
.css('z-index', '');
}, this) );
},
_toggleForMobile: function(){
var $wrapper=null,
$menu=null,
self=this;
$(this.wrapperClass).find('.fl-menu-mobile-toggle').attr('aria-controls', $(this.wrapperClass).find('ul.menu').attr('id'));
if(this._isMenuToggle()){
if(this._isMobileBelowRowEnabled()){
this._placeMobileMenuBelowRow();
$wrapper=$(this.wrapperClass);
$menu=$(this.nodeClass + '-clone');
$menu.find('ul.menu').show();
}else{
$wrapper=$(this.wrapperClass);
$menu=$wrapper.find('.menu');
}
if(!$wrapper.find('.fl-menu-mobile-toggle').hasClass('fl-active')&&! self.mobileFlyout){
$menu.css({ display: 'none' });
}
if(self.mobileFlyout){
this._initFlyoutMenu();
}
$wrapper.on('click', '.fl-menu-mobile-toggle', function(e){
e.stopImmediatePropagation();
$(this).toggleClass('fl-active');
if(self.mobileFlyout){
self._toggleFlyoutMenu();
const flyoutWrapper=$('.fl-menu-mobile-flyout');
if($(this).hasClass('fl-active') ){
flyoutWrapper.attr('aria-hidden', false);
flyoutWrapper.find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex="-1"]').attr('tabindex', 0);
}else{
flyoutWrapper.attr('aria-hidden', true);
flyoutWrapper.find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex]:not([tabindex="-1"])').attr('tabindex', -1);
}}else{
var targetMenu=null;
if(self.mobileBelowRow){
var $closestCol=$(this).parents('.fl-col, .fl-module-box'),
$closestColGroup=$closestCol.length ? $closestCol.parent('.fl-col-group'):null;
targetMenu=$closestCol.length ? $closestCol.last().next('.fl-menu-mobile-clone'):null;
if($closestColGroup.length){
if($closestColGroup.hasClass('fl-col-group-responsive-reversed') ){
$closestColGroup.find('.fl-menu-mobile-clone').css('order', -1);
}else if($closestColGroup){
$closestColGroup.find('.fl-menu-mobile-clone').css('order', 2);
}}
}else{
targetMenu=$(this).closest('.fl-menu').find('ul.menu');
}
if(targetMenu.length){
$menu=$(targetMenu);
}
$menu.slideToggle();
}
e.stopPropagation();
});
$menu.off().on('click', '.menu-item > a[href*="#"]:not([href="#"])', function(){
var $href=$(this).attr('href'),
$targetID=$href.split('#')[1],
element=$('#' + $targetID);
if($('body').find(element).length > 0){
$(this).toggleClass('fl-active');
FLBuilderLayout._scrollToElement(element);
if(! self._isMenuToggle()){
$menu.slideToggle();
}}
});
}else{
if(this._isMobileBelowRowEnabled()){
this._removeMenuFromBelowRow();
}
$wrapper=$(this.wrapperClass),
$menu=$wrapper.find('ul.menu');
$wrapper.find('.fl-menu-mobile-toggle').removeClass('fl-active');
$menu.css({ display: '' });
if(! this._isMobileBelowRowEnabled()){
$menu.off('click', '.menu-item > a[href*="#"]:not([href="#"])');
}
if(this.mobileFlyout&&$wrapper.find('.fl-menu-mobile-flyout').length > 0){
$('body').css('margin', '');
$('.fl-builder-ui-pinned-content-transform').css('transform', '');
$menu.unwrap();
$wrapper.find('.fl-menu-mobile-close').remove();
$wrapper.find('.fl-menu-mobile-opacity').remove();
}}
},
_initMegaMenus: function(){
var module=$(this.nodeClass),
rowContent=module.closest('.fl-row-content'),
rowWidth=rowContent.width(),
megas=module.find('.mega-menu'),
disabled=module.find('.mega-menu-disabled'),
isToggle=this._isMenuToggle();
if(isToggle){
megas.removeClass('mega-menu').addClass('mega-menu-disabled');
module.find('li.mega-menu-disabled > ul.sub-menu').css('width', '');
rowContent.css('position', '');
}else{
disabled.removeClass('mega-menu-disabled').addClass('mega-menu');
module.find('li.mega-menu > ul.sub-menu').css('width', rowWidth + 'px');
rowContent.css('position', 'relative');
}},
_isMobileBelowRowEnabled: function(){
return this.mobileBelowRow&&($(this.nodeClass).parents('.fl-col, .fl-module-box').length);
},
_placeMobileMenuBelowRow: function(){
if($(this.nodeClass + '-clone').length){
return;
}
var module=$(this.nodeClass),
clone=null,
col=module.parents('.fl-col, .fl-module-box').last();
if(module.length < 1){
return;
}
clone=(module.length > 1) ? $(module[0]).clone():module.clone();
module.find('ul.menu').remove();
clone.addClass(( this.nodeClass + '-clone').replace('.', '') );
clone.addClass('fl-menu-mobile-clone');
clone.find('.fl-menu-mobile-toggle').remove();
col.after(clone);
if(module.hasClass('fl-animation') ){
clone.removeClass('fl-animation');
}
this._menuOnFocus();
this._menuOnClick();
this._menuOnEscape();
},
_removeMenuFromBelowRow: function(){
if(! $(this.nodeClass + '-clone').length){
return;
}
var module=$(this.nodeClass),
clone=$(this.nodeClass + '-clone'),
menu=clone.find('ul.menu'),
nav=module.find('nav');
if(nav.length){
nav.append(menu);
}else{
module.find('.fl-menu-mobile-toggle').after(menu);
}
clone.remove();
menu.find('a').each(FLBuilderLayout._initAnchorLink);
},
_initFlyoutMenu: function(){
var wrapper=$(this.wrapperClass),
menu=wrapper.find('ul.menu'),
button=wrapper.find('.fl-menu-mobile-toggle');
if(0===wrapper.find('.fl-menu-mobile-flyout').length){
menu.wrap('<div class="fl-menu-mobile-flyout" aria-hidden="true"></div>');
}
if(0===wrapper.find('.fl-menu-mobile-close').length){
var close=window.fl_responsive_close||'Close'
wrapper.find('.fl-menu-mobile-flyout').prepend('<button class="fl-menu-mobile-close fl-content-ui-button" aria-label="' + close + '"><i class="fas fa-times"></i></button>');
}
if(wrapper.hasClass('fl-menu-responsive-flyout-push-opacity')&&0===wrapper.find('.fl-menu-mobile-opacity').length){
wrapper.append('<div class="fl-menu-mobile-opacity"></div>');
}
wrapper.off('click', '.fl-menu-mobile-opacity, .fl-menu-mobile-close').on('click', '.fl-menu-mobile-opacity, .fl-menu-mobile-close', function(e){
button.trigger('focus').trigger('click');
e.stopPropagation();
});
if('undefined'!==typeof FLBuilder){
FLBuilder.addHook('restartEditingSession', function(){
$('.fl-builder-ui-pinned-content-transform').css('transform', '');
if(button.hasClass('fl-active') ){
button.trigger('click');
}});
}
$('.fl-menu-mobile-flyout').find('a[href], button, input, select, textarea, span.fl-menu-toggle, [tabindex]:not([tabindex="-1"])').attr('tabindex', -1);
},
_toggleFlyoutMenu: function(){
var wrapper=$(this.wrapperClass),
button=wrapper.find('.fl-menu-mobile-toggle'),
position=wrapper.hasClass('fl-flyout-right') ? 'right':'left',
pushMenu=wrapper.hasClass('fl-menu-responsive-flyout-push')||wrapper.hasClass('fl-menu-responsive-flyout-push-opacity'),
opacity=wrapper.find('.fl-menu-mobile-opacity'),
marginPos={},
fixedPos={},
fixedHeader=$('header, header > div');
this._resizeFlyoutMenuPanel();
if($('.fl-builder-ui-pinned-content-transform').length > 0&&! $('body').hasClass('fl-builder-edit') ){
$('.fl-builder-ui-pinned-content-transform').css('transform', 'none');
}
if(pushMenu){
marginPos[ 'margin-' + position ]=button.hasClass('fl-active') ? this.flyoutWidth + 'px':'0px';
$('body').animate(marginPos, 200);
if(fixedHeader.length > 0){
fixedPos[ position]=button.hasClass('fl-active') ? this.flyoutWidth + 'px':'0px';
fixedHeader.each(function(){
if('fixed'==$(this).css('position') ){
$(this).css({ 'transition':'none' });
$(this).animate(fixedPos, 200);
}});
}}
if(opacity.length > 0&&button.hasClass('fl-active') ){
opacity.show();
}else{
opacity.hide();
}},
_resizeFlyoutMenuPanel: function(){
const wrapper=$(this.wrapperClass);
const wrapFlyout=wrapper.find('.fl-menu-mobile-flyout');
if(wrapFlyout.length > 0){
wrapFlyout.css(this._getFlyoutMenuPanelPosition());
}},
_getFlyoutMenuPanelPosition: function(){
var wrapper=$(this.wrapperClass),
button=wrapper.find('.fl-menu-mobile-toggle'),
side=wrapper.hasClass('fl-flyout-right') ? 'right':'left',
winHeight=$(window).outerHeight(),
winTop=$(window).scrollTop(),
adminBarHeight=$('#wpadminbar').length ? $('#wpadminbar').height():0,
flyoutPosition={};
flyoutPosition[ side ]='-' +(parseInt(this.flyoutWidth) + 15) + 'px';
if(! button.hasClass('fl-active') ){
return flyoutPosition;
}
flyoutPosition[ side ]='0px';
flyoutPosition[ 'height' ]=winHeight + 'px';
flyoutPosition[ 'top' ]='0px';
if(adminBarHeight > 0){
const diff=adminBarHeight - winTop;
flyoutPosition[ 'top' ]=diff <=0 ? '0px':(diff) + 'px';
}
return flyoutPosition;
},
_toggleMenuSearch: function(){
var wrapper=$(this.wrapperClass).find('.fl-menu-search-item'),
button=wrapper.find('.fl-button:is(a, button)'),
form=wrapper.find('.fl-search-form-input-wrap'),
self=this;
button.attr('tabindex', 0);
button.attr('aria-label', 'Search');
button.on('click', function(e){
e.preventDefault();
if(form.is(':visible')){
form.stop().fadeOut(200);
}else{
form.stop().fadeIn(200);
$('body').on('click.fl-menu-search', $.proxy(self._hideMenuSearch, self));
form.find('.fl-search-text').focus();
}});
},
_hideMenuSearch: function(e){
var form=$(this.wrapperClass).find('.fl-search-form-input-wrap');
if(e!==undefined){
if($(e.target).closest('.fl-menu-search-item').length > 0){
return;
}}
form.stop().fadeOut(200);
$('body').off('click.fl-menu-search');
},
_wooUpdateParams: function(){
if('undefined'!==typeof wc_cart_fragments_params){
wc_cart_fragments_params.wc_ajax_url +='&fl-menu-node='+ this.nodeId +'&post-id='+ this.postId;
}
if('undefined'!==typeof wc_add_to_cart_params){
wc_add_to_cart_params.wc_ajax_url +='&fl-menu-node='+ this.nodeId +'&post-id='+ this.postId;
}},
};})(jQuery);
(function($){
$(function(){
new FLBuilderMenu({
id: '5b7b9842daee3',
type: 'horizontal',
mobile: 'hamburger',
mobileBelowRow: true,
mobileFlyout: false,
breakPoints: {
large: 1200,
medium: 992,
small: 768			},
mobileBreakpoint: 'mobile',
postId:'71',
mobileStacked: true,
submenuIcon: 'arrows',
flyoutWidth: '250',
});
});
})(jQuery);
(function($){
FLThemeBuilderHeaderLayout={
win:null,
body:null,
header:null,
overlay:false,
hasAdminBar:false,
stickyOn: '',
breakpointWidth: 0,
init: function(){
var editing=$('html.fl-builder-edit').length,
header=$('.fl-builder-content[data-type=header]'),
menuModule=header.find('.fl-module-menu'),
breakpoint=null;
if(! editing&&header.length){
header.imagesLoaded($.proxy(function(){
this.win=$(window);
this.body=$('body');
this.header=header.eq(0);
this.overlay     = !! Number(header.attr('data-overlay') );
this.hasAdminBar = !! $('body.admin-bar').length;
this.stickyOn=this.header.data('sticky-on');
breakpoint=this.header.data('sticky-breakpoint');
if(''==this.stickyOn){
if(typeof FLBuilderLayoutConfig.breakpoints[ breakpoint ]!==undefined){
this.breakpointWidth=FLBuilderLayoutConfig.breakpoints[ breakpoint ];
}else{
this.breakpointWidth=FLBuilderLayoutConfig.breakpoints.medium;
}}
if(Number(header.attr('data-sticky') )){
this.header.data('original-top', this.header.offset().top);
this.win.on('resize', $.throttle(500, $.proxy(this._initSticky, this) ));
this._initSticky();
}}, this) );
}},
_initSticky: function(e){
var header=$('.fl-builder-content[data-type=header]'),
windowSize=this.win.width(),
makeSticky=false;
makeSticky=this._makeWindowSticky(windowSize);
if(makeSticky||(this.breakpointWidth > 0&&windowSize >=this.breakpointWidth) ){
this.win.on('scroll.fl-theme-builder-header-sticky', $.proxy(this._doSticky, this) );
if(e&&'resize'===e.type){
if(this.header.hasClass('fl-theme-builder-header-sticky') ){
this._doSticky(e);
}
this._adjustStickyHeaderWidth();
}
if(Number(header.attr('data-shrink') )){
this.header.data('original-height', this.header.outerHeight());
this.win.on('resize', $.throttle(500, $.proxy(this._initShrink, this) ));
this._initShrink();
}
this._initFlyoutMenuFix(e);
}else{
this.win.off('scroll.fl-theme-builder-header-sticky');
this.win.off('resize.fl-theme-builder-header-sticky');
this.header.removeClass('fl-theme-builder-header-sticky');
this.header.removeAttr('style');
this.header.parent().css('padding-top', '0');
}},
_makeWindowSticky: function(windowSize){
var makeSticky=false;
switch (this.stickyOn){
case 'xl':
makeSticky=windowSize > FLBuilderLayoutConfig.breakpoints['large'];
break;
case '':
case 'desktop':
makeSticky=windowSize >=FLBuilderLayoutConfig.breakpoints['medium'];
break;
case 'desktop-medium':
makeSticky=windowSize > FLBuilderLayoutConfig.breakpoints['small'];
break;
case 'large':
makeSticky=windowSize > FLBuilderLayoutConfig.breakpoints['medium']&&windowSize <=FLBuilderLayoutConfig.breakpoints['large'];
break;
case 'large-medium':
makeSticky=windowSize > FLBuilderLayoutConfig.breakpoints['small']&&windowSize <=FLBuilderLayoutConfig.breakpoints['large'];
break;
case 'medium':
makeSticky=(windowSize <=FLBuilderLayoutConfig.breakpoints['medium']&&windowSize > FLBuilderLayoutConfig.breakpoints['small']);
break;
case 'medium-mobile':
makeSticky=(windowSize <=FLBuilderLayoutConfig.breakpoints['medium']);
break;
case 'mobile':
makeSticky=(windowSize <=FLBuilderLayoutConfig.breakpoints['small']);
break;
case 'all':
makeSticky=true;
break;
}
return makeSticky;
},
_doSticky: function(e){
var winTop=Math.floor(this.win.scrollTop()),
headerTop=Math.floor(this.header.data('original-top') ),
hasStickyClass=this.header.hasClass('fl-theme-builder-header-sticky'),
hasScrolledClass=this.header.hasClass('fl-theme-builder-header-scrolled'),
beforeHeader=this.header.prevAll('.fl-builder-content'),
bodyTopPadding=parseInt(jQuery('body').css('padding-top')),
winBarHeight=$('#wpadminbar').length ? $('#wpadminbar').outerHeight():0,
headerHeight=0;
if(isNaN(bodyTopPadding) ){
bodyTopPadding=0;
}
if(this.hasAdminBar&&this.win.width() > 600){
winTop +=Math.floor(winBarHeight);
}
if(winTop > headerTop){
if(! hasStickyClass){
if(e&&('scroll'===e.type||'smartscroll'===e.type) ){
this.header.addClass('fl-theme-builder-header-sticky');
if(this.overlay&&beforeHeader.length){
this.header.css('top', winBarHeight);
}}
if(! this.overlay){
this._adjustHeaderHeight();
}}
}
else if(hasStickyClass){
this.header.removeClass('fl-theme-builder-header-sticky');
this.header.removeAttr('style');
this.header.parent().css('padding-top', '0');
}
this._adjustStickyHeaderWidth();
if(winTop > headerTop){
if(! hasScrolledClass){
this.header.addClass('fl-theme-builder-header-scrolled');
}}else if(hasScrolledClass){
this.header.removeClass('fl-theme-builder-header-scrolled');
}
this._flyoutMenuFix(e);
},
_initFlyoutMenuFix: function(e){
var header=this.header,
menuModule=header.closest('.fl-menu'),
flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),
isPushMenu=menuModule.hasClass('fl-menu-responsive-flyout-push')||menuModule.hasClass('fl-menu-responsive-flyout-push-opacity'),
isOverlay=menuModule.hasClass('fl-menu-responsive-flyout-overlay'),
flyoutPos=menuModule.hasClass('fl-flyout-right') ? 'right':'left',
flyoutParent=header.parent().is('header') ? header.parent().parent():header.parent();
isFullWidth=this.win.width()===header.width(),
flyoutLayout='',
activePos=250,
headerPos=0;
if(! flyoutMenu.length){
return;
}
if(this.win.width() > header.parent().width()){
headerPos=(this.win.width() - header.width()) / 2;
}
if(isOverlay){
activePos=headerPos;
}
else if(isPushMenu){
activePos=activePos + headerPos;
}
flyoutMenu.data('activePos', activePos);
if(isPushMenu){
flyoutLayout='push-' + flyoutPos;
}
else if(isOverlay){
flyoutLayout='overlay-' + flyoutPos;
}
if(isPushMenu&&! $('html').hasClass('fl-theme-builder-has-flyout-menu') ){
$('html').addClass('fl-theme-builder-has-flyout-menu');
}
if(! flyoutParent.hasClass('fl-theme-builder-flyout-menu-' + flyoutLayout) ){
flyoutParent.addClass('fl-theme-builder-flyout-menu-' + flyoutLayout);
}
if(! header.hasClass('fl-theme-builder-flyout-menu-overlay')&&isOverlay){
header.addClass('fl-theme-builder-flyout-menu-overlay');
}
if(! header.hasClass('fl-theme-builder-header-full-width')&&isFullWidth){
header.addClass('fl-theme-builder-header-full-width');
}
else if(! isFullWidth){
header.removeClass('fl-theme-builder-header-full-width');
}
menuModule.on('click', '.fl-menu-mobile-toggle', $.proxy(function(event){
if(menuModule.find('.fl-menu-mobile-toggle.fl-active').length){
$('html').addClass('fl-theme-builder-flyout-menu-active');
event.stopImmediatePropagation();
}else{
$('html').removeClass('fl-theme-builder-flyout-menu-active');
}
this._flyoutMenuFix(event);
}, this) );
},
_flyoutMenuFix: function(e){
var header=this.header,
menuModule=$(e.target).closest('.fl-menu'),
flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),
flyoutPos=menuModule.hasClass('fl-flyout-right') ? 'right':'left',
menuOpacity=menuModule.find('.fl-menu-mobile-opacity'),
isScroll='undefined'!==typeof e&&'scroll'===e.handleObj.type,
activePos='undefined'!==typeof flyoutMenu.data('activePos') ? flyoutMenu.data('activePos'):0,
headerPos=(this.win.width() - header.width()) / 2,
inactivePos=headerPos > 0 ? activePos + 4:254;
if(! flyoutMenu.length){
return;
}
if(this.overlay){
return;
}
if($('.fl-theme-builder-flyout-menu-active').length){
if(isScroll&&! flyoutMenu.hasClass('fl-menu-disable-transition') ){
flyoutMenu.addClass('fl-menu-disable-transition');
}
if(header.hasClass('fl-theme-builder-header-sticky') ){
if(! isScroll){
setTimeout($.proxy(function(){
flyoutMenu.css(flyoutPos, '-' + activePos + 'px');
}, this), 1);
}else{
flyoutMenu.css(flyoutPos, '-' + activePos + 'px');
}}else{
flyoutMenu.css(flyoutPos, '0px');
}}else{
if(flyoutMenu.hasClass('fl-menu-disable-transition') ){
flyoutMenu.removeClass('fl-menu-disable-transition');
}
if(header.hasClass('fl-theme-builder-flyout-menu-overlay')&&headerPos > 0&&headerPos < 250){
if(header.hasClass('fl-theme-builder-header-sticky') ){
inactivePos=headerPos + 254;
}else{
inactivePos=254;
}}
if(e&&e.type==='resize'){
inactivePos=headerPos + 254;
}
flyoutMenu.css(flyoutPos, '-' + inactivePos + 'px');
}
if(e&&menuModule.is('.fl-menu-responsive-flyout-overlay')&&$.infinitescroll){
e.stopImmediatePropagation();
}
if(menuOpacity.length){
if(header.hasClass('fl-theme-builder-header-sticky') ){
if('0px'===menuOpacity.css('left') ){
menuOpacity.css('left', '-' + headerPos + 'px');
}}else{
menuOpacity.css('left', '');
}}
},
_adjustStickyHeaderWidth: function (){
if($('body').hasClass('fl-fixed-width') ){
var parentWidth=this.header.parent().width();
if(this.win.width() >=992){
this.header.css({
'margin': '0 auto',
'max-width': parentWidth,
});
}else{
this.header.css({
'margin': '',
'max-width': '',
});
}}
},
_adjustHeaderHeight: function (){
var beforeHeader=this.header.prevAll('.fl-builder-content'),
beforeHeaderHeight=0,
beforeHeaderFix=0,
headerHeight=Math.floor(this.header.outerHeight()),
bodyTopPadding=parseInt($('body').css('padding-top') ),
wpAdminBarHeight=0,
totalHeaderHeight=0;
if(isNaN(bodyTopPadding) ){
bodyTopPadding=0;
}
if(beforeHeader.length){
$.each(beforeHeader, function(){
beforeHeaderHeight +=Math.floor($(this).outerHeight());
});
beforeHeaderFix=2;
}
if(this.hasAdminBar&&this.win.width() <=600){
wpAdminBarHeight=Math.floor($('#wpadminbar').outerHeight());
}
totalHeaderHeight=Math.floor(beforeHeaderHeight + headerHeight);
if(headerHeight > 0){
var headerParent=this.header.parent(),
headerParentTopPadding=0;
if($(headerParent).is('body')){
headerParentTopPadding=Math.floor(headerHeight - wpAdminBarHeight);
}else{
headerParentTopPadding=Math.floor(headerHeight - bodyTopPadding - wpAdminBarHeight);
}
$(headerParent).css('padding-top',(headerParentTopPadding - beforeHeaderFix) + 'px');
this.header.css({
'-webkit-transform': 'translate(0px, -' + totalHeaderHeight + 'px)',
'-ms-transform': 'translate(0px, -' + totalHeaderHeight + 'px)',
'transform': 'translate(0px, -' + totalHeaderHeight + 'px)'
});
}},
_initShrink: function(e){
if(this.win.width() >=this.breakpointWidth){
this.win.on('scroll.fl-theme-builder-header-shrink', $.proxy(this._doShrink, this) );
this._setImageMaxHeight();
if(this.win.scrollTop() > 0){
this._doShrink();
}}else{
this.header.parent().css('padding-top', '0');
this.win.off('scroll.fl-theme-builder-header-shrink');
this._removeShrink();
this._removeImageMaxHeight();
}},
_doShrink: function(e){
var winTop=this.win.scrollTop(),
headerTop=this.header.data('original-top'),
headerHeight=this.header.data('original-height'),
shrinkImageHeight=this.header.data('shrink-image-height'),
windowSize=this.win.width(),
makeSticky=this._makeWindowSticky(windowSize),
hasClass=this.header.hasClass('fl-theme-builder-header-shrink');
if(this.hasAdminBar){
winTop +=32;
}
if(makeSticky&&(winTop > headerTop + headerHeight) ){
if(! hasClass){
this.header.addClass('fl-theme-builder-header-shrink');
this.header.find('img').each(function(i){
var image=$(this),
maxMegaMenu=image.closest('.max-mega-menu').length,
imageInLightbox=image.closest('.fl-button-lightbox-content').length,
imageInNavMenu=image.closest('li.menu-item').length;
if(!(imageInLightbox||imageInNavMenu||maxMegaMenu) ){
image.css('max-height', shrinkImageHeight);
}});
this.header.find('.fl-row-content-wrap').each(function(){
var row=$(this);
if(parseInt(row.css('padding-bottom') ) > 5){
row.addClass('fl-theme-builder-header-shrink-row-bottom');
}
if(parseInt(row.css('padding-top') ) > 5){
row.addClass('fl-theme-builder-header-shrink-row-top');
}});
this.header.find('.fl-module').each(function(){
var module=$(this).find('.fl-module-content').length ? $(this).find('.fl-module-content'):$(this);
if(parseInt(module.css('margin-bottom') ) > 5){
module.addClass('fl-theme-builder-header-shrink-module-bottom');
}
if(parseInt(module.css('margin-top') ) > 5){
module.addClass('fl-theme-builder-header-shrink-module-top');
}});
}}else if(hasClass){
this.header.find('img').css('max-height', '');
this._removeShrink();
}
if('undefined'===typeof(e)&&$('body').hasClass('fl-fixed-width') ){
if(! this.overlay){
this._adjustHeaderHeight();
}}
},
_removeShrink: function(){
var rows=this.header.find('.fl-row-content-wrap'),
modules=this.header.find('.fl-module, .fl-module-content');
rows.removeClass('fl-theme-builder-header-shrink-row-bottom');
rows.removeClass('fl-theme-builder-header-shrink-row-top');
modules.removeClass('fl-theme-builder-header-shrink-module-bottom');
modules.removeClass('fl-theme-builder-header-shrink-module-top');
this.header.removeClass('fl-theme-builder-header-shrink');
},
_setImageMaxHeight: function(){
var head=$('head'),
stylesId='fl-header-styles-' + this.header.data('post-id'),
styles='',
images=this.header.find('.fl-module img');
if($('#' + stylesId).length){
return;
}
images.each(function(i){
var image=$(this),
height=image.height(),
node=image.closest('.fl-module').data('node'),
className='fl-node-' + node + '-img-' + i,
maxMegaMenu=image.closest('.max-mega-menu').length,
imageInLightbox=image.closest('.fl-button-lightbox-content').length,
imageInNavMenu=image.closest('li.menu-item').length;
if(!(imageInLightbox||imageInNavMenu||maxMegaMenu) ){
image.addClass(className);
styles +='.' + className + ' { max-height: ' +(height ? height:image[0].height)  + 'px }';
}});
if(''!==styles){
head.append('<style id="' + stylesId + '">' + styles + '</style>');
}},
_removeImageMaxHeight: function(){
$('#fl-header-styles-' + this.header.data('post-id') ).remove();
},
};
$(function(){ FLThemeBuilderHeaderLayout.init(); });
})(jQuery);
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
!function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.7",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),r=0;r<n;r++)t[r]=arguments[r+o];switch(o){case 0:return u.call(this,t);case 1:return u.call(this,arguments[0],t);case 2:return u.call(this,arguments[0],arguments[1],t)}for(var e=Array(o+1),r=0;r<o;r++)e[r]=arguments[r];return e[o]=t,u.apply(this,e)}}function o(n){var t=typeof n;return"function"==t||"object"==t&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function i(n){var t="[object "+n+"]";return function(n){return s.call(n)===t}}var X=i("String"),Y=i("Number"),Z=i("Date"),nn=i("RegExp"),tn=i("Error"),rn=i("Symbol"),en=i("ArrayBuffer"),a=i("Function"),t=t.document&&t.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof t?function(n){return"function"==typeof n||!1}:a,t=i("Object"),un=u&&(!/\[native code\]/.test(String(DataView))||t(new DataView(new ArrayBuffer(8)))),a="undefined"!=typeof Map&&t(new Map),u=i("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,v=U||i("Array");function y(n,t){return null!=n&&q.call(n,t)}var on=i("Arguments"),an=(!function(){on(arguments)||(on=function(n){return y(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(t){return function(n){n=t(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(t){return function(n){return null==n?void 0:n[t]}}var d=sn("byteLength"),pn=ln(d),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=r?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),g=sn("length");function yn(n,t){t=function(t){for(var r={},n=t.length,e=0;e<n;++e)r[t[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(n){return r[n]=!0,t.push(n)}}}(t);var r=J.length,e=n.constructor,u=p(e)&&e.prototype||V,o="constructor";for(y(n,o)&&!t.contains(o)&&t.push(o);r--;)(o=J[r])in n&&n[o]!==u[o]&&!t.contains(o)&&t.push(o)}function b(n){if(!o(n))return[];if(W)return W(n);var t,r=[];for(t in n)y(n,t)&&r.push(t);return K&&yn(n,r),r}function dn(n,t){var r=b(t),e=r.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=r[o];if(t[i]!==u[i]||!(i in u))return!1}return!0}function m(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,d(n))}m.VERSION=n,m.prototype.valueOf=m.prototype.toJSON=m.prototype.value=function(){return this._wrapped},m.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function mn(n,t,r,e){var u;return n===t?0!==n||1/n==1/t:null!=n&&null!=t&&(n!=n?t!=t:("function"==(u=typeof n)||"object"==u||"object"==typeof t)&&function n(t,r,e,u){t instanceof m&&(t=t._wrapped);r instanceof m&&(r=r._wrapped);var o=s.call(t);if(o!==s.call(r))return!1;if(un&&"[object Object]"==o&&h(t)){if(!h(r))return!1;o=bn}switch(o){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:0==+t?1/+t==1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return F.valueOf.call(t)===F.valueOf.call(r);case"[object ArrayBuffer]":case bn:return n(gn(t),gn(r),e,u)}o="[object Array]"===o;if(!o&&vn(t)){var i=d(t);if(i!==d(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof t||"object"!=typeof r)return!1;var i=t.constructor,a=r.constructor;if(i!==a&&!(p(i)&&i instanceof i&&p(a)&&a instanceof a)&&"constructor"in t&&"constructor"in r)return!1}e=e||[];u=u||[];var f=e.length;for(;f--;)if(e[f]===t)return u[f]===r;e.push(t);u.push(r);if(o){if((f=t.length)!==r.length)return!1;for(;f--;)if(!mn(t[f],r[f],e,u))return!1}else{var c,l=b(t);if(f=l.length,b(r).length!==f)return!1;for(;f--;)if(c=l[f],!y(r,c)||!mn(t[c],r[c],e,u))return!1}e.pop();u.pop();return!0}(n,t,r,e))}function c(n){if(!o(n))return[];var t,r=[];for(t in n)r.push(t);return K&&yn(n,r),r}function jn(e){var u=g(e);return function(n){if(null==n)return!1;var t=c(n);if(g(t))return!1;for(var r=0;r<u;r++)if(!p(n[e[r]]))return!1;return e!==_n||!p(n[wn])}}var wn="forEach",t=["clear","delete"],u=["get","has","set"],U=t.concat(wn,u),_n=t.concat(u),r=["add"].concat(t,wn,"has"),u=a?jn(U):i("Map"),t=a?jn(_n):i("WeakMap"),U=a?jn(r):i("Set"),a=i("WeakSet");function j(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=n[t[u]];return e}function An(n){for(var t={},r=b(n),e=0,u=r.length;e<u;e++)t[n[r[e]]]=r[e];return t}function xn(n){var t,r=[];for(t in n)p(n[t])&&r.push(t);return r.sort()}function Sn(f,c){return function(n){var t=arguments.length;if(c&&(n=Object(n)),!(t<2||null==n))for(var r=1;r<t;r++)for(var e=arguments[r],u=f(e),o=u.length,i=0;i<o;i++){var a=u[i];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var On=Sn(c),w=Sn(b),Mn=Sn(c,!0);function En(n){var t;return o(n)?z?z(n):((t=function(){}).prototype=n,n=new t,t.prototype=null,n):{}}function Bn(n){return v(n)?n:[n]}function _(n){return m.toPath(n)}function Nn(n,t){for(var r=t.length,e=0;e<r;e++){if(null==n)return;n=n[t[e]]}return r?n:void 0}function In(n,t,r){n=Nn(n,_(t));return H(n)?r:n}function Tn(n){return n}function A(t){return t=w({},t),function(n){return dn(n,t)}}function kn(t){return t=_(t),function(n){return Nn(n,t)}}function x(u,o,n){if(void 0===o)return u;switch(null==n?3:n){case 1:return function(n){return u.call(o,n)};case 3:return function(n,t,r){return u.call(o,n,t,r)};case 4:return function(n,t,r,e){return u.call(o,n,t,r,e)}}return function(){return u.apply(o,arguments)}}function Dn(n,t,r){return null==n?Tn:p(n)?x(n,t,r):(o(n)&&!v(n)?A:kn)(n)}function Rn(n,t){return Dn(n,t,1/0)}function S(n,t,r){return m.iteratee!==Rn?m.iteratee(n,t):Dn(n,t,r)}function Vn(){}function Fn(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}m.toPath=Bn,m.iteratee=Rn;var O=Date.now||function(){return(new Date).getTime()};function Pn(t){function r(n){return t[n]}var n="(?:"+b(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},qn=Pn(r),r=Pn(An(r)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,t,r,e,u){return e instanceof t?(e=En(n.prototype),o(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,o){function i(){for(var n=0,t=o.length,r=Array(t),e=0;e<t;e++)r[e]=o[e]===a?arguments[n++]:o[e];for(;n<arguments.length;)r.push(arguments[n++]);return Jn(u,i,this,this,r)}var a=M.placeholder;return i}),Gn=(M.placeholder=m,l(function(t,r,e){var u;if(p(t))return u=l(function(n){return Jn(t,u,r,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(g);function B(n,t,r,e){if(e=e||[],t||0===t){if(t<=0)return e.concat(n)}else t=1/0;for(var u=e.length,o=0,i=g(n);o<i;o++){var a=n[o];if(E(a)&&(v(a)||an(a)))if(1<t)B(a,t-1,r,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else r||(e[u++]=a)}return e}var Hn=l(function(n,t){var r=(t=B(t,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var e=t[r];n[e]=Gn(n[e],n)}return n});var Qn=l(function(n,t,r){return setTimeout(function(){return n.apply(null,r)},t)}),Xn=M(Qn,m,1);function Yn(n){return function(){return!n.apply(this,arguments)}}function Zn(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}}var nt=M(Zn,2);function tt(n,t,r){t=S(t,r);for(var e,u=b(n),o=0,i=u.length;o<i;o++)if(t(n[e=u[o]],e,n))return e}function rt(o){return function(n,t,r){t=S(t,r);for(var e=g(n),u=0<o?0:e-1;0<=u&&u<e;u+=o)if(t(n[u],u,n))return u;return-1}}var et=rt(1),ut=rt(-1);function ot(n,t,r,e){for(var u=(r=S(r,e,1))(t),o=0,i=g(n);o<i;){var a=Math.floor((o+i)/2);r(n[a])<u?o=a+1:i=a}return o}function it(o,i,a){return function(n,t,r){var e=0,u=g(n);if("number"==typeof r)0<o?e=0<=r?r:Math.max(r+u,e):u=0<=r?Math.min(r+1,u):r+u+1;else if(a&&r&&u)return n[r=a(n,t)]===t?r:-1;if(t!=t)return 0<=(r=i(f.call(n,e,u),fn))?r+e:-1;for(r=0<o?e:u-1;0<=r&&r<u;r+=o)if(n[r]===t)return r;return-1}}var at=it(1,et,ot),ft=it(-1,ut);function ct(n,t,r){t=(E(n)?et:tt)(n,t,r);if(void 0!==t&&-1!==t)return n[t]}function N(n,t,r){if(t=x(t,r),E(n))for(u=0,o=n.length;u<o;u++)t(n[u],u,n);else for(var e=b(n),u=0,o=e.length;u<o;u++)t(n[e[u]],e[u],n);return n}function I(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=t(n[a],a,n)}return o}function lt(f){return function(n,t,r,e){var u=3<=arguments.length;return function(n,t,r,e){var u=!E(n)&&b(n),o=(u||n).length,i=0<f?0:o-1;for(e||(r=n[u?u[i]:i],i+=f);0<=i&&i<o;i+=f){var a=u?u[i]:i;r=t(r,n[a],a,n)}return r}(n,x(t,e,4),r,u)}}var st=lt(1),pt=lt(-1);function T(n,e,t){var u=[];return e=S(e,t),N(n,function(n,t,r){e(n,t,r)&&u.push(n)}),u}function ht(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!t(n[i],i,n))return!1}return!0}function vt(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(t(n[i],i,n))return!0}return!1}function k(n,t,r,e){return E(n)||(n=j(n)),0<=at(n,t,r="number"==typeof r&&!e?r:0)}var yt=l(function(n,r,e){var u,o;return p(r)?o=r:(r=_(r),u=r.slice(0,-1),r=r[r.length-1]),I(n,function(n){var t=o;if(!t){if(null==(n=u&&u.length?Nn(n,u):n))return;t=n[r]}return null==t?t:t.apply(n,e)})});function dt(n,t){return I(n,kn(t))}function gt(n,e,t){var r,u,o=-1/0,i=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&o<r&&(o=r);else e=S(e,t),N(n,function(n,t,r){u=e(n,t,r),(i<u||u===-1/0&&o===-1/0)&&(o=n,i=u)});return o}var bt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mt(n){return n?v(n)?f.call(n):X(n)?n.match(bt):E(n)?I(n,Tn):j(n):[]}function jt(n,t,r){if(null==t||r)return(n=E(n)?n:j(n))[Fn(n.length-1)];for(var e=mt(n),r=g(e),u=(t=Math.max(Math.min(t,r),0),r-1),o=0;o<t;o++){var i=Fn(o,u),a=e[o];e[o]=e[i],e[i]=a}return e.slice(0,t)}function D(o,t){return function(r,e,n){var u=t?[[],[]]:{};return e=S(e,n),N(r,function(n,t){t=e(n,t,r);o(u,n,t)}),u}}var wt=D(function(n,t,r){y(n,r)?n[r].push(t):n[r]=[t]}),_t=D(function(n,t,r){n[r]=t}),At=D(function(n,t,r){y(n,r)?n[r]++:n[r]=1}),xt=D(function(n,t,r){n[r?0:1].push(t)},!0);function St(n,t,r){return t in r}var Ot=l(function(n,t){var r={},e=t[0];if(null!=n){p(e)?(1<t.length&&(e=x(e,t[1])),t=c(n)):(e=St,t=B(t,!1,!1),n=Object(n));for(var u=0,o=t.length;u<o;u++){var i=t[u],a=n[i];e(a,i,n)&&(r[i]=a)}}return r}),Mt=l(function(n,r){var t,e=r[0];return p(e)?(e=Yn(e),1<r.length&&(t=r[1])):(r=I(B(r,!1,!1),String),e=function(n,t){return!k(r,t)}),Ot(n,e,t)});function Et(n,t,r){return f.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))}function Bt(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[0]:Et(n,n.length-t)}function R(n,t,r){return f.call(n,null==t||r?1:t)}var Nt=l(function(n,t){return t=B(t,!0,!0),T(n,function(n){return!k(t,n)})}),It=l(function(n,t){return Nt(n,t)});function Tt(n,t,r,e){Q(t)||(e=r,r=t,t=!1),null!=r&&(r=S(r,e));for(var u=[],o=[],i=0,a=g(n);i<a;i++){var f=n[i],c=r?r(f,i,n):f;t&&!r?(i&&o===c||u.push(f),o=c):r?k(o,c)||(o.push(c),u.push(f)):k(u,f)||u.push(f)}return u}var kt=l(function(n){return Tt(B(n,!0,!0))});function Dt(n){for(var t=n&&gt(n,g).length||0,r=Array(t),e=0;e<t;e++)r[e]=dt(n,e);return r}var Rt=l(Dt);function Vt(n,t){return n._chain?m(t).chain():t}function Ft(r){return N(xn(r),function(n){var t=m[n]=r[n];m.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Vt(this,t.apply(m,n))}}),m}N(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];m.prototype[t]=function(){var n=this._wrapped;return null!=n&&(r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Vt(this,n)}}),N(["concat","join","slice"],function(n){var t=e[n];m.prototype[n]=function(){var n=this._wrapped;return Vt(this,n=null!=n?t.apply(n,arguments):n)}});n=Ft({__proto__:null,VERSION:n,restArguments:l,isObject:o,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:tn,isSymbol:rn,isArrayBuffer:en,isDataView:h,isArray:v,isFunction:p,isArguments:an,isFinite:function(n){return!rn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var t;return null==n||("number"==typeof(t=g(n))&&(v(n)||X(n)||an(n))?0===t:0===g(b(n)))},isMatch:dn,isEqual:function(n,t){return mn(n,t)},isMap:u,isWeakMap:t,isSet:U,isWeakSet:a,keys:b,allKeys:c,values:j,pairs:function(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=[t[u],n[t[u]]];return e},invert:An,functions:xn,methods:xn,extend:On,extendOwn:w,assign:w,defaults:Mn,create:function(n,t){return n=En(n),t&&w(n,t),n},clone:function(n){return o(n)?v(n)?n.slice():On({},n):n},tap:function(n,t){return t(n),n},get:In,has:function(n,t){for(var r=(t=_(t)).length,e=0;e<r;e++){var u=t[e];if(!y(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,t,r){t=S(t,r);for(var e=b(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=t(n[a],a,n)}return o},identity:Tn,constant:cn,noop:Vn,toPath:Bn,property:kn,propertyOf:function(t){return null==t?Vn:function(n){return In(t,n)}},matcher:A,matches:A,times:function(n,t,r){var e=Array(Math.max(0,n));t=x(t,r,1);for(var u=0;u<n;u++)e[u]=t(u);return e},random:Fn,now:O,escape:qn,unescape:r,templateSettings:Un,template:function(o,n,t){n=Mn({},n=!n&&t?t:n,m.templateSettings);var r,t=RegExp([(n.escape||Wn).source,(n.interpolate||Wn).source,(n.evaluate||Wn).source].join("|")+"|$","g"),i=0,a="__p+='";if(o.replace(t,function(n,t,r,e,u){return a+=o.slice(i,u).replace(Ln,$n),i=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",t=n.variable){if(!Cn.test(t))throw new Error("variable is not a bare identifier: "+t)}else a="with(obj||{}){\n"+a+"}\n",t="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t,"_",a)}catch(n){throw n.source=a,n}function e(n){return r.call(this,n,m)}return e.source="function("+t+"){\n"+a+"}",e},result:function(n,t,r){var e=(t=_(t)).length;if(!e)return p(r)?r.call(n):r;for(var u=0;u<e;u++){var o=null==n?void 0:n[t[u]];void 0===o&&(o=r,u=e),n=p(o)?o.call(n):o}return n},uniqueId:function(n){var t=++Kn+"";return n?n+t:t},chain:function(n){return(n=m(n))._chain=!0,n},iteratee:Rn,partial:M,bind:Gn,bindAll:Hn,memoize:function(e,u){function o(n){var t=o.cache,r=""+(u?u.apply(this,arguments):n);return y(t,r)||(t[r]=e.apply(this,arguments)),t[r]}return o.cache={},o},delay:Qn,defer:Xn,throttle:function(r,e,u){function o(){l=!1===u.leading?0:O(),i=null,c=r.apply(a,f),i||(a=f=null)}function n(){var n=O(),t=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,t<=0||e<t?(i&&(clearTimeout(i),i=null),l=n,c=r.apply(a,f),i||(a=f=null)):i||!1===u.trailing||(i=setTimeout(o,t)),c}var i,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(i),l=0,i=a=f=null},n},debounce:function(t,r,e){function u(){var n=O()-i;n<r?o=setTimeout(u,r-n):(o=null,e||(f=t.apply(c,a)),o||(a=c=null))}var o,i,a,f,c,n=l(function(n){return c=this,a=n,i=O(),o||(o=setTimeout(u,r),e&&(f=t.apply(c,a))),f});return n.cancel=function(){clearTimeout(o),o=a=c=null},n},wrap:function(n,t){return M(t,n)},negate:Yn,compose:function(){var r=arguments,e=r.length-1;return function(){for(var n=e,t=r[e].apply(this,arguments);n--;)t=r[n].call(this,t);return t}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:Zn,once:nt,findKey:tt,findIndex:et,findLastIndex:ut,sortedIndex:ot,indexOf:at,lastIndexOf:ft,find:ct,detect:ct,findWhere:function(n,t){return ct(n,A(t))},each:N,forEach:N,map:I,collect:I,reduce:st,foldl:st,inject:st,reduceRight:pt,foldr:pt,filter:T,select:T,reject:function(n,t,r){return T(n,Yn(S(t)),r)},every:ht,all:ht,some:vt,any:vt,contains:k,includes:k,include:k,invoke:yt,pluck:dt,where:function(n,t){return T(n,A(t))},max:gt,min:function(n,e,t){var r,u,o=1/0,i=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&r<o&&(o=r);else e=S(e,t),N(n,function(n,t,r){((u=e(n,t,r))<i||u===1/0&&o===1/0)&&(o=n,i=u)});return o},shuffle:function(n){return jt(n,1/0)},sample:jt,sortBy:function(n,e,t){var u=0;return e=S(e,t),dt(I(n,function(n,t,r){return{value:n,index:u++,criteria:e(n,t,r)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(e<r||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")},groupBy:wt,indexBy:_t,countBy:At,partition:xt,toArray:mt,size:function(n){return null==n?0:(E(n)?n:b(n)).length},pick:Ot,omit:Mt,first:Bt,head:Bt,take:Bt,initial:Et,last:function(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[n.length-1]:R(n,Math.max(0,n.length-t))},rest:R,tail:R,drop:R,compact:function(n){return T(n,Boolean)},flatten:function(n,t){return B(n,t,!1)},without:It,uniq:Tt,unique:Tt,union:kt,intersection:function(n){for(var t=[],r=arguments.length,e=0,u=g(n);e<u;e++){var o=n[e];if(!k(t,o)){for(var i=1;i<r&&k(arguments[i],o);i++);i===r&&t.push(o)}}return t},difference:Nt,unzip:Dt,transpose:Dt,zip:Rt,object:function(n,t){for(var r={},e=0,u=g(n);e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},range:function(n,t,r){null==t&&(t=n||0,n=0),r=r||(t<n?-1:1);for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),o=0;o<e;o++,n+=r)u[o]=n;return u},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],e=0,u=n.length;e<u;)r.push(f.call(n,e,e+=t));return r},mixin:Ft,default:m});return n._=n});
!function(n){var s="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(t,e,i){s.Backbone=n(s,i,t,e)});else if("undefined"!=typeof exports){var t,e=require("underscore");try{t=require("jquery")}catch(t){}n(s,exports,e,t)}else s.Backbone=n(s,{},s._,s.jQuery||s.Zepto||s.ender||s.$)}(function(t,h,b,e){function a(t,e,i,n,s){var r,o=0;if(i&&"object"==typeof i){void 0!==n&&"context"in s&&void 0===s.context&&(s.context=n);for(r=b.keys(i);o<r.length;o++)e=a(t,e,r[o],i[r[o]],s)}else if(i&&l.test(i))for(r=i.split(l);o<r.length;o++)e=t(e,r[o],n,s);else e=t(e,i,n,s);return e}function x(t,e,i){i=Math.min(Math.max(i,0),t.length);for(var n=Array(t.length-i),s=e.length,r=0;r<n.length;r++)n[r]=t[r+i];for(r=0;r<s;r++)t[r+i]=e[r];for(r=0;r<n.length;r++)t[r+s+i]=n[r]}function s(i,n,t,s){b.each(t,function(t,e){n[e]&&(i.prototype[e]=function(n,t,s,r){switch(t){case 1:return function(){return n[s](this[r])};case 2:return function(t){return n[s](this[r],t)};case 3:return function(t,e){return n[s](this[r],T(t,this),e)};case 4:return function(t,e,i){return n[s](this[r],T(t,this),e,i)};default:return function(){var t=u.call(arguments);return t.unshift(this[r]),n[s].apply(n,t)}}}(n,t,e,s))})}var o,i=t.Backbone,u=Array.prototype.slice,e=(h.VERSION="1.6.0",h.$=e,h.noConflict=function(){return t.Backbone=i,this},h.emulateHTTP=!1,h.emulateJSON=!1,h.Events={}),l=/\s+/,n=(e.on=function(t,e,i){return this._events=a(n,this._events||{},t,e,{context:i,ctx:this,listening:o}),o&&(((this._listeners||(this._listeners={}))[o.id]=o).interop=!1),this},e.listenTo=function(t,e,i){if(t){var n=t._listenId||(t._listenId=b.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),r=o=s[n],s=(r||(this._listenId||(this._listenId=b.uniqueId("l")),r=o=s[n]=new g(this,t)),c(t,e,i,this));if(o=void 0,s)throw s;r.interop&&r.on(e,i)}return this},function(t,e,i,n){var s,r;return i&&(e=t[e]||(t[e]=[]),s=n.context,r=n.ctx,(n=n.listening)&&n.count++,e.push({callback:i,context:s,ctx:s||r,listening:n})),t}),c=function(t,e,i,n){try{t.on(e,i,n)}catch(t){return t}},r=(e.off=function(t,e,i){return this._events&&(this._events=a(r,this._events,t,e,{context:i,listeners:this._listeners})),this},e.stopListening=function(t,e,i){var n=this._listeningTo;if(n){for(var s=t?[t._listenId]:b.keys(n),r=0;r<s.length;r++){var o=n[s[r]];if(!o)break;o.obj.off(e,i,this),o.interop&&o.off(e,i)}b.isEmpty(n)&&(this._listeningTo=void 0)}return this},function(t,e,i,n){if(t){var s,r=n.context,o=n.listeners,h=0;if(e||r||i){for(s=e?[e]:b.keys(t);h<s.length;h++){var a=t[e=s[h]];if(!a)break;for(var u=[],l=0;l<a.length;l++){var c=a[l];i&&i!==c.callback&&i!==c.callback._callback||r&&r!==c.context?u.push(c):(c=c.listening)&&c.off(e,i)}u.length?t[e]=u:delete t[e]}return t}for(s=b.keys(o);h<s.length;h++)o[s[h]].cleanup()}}),d=(e.once=function(t,e,i){var n=a(d,{},t,e,this.off.bind(this));return this.on(n,e="string"==typeof t&&null==i?void 0:e,i)},e.listenToOnce=function(t,e,i){e=a(d,{},e,i,this.stopListening.bind(this,t));return this.listenTo(t,e)},function(t,e,i,n){var s;return i&&((s=t[e]=b.once(function(){n(e,s),i.apply(this,arguments)}))._callback=i),t}),f=(e.trigger=function(t){if(this._events){for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];a(f,this._events,t,void 0,i)}return this},function(t,e,i,n){var s,r;return t&&(s=t[e],r=t.all,s&&(r=r&&r.slice()),s&&p(s,n),r)&&p(r,[e].concat(n)),t}),p=function(t,e){var i,n=-1,s=t.length,r=e[0],o=e[1],h=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o,h);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},g=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0},v=(g.prototype.on=e.on,g.prototype.off=function(t,e){t=this.interop?(this._events=a(r,this._events,t,e,{context:void 0,listeners:void 0}),!this._events):(this.count--,0===this.count);t&&this.cleanup()},g.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},e.bind=e.on,e.unbind=e.off,b.extend(h,e),h.Model=function(t,e){var i=t||{},n=(e=e||{},this.preinitialize.apply(this,arguments),this.cid=b.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{}),b.result(this,"defaults")),i=b.defaults(b.extend({},n,i),n);this.set(i,e),this.changed={},this.initialize.apply(this,arguments)}),m=(b.extend(v.prototype,e,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return b.clone(this.attributes)},sync:function(){return h.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return b.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!b.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null!=t){var n;if("object"==typeof t?(n=t,i=e):(n={})[t]=e,!this._validate(n,i=i||{}))return!1;var s,r,o=i.unset,t=i.silent,h=[],a=this._changing,u=(this._changing=!0,a||(this._previousAttributes=b.clone(this.attributes),this.changed={}),this.attributes),l=this.changed,c=this._previousAttributes;for(s in n)e=n[s],b.isEqual(u[s],e)||h.push(s),b.isEqual(c[s],e)?delete l[s]:l[s]=e,o?delete u[s]:u[s]=e;if(this.idAttribute in n&&(r=this.id,this.id=this.get(this.idAttribute),this.trigger("changeId",this,r,i)),!t){h.length&&(this._pending=i);for(var d=0;d<h.length;d++)this.trigger("change:"+h[d],this,u[h[d]],i)}if(!a){if(!t)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);this._pending=!1,this._changing=!1}}return this},unset:function(t,e){return this.set(t,void 0,b.extend({},e,{unset:!0}))},clear:function(t){var e,i={};for(e in this.attributes)i[e]=void 0;return this.set(i,b.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!b.isEmpty(this.changed):b.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&b.clone(this.changed);var e,i,n=this._changing?this._previousAttributes:this.attributes,s={};for(i in t){var r=t[i];b.isEqual(n[i],r)||(s[i]=r,e=!0)}return!!e&&s},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return b.clone(this._previousAttributes)},fetch:function(i){i=b.extend({parse:!0},i);var n=this,s=i.success;return i.success=function(t){var e=i.parse?n.parse(t,i):t;if(!n.set(e,i))return!1;s&&s.call(i.context,n,t,i),n.trigger("sync",n,t,i)},N(this,i),this.sync("read",this,i)},save:function(t,e,i){null==t||"object"==typeof t?(n=t,i=e):(n={})[t]=e;var n,s=(i=b.extend({validate:!0,parse:!0},i)).wait;if(n&&!s){if(!this.set(n,i))return!1}else if(!this._validate(n,i))return!1;var r=this,o=i.success,h=this.attributes,t=(i.success=function(t){r.attributes=h;var e=i.parse?r.parse(t,i):t;if((e=s?b.extend({},n,e):e)&&!r.set(e,i))return!1;o&&o.call(i.context,r,t,i),r.trigger("sync",r,t,i)},N(this,i),n&&s&&(this.attributes=b.extend({},h,n)),this.isNew()?"create":i.patch?"patch":"update"),e=("patch"!=t||i.attrs||(i.attrs=n),this.sync(t,this,i));return this.attributes=h,e},destroy:function(e){e=e?b.clone(e):{};function i(){n.stopListening(),n.trigger("destroy",n,n.collection,e)}var n=this,s=e.success,r=e.wait,t=!(e.success=function(t){r&&i(),s&&s.call(e.context,n,t,e),n.isNew()||n.trigger("sync",n,t,e)});return this.isNew()?b.defer(e.success):(N(this,e),t=this.sync("delete",this,e)),r||i(),t},url:function(){var t,e=b.result(this,"urlRoot")||b.result(this.collection,"url")||M();return this.isNew()?e:(t=this.get(this.idAttribute),e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t))},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},b.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=b.extend({},this.attributes,t);t=this.validationError=this.validate(t,e)||null;return!t||(this.trigger("invalid",this,t,b.extend(e,{validationError:t})),!1)}}),h.Collection=function(t,e){e=e||{},this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,b.extend({silent:!0},e))}),w={add:!0,remove:!0,merge:!0},_={add:!0,remove:!1},y=(b.extend(m.prototype,e,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return h.sync.apply(this,arguments)},add:function(t,e){return this.set(t,b.extend({merge:!1},e,_))},remove:function(t,e){e=b.extend({},e);var i=!b.isArray(t),t=(t=i?[t]:t.slice(),this._removeModels(t,e));return!e.silent&&t.length&&(e.changes={added:[],merged:[],removed:t},this.trigger("update",this,e)),i?t[0]:t},set:function(t,e){if(null!=t){(e=b.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);for(var i=!b.isArray(t),n=(t=i?[t]:t.slice(),e.at),s=((n=(n=null!=n?+n:n)>this.length?this.length:n)<0&&(n+=this.length+1),[]),r=[],o=[],h=[],a={},u=e.add,l=e.merge,c=e.remove,d=!1,f=this.comparator&&null==n&&!1!==e.sort,p=b.isString(this.comparator)?this.comparator:null,g=0;g<t.length;g++){var v,m=t[g],_=this.get(m);_?(l&&m!==_&&(v=this._isModel(m)?m.attributes:m,e.parse&&(v=_.parse(v,e)),_.set(v,e),o.push(_),f)&&!d&&(d=_.hasChanged(p)),a[_.cid]||(a[_.cid]=!0,s.push(_)),t[g]=_):u&&(m=t[g]=this._prepareModel(m,e))&&(r.push(m),this._addReference(m,e),a[m.cid]=!0,s.push(m))}if(c){for(g=0;g<this.length;g++)a[(m=this.models[g]).cid]||h.push(m);h.length&&this._removeModels(h,e)}var y=!1;if(s.length&&(!f&&u&&c)?(y=this.length!==s.length||b.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):r.length&&(f&&(d=!0),x(this.models,r,null==n?this.length:n),this.length=this.models.length),d&&this.sort({silent:!0}),!e.silent){for(g=0;g<r.length;g++)null!=n&&(e.index=n+g),(m=r[g]).trigger("add",m,this,e);(d||y)&&this.trigger("sort",this,e),(r.length||h.length||o.length)&&(e.changes={added:r,removed:h,merged:o},this.trigger("update",this,e))}return i?t[0]:t}},reset:function(t,e){e=e?b.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,b.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,b.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,b.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return u.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t=t||{};var i=e.length;return b.isFunction(e)&&(e=e.bind(this)),1===i||b.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(i){var n=(i=b.extend({parse:!0},i)).success,s=this;return i.success=function(t){var e=i.reset?"reset":"set";s[e](t,i),n&&n.call(i.context,s,t,i),s.trigger("sync",s,t,i)},N(this,i),this.sync("read",this,i)},create:function(t,e){var n=(e=e?b.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&(t.off("error",s._forwardPristineError,s),s.add(t,i)),r&&r.call(i.context,t,e,i)},n&&t.once("error",this._forwardPristineError,this),t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new E(this,S)},keys:function(){return new E(this,I)},entries:function(){return new E(this,k)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):(t=((e=e?b.clone(e):{}).collection=this).model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,t.validationError,e),!1):t},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s,r,o=this.get(t[n]);o&&(s=this.indexOf(o),this.models.splice(s,1),this.length--,delete this._byId[o.cid],null!=(r=this.modelId(o.attributes,o.idAttribute))&&delete this._byId[r],e.silent||(e.index=s,o.trigger("remove",o,this,e)),i.push(o),this._removeReference(o,e))}return 0<t.length&&!e.silent&&delete e.index,i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes,t.idAttribute);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;var s,r;"destroy"===t&&this.remove(e,n),"changeId"===t&&(s=this.modelId(e.previousAttributes(),e.idAttribute),r=this.modelId(e.attributes,e.idAttribute),null!=s&&delete this._byId[s],null!=r)&&(this._byId[r]=e)}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,i){this.has(t)||this._onModelEvent("error",t,e,i)}}),"function"==typeof Symbol&&Symbol.iterator),E=(y&&(m.prototype[y]=m.prototype.values),function(t,e){this._collection=t,this._kind=e,this._index=0}),S=1,I=2,k=3,y=(y&&(E.prototype[y]=function(){return this}),E.prototype.next=function(){if(this._collection){var t,e;if(this._index<this._collection.length)return t=this._collection.at(this._index),this._index++,{value:this._kind===S?t:(e=this._collection.modelId(t.attributes,t.idAttribute),this._kind===I?e:[e,t]),done:!1};this._collection=void 0}return{value:void 0,done:!0}},h.View=function(t){this.cid=b.uniqueId("view"),this.preinitialize.apply(this,arguments),b.extend(this,b.pick(t,P)),this._ensureElement(),this.initialize.apply(this,arguments)}),A=/^(\S+)\s*(.*)$/,P=["model","collection","el","id","attributes","className","tagName","events"],T=(b.extend(y.prototype,e,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof h.$?t:h.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t=t||b.result(this,"events"))for(var e in this.undelegateEvents(),t){var i=t[e];(i=b.isFunction(i)?i:this[i])&&(e=e.match(A),this.delegate(e[1],e[2],i.bind(this)))}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){var t;this.el?this.setElement(b.result(this,"el")):(t=b.extend({},b.result(this,"attributes")),this.id&&(t.id=b.result(this,"id")),this.className&&(t.class=b.result(this,"className")),this.setElement(this._createElement(b.result(this,"tagName"))),this._setAttributes(t))},_setAttributes:function(t){this.$el.attr(t)}}),function(e,t){return b.isFunction(e)?e:b.isObject(e)&&!t._isModel(e)?H(e):b.isString(e)?function(t){return t.get(e)}:e}),H=function(t){var e=b.matches(t);return function(t){return e(t.attributes)}},$=(b.each([[m,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(t){var i=t[0],e=t[1],n=t[2];i.mixin=function(t){var e=b.reduce(b.functions(t),function(t,e){return t[e]=0,t},{});s(i,t,e,n)},s(i,b,e,n)}),h.sync=function(t,e,n){var i,s=$[t],r=(b.defaults(n=n||{},{emulateHTTP:h.emulateHTTP,emulateJSON:h.emulateJSON}),{type:s,dataType:"json"}),o=(n.url||(r.url=b.result(e,"url")||M()),null!=n.data||!e||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||e.toJSON(n))),n.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),!n.emulateHTTP||"PUT"!==s&&"DELETE"!==s&&"PATCH"!==s||(r.type="POST",n.emulateJSON&&(r.data._method=s),i=n.beforeSend,n.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",s),i)return i.apply(this,arguments)}),"GET"===r.type||n.emulateJSON||(r.processData=!1),n.error),t=(n.error=function(t,e,i){n.textStatus=e,n.errorThrown=i,o&&o.call(n.context,t,e,i)},n.xhr=h.ajax(b.extend(r,n)));return e.trigger("request",e,t,n),t},{create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"}),C=(h.ajax=function(){return h.$.ajax.apply(h.$,arguments)},h.Router=function(t){t=t||{},this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)}),j=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,U=/\*\w+/g,z=/[\-{}\[\]+?.,\\\^$|#\s]/g,R=(b.extend(C.prototype,e,{preinitialize:function(){},initialize:function(){},route:function(e,i,n){b.isRegExp(e)||(e=this._routeToRegExp(e)),b.isFunction(i)&&(n=i,i=""),n=n||this[i];var s=this;return h.history.route(e,function(t){t=s._extractParameters(e,t);!1!==s.execute(n,t,i)&&(s.trigger.apply(s,["route:"+i].concat(t)),s.trigger("route",i,t),h.history.trigger("route",s,i,t))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,e){return h.history.navigate(t,e),this},_bindRoutes:function(){if(this.routes){this.routes=b.result(this,"routes");for(var t,e=b.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(z,"\\$&").replace(j,"(?:$1)?").replace(O,function(t,e){return e?t:"([^/?]+)"}).replace(U,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return b.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}}),h.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)}),q=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,B=/#.*$/,M=(R.started=!1,b.extend(R.prototype,e,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){t=(t||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return(t=null==t?this._usePushState||!this._wantsHashChange?this.getPath():this.getHash():t).replace(q,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");if(R.started=!0,this.options=b.extend({root:"/"},this.options,t),this.root=this.options.root,this._trailingSlash=this.options.trailingSlash,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||7<document.documentMode),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(F,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return t=this.root.slice(0,-1)||"/",this.location.replace(t+"#"+this.getPath()),!0;this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}this._hasHashChange||!this._wantsHashChange||this._usePushState||(this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1,(t=(t=document.body).insertBefore(this.iframe,t.firstChild).contentWindow).document.open(),t.document.close(),t.location.hash="#"+this.fragment);t=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?t("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if((e=e===this.fragment&&this.iframe?this.getHash(this.iframe.contentWindow):e)===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(e){return this.matchRoot()&&(e=this.fragment=this.getFragment(e),b.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))||this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!R.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root,i=(i=this._trailingSlash||""!==t&&"?"!==t.charAt(0)?i:i.slice(0,-1)||"/")+t,n=(t=t.replace(B,""),this.decodeFragment(t));if(this.fragment!==n){if(this.fragment=n,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)&&(n=this.iframe.contentWindow,e.replace||(n.document.open(),n.document.close()),this._updateHash(n.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){i?(i=t.href.replace(/(javascript:|#).*$/,""),t.replace(i+"#"+e)):t.hash="#"+e}}),h.history=new R,v.extend=m.extend=C.extend=y.extend=R.extend=function(t,e){var i=this,n=t&&b.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)};return b.extend(n,i,e),n.prototype=b.create(i.prototype,t),(n.prototype.constructor=n).__super__=i.prototype,n},function(){throw new Error('A "url" property or function must be specified')}),N=function(e,i){var n=i.error;i.error=function(t){n&&n.call(i.context,e,t,i),e.trigger("error",e,t,i)}};return h._debug=function(){return{root:t,_:b}},h});
(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t="email",n="phone",r="name",a={[t]:["email","e-mail","mail","email address"],[n]:["phone","tel","mobile","cell","telephone","phone number"],[r]:["name","full-name","full name","full_name","fullname","first-name","first name","first_name","firstname","last-name","last name","last_name","lastname","given-name","given name","given_name","givenname","family-name","family name","family_name","familyname","fname","lname","first","last","your-name","your name"]};function i(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function l(e){const t=i(e),n=t.lastIndexOf("@");if(-1===n)return t;const r=t.slice(n+1);return["gmail.com","googlemail.com"].includes(r)?`${t.slice(0,n).replace(/\./g,"")}@${r}`:t}function s(e){const t=i(e),n=t.replace(/\D/g,"");return t.startsWith("+")?`+${n}`:n}function u(e){const t=e.filter(e=>{let{type:t}=e;return t===r}).map(e=>{let{value:t}=e;return i(t)}).filter(Boolean);if(!t.length)return;const[n,...a]=1===t.length?t[0].split(" "):t;return{first_name:n,...a?.length>0?{last_name:a.join(" ")}:{}}}function o(e){return e.find(e=>{let{type:n}=e;return n===t})?.value}function c(e){return e.find(e=>{let{type:t}=e;return t===n})?.value}((f,g,p)=>{if(!f||!g||!p)return;const d=g.Object.extend({initialize(){this.listenTo(p.Radio.channel("forms"),"submit:response",this.actionSubmit)},actionSubmit(f){const g=e.g._googlesitekit?.gtagUserData,p=g?(d=f.data.fields,function(e){const t=[["address",u(e)],["email",o(e)],["phone_number",c(e)]].filter(e=>{let[,t]=e;return t});if(0!==t.length)return Object.fromEntries(t)}(Object.values(d).map(e=>{const{label:u,type:o,value:c,key:f}=e;return function(e){let{type:u,name:o,value:c,label:m}=e||{};switch(u=i(u),o=i(o),c=i(c),m=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(m),u){case"email":return{type:t,value:l(c)};case"tel":return{type:n,value:s(c)}}return function(e){if(!e)return!1;const t=l(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(c)||a[t].includes(o)||a[t].includes(m)?{type:t,value:l(c)}:a[n].includes(o)||a[n].includes(m)?{type:n,value:s(c)}:a[r].includes(o)||a[r].includes(m)?{type:r,value:i(c)}:function(e){if(!e)return!1;if(!function(e){const t=e.replace(/\D/g,"");return!(t.length<7||t.length<e.length/2)&&/^[\s\-()+.\d]*$/.test(e)}(e))return!1;const t=s(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),r=e.trim().startsWith("+");return!(!n&&!r)}(c)?{type:n,value:s(c)}:null}({label:u,type:m[o]??o,value:c,name:f})}).filter(Boolean))):void 0;var d;e.g._googlesitekit?.gtagEvent?.("submit_lead_form",p?{user_data:p}:void 0)}});f(document).ready(()=>{new d})})(e.g.jQuery,e.g.Marionette,e.g.Backbone);const m={phone:"tel",textbox:"text"}})();