function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t796_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t796');if(!container)return;var windowWidth=window.innerWidth;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');if(screenMin&&windowWidth<parseInt(screenMin,10))return!1;if(screenMax&&windowWidth>parseInt(screenMax,10))return!1;var shapeBorder=rec.querySelector('.t796__shape-border');var shapeRecId=container.getAttribute('data-shape-rec-ids');if(shapeRecId){shapeRecId=shapeRecId.split(',');for(var i=0;i<shapeRecId.length;i++){var shapeId=shapeRecId[i];var currentRec=document.querySelector('#rec'+shapeId);var currentShape=shapeBorder.cloneNode(!0);t796_setColor(rec,currentShape);t796_addDivider(currentRec,currentShape)}}else{var excludesBlocks=[215,316,390,651,702,706,708,750,756,766,825,862,868,943,945,674];var excludes='';for(var i=0;i<excludesBlocks.length;i++){excludes+=':not([data-record-type="'+excludesBlocks[i]+'"])'}
if(excludes.slice(-1)===','){excludes=excludes.slice(0,-1)}
var recs=[];if(shapeBorder.classList.contains('t796__shape-border_top')||shapeBorder.classList.contains('t796__shape-border_top-flip')){recs=t796__nextAll(rec,excludes)}
if(shapeBorder.classList.contains('t796__shape-border_bottom')||shapeBorder.classList.contains('t796__shape-border_bottom-flip')){recs=t796__prevAll(rec,excludes)}
if(recs.length!==0){var currentShape=shapeBorder.cloneNode(!0);t796_setColor(rec,currentShape);t796_addDivider(recs[0],currentShape)}}}
function t796_setColor(rec,shape){if(shape.getAttribute('data-fill-color'))return;var nearestBlock;if(shape.classList.contains('t796__shape-border_bottom')||shape.classList.contains('t796__shape-border_bottom-flip')){var nextBlock=rec.nextElementSibling;if(nextBlock){nearestBlock=nextBlock.matches('.r')?nextBlock:!1}}else{var prevBlock=rec.previousElementSibling;if(prevBlock){nearestBlock=prevBlock.matches('.r')?prevBlock:!1}}
if(!nearestBlock)return;var fillColor=nearestBlock.getAttribute('data-bg-color');if(!fillColor)return;var svg=shape.querySelector('.t796__svg');if(svg)svg.style.fill=fillColor}
function t796_addDivider(rec,shape){if(!rec)return;rec.setAttribute('data-animationappear','off');rec.classList.remove('r_hidden');var cover=rec.querySelector('.t-cover');var zeroBlock=rec.querySelector('.t396');if(cover||zeroBlock){if(cover){var showLayers=cover.querySelectorAll('.t557__snow-layer');if(showLayers.length>0)shape.style.zIndex=1;var coverFilter=cover.querySelector('.t-cover__filter');if(coverFilter)coverFilter.insertAdjacentElement('afterend',shape)}
if(zeroBlock){zeroBlock.insertAdjacentElement('afterend',shape);rec.style.position='relative';var zeroFilter=zeroBlock.querySelector('.t396__filter');if(zeroFilter){var zIndex=1;var zeroArtboard=zeroBlock.querySelector('.t396__artboard');var isVisible=getComputedStyle(zeroArtboard,null).overflow==='visible';if(!isVisible)zIndex=99;shape.style.zIndex=zIndex}}
shape.style.display='block'}else{var wrapper=rec;var recordType=parseInt(rec.getAttribute('data-record-type'));if(!wrapper)return!0;wrapper.appendChild(shape);wrapper.style.position='relative';var excludesBlocks=[125,331,554,746,754,776,778,786,858,896,897,924,915,943,945,951,1004,1025];if(excludesBlocks.indexOf(recordType)===-1){var notZIndexBlocks=[983];var firstDiv=wrapper.querySelector('div');firstDiv.style.position='relative';firstDiv.classList.add('t796_cont-near-shape-divider');if(notZIndexBlocks.indexOf(recordType)!==-1){firstDiv.style.zIndex=0}else{firstDiv.style.zIndex='1'}}
var blocks=[195,246,279,675,694,734,823,938];if(blocks.indexOf(recordType)!==-1){shape.style.zIndex=1}
shape.style.display='block'}}
function t796__nextAll(element,selector){var nextElements=[];var nextElement=element;while(nextElement.nextElementSibling){nextElement=nextElement.nextElementSibling;if(nextElement.id==='t-footer'){var footerElements=nextElement.querySelectorAll('.r');if(footerElements.length!==0){nextElement=footerElements[0];if(nextElement.matches(selector)){nextElements.push(nextElement)}
nextElements=nextElements.concat(t796__nextAll(nextElement,selector))}}else if(nextElement.matches(selector)){nextElements.push(nextElement)}}
return nextElements}
function t796__prevAll(element,selector){var prevElements=[];var prevElement=element;while(prevElement.previousElementSibling){prevElement=prevElement.previousElementSibling;if(prevElement.id==='t-header'){var headerElements=prevElement.querySelectorAll('.r');if(headerElements.length!==0){prevElement=headerElements[headerElements.length-1];if(prevElement.matches(selector)){prevElements.push(prevElement)}
prevElements=prevElements.concat(t796__prevAll(prevElement,selector))}}else if(prevElement.matches(selector)){prevElements.push(prevElement)}}
return prevElements}
if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
function t142_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t142__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom)+5;var textHeight=button.scrollHeight;if(buttonHeight<textHeight){button.classList.add('t142__submit-overflowed')}}
function t400_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t400');if(!container)return;var button=rec.querySelector('.t400__submit');var hideBackText=button.getAttribute('data-hide-back-text');var showMoreText=button.textContent;button.addEventListener('click',function(){if(hideBackText&&button.classList.contains('t400__submit_hide-back')){t400_alltabs_updateContent(recId);button.classList.remove('t400__submit_hide-back');if(button.classList.contains('t400__submit-overflowed')){button.innerHTML='<span class="t400__text">'+showMoreText+'</span>'}else{button.innerHTML=showMoreText}
var zeroBlocks=document.querySelectorAll('.t396');for(var i=0;i<zeroBlocks.length;i++){t400__triggerEvent(zeroBlocks[i],'displayChanged')}
return}
var recIds=button.getAttribute('data-hidden-rec-ids').split(',');for(var i=0;i<recIds.length;i++){var recShowBlock=document.getElementById('rec'+recIds[i]);if(recShowBlock){recShowBlock.classList.remove('t400__off');recShowBlock.style.opacity='';var selectors=recShowBlock.querySelectorAll('.t-feed, .t-store, .t-store__product-snippet, .t117, .t121, .t132, .t223, .t226, .t228, .t229, .t230, .t268, .t279, .t341, .t346, .t347, .t349, .t351, .t353, .t384, .t385, .t386, .t396, .t400, .t404, .t409, .t410, .t412, .t418, .t422, .t425, .t428, .t433, .t456, .t477, .t478, .t480, .t486, .t498, .t504, .t506, .t509, .t511, .t517, .t518, .t519, .t520, .t527, .t531, .t532, .t533, .t538, .t539, .t544, .t545, .t552, .t554, .t570, .t577, .t592, .t598, .t599, .t601, .t604, .t605, .t609, .t615, .t616, .t650, .t659, .t670, .t675, .t686, .t688, .t694, .t698, .t700, .t726, .t728, .t730, .t734, .t738, .t740, .t744, .t754, .t760, .t762, .t764, .t774, .t776, .t778, .t780, .t786, .t798, .t799, .t801, .t813, .t814, .t822, .t826, .t827, .t829, .t842, .t843, .t849, .t850, .t851, .t856, .t858, .t859, .t860, .t881, .t889, .t899, .t902, .t905, .t912, .t923, .t937, .t958, .t959, .t979, .t982, .t983, .t989, .t994, .t1000, .t1003, .t1067, .t1068, .t1069, .t1070, .t1071, .t1072, .t1053');for(var j=0;j<selectors.length;j++){t400__triggerEvent(selectors[j],'displayChanged')}
var displayChangedBlock=recShowBlock.querySelector('[data-display-changed="true"]');if(displayChangedBlock)t400__triggerEvent(displayChangedBlock,'displayChanged')}}
if(hideBackText){button.classList.add('t400__submit_hide-back');if(button.classList.contains('t400__submit-overflowed')){button.innerHTML='<span class="t400__text">'+hideBackText+'</span>'}else{button.innerHTML=hideBackText}}else{rec.classList.add('t400__off');rec.style.display='none'}
if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}});t400_alltabs_updateContent(recId);t400_checkSize(recId);container.addEventListener('displayChanged',function(){t400_checkSize(recId)})}
function t400_alltabs_updateContent(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t400__submit');if(!button)return;var recIds=button.getAttribute('data-hidden-rec-ids').split(',');for(var i=0;i<recIds.length;i++){var recHideBlock=document.getElementById('rec'+recIds[i]);if(!recHideBlock)continue;recHideBlock.setAttribute('data-animationappear','off');recHideBlock.setAttribute('data-connect-with-tab','yes');recHideBlock.classList.add('t400__off')}
rec.setAttribute('data-hiding-completed','yes')}
function t400_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t400__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom);var buttonScrollHeight=button.scrollHeight;if(buttonHeight<buttonScrollHeight){var buttonText=button.textContent;button.classList.add('t400__submit-overflowed');button.innerHTML='<span class="t400__text">'+buttonText+'</span>'}}
function t400__triggerEvent(el,eventName){var event;if(typeof window.CustomEvent==='function'){event=new CustomEvent(eventName)}else if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(eventName,!0,!1)}else if(document.createEventObject){event=document.createEventObject();event.eventType=eventName}
event.eventName=eventName;if(el.dispatchEvent){el.dispatchEvent(event)}else if(el.fireEvent){el.fireEvent('on'+event.eventType,event)}else if(el[eventName]){el[eventName]()}else if(el['on'+eventName]){el['on'+eventName]()}}
function t393_appearMenu(recId){if(window.innerWidth>980){var recs=document.querySelectorAll('.t393');var scrollTop=window.pageYOffset;var body=document.body;var html=document.documentElement;var documentHeight=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight);for(var i=0;i<recs.length;i++){var rec=recs[i];var appearOffset=rec.getAttribute('data-appearoffset');var hideOffset=rec.getAttribute('data-hideoffset');if(appearOffset){if(appearOffset.indexOf('vh')>-1){appearOffset=Math.floor((window.innerHeight*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);if(scrollTop>=appearOffset){if(rec.style.visibility==='hidden'){rec.style.visibility='visible';t393__fadeIn(rec)}}else{rec.style.visibility='hidden'}}
if(hideOffset){if(hideOffset.indexOf('vh')>-1){hideOffset=Math.floor((window.innerHeight*(parseInt(hideOffset)/100)))}
hideOffset=parseInt(hideOffset,10);if(scrollTop+window.innerHeight>=documentHeight-hideOffset){if(rec.style.visibility!=='hidden'){rec.style.visibility='hidden'}}else if(appearOffset){if(scrollTop>=appearOffset){rec.style.visibility='visible'}}else{rec.style.visibility='visible'}}}}}
function t393__fadeIn(el){if(el.style.display==='block')return;var opacity=0;el.style.opacity=opacity;el.style.display='block';var timer=setInterval(function(){el.style.opacity=opacity;opacity+=0.1;if(opacity>=1.0){clearInterval(timer);el.style.display=''}},30)}
function t868_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');if(!popup)return;var hook=popup.getAttribute('data-tooltip-hook');if(!hook)return;var analitics=popup.getAttribute('data-track-popup');var customCodeHTML=t868__readCustomCode(rec);var recBlocks=document.querySelectorAll('.r');for(var i=0;i<recBlocks.length;i++){recBlocks[i].addEventListener('click',function(event){var target=event.target;var href=target.closest('a[href$="'+hook+'"]')?target:!1;if(!href)return;event.preventDefault();t868_showPopup(rec,customCodeHTML);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recid)});if(hook.substring(0,7)==='#popup:'&&analitics&&window.Tilda){var virtTitle=hook;virtTitle=virtTitle.substring(7);Tilda.sendEventToStatistics(analitics,virtTitle)}})}
if(!popup.getAttribute('data-popup-inited')&&'MutationObserver' in window){popup.setAttribute('data-popup-inited','yes');var stores=document.querySelectorAll('body .t-store');Array.prototype.forEach.call(stores,function(store){new MutationObserver(function(mutationsList){for(var mutation in mutationsList){var event=mutationsList[mutation];if(event.type==='attributes'){if(event.target.className.indexOf('t-popup_show')!==-1){popup.style.zIndex='99999999';t868_initPopup(recid);}}}}).observe(store,{attributes:!0,attributeFilter:['class'],subtree:!0,})})}}
function t868__readCustomCode(rec){var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(!codeWrap)return;var customCode=codeWrap.innerHTML;return customCode}
function t868_showPopup(rec){var popup=rec.querySelector('.t-popup');if(!popup)return;var popupContainer=popup.querySelector('.t-popup__container');if(!popupContainer)return;var codeWrap=popup.querySelector('.t868__code-wrap');if(!codeWrap)return;var windowWidth=window.innerWidth;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');if(screenMin&&windowWidth<parseInt(screenMin,10))return;if(screenMax&&windowWidth>parseInt(screenMax,10))return;popup.style.display='block';codeWrap.style.display='block';t868_setHeight(rec);setTimeout(function(){popupContainer.classList.add('t-popup__container-animated');popup.classList.add('t-popup_show')},100);if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed');popup.addEventListener('click',function(event){var container=event.target.closest('.t-popup__container');if(!container)t868_closePopup(rec)});var closeButton=rec.querySelector('.t-popup__close');if(closeButton){closeButton.addEventListener('click',function(){t868_closePopup(rec)})}
var buttons=rec.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(buttons,function(button){button.addEventListener('click',function(){var url=button.getAttribute('href');if(url.indexOf('#order')!==-1){var popupContainer=rec.querySelector('.t-popup__container');setTimeout(function(){while(popupContainer.firstChild){popupContainer.removeChild(popupContainer.firstChild)}},600)}
if(!url||url.substring(0,7)!=='#price:'){t868_closePopup(rec);if(!url||url.substring(0,7)==='#popup:'){setTimeout(function(){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed')},300)}}})});document.addEventListener('keydown',function(event){if(event.keyCode===27){t868_closePopup(rec)}})}
function t868_closePopup(rec){var popup=rec.querySelector('.t-popup');var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');setTimeout(function(){if(!popup.classList.contains('.t-popup_show')){popup.style.display='none';if(codeWrap){codeWrap.style.display='none'}}},300)}
function t868_setHeight(rec){var videoCarier=rec.querySelector('.t868__video-carier');if(!videoCarier)return;var paddingLeft=parseInt(videoCarier.style.paddingLeft,10)||0;var paddingRight=parseInt(videoCarier.style.paddingRight,10)||0;var height=(videoCarier.clientWidth-(paddingLeft+paddingRight))/(16/9);videoCarier.style.height=height;Array.prototype.forEach.call(videoCarier.closest,function(parent){parent.style.height=height})}
if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
el=el.parentElement||el.parentNode}
return null}}