"use strict";function _instanceof(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var HOST_URI=getHostProtocol(),URLPATH="/v1/api",SPEED_SLIDE=170,MAX_AD_CARD=4,MIN_HEIGHT=250,EMPTY="",ERR="Something Went Wrong",AD_WIDGET_CONTAINER="_ad-widget-container",_ADS_CSS_ID=["_ads_widget_font_load","_ads_widget_local_css_load","_ads_main_container"],GOOGLE_FONT="https://fonts.googleapis.com/css?family=Nunito+Sans:400,500,600,700,800,900,1000",maxWidth=850,minWidth=175,maxHeight=280,slugWidth=30,slugWidthTitle=0,slugWidthWidget=15,RIGHT_ARROW_SLUG=0,PAGE_LEFT_MARGIN=8,AD_WIDGET_JSON=[],AD_WIDGET_OPTION_JSON={},AD_WIDGET_INIT_EL="_ads_push_container",AD_DATA_URL=getAPIURL(),MIN_MR_LF=0,MAX_MR_LF=-810,MAX_TITLE_HEIGHT=36;function getHostProtocol(){var t=document.getElementById("adwidgetscript"),e=t.src.split(":")[0];return{host:t.src.split(":")[1].split("/")[2],protocol:e+":"}}function getAPIURL(){return HOST_URI.protocol+"//"+HOST_URI.host+URLPATH+"?"}function overflowHidden(t,e){try{getElementDOMClass(_ADS_CSS_ID[2])[e].parentElement.style.overflow="hidden",defaultOverRide(t,e),reportWindowSize()}catch(a){setTimeout(function(){overflowHidden(t,e)},1e3)}}function loadCSS(t,e,a){if(!getElementDOM(a)){var i,n=document.getElementsByTagName("head")[0];if(t)(i=document.createElement("style")).innerText=e;else(i=document.createElement("link")).href=GOOGLE_FONT;i.id=a,i.rel="stylesheet",i.type="text/css",i.media="all",n.appendChild(i)}}function _AD_DOM_LOAD_SEC_CHEK(){return!0}function _AD_WIDGET_SHUFFLE_ADS(t){if(t.length<=MAX_AD_CARD+1)return t;for(var e=[],a=0,i=0;i<=MAX_AD_CARD&&a<50;i++){var n=i+Math.floor(Math.random()*(t.length-i));if(-1==e.indexOf(n)){var r=t[n];t[n]=t[i],t[i]=r,e.push(n)}else--i;a++}return t}function toggle(t,e){for(var a=getElementDOMClass(t),i=0;i=a:case maxWidth=300:break;case maxWidth>=a:MAX_MR_LF=-620}})}catch(t){}}function _AD_WIDGET_RESIZE(){getDOMQuery(AD_WIDGET_INIT_EL).forEach(function(t,e){var a=parseInt(getDOMAttributeData(t,"width")),i=document.body.clientWidth;i-=50,null==getDOMAttributeData(t,"org-width")&&setDOMAttributeData(t,"org-width",a),parseInt(getDOMAttributeData(t,"org-width"))=MIN_MR_LF?i.marginLeft=getInPx(MIN_MR_LF):parseInt(i.maxWidth)60?concat(i,"..."):i,'
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t').concat("-"+o,'%
\n\t\t\t\t\t\t\t
').concat(i,'
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t').concat(r,'\n\t\t\t\t\t\t\t\t').concat(d,'
\n\t\t\t\t\t\t\t
').concat(s,'
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
")}function getSTART_WIDGET_DOM(t,e){var a=AD_WIDGET_OPTION_JSON;if("object"!=_typeof(a))throw new Error("AD WIDGET Options are missing. Provide Options for widget to work");if(null==a.title&&(a.title=""),a.buttontext==EMPTY)throw new Error("AD WIDGET Button Text (data-ads-buttontext) not specified!");if(a.buttoncolor==EMPTY)throw new Error("AD WIDGET Button Color (data-ads-buttoncolor) not specified!");if(a.showdiscount==EMPTY&&(a.showdiscount="1"),a.discountcolor==EMPTY)throw new Error("AD WIDGET Discount Color (data-ads-discountcolor) not specified!");return a.showmerchant==EMPTY&&(a.showmerchant="1"),a.pricecolor==EMPTY&&(a.pricecolor="black"),a.merchantcolor==EMPTY&&(a.merchantcolor="black"),'
\n\t\t\t\t\t
').concat(a.title,'
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
')}function getEND_WIDGET_DOM(){return"
\n\t\t\t\t
\n\t\t\t\t"}function pushWidgetToWindow(){null==window.push?window.push={ad_widget:1}:window.push.ad_widget=++window.push.ad_widget}function _AD_WIDGET_DOM(t,e){var a=EMPTY;pushWidgetToWindow();var i="over-ride_"+getDOMAttributeData(t,"height"),n="over-ride-w_"+getDOMAttributeData(t,"width");a+=getSTART_WIDGET_DOM(e,i),(AD_WIDGET_JSON=_AD_WIDGET_SHUFFLE_ADS(AD_WIDGET_JSON)).forEach(function(t,e){e>MAX_AD_CARD||(a+=_AD_WIDGET_HTML(t,i,n))}),a+=getEND_WIDGET_DOM(),t.innerHTML=a,_AD_WIDGET_RESIZE()}function XHR_GET(t,e,a,i){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4==n.readyState&&200==n.status?e(n.responseText,a,i):4==n.readyState&&n.status},n.send(null)}function XHR_RESPONSE(t,e,a){try{AD_WIDGET_JSON=JSON.parse(t),AD_WIDGET_OPTION_JSON={title:getDOMAttributeData(e,"title"),buttontext:getDOMAttributeData(e,"buttontext"),buttoncolor:getDOMAttributeData(e,"buttoncolor"),showdiscount:getDOMAttributeData(e,"showdiscount"),discountcolor:getDOMAttributeData(e,"discountcolor"),showmerchant:getDOMAttributeData(e,"showmerchant"),pricecolor:getDOMAttributeData(e,"pricecolor"),merchantcolor:getDOMAttributeData(e,"merchantcolor")},_AD_WIDGET_DOM(e,a).then(function(){overflowHidden(e,a)})}catch(t){_instanceof(t,SyntaxError)}}function defaultOverRide(t,e){try{var a=parseInt(getDOMAttributeData(t,"width"));if(t.style.width=a,t.style.background="#ffffff",a!==EMPTY&&a<=maxWidth){getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.minWidth=getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.maxWidth=getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.width=parseInt(a)+slugWidthTitle;var i=parseInt(a)+RIGHT_ARROW_SLUG+PAGE_LEFT_MARGIN;getElementDOMClass("_ads_keys_conatiner-".concat(e+1))[1].style.right="calc(100% - ".concat(i,"px)"),getElementDOM("_ad-widget-title-".concat(e+1)).style.width=getElementDOM("_ad-widget-title-".concat(e+1)).style.maxWidth=parseInt(a)+slugWidthTitle}void 0!==getDOMAttributeData(t,"height")&&getDOMAttributeData(t,"height")<=MIN_HEIGHT&&(getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.minHeight=getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.maxHeight=getElementDOMClass(AD_WIDGET_CONTAINER)[e].style.height=getDOMAttributeData(t,"height")-MAX_TITLE_HEIGHT),reportWindowSize()}catch(t){}}function _AD_WIDGET_DATA_VALIDATOR(t,e){if(getDOMAttributeData(t,"trackingid")==EMPTY)throw new Error("AD WIDGET Tracking ID (data-ads-trackingid) not specified!");if(getDOMAttributeData(t,"category")==EMPTY&&getDOMAttributeData(t,"keyword")==EMPTY)throw new Error("Either AD WIDGET Category ID (data-ads-category) or AD WIDGET Keyword (data-ads-keyword) must be specified!");if(getDOMAttributeData(t,"countrycode")==EMPTY)throw new Error("AD WIDGET Country Code (data-ads-countrycode) not specified!");return e+="trackingid="+getDOMAttributeData(t,"trackingid")+"&countrycode="+getDOMAttributeData(t,"countrycode"),null!=getDOMAttributeData(t,"category")&&(e+="&categoryid="+getDOMAttributeData(t,"category")),null!=getDOMAttributeData(t,"keyword")&&(e+="&query="+t.getAttribute("data-ads-keyword")),null!=getDOMAttributeData(t,"merchant")&&(e+="&merchantid="+getDOMAttributeData(t,"merchant")),null!=getDOMAttributeData(t,"discountpercent")&&(e+="&discountpercent="+getDOMAttributeData(t,"discountpercent")),null!=getDOMAttributeData(t,"minprice")&&(e+="&minprice="+getDOMAttributeData(t,"minprice")),null!=getDOMAttributeData(t,"maxprice")&&(e+="&maxprice="+getDOMAttributeData(t,"maxprice")),e}function documentLoad(){if(!_AD_DOM_LOAD_SEC_CHEK())return document.write(ERR);var t=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);t=t?"_ad_gc":"_ad_ie","undefined"!=typeof InstallTrigger&&(t="_ad_ff"),document.getElementsByTagName("body")[0].classList.add(t),loadCSS(!1,"",_ADS_CSS_ID[0]),loadCSS(!0,_AD_WIDGET_CSS(),_ADS_CSS_ID[1]);var e=getDOMQuery(AD_WIDGET_INIT_EL);window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),e.forEach(function(t,e){XHR_GET(_AD_WIDGET_DATA_VALIDATOR(t,AD_DATA_URL),XHR_RESPONSE,t,e),reportWindowSize()})}function _AD_WIDGET_CSS(){return'._ads_main_container .hide{display:none!important}._ads_main_container{height:250px;max-height:250px;width:100%;max-width:100%;font-family:"Nunito Sans",sans-serif}._ad-widget-title{padding:0;font-size:15px;margin-bottom:10px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-height:2;max-height:16px;font-weight:600;min-height:26px;max-width:210px;width:210px}._ad-widget-container{display:flex;overflow:hidden;margin-bottom:0;max-width:850px;margin-left:0;min-height:250px;height:250px;max-height:250px}._ad-widget-container img{height:100px;width:100px}._ad-widget-container ._ads_text-center{text-align:center}._ad-widget-container-card{display:flex;flex-direction:column;width:170px;min-width:calc(170px - 15px);max-width:calc(170px - 15px);margin-right:15px;cursor:pointer}._ad-widget-container-card ._ads_title{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1;max-height:27px;margin-top:1px;font-size:14px;font-weight:600;min-height:27px}._ad-widget-container-card ._ads_sell-by{overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-height:1;max-height:14.5px;margin-top:1px;font-weight:600;font-size:14px;min-height:14.5px}._ad_ie ._ad-widget-container-card ._ads_sell-by{white-space:nowrap}._ad-widget-container-card ._ads_price{margin-top:5px}._ad-widget-container-card ._ads_price span{margin-right:5px}._ad-widget-container-card ._ads_price ._ads_actual-price{font-size:15px;font-weight:800}._ad-widget-container-card ._ads_price ._ads_strike-out{font-size:14px;font-weight:400;text-decoration:line-through;position:relative}._ad-widget-container-card ._ads_price ._ads_strike-out::after{border-bottom:.125em solid #000;content:"";left:0;margin-top:calc(.125em / 2 * -1);position:absolute;right:0;top:50%}._ad-widget-container-card ._ads_btn{margin-top:5px;margin-left:15px;border-radius:4px;border:none;font-size:12px;text-transform:uppercase;padding:1px 25px 5px 25px;background-color:#1cb728;color:#fff;cursor:pointer;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;max-height:24px;max-width:132.31px;line-height:1.8}._ad-widget-container-card ._ads_discount-perc-parent{position:relative}._ad-widget-container-card ._ads_discount-perc-parent ._ads_discount-perc{position:absolute;background:#32b2e6;color:#fff;font-size:12px;font-weight:500;border-radius:4px;padding:4px 4px 4px 4px}._ads_keys{margin-top:75px;padding:11px 10px 10px 12px;position:absolute;height:30px;width:30px;border-radius:50%;background:#000;cursor:pointer;box-sizing:border-box}._ads_keys:hover{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;height:35px;width:35px;margin-right:0;padding:13px 13px 10px 14px}._ads_keys_r{right:1px}._ads_keys_wrapper{z-index:999999;position:absolute;width:5%;height:220px}._ads_keys_wrapper-r{right:1px}._ads_keys i{border:solid #fff;border-width:0 3px 3px 0;display:inline-block;padding:3px}._ads_keys ._ads_right_arrow{transform:rotate(-45deg);-webkit-transform:rotate(-45deg);float:right;padding:3px;margin-right:2px}._ads_keys ._ads_left_arrow{transform:rotate(135deg);-webkit-transform:rotate(135deg)}._ad-widget-container-card ._ads_title.over-ride_250{font-size:14px;min-height:29px;max-height:29px}._ad-widget-container-card.over-ride_250.over-ride-w_300{margin-right:20px;width:145px;min-width:calc(145px - 20px);max-width:calc(145px - 20px)}._ad-widget-container-card ._ads_btn.over-ride_250.over-ride-w_300{margin-left:10px;padding:1px 13px 5px 13px;max-width:145px}._ad-widget-container-card ._ads_sell-by.over-ride_250.over-ride-w_300{margin-left:10px;margin-right:10px}._ad-widget-container-card ._ads_title.over-ride_250.over-ride-w_300{margin-left:10px}._ad-widget-container-card ._ads_price.over-ride_250.over-ride-w_300{margin-left:2px}._ad-widget-container-card ._ads_price ._ads_strike-out.over-ride_250.over-ride-w_300{font-size:13px}._ad-widget-container-card ._ads_price ._ads_actual-price.over-ride_250.over-ride-w_300{font-size:14px}._ads_main_container.over-ride_200{height:200px;max-height:200px}._ad-widget-container img.over-ride_200{height:67px;width:67px}._ad_gc ._ad-widget-container-card ._ads_title.over-ride_200{font-size:14px;min-height:27px;max-height:27px}._ad_ie ._ad-widget-container-card ._ads_title,._ad_ie ._ad-widget-container-card ._ads_title.over-ride_200{font-size:14px;min-height:29px;max-height:29px}._ad-widget-container-card ._ads_price.over-ride_200{margin-top:0}._ad-widget-container-card ._ads_price ._ads_actual-price.over-ride_200{font-size:15px}._ad-widget-container-card ._ads_price ._ads_strike-out.over-ride_200{font-size:15px}._ad-widget-container-card ._ads_sell-by.over-ride_200{font-size:14px}._ads_main_container.over-ride_280{height:280px;max-height:280px}._ad-widget-container img.over-ride_280{height:100px;width:100px;padding:2px 0 2px 0}._ad-widget-container-card ._ads_title.over-ride_280{min-height:42px;max-height:42px;-webkit-line-clamp:3;margin-top:3px;margin-bottom:3px}._ad-widget-container-card ._ads_price.over-ride_280{margin-top:3px;margin-bottom:3px}._ad-widget-container-card ._ads_sell-by.over-ride_280{margin-top:3px;margin-bottom:3px}._ad-widget-container-card ._ads_btn.over-ride_280{margin-top:5px}@media only screen and (max-width:1024px) and (min-width:990px){._ads_keys_r{right:2px}}@media only screen and (max-width:991px){._ads_keys_r{right:2px}}'}"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?window.addEventListener("load",documentLoad):window.addEventListener("DOMContentLoaded",documentLoad),window.addEventListener("resize",_AD_WIDGET_RESIZE);