if(typeof yotpo!=='undefined'&&!yotpo.v2YotpoLoaded){yotpo=undefined;}function EndlessScroll(e){function t(e,t,o,r,s,a){this.page=1,this.per_page=e,this._controller=t,this.loader=o,this.inviewCallbackFunction=r,this.isButton=s,this.loadIndicator=a,this.isButton?i.call(this):n.call(this)}function i(){var t=this;e.addEventListener(this.loader,"click",function(){t.loadIndicator&&(e.addClass(t.loader,"yotpo-hidden"),e.removeClass(t.loadIndicator,"yotpo-hidden")),t.inviewCallbackFunction.call(t)})}function o(){this.loadIndicator&&(e.addClass(this.loadIndicator,"yotpo-hidden"),e.removeClass(this.loader,"yotpo-hidden"))}function n(){e.currentInview.register(this.loader,this.inviewCallbackFunction)}function r(e){this.batchCallbackFunction(e),this.isButton?o.call(this):n.call(this)}return t.prototype.getNextPage=function(e,t){this.batchCallbackFunction=t,this.page++,e.params||(e.params={}),e.params.page=this.page,e.params.per_page=this.per_page,this._controller.getBatch(r.bind(this),[e])},t.prototype.ignoreLoader=function(t){t?e.addClass(this.loader,"yotpo-ignore-inview"):e.removeClass(this.loader,"yotpo-ignore-inview")},t}function Room(e){this.me=e.me,this.signalServer=e.signalServer,this.iceServers=e.iceServers,this.id,this.signal,this.stream,this.peers={},this.channels={},this.handles={}}Yotpo=function(){function e(t,i){if(this.appKey=t,this.userSettings=i,this.widgets=[],this.shouldInitialize=!0,this.initialized=!1,this.allWidgetsReadyCallback=[],e.shouldPreventCookies=e.getBoolSetting(!1,this.userSettings.prevent_cookies),this.userSettings.disable_shopper_side_cookies&&this.userSettings.disable_shopper_side_cookies.settings){var o=e.getBoolSetting(!1,this.userSettings.disable_shopper_side_cookies.settings.disable_onsite_cookies);e.shouldPreventCookies=e.shouldPreventCookies||o}if(!this.userSettings.load_only_widgets_on_page||this.userSettings.load_css_async){var n=this.getUserSetting("css_custom_host");v(n)?_.call(this):w.call(this)}C.call(this),"undefined"!=typeof yotpoTrackConversionData&&(u.call(this),e.shouldPreventCookies||e.Libraries.Tracker.trackConversionOrder(t,yotpoTrackConversionData),this.shouldInitialize=!1)}function t(){var t=this;e.forEach(Object.keys(e.widgets),function(e){E.call(t,e),l.call(t,e)})}function i(){var t=r(this.userSettings.testimonials),i=s.call(this,t,this.userSettings.load_css_async),a=this.userSettings.load_css_async;a?e.loadScript(i,document.body,n.bind(this)):o.call(this,i)}function o(t){var i=this;e.ajax(t,function(t){if(!t)return void e.safeConsole("Missing widgets data");var o=JSON.parse(t);a.call(i,o.JsContent,o.CssContent),n.call(i)})}function n(){t.call(this),this.getWidgets().length>0&&h.call(this)}function r(t){var i=t?["testimonials"]:[];return e.forEach(Object.keys(e.widgets),function(t){var o=e.widgets[t].selector;e.getDocElement().querySelector(o)&&i.push(t)}),i}function s(t){var i,o=this.userSettings.load_css_async?".js":".json",n=e.getWidgetHost(this.getUserSetting("host"))+"/"+this.getAppKey()+"/widget_loader"+o;this.getUserSetting("version")&&(n+="?widget_version="+this.getUserSetting("version"),i=!0);var r=t.sort().join(",");return n+=i?"&widgets="+r:"?widgets="+r,this.userSettings.load_css_async&&(n+="&load_only_js=true"),n}function a(t,i){e.injectScript(t,document.body);var o=this.getUserSetting("css_custom_host");v(o)||e.injectCSS(i,document.body)}function l(t){try{if(e.Widgets)for(var i=e.Widgets[e.camelize(t)]||e.Widgets.Basic,o=e.getDocElement().querySelectorAll(i.selector||".yotpo."+t),n=0;n=r&&k.call(t)},o[s],null)}else t.getBatch(function(e){g(t,e)},i,k)}function m(t){function i(){for(var e=[],t=this.getWidgets(),i=0;i0||g.is("initialized")&&!g.is("ready")&&(g.trigger("ready"),g.state("ready"))}}function o(t,i){t.getElement()?(t.is("initialized")||i&&(t.getElement().innerHTML=i.result),t.is("initialized")&&!t.is("ready")&&(t.trigger("ready"),t.state("ready"))):e.safeConsole("Div not found in the Dom.")}function n(e,t){for(var i=0;i=0){var d=document.createElement("div");d.innerHTML=a[l].result,d.getElementsByClassName("yotpo-promoted-product").length>0&&(S(d.getElementsByClassName("yotpo-promoted-product")),a[l].result=d.innerHTML)}}catch(u){e.safeConsole(u.message)}if(this.getUserSetting("widgets_data_requests"))i.call(this);else{var p=this.getWidgets();if(p.length==a.length)for(var c=0;c=i?s="yotpo-small":655>=i&&(s="yotpo-medium"),""!=s&&e.addClass(n,s),t.trigger("sizeCalculated",s);else if("new"===o){var a=e.Helpers.WidthClass.getWidgetWidthClasses();s=e.Helpers.WidthClass.getWidgetWidthClass(i),e.hasClass(n,s)||(e.removeClassList(n,a),e.addClass(n,s)),t.trigger("sizeCalculated",s)}})}function y(){var t=this,i=e.getDocElement().querySelectorAll(".yotpo-display-wrapper")[0];"undefined"==typeof i||"visible"==e.getVisibilityStyle(i)?f.call(t):setTimeout(function(){y.call(t)},50)}function v(e){return b("yotpo-full-css.css")||b(e)}function b(e){if(!e)return!1;for(var t=document.styleSheets,i=0;i-1)return!0}return!1}function w(){var t=this;if("true"===e.getURLParameter(location.search,"yo_offload_css"))return void x(function(){t.trigger("CssReady")},1e3,5);var i=this.getUserSetting("demo"),o=this.getUserSetting("info"),n=this.getUserSetting("css_preview"),r=this.getUserSetting("css_version")||this.getUserSetting("version"),s=this.getUserSetting("use_final_overrides"),a=this.getUserSetting("hard_refresh"),l=e.getWidgetHost(this.getUserSettings().host)+"/"+this.getAppKey()+"/widget.css?widget_version="+r;"undefined"!=typeof i&&(l+="&demo=true"),"undefined"!=typeof o&&(l+="&info="+window.encodeURIComponent(o)),"undefined"!=typeof n&&(l+="&css_preview="+n),"undefined"!=typeof s&&(l+="&use_final_overrides="+s),"undefined"!=typeof a&&"true"==a&&(l+="&rand="+(1e6*Math.random()|0));var c=document.getElementsByTagName("head")[0],d=document.createElement("link");d.type="text/css",d.rel="stylesheet",d.href=l,d.onload=function(){x(function(){t.trigger("CssReady")},1e3,5)},c.appendChild(d)}function _(){var e=this;x(function(){e.trigger("CssReady")},1e3,5)}function S(e){for(var t=[],i=0;i=0;i--)e[i].dataset.to_delete&&e[i].parentNode.remove()}}function C(){if(!e.shouldPreventCookies){var t=this.getUserSetting("ads"),i=this.getUserSetting("facebook_ads");if(t&&i&&parseInt(i.settings.pixel_id)&&1==i.settings.init_pixel){var o="undefined"!=typeof yotpoTrackConversionData?yotpoTrackConversionData:null;e.Libraries.Tracker.fbTracking(i.settings,o)}}}function A(){var t=this;e.forEach(["ready"],function(e){t.on(e,function(){t.setState(e)})})}function E(t){try{if(e.Widgets){var i=e.Widgets[e.camelize(t)]||e.Widgets.Basic;if(i.alwaysShow){var o=this.userSettings[t]||e.getURLParameter(location.search,t+"_demo")||!1;if(o){var n=document.createElement("div");n.classList.add("yotpo"),n.classList.add(t),document.body.appendChild(n)}}}}catch(r){e.safeConsole(r.message)}}function k(){for(var e=0;eo;o++)setTimeout(e,t*o)}return e.batchType="POST",e.isIE10OrLess=-1!=navigator.userAgent.indexOf("MSIE"),e.isIE8=e.isIE10OrLess&&8==parseInt(navigator.userAgent.toLowerCase().split("msie")[1]),e.isIEEdge=/Edge\/12./i.test(navigator.userAgent),e.isIE11=navigator.userAgent.indexOf("Trident/7.0")>0,e.isIEFamily=e.isIE10OrLess||e.isIE11||e.isIEEdge,e.dynamicCreateType="POST",e.globals={},e.hosts={widget:{dynamic:"w2.yotpo.com","static":"staticw2.yotpo.com"},api:{dynamic:"api.yotpo.com"},b2b:{dynamic:"my.yotpo.com"},reviews_me:{dynamic:"reviews.me"},base:{dynamic:"yotpo.com"}},e.getWidgetHost=function(e){var t=this.mock?"http:":"";return t+"//"+(this.hosts.widget[e]||this.hosts.widget["static"])},e.getApiHost=function(e){return"//"+(this.hosts.api[e]||this.hosts.api.dynamic)},e.texts={},e.filterAndSearch={filters_state_manager:{aggregators_types:{}},analytics:{page_types:{}}},e.widgets={main:{selector:".yotpo.yotpo-main-widget"},bottomline:{selector:".yotpo.bottomLine"},embedded:{selector:".yotpo.embedded-widget"},badge:{selector:".yotpo.badge,.yotpo.yotpo-badge"},"questions-bottomline":{selector:".yotpo.QABottomLine"},carousels:{selector:".yotpo.yotpo-reviews-carousel"},slider:{selector:".yotpo.yotpo-slider"},"visual-carousel":{selector:".yotpo.yotpo-visual-carousel"},"pictures-gallery":{selector:".yotpo.yotpo-pictures-gallery"},"pictures-widget":{selector:".yotpo.yotpo-pictures-widget"},"shoppable-gallery":{selector:".yotpo.yotpo-shoppable-gallery"},testimonials:{selector:"#yotpo-testimonials-custom-tab,.yotpo.testimonials"},"single-video":{selector:".yotpo.yotpo-single-video"},"shoppers-say":{selector:".yotpo.yotpo-shoppers-say"}},e.docElement=void 0,e.getDocElement=function(){return e.docElement?e.docElement:document},e.getMainWidget=function(t){if(t instanceof e){for(var i,o=t.getWidgetsByName("Main"),n=0;n1?r[o]:r.length>0?r[0]:null;return s&&!e.isHidden(s)?(n&&s.setAttribute("tabindex",0),s.focus(),!0):!1},e.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},e.prototype.onAllWidgetsReady=function(e){this.allWidgetsReadyCallback.push(e)},e.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},e.prototype.setState=function(e){this.state=e},e.prototype.getState=function(){return this.state},e.prototype.getWidgetByName=function(t){var i=null;return e.forEach(this.getWidgets(),function(o){e.Widgets[t]&&o instanceof e.Widgets[t]&&(i=o)}),i},e.prototype.getWidgetsByName=function(t){var i=[];return e.forEach(this.getWidgets(),function(o){o instanceof e.Widgets[t]&&i.push(o)}),i},e.prototype.getWidgetsByNames=function(t){var i=[];return e.forEach(this.getWidgets(),function(o){for(var n=0;n0)for(var c,d,u=e.maxBatchMethods,p=Math.ceil(i.length/u),g=[],h=0,m=r(i),f=0,y=i.length;y>f;f+=u){c=i.slice(f,f+u);var v=c&&1==c.length;m=v?s(c[0]):m;var b=a(this.getUserSetting("host"),this.getAppKey(),m,this.getUserSetting("widgets_data_requests"),v?c[0]:void 0);d={methods:JSON2.stringify(c),app_key:this.getAppKey(),is_mobile:e.isMobile(),widget_version:this.getUserSetting("version")};var w;e.testingGroupsHandler&&(w=e.testingGroupsHandler.getTestingGroupsForServer()),w&&(d.features_testing_groups=JSON.stringify(w)),"undefined"!=typeof this.getUserSetting("demo")&&"undefined"!=typeof this.getUserSetting("info")&&(d.info=this.getUserSetting("info"),d.demo=!0),"undefined"!=typeof this.getUserSetting("css_preview")&&(d.css_preview=this.getUserSetting("css_preview")),"undefined"!=typeof this.getUserSetting("css_version")&&(d.css_version=this.getUserSetting("css_version")),"undefined"!=typeof this.getUserSetting("lang")&&(d.lang=this.getUserSetting("lang")),d=e.convertHashToQueryStringParams(d),"GET"==e.batchType&&(b+="?"+d),e.ajax(b,n,e.batchType,d,{page:f/u})}else x(function(){l.trigger("BatchReady")},1e3,5),t.call(this,"[]"),o&&o.call(this)},e.prototype.init=function(t){return!this.initialized&&this.shouldInitialize&&(this.initialized=!0,e.Element.clear(),e.docElement||(e.docElement=t),p.call(this),c.call(this),u.call(this),A.call(this),this.userSettings.load_only_widgets_on_page?i.call(this):this.initWidgets(),d.call(this)),this},e.prototype.init_for_async=function(){return!this.initialized&&this.shouldInitialize&&(this.initialized=!0,e.Element.clear(),p.call(this),c.call(this),u.call(this),A.call(this),d.call(this)),this},e.prototype.initWidgets=function(){t.call(this),h.call(this)},e.prototype.clean=function(){e.forEach(this.getWidgets(),function(e){for(var t=e.getElement();t.hasChildNodes();)t.removeChild(t.firstChild)})},e.prototype.updateContent=function(){this.clean(),h.call(this)},e.prototype.refreshWidgets=function(e){this.inview.unbindEvents(),this.clean(),this.widgets=[],this.allWidgetsReadyCallback=[],this.initialized=!1,this.shouldInitialize=!0,this.init(e),this.inview.bindEvents(),this.inview.registerAllWidgetsReady(this)},e.prototype.trackEvent=function(t,i,o,n){e.shouldPreventCookies||this.analytics.trackEvent(t,i,o,n)},e.prototype.trackPageView=function(){e.shouldPreventCookies||this.analytics.trackPageView()},e}(),Yotpo.Element=function(){function e(e){this.attributes={id:++t,element:e,state:"new"},e.setAttribute("data-yotpo-element-id",this.get("id"))}var t=0,i={};return e.prototype.get=function(e){return this.attributes[e]},e.prototype.set=function(e,t){this.attributes[e]=t},e.prototype.is=function(e){return this.get("state")==e},e.get=function(t){var o=+t.getAttribute("data-yotpo-element-id");if(!i[o]){var n=new e(t);o=n.get("id"),i[o]=n}return i[o]},e.clear=function(){for(var e in i)i.hasOwnProperty(e)&&(i[e].get("element").removeAttribute("data-yotpo-element-id"),delete i[e])},e}(Yotpo);var EDGE_RANGE_WIDTH=300;Yotpo.escapeHtml=function(e){return e=e.toString().trim(),""==e?e:e.replace(/ +(?= )/g,"").replace(/"/g,""").replace(//g,">").replace(/'/g,"'")},Yotpo.cleanParam=function(e,t){return e&&"display_name"===e.toString()||"review_content"===e.toString()||"review_title"===e.toString()?Yotpo.escapeHtml(t):t},Yotpo.validateStringMaxLength=function(e,t){return t=t||150,null==e||e.length>t?!1:!0},Yotpo.validateStringHasNoSpecialChars=function(e){var t=/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;return void 0!==e?!t.test(e):!0},Yotpo.appendChildElements=function(e,t){for(;e.childNodes.length>0;)t.appendChild(e.childNodes[0])},Yotpo.validateStringMaxWords=function(e,t){if(t=t||150,"string"!=typeof e)return!1;var i=e.match(/\S+/g);return i=i?i.length:0,t>=i},Yotpo.validateStringMinLength=function(e,t){return t=t||1,null==e||e.length()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},Yotpo.isValidUrl=function(e){var t=new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(:\d{2,5})?(\/[^\s]*)?$/i);return t.test(e)},Yotpo.validateCheckbox=function(e){return""!=e},Yotpo.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Yotpo.camelize=function(e){for(var t=e.split("-"),i=Yotpo.capitalize(t[0]),o=1;o-1&&t.call(e,o)})},Yotpo.oneTimeOnKeyDown=function(e,t,i){Yotpo.onKeyDown(e,function(i){Yotpo.removeEventListener(e,i.type,arguments.callee),t.call(e,i)},i)},Yotpo.onEnterKeyDown=function(e,t){Yotpo.onKeyDown(e,t,[Yotpo.keyCodes.enter])},Yotpo.mouseClickOnEnterKeyDown=function(e){Yotpo.onKeyDown(e,function(t){"function"==typeof e.click&&(e.click(),t.stopPropagation())},[Yotpo.keyCodes.enter])},Yotpo.onTabKeyDown=function(e,t){Yotpo.onKeyDown(e,t,[Yotpo.keyCodes.tab])},Yotpo.onEscapeKeyDown=function(e,t){Yotpo.onKeyDown(e,t,[Yotpo.keyCodes.escape])},Yotpo.onTabAndShiftDown=function(e,t){Yotpo.onTabKeyDown(e,function(i){i.shiftKey&&t.call(e,i)})},Yotpo.loopKeyboardTabs=function(e,t){var i=document.getElementById(e),o=document.getElementById(t);null!=i&&null!=o&&(Yotpo.onTabKeyDown(o,function(){i.focus()}),Yotpo.onTabAndShiftDown(i,function(){o.focus()}))},Yotpo.copy=function(e,t){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Yotpo.toggleVisibility=function(e,t){t=t||"inline-block",e.style.display="none"==Yotpo.getDisplayStyle(e)?t:"none"},Yotpo.setElementsVisibility=function(e,t){for(var i=0;ia;++a)Yotpo.Animations[i](r[a]);parseInt(e.getAttribute("data-limit"))>=r.length&&Yotpo.addClass(e,"yotpo-hidden")},Yotpo.supportTouch=function(){return"ontouchstart"in document.documentElement},Yotpo.togglePreLoader=function(e){var t=e.querySelectorAll(".yotpo-preloader-wrapper");if(t.length>0){var i=t[0];Yotpo.toggleVisibility(i)}return!1},Yotpo.setSearchInProgressDisplayStatus=function(e,t){var i=e.querySelector(".search-in-progress"),o=e.querySelector(".yotpo-reviews");i&&o&&(t?(Yotpo.show(i),Yotpo.hide(o)):(Yotpo.hide(i),Yotpo.show(o,"block")))},Yotpo.scrollTo=function(e,t,i,o,n,r){function s(){p&&clearTimeout(p),Yotpo.removeEventListener(e,r,s)}var a=o?e.scrollHeight>t&&t>=0:!0;if(a){var l=o?e.scrollTop:e.scrollLeft,c=t-l,d=0,u=20,p=null;void 0!==r&&Yotpo.addEventListener(e,r,s);var g=function(){d+=u;var t=Math.easeInOutQuad(d,l,c,i);o?e.scrollTop=t:e.scrollLeft=t,i>d?p=setTimeout(g,u):(void 0!==r&&Yotpo.removeEventListener(e,r,s),"function"==typeof n&&n())};Math.easeInOutQuad=function(e,t,i,o){return e/=o/2,1>e?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)},g()}},Yotpo.moveTo=function(e,t,i,o,n){var r=0,s=t-r,a=0,l=20,c=function(){a+=l;var t=Math.easeInOutQuad(a,r,s,i);t=parseInt(t),"right"==o?e.style.right=t+"px":e.style.left=t+"px",i>a?setTimeout(c,l):"function"==typeof n&&n()};Math.easeInOutQuad=function(e,t,i,o){return e/=o/2,1>e?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)},c()},Yotpo.scrollToTop=function(e,t){if(e.offsetParent&&e.offsetParent.scrollTop>0&&e.offsetParent!==document.body)Yotpo.scrollTo(e.offsetParent,0,1300,!0,null,t);else{var i=document.documentElement.scrollTop>0?document.documentElement:document.body;Yotpo.scrollTo(i,e.getBoundingClientRect().top+i.scrollTop,1300,!0,null,t)}},Yotpo.mobileCheck=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},Yotpo.isMobile=function(){if(this.mobileCheck())return!0;var e=/ipad|ipad.*mobile|android.*nexus[\s]+(7|10)|^.*android.*nexus(?:(?!mobile).)*$|samsung.*tablet|galaxy.*tab|sc-01c|gt-p1000|gt-p1003|gt-p1010|gt-p3105|gt-p6210|gt-p6800|gt-p6810|gt-p7100|gt-p7300|gt-p7310|gt-p7500|gt-p7510|sch-i800|sch-i815|sch-i905|sgh-i957|sgh-i987|sgh-t849|sgh-t859|sgh-t869|sph-p100|gt-p3100|gt-p3108|gt-p3110|gt-p5100|gt-p5110|gt-p6200|gt-p7320|gt-p7511|gt-n8000|gt-p8510|sgh-i497|sph-p500|sgh-t779|sch-i705|sch-i915|gt-n8013|gt-p3113|gt-p5113|gt-p8110|gt-n8010|gt-n8005|gt-n8020|gt-p1013|gt-p6201|gt-p7501|gt-n5100|gt-n5105|gt-n5110|shv-e140k|shv-e140l|shv-e140s|shv-e150s|shv-e230k|shv-e230l|shv-e230s|shw-m180k|shw-m180l|shw-m180s|shw-m180w|shw-m300w|shw-m305w|shw-m380k|shw-m380s|shw-m380w|shw-m430w|shw-m480k|shw-m480s|shw-m480w|shw-m485w|shw-m486w|shw-m500w|gt-i9228|sch-p739|sch-i925|gt-i9200|gt-i9205|gt-p5200|gt-p5210|gt-p5210x|sm-t311|sm-t310|sm-t310x|sm-t210|sm-t210r|sm-t211|sm-p600|sm-p601|sm-p605|sm-p900|sm-p901|sm-t217|sm-t217a|sm-t217s|sm-p6000|sm-t3100|sgh-i467|xe500|sm-t110|gt-p5220|gt-i9200x|gt-n5110x|gt-n5120|sm-p905|sm-t111|sm-t2105|sm-t315|sm-t320|sm-t320x|sm-t321|sm-t520|sm-t525|sm-t530nu|sm-t230nu|sm-t330nu|sm-t900|xe500t1c|sm-p605v|sm-p905v|sm-p600x|sm-p900x|sm-t210x|sm-t230|sm-t230x|sm-t325|gt-p7503|sm-t531|sm-t330|sm-t530|sm-t705c|sm-t535|sm-t331|kindle|silk.*accelerated|android.*\b(kfot|kftt|kfjwi|kfjwa|kfote|kfsowi|kfthwi|kfthwa|kfapwi|kfapwa|wfjwae)\b|windows nt [0-9.]+; arm;|hp slate 7|hp elitepad 900|hp-tablet|elitebook.*touch|hp 8|^.*padfone((?!mobile).)*$|transformer|tf101|tf101g|tf300t|tf300tg|tf300tl|tf700t|tf700kl|tf701t|tf810c|me171|me301t|me302c|me371mg|me370t|me372mg|me172v|me173x|me400c|slider sl101|\bk00f\b|tx201la|playbook|rim tablet|htc flyer|htc jetstream|htc-p715a|htc evo view 4g|pg41200|xoom|sholest|mz615|mz605|mz505|mz601|mz602|mz603|mz604|mz606|mz607|mz608|mz609|mz615|mz616|mz617|android.*nook|nookcolor|nook browser|bnrv200|bnrv200a|bntv250|bntv250a|bntv400|bntv600|logicpd zoom2|android.*; \b(a100|a101|a110|a200|a210|a211|a500|a501|a510|a511|a700|a701|w500|w500p|w501|w501p|w510|w511|w700|g100|g100w|b1-a71|b1-710|b1-711|a1-810|a1-830)\b|w3-810|\ba3-a10\b|android.*(at100|at105|at200|at205|at270|at275|at300|at305|at1s5|at500|at570|at700|at830)|toshiba.*folio|\bl-06c|lg-v900|lg-v500|lg-v909|lg-v500|lg-v510|lg-vk810\b|android.*\b(f-01d|f-02f|f-05e|f-10d|m532|q572)\b|pmp3170b|pmp3270b|pmp3470b|pmp7170b|pmp3370b|pmp3570c|pmp5870c|pmp3670b|pmp5570c|pmp5770d|pmp3970b|pmp3870c|pmp5580c|pmp5880d|pmp5780d|pmp5588c|pmp7280c|pmp7280c3g|pmp7280|pmp7880d|pmp5597d|pmp5597|pmp7100d|per3464|per3274|per3574|per3884|per5274|per5474|pmp5097cpro|pmp5097|pmp7380d|pmp5297c|pmp5297c_quad|ideatab|thinkpad([ ]+)?tablet|lenovo.*(s2109|s2110|s5000|s6000|k3011|a3000|a1000|a2107|a2109|a1107|b6000|b8000|b8080-f)|android.*\b(tab210|tab211|tab224|tab250|tab260|tab264|tab310|tab360|tab364|tab410|tab411|tab420|tab424|tab450|tab460|tab461|tab464|tab465|tab467|tab468|tab07-100|tab07-101|tab07-150|tab07-151|tab07-152|tab07-200|tab07-201-3g|tab07-210|tab07-211|tab07-212|tab07-214|tab07-220|tab07-400|tab07-485|tab08-150|tab08-200|tab08-201-3g|tab08-201-30|tab09-100|tab09-211|tab09-410|tab10-150|tab10-201|tab10-211|tab10-400|tab10-410|tab13-201|tab274euk|tab275euk|tab374euk|tab462euk|tab474euk|tab9-200)\b|android.*\boyo\b|life.*(p9212|p9514|p9516|s9512)|lifetab|an10g2|an7bg3|an7fg3|an8g3|an8cg3|an7g3|an9g3|an7dg3|an7dg3st|an7dg3childpad|an10bg3|an10bg3dt|inm8002kp|inm1010fp|inm805nd|intenso tab|m702pro|megafon v9|\bzte v9\b|android.*\bmt7a\b|e-boda (supreme|impresspeed|izzycomm|essential)|allview.*(viva|alldro|city|speed|all tv|frenzy|quasar|shine|tx1|ax1|ax2)|\b(101g9|80g9|a101it)\b|qilive 97r|archos 101g10|archos 101 neon|novo7|novo8|novo10|novo7aurora|novo7basic|novo7paladin|novo9-spark|sony.*tablet|xperia tablet|sony tablet s|so-03e|sgpt12|sgpt13|sgpt114|sgpt121|sgpt122|sgpt123|sgpt111|sgpt112|sgpt113|sgpt131|sgpt132|sgpt133|sgpt211|sgpt212|sgpt213|sgp311|sgp312|sgp321|ebrd1101|ebrd1102|ebrd1201|sgp351|sgp341|sgp511|sgp512|sgp521|sgp541|sgp551|android.*(k8gt|u9gt|u10gt|u16gt|u17gt|u18gt|u19gt|u20gt|u23gt|u30gt)|cube u8gt|mid1042|mid1045|mid1125|mid1126|mid7012|mid7014|mid7015|mid7034|mid7035|mid7036|mid7042|mid7048|mid7127|mid8042|mid8048|mid8127|mid9042|mid9740|mid9742|mid7022|mid7010|m9701|m9000|m9100|m806|m1052|m806|t703|mid701|mid713|mid710|mid727|mid760|mid830|mid728|mid933|mid125|mid810|mid732|mid120|mid930|mid800|mid731|mid900|mid100|mid820|mid735|mid980|mid130|mid833|mid737|mid960|mid135|mid860|mid736|mid140|mid930|mid835|mid733|android.*(\bmid\b|mid-560|mtv-t1200|mtv-pnd531|mtv-p1101|mtv-pnd530)|android.*(rk2818|rk2808a|rk2918|rk3066)|rk2738|rk2808a|iq310|fly vision|bq.*(elcano|curie|edison|maxwell|kepler|pascal|tesla|hypatia|platon|newton|livingstone|cervantes|avant)|maxwell.*lite|maxwell.*plus|mediapad|mediapad 7 youth|ideos s7|s7-201c|s7-202u|s7-101|s7-103|s7-104|s7-105|s7-106|s7-201|s7-slim|\bn-06d|\bn-08d|pantech.*p4100|broncho.*(n701|n708|n802|a710)|touchpad.*[78910]|\btouchtab\b|z1000|z99 2g|z99|z930|z999|z990|z909|z919|z900|tb07sta|tb10sta|tb07fta|tb10fta|android.*\bnabi|kobo touch|\bk080\b|\bvox\b build|\barc\b build|dslide.*\b(700|701r|702|703r|704|802|970|971|972|973|974|1010|1012)\b|navipad|tb-772a|tm-7045|tm-7055|tm-9750|tm-7016|tm-7024|tm-7026|tm-7041|tm-7043|tm-7047|tm-8041|tm-9741|tm-9747|tm-9748|tm-9751|tm-7022|tm-7021|tm-7020|tm-7011|tm-7010|tm-7023|tm-7025|tm-7037w|tm-7038w|tm-7027w|tm-9720|tm-9725|tm-9737w|tm-1020|tm-9738w|tm-9740|tm-9743w|tb-807a|tb-771a|tb-727a|tb-725a|tb-719a|tb-823a|tb-805a|tb-723a|tb-715a|tb-707a|tb-705a|tb-709a|tb-711a|tb-890hd|tb-880hd|tb-790hd|tb-780hd|tb-770hd|tb-721hd|tb-710hd|tb-434hd|tb-860hd|tb-840hd|tb-760hd|tb-750hd|tb-740hd|tb-730hd|tb-722hd|tb-720hd|tb-700hd|tb-500hd|tb-470hd|tb-431hd|tb-430hd|tb-506|tb-504|tb-446|tb-436|tb-416|tb-146se|tb-126se|playstation.*(portable|vita)|st10416-1|vt10416-1|st70408-1|st702xx-1|st702xx-2|st80208|st97216|st70104-2|vt10416-2|st10216-2a|\b(ptbl10ceu|ptbl10c|ptbl72bc|ptbl72bceu|ptbl7ceu|ptbl7c|ptbl92bc|ptbl92bceu|ptbl9ceu|ptbl9cuk|ptbl9c)\b|android.* \b(e3a|t3x|t5c|t5b|t3e|t3c|t3b|t1j|t1f|t2a|t1h|t1i|e1c|t1-e|t5-a|t4|e1-b|t2ci|t1-b|t1-d|o1-a|e1-a|t1-a|t3a|t4i)\b |genius tab g3|genius tab s2|genius tab q3|genius tab g4|genius tab q4|genius tab g-ii|genius tab gii|genius tab giii|genius tab s1|android.*\bg1\b|funbook|micromax.*\b(p250|p560|p360|p362|p600|p300|p350|p500|p275)\b|android.*\b(a39|a37|a34|st8|st10|st7|smart tab3|smart tab2)\b|fine7 genius|fine7 shine|fine7 air|fine8 style|fine9 more|fine10 joy|fine11 wide|\b(pem63|plt1023g|plt1041|plt1044|plt1044g|plt1091|plt4311|plt4311pl|plt4315|plt7030|plt7033|plt7033d|plt7035|plt7035d|plt7044k|plt7045k|plt7045kb|plt7071kg|plt7072|plt7223g|plt7225g|plt7777g|plt7810k|plt7849g|plt7851g|plt7852g|plt8015|plt8031|plt8034|plt8036|plt8080k|plt8082|plt8088|plt8223g|plt8234g|plt8235g|plt8816k|plt9011|plt9045k|plt9233g|plt9735|plt9760g|plt9770g)\b|bq1078|bc1003|bc1077|rk9702|bc9730|bc9001|it9001|bc7008|bc7010|bc708|bc728|bc7012|bc7030|bc7027|bc7026|tpc7102|tpc7103|tpc7105|tpc7106|tpc7107|tpc7201|tpc7203|tpc7205|tpc7210|tpc7708|tpc7709|tpc7712|tpc7110|tpc8101|tpc8103|tpc8105|tpc8106|tpc8203|tpc8205|tpc8503|tpc9106|tpc9701|tpc97101|tpc97103|tpc97105|tpc97106|tpc97111|tpc97113|tpc97203|tpc97603|tpc97809|tpc97205|tpc10101|tpc10103|tpc10106|tpc10111|tpc10203|tpc10205|tpc10503|tx-a1301|tx-m9002|q702|kf026|tab-p506|tab-navi-7-3g-m|tab-p517|tab-p-527|tab-p701|tab-p703|tab-p721|tab-p731n|tab-p741|tab-p825|tab-p905|tab-p925|tab-pr945|tab-pl1015|tab-p1025|tab-pi1045|tab-p1325|tab-protab[0-9]+|tab-protab25|tab-protab26|tab-protab27|tab-protab26xl|tab-protab2-ips9|tab-protab30-ips9|tab-protab25xxl|tab-protab26-ips10|tab-protab30-ips10|ov-(steelcore|newbase|basecore|baseone|exellen|quattor|edutab|solution|action|basictab|teddytab|magictab|stream|tb-08|tb-09)|hcl.*tablet|connect-3g-2.0|connect-2g-2.0|me tablet u1|me tablet u2|me tablet g1|me tablet x1|me tablet y2|me tablet sync|dps dream 9|dps dual 7|v97 hd|i75 3g|visture v4( hd)?|visture v5( hd)?|visture v10|ctp(-)?810|ctp(-)?818|ctp(-)?828|ctp(-)?838|ctp(-)?888|ctp(-)?978|ctp(-)?980|ctp(-)?987|ctp(-)?988|ctp(-)?989|\bmt8125|mt8389|mt8135|mt8377\b|concorde([ ]+)?tab|concorde readman|goclever tab|a7goclever|m1042|m7841|m742|r1042bk|r1041|tab a975|tab a7842|tab a741|tab a741l|tab m723g|tab m721|tab a1021|tab i921|tab r721|tab i720|tab t76|tab r70|tab r76.2|tab r106|tab r83.2|tab m813g|tab i721|gcta722|tab i70|tab i71|tab s73|tab r73|tab r74|tab r93|tab r75|tab r76.1|tab a73|tab a93|tab a93.2|tab t72|tab r83|tab r974|tab r973|tab a101|tab a103|tab a104|tab a104.2|r105bk|m713g|a972bk|tab a971|tab r974.2|tab r104|tab r83.3|tab a1042|freetab 9000|freetab 7.4|freetab 7004|freetab 7800|freetab 2096|freetab 7.5|freetab 1014|freetab 1001 |freetab 8001|freetab 9706|freetab 9702|freetab 7003|freetab 7002|freetab 1002|freetab 7801|freetab 1331|freetab 1004|freetab 8002|freetab 8014|freetab 9704|freetab 1003|\b(argus[ _]?s|diamond[ _]?79hd|emerald[ _]?78e|luna[ _]?70c|onyx[ _]?s|onyx[ _]?z|orin[ _]?hd|orin[ _]?s|otis[ _]?s|speedstar[ _]?s|magnet[ _]?m9|primus[ _]?94[ _]?3g|primus[ _]?94hd|primus[ _]?qs|android.*\bq8\b|sirius[ _]?evo[ _]?qs|sirius[ _]?qs|spirit[ _]?s)\b|v07ot2|tm105a|s10ot1|tr10cs1|ezee[_']?(tab|go)[0-9]+|tablc7|looney tunes tab|smarttab([ ]+)?[0-9]+|smarttabii10|smart[ ']?tab[ ]+?[0-9]+|family[ ']?tab2|rm-790|rm-997|rmd-878g|rmd-974r|rmt-705a|rmt-701|rme-601|rmt-501|rmt-711|i-mobile i-note|tolino tab [0-9.]+|tolino shine|\bc-22q|t7-qc|t-17b|t-17p\b|android.* a78 |android.* (skypad|phoenix|cyclops)|tecno p9|android.*\b(f3000|a3300|jxd5000|jxd3000|jxd2000|jxd300b|jxd300|s5800|s7800|s602b|s5110b|s7300|s5300|s602|s603|s5100|s5110|s601|s7100a|p3000f|p3000s|p101|p200s|p1000m|p200m|p9100|p1000s|s6600b|s908|p1000|p300|s18|s6600|s9100)\b|tablet (spirit 7|essentia|galatea|fusion|onix 7|landa|titan|scooby|deox|stella|themis|argon|unique 7|sygnus|hexen|finity 7|cream|cream x2|jade|neon 7|neron 7|kandy|scape|saphyr 7|rebel|biox|rebel|rebel 8gb|myst|draco 7|myst|tab7-004|myst|tadeo jones|tablet boing|arrow|draco dual cam|aurix|mint|amity|revolution|finity 9|neon 9|t9w|amity 4gb dual cam|stone 4gb|stone 8gb|andromeda|silken|x2|andromeda ii|halley|flame|saphyr 9,7|touch 8|planet|triton|unique 10|hexen 10|memphis 4gb|memphis 8gb|onix 10)|fx2 pad7|fx2 pad10|kidspad 701|pad[ ]?712|pad[ ]?714|pad[ ]?716|pad[ ]?717|pad[ ]?718|pad[ ]?720|pad[ ]?721|pad[ ]?722|pad[ ]?790|pad[ ]?792|pad[ ]?900|pad[ ]?9715d|pad[ ]?9716dr|pad[ ]?9718dr|pad[ ]?9719qr|pad[ ]?9720qr|telepad1030|telepad1032|telepad730|telepad731|telepad732|telepad735q|telepad830|telepad9730|telepad795|megapad 1331|megapad 1851|megapad 2151|viewpad 10pi|viewpad 10e|viewpad 10s|viewpad e72|viewpad7|viewpad e100|viewpad 7e|viewsonic vb733|vb100a|loox|xeno10|odys space|captiva pad|nettab|nt-3702|nt-3702s|nt-3702s|nt-3603p|nt-3603p|nt-0704s|nt-0704s|nt-3805c|nt-3805c|nt-0806c|nt-0806c|nt-0909t|nt-0909t|nt-0907s|nt-0907s|nt-0902s|nt-0902s|hudl ht7s3|t-hub2|android.*\b97d\b|tablet(?!.*pc)|bntv250a|mid-wcdma|logicpd zoom2|\ba7eb\b|catnova8|a1_07|ct704|ct1002|\bm721\b|rk30sdk|\bevotab\b|m758a|et904|alumium10|smartfren tab|endeavour 1010|tablet-pc-4/i,t=/\biphone.*(mobile|phonegap)|\bipod|blackberry|\bbb10\b|rim[0-9]+|htc|htc.*(sensation|evo|vision|explorer|6800|8100|8900|a7272|s510e|c110e|legend|desire|t8282)|apx515ckt|qtek9090|apa9292kt|hd_mini|sensation.*z710e|pg86100|z715e|desire.*(a8181|hd)|adr6200|adr6400l|adr6425|001ht|inspire 4g|android.*\bevo\b|t-mobile g1|z520m|nexus one|nexus s|galaxy.*nexus|android.*nexus.*mobile|dell.*streak|dell.*aero|dell.*venue|dell.*venue pro|dell flash|dell smoke|dell mini 3ix|xcd28|xcd35|\b001dl\b|\b101dl\b|\bgs01\b|motorola|droidx|droid bionic|\bdroid\b.*build|android.*xoom|hri39|mot-|a1260|a1680|a555|a853|a855|a953|a955|a956|motorola.*electrify|motorola.*i1|i867|i940|mb200|mb300|mb501|mb502|mb508|mb511|mb520|mb525|mb526|mb611|mb612|mb632|mb810|mb855|mb860|mb861|mb865|mb870|me501|me502|me511|me525|me600|me632|me722|me811|me860|me863|me865|mt620|mt710|mt716|mt720|mt810|mt870|mt917|motorola.*titanium|wx435|wx445|xt300|xt301|xt311|xt316|xt317|xt319|xt320|xt390|xt502|xt530|xt531|xt532|xt535|xt603|xt610|xt611|xt615|xt681|xt701|xt702|xt711|xt720|xt800|xt806|xt860|xt862|xt875|xt882|xt883|xt894|xt901|xt907|xt909|xt910|xt912|xt928|xt926|xt915|xt919|xt925|samsung|sgh-i337|bgt-s5230|gt-b2100|gt-b2700|gt-b2710|gt-b3210|gt-b3310|gt-b3410|gt-b3730|gt-b3740|gt-b5510|gt-b5512|gt-b5722|gt-b6520|gt-b7300|gt-b7320|gt-b7330|gt-b7350|gt-b7510|gt-b7722|gt-b7800|gt-c3010|gt-c3011|gt-c3060|gt-c3200|gt-c3212|gt-c3212i|gt-c3262|gt-c3222|gt-c3300|gt-c3300k|gt-c3303|gt-c3303k|gt-c3310|gt-c3322|gt-c3330|gt-c3350|gt-c3500|gt-c3510|gt-c3530|gt-c3630|gt-c3780|gt-c5010|gt-c5212|gt-c6620|gt-c6625|gt-c6712|gt-e1050|gt-e1070|gt-e1075|gt-e1080|gt-e1081|gt-e1085|gt-e1087|gt-e1100|gt-e1107|gt-e1110|gt-e1120|gt-e1125|gt-e1130|gt-e1160|gt-e1170|gt-e1175|gt-e1180|gt-e1182|gt-e1200|gt-e1210|gt-e1225|gt-e1230|gt-e1390|gt-e2100|gt-e2120|gt-e2121|gt-e2152|gt-e2220|gt-e2222|gt-e2230|gt-e2232|gt-e2250|gt-e2370|gt-e2550|gt-e2652|gt-e3210|gt-e3213|gt-i5500|gt-i5503|gt-i5700|gt-i5800|gt-i5801|gt-i6410|gt-i6420|gt-i7110|gt-i7410|gt-i7500|gt-i8000|gt-i8150|gt-i8160|gt-i8190|gt-i8320|gt-i8330|gt-i8350|gt-i8530|gt-i8700|gt-i8703|gt-i8910|gt-i9000|gt-i9001|gt-i9003|gt-i9010|gt-i9020|gt-i9023|gt-i9070|gt-i9082|gt-i9100|gt-i9103|gt-i9220|gt-i9250|gt-i9300|gt-i9305|gt-i9500|gt-i9505|gt-m3510|gt-m5650|gt-m7500|gt-m7600|gt-m7603|gt-m8800|gt-m8910|gt-n7000|gt-s3110|gt-s3310|gt-s3350|gt-s3353|gt-s3370|gt-s3650|gt-s3653|gt-s3770|gt-s3850|gt-s5210|gt-s5220|gt-s5229|gt-s5230|gt-s5233|gt-s5250|gt-s5253|gt-s5260|gt-s5263|gt-s5270|gt-s5300|gt-s5330|gt-s5350|gt-s5360|gt-s5363|gt-s5369|gt-s5380|gt-s5380d|gt-s5560|gt-s5570|gt-s5600|gt-s5603|gt-s5610|gt-s5620|gt-s5660|gt-s5670|gt-s5690|gt-s5750|gt-s5780|gt-s5830|gt-s5839|gt-s6102|gt-s6500|gt-s7070|gt-s7200|gt-s7220|gt-s7230|gt-s7233|gt-s7250|gt-s7500|gt-s7530|gt-s7550|gt-s7562|gt-s7710|gt-s8000|gt-s8003|gt-s8500|gt-s8530|gt-s8600|sch-a310|sch-a530|sch-a570|sch-a610|sch-a630|sch-a650|sch-a790|sch-a795|sch-a850|sch-a870|sch-a890|sch-a930|sch-a950|sch-a970|sch-a990|sch-i100|sch-i110|sch-i400|sch-i405|sch-i500|sch-i510|sch-i515|sch-i600|sch-i730|sch-i760|sch-i770|sch-i830|sch-i910|sch-i920|sch-i959|sch-lc11|sch-n150|sch-n300|sch-r100|sch-r300|sch-r351|sch-r400|sch-r410|sch-t300|sch-u310|sch-u320|sch-u350|sch-u360|sch-u365|sch-u370|sch-u380|sch-u410|sch-u430|sch-u450|sch-u460|sch-u470|sch-u490|sch-u540|sch-u550|sch-u620|sch-u640|sch-u650|sch-u660|sch-u700|sch-u740|sch-u750|sch-u810|sch-u820|sch-u900|sch-u940|sch-u960|scs-26uc|sgh-a107|sgh-a117|sgh-a127|sgh-a137|sgh-a157|sgh-a167|sgh-a177|sgh-a187|sgh-a197|sgh-a227|sgh-a237|sgh-a257|sgh-a437|sgh-a517|sgh-a597|sgh-a637|sgh-a657|sgh-a667|sgh-a687|sgh-a697|sgh-a707|sgh-a717|sgh-a727|sgh-a737|sgh-a747|sgh-a767|sgh-a777|sgh-a797|sgh-a817|sgh-a827|sgh-a837|sgh-a847|sgh-a867|sgh-a877|sgh-a887|sgh-a897|sgh-a927|sgh-b100|sgh-b130|sgh-b200|sgh-b220|sgh-c100|sgh-c110|sgh-c120|sgh-c130|sgh-c140|sgh-c160|sgh-c170|sgh-c180|sgh-c200|sgh-c207|sgh-c210|sgh-c225|sgh-c230|sgh-c417|sgh-c450|sgh-d307|sgh-d347|sgh-d357|sgh-d407|sgh-d415|sgh-d780|sgh-d807|sgh-d980|sgh-e105|sgh-e200|sgh-e315|sgh-e316|sgh-e317|sgh-e335|sgh-e590|sgh-e635|sgh-e715|sgh-e890|sgh-f300|sgh-f480|sgh-i200|sgh-i300|sgh-i320|sgh-i550|sgh-i577|sgh-i600|sgh-i607|sgh-i617|sgh-i627|sgh-i637|sgh-i677|sgh-i700|sgh-i717|sgh-i727|sgh-i747m|sgh-i777|sgh-i780|sgh-i827|sgh-i847|sgh-i857|sgh-i896|sgh-i897|sgh-i900|sgh-i907|sgh-i917|sgh-i927|sgh-i937|sgh-i997|sgh-j150|sgh-j200|sgh-l170|sgh-l700|sgh-m110|sgh-m150|sgh-m200|sgh-n105|sgh-n500|sgh-n600|sgh-n620|sgh-n625|sgh-n700|sgh-n710|sgh-p107|sgh-p207|sgh-p300|sgh-p310|sgh-p520|sgh-p735|sgh-p777|sgh-q105|sgh-r210|sgh-r220|sgh-r225|sgh-s105|sgh-s307|sgh-t109|sgh-t119|sgh-t139|sgh-t209|sgh-t219|sgh-t229|sgh-t239|sgh-t249|sgh-t259|sgh-t309|sgh-t319|sgh-t329|sgh-t339|sgh-t349|sgh-t359|sgh-t369|sgh-t379|sgh-t409|sgh-t429|sgh-t439|sgh-t459|sgh-t469|sgh-t479|sgh-t499|sgh-t509|sgh-t519|sgh-t539|sgh-t559|sgh-t589|sgh-t609|sgh-t619|sgh-t629|sgh-t639|sgh-t659|sgh-t669|sgh-t679|sgh-t709|sgh-t719|sgh-t729|sgh-t739|sgh-t746|sgh-t749|sgh-t759|sgh-t769|sgh-t809|sgh-t819|sgh-t839|sgh-t919|sgh-t929|sgh-t939|sgh-t959|sgh-t989|sgh-u100|sgh-u200|sgh-u800|sgh-v205|sgh-v206|sgh-x100|sgh-x105|sgh-x120|sgh-x140|sgh-x426|sgh-x427|sgh-x475|sgh-x495|sgh-x497|sgh-x507|sgh-x600|sgh-x610|sgh-x620|sgh-x630|sgh-x700|sgh-x820|sgh-x890|sgh-z130|sgh-z150|sgh-z170|sgh-zx10|sgh-zx20|shw-m110|sph-a120|sph-a400|sph-a420|sph-a460|sph-a500|sph-a560|sph-a600|sph-a620|sph-a660|sph-a700|sph-a740|sph-a760|sph-a790|sph-a800|sph-a820|sph-a840|sph-a880|sph-a900|sph-a940|sph-a960|sph-d600|sph-d700|sph-d710|sph-d720|sph-i300|sph-i325|sph-i330|sph-i350|sph-i500|sph-i600|sph-i700|sph-l700|sph-m100|sph-m220|sph-m240|sph-m300|sph-m305|sph-m320|sph-m330|sph-m350|sph-m360|sph-m370|sph-m380|sph-m510|sph-m540|sph-m550|sph-m560|sph-m570|sph-m580|sph-m610|sph-m620|sph-m630|sph-m800|sph-m810|sph-m850|sph-m900|sph-m910|sph-m920|sph-m930|sph-n100|sph-n200|sph-n240|sph-n300|sph-n400|sph-z400|swc-e100|sch-i909|gt-n7100|gt-n7105|sch-i535|sm-n900a|sgh-i317|sgh-t999l|gt-s5360b|gt-i8262|gt-s6802|gt-s6312|gt-s6310|gt-s5312|gt-s5310|gt-i9105|gt-i8510|gt-s6790n|sm-g7105|sm-n9005|gt-s5301|gt-i9295|gt-i9195|sm-c101|gt-s7392|gt-s7560|gt-b7610|gt-i5510|gt-s7582|gt-s7530e|\blg\b;|lg[- ]?(c800|c900|e400|e610|e900|e-900|f160|f180k|f180l|f180s|730|855|l160|ls840|ls970|lu6200|ms690|ms695|ms770|ms840|ms870|ms910|p500|p700|p705|vm696|as680|as695|ax840|c729|e970|gs505|272|c395|e739bk|e960|l55c|l75c|ls696|ls860|p769bk|p350|p500|p509|p870|un272|us730|vs840|vs950|ln272|ln510|ls670|ls855|lw690|mn270|mn510|p509|p769|p930|un200|un270|un510|un610|us670|us740|us760|ux265|ux840|vn271|vn530|vs660|vs700|vs740|vs750|vs910|vs920|vs930|vx9200|vx11000|ax840a|lw770|p506|p925|p999|e612|d955|d802)|sonyst|sonylt|sonyericsson|sonyericssonlt15iv|lt18i|e10i|lt28h|lt26w|sonyericssonmt27i|asus.*galaxy|padfone.*mobile|micromax.*\b(a210|a92|a88|a72|a111|a110q|a115|a116|a110|a90s|a26|a51|a35|a54|a25|a27|a89|a68|a65|a57|a90)\b|palmsource|palm|vertu|vertu.*ltd|vertu.*ascent|vertu.*ayxta|vertu.*constellation(f|quest)?|vertu.*monika|vertu.*signature|pantech|im-a850s|im-a840s|im-a830l|im-a830k|im-a830s|im-a820l|im-a810k|im-a810s|im-a800s|im-t100k|im-a725l|im-a780l|im-a775c|im-a770k|im-a760s|im-a750k|im-a740s|im-a730s|im-a720l|im-a710k|im-a690l|im-a690s|im-a650s|im-a630k|im-a600s|vega ptl21|pt003|p8010|adr910l|p6030|p6020|p9070|p4100|p9060|p5000|cdm8992|txt8045|adr8995|is11pt|p2030|p6010|p8000|pt002|is06|cdm8999|p9050|pt001|txt8040|p2020|p9020|p2000|p7040|p7000|c790|iq230|iq444|iq450|iq440|iq442|iq441|iq245|iq256|iq236|iq255|iq235|iq245|iq275|iq240|iq285|iq280|iq270|iq260|iq250|i-mobile (iq|i-style|idea|zaa|hitz)|\b(sp-80|xt-930|sx-340|xt-930|sx-310|sp-360|sp60|spt-800|sp-120|spt-800|sp-140|spx-5|spx-8|sp-100|spx-8|spx-12)\b|tapatalk|pda;|sagem|\bmmp\b|pocket|\bpsp\b|symbian|smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|series40|series60|s60|sonyericsson|n900|maui.*wap.*browser/i,i=navigator.userAgent||navigator.vendor||window.opera; return 1==t.test(i)&&0==e.test(i)},Yotpo.compact=function(e){for(var t in e)!e.hasOwnProperty(t)||"undefined"!=typeof e[t]&&null!=e[t]||delete e[t];return e},Yotpo.forEach=function(e,t){if(Array.prototype.forEach)e.forEach(t);else{if("function"!=typeof t)throw new TypeError;for(var i=arguments.length>=2?arguments[1]:void 0,o=0;o=i;i++){var o=document.createElement("span");o.className=e+.25>=i?"yotpo-icon yotpo-icon-star":e+.75>=i?"yotpo-icon yotpo-icon-half-star":"yotpo-icon yotpo-icon-empty-star",t.appendChild(o)}return t},Yotpo.debounce=function(e,t,i){var o;return function(){var n=this,r=arguments,s=function(){o=null,i||e.apply(n,r)},a=i&&!o;clearTimeout(o),o=setTimeout(s,t),a&&e.apply(n,r)}},Yotpo.injectScript=function(e,t){var i=document.createElement("script");i.setAttribute("type","text/javascript");var o=document.createTextNode(e);i.appendChild(o),t.appendChild(i)},Yotpo.injectCSS=function(e,t){var i=document.createElement("style"),o=document.createTextNode(e);i.appendChild(o),t.appendChild(i)},Yotpo.loadScript=function(e,t,i){var o=document.createElement("script");o.setAttribute("type","text/javascript"),o.src=e,o.onload=i,t.appendChild(o)},Yotpo.getURLParameter=function(e,t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(e)||[null,""])[1].replace(/\+/g,"%20"))||null},Yotpo.updateQueryStringParameter=function(e,t,i){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),n=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+i+"$2"):e+n+t+"="+i},Yotpo.safeConsole=function(){},Yotpo.getDefualtImage=function(){return Yotpo.defaultImages||{size_180:"",size_656:"",profile:""}},Yotpo.setHoverEnable=function(e){Yotpo.isMobile()||Yotpo.addClass(e,"yotpo-hover-enable")},Yotpo.isString=function(e){return"string"==typeof e||e instanceof String},Yotpo.isEmptyString=function(e){return Yotpo.isString(e)&&(0===e.length||!e.trim())},Yotpo.generateUUID=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?i:3&i|8).toString(16)})},Yotpo.removeUndefinedFields=function(e){return JSON.parse(JSON.stringify(e))},Yotpo.isMethodExists=function(e){return"function"==typeof e},Yotpo.toTitleCase=function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},Yotpo.isInViewport=function(e,t){var i=e.getBoundingClientRect(),o=!0;return t&&(o=i.bottom>=0&&i.top<=(window.innerHeight||document.documentElement.clientHeight)),i.right>=-EDGE_RANGE_WIDTH&&i.left<=(window.innerWidth||document.documentElement.clientWidth)+EDGE_RANGE_WIDTH&&o},Yotpo.getBoolSetting=function(e,t){return"string"==typeof t||t instanceof String?JSON.parse(t):"boolean"==typeof t||t instanceof Boolean?t:e},Yotpo.trapModalFocus=function(e,t){var i=e.querySelectorAll(t),o=i[0],n=i[i.length-1];Yotpo.onTabKeyDown(document,function(e){e.shiftKey?document.activeElement===o&&(n.focus(),e.preventDefault()):document.activeElement===n&&(o.focus(),e.preventDefault())})},Yotpo.supportsPassive=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(i){}return e},Yotpo.ajax=function(e,t,i,o,n,r){function s(e,t,i){var o=a();return o&&"withCredentials"in o?(o.open(e,t,!0),o.withCredentials="withCredentials"in i?i.withCredentials:!0,o.setRequestHeader("Accept","application/json","text/html")):"undefined"!=typeof XDomainRequest?(o=new XDomainRequest,o.onprogress=function(){},o.open(e,t)):o=null,o}function a(){if(window.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(e){return null}}function l(e){var t;return t=e.getXhrAsResponse?d:d.responseText}function c(e,t){t||(t={},t["Content-type"]="application/x-www-form-urlencoded");for(var i in t)e.setRequestHeader(i,t[i])}r=r||{};var d=s(i?i:"GET",e,r);return d?(d.readyState?d.onreadystatechange=function(){if(4==d.readyState){var e=l(r);n?t(e,n):t(e)}}:d.onload=function(){var e=l(r);n?t(e,n):t(e)},d.onerror=function(){Yotpo.safeConsole("There was an error making the request.","error")},"POST"==i&&"withCredentials"in d&&c(d,r.requestHeaders),d.send(o),!0):(Yotpo.safeConsole("CORS not supported","error"),!1)},Yotpo.successfulResponse=function(e){return e.status>=200&&e.status<300},Yotpo.convertHashToQueryStringParams=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return t.join("&")},Yotpo.convertComplexObjectToQueryStringParams=function(e,t){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var n;n=e instanceof Array?t?t+"[]":"[]":t?t+"["+o+"]":o;var r=e[o];i.push(null!==r&&"object"==typeof r?Yotpo.convertComplexObjectToQueryStringParams(r,n):encodeURIComponent(n)+"="+encodeURIComponent(Yotpo.cleanParam(n,r)))}return i.join("&")},Yotpo.convertArrayToQueryStringParam=function(e,t){for(var i=[],o=0;ot.length&&clearInterval(n)},i)},t}(Yotpo),Yotpo.Session=function(e){function t(){}return t.prototype.get=function(t,i){var o=this,n={token:{route:e.getWidgetHost("dynamic")+"/sessions/login",handler:function(e){return e.token}},user:{route:e.getApiHost("dynamic")+"/users/me?utoken="+o.token,handler:function(e){return e.response.user}}};o[t]?i(o[t]):e.ajax(n[t].route,function(e){try{e=JSON.parse(e),o[t]=n[t].handler(e)}catch(r){}i(o[t])})},t.prototype.init=function(){var t=this;e.ajax(e.getWidgetHost("static")+"/sessions/sign_in_url",function(e){e=JSON.parse(e),t.signInUrl=e.url,t.trigger("init")})},t.prototype.signInNetwork=function(e){return this.signInUrl+"&network="+e},t.prototype.checkLogin=function(e){var t=this;t.get("token",function(){t.trigger("checkLogin",{submit:e||!1})})},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t}(Yotpo),Yotpo.Review=function(e){function t(t,o){this.params={},e.copy(t,this.params),this.analyticCatgeory=o||i}var i="reviews";return t.load=function(t,i){var o=new e.Review({id:+t.getAttribute("data-review-id")},i);e.Modules.Handle.action.call(t),e.Modules.Handle.tooltip.call(t),e.Modules.Vote.bind.call(t,o);var n=function(){e.currentAnalytics.trackEvent(o.analyticCatgeory,"clicked_on","widget_expand_content")};e.Modules.CollapsibleElement.bind(t,350,"content-review",n);var r=t.querySelectorAll(".yotpo-multiple-rating-fields .yotpo-question-field, .yotpo-multiple-rating-fields .yotpo-product-related-fields, .yotpo-multiple-rating-fields .yotpo-user-field",".product-related-fields");e.CustomFields.bind(r,o.get("id"));var s=t.querySelectorAll(".aggregated-product-related-fields");e.CustomFields.bindProductRelatedFields(s);var a=t.querySelector(".yotpo-review-media-wrapper");if(a){var l=a.querySelector(".yotpo-review-media-wrapper-desktop"),c=a.querySelector(".yotpo-review-media-wrapper-mobile");if(e.isMobile())l&&e.addClass(l,"yotpo-hidden"),c&&e.removeClass(c,"yotpo-hidden");else{if(l){e.removeClass(l,"yotpo-hidden");var d=t.querySelectorAll(".media-review, .expandable-image");if(d)for(var u=0;ul?"yotpo-icon-empty-star":"yotpo-icon-star"),e.addClass(s[l],l>=a?"yotpo-icon-empty-star":"yotpo-icon-star");o.querySelector(".content-title").innerHTML=this.get("review_title"),o.querySelector(".content-review").innerHTML=this.get("review_content").replace(/\n/g,"
");var c=o.querySelector(".product-link");c&&(c.innerHTML+=this.get("product_title"));var d=o.querySelector(".product-link-wrapper");d&&d.setAttribute("href",this.get("product_url"));for(var u=o.querySelectorAll(".social-link"),l=0;l0?e.getElementText(t.element.children[0]):""},click:function(t,i){for(var n=["property","label","category"],r=0;rt,0==e&&0==t?!0:t==e-1)}function n(t,i){var o=t?"yotpo-icon-star":"yotpo-icon-empty-star",n=t?"yotpo-icon-empty-star":"yotpo-icon-star";this.setAttribute("aria-checked",i),this.setAttribute("tabindex",i?"0":"-1"),e.hasClass(this,o)||(e.addClass(this,o),e.removeClass(this,n))}return t.prototype.getElement=function(){return this.element},t.prototype.getStars=function(){return this.stars},t.prototype.getScore=function(){return this.score},t.prototype.setScore=function(e){this.score=e,o.call(this.stars,e)},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t}(Yotpo),Yotpo.Messages=function(e){function t(e){this.messages={};for(var t,o=0;t=e[o];o++)for(var n=t.querySelectorAll(".yotpo-thank-you, .yotpo-thankyou-confirmation"),r=0;r .write-review > .yotpo-icon-btn > .yotpo-icon-cross");if(i){var o=function(){e.removeClass(t.getElement(),"visible"),t.getElement().style.display="none"};i.onclick=o,e.onEnterKeyDown(i,o)}}function s(){var t=this,i=new e.Session;i.on("checkLogin",function(e){i.token&&i.get("user",function(o){o.token=i.token,a.call(t,o),e.submit&&t.submit()})}),t.on("opened",function(){yotpo.getUserSetting("disable_social_login")||i.checkLogin()}),i.on("init",function(){for(var o=t.getElement().querySelectorAll(".socialize .yotpo-icon-btn"),n=0;n0&&o+1===n?e.show(i,"block"):e.show(i)}function u(t){for(var i=this.getElementsByClassName("social-link"),o=0;o=0;--s)t(r[s]);for(var a=this.getElement().querySelectorAll(".form-element .y-input[name]"),s=0;s0&&("1"==h.settings.show_name_field&&delete m.display_name,g=!0,e.copy(m,o),r._controller.tabs&&"site"==r._controller.tabs.getActive().getAttribute("data-type"))){var f=r._controller._controller.getWidgetByName("Main");f&&e.copy({page_pid:f.settings.pid},o)}}if(s.getUserSetting("prevent_duplicate_reviews")&&(o.prevent_duplicate_review=!0),s.getUserSetting("bv_syndication")&&"function"==typeof window.IGLOO.getBlackbox){var y=window.IGLOO.getBlackbox();y.finished&&(o.iovation_fp=y.blackbox)}var v=e[e.capitalize(t)];if("undefined"==typeof v)throw"Error resource is undefined - "+v;var b=this.getElement();e.togglePreLoader(b),e.currentAnalytics.trackEvent(r._controller.analyticsCategory,"shown","review_posted");var w=new v(o);w.on("save",function(){e.togglePreLoader(b);var i=r._controller.getActiveSource(),o=i?i.getTemplate():null,n="undefined"!=typeof s.getUserSetting("account_settings").settings.auto_publish&&"review"==t,a=s.getUserSetting("show_social_links"),l=r._controller.get("messages");if("function"==typeof w.shareLinks&&u.call(l.get("share"),w.shareLinks()),o)w.render(o),i.trigger("updated");else{r.clean();var c="pending-for-"+t+"-approval";"review"===t&&(n||a)?c="share":"question"!==t||g||l.show("question-approval"),l.show(c),l.scrollIntoView(c)}}),w.on("error",function(){e.togglePreLoader(b),400==this.data.code&&"duplicate_review"==this.data.message&&(e.currentAnalytics.trackEvent(r._controller.analyticsCategory,"shown","duplicate_reviews"),r.showError(b.querySelector("[name=review_content]"),"user-already-reviewed"))}),w.setUser(this.user),w.save(a)},t.prototype.setInputField=function(e,t){var i=this.getInputField(e);i&&(i.value=t)},t.prototype.getInputField=function(e){return this.element.querySelector('input[name="'+e+'"]')},p={appkey:{empty:e.validateStringMinLength,max_length:e.validateStringMaxLength},email:{email:e.validateEmail},agree:{agree:e.validateCheckbox},display_name:{display_name_empty:e.validateStringMinLength,max_length:function(t){return e.validateStringMaxLength(t,40)}},sku:{empty:e.validateStringMinLength,max_length:e.validateStringMaxLength},product_title:{empty:e.validateStringMinLength,max_length:e.validateStringMaxLength},product_description:{max_length:function(t){return e.validateStringMaxLength(t,1e3)}},product_url:{empty:e.validateStringMinLength,max_length:e.validateStringMaxLength},product_image_url:{max_length:e.validateStringMaxLength},review_score:{score:function(e){return+e>0}},review_title:{empty:e.validateStringMinLength,max_length:e.validateStringMaxLength},review_content:{empty:e.validateStringMinLength,max_length:function(t){return e.validateStringMaxWords(t,5e3)}},content:{empty:e.validateStringMinLength,max_length:function(t){return e.validateStringMaxWords(t,5e3)}}},g={facebook:[984,600],twitter:[680,760],linkedin:[488,577],google_oauth2:[960,531]},t}(Yotpo),Yotpo.FileUploader=function(e){function t(e,t){this.file=e,this.errors=[],this.validations=t}function i(t,i){e.successfulResponse(i)||this.errors.push(i.responseText),this.trigger("complete",{errors:this.errors,file:this.file,url:t.url})}function o(t,i,o){var r=new FormData;switch(i){case e.FileUploader.TYPE.S3:n.call(this,t,r,o);break;default:for(var s in t)r.append(s,t[s])}return r.append("Content-Type",this.file.type),r.append("file",this.file),r}function n(t,i,o){var n=s(t,e.FileUploader.TYPE.S3,o);i.append("key",n),i.append("acl","public-read"),i.append("X-Amz-Credential",t.credential),i.append("Policy",t.encoded_policy),i.append("X-Amz-Date",t.date),i.append("X-Amz-Signature",t.signature),i.append("x-amz-meta-uuid","14365123651274"),i.append("X-Amz-Algorithm","AWS4-HMAC-SHA256")}function r(){var t=e.generateUUID().substring(0,8);return t+"_"+this.file.name.replace(/[^\w.]/g,"_")}function s(t,i,o){switch(i){case e.FileUploader.TYPE.S3:return a(t.path)+o;default:return o}}function a(e){return"/"!==e.charAt(e.length-1)&&(e+="/"),e}return t.TYPE={S3:1},t.prototype.upload=function(t,n,l){var c=r.call(this),d=o.call(this,n,l,c),u={withCredentials:!1,requestHeaders:{},getXhrAsResponse:!0},p={url:a(t)+s(n,l,c),type:l};e.ajax(t,i.bind(this,p),"POST",d,null,u)},t.prototype.validateAndUpload=function(t,i,o){var n=new e.Helpers.FileValidator(this.file,this.validations),r=this;n.on("validated",function(e){return e.length>0?void r.trigger("complete",{errors:e,file:r.file,url:null}):void r.upload(t,i,o)}),n.validate()},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.removeEvent=function(t){e.Modules.Event.removeEvent.call(this,t)},t}(Yotpo),Yotpo.Analytics=function(Yotpo){function Analytics(e){this._controller=e,this.pageSku=e.pageSku,this.trackedObjects={},initYotpoAnalyticsLib.call(this),0===Yotpo.getCookie(PIXEL_COOKIE_KEY)&&_yaq.push(["setPixelCookie",Yotpo.generateUUID()])}function trackYotpoEvent(e,t,i,o,n,r,s,a){Yotpo.shouldPreventCookies||_yaq.push(["trackStructEvent",e,t,i,o,n,r,a,s])}function initYotpoAnalyticsLib(){if(!Yotpo.shouldPreventCookies){var e=this._controller.getUserSetting("reporting_end_points");e?initYotpoMultiAnalytics.apply(this,[e]):initYotpoAnalytics.apply(this);var t=this._controller.getUserSetting("cookie_path");t&&_yaq.push(["setCookiePath",t.settings.sub_path])}}function initYotpoAnalytics(){_yaq.push(["setCollectorCf","d33im0067v833a"]),_yaq.push(["enableActivityTracking",10,10]),_yaq.push(["setAppId",yotpo_analytics_version]),_yaq.push(["setPixelCookieName",PIXEL_COOKIE_KEY]),_yaq.push(["setConfigPixelCookieTimeout",COOKIE_MAX_AGE])}function initYotpoMultiAnalytics(e){_yaq.push(["setCollectorUrl",e]),_yaq.push(["enableActivityTracking",10,10]),_yaq.push(["setAppId",yotpo_analytics_version]),_yaq.push(["setPixelCookieName",PIXEL_COOKIE_KEY]),_yaq.push(["setConfigPixelCookieTimeout",COOKIE_MAX_AGE])}function isTemplateReview(e){return"0"==e}this.JSON2||(this.JSON2={}),function(){"use strict";function isArray(e){if("isArray"in Array)return Array.isArray(e);var t=Object.prototype.toString.call(e);return"[object Array]"===t}function f(e){return 10>e?"0"+e:e}function objectToJSON(e,t){var i=Object.prototype.toString.apply(e);return"[object Date]"===i?isFinite(e.valueOf())?e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"Z":null:"[object String]"===i||"[object Number]"===i||"[object Boolean]"===i?e.valueOf():isArray(e)||"function"!=typeof e.toJSON?e:e.toJSON(t)}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var i,o,n,r,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&(l=objectToJSON(l,e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],isArray(l)){for(r=l.length,i=0;r>i;i+=1)s[i]=str(i,l)||"null";return n=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,n}if(rep&&"object"==typeof rep)for(r=rep.length,i=0;r>i;i+=1)"string"==typeof rep[i]&&(o=rep[i],n=str(o,l),n&&s.push(quote(o)+(gap?": ":":")+n));else for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(n=str(o,l),n&&s.push(quote(o)+(gap?": ":":")+n));return n=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,n}}var cx=new RegExp("[\x00\xad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),pattern='\\\\\\"\x00--\x9f\xad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',escapable=new RegExp("["+pattern,"g"),gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON2.stringify&&(JSON2.stringify=function(e,t,i){var o;if(gap="",indent="","number"==typeof i)for(o=0;i>o;o+=1)indent+=" ";else"string"==typeof i&&(indent=i);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON2.parse&&(JSON2.parse=function(text,reviver){function walk(e,t){var i,o,n=e[t];if(n&&"object"==typeof n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(o=walk(n,i),void 0!==o?n[i]=o:delete n[i]);return reviver.call(e,t,n)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),new RegExp("^[\\],:{}\\s]*$").test(text.replace(new RegExp('\\\\(?:["\\\\/bfnrt]|u[0-9a-fA-F]{4})',"g"),"@").replace(new RegExp('"[^"\\\\\n\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?',"g"),"]").replace(new RegExp("(?:^|:|,)(?:\\s*\\[)+","g"),"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),!function(e){var t=function(){"use strict";var e="s",i=function(e){var t=-e.getTimezoneOffset();return null!==t?t:0},o=function(){return i(new Date(2010,0,1,0,0,0,0))},n=function(){return i(new Date(2010,5,1,0,0,0,0))},r=function(e){var t=e.getMonth()>5?n():o(),r=i(e);return t-r!==0},s=function(){var t=o(),i=n(),r=o()-n();return 0>r?t+",1":r>0?i+",1,"+e:t+",0"},a=function(){var e=s();return new t.TimeZone(t.olson.timezones[e])};return{determine_timezone:function(){return"undefined"!=typeof console&&console.log("jstz.determine_timezone() is deprecated and will be removed in an upcoming version. Please use jstz.determine() instead."),a()},determine:a,date_is_dst:r}}();t.TimeZone=function(e){"use strict";var i=null,o=function(){return i},n=function(){for(var e=t.olson.ambiguity_list[i],o=e.length,n=0,r=e[0];o>n;n+=1)if(r=e[n],t.date_is_dst(t.olson.dst_start_dates[r]))return void(i=r)},r=function(){return"undefined"!=typeof t.olson.ambiguity_list[i]};return i=e,r()&&n(),{name:o}},t.olson={},t.olson.timezones={"-720,0":"Etc/GMT+12","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Asuncion","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"Etc/GMT+2","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"Etc/UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,1":"Europe/Moscow","180,0":"Asia/Baghdad","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Yerevan","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"},t.olson.dst_start_dates={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"Atlantic/Stanley":new Date(2011,8,4,7,0,0,0),"America/Asuncion":new Date(2011,9,2,3,0,0,0),"America/Santiago":new Date(2011,9,9,3,0,0,0),"America/Campo_Grande":new Date(2011,9,16,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2011,2,13,2,0,0,0),"America/New_York":new Date(2011,2,13,7,0,0,0),"Asia/Gaza":new Date(2011,2,26,23,0,0,0),"Asia/Beirut":new Date(2011,2,27,1,0,0,0),"Europe/Minsk":new Date(2011,2,27,2,0,0,0),"Europe/Helsinki":new Date(2011,2,27,4,0,0,0),"Europe/Istanbul":new Date(2011,2,28,5,0,0,0),"Asia/Damascus":new Date(2011,3,1,2,0,0,0),"Asia/Jerusalem":new Date(2011,3,1,6,0,0,0),"Africa/Cairo":new Date(2010,3,30,4,0,0,0),"Asia/Yerevan":new Date(2011,2,27,4,0,0,0),"Asia/Baku":new Date(2011,2,27,8,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"Pacific/Fiji":new Date(2010,11,29,23,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0)},t.olson.ambiguity_list={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Asuncion":["Atlantic/Stanley","America/Asuncion","America/Santiago","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Gaza","Asia/Beirut","Europe/Minsk","Europe/Helsinki","Europe/Istanbul","Asia/Damascus","Asia/Jerusalem","Africa/Cairo"],"Asia/Yerevan":["Asia/Yerevan","Asia/Baku"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"]},"undefined"!=typeof exports?exports.jstz=t:e.jstz=t}(this);var _yaq=_yaq||[],SnowPlow=SnowPlow||function(){var e=window;return{version:"js-0.13.2",expireDateTime:null,plugins:{},hasLoaded:!1,registeredOnLoadHandlers:[],documentAlias:document,windowAlias:e,navigatorAlias:navigator,screenAlias:screen,encodeWrapper:e.encodeURIComponent,decodeWrapper:e.decodeURIComponent,decodeUrl:unescape,asyncTracker:null}}();SnowPlow.isDefined=function(e){return"undefined"!=typeof e},SnowPlow.isNotNull=function(e){return null!==e},SnowPlow.isFunction=function(e){return"function"==typeof e},SnowPlow.isArray="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},SnowPlow.isEmptyArray=function(e){return SnowPlow.isArray(e)&&e.length<1},SnowPlow.isObject=function(e){return"object"==typeof e},SnowPlow.isJson=function(e){return SnowPlow.isDefined(e)&&SnowPlow.isNotNull(e)&&e.constructor==={}.constructor},SnowPlow.isNonEmptyJson=function(e){return SnowPlow.isJson(e)&&e!=={}},SnowPlow.isString=function(e){return"string"==typeof e||e instanceof String},SnowPlow.isNonEmptyString=function(e){return SnowPlow.isString(e)&&""!==e},SnowPlow.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},SnowPlow.encodeUtf8=function(e){return SnowPlow.decodeUrl(SnowPlow.encodeWrapper(e))},SnowPlow.fixupTitle=function(e){if(!SnowPlow.isString(e)){e=e.text||"";var t=SnowPlow.documentAlias.getElementsByTagName("title");t&&SnowPlow.isDefined(t[0])&&(e=t[0].text)}return e},SnowPlow.getHostName=function(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),i=t.exec(e);return i?i[1]:e},SnowPlow.hasSessionStorage=function(){try{return!!SnowPlow.windowAlias.sessionStorage}catch(e){return!0}},SnowPlow.hasLocalStorage=function(){try{return!!SnowPlow.windowAlias.localStorage}catch(e){return!0}},SnowPlow.toTimestamp=function(e,t){return t?e/1:Math.floor(e/1e3)},SnowPlow.toDatestamp=function(e){return Math.floor(e/864e5)},SnowPlow.fixupUrl=function(e,t,i){function o(e,t){var i=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)"),o=i.exec(e),n=new RegExp("(?:^|&)"+t+"=([^&]*)"),r=o?n.exec(o[1]):0;return r?SnowPlow.decodeWrapper(r[1]):""}return"translate.googleusercontent.com"===e?(""===i&&(i=t),t=o(t,"u"),e=SnowPlow.getHostName(t)):("cc.bingj.com"===e||"webcache.googleusercontent.com"===e||"74.6."===e.slice(0,5))&&(t=SnowPlow.documentAlias.links[0].href,e=SnowPlow.getHostName(t)),[e,t,i]},SnowPlow.fixupDomain=function(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e},SnowPlow.getReferrer=function(){var e="";try{e=SnowPlow.windowAlias.top.document.referrer}catch(t){if(SnowPlow.windowAlias.parent)try{e=SnowPlow.windowAlias.parent.document.referrer}catch(i){e=""}}return""===e&&(e=SnowPlow.documentAlias.referrer),e},SnowPlow.addEventListener=function(e,t,i,o){return e.addEventListener?(e.addEventListener(t,i,o),!0):e.attachEvent?e.attachEvent("on"+t,i):void(e["on"+t]=i)},SnowPlow.getCookie=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)"),i=t.exec(SnowPlow.documentAlias.cookie);return i?SnowPlow.decodeWrapper(i[2]):0},SnowPlow.setCookie=function(e,t,i,o,n,r){var s;i&&(s=new Date,s.setTime(s.getTime()+i)),SnowPlow.documentAlias.cookie=e+"="+SnowPlow.encodeWrapper(t)+(i?";expires="+s.toGMTString():"")+";path="+(o||"/")+(n?";domain="+n:"")+(r?";secure":"")},SnowPlow.executePluginMethod=function(e,t){var i,o,n="";for(i in SnowPlow.plugins)Object.prototype.hasOwnProperty.call(SnowPlow.plugins,i)&&(o=SnowPlow.plugins[i][e],SnowPlow.isFunction(o)&&(n+=o(t)));return n},SnowPlow.sha1=function(e){var t,i,o,n,r,s,a,l,c,d,u=function(e,t){return e<>>32-t},p=function(e){var t,i,o="";for(t=7;t>=0;t--)i=e>>>4*t&15,o+=i.toString(16);return o},g=[],h=1732584193,m=4023233417,f=2562383102,y=271733878,v=3285377520,b=[];for(e=SnowPlow.encodeUtf8(e),d=e.length,i=0;d-3>i;i+=4)o=e.charCodeAt(i)<<24|e.charCodeAt(i+1)<<16|e.charCodeAt(i+2)<<8|e.charCodeAt(i+3),b.push(o);switch(3&d){case 0:i=2147483648;break;case 1:i=e.charCodeAt(d-1)<<24|8388608;break;case 2:i=e.charCodeAt(d-2)<<24|e.charCodeAt(d-1)<<16|32768;break;case 3:i=e.charCodeAt(d-3)<<24|e.charCodeAt(d-2)<<16|e.charCodeAt(d-1)<<8|128}for(b.push(i);14!==(15&b.length);)b.push(0);for(b.push(d>>>29),b.push(d<<3&4294967295),t=0;ti;i++)g[i]=b[t+i];for(i=16;79>=i;i++)g[i]=u(g[i-3]^g[i-8]^g[i-14]^g[i-16],1);for(n=h,r=m,s=f,a=y,l=v,i=0;19>=i;i++)c=u(n,5)+(r&s|~r&a)+l+g[i]+1518500249&4294967295,l=a,a=s,s=u(r,30),r=n,n=c;for(i=20;39>=i;i++)c=u(n,5)+(r^s^a)+l+g[i]+1859775393&4294967295,l=a,a=s,s=u(r,30),r=n,n=c;for(i=40;59>=i;i++)c=u(n,5)+(r&s|r&a|s&a)+l+g[i]+2400959708&4294967295,l=a,a=s,s=u(r,30),r=n,n=c;for(i=60;79>=i;i++)c=u(n,5)+(r^s^a)+l+g[i]+3395469782&4294967295,l=a,a=s,s=u(r,30),r=n,n=c;h=h+n&4294967295,m=m+r&4294967295,f=f+s&4294967295,y=y+a&4294967295,v=v+l&4294967295}return c=p(h)+p(m)+p(f)+p(y)+p(v),c.toLowerCase()},SnowPlow.murmurhash3_32_gc=function(e,t){var i,o,n,r,s,a,l,c;for(i=3&e.length,o=e.length-i,n=t,s=3432918353,a=461845907,c=0;o>c;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295,n^=l,n=n<<13|n>>>19,r=5*(65535&n)+((5*(n>>>16)&65535)<<16)&4294967295,n=(65535&r)+27492+(((r>>>16)+58964&65535)<<16);switch(l=0,i){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:l^=255&e.charCodeAt(c),l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295,n^=l}return n^=e.length,n^=n>>>16,n=2246822507*(65535&n)+((2246822507*(n>>>16)&65535)<<16)&4294967295,n^=n>>>13,n=3266489909*(65535&n)+((3266489909*(n>>>16)&65535)<<16)&4294967295,n^=n>>>16,n>>>0},SnowPlow.base64encode=function(e){if(!e)return e;if("function"==typeof window.btoa)return btoa(e);var t,i,o,n,r,s,a,l,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=0,u=0,p="",g=[];do t=e.charCodeAt(d++),i=e.charCodeAt(d++),o=e.charCodeAt(d++),l=t<<16|i<<8|o,n=l>>18&63,r=l>>12&63,s=l>>6&63,a=63&l,g[u++]=c.charAt(n)+c.charAt(r)+c.charAt(s)+c.charAt(a);while(d>4,i=(15&n)<<4|r>>2,l=(3&r)<<6|c,a+=String.fromCharCode(t),64!=r&&(a+=String.fromCharCode(i)),64!=c&&(a+=String.fromCharCode(l)),t=i=l="",o=n=r=c="";while(d=0&&(e=e.slice(0,i)),(i=e.lastIndexOf("/"))!==e.length-1&&(e=e.slice(0,i+1)),e+t)}function isSiteHostName(e){var t,i,o;for(t=0;t0&&e.slice(o)===i)return!0}}return!1}function getImage(e){if(SnowPlow.isString(configCollectorUrl)){if(null===configCollectorUrl)throw"No SnowPlow collector configured, cannot track";setImage(configCollectorUrl+e)}else if(SnowPlow.isArray(configCollectorUrl))for(var t=0;tt?minXOffset=t:t>maxXOffset&&(maxXOffset=t);var i=e[1];minYOffset>i?minYOffset=i:i>maxYOffset&&(maxYOffset=i)}function setDomainUserIdCookie(e,t,i,o,n,r){SnowPlow.setCookie(getCookieName("id"),e+"."+t+"."+i+"."+o+"."+n,configVisitorCookieTimeout,configCookiePath,configCookieDomain,r)}function loadDomainUserIdCookie(){var e,t=new Date,i=Math.round(t.getTime()/1e3),o=getCookieValue("id");return o?(e=o.split("."),e.unshift("0")):(domainUserId||(domainUserId=hash((SnowPlow.navigatorAlias.userAgent||"")+(SnowPlow.navigatorAlias.platform||"")+JSON2.stringify(browserFeatures)+i).slice(0,16)),e=["1",domainUserId,i,0,i,""]),e}function getTimestamp(){var e=new Date,t=e.getTime();return t}function getRequest(e,t){var i,o,n,r,s,a,l,c,d=new Date,u=Math.round(d.getTime()/1e3),p=getCookieName("id"),g=getCookieName("ses"),h=loadDomainUserIdCookie(),m=getCookieValue("ses"),f=configCustomUrl||locationHrefAlias;if(configDoNotTrack)return SnowPlow.setCookie(p,"",-1,configCookiePath,configCookieDomain),SnowPlow.setCookie(g,"",-1,configCookiePath,configCookieDomain),"";o=h[0],n=h[1],s=h[2],r=h[3],a=h[4],l=h[5],m||(r++,l=a),e.addRaw("dtm",getTimestamp()),e.addRaw("tid",String(Math.random()).slice(2,8)),e.addRaw("vp",detectViewport()),e.addRaw("ds",detectDocumentSize()),e.addRaw("vid",r),e.addRaw("duid",n),e.add("p",configPlatform),e.add("tv",SnowPlow.version),e.add("fp",fingerprint),e.add("aid",configTrackerSiteId),e.add("lang",browserLanguage),e.add("cs",documentCharset),e.add("tz",timezone),e.add("uid",businessUserId),configReferrerUrl.length&&e.add("refr",purify(configReferrerUrl));for(i in browserFeatures)Object.prototype.hasOwnProperty.call(browserFeatures,i)&&(c="res"===i||"cd"===i||"cookie"===i?"":"f_",e.addRaw(c+i,browserFeatures[i]));e.add("url",purify(f));var y=e.build(),v=location.protocol.startsWith("https");return setDomainUserIdCookie(n,s,r,u,l,v),SnowPlow.setCookie(g,"*",configSessionCookieTimeout,configCookiePath,configCookieDomain,v),y+=SnowPlow.executePluginMethod(t)}function collectorUrlFromCfDist(e){return asCollectorUrl(e+".cloudfront.net")}function asCollectorUrl(e){if(SnowPlow.isString(e))return("https:"==SnowPlow.documentAlias.location.protocol?"https":"http")+"://"+e+"/i";if(SnowPlow.isArray(e)){for(var t=[],i=0;i0?"&":"?";t+=n+e+"="+(o?SnowPlow.encodeWrapper(i):i)}},o=function(e){var t=new RegExp("\\$(.[^\\$]+)$"),i=t.exec(e);return i?i[1]:void 0},n=function(e,t){switch(t){case"tms":return SnowPlow.toTimestamp(e,!0);case"ts":return SnowPlow.toTimestamp(e,!1);case"dt":return SnowPlow.toDatestamp(e);default:return e}},r=function(){function e(t){var i={};for(var r in t){var s=r,a=t[r];t.hasOwnProperty(s)&&(SnowPlow.isDate(a)&&(type=o(s),type||(type="tms",s+="$"+type),a=n(a,type)),SnowPlow.isJson(a)&&(a=e(a))),i[s]=a}return i}return e}(),s=function(e,t){i(e,t,!0)},a=function(e,t){i(e,t,!1)},l=function(t,i,o){if(SnowPlow.isNonEmptyJson(o)){var n=r(o),l=JSON2.stringify(n);e?a(t,SnowPlow.base64urlencode(l)):s(i,l)}};return{add:s,addRaw:a,addJson:l,build:function(){return t}}}function getContextWithPixelId(e){var t=SnowPlow.getCookie(pixelCookieName),i={pixel_id:t};return e?(e.pixel_id||(i=Object.assign(e,i)),i):i}function logPageView(e,t,i,o,n,r,s,a){var l=SnowPlow.fixupTitle(e||configTitle),c=getContextWithPixelId(t),d=requestStringBuilder(configEncodeBase64);d.add("e","pv"),d.add("page",l),d.add("se_ca",i),d.add("se_ac",o),d.add("se_la",n),d.add("se_pr",r),d.add("se_psk",s),d.add("se_va",a),d.addJson("cx","co",c);var u=getRequest(d,"pageView");sendRequest(u,configTrackerPause);var p=new Date;configMinimumVisitTime&&configHeartBeatTimer&&!activityTrackingInstalled&&(activityTrackingInstalled=!0,resetMaxScrolls(),SnowPlow.addEventListener(SnowPlow.documentAlias,"click",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mouseup",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousedown",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousemove",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousewheel",activityHandler,supportsPassive()?{passive:!0}:!1),SnowPlow.addEventListener(SnowPlow.windowAlias,"DOMMouseScroll",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"scroll",scrollHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keypress",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keydown",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keyup",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"resize",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"focus",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"blur",activityHandler),lastActivityTime=p.getTime(),setInterval(function(){var e=new Date;lastActivityTime+configHeartBeatTimer>e.getTime()&&configMinimumVisitTimeo&&0>s&&(o+=window.scrollY,s+=window.scrollY)}return i.left>=0&&i.right<=this.winWidth+this.options.offset&&(i.top>=o&&i.top<=s||i.bottom<=s&&i.bottom>=o-this.options.offset)}function n(t){return e.isIEFamily&&null==t.parentElement||t===document?{height:0,width:0,left:0,right:0,top:0,bottom:0}:t.getBoundingClientRect()}function r(e){var t=getComputedStyle(e),i="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.body;var n=null;for(n=e;n=n.parentElement;)if(t=getComputedStyle(n),(!i||"static"!==t.position)&&o.test(t.overflow+t.overflowY))return n;return document}function s(e,t){var i=0,o=this;return function(){var n=+new Date;t>n-i||(i=n,e.call(o))}}return t.prototype.registerAllWidgetsReady=function(e){var t=this;e.onAllWidgetsReady(function(){t.allWidgetsAreReady=!0,t.verifyInviewT()})},t.prototype.register=function(e,t){this.objects.push({element:e,callback:t,modalCalc:!1}),1==this.objects.length&&this.bindEvents(),this.verifyInviewT()},t.prototype.registerinModal=function(e,t){if(null!==e){var i=r(e).parentNode;this.objects.push({element:e,callback:t,modalCalc:i}),1==this.objects.length&&this.bindEvents(),i&&(this.modalObjCounter++,1==this.modalObjCounter&&this.bindEvents(e)),this.verifyInviewT()}},t.prototype.bindEvents=function(t){var i=void 0===t?window:r(t);e.addEventListener(i,"scroll",this.verifyInviewT),e.addEventListener(i,"resize",this.verifyInviewT),e.addEventListener(i,"resize",this.saveWinOffsetT),e.addEventListener(i,"pageshow",this.verifyInviewT)},t.prototype.unbindEvents=function(t){var i=void 0===t?window:r(t);e.removeEventListener(i,"scroll",this.verifyInviewT),e.removeEventListener(i,"resize",this.verifyInviewT),e.removeEventListener(i,"resize",this.saveWinOffsetT),e.removeEventListener(i,"pageshow",this.verifyInviewT)},t.prototype.verifyInview=function(){if(this.allWidgetsAreReady)for(var e,t=this.objects.length-1;e=this.objects[t];t--)o.apply(this,[e.element,e.modalCalc])&&i.apply(this,[e.element])&&(e.callback.apply(),this.objects.splice(t,1),e.modalCalc&&this.modalObjCounter--,0==this.modalObjCounter&&this.unbindEvents(e.element),0==this.objects.length&&this.unbindEvents())},t.prototype.saveWinOffset=function(){this.winHeight=window.innerHeight||document.documentElement.clientHeight,this.winWidth=window.innerWidth||document.documentElement.clientWidth},t}(Yotpo),document.getElementsByClassName||(document.getElementsByClassName=function(e){return this.querySelectorAll("."+e)},Element.prototype.getElementsByClassName=document.getElementsByClassName),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=i.length;return function(n){if("object"!=typeof n&&("function"!=typeof n||null===n))throw new TypeError("Object.keys called on non-object");var r,s,a=[];for(r in n)e.call(n,r)&&a.push(r);if(t)for(s=0;o>s;s++)e.call(n,i[s])&&a.push(i[s]);return a}}()),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),t+e.length>this.length?!1:-1!==this.indexOf(e,t)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i0)for(var s=0;s0&&(a.length>r||a.lengtht&&(e.value=e.value.substring(0,t),o=t),i.innerHTML=o}}var c=function(e){this.element=e,this.inputParams={},this.fieldElements={},a.call(this)};return c.prototype.getFieldElement=function(e){return this.fieldElements[e]?this.fieldElements[e]:null},c.prototype.getValues=function(){this.inputParams={};for(var t=0;t-1&&(t[i]=e[i]);return t}function i(t,i,o){if(!i)return!1;for(var n=!1,r=0;r=s+1;s++)e.addClass(r[s],"yotpo-rating-bar-full");break;case"size":var a=r[2*(n-1)],l=2==n?"fit":"offset";e.removeClass(a,"yotpo-size-bar-empty"),e.addClass(a,"yotpo-size-bar-"+l)}}var d={},u=3;return d.render=function(r,s){var a=yotpo.getUserSettings().custom_fields_info,l=yotpo.getUserSettings().new_main_widget_layout,c={".yotpo-product-related-fields":!1,".yotpo-user-related-fields":!1,".yotpo-open-question-fields":!1},d=1,u=t(s);for(var p in u){var g=p.match(/\[(.*?)\]/).pop(),h=a[g].field_type,m=a[g].title,f=u[p];if(["Rating","Size"].indexOf(h)>-1&&f>0){if(l){if("Size"==h){var y=parseInt(f);f=a[g].options[y-1]}n(r,!0,d-1,h,m,f),n(r,!1,null,h,m,f)}else o(r,d,h,m,f),o(r,null,h,m,f);d++,c[".yotpo-product-related-fields"]=!0}else if(["SingleChoice","MultipleChoice"].indexOf(h)>-1){if(f instanceof Array){if(!(f.length>0))continue;f=f.join(", ")}var v=r.querySelectorAll(".yotpo-user-related-fields"),b=i(m,f,v);b&&(c[".yotpo-user-related-fields"]=!0)}else if(["CustomerFreeText","ProductFreeText"].indexOf(h)>-1){var w=r.querySelectorAll(".yotpo-open-question-fields"); f&&(f=f.replace(/\n/g,"
"));var b=i(m,f,w);b&&(c[".yotpo-open-question-fields"]=!0)}}for(var _ in c)if(!c[_]){var S=r.querySelector(_);S&&e.addClass(S,"yotpo-hidden")}},d}(Yotpo),Yotpo.Libraries=Yotpo.Libraries||{},Yotpo.Libraries.Tracker=function(e){var t={};return t.trackConversionOrder=function(t,i){if(!e.shouldPreventCookies){var o=i.orderId,n=i.orderAmount,r=i.orderCurrency;t&&o&&n&&r&&e.Libraries.YotpoTracker.trackConversionOrder(t,i)}},t.fbTracking=function(t,i){if(!e.shouldPreventCookies){var o=new e.Libraries.FacebookAds(t.pixel_id);1==t.page_view&&o.trackPageView(),1==t.purchase&&i&&o.trackPurchase(i)}},t}(Yotpo),Yotpo.Libraries=Yotpo.Libraries||{},Yotpo.Libraries.YotpoTracker=function(e){var t=1,i={};return i.adaptConversionOrderObject=function(e){var t=[];if(e.products)for(var i=0;it&&(t=this.numLightboxImages+R-1);break;case"current":t=this.currImageIndex;break;case"next":t=this.currImageIndex+1,t>=this.numLightboxImages+R&&(t=R)}return this.lightboxImages[t]}function y(e){for(var t,i=Object.keys(e),o=0;o2*Math.abs(n)&&Math.abs(o)>50&&(this.slide(o>0?U.NEXT_IMAGE:U.PREVIOUS_IMAGE),this.initialX=null,this.initialY=null,e.preventDefault())}}function T(e){var t=this.lightboxContentContainer;this.lightboxNewDesign&&M()&&(t=e.parentElement.querySelector(".yotpo-lightbox-mobile-content"));var i=t.querySelector('.social-link[data-network="facebook"]');if(i){var o,n=i.href.split("&picture")[0],r=this.lightboxImages[this.currImageIndex].src||"";o=n+"&picture="+r,i.href=o}}function q(){this.lightboxImages=this.lightboxContainer.querySelectorAll(".yotpo-lightbox-image"),this.lightboxImageContainers=this.lightboxContainer.querySelectorAll(".yotpo-lightbox-image-container")}function F(t){var i=t.getElementsByClassName("yotpo-instagram");if(i.length){var o=i[0].getElementsByClassName("yotpo-regular-box");o.length&&setTimeout(function(){if(o[0].scrollHeight>o[0].clientHeight){var t=i[0].getElementsByClassName("show-more")[0],n=i[0].getElementsByClassName("show-less")[0];e.addClass(i[0],"collapse-text"),e.addEventListener(t,"click",function(){o[0].focus(),e.addClass(i[0],"open-text")}),e.addEventListener(n,"click",function(){o[0].focus(),e.removeClass(i[0],"open-text")})}},10)}}function M(){return window.innerWidth<1e3}function L(){this.currImageIndex=0,this.lightbox=this.element,this.videoPlayers={},this.modalContainer=this.lightbox.getElementsByClassName("yotpo-lightbox-container")[0],this.lightboxContentContainer=this.lightbox.getElementsByClassName("yotpo-lightbox-content-container")[0],this.lightboxSliderContainer=this.lightbox.getElementsByClassName("yotpo-lightbox-slider-container")[0],this.lightboxContainer=this.lightbox.getElementsByClassName("y-slider-container")[0],q.call(this),this.firstFocusElement=this.lightbox.getElementsByClassName("yotpo-icon-cross")[0],this.closeBtn=this.lightbox.getElementsByClassName("yotpo-icon-btn-small")[0],this.modal=this.lightbox.getElementsByClassName("yotpo-modal")[0],this.modalDialog=this.modal.getElementsByClassName("yotpo-modal-dialog")[0],this.mask=this.modal.getElementsByClassName("yotpo-modal-mask")[0],this.loader=this.modal.getElementsByClassName("yotpo-image-loader-wrapper")[0],this.arrows=this.lightbox.getElementsByClassName("yotpo-lightbox-arrows")[0],this.leftArrow=this.lightbox.getElementsByClassName("yotpo-icon-left-arrow-thin")[0],this.rightArrow=this.lightbox.getElementsByClassName("yotpo-icon-right-arrow-thin")[0],this.body_overflow_style=document.body.style.overflow}function H(e,t){if("reviews"==this.contentProvider.analyticsCategory)var i="video"==e.current.mediaType?e.current.videoId:e.current.imageId,o={media_id:i,review_id:this.review.dataset.reviewId};else var o={source:e.current.mediaSource,media_id:e.current.imageId,has_cta:t};return o}function N(t,i){var o=this.element.querySelector(".yotpo-lightbox-product-button"),n=o?!e.isHidden(o):!1,r=H.call(this,i,n);if(n){var s=o.className.indexOf("yotpo-lightbox-add-to-cart-button")>=0?"add_to_cart":"shop_now";r.cta_type=s}var a="video"==i.current.mediaType?"video":"image";this.analyticTracker.track(t,a,null,r)}function D(){var t=this,i=t.element,o='[tabindex]:not([tabindex="-1"])';e.trapModalFocus(i,o)}var Y=3,B=1,O=1,R=2,U={NEXT_IMAGE:"next",PREVIOUS_IMAGE:"previous"};return t.prototype.open=function(t,i){var o,r,s=[];this.lastFocusElement=document.activeElement,this.isOpen=!0,this.isSliding=!1,r=this.contentProvider.getImages(t),this.numLightboxImages=r.length,this.singleImage=1==this.numLightboxImages,this.singleImage?this.numImageContainers=1:(this.numImageContainers=this.numLightboxImages+R,this.numImageContainers1?l.call(this):c.call(this),h.call(this);var E=n.call(this);y.call(this,E);var k=this;e.preloadImages([E.prev,E.current,E.next],function(e){g.call(k,e,E)},{index:k.currImageIndex,id:E.current.imageId}),currentImage=this.lightboxImages[this.currImageIndex],u.call(this,currentImage,E.current),a.call(this,t,currentImage),p.call(this,t,currentImage),N.call(this,"loaded",E),D.call(this)},t.prototype.close=function(){var t=this;if(this.isOpen){this.isOpen=!1,r.call(this),e.removeClass(t.modalContainer,"yotpo-active-display"),document.body.style.overflow=t.body_overflow_style;for(var i=0;i=this.numLightboxImages+R&&(this.currImageIndex=R)):(this.currImageIndex+=-1,this.currImageIndex0){for(var i=[],o=0;o=0;if(o&&i&&n){var r=document.createElement("div");r.className="yotpo yotpo-add-to-cart-button-tooltip";var s=t.getBoundingClientRect();r.style.top=s.top+s.height+5+"px",r.style.left=s.left-(165-s.width)/2+"px";var a=document.createElement("div"),l=document.createElement("li");l.className="yotpo-icon yotpo-icon-info",a.className="tool-tip-unavailable",a.innerText=e.texts.add_to_cart_currently_unavailable,a.insertBefore(l,a.childNodes[0]),r.appendChild(a),document.body.appendChild(r)}},500)},o=this;e.forEach(t,function(t){e.addEventListener(t,"mouseenter",i.bind(o,t)),e.addEventListener(t,"mouseleave",function(){var e=document.body.querySelector(".yotpo-add-to-cart-button-tooltip");e&&e.parentNode.removeChild(e)})})}function s(){this.smallProducts=this.element.querySelectorAll(".yotpo-lightbox-product-select-image"),this.selectedProduct=this.element.querySelector(".yotpo-lightbox-product-selected"),this.products=this.element.querySelectorAll(".yotpo-lightbox-product"),this.productsList=this.element.querySelector(".yotpo-lightbox-products-footer"),this.showMore=this.element.querySelector(".yotpo-lightbox-more-products .show-more"),this.showLess=this.element.querySelector(".yotpo-lightbox-more-products .show-less"),this.addToCartButtons=this.element.querySelectorAll(".yotpo-lightbox-add-to-cart-button");var t=this.element.querySelectorAll("img[data-src]");e.forEach(t,function(e){e.setAttribute("src",e.attributes["data-src"].value),e.removeAttribute("data-src")});var i=this.element.getElementsByClassName("review-stars"),o=this.element.getElementsByClassName("link-to-product-tab")[0];i.length&&e.addEventListener(i[0],"keydown",function(e){13==e.keyCode&&o.click()})}return t.load=function(t,i,o){return new e.TaggedProducts(t,i,o)},t.prototype.changeProduct=function(t){e.removeClass(this.selectedProduct,"yotpo-lightbox-product-selected"),this.selectedProduct=t,e.addClass(this.selectedProduct,"yotpo-lightbox-product-selected");for(var i=this.selectedProduct.getAttribute("data-product-id"),o=0;oi[o].naturalWidth?"yotpo-image-tall":"yotpo-image-wide";e.addClass(i[o],n)}}function n(e){return this.imageWidget.element.querySelector(h+"["+g+"='"+e+"']")}function r(e){var t=this.imageWidget.element.querySelectorAll(v+"["+g+"='"+e+"']");return Array.prototype.slice.call(t)}function s(t,i){var o=r.bind(this)(t),n=this;e.forEach(o,function(t){if(t){var o=new e.Modules.KalturaManager(t,n.imageWidget._controller,i);o.loadThumbRotator()}})}function a(t){e.forEach(t,function(t){e.Modules.KalturaManager.setElementThumbnailPlaceholder(t)})}function l(e){if(e){if(e.querySelector(v))return"video";if(e.querySelector(h))return"image"}return-1}function c(e){if(e){if("video"==l(e))return e.querySelector(v);if("image"==l(e))return e.querySelector(h)}return null}function d(e){var t=c(e);return t?t.getAttribute(g):-1}function u(t){if(t){if("video"==l(t))return e.Modules.KalturaManager.getThumbnailPlaceholderUrl(c(t));if("image"==l(t))return c(t).getAttribute("src")||c(t).getAttribute("data-src")}return null}function p(e,t){for(var i=0;i-1&&e.remove(i[o])}},t.prototype.replaceBrokenImages=function(t){for(var i=this.imageWidget.getImageElements(),o=e.getDefualtImage(),n=0;no&&t[r].offsetWidth<=n?"yotpo-hover-image-medium":"yotpo-hover-image-large",e.addClass(t[r],i),s&&a||e.addClass(t[r],"yotpo-hover-big-icon")}},t}(Yotpo),Yotpo.VideoPlayerLoader=function(){function e(e,t){this.widget=e,this.hasVideo=this.checkAndUpdateIfHasVideo(),this.kalturaCreds=t}return e.prototype.loadKalturaScript=function(){var e=document.createElement("script");e.type="text/javascript",e.src="https://cdnapisec.kaltura.com/p/"+this.kalturaCreds.partner_id+"/embedPlaykitJs/uiconf_id/"+this.kalturaCreds.player_id,document.body.appendChild(e);var t;return"undefined"!=typeof requirejs&&requirejs.config?t=requirejs:"undefined"!=typeof require&&require.config&&(t=require),t&&(t.config({paths:{KalturaPlayer:e.src}}),t(["scripts/config"],function(){window.KalturaPlayer=KalturaPlayer})),!0},e.prototype.checkAndUpdateIfHasVideo=function(){return this.hasVideo?!0:this.widget.element.getElementsByClassName("yotpo-video").length>0},e}(Yotpo),Yotpo.ImagesAnalyticsHandler=function(e){function t(t,i){this.element=t,this.tracker=i,this.bindedImagesOffest=0,n.call(this),i.track("loaded"),e.currentInview.register(this.element,function(){i.track("shown",null,null)}),e.hoverAnalytics.register(self.element,function(){e.currentAnalytics.trackUniqueEvent(self.analyticsCategory,"hovered",null,null,self.analyticsContext)})}function i(e){var t=e.querySelector(".y-image-overlay"),i=t?t.getAttribute("data-source"):"unkown",o=t?t.getAttribute("data-image-id"):"unkown";return{source:i,media_id:o}}function o(e){return e.getElementsByClassName("yotpo-image").length>0?"image":"video"}function n(){this.tracker.eventContext.has_video=this.element.getElementsByClassName("yotpo-video").length>0}return t.prototype.bindImageElementAnalytics=function(t){var n=this,r=o(t);e.currentInview.register(t,function(e){return function(){n.tracker.track("shown",r,null,i(e))}}(t)),e.addEventListener(t,"click",function(){n.tracker.track("clicked_on",r,null,i(t))}),e.hoverAnalytics.register(t,function(){n.tracker.track("hovered",r,null,i(t))})},t.prototype.bindAnalyticsForloadedImages=function(e){n.call(this);for(var t=this.bindedImagesOffest;t0&&(e.removeClass(this.element,"yotpo-hidden"),s.call(this,u,r,a,!0),i.call(this,{separatorSize:20,separatorClass:d}),t.length>1?this.titleElement.innerHTML+=" and related products":this.titleElement.innerHTML="Related products")}}.bind(this),l)}function n(e,t){for(var i=0;i1?(e.removeClass(this.element,"yotpo-hidden"),this.titleElement.innerHTML="Tagged products",s.call(this,t,n,r),i.call(this)):e.addClass(this.element,"yotpo-hidden"),a&&o.call(this,t,l,n,r),this.element},t.prototype.destroy=function(){for(var e=this.element;e.hasChildNodes();)e.removeChild(e.firstChild);this.mobileSlider&&this.mobileSlider.destroy()},t}(Yotpo),Yotpo.SuggestedTopics=function(e){function t(t,i){for(var o=t.getElementsByClassName("suggested-topic"),n=t.getElementsByClassName("suggested-topics-row"),r=null,s=null,a=null,l=null,c=0;ct}function i(e,t){function i(){var e=r>-1&&-1===s&&l>-1,t=s>-1&&-1===s&&a>-1;return e||t}var o=e.substr(0,t),n=e.substr(t),r=o.lastIndexOf("<"),s=o.lastIndexOf(">");r>s&&(s=-1);var a=n.indexOf("<"),l=n.indexOf(">");return l>a&&a>-1&&(l=-1),i()?r:t}function o(t,o,r){var a=t.getElementsByClassName(r)[0],l=a.innerHTML;o=i(l,o);var c=s(a.id,l),d=l.substring(0,o)+"",u='

'+l.substring(o)+""+e.texts.read_less+"

";return a.innerHTML=t.classList.contains("yotpo-review")?n(l,d,u,o,a.id):d+u,!0}function n(t,i,o,n,r){var a=t.substring(0,n),l=/(.*?)/g,c=/<\/span>/g,d=s(r,t),u=(a.match(l)||[]).length,p=(a.match(c)||[]).length;return u>p&&(i=t.substring(0,n)+"",o='

'+t.substring(n)+""+e.texts.read_less+"

"),i+o}function r(t,i){var o=t.getElementsByClassName("rest-content-collapsed")[0],n=t.getElementsByClassName("yotpo-read-more"),r=!1;"function"==typeof i&&(r=!0);for(var s=function(){if("closed"==this.getAttribute("data-position")){var n=t.querySelector(".yotpo-read-more[data-position=opened]");this.style.display="none",e.Animations.fadeIn(o,"1000"),n.focus(),r&&i()}else{var s=t.querySelector(".yotpo-read-more[data-position=closed]");e.Animations.fadeOut(o,"500"),setTimeout(function(){s.style.display="inline",s.focus()},500)}},a=0;a0&&(i=i.substr(0,o)),i}var l={};return l.bind=function(e,i,n,s){t(e,i,n)&&(o(e,i,n),r(e,s),e.setAttribute("yotpo-content-collapsed",!0))},l}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.DynamicLayout=function(e){function t(t,r){this.elementsContainer=t,this.settings=r,i.call(this),e.isMobile()?o.call(this):n.call(this),r.animation&&s.call(this)}function i(){this.clickableElements=this.elementsContainer.querySelectorAll(this.settings.clickable_elements_selector||a),this.expandableElementContainer=this.elementsContainer.querySelector(this.settings.expandable_element_container_selector||l)}function o(){this.mobileSlider=new e.Modules.MobileSlide(this.elementsContainer,{slidesSelector:this.settings.clickable_elements_selector||a,fixedSlideWidth:this.settings.mobile_slides_fixed_width||d})}function n(){this.expandableElementContainer&&(this.expandableElementContainer.onclick=r.bind(this))}function r(){for(var t=0;t0||"function"==typeof r.writeContentCallback)&&(a=!1)}a||(r.element.getElementsByClassName("email-input")[0].style.display="none"),setTimeout(function(){if(t+"s"=="reviews"){var e=n.forms[t+"s"].getElement().getElementsByClassName("stars-wrapper");e&&e[0].children.length>0&&e[0].children[0].focus()}else if(t+"s"=="questions"){var i=n.forms[t+"s"].getElement().querySelector("#yotpo_input_question_content");i&&i.focus()}},350),n.forms[t+"s"].activate()}}),r[0].affected){r.push({name:"show_name_input_field",type:["keyup","paste"],initiators:r[0].affected.querySelectorAll(".write-"+t+"-content .form-element .y-input"),affected:r[0].affected.getElementsByClassName("yotpo-footer")[0],skipAnimation:function(){return c&&!("1"==c.show_name_field)},effect:"fadeIn",action:function(){if(c){var e=n._controller.getTrustedVendorsData(),i=n.forms[t+"s"],r=i.getInputField("display_name");if(e.display_name&&""==r.value&&i.setInputField("display_name",e.display_name),Object.keys(e).length>0||"function"==typeof i.writeContentCallback){var s=o("enable_form_submit");s&&s.handler()}}}}),r.push({name:"show_social_sign_in",type:["keyup","paste"],initiators:r[1].initiators,affected:r[1].affected.getElementsByClassName("socialize-wrapper")[0],skipAnimation:d,effect:"fadeIn"}),r.push({name:"show_email_input_field",type:["keyup","paste"],initiators:r[1].affected?r[1].affected.getElementsByClassName("name-input"):[],affected:r[1].affected?r[1].affected.getElementsByClassName("email-input")[0]:[],effect:"fadeIn",skipAnimation:d,action:function(){n.forms[t+"s"].submitButton.style.marginTop="15px"}});var u=r.length-1,p=n._controller.getUserSetting("css_preview");"undefined"!=typeof p&&p||r.push({name:"enable_form_submit",type:["keyup","paste"],initiators:[r[u].affected],affected:null,action:function(){n.forms[t+"s"].activate()}}),i(r,".write-review .y-input[name=review_title]","click",l,"clicked_on","title_field",!1),i(r,".write-review .y-input[name=review_title]","keydown",l,"typed","title_field",!0),i(r,".write-review .y-input[name=review_content]","click",l,"clicked_on","body_field",!1),i(r,".write-review .y-input[name=review_content]","keydown",l,"typed","body_field",!0),i(r,".write-review .y-input[name=display_name]","click",l,"clicked_on","name_field",!1),i(r,".write-review .y-input[name=display_name]","keydown",l,"typed","name_field",!0),i(r,".write-review .y-input[name=email]","click",l,"clicked_on","email_field",!1),i(r,".write-review .y-input[name=email]","keydown",l,"typed","email_field",!0),i(r,".yotpo-submit","click",l,"clicked_on","post_button",!0),i(r,".write-review .y-input[name=content]","click",l,"clicked_on","name_field",!1);var g=function(){return c&&Object.keys(n._controller.getTrustedVendorsData()).length>0};i(r,".yotpo-submit","click",l,"clicked_on","post_button",!0,g,"verified")}e.forEach(r,function(t){for(var i=0;i0}};return t.state=function(e){return"undefined"!=typeof e&&(this._state=e),this._state},t.is=function(e){return i[e]?i[e].call(this):this.state()==e},t.findAncestorByClass=function(t,i){do if(t=t.parentElement,!t)break;while(!e.hasClass(t,i));return t},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.KalturaManager=function(e){function t(e,t,i){this.element=e,this.videoCredentials=t.userSettings.video_support.settings,this.isReviews=i}function i(t,i){var o,n;t?(o="lightbox-"+this.element.dataset.imageId,n=!0):(o=this.element.dataset.imageId,n=!1);try{this.kalturaPlayer=KalturaPlayer.setup({targetId:o,disableUserCache:!0,provider:{partnerId:this.element.dataset.sourcePartnerId||this.videoCredentials.partner_id,uiConfId:this.element.dataset.sourcePlayerId||this.videoCredentials.player_id},player:{playback:{preload:"auto",autoplay:n,pictureInPicture:!1,muted:i,volume:.5}}})}catch(r){this.element.style.background="url("+e.getDefualtImage().size_656+") 0px center",this.element.style.backgroundSize="cover"}}function o(t,i){var o=Math.floor(t.offsetWidth);return i&&0==o&&(o=e.isMobile()?80:130),{thumbWidth:o,sliceTime:230,element:t,bindEvents:function(){var t=this;this.element.setAttribute("data-kframe",0),this.element.setAttribute("data-ktimer",0),this.element.addEventListener("mouseover",function(e){t.mouseOver.call(t,e)}),this.element.addEventListener("touchstart",function(e){t.mouseOver.call(t,e)},e.supportsPassive()?{passive:!0}:!1),this.element.addEventListener("mouseout",function(e){t.mouseOut.call(t,e)}),this.element.addEventListener("touchend",function(e){t.mouseOut.call(t,e)}),this.element.addEventListener("mouseup",function(e){t.mouseOut.call(t,e)})},mouseOver:function(e){var t=e.target;t.setAttribute("data-loop",1),this.loopthumb(t)},loopthumb:function(e){var t=parseInt(e.getAttribute("data-loop"));if(t>0){var i=parseInt(e.getAttribute("data-kframe"))-this.thumbWidth;e.style.backgroundPosition=i+"px",e.setAttribute("data-kframe",i);var o=this,n=setTimeout(function(){o.loopthumb(e)},o.sliceTime);e.setAttribute("data-ktimer",n)}},mouseOut:function(e){var t=e.target;t.setAttribute("data-loop",0),t.style.backgroundPosition="0px",t.setAttribute("data-kframe",0),t.setAttribute("data-ktimer",0)}}}function n(t,i){function o(t,i,o){eventContext={percentage:t.currentTarget.currentTime/t.currentTarget.duration,video_duration:t.currentTarget.duration,currentTime:t.currentTarget.currentTime,gallery_id:o,partner_id:t.currentTarget.dispatchTarget._provider._partnerId,entryId:t.currentTarget.dispatchTarget.dispatchTarget._mediaInfo.entryId},e.currentAnalytics.trackEvent("dedicated_page_popup",i,"video",null,eventContext)}function n(e){var i=e.currentTarget.getBoundingClientRect(),o=e.clientX,n=window.getComputedStyle(e.currentTarget,null),r=parseInt(n.blockSize,10),s=parseInt(n.paddingBlockStart,10),a=o-i.left-s,l=a/r;l=parseFloat(l.toFixed(2)),1>=l&&l>=0&&(t.muted&&l>0&&(t.muted=!1),l||(t.muted=!0),t.volume=l,c.style.height=100*l+"%")}var r=i.getAttribute("data-image-id"),s=document.getElementsByClassName("playkit-volume-control-bar")[0],a=s.cloneNode(!0),l=s.parentNode;l.appendChild(a),l.removeChild(s);var c=a.getElementsByClassName("playkit-progress")[0];l.addEventListener("mouseleave",function(){a.onmousemove=null}),a.addEventListener("mouseup",function(e){n(e),a.onmousemove=null}),a.addEventListener("mousedown",function(){a.onmousemove=function(e){n(e)}}),t.addEventListener(t.Event.VOLUME_CHANGE,function(){t.muted||(c.style.height=100*t.volume+"%")}),t.addEventListener(t.Event.MUTE_CHANGE,function(e){t.muted?(c.style.height="0px",action="video_muted"):(c.style.height=100*t.volume+"%",action="video_unmuted"),o(e,action,r)}),t.addEventListener(t.Event.TIME_UPDATE,function(e){e.currentTarget.currentTime>=t.nextSample&&(t.nextSample=2*t.nextSample,o(e,"timeupdate",r))})}function r(){var e=document.getElementsByClassName("kaltura-player-container");if(e)for(var t=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e.tagName&&("I"==e.tagName?e.classList.add("external-item"):e.querySelectorAll("i").forEach(function(e){e.classList.add("external-item")}))})})}),i=0;is?r():n(this.kalturaPlayer,this.element),this.kalturaPlayer.nextSample=1},t.prototype.replayVideo=function(){this.kalturaPlayer._localPlayer.currentTime=0,this.kalturaPlayer.muted=!1,this.kalturaPlayer.play(),this.kalturaPlayer.nextSample=1},t.prototype.pauseVideo=function(){this.kalturaPlayer.pause() },t.getThumbnailUrl=function(t,i){var o,n;return i?(o=Math.floor(t.offsetWidth),n=Math.floor(t.offsetHeight),(0==o||0==n)&&(o=n=e.isMobile()?100:130)):(o=Math.floor(t.offsetWidth),n=Math.floor(t.offsetHeight)),t.dataset.srcUrl+"/type/3/start_sec/0/end_sec/3/width/"+o+"/height/"+n+"/vid_slices/12/file_name/thumbnail.jpg"},t.setElementThumbnailPlaceholder=function(e){var i="url("+t.getThumbnailPlaceholderUrl(e)+") ";e.style.background=i,e.style.backgroundSize="cover"},t.getThumbnailPlaceholderUrl=function(e){return e.dataset.srcUrl+"/type/3/width/"+Math.floor(e.offsetWidth)+"/height/"+Math.floor(e.offsetHeight)},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.lazyLoading=function(e){function t(){}return t.prototype.setImages=function(e,t){this.regiterEventCalled=!1,this.loadCallbacks=e,this.widget=t,this.lazyImages=this.widget.element.getElementsByClassName("lazy"),this.lazyImages=[].slice.call(this.lazyImages),this.registerScroll(),this.registerResize()},t.prototype.loadImages=function(t){if(this.lazyImages){for(var i=[],o=0;othis.settings.visibleSlidesCount&&a.call(this)}function i(e){return{debug:e.debug||!1,slideMargin:e.slideMargin||f,visibleSlidesCount:e.visibleSlidesCount||y,animateClass:e.animateClass||v,separatorSize:e.separatorSize||0,separatorClass:e.separatorClass,fixedSlideWidth:e.fixedSlideWidth}}function o(){this.slidesContainer.style.margin=0,this.slider.style.margin=0,n.call(this)}function n(){r.call(this),s.call(this)}function r(){var e=this.slider.offsetWidth,t=this.slides.length,i=this.settings.fixedSlideWidth||Math.min(parseInt(e/(this.settings.visibleSlidesCount+.4)),S),o=(t+1)*this.settings.slideMargin,n=t*i+o,r=n-e;this.slideWidth=i,this.sliderWidth=e,this.slidesContainerWidth=n+this.settings.separatorSize,this.slidesContainerOffset=r+this.settings.separatorSize}function s(){for(var t=0;tn){var a=Math.round(this.slideWidth*n-r);this.moveX=h.call(this,this.moveX-a)}else{var a=Math.round(this.slideWidth*(1-n)+r);this.moveX=h.call(this,this.moveX+a)}e.addClass(this.slidesContainer,this.settings.animateClass),m.call(this),Math.abs(s-this.moveX)>1&&t.preventDefault()}}function g(e){if(!(e instanceof MouseEvent)||this.mousedown){var t=this.touchMoveX||this.touchStartX;this.touchMoveX=e.touches?e.touches[0].pageX:e.pageX;var i=this.moveX+t-this.touchMoveX;this.moveX=h.call(this,i),m.call(this),e.preventDefault()}}function h(e){return 0>e?0:e>=this.slidesContainerOffset?this.slidesContainerOffset:(this.adjustSize.call(this),e)}function m(){this.slidesContainer.style.transform="translate3d(-"+this.moveX+"px,0,0)"}var f=5,y=2,v="yotpo-mobile-slide-animation",b=".yotpo-mobile-slider",w=".yotpo-mobile-slides-container",_=".yotpo-mobile-slide",S=150;return t.prototype.adjustSize=function(){n.call(this),this.moveX>this.slidesContainerOffset&&(this.moveX=this.slidesContainerOffset,m.call(this))},t.prototype.destroy=function(){for(var t=0;t=o)return;n(i)}else r(i)},a=i.element.getElementsByClassName("yotpo-pager"),l=0;le?!1:(this.settings.page=e,!0)}},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.PopupWindow=function(e){function t(e,t){i.call(this,e),o.call(this,t)}function i(e){this.element=e,this.modal=this.element.querySelectorAll(".yotpo-modal-base")[0],this.container=e.parentElement}function o(e){if(e.closeWhenPressedOutside){var t=this.element.querySelectorAll(".yotpo-modal-mask")[0];if(t){var i=this;t.onclick=function(){i.close()}}}}return t.prototype.open=function(){e.addClass(this.modal,"yotpo-modal-active"),this.body_overflow_style=document.body.style.overflow,document.body.style.overflow="hidden",document.body.appendChild(this.element),this.trigger("open")},t.prototype.close=function(t){e.removeClass(this.modal,"yotpo-modal-active"),document.body.style.overflow=this.body_overflow_style,this.container&&this.container.appendChild(this.element),this.trigger("close",t)},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.Refresh=function(e){var t={};return t.perform=function(){var t=this,i=Object.assign({},t.getSettings());if("reviews"==t.type&&"reviews"==t.getMethod()){var o=e.getMainWidget(t._controller);o&&(i=Object.assign({},o.getSettings(),i))}t._controller.getBatch(function(i){var o=[];try{o=JSON.parse(i),o=o.shift().result,"undefined"!=typeof t.getElement()&&(t.getElement().innerHTML=o),"function"==typeof t.trigger&&(t.trigger("refreshed"),t.trigger("ready"))}catch(n){e.safeConsole(n.message)}},[{method:t.getMethod(),params:i}])},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.Slide=function(e){function t(t,i){this.element=t,this.imageCount=i.imageCount,this.displayWindowCount=i.displayWindowCount,this.position=i.initialPosition||r(i.imageCount,i.displayWindowCount),this.offset=i.useOffset?n(this.displayWindowCount):u,this.autoSlide=!!i.autoSlide&&i.imageCount>i.displayWindowCount,this.interval=i.delayInterval||a,this.direction=i.slideDirection||l,this.percentage=100/parseFloat(this.displayWindowCount),this.isSliding=!1,this.animationDuration=i.animationDuration||d,this.displayDirection=i.rtl?"right":"left",this.directionVector=this.displayDirection==l?-1:1,this.onSlideCallbacks=[],this.lazyEnabled=!!i.loadCallbacks,this.widgetParams=i.widgetParams,this.lazyEnabled&&(this.lazyLoadingHandler=new e.Modules.lazyLoading,this.lazyLoadingHandler.setImages(i.loadCallbacks,i.widgetParams))}function i(t){var i=this,n=0;this.isSliding||(this.isSliding=!0,this.position+=t,s.call(this),1===this.position?n=this.imageCount:this.position===this.imageCount+2&&(n=-this.imageCount),setTimeout(function(){0!==n&&(e.removeClass(i.element,c),i.position+=n,s.call(i)),setTimeout(function(){e.addClass(i.element,c),i.isSliding=!1,o.call(i)},50)},this.animationDuration))}function o(){for(var e=0;e=e?0:t}function s(){this.element.style[this.displayDirection]=-(this.position*this.percentage+this.offset)+"%",this.lazyEnabled&&this.lazyLoadingHandler.widget._controller.cssReady&&this.lazyLoadingHandler.loadImages(!0)}var a=3e3,l="left",c="y-slide-left-animations",d=450,u=0;return t.prototype.left=function(){i.call(this,this.directionVector)},t.prototype.right=function(){i.call(this,-this.directionVector)},t.prototype.setCurrentPosition=function(e){this.position=e,s.call(this)},t.prototype.start=function(){s.call(this),this.autoSlide&&this.play()},t.prototype.play=function(){var e=this;!this.timerID&&this.autoSlide&&(this.timerID=setInterval(function(){e[e.direction]()},this.interval))},t.prototype.pause=function(){this.timerID&&this.autoSlide&&(clearInterval(this.timerID),delete this.timerID)},t.prototype.onSlide=function(e){this.onSlideCallbacks.push(e)},t}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.UserAllocation=function(e){var t=parseInt("FFFFFFFFFFFFFFFF",16),i={};return i.getUserAllocation=function(){var i=e.currentAnalytics.getDomainUserId();return parseInt(i,16)/t*99+1},i}(Yotpo),Yotpo.Modules=Yotpo.Modules||{},Yotpo.Modules.Vote=function(e){function t(t){for(var i=0;ia&&this.errors.push(t.ERROR_TYPES.INVALID_SIZE);break;case"fileTypes":i.call(this,this.validations[s])||this.errors.push(t.ERROR_TYPES.INVALID_TYPE);break;case"minImageWidth":e=this.validations[s];break;case"minImageHeight":r=this.validations[s]}e||r?o.call(this,e,r):n.call(this)},t}(Yotpo),Yotpo.Helpers=Yotpo.Helpers||{},Yotpo.Helpers.ImageUtils=function(){var e=Object.create(null);return e.ROTATION_TYPES={1:"rotate(0deg)",3:"rotate(180deg)",6:"rotate(90deg)",8:"rotate(270deg)"},e.getImageOrientation=function(t,i){new FileReader;EXIF.getData(t,function(){var o=t.exifdata||{},n=o.Orientation||1;i(e.ROTATION_TYPES[n])})},e}(Yotpo),function(){function e(e){return!!e.exifdata}function t(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var i=atob(e),o=i.length,n=new ArrayBuffer(o),r=new Uint8Array(n),s=0;o>s;s++)r[s]=i.charCodeAt(s);return n}function i(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="blob",i.onload=function(){(200==this.status||0===this.status)&&t(this.response)},i.send()}function o(e,o){function r(t){var i=n(t);e.exifdata=i||{},o&&o.call(e)}if(e.src)if(/^data\:/i.test(e.src)){var s=t(e.src);r(s)}else if(/^blob\:/i.test(e.src)){var a=new FileReader;a.onload=function(e){r(e.target.result)},i(e.src,function(e){a.readAsArrayBuffer(e)})}else{var l=new XMLHttpRequest;l.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";r(l.response),l=null},l.open("GET",e.src,!0),l.responseType="arraybuffer",l.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var a=new FileReader;a.onload=function(e){c&&console.log("Got file of length "+e.target.result.byteLength),r(e.target.result)},a.readAsArrayBuffer(e)}}function n(e){var t=new DataView(e);if(c&&console.log("Got file of length "+e.byteLength),255!=t.getUint8(0)||216!=t.getUint8(1))return c&&console.log("Not a valid JPEG"),!1;for(var i,o=2,n=e.byteLength;n>o;){if(255!=t.getUint8(o))return c&&console.log("Not a valid marker at offset "+o+", found: "+t.getUint8(o)),!1;if(i=t.getUint8(o+1),c&&console.log(i),225==i)return c&&console.log("Found 0xFFE1 marker"),l(t,o+4,t.getUint16(o+2)-2);o+=2+t.getUint16(o+2)}}function r(e,t,i,o,n){var r,a,l,d=e.getUint16(i,!n),u={};for(l=0;d>l;l++)r=i+12*l+2,a=o[e.getUint16(r,!n)],!a&&c&&console.log("Unknown tag: "+e.getUint16(r,!n)),u[a]=s(e,r,t,i,n);return u}function s(e,t,i,o,n){var r,s,l,c,d,u,p=e.getUint16(t+2,!n),g=e.getUint32(t+4,!n),h=e.getUint32(t+8,!n)+i;switch(p){case 1:case 7:if(1==g)return e.getUint8(t+8,!n);for(r=g>4?h:t+8,s=[],c=0;g>c;c++)s[c]=e.getUint8(r+c);return s;case 2:return r=g>4?h:t+8,a(e,r,g-1);case 3:if(1==g)return e.getUint16(t+8,!n);for(r=g>2?h:t+8,s=[],c=0;g>c;c++)s[c]=e.getUint16(r+2*c,!n);return s;case 4:if(1==g)return e.getUint32(t+8,!n);for(s=[],c=0;g>c;c++)s[c]=e.getUint32(h+4*c,!n);return s;case 5:if(1==g)return d=e.getUint32(h,!n),u=e.getUint32(h+4,!n),l=new Number(d/u),l.numerator=d,l.denominator=u,l;for(s=[],c=0;g>c;c++)d=e.getUint32(h+8*c,!n),u=e.getUint32(h+4+8*c,!n),s[c]=new Number(d/u),s[c].numerator=d,s[c].denominator=u;return s;case 9:if(1==g)return e.getInt32(t+8,!n);for(s=[],c=0;g>c;c++)s[c]=e.getInt32(h+4*c,!n);return s;case 10:if(1==g)return e.getInt32(h,!n)/e.getInt32(h+4,!n);for(s=[],c=0;g>c;c++)s[c]=e.getInt32(h+8*c,!n)/e.getInt32(h+4+8*c,!n);return s}}function a(e,t,i){for(var o="",n=t;t+i>n;n++)o+=String.fromCharCode(e.getUint8(n));return o}function l(e,t){if("Exif"!=a(e,t,4))return c&&console.log("Not valid EXIF data! "+a(e,t,4)),!1;var i,o,n,s,l,d=t+6;if(18761==e.getUint16(d))i=!1;else{if(19789!=e.getUint16(d))return c&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;i=!0}if(42!=e.getUint16(d+2,!i))return c&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var u=e.getUint32(d+4,!i);if(8>u)return c&&console.log("Not valid TIFF data! (First offset less than 8)",e.getUint32(d+4,!i)),!1;if(o=r(e,d,d+u,g,i),o.ExifIFDPointer){s=r(e,d,d+o.ExifIFDPointer,p,i);for(n in s){switch(n){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[n]=m[n][s[n]];break;case"ExifVersion":case"FlashpixVersion":s[n]=String.fromCharCode(s[n][0],s[n][1],s[n][2],s[n][3]);break;case"ComponentsConfiguration":s[n]=m.Components[s[n][0]]+m.Components[s[n][1]]+m.Components[s[n][2]]+m.Components[s[n][3]]}o[n]=s[n]}}if(o.GPSInfoIFDPointer){l=r(e,d,d+o.GPSInfoIFDPointer,h,i);for(n in l){switch(n){case"GPSVersionID":l[n]=l[n][0]+"."+l[n][1]+"."+l[n][2]+"."+l[n][3]}o[n]=l[n]}}return o}var c=!1,d=this,u=function(e){return e instanceof u?e:this instanceof u?void(this.EXIFwrapped=e):new u(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=u),exports.EXIF=u):d.EXIF=u;var p=u.Tags={36864:"ExifVersion"},g=u.TiffTags={274:"Orientation"},h=u.GPSTags={},m=(u.IFD1Tags={},u.StringValues={ExposureProgram:{},MeteringMode:{},LightSource:{},Flash:{},SensingMethod:{},SceneCaptureType:{},SceneType:{},CustomRendered:{},WhiteBalance:{},GainControl:{},Contrast:{},Saturation:{},Sharpness:{},SubjectDistanceRange:{},FileSource:{},Components:{}});u.getData=function(t,i){return(self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete?!1:(e(t)?i&&i.call(t):o(t,i),!0)},u.readFromBinaryFile=function(e){return n(e)},"function"==typeof define&&define.amd&&define("exif-js",[],function(){return u})}.call(this),Yotpo.Helpers=Yotpo.Helpers||{},Yotpo.Helpers.WidthClass=function(){var e,t={},i=[];e=[{name:"yotpo-size-7",fit:function(e){return e>=1280}},{name:"yotpo-size-6",fit:function(e){return 1280>e&&e>=960}},{name:"yotpo-size-5",fit:function(e){return 960>e&&e>=768}},{name:"yotpo-size-4",fit:function(e){return 768>e&&e>=600}},{name:"yotpo-size-3",fit:function(e){return 600>e&&e>=480}},{name:"yotpo-size-2",fit:function(e){return 480>e&&e>=320}},{name:"yotpo-size-1",fit:function(e){return 320>e}}];for(var o=0;o0&&(this.callsRemaining++,c.call(this)),this.videosData.length>0&&(this.callsRemaining+=this.videosData.length,d.call(this))}function l(){var e={images_count:this.imagesData.length,video_count:this.videosData.length};this.analyticsTracker.track("clicked_on","submit",null,e)}function c(){var t={images:this.imagesData,source_widget:this.source_widget},i=e.getApiHost()+"/v1/widget/"+this.appKey+"/images/create_batch",o=JSON.stringify(t);e.ajax(i,u.bind(this),"POST",o,void 0,{requestHeaders:{"Content-type":"application/json"}})}function d(){var t=this;e.forEach(t.videosData,function(e){e.videoSubmit(e.caption,e.user_name,e.user_email,e.domain_key,null,u.bind(t))})}function u(t){this.callsRemaining--,e.isString(t)&&t.length>0&&(t=JSON.parse(t)),200!==t.status.code&&(this.callsErrors=!0),0===this.callsRemaining&&(this.flowSteps.uploadImages.close(),this.flowSteps.userDetails.close(),this.callsErrors?this.flowSteps.uploadError.open():(r.call(this),this.flowSteps.thankYou.open(),this.flowSteps.thankYou.modalElement.querySelector(".yotpo-modal-title").focus()))}var p=["thank_you","upload_error","upload_images","user_details"],g="image-upload-style";return t.prototype.start=function(e){this.flowSteps.uploadImages.upload(e)},t}(Yotpo),Yotpo.Flows=Yotpo.Flows||{},Yotpo.Flows.ImageUpload=Yotpo.Flows.ImageUpload||{},Yotpo.Flows.ImageUpload.ThankYou=function(e){function t(t){this.modalElement=t,e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!1}),i.call(this)}function i(){var e=this,t=this.modalElement.querySelector(".close-button"),i=document.activeElement;this.element.querySelector('[tabindex]:not([tabindex="-1"])').focus(),t.onclick=function(){i.focus(),e.close(!0)},t.onkeypress=function(e){13==e.keyCode&&e.target.click()}}return t.prototype=Object.create(e.Modules.PopupWindow.prototype),t}(Yotpo),Yotpo.Flows=Yotpo.Flows||{},Yotpo.Flows.UploadButton=function(e){function t(){var e=this.controller.getUserSetting("vendor_review_creation");if(e){var t=this.controller.getTrustedVendorsData();if(Object.keys(t).length>0)return t}return null}function i(t,i,o){var n=new e.AnalyticsTracker("upload_media",i);return n.eventContext.is_trusted_vendor=null!==o,n.track("loaded"),e.currentInview.register(t,function(){n.track("shown")}),this.uploadPhotosButton.onclick=function(){n.track("clicked_on","add_your_media")},this.uploadPhotosButton.onkeypress=function(e){13==e.keyCode&&e.target.click()},n}function o(){var t='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',i=document.querySelectorAll("div.image-upload-flow-popup.user_details")[0];e.trapModalFocus(i,t)}var n={};return n.initUploadButton=function(n,r,s,a){var l=n.getUserSetting("upload_photos"),c=n.getUserSetting("video_support");if(this.uploadPhotosButton=r.querySelector(".yotpo-pictures-gallery-upload-button"),this.controller=n,this.fileInput=r.querySelector(".yotpo-file-image-upload"),l&&this.fileInput&&this.uploadPhotosButton){n.getUserSetting("upload_videos")&&(c.uploadEnabled=!0,e.loadScript(e.yotpoVideoUploaderUrl,document.body));var d=r.querySelector(".yotpo-image-upload-container"),u=this.controller.getAppKey(),p=t.call(this),g=i.call(this,r,a,p);this.fileInput.onchange=function(){if(this.files.length>0){var t=new e.Flows.ImageUpload(d,l,c,u,s.widget_name,s.product_id,p,g);t.start(this.files)}},o()}},n}(Yotpo),Yotpo.Flows=Yotpo.Flows||{},Yotpo.Flows.ImageUpload=Yotpo.Flows.ImageUpload||{},Yotpo.Flows.ImageUpload.UploadError=function(e){function t(t){this.modalElement=t,e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!1}),i.call(this)}function i(){var e=this,t=this.modalElement.querySelector(".close-button");t.onclick=function(){e.close(!1)},t.onkeypress=function(t){13==t.keyCode&&e.close(!1)}}return t.prototype=Object.create(e.Modules.PopupWindow.prototype),t}(Yotpo),Yotpo.Flows=Yotpo.Flows||{},Yotpo.Flows.ImageUpload=Yotpo.Flows.ImageUpload||{},Yotpo.Flows.ImageUpload.UploadImages=function(e){function t(t,i,o,n,r,s,a){var l=i.settings||{};k=l.max_photos||x,this.videoSupportSettings=o||{},this.modalElement=t,this.successCallback=r,this.trustedVendorsData=s,this.analyticsTracker=a,this.uuid=e.generateUUID(),this.appKey=n,e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!1})}function i(){var t=this,i=this.modalElement.querySelector(".yotpo-icon-cross"),o=t.modalElement.querySelector(".submit-label"),n=t.modalElement.querySelector(".yotpo-submit-loader");this.element.querySelector('[tabindex]:not([tabindex="-1"])').focus(),this.nextOrSubmitButton=this.modalElement.querySelector(".yotpo-next-button"),this.addMoreInput=this.modalElement.querySelector(".upload-more-photos"),this.addMorePhotos=this.modalElement.querySelector(".yotpo-add-more");var r=this.modalElement.querySelectorAll(".yotpo-upload-button"),s=document.activeElement;this.nextOrSubmitButton.onclick=function(){null!==t.trustedVendorsData&&(e.addClass(o,"yotpo-hidden"),e.removeClass(n,"yotpo-hidden")),t.successCallback(a.call(t),l.call(t))},this.nextOrSubmitButton.onkeypress=function(e){13!=e.keyCode||e.target.disabled||e.target.click()},i.onclick=function(){s.focus(),t.close(!0)};for(var c=function(e){13==e.keyCode&&e.target.click()},d=0;d0&&g.call(e,this.files[0],e.itemsArray[t])},r.onclick=function(t){var i=parseInt(this.getAttribute("index"));A.call(e,e.itemsArray[i]),t.preventDefault()},r.onkeydown=function(e){13==e.keyCode&&e.target.click()},this.itemsArray.push(s)}}function n(t){function i(e){F=JSON.parse(e),F.originalPath=F.path,t()}var o=e.getApiHost("dynamic")+"/s3_signature",n=e.convertHashToQueryStringParams({policy_name:"OnsiteUploadedImages",app_key:this.appKey}),r={withCredentials:!1};e.ajax(o,i,"POST",n,null,r)}function r(){var e=F.originalPath;"/"!==e.charAt(e.length-1)&&(e+="/"),e+=this.uuid+"/",F.path=e}function s(){null===this.trustedVendorsData?e.addClass(this.modalElement,"display-next-button"):e.addClass(this.modalElement,"display-submit-button")}function a(){for(var e=[],t=0;k>t;t++){var i=this.itemsArray[t];if(i.active&&!i.isVideo){var o=i.image_url;o.startsWith("http")||(o="https:"+o),e.push({image_url:o,caption:i.captionElement.value})}}return e}function l(){for(var e=[],t=0;k>t;t++){var i=this.itemsArray[t];i.active&&i.isVideo&&e.push({isVideo:!0,videoSubmit:i.videoSubmit,caption:i.captionElement.value})}return e}function c(){for(var t=[],i=0;k>i;i++)this.itemsArray[i].active||e.hasClass(this.itemsArray[i].itemElement,"image-loader")||t.push(this.itemsArray[i]);return t}function d(){for(var t=!1,i=!1,o=0;k>o;o++)this.itemsArray[o].active&&(t=!0),e.hasClass(this.itemsArray[o].itemElement,"image-loader")&&(i=!0);return t&&!i}function u(){0===c.call(this).length?(e.addClass(this.addMorePhotos,"yotpo-add-more-disabled"),this.addMoreInput.disabled=!0):(e.removeClass(this.addMorePhotos,"yotpo-add-more-disabled"),this.addMoreInput.disabled=!1),d.call(this)?(e.removeClass(this.nextOrSubmitButton,"yotpo-next-submit-disabled"),this.nextOrSubmitButton.disabled=!1,this.nextOrSubmitButton.setAttribute("aria-disabled","false")):(e.addClass(this.nextOrSubmitButton,"yotpo-next-submit-disabled"),this.nextOrSubmitButton.disabled=!0,this.nextOrSubmitButton.setAttribute("aria-disabled","true"))}function p(e){for(var t=c.call(this),i=Array.prototype.slice.call(e,0,t.length),o=i.length>t.length?t.length:i.length,n=0;o>n;n++)g.call(this,i[n],t[n])}function g(e,t){y.call(this,t),u.call(this);var i="video"===e.type.split("/")[0];i&&this.videoSupportSettings.uploadEnabled?(t.isVideo=!0,h.call(this,e,t)):f.call(this,e,t)}function h(t,i){var o=this,n=new YotpoVideoUploader.KalturaUploader(t,o.videoSupportSettings.settings,o.appKey,"onsite_upload",e.kalturaServerUrl);n.on("fileAdded",v.bind(o,t,i)),n.on("progress",function(e){i.loadedBar.style.width=e.percentage}),n.on("complete",function(t){t.errors&&t.errors.length>0?(o.analyticsTracker.track("video_upload","error",null,{fileValidationErrorCodes:t.errorCodes}),_.call(o,i,t.errors,t.file)):(i.videoSubmit=t.submitCallback,i.active=!0,m.call(o,i),e.addClass(i.itemElement,"active-video"),u.call(o))}),n.on("error",function(e){m.call(o,i),_.call(o,i,[q],e.file),o.trustedVendorsData&&(e.userName=o.trustedVendorsData.display_name,e.userEmail=o.trustedVendorsData.email);var t={userName:e.userName,userEmail:e.userEmail,error:e.error,fileName:e.file.name,domainKey:e.domainKey};o.analyticsTracker.track("video_upload","error",null,t)});var r=new e.Helpers.FileValidator(t,T);r.on("validated",function(e){e.length>0?n.trigger("complete",{fileValidationErrorCodes:e,file:n.file,url:null}):n.upload()}),r.validate(),i.cancelVideoUpload=function(){n.Cancel(),m.call(o,i)}}function m(t){t.loadedBar.style.width=0,e.removeClass(t.uploadLabel,"upload-overlay"),e.removeClass(t.itemElement,"image-loader"),e.removeClass(t.itemElement,"active-video"),e.hide(t.progressBar) }function f(t,i){var o=this,n=new e.FileUploader(t,P);n.on("complete",function(n){null!==n.url&&0===n.errors.length?(i.active=!0,e.Helpers.ImageUtils.getImageOrientation(t,b.bind(o,i,n))):(o.analyticsTracker.track("picture_upload","error",null,{error:n.errors}),_.call(o,i,n.errors,n.file))}),i.cancelImageUpload=function(){n.removeEvent("complete")};var r="//"+F.bucket+"."+e.awsS3Domain;n.validateAndUpload(r,F,e.FileUploader.TYPE.S3)}function y(t){t.fileInput.disabled=!0,t.captionElement.disabled=!1,this.nextOrSubmitButton.disabled=!0,this.nextOrSubmitButton.setAttribute("aria-disabled","true"),w(t),e.removeClass(t.itemElement,"image-empty"),e.addClass(t.itemElement,"image-loader"),e.addClass(this.nextOrSubmitButton,"yotpo-next-submit-disabled")}function v(t,i){e.show(i.progressBar),e.addClass(i.uploadLabel,"upload-overlay"),e.addClass(i.itemElement,"active-placeholder");var o=document.createElement("video");o.addEventListener("timeupdate",function(){if(!(o.currentTime<1)){var e=document.createElement("canvas");e.width=o.videoWidth,e.height=o.videoHeight,e.getContext("2d").drawImage(o,0,0,e.width,e.height),o.pause();var t=e.toDataURL();i.uploadLabel.setAttribute("style","background-image: url("+t+") !important;")}}),o.src=URL.createObjectURL(t),o.muted=!0,o.playsInline=!0,o.play()}function b(t,i,o){var n=this;E(i.file,function(r){t.image_url=i.url,t.uploadLabel.setAttribute("style","background-image: url("+r+") !important;transform: "+o),e.removeClass(t.itemElement,"image-loader"),e.addClass(t.itemElement,"active-placeholder"),u.call(n)})}function w(t){e.hasClass(t.itemElement,"image-error")&&(e.removeClass(t.itemElement,"image-error"),t.captionElement.value="")}function _(t,i,o){e.removeClass(t.itemElement,"image-loader"),t.active=!1,e.addClass(t.itemElement,"image-error"),e.removeClass(t.itemElement,"active-placeholder");var n=o.name.length>I?"\u2026"+o.name.slice(o.name.length-I,o.name.length):o.name;t.captionElement.readOnly=!0,t.captionElement.value=n+"\r\n"+C.call(this,i,S(o)),t.captionElement.setAttribute("aria-label","error "+t.captionElement.value),u.call(this)}function S(e){return fileType=e.type.startsWith("image/")?t.FILE_TYPE.IMAGE:e.type.startsWith("video/")?t.FILE_TYPE.VIDEO:t.FILE_TYPE.INVALID,fileType}function C(i,o){switch(i[0]){case e.Helpers.FileValidator.ERROR_TYPES.INVALID_TYPE:return this.videoSupportSettings.uploadEnabled?e.texts.upload_video_invalid_type:e.texts.upload_photos_invalid_type;case e.Helpers.FileValidator.ERROR_TYPES.INVALID_SIZE:return o==t.FILE_TYPE.VIDEO?e.texts.upload_video_invalid_size:e.texts.upload_photos_invalid_size;case e.Helpers.FileValidator.ERROR_TYPES.INVALID_IMAGE_DIMENSIONS:return e.texts.upload_photos_invalid_image_dimensions;case e.Helpers.FileValidator.ERROR_TYPES.INVALID_IMAGE_FILE:return e.texts.upload_photos_invalid_image_file;case q:return e.texts.upload_video_error;default:return e.texts.upload_photos_invalid_image_file}}function A(t){t.isVideo?(t.cancelVideoUpload(),t.isVideo=!1):"function"==typeof t.cancelImageUpload&&t.cancelImageUpload(),t.captionElement.setAttribute("aria-label","Add a caption... for image"),t.active=!1,t.captionElement.disabled=!0,t.fileInput.disabled=!1,t.uploadLabel.setAttribute("style","background-image: none !important"),w(t),e.removeClass(t.itemElement,"active-placeholder"),e.addClass(t.itemElement,"image-empty"),e.removeClass(t.itemElement,"image-loader"),u.call(this)}function E(e,t){var i=new FileReader;i.onload=function(e){t(e.target.result)},i.readAsDataURL(e)}t.FILE_TYPE={INVALID:0,IMAGE:1,VIDEO:2};var k,x=3,I=19,P={maxFileSize:15728640,fileTypes:["image/png","image/gif","image/jpg","image/jpeg"],minImageWidth:400,minImageHeight:400},T={maxFileSize:2097152e3},q="video_upload_error",F=null;return t.prototype=Object.create(e.Modules.PopupWindow.prototype),t.prototype.upload=function(e){function t(){r.call(this),this.open(),o.call(this),i.call(this),s.call(this),p.call(this,a)}var a=Array.prototype.slice.call(e,0,k);null===F?n.call(this,t.bind(this)):t.call(this)},t.prototype.resetModalContent=function(){s.call(this);for(var e=0;k>e;e++)A.call(this,this.itemsArray[e]),this.itemsArray[e].captionElement.value=""},t}(Yotpo),Yotpo.Flows=Yotpo.Flows||{},Yotpo.Flows.ImageUpload=Yotpo.Flows.ImageUpload||{},Yotpo.Flows.ImageUpload.UserDetails=function(e){function t(t,o,n){this.modalElement=t,this.successCallback=o,this.backCallback=n,this.validUserName=!1,this.validUserEmail=!1,e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!1}),i.call(this)}function i(){var t=this,i=this.modalElement.querySelector(".yotpo-icon-cross"),l=this.modalElement.querySelector(".user_details_back"),c=document.activeElement;this.submitLabel=this.modalElement.querySelector(".yotpo-modal-submit-label"),this.loader=this.modalElement.querySelector(".yotpo-submit-loader"),this.userName=this.modalElement.querySelector("#user-name"),this.userNameLabel=this.modalElement.querySelector("#user-name-label"),this.userEmail=this.modalElement.querySelector("#user-email"),this.userEmailLabel=this.modalElement.querySelector("#user-email-label"),this.submitButton=this.modalElement.querySelector(".yotpo-modal-submit-button"),this.userNameValidationMessage=this.modalElement.querySelector(".validation-message.username"),this.userEmailValidationMessage=this.modalElement.querySelector(".validation-message.email"),this.submitValidationMessage=this.modalElement.querySelector(".validation-message.submit"),i.onclick=function(){c.focus(),t.close(!0)},i.onkeypress=function(e){13==e.keyCode&&e.target.click()},l.onclick=this.backCallback,l.onkeypress=this.backCallback,this.userName.onkeyup=function(){t.validUserName=0!==t.userName.value.trim().length,o.call(t)},this.userEmail.onkeyup=function(){t.validUserEmail=0!==t.userEmail.value.trim().length&&e.validateEmail(t.userEmail.value)?!0:!1,o.call(t)},this.submitButton.onclick=function(){n.call(t),r.call(t),s.call(t),t.validUserName&&t.validUserEmail?(e.removeClass(t.loader,"yotpo-hidden"),e.addClass(t.submitLabel,"yotpo-hidden"),t.successCallback(t.userName.value,t.userEmail.value)):a.call(t)},this.submitButton.onkeypress=function(i){13!=i.keyCode||i.target.disabled||e.hasClass(t.submitButton,"yotpo-next-submit-disabled")||i.target.click()}}function o(){this.validUserName&&this.validUserEmail&&(this.submitButton.disabled=!1,this.submitButton.setAttribute("aria-disabled",!1),e.removeClass(this.submitButton,"yotpo-next-submit-disabled"))}function n(){this.validUserName?(e.removeClass(this.userName,"yotpo-input-invalid"),this.userName.setAttribute("aria-invalid",!1),this.userNameValidationMessage.removeAttribute("role"),e.removeClass(this.userNameValidationMessage,"visible")):(e.addClass(this.userName,"yotpo-input-invalid"),this.userName.setAttribute("aria-invalid",!0),e.removeClass(this.userNameLabel,"yotpo-hidden"),this.userNameLabel.setAttribute("name","user-name"),this.userNameValidationMessage.setAttribute("role","alert"),e.addClass(this.userNameValidationMessage,"visible"))}function r(){this.validUserEmail?(e.removeClass(this.userEmail,"yotpo-input-invalid"),this.userEmail.setAttribute("aria-invalid",!1),this.userEmailValidationMessage.removeAttribute("role"),e.removeClass(this.userEmailValidationMessage,"visible")):(e.addClass(this.userEmail,"yotpo-input-invalid"),this.userEmail.setAttribute("aria-invalid",!0),e.removeClass(this.userEmailLabel,"yotpo-hidden"),this.userEmailLabel.setAttribute("name","user-email"),this.userEmailValidationMessage.setAttribute("role","alert"),e.addClass(this.userEmailValidationMessage,"visible"))}function s(){this.validUserEmail&&this.validUserName?(this.submitValidationMessage.removeAttribute("role"),e.removeClass(this.submitValidationMessage,"visible")):(this.submitValidationMessage.setAttribute("role","alert"),e.addClass(this.submitValidationMessage,"visible"))}function a(){this.validUserName?this.validUserEmail||this.userEmail.focus():this.userName.focus()}return t.prototype=Object.create(e.Modules.PopupWindow.prototype),t.prototype.resetModalContent=function(){e.addClass(this.loader,"yotpo-hidden"),e.removeClass(this.submitLabel,"yotpo-hidden"),e.removeClass(this.userName,"yotpo-input-invalid"),e.removeClass(this.userEmail,"yotpo-input-invalid"),e.removeClass(this.userNameValidationMessage,"visible"),e.removeClass(this.userEmailValidationMessage,"visible"),e.removeClass(this.submitValidationMessage,"visible"),this.userName.value="",this.userEmail.value="",this.validUserName=!1},t}(Yotpo),Yotpo.BaseAggregator=function(){function e(){this.baseObject=null}return e.prototype.addFilter=function(e){this.baseObject=e},e.prototype.removeFilter=function(){this.baseObject=null},e.prototype.deepCopy=function(){return this.baseObject},e.prototype.setFilters=function(e){this.baseObject=e},e.prototype.toJson=function(){return this.baseObject},e.prototype.isFilterExists=function(){return null!=this.baseObject},e.prototype.initAggregator=function(){this.baseObject=null},e}(Yotpo),Yotpo.CrfsAggregator=function(e){function t(){this.crfFilters={}}return t.prototype.addFilter=function(t){var i=new e.CrfFilter(t.id,t.value,t.displayValue);this.crfFilters[t.id]=i},t.prototype.removeFilter=function(e){delete this.crfFilters[e.id]},t.prototype.deepCopy=function(){var e={};for(var t in this.crfFilters){var i=this.crfFilters[t].deepCopy();e[t]=i}return e},t.prototype.setFilters=function(e){this.crfFilters=e},t.prototype.toJson=function(){var e=[];for(var t in this.crfFilters){var i=this.crfFilters[t];e.push(i.toJson())}return 0!==e.length?e:null},t.prototype.isFilterExists=function(){return 0!==Object.keys(this.crfFilters).length},t.prototype.initAggregator=function(){this.crfFilters={}},t}(Yotpo),Yotpo.OrdersAggregator=function(e){function t(){this.orderFilters={}}return t.prototype.addFilter=function(t){var i=new e.OrderFilter(t.id,t.sub_type,t.question,[t.value]);this.orderFilters[t.id]=i},t.prototype.removeFilter=function(e){delete this.orderFilters[e.id]},t.prototype.deepCopy=function(){var e={};for(var t in this.orderFilters){var i=this.orderFilters[t].deepCopy();e[t]=i}return e},t.prototype.setFilters=function(e){this.orderFilters=e},t.prototype.toJson=function(){var e=[];for(var t in this.orderFilters){var i=this.orderFilters[t];e.push(i.toJson())}return 0!==e.length?e:null},t.prototype.isFilterExists=function(){return 0!==Object.keys(this.orderFilters).length},t.prototype.initAggregator=function(){this.orderFilters={}},t}(Yotpo),Yotpo.ScoresAggregator=function(e){function t(){e.BaseAggregator.call(this)}return t.prototype=Object.create(e.BaseAggregator.prototype),t.prototype.toJson=function(){return this.baseObject?[this.baseObject]:null},t}(Yotpo),Yotpo.SortsAggregator=function(e){function t(){this.sortByFilters={}}return t.prototype.addFilter=function(t){var i=new e.SortByFilter(t.value.fieldName,t.value.isAscending);this.sortByFilters[t.id]=i},t.prototype.removeFilter=function(e){delete this.sortByFilters[e.id]},t.prototype.deepCopy=function(){var e={};for(var t in this.sortByFilters){var i=this.sortByFilters[t].deepCopy();e[t]=i}return e},t.prototype.setFilters=function(e){this.sortByFilters=e},t.prototype.toJson=function(){var e=[];for(var t in this.sortByFilters){var i=this.sortByFilters[t];e.push(i.toJson())}return 0!==e.length?e:null},t.prototype.isFilterExists=function(){return 0!==Object.keys(this.sortByFilters).length},t.prototype.initAggregator=function(){this.sortByFilters={}},t}(Yotpo),Yotpo.TopicsAggregator=function(e){function t(){e.BaseAggregator.call(this)}return t.prototype=Object.create(e.BaseAggregator.prototype),t.prototype.toJson=function(){return this.baseObject?[this.baseObject]:null},t}(Yotpo),Yotpo.FilterAndSearch=Yotpo.FilterAndSearch||{},Yotpo.FilterAndSearch.Analytics=Yotpo.FilterAndSearch.Analytics||{},Yotpo.FilterAndSearch.Analytics.AnalyticsNotifier=function(e){function t(t,o,n){var r=this._controller.getAppKey(),s=e.getApiHost("dynamic")+"/v1/topic/"+r+"/related_topics.json",a=e.convertComplexObjectToQueryStringParams({app_key:r,domain_key:t,query:o}),l=this,c=function(e){var o=JSON.parse(e);200===o.status.code&&(l.freeTextRelatedTopics=o.response.related_topics,i.call(l,n.ctaName,t,n.eventValue,n.extraEventAttributes))};e.ajax(s,c,"POST",a)}function i(t,i,o,n){var r=e.FilterAndSearch.Analytics.AnalyticsNotifier.getPageType.call(this),s={cta:t,page_type:r,sku:i};e.copy(n,s);var a=e.FilterAndSearch.Analytics.Filtering.Params.getFiltersState.call(this);e.copy(a,s),this.settings&&e.copy(this.settings,s);try{e.currentAnalytics.trackEvent("filter_reviews","clicked_on",i,o,s)}catch(l){e.safeConsole(l.message)}}var o,n={};return n.init=function(){o=e.filterAndSearch.analytics.page_types,e.FilterAndSearch.Analytics.Filtering.Params.init(),this.analyticsFilterId=0,this.freeTextRelatedTopics=[]},n.notifyMobileFiltersSubmitted=function(e){i.call(this,"apply_button",e,"show_reviews",{})},n.notifyFreeTextSearched=function(o,n,r){var s=e.FilterAndSearch.Analytics.Filtering.Params.getEventParams(o,n);n?t.call(this,r,n,s):(this.freeTextRelatedTopics=[],i.call(this,s.ctaName,r,s.eventValue,s.extraEventAttributes))},n.notifyClearAllEvent=function(t){this.freeTextRelatedTopics=[];var o=e.FilterAndSearch.Analytics.Filtering.Params.getClearAllEventParams();i.call(this,o.ctaName,t,o.eventValue,o.extraEventAttributes)},n.notifyEvent=function(t,o,n){var r=e.FilterAndSearch.Analytics.Filtering.Params.getEventParams(t,o);i.call(this,r.ctaName,n,r.eventValue,r.extraEventAttributes)},n.getPageType=function(){var e=o.main_widget,t=this.settings["host-widget"];return t&&"testimonials"===t&&(e="testimonials"===this.settings.type?o.testimonials_tab:o.dedicated_page),e},n}(Yotpo),Yotpo.FilterAndSearch=Yotpo.FilterAndSearch||{},Yotpo.FilterAndSearch.Analytics=Yotpo.FilterAndSearch.Analytics||{},Yotpo.FilterAndSearch.Analytics.Filtering=Yotpo.FilterAndSearch.Analytics.Filtering||{},Yotpo.FilterAndSearch.Analytics.Filtering.Params=function(e){function t(e,t){var i="NaN",o="NaN",n={};switch(e){case d.scores:o="filter_star_rating",i=t.value,t.is_default_answer&&(i=u);break;case d.images:o="filter_reviews_images",i="all",t.value===!0&&(i="only_with_images");break;case d.crfs:o="filter_field",i=t.value.value,n.filter_field_type="crf";break;case d.orders:o=t.value.question,i=t.value.value,n.filter_field_type="metadata",n.filter_field_sub_type=t.value.sub_type}return{eventValue:i,ctaName:o,extraEventAttributes:n}}function i(e){var t=e[d.topics];return t?t[0]:""}function o(t,i,o){switch(aggregatorType=void 0,o){case"orders":aggregatorType=d.orders;break;case"crfs":default:aggregatorType=d.crfs}var s=t[aggregatorType],a=[],l=[];s&&e.forEach(s,function(e){var t=i.querySelector('.filters-dropdown[data-type="'+o+'"][data-question-id="'+e.question_id+'"]');if(t){l.push(e.question_id);var n=t.querySelector('.list-category[data-value="'+e.answers[0]+'"]');n&&a.push({question:t.getAttribute("data-default-button-display-value"),answer:n.getAttribute("data-analytic-property")})}});var c=r(i,n(l),o);return a.concat(c)}function n(t){var i=[];return e.forEach(t,function(e){i.push(e.toString())}),i}function r(t,i,o){var n=[],r=t.querySelectorAll('.filters-dropdown[data-type="'+o+'"]');return e.forEach(r,function(e){var t=i.indexOf(e.getAttribute("data-question-id"));-1===t&&n.push({question:e.getAttribute("data-default-button-display-value"),answer:e.getAttribute("data-value")})}),n}function s(e){var t=e[d.scores];return void 0===t?u:t[0].toString()}function a(e){var t=e[d.sorts];return t?t[0].sort_by:""}function l(e){var t=e[d.free_text_search];return t?t:""}function c(e,t){return t?void 0!==e[d.images]:null}var d,u,p={};return p.init=function(){d=e.filterAndSearch.filters_state_manager.aggregators_types,u=e.filterAndSearch.filters_drop_down_default_answer},p.getFiltersState=function(){var e=this.filtersManager.getCurrentSubmittedFilters();return this.analyticsFilterId++,{filters_state_id:this.analyticsFilterId,selected_topic:i(e),selected_crfs:o(e,this.reviewsContainerElement,"crfs"),selected_stars:s(e),selected_sort:a(e),selected_orders_metadata:o(e,this.reviewsContainerElement,"orders"),free_text_search:l(e),reviews_with_images:c(e,this.reviewsWithPicturesEnabled),related_topics:this.freeTextRelatedTopics,desktop_suggested_topics:this.desktopSuggestedTopics,mobile_suggested_topics:this.mobileSuggestedTopics}},p.getClearAllEventParams=function(){return{eventValue:"clear_all",ctaName:"clear_all",extraEventAttributes:{}}},p.getEventParams=function(e,i){var o="",n="",r={};switch(e){case d.free_text_search:i&&(o=i),n="free_text_search";break;case d.sorts:i.is_default_answer||(o=i.value.value.fieldName),n="sort";break;case d.topics:o=i,n="topic";break;case d.images:case d.scores:case d.crfs:case d.orders:var s=t(e,i);o=s.eventValue,n=s.ctaName,r=s.extraEventAttributes}return{eventValue:o,ctaName:n,extraEventAttributes:r}},p}(Yotpo),Yotpo.FilterAndSearch=Yotpo.FilterAndSearch||{},Yotpo.FilterAndSearch.ContainersHandlers=Yotpo.FilterAndSearch.ContainersHandlers||{},Yotpo.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler=function(e){var t,i,o,n={};return n.init=function(){t=e.filterAndSearch.filters_state_manager.aggregators_types,i=e.filterAndSearch.sort_drop_down_most_relevant_value,o=e.filterAndSearch.sorts_drop_down_default_answer},n.onMobileFiltersSubmitted=function(t){var i=this;e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(i);var o=this.filtersManager.getCurrentSubmittedFilters(),n=Object.keys(o);if(e.FilterAndSearch.FiltersHandlers.FilterTagsHandler.removeFiltersTags(this.reviewsContainerElement),n.length>0){var r=this.reviewsContainerElement.querySelector(".yotpo-filter-tag"),s=e.FilterAndSearch.FiltersHandlers.FilterTagsHandler.getFilterTagElements(r,o,n),a=r.parentElement;e.forEach(s,function(t){e.addEventListener(t,"click",function(){e.SearchInProgress.switchMode(i.reviewsContainerElement,!0);var t=e.FilterAndSearch.FiltersHandlers.FilterTagsHandler.parseChosenFilter(this);i.filtersManager.removeFilter(!0,t.type,t.value);var o=this.parentElement.querySelector(".pre-selected:checked");if(o&&(o.removeAttribute("checked"),o.classList.remove("pre-selected")),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(i),this.remove(),i._controller.userSettings.widget_v2.settings.display_star_distribution&&"scores"==this.getAttribute("data-type")){var n=i.element.getElementsByClassName("bottom-line-items-container-mobile")[0].getElementsByClassName("yotpo-distribution-rows");if(n&&n.length>0){var r=new e.StarDistribution(n,i);r.clearAllBars()}}e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyEvent.call(i,t.type,t,i.settings.pid)});var o=a.querySelector(".mobile-filters-modal");a.insertBefore(t,o)})}if(this._controller.userSettings.widget_v2.settings.display_star_distribution&&"star_distribution"!=t){var l=this.element.getElementsByClassName("bottom-line-items-container-mobile"),c=null;if(l&&l.length>0&&(c=l[0].getElementsByClassName("yotpo-distribution-rows")),c&&c.length>0){var d=new e.StarDistribution(c,this);if(n.includes("scores")){var u=o.scores[0],p=5-u;d.mouseClickByIndex(p)}else d.clearAllBars()}}},n.onFreeTextSearchedCallBack=function(n){this.previousTextSearched&&(e.SearchInProgress.switchMode(this.reviewsContainerElement,!0),this.filtersManager.removeFilter(!0,t.free_text_search,this.previousTextSearched)),this.filtersManager.initAggregator(t.sorts);var r;n?(e.SearchInProgress.switchMode(this.reviewsContainerElement,!0),this.filtersManager.addFilter(!0,t.free_text_search,n),this.previousTextSearched=n,r=i):(this.previousTextSearched=null,r=o);var s=this.reviewsContainerElement.querySelector(".sorting");s&&(e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.setDropDownButtonValue(s,i,i),e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.unmarkAnswer(s)),e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyFreeTextSearched.call(this,t.free_text_search,n,this.settings.pid),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(this)},n.onClearTextSearchedCallBack=function(){if(this.previousTextSearched){e.SearchInProgress.switchMode(this.reviewsContainerElement,!0),this.filtersManager.removeFilter(!0,t.free_text_search,this.previousTextSearched),this.previousTextSearched=null;var i=this.reviewsContainerElement.querySelector(".sorting");if(i){var o=i.querySelector("[data-is-default-answer=true]");o&&e.simulateClickEvent(o)}e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyFreeTextSearched.call(this,t.free_text_search,"",this.settings.pid),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(this)}},n.clearAllFilters=function(){e.SearchInProgress.switchMode(this.reviewsContainerElement,!0),this.filtersManager.clearAllFilters(),e.FilterAndSearch.FiltersHandlers.FilterTagsHandler.removeFiltersTags(this.reviewsContainerElement),e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.resetAllDropDowns(this.filtersDropDowns);var t=this.reviewsContainerElement.querySelector(".suggested-topics");if(t){var i=t.querySelectorAll(".active-topic");e.SuggestedTopics.resetSelectedTopic(i)}if(e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(this),e.FreeTextSearch.clearSearchedText.call(this),this.previousTextSearched=null,e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyClearAllEvent.call(this,this.settings.pid),this._controller.userSettings.new_main_widget_layout&&this._controller.userSettings.widget_v2.settings.display_star_distribution){var o=this.element.querySelector(e.isMobile()?".bottom-line-items-container-mobile":".bottom-line-items-container-desktop"),n=o.getElementsByClassName("yotpo-distribution-rows");if(n&&n.length>0){var r=new e.StarDistribution(n,this);r.clearAllBars()}}},n.onSelectFilter=function(i,o,n,r){e.SearchInProgress.switchMode(this.reviewsContainerElement,!0);var s=e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.parseChosenFilter(i,n),a=e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.parseChosenFilter(i,o);if(e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.unmarkAnswer(n),o.setAttribute("aria-selected","true"),n&&n.setAttribute("aria-selected","false"),this.filtersManager.removeFilter(!0,s.type,s.value),a.is_default_answer?(e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.resetDefaultDropDownButtonValue(i),e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.markTextualAnswer(o)):(this.filtersManager.addFilter(!0,a.type,a.value),a.type===t.scores?(e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.markStarsAnswer(o),e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.setDropDownButtonStars(i,o)):e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.markTextualAnswer(o)),e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyEvent.call(this,a.type,a,this.settings.pid),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(this),this._controller.userSettings.widget_v2.settings.display_star_distribution&&"scores"==i.getAttribute("data-type")&&"star_distribution"!=r){var l=Array.prototype.slice.call(i.getElementsByClassName("list-category")),c=l.indexOf(o)-1,d=this.element.getElementsByClassName("yotpo-distribution-rows");if(d&&d.length>0)var u=new e.StarDistribution(d,this);u.mouseClickByIndex(c)}},n.onSelectSort=function(i,o,n){if(e.SearchInProgress.switchMode(this.reviewsContainerElement,!0),n){e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.unmarkAnswer(n);var r=e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.parseChosenFilter(i,n);this.filtersManager.removeFilter(!0,r.type,r.value)}var s=e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.parseChosenFilter(i,o);s.is_default_answer?e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.resetDefaultDropDownButtonValue(i):(this.filtersManager.addFilter(!0,s.type,s.value),e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.markTextualAnswer(o)),e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyEvent.call(this,t.sorts,s,this.settings.pid),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(this)},n.onSubmittedFiltersChange=function(t,i,o,n,r){if(t.settings.page=r.page,t.isFilteredReviews=!0,t.getElement().innerHTML=n,i){var s=new DOMParser,a=s.parseFromString(n,"text/html"),l=a.querySelector(".total-reviews-search").getAttribute("total-reviews-search"),c=i.querySelector(".reviews-amount");c.innerHTML=l+" ",c.innerHTML+=1==l?e.filterAndSearch.single_review_title:e.filterAndSearch.filtered_reviews_title}var d=o.querySelector(".empty-search-results-clear-all-btn");if(d){var u=this;e.addEventListener(d,"click",function(){e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.clearAllFilters.call(u)})}"function"==typeof t.trigger&&(t.trigger("refreshed"),t.trigger("ready"));try{e.currentAnalytics.trackEvent("filter_reviews","filter_results",t.settings.pid,"filter_results",{cta:"filter_results",results_count:parseInt(l),applied_filters:this.filtersManager.states.submitted.toJson(),page_type:e.FilterAndSearch.Analytics.AnalyticsNotifier.getPageType.call(this),filters_state_id:this.analyticsFilterId})}catch(p){e.safeConsole(p.message)}},n.setClearAllButtonsState=function(){for(var t=this.filtersManager.isFiltersExists(),i=0;i .rating-star"),o=0;o .rating-star"),o=0;oo;o++)e.addClass(t[0],"radio-non-selected-color"),e.removeClass(t[0],"radio-selected-star-color")}function i(t){for(var i=0;i0&&t(s),o.value!==n){var a=r.getElementsByClassName("yotpo-icon");i(a)}},r.loadWithCurrentFilters=function(t,i){var n,r;n=t.querySelector(i[o.scores]?"[id^='radio-score-"+i.scores+"']":"[id^='radio-score-all']"),n.click(),r=t.querySelector(i[o.images]?"[id^='radio-images-only']":"[id^='radio-images-all-reviews']"),r&&r.click();var s=t.querySelectorAll('div.mobile-single-filter[name^="radio-question-"]'),a=Array.from(s),l=[];l=e.compact(l.concat(i[o.crfs]).concat(i[o.orders])),e.forEach(l,function(e){if(e.answers.length>0){var i="radio-question-"+e.question_id,o=t.querySelector('[id="'+i+'"]'),n=e.display_answers?e.display_answers[0]:e.answers[0],r=o.querySelector('[id="radio-question-answer-'+n+"-"+e.question_id+'"]');r.click();var s=t.querySelector('div.mobile-single-filter[name="'+r.name+'"]'),l=a.indexOf(s);l>-1&&a.splice(l,1)}});for(var c=0;co;o++){var n=t.pop();n.classList.contains("yotpo-hidden")||n.remove()}},n.parseChosenFilter=function(t){var o=t.getAttribute("data-value"),n=t.getAttribute("data-type");if(n===i.scores)return e.FilterAndSearch.FiltersHandlers.FiltersParser.parseScoresFilter(r,o);if(n===i.images)return e.FilterAndSearch.FiltersHandlers.FiltersParser.parseImagesFilter(r,o);if(n===i.crfs){var r=t.getAttribute("data-question-id");return e.FilterAndSearch.FiltersHandlers.FiltersParser.parseCrfFilter(r,o)}if(n===i.orders){var r=t.getAttribute("data-question-id");return e.FilterAndSearch.FiltersHandlers.FiltersParser.parseOrdersFilter(r,t,o)}},n.getFilterTagElements=function(n,r,s){for(var a=[],l={},c=this,d=0;d=e&&t.callback.call(i)}}}return t.prototype.register=function(t,o){if(t){var n={callback:o};e.addEventListener(t,"mouseenter",function(){n.mouseenterTimeStamp=new Date}),e.addEventListener(t,"mouseleave",i.call(n,this.interval))}},t}(Yotpo),Yotpo.TestingGroupsHandler=function(e){function t(e){this.settings=e||{},this.seoClient=!1,this.initialized=!1}t.prototype.getUserAllocation=function(){return this.userAllocation=this.userAllocation||s(this.settings),this.userAllocation},t.prototype.setSeoClient=function(e){this.seoClient=e},t.prototype.initialize=function(){this.initialized=!0},t.prototype.getTestingGroupsForAnalytics=function(){return a.call(this)?(this.testingGroupParams=this.testingGroupParams||n(e.feature_testing_groups,this.getUserAllocation()),this.testingGroupParams):void 0},t.prototype.getTestingGroupsForServer=function(){return a.call(this)?(this.featureTestingGroups=this.featureTestingGroups||o(e.feature_testing_groups,this.getUserAllocation()),this.featureTestingGroups):void 0};var i=function(e,t){var i={};for(var o in e)if(e.hasOwnProperty(o)){var n=r(e[o],t);n&&(i[n.feature_id]=n.group_id)}return i},o=function(e,t){var o={},n=!1,r=i(e,t);for(var s in r)r.hasOwnProperty(s)&&(n=!0,o["ftg_fi_"+s]=r[s]);return n?o:void 0},n=function(e,t){var o="",n=i(e,t);for(var r in n)n.hasOwnProperty(r)&&(o+="f"+r+"_g"+n[r]+":");return""!=o?"ftg_"+o.substring(0,o.length-1):void 0},r=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){var o=i.split(".."),n=o[0],r=o[1];if(t>n&&r>=t)return e[i]}return null},s=function(t){var i;return t.userSettings.ab_testing&&(i=e.Modules.UserAllocation.getUserAllocation()),i},a=function(){return this.initialized?this.seoClient?!1:!0:(e.safeConsole("TestingGroupsHandler had not yet initialized","error"),!1)};return t}(Yotpo),Yotpo.AddToCart=function(e){function t(o,n,r,s){var a=this;this.element=o,this.analyticsCategory=n,this.analyticsParams=r;for(var l,c=this.element.querySelectorAll(".yotpo-lightbox-product"),d=function(o,l,c){if(l&&c.variants){s(o,!0),c.price&&(o.querySelector(".yotpo-lightbox-product-price").innerHTML=c.price);var d=o.querySelector(".yotpo-lightbox-product-button");e.addEventListener(d,"click",t.prototype.getProductData.bind(this,c,o)),n&&r&&i.call(a,o,n,r,c.variants.length>1)}else s(o,!1)},u=0;l=c[u];u++){e.hide(l.querySelector(".yotpo-lightbox-product-button"));var p=l.querySelector("a").href;e.Modules.Cart.getProductVariants(p,d.bind(a,l))}}function i(e,t,i,n){var r=e.getAttribute("data-product-id"),s={product_id:r,media_id:i.imageId,source:i.source,media_type:i.mediaType,has_variant:n,gallery_id:i.galleryId},a=e.querySelector(".yotpo-lightbox-add-to-cart-button"),l=e.querySelector(".yotpo-variants-popup .yotpo-add-to-cart-button"),c=e.querySelector(".yotpo-variants-popup .yotpo-cancel-add-to-cart");o.call(this,null,null,"add_to_cart",a,s),o.call(this,null,null,"add_to_cart_submit",l,s),o.call(this,null,null,"cancel_submit",c,s)}function o(t,i,o,n,r){var s=this,n=n||t.querySelector(i);n&&e.addEventListener(n,"click",function(){e.currentAnalytics.trackEvent(s.analyticsCategory,"clicked_on",o,null,r)})}return t.load=function(t,i,o,n){return new e.AddToCart(t,i,o,n)},t.prototype.getProductData=function(e,t){e.variants.length>1?this.openVariantsPopup(e,t):this.addProductToCart(e.variants[0].id,t)},t.prototype.addProductToCart=function(t,i,o){var n=this;e.Modules.Cart.addToCart(t,function(t,r){if(t&&r){var s=i.querySelector(".yotpo-add-to-cart-popup");e.AddToCart.ConfirmPopup.open(s,r);var a=i.getAttribute("data-product-id");if(n.analyticsCategory&&n.analyticsParams){var l={product_id:a,media_id:n.analyticsParams.imageId,source:n.analyticsParams.source,media_type:n.analyticsParams.mediaType};e.currentAnalytics.trackEvent(n.analyticsCategory,"shown","add_to_cart_confirmation",null,l)}}o&&o()})},t.ConfirmPopup=function(){function t(t,n){e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!0}),i(t,n.image),o(t,n),this.setCloseButtons(t),this.open()}function i(e,t){e.querySelector(".yotpo-confirm-product-image").setAttribute("src",t)}function o(e,t){e.querySelector(".yotpo-confirm-product-name").innerHTML=t.product_title,t.product_price&&(e.querySelector(".yotpo-confirm-product-price").innerHTML="// "+t.product_price)}return t.prototype=Object.create(e.Modules.PopupWindow.prototype),t.open=function(t,i){return new e.AddToCart.ConfirmPopup(t,i)},t.prototype.setCloseButtons=function(t){var i=t.querySelector(".yotpo-close-pop");e.addEventListener(i,"click",e.Modules.PopupWindow.prototype.close.bind(this));var o=t.querySelector(".yotpo-confirm-continue-shopping");e.addEventListener(o,"click",e.Modules.PopupWindow.prototype.close.bind(this))},t}(),t.prototype.openVariantsPopup=function(t,i){var o=i.querySelector(".yotpo-variants-popup");e.AddToCart.VariantsPopup.open(o,t,this,i)},t.VariantsPopup=function(){function i(t,i,o,n){this.addToCartManager=o,this.eventListeneres=[],this.product=n,e.Modules.PopupWindow.call(this,t,{closeWhenPressedOutside:!0}),m(t,i,i.variants[0].id),y(t,i),E(t,i),f(t,i.image),this.setInputButtons(t,i),d(t,0),this.setCloseButtons(t,i),this.open(),this.setSliderEvents(t)}function o(){return window.innerWidth<1e3}function n(e,t,i,o){var n=e.position;a(n,t,i,o)}function r(e){e.right()}function s(e){e.left()}function a(t,i,o,n){e.removeClass(i,"yotpo-arrow-disable"),e.removeClass(o,"yotpo-arrow-disable"),2==t?e.addClass(i,"yotpo-arrow-disable"):t==n.length-8&&e.addClass(o,"yotpo-arrow-disable"),10>=n&&(e.addClass(i,"yotpo-arrow-disable"),e.addClass(o,"yotpo-arrow-disable"))}function l(e){for(var t={},i=0;in;++n){var r=t[n];r in e||(e[r]={}),e=e[r]}e[t[o]]=i}function d(e,t){for(var i=e.querySelectorAll(".option-container"),o=t;o=0){var a=document.createElement("div"),l=document.createElement("li");l.className="yotpo-icon yotpo-icon-info",a.className="tool-tip-unavailable",a.innerText=e.texts.add_to_cart_item_unavailable,a.insertBefore(l,a.childNodes[0]),r.appendChild(a),document.body.appendChild(r)}else if(!o&&t.querySelector("span").offsetWidth=100)return!1;return!0}function E(t,i){var n=t.querySelector(".yotpo-variants-options");n.innerHTML="";for(var r=0;r8){var m=document.createElement("label");m.className="yotpo-variants-option-first",a.insertBefore(m,a.childNodes[0]);var m=document.createElement("label");m.className="yotpo-variants-option-first",a.insertBefore(m,a.childNodes[0]);var f=document.createElement("div"),y=document.createElement("div");e.addClass(a,"y-slide-left-animations"),e.addClass(a,"y-slider-container"),e.addClass(f,"option-slider"),e.addClass(y,"slider-option"),f.appendChild(a);var b=document.createElement("div");b.className="yotpo-icon yotpo-icon-right-arrow-2 right";var w=document.createElement("div");w.className="yotpo-icon yotpo-icon-right-arrow-2 left",y.appendChild(b),y.appendChild(w),y.appendChild(f),n.appendChild(y)}else n.appendChild(a)}this.variantsObject=l(i),v(t,i,this.variantsObject,this)}function k(e,i,o,n){var r=g(e,i);t.prototype.addProductToCart.call(this,r,o,n)}function x(t,i,o){e.addEventListener(t,i,o),this.eventListeneres.push({element:t,type:i,func:o})}return i.prototype=Object.create(e.Modules.PopupWindow.prototype),i.open=function(t,i,o,n){return new e.AddToCart.VariantsPopup(t,i,o,n)},i.prototype.setSliderEvents=function(t){for(var i=t.querySelectorAll(".slider-option"),l=0;l1&&v(e,t,i.variantsObject,this);var r=g(e,t);if(0!=r){for(var s=0;s0){for(var h=[],m=0;m0){for(var f=[],y=0;y0&&e.currentAnalytics.trackEvent("reviews","loaded","review_image",v);var b=[];for(t=0;u=d[t];t++){var w=d[t].getAttribute("data-image-id");-1==b.indexOf(w)&&b.push(w),function(t){var i=e.getAncestorByClassName(u,"yotpo-review").getAttribute("data-review-id");e.currentInview.registerinModal(u,function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","shown","image",null,{image_id:t,review_id:i})},!0),e.hoverAnalytics.register(u,function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","hovered","image",null,{image_id:t,review_id:i})}),e.addEventListener(u,"click",function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","clicked_on","image",null,{image_id:t,review_id:i})})}(w)}var _,S,C,A,E;if(_=this.getElement().getElementsByClassName("yotpo-review-videos-wrapper"),_&&_.length>0){for(var k=[],m=0;m<_.length;m++)e.isHidden(_[m])||k.push(_[m]);_=k}if(S=this.getElement().getElementsByClassName("video-review"),S&&S.length>0){for(var x=[],y=0;y0&&e.currentAnalytics.trackEvent("reviews","loaded","review_video",I);var P=[];for(t=0;C=S[t];t++){var T=S[t].firstElementChild.getAttribute("data-video-id");-1==P.indexOf(T)&&P.push(T),function(t){var i=e.getAncestorByClassName(C,"yotpo-review").getAttribute("data-review-id");e.currentInview.registerinModal(C,function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","shown","video",null,{video_id:t,review_id:i})},!0),e.hoverAnalytics.register(C,function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","hovered","video",null,{video_id:t,review_id:i})}),e.addEventListener(C,"click",function(){e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","clicked_on","video",null,{video_id:t,review_id:i})})}(T)}var q={images_id:b,count_pictures:b.length,videos_id:P,count_videos:P.length};e.currentAnalytics.trackUniqueEvent("pictures_in_reviews","loaded","media",null,q)}function n(){for(var t,i=["review","question"],o=this._controller.getAppKey(),n=0;t=i[n];n++)for(var r,s=this.getElement().getElementsByClassName("write-first-"+t+"-button"),a=0;r=s[a];a++)e.currentInview.register(r,function(t){return function(){e.currentAnalytics.trackEvent(t+"s","shown","be_the_first_button","onsite_v2",o)}}(t)),e.addEventListener(r,"click",function(t){return function(){e.currentAnalytics.trackEvent(t+"s","clicked_on","be_the_first_button","onsite_v2",o),setTimeout(function(){var i=e.getDocElement().querySelector(".write-"+t+"-wrapper");i.scrollIntoView({behavior:"smooth"})},500)}}(t))}function r(){this.reviewMediaWrappers=this.element.getElementsByClassName(e.isMobile()?"yotpo-review-media-wrapper-mobile":"yotpo-review-media-wrapper-desktop");for(var t=0;t0){var i=this.settings.pid;a.push(i);var s;s=this.element.getElementsByClassName("standalone-bottomline")[0],t.settings.data_source=s.getAttribute("data-source"),l.call(this),e.currentInview.register(t.element,function(){e.currentAnalytics.trackEvent("star_rating","shown",null,i)})}t.getElement().querySelectorAll(".star-clickable").length>0&&e.addEventListener(t.getElement(),"click",function(){e.scrollToReviewsTabInMainWidget(t._controller)})},starDistributionClicked:function(t){var i=this;e.scrollToReviewsTabInMainWidget(i._controller);var o=parseInt(t.getAttribute("data-score-distribution")),n=(e.getMainWidget(i._controller),e.getMainWidget(i._controller).getActiveSource());n.getSettings().star=o,this.getElement().getAttribute("data-demo")&&(n.getSettings().demo=!0),n.getSettings().page=1,e.togglePreLoader(n.getElement()),n.refresh();for(var r=["review-stars","yotpo-sum-reviews","yotpo-star-distribution-graph"],s=0;s .yotpo-field-bars-container > .yotpo-rating-bars, .yotpo-product-related-fields-bars > .yotpo-field-bars-container > .yotpo-size-bars"),n=5;n9&&(o.settings.per_page=9)),o.carouselSpeed=parseInt(o.settings.autoplay_speed||I),o.carouselSpeed=this.carouselReviewsCount?e.hide(this.getElement().querySelector(".carousel-arrows")):e.show(this.getElement().querySelector(".carousel-arrows")))}function n(){return this.autoplay_enabled&&u(this.getCarouselContainerWidth())=0||r.push(l),o(a,l),e.hoverAnalytics.register(a,function(){e.currentAnalytics.trackReview(this,"carousel","hovered")}),e.currentInview.register(a,function(t){return function(){e.currentAnalytics.trackReview(t,"carousel","shown")}}(a))}e.currentAnalytics.trackReviews(r,"carousel","loaded")}function a(e){for(var t=e.querySelectorAll(".carousel-review-title"),i=0;iy&&(t[i].innerHTML=t[i].innerHTML.trim().substring(0,y-3)+"...")}function l(t){function i(i,o,n,r){"icon-yotpo-top-corner"==r?(n-=A,o+=f/2):"icon-yotpo-right-corner"==r?(n+=S,o+=f):(n+=S,o-=E),i.style.left=o+"px",i.style.top=n+"px",e.removeClassList(i,["icon-yotpo-top-corner","icon-yotpo-right-corner","icon-yotpo-left-corner"]),e.addClass(i,r),e.show(t.querySelector(".yotpo-corner"))}var o,n,r=t.querySelector(".carousel-tool-tip");r.querySelector(".tool-tip-header-span").innerHTML=this.reviewTitle,r.querySelector(".tool-tip-content").innerHTML=this.reviewBody;var s=e.getPosition(this),a=e.getPosition(t),l=s.x-a.x,c=s.y-a.y,d=u(t.clientWidth);3==d?(t.querySelector(".yotpo .scroller").getBoundingClientRect().right-this.getBoundingClientRect().rightl&&(l=0),c+=n;var p=t.querySelector(".carousel-tool-tip .yotpo-tool-tip");p.style.left=l+"px",p.style.top=c+"px",i(t.querySelector(".yotpo-corner"),l,c,o),p.style.display="block"}function c(t){var i=this,o=document.createElement("div"),n=this.getElement();return o.className="carousel-read-more",o.innerHTML=n.querySelector(".carousel-read-more-text").getAttribute("data-text"),o.reviewTitle=t.querySelector(".carousel-review-title").getAttribute("full-headline"),o.reviewBody=t.querySelector(".carousel-review-body").fullReview.substring(0,h),o.tabIndex=0,o.setAttribute("aria-labelledby","read-more-tooltip"),o.onmouseover=function(){i.slider.pause(),l.call(this,n)},o.onmouseout=function(){n.querySelector(".carousel-tool-tip .yotpo-tool-tip").style.display="none",e.hide(n.querySelector(".yotpo-corner"))},o.onfocus=function(){i.slider.pause(),l.call(this,n)},o.onblur=function(){var t=n.querySelector(".carousel-tool-tip .yotpo-tool-tip");t&&(t.style.display="none",e.hide(n.querySelector(".yotpo-corner")))},o.onclick=function(e){e.stopPropagation()},o}function d(t){for(var i=0;i=v&&(o[n].innerHTML=o[n].innerHTML.substring(0,v)+"...",o[n].appendChild(c.call(this,t[i])),e.show(this.getElement().querySelector(".yotpo-reviews-carousel .carousel-tool-tip")))}function u(e){var t;return e>=960?t=3:e>=600&&960>e?t=2:600>e&&(t=1),t}function p(){"undefined"!=typeof this.slider&&delete this.slider;var t=this.element.getElementsByClassName("yotpo-carousel")[0],i=this.settings.images_to_display+1,o=this.carouselReviewsCount=c&&u>g?n[g].setAttribute("tabindex",0):n[g].removeAttribute("tabindex")}},pageChanged:function(){var e=this;e.refresh()},sizeCalculated:function(t){if(this.is("initialized")){var i,n,r,s=this.getCarouselContainerWidth(),a=u(s),l=this.getElement();if("undefined"!=typeof this.slider){this.slider.pause(),p.call(this),this.slider.start(),l.style.maxWidth=window.innerWidth-C+"px","yotpo-size-7"===t||"yotpo-size-3"===t?(i="big-version",n="small-version",r=g):(i="small-version",n="big-version",r=m);var c=(s-a*r)/a,d=l.querySelector(".carousel-display-wrapper"),h=l.querySelectorAll(".single-carousel");!this.settings.data_testimonials_page_enabled||"yotpo-size-1"!==t&&"yotpo-size-2"!==t&&"yotpo-size-3"!==t||e.addClass(d,"has-testimonials-link");for(var f=0;f0?"has_reviews":"no_reviews";e.currentAnalytics.trackUniqueEvent("carousel","loaded",v)}}}},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.Embedded=function(e){function t(t,i){var n=this;n.analyticsCategory="embed",n._controller=t,n.element=i,n.sources={},n.settings={per_page:n.element.getAttribute("data-reviews"),view:{type:n.element.getAttribute("data-product-id"),layout:n.element.getAttribute("data-layout"),width:n.element.getAttribute("data-width"),headerText:n.element.getAttribute("data-header-text"),transparency:n.element.getAttribute("data-transparency"),headerBackgroundColor:n.element.getAttribute("data-header-background-color"),bodyBackgroundColor:n.element.getAttribute("data-body-background-color"),fontSize:n.element.getAttribute("data-font-size"),fontColor:n.element.getAttribute("data-font-color")}};for(var r in o)o.hasOwnProperty(r)&&n.on(r,o[r]);e.hoverAnalytics=new e.HoverIntervalEvent({interval:1e3}),e.hoverAnalytics.register(n.element,function(){e.currentAnalytics.trackUniqueEvent(n.analyticsCategory,"hovered")})}function i(){for(var t,i=this,o=i.element.querySelectorAll(".embedded-item-link"),n=0;t=o[n];n++){var r=t.getAttribute("data-widget-type"),s=t.getAttribute("data-product-id");e.addEventListener(t,"click",function(){e.currentAnalytics.trackEvent(i.analyticsCategory,"clicked_on",r,s)})}}var o={};return t.selector=e.widgets.embedded.selector,t.prototype.getMethod=function(){var e=null;return"yotpo_global_reviews"==this.settings.view.type?e="reviews":"top_rated_products"==this.settings.view.type&&(e="products"),"embedded_widget_"+e},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"old"},o={ready:function(){var t=this,o=this.getMethod();t.sources[o]=new e.Widgets.Basic(t._controller,t.getElement(),o),e.copy(t.settings,t.sources[o]),i.call(this),e.Modules.Handle.tooltip.call(this.getElement());var n;"embedded_widget_reviews"==o?n="recent_reviews":"embedded_widget_products"==o&&(n="top_products"),e.currentAnalytics.trackEvent("embed","loaded",n),e.currentInview.register(t.element,function(){e.currentAnalytics.trackEvent("embed","shown",n)})}},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.Main=function(e){function t(t,i){var o=this;o._controller=t,o.element=i,o.sources={},o.query,this.imagesHandler=new e.ImagesHandler(t.appKey,this),o.settings={pid:o.element.getAttribute("data-product-id")};var n=e.getURLParameter(location.search,"yoReviewsPage");n&&Number.isInteger(Number(n))&&(o.settings.page=parseInt(n)),e.getURLParameter(location.search,"yo_intentions")&&(o.settings.force_intentions=e.getURLParameter(location.search,"yo_intentions")),o.element.getAttribute("data-product-tags")&&(o.settings.tags=o.element.getAttribute("data-product-tags"));var r=o._controller.getUserSettings(),s={lang:"locale",demo:"demo",mode:"mode","product-readonly":"product-readonly","write-only":"write-only"};"undefined"!==o.element.getAttribute("data-per_page")&&(s.per_page="per_page");for(var a in s)o.element.getAttribute("data-"+a)&&(o.settings[s[a]]=o.element.getAttribute("data-"+a));var l="undefined"!=typeof r.questions_and_answers_standalone&&r.questions_and_answers_standalone!==!1;if(l||delete o.settings.mode,o.analyticsCategory="reviews",o.isWriteOnly()&&(o.analyticsCategory+="_write_only"),"undefined"!=typeof r.widget_v2&&"undefined"!==r.widget_v2.settings.display_names){var c=e.compact(r.widget_v2.settings.display_names);o.settings.order_metadata_fields={};for(var d in c)o.settings.order_metadata_fields[d]=Object.keys(c[d])}"undefined"!=typeof r.css_preview&&(o.settings.css_preview=r.css_preview);for(var u in T)T.hasOwnProperty(u)&&o.on(u,T[u]);e.hoverAnalytics.register(o.element,function(){e.currentAnalytics.trackUniqueEvent(o.analyticsCategory,"hovered")});var p=o.element.getAttribute("data-prefilter");if(p)try{var g=JSON.parse(p);void 0!=g.product_properties&&(g.order_product_properties=g.product_properties,delete g.product_properties),void 0!=g.product_custom_properties&&(g.order_product_custom_properties=g.product_custom_properties,delete g.product_custom_properties);var h=[];for(var m in g)for(var f in g[m])h.push({subType:m,question:f,answers:g[m][f]});o.settings.prefilter_fields=JSON.stringify(h)}catch(y){e.safeConsole("Failed to parse prefilter fields settings: "+y,"error")}var v=o.element.getAttribute("data-presorting");if(v)try{var w=JSON.parse(v);w.forEach(function(e){"product_custom_property"==e.type&&(e.type="order_product_custom_property"),"product_property"==e.type&&(e.type="order_product_property")}),o.settings.presorting_fields=JSON.stringify(w)}catch(y){e.safeConsole("Failed to parse presorting fields settings: "+y,"error")}if(e.getURLParameter(location.search,"yo_link_code")){var _=e.getURLParameter(location.search,"yo_link_code");e.ajax("http://api.yotpo.com/go/"+_,function(){e.safeConsole("Called a link")})}b.call(o)}function i(){if("true"===this.element.getAttribute("data-open-submit-review")){var t=this.element.getElementsByClassName("write-review-wrapper")[0];t&&(e.addClass(t,"visible"),t.style.display="block")}}function o(t,i,o){var n=this.element.querySelectorAll('div[data-type="crfs"], mobile-single-filter').length,r=this.element.querySelectorAll('div[data-type="orders"], mobile-single-filter').length,s=this.element.querySelector(".reviews-amount").innerHTML.trim().split(" ")[0],a={met_requirements:!0,desktop_topics_count:t.length,desktop_suggested_topics:o?t:[],mobile_topics_count:i.length,mobile_suggested_topics:o?i:[],custom_fields_count:n,reviews_count:parseInt(s),metadata_fields_count:r,free_text_included:this._controller.userSettings.widget_v2.settings.display_free_text_filters,page_type:e.FilterAndSearch.Analytics.AnalyticsNotifier.getPageType.call(this)};if(o){var l=this.element.getAttribute("data-prefilter"),c=this.element.getAttribute("data-presorting");l&&(a.prefilter=l),c&&(a.presorting=c)}return a}function n(){var t=this.element.querySelector(e.isMobile()?".bottom-line-items-container-mobile":".bottom-line-items-container-desktop"),i=t.getElementsByClassName("yotpo-distribution-rows");i&&i.length>0&&(self.starDistribution=new e.StarDistribution(i,this))}function r(){function t(t,o){i.switchSearchInProgressView(!0),t&&i.filtersManager.removeFilter(!0,k.topics,t.toLowerCase()),o&&i.filtersManager.addFilter(!0,k.topics,o.toLowerCase()),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.setClearAllButtonsState.call(i),e.FilterAndSearch.Analytics.AnalyticsNotifier.notifyEvent.call(i,k.topics,o,i.settings.pid)}var i=this;i.reviewsContainerElement=i.element.querySelector(".yotpo-nav-content"),i.desktopSuggestedTopics=[],i.mobileSuggestedTopics=[];var n=i._controller.userSettings.review_with_pictures;if(i.reviewsWithPicturesEnabled=n&&"1"===n.settings.main_widget_visible,void 0!=i.sources.reviews&&null!=i.reviewsContainerElement&&null!=i.reviewsContainerElement.querySelector(".yotpo-reviews-header")){i.filtersManager=new e.FiltersStateManager(i._controller,"Main",i.sources.reviews.settings),i.settings.presorting_fields&&i.filtersManager.AddSetting("presorting_fields",i.settings.presorting_fields),i.filtersManager.subscribeToFiltersUpdate(i),e.Modules.Handle.desktopDropDown.call(this,e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onSelectSort,i.reviewsContainerElement,"sorting"),i.clearAllButtons=i.getElement().querySelectorAll(".desktop-clear-all-btn, .mobile-clear-filters-btn");for(var r=0;r0){for(var l=0;l0?(t=this.element.getElementsByClassName("yotpo-display-wrapper")[0],i.settings.data_source=t.getAttribute("data-source")):i.settings.data_source="default",e.forEach(["yotpo-reviews","yotpo-questions"],function(t){var n=i.getElement().getElementsByClassName(t)[0];if("undefined"!=typeof n){t=t.split("-")[1],i.sources[t]=new e.Widgets.Basic(i._controller,n,t,i.settings.page),i.sources[t].settings.pid=i.settings.pid,i.settings.demo&&(i.sources[t].settings.demo=i.settings.demo),e.forEach(["locale","mode"],function(e){i.settings[e]&&(i.sources[t].settings[e]=i.settings[e])}),i.sources[t].on("ready",function(){_.call(i);for(var t=this.element.querySelectorAll(".yotpo-video.thumbnail-player"),o=0;o0&&e[0].focus()}})},300)})}})}function d(){var t=this,i=t.getElement().getElementsByClassName("promoted-products-box")[0];"undefined"!=typeof i&&(t.promotedProducts=new e.Widgets.PromotedProducts(t._controller,i),t.promotedProducts.trigger("ready"))}function u(){var t=this,i=t.getElement().getElementsByClassName("yotpo-nav-primary")[0];i&&(t.tabs=new e.Tabs(i),t.tabs.on("changed",function(e){p.call(t,e)}))}function p(t){var i=this,o=i.getActiveSource();e.SearchInProgress.hideSearchInProgress(this.element),o.getElement().innerHTML.trim()||o.refresh();for(var n in i.forms)n!=o.getType()&&i.forms[n].clean();(0!=t.event.clientX||0!=t.event.clientY)&&e.currentAnalytics.trackEvent(o.getType(),"clicked_on","tab");var r=i.getElement().getElementsByClassName("yotpo-nav-dropdown sorting")[0],s=this.getElement().querySelector(".mobile-clear-filters-btn");if(this._controller.userSettings.new_main_widget_layout&&this._controller.userSettings.widget_v2.settings.display_star_distribution)var a=this.element.querySelector(e.isMobile()?".bottom-line-items-container-mobile":".bottom-line-items-container-desktop"),l=a.getElementsByClassName("yotpo-distribution-rows");if("questions"==t.element.dataset.type&&(r&&e.addClass(r,"yotpo-hidden"),s&&e.addClass(s,"yotpo-hidden"),l&&l.length>0)){var c=new e.StarDistribution(l,i);c.disable()}if("reviews"==t.element.dataset.type&&(r&&e.removeClass(r,"yotpo-hidden"),s&&this.filtersManager&&this.filtersManager.isFiltersExists()&&e.removeClass(s,"yotpo-hidden"),l&&l.length>0)){var c=new e.StarDistribution(l,i);c.enable()}}function g(){var t=this.getElement().getElementsByClassName("yotpo-messages");t.length>0&&(this.messages=new e.Messages(t))}function h(){for(var t,i=this,o=i.element.querySelectorAll(".yotpo-thank-you .social-link"),n=0;t=o[n];n++)e.addEventListener(t,"click",function(){var t=this.getAttribute("data-network");e.currentAnalytics.trackEvent(i.analyticsCategory,"clicked_on","share_"+t)});for(var r,s=i.element.querySelectorAll(".yotpo-thank-you .yotpo-icon-cross"),n=0;r=s[n];n++)e.addEventListener(r,"click",function(){e.currentAnalytics.trackEvent(i.analyticsCategory,"clicked_on","close_review_posted")})}function m(){var e=this._controller,t=e.getUserSetting("ads"),i=e.getUserSetting("facebook_ads");t&&i&&"0"!=i.settings.pixel_id&&"0"!=i.settings.init_pixel&&this.settings.pid&&fbq("track","ViewContent",{content_ids:[this.settings.pid],content_type:"product"})}function f(){if(this._controller.userSettings.new_main_widget_layout&&this._controller.userSettings.widget_v2.settings.display_star_distribution)var t=this.element.querySelector(e.isMobile()?".bottom-line-items-container-mobile":".bottom-line-items-container-desktop");else var t=this.getElement().querySelector(".yotpo-bottomline");t&&(e.Modules.Handle.tooltip.call(t),this.bottomline=new e.Widgets.Bottomline(this,t),this.bottomline.trigger("ready"))}function y(){var t=this.getElement().querySelector(".questions");t&&(this.questionsBottomline=new e.Widgets.QuestionsBottomline(this._controller,t),this.questionsBottomline.trigger("ready"))}function v(){window.setInterval(function(){e.currentInview.verifyInview()},1e3)}function b(){var t=this,i="questions"==t.get("settings").mode?"questions_widget":t.analyticsCategory;e.currentInview.register(t.element,function(){e.currentAnalytics.trackEvent(i,"shown"),t.trigger("sizeCalculated")})}function w(){var e=this,t=e.getElement().querySelector(".yotpo-nav .status-bar .current");if(t){var i=e.getActiveSource(),o=i.getElement().querySelector(".yotpo-pager"),n=o?+o.getAttribute("data-per-page"):P;i.on("ready",function(){var e=+(i.settings.page||1),o=(e-1)*n+1,r=o-1+i.getContent().length;i.getTemplate()&&--r,t.innerHTML=o+" - "+r})}}function _(){for(var t=this,i=t.getElement().getElementsByClassName("yotpo-review"),o=[],n=0;n1}function E(e,t,i){for(var o=0,n=e.filtersDropDowns[o];n&&"scores"!==n.element.getAttribute("data-type");)o++,n=e.filtersDropDowns[o];n.currentSelectedItem=t,n.previousSelectedItem=i}var k,x,I,P=10,T={};return t.selector=e.widgets.main.selector,t.prototype.getMethod=function(){return"main_widget"},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.getSource=function(e){return this.sources[e]},t.prototype.getActiveSource=function(){return this.get("tabs")?this.sources[this.get("tabs").getActive().getAttribute("data-type")]:null},t.prototype.getAppKey=function(){return this._controller.getAppKey()},t.prototype.get=function(e){return this[e]},t.prototype.getProductInfo=function(){if("undefined"==typeof this.productInfo){this.productInfo={sku:this.get("settings").pid,product_title:this.getElement().getAttribute("data-name")?e.escapeHtml(this.getElement().getAttribute("data-name")):this.getElement().getAttribute("data-name"),product_description:this.getElement().getAttribute("data-description"),product_url:this.getElement().getAttribute("data-url"),product_image_url:this.getElement().getAttribute("data-image-url"),product_specs:this.getProductSpecs()};var t=this.get("settings").demo;"undefined"!=typeof t&&(this.productInfo.demo=t);for(var i in this.productInfo)this.productInfo.hasOwnProperty(i)&&!this.productInfo[i]&&delete this.productInfo[i]}return this.productInfo},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.isWriteOnly=function(){return"undefined"!=typeof(this.getSettings()||{})["write-only"]},t.prototype.getLayout=function(){return"old"},t.prototype.getProductSpecs=function(){var e,t=this,i=["brand","isbn","mpn","upc"],o={};for(var n in i)e=i[n],t.element.getAttribute("data-product-spec-"+e)&&(o["product_specs["+e+"]"]=t.element.getAttribute("data-product-spec-"+e));var r=[];for(var s in o)r.push(s);return r.length>0?o:null},T={ready:function(){k=e.filterAndSearch.filters_state_manager.aggregators_types,x=e.filterAndSearch.filters_drop_down_default_answer,I=e.filterAndSearch.free_text_search_input_placeholder,e.FilterAndSearch.FiltersHandlers.FilterDropDownsHandler.init(),e.FilterAndSearch.FiltersHandlers.FilterTagsHandler.init(),e.FilterAndSearch.Analytics.AnalyticsNotifier.init.call(this),e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.init();var t=this.element.querySelector(".bottom-line-items-container-desktop"),o=this.element.querySelector(".bottom-line-items-container-mobile");e.isMobile()&&(t&&e.addClass(t,"yotpo-hidden"),o&&e.removeClass(o,"yotpo-hidden")),c.call(this),u.call(this),g.call(this),d.call(this),f.call(this),y.call(this),v.call(this),w.call(this),s.call(this),i.call(this),e.Modules.Handle.write.call(this,"review"),e.Modules.Handle.write.call(this,"question"),e.Modules.Handle.sources.call(this),this._controller.userSettings.new_main_widget_layout?r.call(this):e.Modules.Handle.select.call(this),this._controller.userSettings.new_main_widget_layout&&this._controller.userSettings.widget_v2.settings.display_star_distribution&&!this._controller.userSettings.write_only_widget&&n.call(this),e.Modules.Handle.mobileMenu.call(this),e.Modules.Handle.semiWhiteLabel.call(this),h.call(this),m.call(this)},resize:function(){this.promotedProducts&&this.promotedProducts.trigger("resize")},sizeCalculated:function(e){this.promotedProducts&&this.promotedProducts.trigger("sizeCalculated",{className:e})}},t.prototype.switchSearchInProgressView=function(t){var i=this.element;e.SearchInProgress.switchMode(i,t)},t.prototype.OnSubmittedFiltersChange=function(t,i){try{if("undefined"!=typeof this.sources.reviews.getElement()){var o=this.element.querySelector(".reviews-header");e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onSubmittedFiltersChange.call(this,this.sources.reviews,o,this.reviewsContainerElement,t,i),"reviews"===this.getActiveSource().type&&this.switchSearchInProgressView(!1)}}catch(n){e.safeConsole(n.message)}},t.prototype.changeRatingsFilter=function(t,i,o,n){var r=t.element.querySelectorAll('.filters-dropdown[data-type="scores"]')[0],s=r.getElementsByClassName("list-category")[i+1],a=r.getElementsByClassName("list-category")[o+1];E(t,s,a),r.setAttribute("data-value",s.getAttribute("data-value"));var l=r.querySelectorAll(".selected");l[0].setAttribute("data-selected-key",s.getAttribute("sort-name")),e.addClass(l[0],"non-default-item-selected"),l[0].innerHTML=s.children.length>0?e.getElementText(s.children[0]):"",e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onSelectFilter.call(t,r,s,a,n),e.isMobile()&&e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onMobileFiltersSubmitted.call(t,"star_distribution")},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.PicturesCollage=function(e){function t(t,i){var o=this;o._controller=t,o.element=i,o.analyticsContext={layout:"collage"},o.videoScriptLoaded=!1,this.imagesHandler=new e.ImagesHandler(t.appKey,this),o.settings={demo:i.getAttribute("data-demo"),album_name:w,widget_name:"pictures-collage"},o.pagination={currentPageCursor:{images_offset:0,enlarge_images_offset:0},nextPageCursor:{}};var n=o.element.getAttribute("data-product-id")||o.element.getAttribute("product-id");if(n){o.analyticsCategory="pictures_widget";var r=t.getUserSetting("product_gallery");o.settings.cta=String(r.settings.gallery_cta),o.analyticsContext.album_type="product"}else o.analyticsCategory="dedicated_page",o.analyticsContext.album_type="custom";var s=new e.Modules.GallerySettings,a=s.getGallerySettings(i);Object.assign(o.settings,a),o.pagination.nextPageCursor.images_offset=o.settings.images_offset,o.pagination.nextPageCursor.enlarge_images_offset=o.settings.enlarge_images_offset,s.overrideSettingsFromDiv(o.element,o.settings),o.analyticsContext.gallery_id=o.settings.gallery_id||"none";for(var l in b)b.hasOwnProperty(l)&&o.on(l,b[l])}function i(){this.wrapper=this.element.querySelector(".yotpo-pictures-collage-wrapper"),e.setHoverEnable(this.wrapper),this.container=this.element.querySelector(".yotpo-pictures-gallery-images-wrapper"),this.isLoadMoreButton="button"===this.settings.load_more,o.call(this),f.call(this),this.analyticsTracker=new e.AnalyticsTracker(this.analyticsCategory,this.analyticsContext),this.imagesAnalyticsHandler=new e.ImagesAnalyticsHandler(this.element,this.analyticsTracker),this.brokenImageDescriptors=[],this._controller.userSettings&&this._controller.userSettings.video_support&&(this.videoPlayerLoader=new e.VideoPlayerLoader(this,this._controller.userSettings.video_support.settings),this.videoPlayerLoader.checkAndUpdateIfHasVideo()&&(this.videoScriptLoaded=this.videoPlayerLoader.loadKalturaScript())),u.call(this),n.call(this),this.imagesHandler.loadImages(r,l,a),e.Modules.Event.on("popupClosed",function(){this.endlessScroller&&this.endlessScroller.ignoreLoader(!1)}.bind(this)),e.Flows.UploadButton.initUploadButton(this._controller,this.element,this.settings,this.analyticsContext)}function o(){this.isLoadMoreButton?(this.loader=this.element.querySelector(".yotpo-load-more-button"),this.loadIndicator=this.element.querySelector(".yotpo-image-loader.yotpo-pictures-gallery-fullpage-loader")):this.loader=this.element.querySelector(".yotpo-image-loader.yotpo-pictures-gallery-fullpage-loader")}function n(){var e=this.settings.layout.rows;if(e%2!==0){var t=this.settings.layout.orientation;this.settings.layout.orientation="rtl"===t?"ltr":"rtl"}}function r(t){"none"!==t.settings.load_more&&v.call(t)&&!t.endlessScroller&&(t.endlessScroller=y.call(t),e.removeClass(t.loader,"yotpo-hidden")),s(t)}function s(e){e.imagesHandler.replaceBrokenImages(e.brokenImageDescriptors),e.imagesAnalyticsHandler.bindAnalyticsForloadedImages(e.imageContainers),e.imagesHandler.verifyKalturaLoad(),e.videoPlayerLoader&&!e.videoScriptLoaded&&e.videoPlayerLoader.checkAndUpdateIfHasVideo()&&(e.videoScriptLoaded=e.videoPlayerLoader.loadKalturaScript())}function a(e,t,i){i.imagesHandler.handleMediaAfterLoad(e,t),i.imagesHandler.adjustImageHoverStyle()}function l(e,t){var i={id:t,source:e.imagesHandler.getImageSource(t),url:e.src,errorType:e.errorType,reported:!1};e.brokenImageDescriptors.push(i),f.call(e)}function c(){for(var t=[],i=0;i=1}var b={},w="UGC Gallery",_={small:3,medium:5,large:7};return t.prototype.getMethod=function(){return"PicturesCollage"},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"new"},t.prototype.getActiveSource=function(){return this},t.prototype.refresh=function(){var t=e.getDocElement().querySelectorAll(".yotpo-pictures-gallery-wrapper");t[0].style.opacity=.3,e.Modules.Refresh.perform.call(this)},t.prototype.getImageElements=function(){return this.imageContainers},t.prototype.initLightbox=function(t){var i=this;this.lightboxWrapper=this.element.querySelector(".yotpo-lightbox-wrapper");var o=this.lightboxWrapper.querySelector(".yotpo-lightbox");if(o)for(var n=0;n1&&a&&l,s.settings.per_page=s.settings.layout_settings.mode===I?k*x:s.settings.layout_settings.rows*k;for(var g in A)A.hasOwnProperty(g)&&s.on(g,A[g]);d||t.on("CssReady",function(){this.cssReady=!0,s.cssReadyCalled||i.bind(s)()})}function i(){this.cssReadyCalled=!0;var e=this.imagesHandler.lazyLoadingHandler;!e.loadImagesCalled&&e.loadCallbacks&&e.loadImages(!0)}function o(){this.settings.gid||(this._controller.userSettings.generic_gallery=!1),this.wrapper=this.element.querySelector(".yotpo-pictures-gallery-wrapper"),this.uploadPhotosButton=this.element.querySelector(".yotpo-pictures-gallery-upload-button"),e.setHoverEnable(this.wrapper),this.container=this.element.querySelector(".yotpo-pictures-gallery-images-wrapper"),this.isLoadMoreButton=this._controller.userSettings.generic_gallery?"button"===this.settings.load_more:1===this.settings.layout_settings.load_more_button,n.call(this),w.call(this),this.analyticsTracker=new e.AnalyticsTracker(this.analyticsCategory,this.analyticsContext),this.imagesAnalyticsHandler=new e.ImagesAnalyticsHandler(this.element,this.analyticsTracker),this.brokenImageDescriptors=[],this._controller.userSettings&&this._controller.userSettings.video_support&&(this.videoPlayerLoader=new e.VideoPlayerLoader(this,this._controller.userSettings.video_support.settings),this.videoPlayerLoader.checkAndUpdateIfHasVideo()&&(this.videoScriptLoaded=this.videoPlayerLoader.loadKalturaScript())),d.call(this),this.imagesHandler.loadImages(r,a,h),e.Modules.Event.on("popupClosed",function(){this.endlessScroller&&this.endlessScroller.ignoreLoader(!1)}.bind(this)),e.Flows.UploadButton.initUploadButton(this._controller,this.element,this.settings,this.analyticsContext)}function n(){this.isLoadMoreButton?(this.loader=this.element.querySelector(".yotpo-load-more-button"),this.loadIndicator=this.element.querySelector(".yotpo-image-loader.yotpo-pictures-gallery-fullpage-loader")):this.loader=this.element.querySelector(".yotpo-image-loader.yotpo-pictures-gallery-fullpage-loader")}function r(t){t._controller.userSettings.generic_gallery?"none"!==t.settings.load_more&&_.call(t)&&!t.endlessScroller&&(t.endlessScroller=C.call(t),e.removeClass(t.loader,"yotpo-hidden")):t.settings.layout_settings.mode!==I||c.call(t)!==t.settings.per_page||t.endlessScroller||(t.endlessScroller=C.call(t),e.removeClass(t.loader,"yotpo-hidden")),s(t)}function s(e){e.imagesHandler.replaceBrokenImages(e.brokenImageDescriptors),e.imagesAnalyticsHandler.bindAnalyticsForloadedImages(e.imageContainers),e.imagesHandler.verifyKalturaLoad(),e.videoPlayerLoader&&!e.videoScriptLoaded&&e.videoPlayerLoader.checkAndUpdateIfHasVideo()&&(e.videoScriptLoaded=e.videoPlayerLoader.loadKalturaScript())}function a(e,t){var i={id:t,source:e.imagesHandler.getImageSource(t),url:e.src,errorType:e.errorType,reported:!1};e.brokenImageDescriptors.push(i),e.imagesHandler.removeBrokenImages([t]),w.call(e)}function l(){for(var t=[],i=0;i=this.settings.images_per_row}function S(t){if(this.settings.layout_settings.mode===P){var i=this.element.querySelectorAll(".yotpo-single-image-container"),o=this.element.querySelectorAll(".yotpo-single-image-container.yotpo-hidden"),n=i.length,r=this.settings.layout_settings.rows*E[t],s=n-o.length,a=s>r,l=!a&&n>s;if(a)for(var c=r;s>c;c++)e.addClass(i[c],"yotpo-hidden");else if(l)for(var c=s;r>c&&n>c;c++)e.removeClass(i[c],"yotpo-hidden")}}function C(){return this.isLoadMoreButton?new e.Modules.ButtonEndlessScroll(this.settings.per_page,this._controller,this.loader,m.bind(this),this.loadIndicator):new e.Modules.InviewEndlessScroll(this.settings.per_page,this._controller,this.loader,m.bind(this))}var A={},E={"yotpo-size-7":7,"yotpo-size-6":6,"yotpo-size-5":5,"yotpo-size-4":4,"yotpo-size-3":3,"yotpo-size-2":3,"yotpo-size-1":3},k=7,x=8,I="full_page",P="num_of_rows",T="UGC Gallery";return t.selector=e.widgets["pictures-gallery"].selector,t.prototype.getMethod=function(){return"PicturesGallery"},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"new"},t.prototype.getActiveSource=function(){return this},t.prototype.refresh=function(){var t=e.getDocElement().querySelectorAll(".yotpo-pictures-gallery-wrapper");t[0].style.opacity=.3,e.Modules.Refresh.perform.call(this)},t.prototype.getImageElements=function(){return this.imageContainers},t.prototype.initLightbox=function(t){var i=this;this.lightboxWrapper=this.element.querySelector(".yotpo-lightbox-wrapper");var o=this.lightboxWrapper.querySelector(".yotpo-lightbox");if(o)for(var n=0;n=e?c.small:e>415&&1280>=e?c.medium:c.large}function r(){var e=this.element.offsetWidth;return 415>=e?c.small:c.large}function s(){var e=a.call(this),t=this.element.offsetWidth/u,i=e?Math.ceil(t):Math.floor(t);return Math.max(i,p)}function a(){return this.controller.userSettings&&this.controller.userSettings.pictures_slider&&"1"===String(this.controller.userSettings.pictures_slider.settings.full_width)}var l={},c=Object.freeze({small:"small",medium:"medium",large:"large"}),d={CAROUSEL_1:{constructWidget:function(t,i){return new e.Widgets.Slider(t,i)}},GRID_1:{constructWidget:function(t,i){return new e.Widgets.PicturesGallery(t,i)}},COLLAGE_1:{constructWidget:function(t,i){return new e.Widgets.PicturesCollage(t,i)}}},u=180,p=3,g=new e.Modules.GallerySettings;return l={ready:function(){o.call(this),e.Modules.Handle.select.call(this)}},t.prototype.getLayout=function(){return"new"},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.getElement=function(){return this.element},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.getMethod=function(){return"GenericGallery"},t.prototype.getSettings=function(){return this.settings},t}(Yotpo),Yotpo.Widgets.PicturesWidget=function(e){function t(e,t){var n,r=this;return n=e.userSettings&&e.userSettings.generic_gallery?t.getAttribute("data-layout")||"generic":t.getAttribute("data-layout"),"generic"!==n&&e.on("CssReady",function(){this.cssReady=!0,r.widgetImpl&&!r.widgetImpl.cssReadyCalled&&i.bind(r)()}),this.widgetImpl=o[n].constructWidget(e,t),this.widgetImpl}function i(){this.widgetImpl.cssReadyCalled=!0;var e=this.widgetImpl.imagesHandler||this.widgetImpl.imageHandler;!e.lazyLoadingHandler.loadImagesCalled&&e.lazyLoadingHandler.loadCallbacks&&e.lazyLoadingHandler.loadImages(!0)}var o={carousel:{constructWidget:function(t,i){return new e.Widgets.Slider(t,i)}},full_page:{constructWidget:function(t,i){return new e.Widgets.PicturesGallery(t,i)}},num_of_rows:{constructWidget:function(t,i){return new e.Widgets.PicturesGallery(t,i)}},collage:{constructWidget:function(t,i){return new e.Widgets.PicturesCollage(t,i)}},generic:{constructWidget:function(t,i){return new e.Widgets.GenericGallery(t,i)}}};return t.selector=e.widgets["pictures-widget"].selector,t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.PromotedProducts=function(e){function t(t,i){var n=this;n.analyticsCategory="promoted_products",n._controller=t,n.element=i,n.settings={promoted:!0},n.currentItem=0,n.totalItems=i.getElementsByTagName("li").length,n.scrollBase=i.getElementsByClassName("promoted-products")[0].scrollLeft,n.css_preview=t.userSettings.css_preview,e.supportTouch()&&(e.hide(i.getElementsByClassName("yotpo-pager")[0]),delete o.pageChanged,i.getElementsByClassName("promoted-products")[0].style.overflowX="auto");for(var r in o)o.hasOwnProperty(r)&&n.on(r,o[r])}function i(){var t=this,i="true"===t.getElement().getAttribute("data-is-dummy");e.currentAnalytics.trackUniqueEvent("promoted_products",i?"loaded_dummy":"loaded"),e.currentInview.register(t.element,function(){e.currentAnalytics.trackUniqueEvent("promoted_products",i?"shown_dummy":"shown")}),e.hoverAnalytics.register(t.element,function(){e.currentAnalytics.trackUniqueEvent("promoted_products","hovered")});for(var o=t.getElement().getElementsByClassName("yotpo-promoted-product"),n=[],r=0;r=h+r+l?e.hide(this.getElement()):(e.show(this.getElement(),"block"),n||(n=!0,i.call(o))),o.trigger("resize")}},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.QuestionsBottomline=function(e){function t(e,t){var o=this;o._controller=e,o.element=t,o.settings={pid:t.getAttribute("data-product-id")};for(var n in i)i.hasOwnProperty(n)&&o.on(n,i[n])}var i={};return t.selector=e.widgets["questions-bottomline"].selector,t.prototype.getElement=function(){return this.element},t.prototype.getSettings=function(){return this.settings},t.prototype.getMethod=function(){return"questions_bottomline"},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.refresh=function(){e.Modules.Refresh.perform.call(this)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"old"},i={ready:function(){var t,i=this,o=i._controller.getWidgetsByName("Main"),n=i.getElement().getElementsByClassName("ask-question")[0];if(1==o.length)t=o[0];else for(var r=0;r=t.settings.per_page&&e.removeClass(t.loader,"yotpo-hidden")}function y(){var e=this.settings;e.offset={instagram:this.endlessScroller.per_page*this.endlessScroller.page},e.widget="shoppable_gallery",this.endlessScroller.getNextPage({method:"partial_shoppable_gallery",params:e},v.bind(this))}function v(t){var i=this.element.querySelector(".yotpo-shoppable-single-image-contents"),o=JSON.parse(t)[0].result,n=document.createElement("div");n.insertAdjacentHTML("beforeend",o);var r=n.querySelector(".yotpo-pictures-gallery-images-wrapper"),a=n.querySelector(".yotpo-shoppable-single-image-contents"),l=r.childElementCount;e.appendChildElements(r,this.container),e.appendChildElements(a,i),H.call(this),this.imagesHandler.loadImages(null,m,s.bind(this)),A.call(this),l=t.headerElement.offsetTop?(0===t.headerWrapperElement.offsetTop&&(e.addClass(t.galleryContainer,"yotpo-relative-wrapper"),e.addClass(t.singleViewWrapper,"yotpo-relative-wrapper")),e.addClass(t.headerWrapperElement,"yotpo-fixed-header")):document.body.scrollTop-11;T.call(this),k.call(this,i.imageUrl),this.productsSlider=new e.ShoppableProductsSlider(this._controller,this.analyticsTracker,this.taggedProductsContainer),x.call(this,i.taggedProducts),o||I.call(this,i.taggedProducts[0]),this.displayWrapper.scrollIntoView(),D.call(this,i.taggedProducts,i.imageId)}function k(e){g.call(this);var t=this.singleViewContainer.querySelector(".yotpo-shoppable-image");t.style.opacity="0",t.src=e,t.onload=function(){this.style.opacity="1"}}function x(t){var i=this.singleViewContainer.querySelector(".yotpo-shoppable-title"),o=i.querySelector(".yotpo-clickable-title"),n=this.singleViewContainer.querySelector(".yotpo-shoppable-image"),r=this.settings.star_rating.enabled,s=this.settings.cta.enabled?this.settings.cta.text:{},a=this.settings.promoted_products.enabled;this.productsSlider.showElement(t,r,s,a,this.imageId),o.removeAttribute("href"),e.removeClass(n,"yotpo-clickable"),e.addClass(i,"yotpo-hidden")}function I(t){var i=this,o=this.singleViewContainer.querySelector(".yotpo-shoppable-title"),n=o.querySelector(".yotpo-clickable-title"),r=this.singleViewContainer.querySelector(".yotpo-shoppable-image"),s=t.link;o.querySelector(".yotpo-shoppable-product-image").src=t.imageUrl,o.querySelector(".yotpo-shoppable-product-name").innerHTML=t.name,n.href=s,e.addEventListener(n,"click",function(){i.analyticsTracker.track("clicked_on","shop_now")}),e.addEventListener(r,"click",function(){i.analyticsTracker.track("clicked_on","single_image")}),this.imageClickCallback=e.redirectToUrl.bind(null,s),e.addEventListener(r,"click",this.imageClickCallback),e.addClass(r,"yotpo-clickable"),e.removeClass(o,"yotpo-hidden")}function P(){this.shoppableState=O,this.galleryHeader||e.addClass(this.headerElement,"yotpo-hidden"),q.call(this),this.imageStatsContainer.style.opacity="0",e.addClass(this.singleViewContainer,"yotpo-hidden"),e.removeClass(this.galleryContainer,"yotpo-hidden"),e.hasClass(this.loader,"display-on-gallery-view")&&e.removeClass(this.loader,"yotpo-hidden")}function T(){this.shoppableState=R,this.galleryHeader||e.removeClass(this.headerElement,"yotpo-hidden"),q.call(this),e.hasClass(this.loader,"yotpo-hidden")||(e.addClass(this.loader,"display-on-gallery-view"),e.addClass(this.loader,"yotpo-hidden")),e.addClass(this.galleryContainer,"yotpo-hidden"),e.removeClass(this.singleViewContainer,"yotpo-hidden")}function q(){this.galleryHeader&&(this.shoppableState===O?F.call(this):this.shoppableState===R&&M.call(this))}function F(){var t=this.headerElement.querySelector(".yotpo-shoppable-gallery-header-reviews-wrapper");t&&e.removeClass(t,"yotpo-hidden"),e.show(this.currentShopImageElement),e.removeClass(this.headerElement.querySelector(".yotpo-shoppable-gallery-title"),"yotpo-hidden"),e.addClass(this.backArrow,"yotpo-hidden"),e.addClass(this.headerElement.querySelector(".yotpo-icon-grid"),"yotpo-hidden")}function M(){var t=this.headerElement.querySelector(".yotpo-shoppable-gallery-header-reviews-wrapper");t&&e.addClass(t,"yotpo-hidden"),e.hide(this.currentShopImageElement),e.addClass(this.headerElement.querySelector(".yotpo-shoppable-gallery-title"),"yotpo-hidden"),e.removeClass(this.backArrow,"yotpo-hidden"),e.removeClass(this.headerElement.querySelector(".yotpo-icon-grid"),"yotpo-hidden")}function L(){var e=this.element.querySelector(".yotpo-shoppable-content-"+this.fullScreenImageID),t=e.querySelector(".yotpo-image"),i={};i.imageUrl=t.getAttribute("data-image-url"),i.imageId=t.getAttribute("data-image-id"),i.taggedProducts=[];for(var o=e.querySelectorAll(".yotpo-tagged-product"),n=0;n10&&!this.settings.hide_sales?(e.removeClass(this.imageSalesTextElement,"yotpo-hidden"),e.removeClass(this.imageSalesElement,"yotpo-hidden"),this.imageSalesElement.innerHTML=i.sales):(e.addClass(this.imageSalesTextElement,"yotpo-hidden"),e.addClass(this.imageSalesElement,"yotpo-hidden")),this.imageLikesElement.innerHTML=i.likes,this.imageStatsContainer.style.opacity="1"}.bind(this),r)}var Y={},B=768,O="gallery",R="single_image",U="Shoppable Instagram";return t.selector=e.widgets["shoppable-gallery"].selector,t.prototype.getMethod=function(){return"shoppable_gallery"},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"new"},t.prototype.getImageElements=function(){return this.imageContainers},Y={ready:function(){o.call(this)},resize:function(){u.call(this),this.productsSlider&&this.productsSlider.adjustSize()}},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.ShoppersSay=function(e){function t(t,i){var o=this;o._controller=t,o.element=i,o.settings={},o.moreReviewsClicked=!1;var n,r=o._controller.getUserSetting("shoppers_say");r&&(n=r.settings),o.settings.title=c(o,"data-title",n,"title",!0),o.settings.product_id=c(o,"data-product-id"),o.settings.demo=c(o,"data-demo"),e.isMobile()?o.settings.maximum_reviews_mobile=c(o,"data-maximum-reviews-mobile",n,"max_sentences_mobile",!0):o.settings.maximum_reviews_desktop=c(o,"data-maximum-reviews-desktop",n,"max_sentences_desktop",!0);for(var s in d)d.hasOwnProperty(s)&&o.on(s,d[s])}function i(e){return'"'==e.charAt(0)&&(e=e.substring(1,e.length)),'"'==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),"..."==e.substring(e.length-3,e.length)&&(e=e.substring(0,e.length-3)),e}function o(){var e=this,t=e._controller.getUserSetting("shoppers_say");if(t!==!1){var i=e.element.getElementsByClassName("shoppers-say-display-wrapper");if(i.length){var o=i[0],c=o.getElementsByClassName("more-reviews");s(e,c);var d=o.getElementsByClassName("sentence-wrapper"),u=o.getElementsByClassName("icon-holder");a(e,d),l(e,u),r(o);var p=o.getElementsByClassName("sentence-collapsed");n(e.settings.demo,p)}}}function n(e,t){e&&"true"===e&&t.length>1&&t[1].click()}function r(t){var i=t.getElementsByClassName("single-best-sentence").length,o="true"===t.getAttribute("data-met-requirements"),n=!o||"true"===t.getAttribute("data-is-dummy");e.currentAnalytics.trackEvent("shoppers_say",n?"loaded_dummy":"loaded",null,null,{met_requirements:o,quotes_count:n?"y":i}),e.currentInview.register(t,function(){e.currentAnalytics.trackEvent("shoppers_say",n?"shown_dummy":"shown",null,null,{met_requirements:o,quotes_count:n?"y":i})})}function s(t,i){for(var o=0;o0){var d=i(c[0].textContent);e.currentAnalytics.trackEvent("shoppers_say","clicked_on",null,d)}}var u=l?r:s;e.addClass(o,"yotpo-hidden"),e.Animations.fadeIn(u,1e3),null!==a&&void 0!==a&&e.toggleAttribute(a,"aria-expanded")}},t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.SingleVideo=function(e){function t(e,t){var i=this;i._controller=e,i.element=t,i.settings={};for(var n in o)o.hasOwnProperty(n)&&i.on(n,o[n])}function i(){var e=this.getElement(),t=e.querySelector(".yotpo-video-container"),i=this._controller.appKey;t.onclick=function(){n.playing||n.ready(i,e)}}var o={};t.prototype.getMethod=function(){return"Video"},t.prototype.getSettings=function(){return this.settings},t.selector=e.widgets["single-video"].selector,t.prototype.getElement=function(){return this.element},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"new"},o={ready:function(){var e=this.getElement().querySelector("#video");e&&i.call(this)}};var n={ready:function(e,t){this.container=t,this.appKey=e,this.playing=!1,this.me="_"+Math.random().toString(36).substr(2,9),this.room=new Room({signalServer:"wss://live.yotpo.com/signal/_/",me:this.me,iceServers:[{urls:["stun:stun.lawsroom.com:3478"]},{urls:"turn:stun.lawsroom.com:3478",username:"yiquganchangduan",credential:"tianyahechumizhiyin"},{urls:"turn:stun.lawsroom.com:3478?transport=tcp",username:"yiquganchangduan",credential:"tianyahechumizhiyin"},{urls:"turn:stun.lawsroom.com:3478?transport=udp",username:"yiquganchangduan",credential:"tianyahechumizhiyin"}]}),this.room.on("signal_open",this.signal_open.bind(this)),this.room.on("signal_close",this.signal_close.bind(this)),this.room.on("signal_error",this.signal_error.bind(this)),this.room.on("peer_open",this.peer_open.bind(this)),this.room.on("peer_close",this.peer_close.bind(this)),this.room.on("channel_open",this.channel_open.bind(this)),this.room.on("channel_message",this.channel_message.bind(this)),this.room.on("channel_close",this.channel_close.bind(this)),this.room.on("message_create",this.message_create.bind(this)),this.room.on("message_join",this.message_join.bind(this)),this.room.on("message_leave",this.message_leave.bind(this)),this.room.on("message_notice",this.message_notice.bind(this)),this.room.on("stream_add",this.stream_add.bind(this)),this.room.on("stream_remove",this.stream_remove.bind(this)),this.room["in"]()},signal_open:function(){n.join(this.appKey)},signal_close:function(){},signal_error:function(){},peer_open:function(){},peer_close:function(e){this.removeVideo(e)},channel_open:function(){},channel_message:function(){},channel_close:function(){},message_create:function(){},message_join:function(){},message_leave:function(){this.removeVideos()},message_notice:function(e){"string"==typeof e.Data&&("room_exists"===e.Data&&this.room.join(this.roomId),"room_full"===e.Data)},stream_add:function(e,t){this.addVideo(e,t)},stream_remove:function(e){this.removeVideo(e)},addVideo:function(t,i){var o=this.container.querySelector("#video");o.src=URL.createObjectURL(i),o.play(),this.playing=!0,o.ontimeupdate=function(){var t=parseInt(o.currentTime,10),i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),r=t-3600*i-60*n;10>i&&(i="0"+i),10>n&&(n="0"+n),10>r&&(r="0"+r),e.getDocElement().querySelector(".live-duration").innerHTML=i+":"+n+":"+r}},removeVideo:function(){var e=this.container.querySelector("#video");e.stop()},join:function(e){this.playing||(this.roomId=e,this.room.create(e))},leave:function(){this.room.leave()},send:function(){}};return t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.Slider=function(e){function t(t,o){var n=this;n.analyticsContext={layout:"carousel"},n._controller=t,n.videoScriptLoaded=!1,this.imageHandler=new e.ImagesHandler(t.appKey,this),n.isRTL="rtl"==t.userSettings.direction,n.element=o;var r=t.getUserSetting("pictures_slider");n.settings={widget_name:"slider",product_id:o.getAttribute("data-product-id"),demo:o.getAttribute("data-demo")};var s=new e.Modules.GallerySettings,a=t.getUserSetting("generic_gallery"),l=s.getGallerySettings(n.element); a&&l&&Object.assign(n.settings,l),r&&(n.settings.use_full_width="1"===String(r.settings.full_width),n.settings.auto_play="1"===String(r.settings.auto_slide),n.settings.widget_ref_name="visual_carousel_shop_now",n.settings.title=r.settings.slider_title,n.settings.source=r.settings.slider_source,n.settings.hover=r.settings.slider_hover,n.settings.per_page=r.settings.number_of_images||q,n.settings.sort=r.settings.sort),n.settings.product_id?(n.show_tagged_products=!0,n.analyticsCategory="pictures_widget",n.analyticsContext.album_type="product"):(n.show_tagged_products=!0,n.analyticsCategory="dedicated_page",n.analyticsContext.album_type="custom"),this.gallerySettings=new e.Modules.GallerySettings,this.gallerySettings.overrideSettingsFromDiv(n.element,n.settings),n.analyticsContext.album_id=n.settings.album_id||"none",n.analyticsContext.gallery_id=n.settings.gallery_id||"none",n.analyticsContext.num_of_images_to_display=this.settings.layout.num_of_images_to_display,n.settings.images_to_display=this.calcDisplaySize(o,n.settings.use_full_width);for(var c in L)L.hasOwnProperty(c)&&n.on(c,L[c]);var d=this;t.on("CssReady",function(){this.cssReady=!0,d.cssReadyCalled||i.bind(d)()})}function i(){this.cssReadyCalled=!0;var e=this.imageHandler.lazyLoadingHandler;!e.loadImagesCalled&&e.loadCallbacks&&e.loadImages(!0)}function o(e,t){var i;return i=F>=t?M.LOW_CHOICE_RANGE[e]:M.HIGH_CHOICE_RANGE[e],Math.min(t,i)}function n(e,t){var i=e.offsetWidth/k,o=t?Math.ceil(i):Math.floor(i);return Math.max(o,P)}function r(e,t){for(var i=0;i=this.originalNumOfImages?0:this.displaySize+1}function l(){e.hide(this.querySelector(".yotpo-icon"))}function c(){e.show(this.querySelector(".yotpo-icon"))}function d(){var t=this.leftArrow&&this.rightArrow;if(this.settings.show_arrows_only_on_hover&&t){var i=this.element.querySelector(".arrows-wrapper-left"),o=this.element.querySelector(".arrows-wrapper-right");e.addClass(this.leftArrow,"yotpo-hidden"),e.addClass(this.rightArrow,"yotpo-hidden"),i.style.width=o.style.width=this.element.offsetWidth/this.displaySize/2+"px",e.addEventListener(i,"mouseover",function(){c.call(this)}),e.addEventListener(i,"mouseleave",function(){l.call(this)}),e.addEventListener(o,"mouseover",function(){c.call(this)}),e.addEventListener(o,"mouseleave",function(){l.call(this)})}}function u(){var t=this,i=this.element.querySelector(".yotpo-lightbox-wrapper"),o=this.element.querySelector(".yotpo-lightbox-contents"),n=i.querySelector(".yotpo-lightbox");if(n){var r=s.call(this),a=new e.SliderContentProvider(r,o,this.show_tagged_products,t.analyticsCategory+"_popup",t.settings.gallery_id||"none"),l=new e.AnalyticsTracker(this.analyticsCategory+"_popup",this.analyticsContext);this.lightbox=new e.Widgets.Lightbox(this._controller,n,a,l,i);for(var c=0;c0&&e.imageHandler.replaceBrokenImages(e.brokenImageDescriptors),C.call(e),e.imageHandler.verifyKalturaLoad()}function f(){b.call(this),this.sliderWrapper.style.maxWidth=w.call(this);var t=this.settings.auto_play;this._controller.userSettings.generic_gallery&&(t=this.gallerySettings.getGallerySettings(this.element).layout.auto_slide),this.slide=new e.Modules.Slide(this.container,{imageCount:this.originalNumOfImages,displayWindowCount:this.displaySize,useOffset:this.displaySizeo;++o)this.elements[o].style.width="calc("+t+" - "+i+"px)"}function w(){var t=x;if(!e.isIE8){var i,o=this.elements[0],n="undefined"==typeof this.settings.layout.spacing?5:this.settings.layout.spacing;i=this.settings.num_of_images_to_display?"none":parseInt(e.getComputedStyle(o,"max-width").replace("px",""),10),t=i+n}return t*this.displaySize+"px"}function _(t){var i=this;e.addEventListener(t,"mouseover",function(){i.slide.pause()}),e.addEventListener(t,"mouseout",function(){i.slide.play()})}function S(){var e=this;this.leftArrow&&(this.leftArrow.onclick=function(){e.slide.left()},this.leftArrow.onkeypress=function(){e.slide.left()},_.call(this,this.leftArrow)),this.rightArrow&&(this.rightArrow.onclick=function(){e.slide.right()},this.rightArrow.onkeypress=function(){e.slide.right()},_.call(this,this.rightArrow));for(var t=0;t=i&&o>n?t[n].setAttribute("tabindex",0):t[n].removeAttribute("tabindex")}var k=180,x=185,I=5e3,P=3,T="data-image-id",q=56,F=6,M={LOW_CHOICE_RANGE:{small:2,medium:4,large:9},HIGH_CHOICE_RANGE:{small:3,medium:5,large:9}},L={};return t.selector=e.widgets.slider.selector,t.prototype.getMethod=function(){return"Slider"},t.prototype.getSettings=function(){return this.settings},t.prototype.getElement=function(){return this.element},t.prototype.on=function(t,i){e.Modules.Event.on.call(this,t,i)},t.prototype.trigger=function(t,i){e.Modules.Event.trigger.call(this,t,i)},t.prototype.state=function(t){return e.Modules.Helper.state.call(this,t)},t.prototype.is=function(t){return e.Modules.Helper.is.call(this,t)},t.prototype.getLayout=function(){return"new"},t.prototype.getImageElements=function(){return this.elements},t.prototype.calcDisplaySize=function(e,t,i){var r=this.settings.layout.num_of_images_to_display;return i&&r?o(i,r):n(e,t)},L={ready:function(){p.call(this),E.call(this)}},t}(Yotpo),Yotpo.Widgets.VisualCarousel=function(e){function t(t,o){var n=56,r="UGC Gallery";e.Widgets.Slider.call(this,t,o),this.getMethod=function(){return"VisualCarousel"},this.analyticsCategory="dedicated_page",self.analyticsContext={layout:"carousel"};var s=t.getUserSetting("visual_carousel");this.settings.widget_name="visual_carousel",this.settings.album_name=r,s&&(this.settings.auto_play="1"===String(s.settings.auto_slide),this.settings.title=s.settings.slider_title,this.settings.cta_text=s.settings.cta_text,this.settings.cta_color=s.settings.cta_color,this.settings.source=s.settings.slider_source,this.settings.css_settings_class="yotpo-visual-carousel",this.settings.widget_ref_name="visual_carousel_shop_now",this.settings.use_full_width="1"===String(s.settings.full_width),this.settings.per_page=s.settings.number_of_images||n,this.settings.sort=s.settings.sort);var a=new e.Modules.GallerySettings;a.overrideSettingsFromDiv(this.element,this.settings),self.analyticsContext.album_id=this.settings.album_id||"none",self.analyticsContext.album_type="custom",this.show_tagged_products=!0,this.settings.images_to_display=this.calcDisplaySize(o,this.settings.use_full_width);var l=this;t.on("CssReady",function(){this.cssReady=!0,l.cssReadyCalled||i.bind(l)()})}function i(){this.cssReadyCalled=!0;var e=this.imageHandler.lazyLoadingHandler;!e.loadImagesCalled&&e.loadCallbacks&&e.loadImages(!0)}return t.prototype=e.Widgets.Slider.prototype,t.selector=".yotpo.yotpo-visual-carousel",t}(Yotpo),Yotpo.Widgets=Yotpo.Widgets||{},Yotpo.Widgets.Testimonials=function(e){function t(t,o){var n=this;n.analyticsCategory="tab",n._controller=t,n.element=o||i(),n.sources={},n.settings={},n.firstElementId="testimonials-modal-dialog-starts",n.lastElementId="testimonials-modal-dialog-ends",this.imagesHandler=new e.ImagesHandler(t.appKey,this),"yotpo-testimonials-custom-tab"==n.element.id?(n.settings.per_page=10,n.settings.type="testimonials_custom_tab",delete b.resize,n.analyticsCategory="reviews_dedicated_page"):n.settings.type="testimonials",t.getWidgetByName("Main")&&t.getWidgetByName("Main").getSettings().tags&&(n.settings.tags=t.getWidgetByName("Main").getSettings().tags),n.element.getAttribute("data-product-readonly")?n.settings["data-product-readonly"]=!0:t.getWidgetByName("Main")&&t.getWidgetByName("Main").getSettings()["product-readonly"]&&(n.settings["data-product-readonly"]=!0),t.getWidgetByName("ShoppableGallery")&&t.getWidgetByName("ShoppableGallery").getSettings().yotpo_hosted_page&&(n.settings["hidden-widget"]=!0);var r="undefined"!=typeof t.getUserSetting("testimonials")?t.getUserSetting("testimonials").settings:null,s=r&&("both"==r.show_tab?r.default_tab:r.show_tab);if("product_tab"==s){var a=t.getWidgetByName("Main");null!=a&&(n.settings.pid=a.getSettings().pid)}for(var l in b)b.hasOwnProperty(l)&&n.on(l,b[l])}function i(){var e=document.createElement("div");return e.className="yotpo testimonials",document.body.appendChild(e),e}function o(){var t=this,i=t.getElement().getElementsByClassName("yotpo-testimonials-btn")[0],o=t.getElement().getElementsByClassName("close")[0];t.button=i,t.content=e.getDocElement().querySelector("#"+i.getAttribute("href").substring(1));var n=function(){return e.currentAnalytics.trackUniqueEvent("tab","clicked_on"),t.open(),!1},r=function(){return t.close(),"undefined"!=typeof t.get("form")&&t.get("form").clean(),!1};i.onclick=n,e.mouseClickOnEnterKeyDown(i),o.onclick=r,e.mouseClickOnEnterKeyDown(o),e.loopKeyboardTabs(t.firstElementId,t.lastElementId);var s=t.content.getElementsByClassName("yotpo-modal-mask")[0];s&&(s.onclick=o.onclick)}function n(){var t=this;t.tabs=new e.Tabs(t.getElement().getElementsByClassName("yotpo-nav")[0]),t.tabs.on("changed",function(e){l.call(t,e)})}function r(){var t=e.getDocElement().querySelector("#testimonials-tab-product"),i=e.getDocElement().querySelector("#testimonials-tab-site");t&&e.onKeyDown(t,function(){i&&i.focus()},[e.keyCodes.right,e.keyCodes.left]),i&&e.onKeyDown(i,function(){t&&t.focus()},[e.keyCodes.right,e.keyCodes.left])}function s(){for(var t=this,i=t._controller.getWidgetByName("Main"),o=t.tabs.getTabs(),n=0;nn&&"horizontal"!=i)&&e.addClass(t.button,"use-image")}o(t.button,i),e.addEventListener(window,"resize",function(){o(t.button,i)})}function d(){var t=this.getElement().getElementsByClassName("yotpo-messages");t.length>0&&(this.messages=new e.Messages(t))}function u(){for(var t,i=this,o=i.getElement().getElementsByClassName("product-link"),n=0;t=o[n];n++)e.addEventListener(t,"click",function(){var t=this.getAttribute("data-product-id");e.currentAnalytics.trackEvent("reviews","clicked_on","product_name",t)})}function p(t){var i,o=this;i="tab"==o.analyticsCategory?o.analyticsCategory+"_popup":o.analyticsCategory;var n=[];t.reviewsContainerElement&&(n=t.reviewsContainerElement.querySelectorAll(".yotpo-review"));for(var r=[],s=0;s0?"has_reviews":"no_reviews";e.currentAnalytics.trackUniqueEvent(o.analyticsCategory,"loaded",u),e.currentAnalytics.trackUniqueEvent(o.analyticsCategory,"shown"),e.hoverAnalytics.register(o.element,function(){e.currentAnalytics.trackUniqueEvent(o.analyticsCategory,"hovered")})}function g(){var t=this;for(var i in t.sources)if(-1!==i.search("basic")){var o=t.sources[i];e.Modules.Handle.desktopDropDown.call(o,e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onSelectSort,o.reviewsContainerElement,"sorting"),e.Modules.Handle.desktopDropDown.call(o,e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onSelectFilter,o.reviewsContainerElement,"filters-dropdown"),o.filtersManager=new e.FiltersStateManager(t._controller,"Testimonials",o.settings),o.filtersManager.subscribeToFiltersUpdate(t),o.mobileFiltersModal=new e.MobileFilterModal(o,o.reviewsContainerElement,e.FilterAndSearch.ContainersHandlers.ReviewsFiltersHandler.onMobileFiltersSubmitted);var n=Array.from(o.reviewsContainerElement.querySelectorAll(".desktop-clear-all-btn"));o.mobileClearFiltersBtnElem&&n.push(o.mobileClearFiltersBtnElem),o.clearAllButtons=n;for(var r=0;r0&&(e.getElementsByClassName("yotpo-modal-body")[0].style.height=s+"px")}},t}(Yotpo);var getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia,RTCSessionDescription=window.RTCSessionDescription||window.mozRTCSessionDescription,RTCPeerConnection=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,RTCIceCandidate=window.RTCIceCandidate||window.mozRTCIceCandidate;Room.prototype.on=function(e,t){this.handles[e]=t},Room.prototype["in"]=function(){this.signal=new WebSocket(this.signalServer+encodeURIComponent(this.me)),this.signal.onopen=this._signal_open.bind(this),this.signal.onclose=this._signal_close.bind(this),this.signal.onerror=this._signal_error.bind(this),this.signal.onmessage=this._signal_message.bind(this)},Room.prototype._signal_open=function(e){"function"==typeof this.handles.signal_open&&this.handles.signal_open(e)},Room.prototype._signal_close=function(e){this._clean(),"function"==typeof this.handles.signal_close&&this.handles.signal_close(e)},Room.prototype._signal_error=function(e){this._clean(),"function"==typeof this.handles.signal_error&&this.handles.signal_error(e)},Room.prototype._signalSend=function(e){this.signal.send(JSON.stringify(e))},Room.prototype._clean=function(){this.id=void 0,this.stream=void 0;for(var e in this.peers)this.peers[e].c.close(),delete this.peers[e];for(var e in this.channels)"open"===this.channels[e].readyState&&this.channels[e].close(),delete this.channels[e]},Room.prototype._newPeerConnection=function(){return new RTCPeerConnection({iceServers:this.iceServers})},Room.prototype.setStream=function(e){this.stream=e},Room.prototype.create=function(e){this._signalSend({For:"create",Room:e})},Room.prototype.join=function(e){this._signalSend({For:"join",Room:e})},Room.prototype.leave=function(){this._signalSend({For:"leave",Room:this.id})},Room.prototype.send=function(e){for(var t in this.channels)"open"===this.channels[t].readyState&&this.channels[t].send(e)},Room.prototype.peersCount=function(){var e=0;for(var t in this.peers)("connected"===this.peers[t].readyState||"completed"===this.peers[t].iceConnectionState)&&e++;return e},Room.prototype.channelsCount=function(){var e=0;for(var t in this.channels)"open"===this.channels[t].readyState&&e++;return e},Room.prototype._signal_message=function(e){var t=JSON.parse(e.data);switch(t.For){case"create":this.id=t.Room,"function"==typeof this.handles.message_create&&this.handles.message_create(t);break;case"join":this.id=t.Room,"function"==typeof this.handles.message_join&&this.handles.message_join(t);break;case"join_older":this._join_older(t);break;case"join_newer":this._join_newer(t);break;case"leave":this._clean(),"function"==typeof this.handles.message_leave&&this.handles.message_leave(t);break;case"icecandidate":this.peers[t.From].hasRSDP?this.peers[t.From].c.addIceCandidate(new RTCIceCandidate(t.Data)):this.peers[t.From].candidates.push(t.Data);break;case"offer":var i=this;i.peers[t.From].c.setRemoteDescription(new RTCSessionDescription(t.Data),function(){for(i.peers[t.From].hasRSDP=!0;;){var e=i.peers[t.From].candidates.shift();if(!e)break;i.peers[t.From].c.addIceCandidate(new RTCIceCandidate(e))}i.peers[t.From].c.createAnswer(function(e){i.peers[t.From].c.setLocalDescription(e,function(){i._signalSend({Room:i.id,From:i.me,To:t.From,For:"answer",Data:e})},function(){})},function(){})},function(){});break;case"answer":var i=this;i.peers[t.From].c.setRemoteDescription(new RTCSessionDescription(t.Data),function(){for(i.peers[t.From].hasRSDP=!0;;){var e=i.peers[t.From].candidates.shift();if(!e)break;i.peers[t.From].c.addIceCandidate(new RTCIceCandidate(e))}},function(){});break;case"notice":"function"==typeof this.handles.message_notice&&this.handles.message_notice(t)}},Room.prototype._join_older=function(e){var t=this,i=t._newPeerConnection();t.peers[e.Data]={c:void 0,hasRSDP:!1,candidates:[]},t.peers[e.Data].c=i,t.stream&&i.addStream(t.stream),i.onaddstream=function(i){"function"==typeof t.handles.stream_add&&t.handles.stream_add(e.Data,i.stream,i)},i.onremovestream=function(i){"function"==typeof t.handles.stream_remove&&t.handles.stream_remove(e.Data,i)},i.onicecandidate=function(i){i.candidate&&t._signalSend({Room:t.id,From:t.me,To:e.Data,For:"icecandidate",Data:i.candidate})};var o=i.createDataChannel(e.Data);o.onopen=function(i){t.channels[e.Data]=o,"function"==typeof t.handles.channel_open&&t.handles.channel_open(e.Data,i)},o.onmessage=function(i){"function"==typeof t.handles.channel_message&&t.handles.channel_message(e.Data,i.data,i)},o.onclose=function(i){"function"==typeof t.handles.channel_close&&t.handles.channel_close(e.Data,i)}},Room.prototype._join_newer=function(e){var t=this,i=t._newPeerConnection();t.peers[e.Data]={c:void 0,hasRSDP:!1,candidates:[]},t.peers[e.Data].c=i,t.stream&&i.addStream(t.stream),i.onaddstream=function(i){"function"==typeof t.handles.stream_add&&t.handles.stream_add(e.Data,i.stream,i)},i.onremovestream=function(i){"function"==typeof t.handles.stream_remove&&t.handles.stream_remove(e.Data,i)},i.onicecandidate=function(i){i.candidate&&t._signalSend({Room:t.id,From:t.me,To:e.Data,For:"icecandidate",Data:i.candidate})},i.oniceconnectionstatechange=function(o){"connected"===i.iceConnectionState&&"function"==typeof t.handles.peer_open&&t.handles.peer_open(e.Data,o),"completed"===i.iceConnectionState&&"function"==typeof t.handles.peer_open&&t.handles.peer_open(e.Data,o),"disconnected"===i.iceConnectionState&&"function"==typeof t.handles.peer_close&&t.handles.peer_close(e.Data,o),"closed"===i.iceConnectionState&&"function"==typeof t.handles.peer_close&&t.handles.peer_close(e.Data,o),"failed"===i.iceConnectionState&&"function"==typeof t.handles.peer_close&&t.handles.peer_close(e.Data,o)},i.onsignalingstatechange=function(){},i.ondatachannel=function(i){var o=i.channel;o.onopen=function(i){t.channels[e.Data]=o,"function"==typeof t.handles.channel_open&&t.handles.channel_open(e.Data,i)},o.onmessage=function(i){"function"==typeof t.handles.channel_message&&t.handles.channel_message(e.Data,i.data,i)},o.onclose=function(i){"function"==typeof t.handles.channel_close&&t.handles.channel_close(e.Data,i)}}}; /** * Load Iovation Fingerprint loader for BV Syndication */ /** * Widget Version * * @type {String} */ Yotpo.version = '2024-09-30_12-52-23'; /** * Yotpo hosts */ Yotpo.hosts = {"widget":{"dynamic":"w2.yotpo.com","static":"staticw2.yotpo.com"},"api":{"dynamic":"api.yotpo.com"},"b2b":{"dynamic":"my.yotpo.com"},"reviews_me":{"dynamic":"reviews.me"},"base":{"dynamic":"yotpo.com"}}; /** * Yotpo mock_test */ Yotpo.mock = false; /** * Max batch methods per request */ Yotpo.maxBatchMethods = 50; /** * Data requests limit */ Yotpo.dataRequestsLimit = 30 /** * All available Yotpo texts and thier translations * * @type {object} - Object of texts and translations */ Yotpo.texts = { read_more: 'Leer más', read_less: 'Leer menos', read_more_about: 'Read more about', read_less_about: 'Read less about', upload_photos_invalid_type: 'Los archivos han de ser de formato JPG, PNG o GIF', upload_photos_invalid_size: 'Tamaño del archivo superior a 15 MB', upload_photos_invalid_image_dimensions: 'Las fotos deben tener al menos 400 x 400 px', upload_photos_invalid_image_file: 'Error while uploading the image', upload_video_error: 'Error al cargar. Por favor, inténtalo de nuevo', upload_video_invalid_type: 'Los archivos deben ser en formato JPG, PNG, GIF, MP4, MOV o FLV', upload_video_invalid_size: 'Tamaño del archivo superior a 2 GB', add_to_cart_item_unavailable: 'Item unavailable', add_to_cart_currently_unavailable: 'Actualmente no está disponible' } Yotpo.filterAndSearch = { min_reviews_for_filters_container: 3, filtered_reviews_title: 'Opiniones', single_review_title: 'Opinión', free_text_search_input_placeholder: 'Buscar en reseñas de clientes', filters_drop_down_default_answer: 'Todas', sorts_drop_down_default_answer: 'Seleccionar', sort_drop_down_most_relevant_value: 'Más relevante', imagesMobileFilterDefaultAnswer: 'Todas Opiniones', images_drop_down_answer: 'Con imágenes y video', rating_tag_title: 'Puntuación', show: 'Mostrar', withImagesOnly: 'Solo imágenes', filters_state_manager: { aggregators_types: { crfs: 'crfs', scores: 'scores', topics: 'topics', images: 'images', sorts: 'sorts', free_text_search: 'free_text_search', orders: 'orders' } }, analytics: { page_types: { main_widget: 1, dedicated_page: 2, testimonials_tab: 3 } } } Yotpo.defaultImages = { size_180: "https://staticw2.yotpo.com/assets/default_image_180px.jpg", size_656: "https://staticw2.yotpo.com/assets/default_image_656px.jpg", profile: "https://staticw2.yotpo.com/assets/default_profile.png" } /** * Share links for all social networks */ Yotpo.socialData = { facebook: { application_id: "226132034107547", feed_link: "https://www.facebook.com/dialog/feed" }, twitter: { intent_link: "https://twitter.com/intent/tweet" }, google: { share_link: "https://plus.google.com/share" }, linkedin: { share_link: "https://www.linkedin.com/shareArticle" } } Yotpo.feature_testing_groups = {} Yotpo.awsS3Domain = "s3.amazonaws.com" Yotpo.kalturaServerUrl = "" Yotpo.yotpoVideoUploaderUrl = 'https://cdn-vms-video-uploader.yotpo.com/vms-video-uploader/master/' + "2024-08-22_15-51-50" + '/yotpo_video_uploader.js' /** * Print a message to the console * * @param message - message to print to log (string) * @param logType - Type of logging to use */ Yotpo.safeConsole = function(message, logType){ }; ////////////////////////////////////////////////// /////////////// Yotpo Initiation ///////////////// ////////////////////////////////////////////////// // NOTE! // Don't declare any functions after this line of code // this is the initialization of the Yotpo instance if (typeof yotpo == 'undefined') { var yotpo = new Yotpo("LB2m3mRUx3LQyYthsAQp8tRfG1D1WQ8OFsi1v4gI", {"account_settings":{"settings":{"customer_language":"es","account_logo":"https://cdn-yotpo-images-production.yotpo.com/Account/329359/49054691/thumb.png?1602759019","domain":"werbikes.mx","name":"WeRbikes","auto_publish":true}},"reviews":false,"testimonials":{"settings":{"default_tab":"site_tab","show_tab":"both","display_free_text_filters":false}},"testimonials_tab":false,"questions_and_answers":false,"questions_and_answers_standalone":false,"vendor_review_creation":false,"language":"es","comments":{"settings":{"comments_visibility":"1"}},"async_create":{"settings":{}},"ads":false,"facebook_ads":false,"show_social_links":false,"host":"static","css_custom_host":null,"direction":"ltr","reporting_end_points":["p.yotpo.com"],"close_button":false,"version":"2024-09-30_12-52-23","prevent_duplicate_reviews":false,"custom_fields_info":{},"widget_rich_snippet":{"settings":{}},"carousel_settings":false,"review_with_pictures":false,"visual_curation":false,"visual_carousel":false,"pictures_slider":false,"pictures_dedicated_page":false,"generic_gallery":false,"product_gallery":false,"shoppable_instagram":false,"load_only_widgets_on_page":false,"load_css_async":false,"ab_testing":false,"cookie_path":false,"upload_photos":false,"upload_videos":false,"video_support":false,"new_main_widget_layout":{"settings":{}},"new_testimonials_widget_layout":false,"shoppers_say":false,"widget_v2":{"settings":{"read_only":"0","redis_cache_expires_in":300,"http_cache_expires_in":10800,"review_per_page":"5","date_format":"%d/%m/%y","reporting_domains":["p.yotpo.com"],"close_button":"0","version":null,"css_custom_host":null,"show_average_rating_digits":true,"display_vote_text":"0","disable_yotpo_logo_hyperlink":"0","display_crf_filters":false,"display_topic_filters":false,"better_performance_effective_date":"2018-07-23","display_free_text_filters":false,"reviews_display_names":{"order_properties":null,"order_custom_properties":null,"order_product_properties":null,"order_product_custom_properties":null,"product_properties":null,"product_specs_properties":null,"customer_properties":null,"customer_custom_properties":null},"display_orders_filters":false,"display_names":{"order_properties":null,"order_custom_properties":null,"order_product_properties":null,"order_product_custom_properties":null,"product_properties":null,"product_specs_properties":null,"customer_properties":null,"customer_custom_properties":null},"fetch_from_elastic":false,"disable_performance_section":true,"use_new_filter_and_search_outbound_service":false,"display_star_distribution":false}},"lightbox_new_design":false,"gallery_customizations":false,"add_to_cart":false,"bv_syndication":false,"disable_social_login":false,"gremlins_dev":{"settings":{"star_distribution":false,"widget_prod_controller":false,"holistic_widget_view_account":false,"reviews_view_service_enabled":false,"reviews_subject_release":false,"voice_search":false,"voice_search_lang":"en-US","reviews_view_orders_metadata":false,"reviews_view_bottomline_release":false,"reviews_view_cache_release":true,"macaroon_development_mode":false,"promoted_products_bottom_lines":false}},"grid_layout":false,"carousel_layout":false,"collage_layout":false,"widgets_data_requests":{"settings":{}},"disable_shopper_side_cookies":false}); Yotpo.ready(function() { yotpo.init(); }); } yotpo.v2YotpoLoaded=true;if(typeof yotpoWidgetsContainer!=='undefined'&&yotpoWidgetsContainer.yotpoV3&&yotpoWidgetsContainer.yotpoV3.performV3Logic){Yotpo.ready(function(){yotpoWidgetsContainer.yotpoV3.performV3Logic();})}