]*)\/>/gi,$t=/")):void 0},i=function(e,t){var n,i,r,a,o;return n=e.height()||240,i=e.closest(".jdgm-rev__vids").width()||360,o=Math.min(1.5*n,i),r=jdgmSettings.mute_video_by_default?"muted":"",a="",e.find(".jdgm-vid-player__wrapper").html(a).removeClass("jdgm--loading")},a=function(t){var n;return n=jdgmSettings.remove_judgeme_branding?"":"Powered by Judge.me",t.magnificPopup({type:"image",image:{cursor:null},tLoading:"",gallery:{enabled:!0,preload:[1,10],tCounter:""+n+" %curr% / %total%"},zoom:{enabled:!0,duration:200},callbacks:{open:function(){return e("body").addClass("jm-mfp-is-open")},close:function(){return e("body").removeClass("jm-mfp-is-open")}}})},r=function(t){return t.unveil(200,function(){return e(this).parent(".jdgm-rev__pic-link").removeClass("jdgm--loading")}),setTimeout(function(){return jdgm.ScrollEvent.trigger("unveil")})},e(document).on("click",".jm-mfp-rotate-btn",function(){var t,n;return t=e(".jm-mfp-figure .jm-mfp-img"),n=parseInt(e(this).data("rotation"))+parseInt(t.data("rotation")||0),t.data("rotation",n),t.css("transform","rotate("+n+"deg)")}),jdgm.setupMediaGallery(e(".jdgm-rev"))}),jdgm.$(window).on("load",function(){return jdgmSettings.preloadPictures?jdgm.$(".jdgm-rev__pic-link").slice(0,10).each(function(e,t){return jdgm.preload(jdgm.$(t).data("mfp-src"))}):void 0})}.call(this),function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};jdgm.$(function(t){var n,i,r,a,o,s,d,u;return r=".jdgm-all-reviews-widget",o="https://judge.me/reviews/all_reviews_js_based",i=t(r),n=i.find(".jdgm-all-reviews__header"),u=function(){var e,i,r,a;return a=n.data("number-of-reviews"),i=n.data("average-rating"),e=t(".jdgm-all-reviews__summary-text"),a?(r=jdgmSettings.widget_summary_text.replace("{{ average_rating }}",i).replace("{{ number_of_reviews }}",a),r=r.replace("{{ average_rating_1_decimal }}",Math.round(10*i)/10),r=jdgm.pluralizeLongText(r,a),e.text(r)):e.text(jdgmSettings.widget_no_review_text)},s=function(){var e;return jdgmSettings.remove_judgeme_branding?void 0:(e="Powered by Judge.me",t(e).appendTo(r))},d=function(){var e;if("button_click"===jdgmSettings.all_reviews_page_load_reviews_on)return e=""+jdgmSettings.all_reviews_page_load_more_text+"
",t(e).appendTo(r)},a=function(){function a(){this._openTabCallback=e(this._openTabCallback,this),this._filterAndSortSuccessCB=e(this._filterAndSortSuccessCB,this),this._filterAndSortBeforeCB=e(this._filterAndSortBeforeCB,this),this.currentTabKey=jdgmSettings.widget_first_sub_tab||"product-reviews",this.defaultTabKey=jdgmSettings.widget_first_sub_tab||"product-reviews",this.$productReviewsList=t(".jdgm-all-reviews__body"),this.$shopReviewsList=t(".jdgm-shop-reviews__body")}var s;return s=1e4,a.prototype.setup=function(){return this._setupSubtab(),this._renderFooterSpinner(),this._setupLoadingReviews(),this._setupFilterAndSort(),this._setupSearch()},a.prototype._renderFooterSpinner=function(){return t("").appendTo(r)},a.prototype._setupLoadingReviews=function(){return"scroll"===jdgmSettings.all_reviews_page_load_reviews_on?this._setupScrollEvent():this._setupMoreReviewsButton()},a.prototype._setupScrollEvent=function(){return jdgm.ScrollEvent.attach(function(e){return function(){return!e._isScrollAtBottom()||e._isLoading()||e._currentOpenRevsList().data("all-reviews-loaded")?void 0:e._sendRequestToFetchAllJsReviews(e.currentTabKey,e._currentOpenRevsList())}}(this))},a.prototype._setupMoreReviewsButton=function(){return this._flagIsLoading(this._currentOpenRevsList(),!1),t(document).on("click",".jdgm-all-reviews-page__load-more",function(e){return function(){return e._sendRequestToFetchAllJsReviews(e.currentTabKey,e._currentOpenRevsList())}}(this))},a.prototype._filterAndSortBeforeCB=function(){return this._sendRequestToRefetchReviews("shop-reviews",this.$shopReviewsList),this._flagIsLoading(this.$productReviewsList,!0),this._flagIsLoading(this.$shopReviewsList,!0),this.$productReviewsList.slideUp(300),this.$shopReviewsList.slideUp(300)},a.prototype._filterAndSortSuccessCB=function(e){return this.$productReviewsList.data("all-reviews-loaded",!1).data("current-page",1),this.$shopReviewsList.data("all-reviews-loaded",!1).data("current-page",1),this.$productReviewsList.empty(),this._appendMoreReviews(this.$productReviewsList,e.html),this._fixReviewsCountAfterFiltering(e),this._flagIsLoading(this.$productReviewsList,!1),this._currentOpenRevsList().show(),jdgm.triggerEvent("filteredInAllReviewsPage",{$reviewsList:this._currentOpenRevsList()})},a.prototype._fixReviewsCountAfterFiltering=function(e){return t(".jdgm-subtab__name[data-tabname=product-reviews] .jdgm-subtab__count").text(e.number_of_product_reviews),t(".jdgm-subtab__name[data-tabname=shop-reviews] .jdgm-subtab__count").text(e.number_of_shop_reviews)},a.prototype._setupFilterAndSort=function(){return i.data("url",o),jdgm._setupSortAndFilterFor(i,this._filterAndSortBeforeCB,this._filterAndSortSuccessCB)},a.prototype._setupSearch=function(){return this._addSearchBar(),jdgm.setupSearch(i,this._filterAndSortBeforeCB,this._filterAndSortSuccessCB,function(){return jdgm.ajaxParamsFor(i)})},a.prototype._addSearchBar=function(){return t(".jdgm-all-reviews__summary").after(jdgm.widgetActionsWrapper(n.data("number-of-reviews"))),n.find(".jdgm-widget-actions-wrapper").append(n.find(".jdgm-write-rev-link").detach())},a.prototype._sendRequestToFetchAllJsReviews=function(e,n){return this._flagIsLoading(n,!0),t.ajax({url:o,method:"GET",data:t.extend(jdgm.ajaxParamsFor(i),{page:(n.data("current-page")||1)+1,review_type:e}),success:function(e){return function(t){return e._appendMoreReviews(n,t.html),t.html||n.data("all-reviews-loaded",!0),n.data("current-page",parseInt(t.page))}}(this),complete:function(e){return function(){return e._flagIsLoading(n,!1)}}(this)})},a.prototype._setupSubtab=function(){var e;return this.shopReviewsCount=n.data("number-of-shop-reviews")||0,this.productReviewsCount=n.data("number-of-product-reviews")||0,"shop-reviews"===this.defaultTabKey&&this.productReviewsCount<=0||"product-reviews"===this.defaultTabKey&&this.shopReviewsCount<=0?void 0:(e=jdgm._renderAllRevsSubtab(this.shopReviewsCount,this.productReviewsCount),e.insertAfter(n),e.data("open-tab-callback",this._openTabCallback))},a.prototype._openTabCallback=function(e){return this.currentTabKey=e,this.$productReviewsList.toggle("product-reviews"===e),this.$shopReviewsList.toggle("shop-reviews"===e),e!==this.defaultTabKey&&this._fetchShopReviewsFirstTime(i),jdgm.triggerEvent("openedTabInAllReviewsPage",{$reviewsList:this._currentOpenRevsList()})},a.prototype._fetchShopReviewsFirstTime=function(){var e,t;if(!this.firstTimeLoadedShopReviews)return this.firstTimeLoadedShopReviews=!0,e={"product-reviews":this.productReviewsCount,"shop-reviews":this.shopReviewsCount},t={"shop-reviews":this.$shopReviewsList,"product-reviews":this.$productReviewsList},e[this._otherReviewsTab()]>0?this._sendRequestToRefetchReviews(this._otherReviewsTab(),t[this._otherReviewsTab()]):void 0
},a.prototype._otherReviewsTab=function(){return"product-reviews"===this.defaultTabKey?"shop-reviews":"product-reviews"},a.prototype._sendRequestToRefetchReviews=function(e,n){return this._flagIsLoading(n,!0),t.ajax({url:o,data:t.extend(jdgm.ajaxParamsFor(i),{review_type:e}),success:function(e){return function(t){return n.empty(),e._appendMoreReviews(n,t.html),e._flagIsLoading(n,!1)}}(this)})},a.prototype._appendMoreReviews=function(e,t){var n;return e.append(t),n=e.find(".jdgm-rev:not(."+jdgm.DONE_SETUP_CLASS+")"),jdgm.triggerEvent("doneAppendMoreReviewsInAllReviewsPage",{$reviews:n}),jdgm.customizeReviews(),jdgm.setupMediaGallery(e)},a.prototype._currentOpenRevsList=function(){return"product-reviews"===this.currentTabKey&&this.$productReviewsList||this.$shopReviewsList},a.prototype._isScrollAtBottom=function(){var e,n,i,r;return n=t(window),e=this._currentOpenRevsList(),i=e.offset().top+e.height(),r=n.scrollTop()+n.height(),r>i-s},a.prototype._isLoading=function(){return this.$productReviewsList.data("is-loading")||this.$shopReviewsList.data("is-loading")},a.prototype._flagIsLoading=function(e,t){return e.data("is-loading",t),i.find(".jdgm-spinner").toggle(this._isLoading()),i.find(".jdgm-all-reviews-page__load-more-wrapper").toggleClass("jdgm-hidden",t),e.data("all-reviews-loaded")?i.find(".jdgm-all-reviews-page__load-more-wrapper").toggleClass("jdgm-hidden"):void 0},a}(),i.length<=0?void 0:(u(),d(),(new a).setup(),s())})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u,l;return i=".jdgm-carousel",t=".jdgm-carousel-item",n=".jdgm-carousel__item-wrapper",o=function(e,t){return(e%t+t)%t},d=function(t){return s(t),u(t),jdgm.asyncEach(t.find(".jdgm-carousel-item__review"),function(t){return e(t).dotdotdot({watch:!0})},150),t.addClass("jdgm-carousel--done")},s=function(e){return l(e),e.data("current-slide",0).data("slides-count",e.find(t).length)},l=function(e){var i,r;return e.data("vertical-slide")?(i=parseInt(e.find(t).outerHeight(!0)),r=Math.round(e.find(n).outerHeight()/i)):(i=parseInt(e.find(t).outerWidth(!0)),r=Math.round(e.find(n).outerWidth()/i)),e.data("slide-dimension",i).data("slides-per-view",r)},u=function(e){return e.find(".jdgm-carousel__right-arrow").on("click",function(){return jdgm.slideNext(e)}),e.find(".jdgm-carousel__left-arrow").on("click",function(){return jdgm.slidePrev(e)})},r=function(e){var i,r;return i=e.find(t),r=i.css("font-size"),e.find(n).css("font-size",0),i.css("font-size",r)},jdgm.performSliding=function(e,t){var i,r,a,d;return e.data("current-slide")&&e.data("slides-count")&&e.data("slides-per-view")||s(e),i=e.data("current-slide"),r=e.data("slides-count")-e.data("slides-per-view")+1,a=o(i+t,r),d=a*e.data("slide-dimension"),e.data("vertical-slide")?e.find(n).css("transform","translate3d(0px, "+-d+"px, 0px)"):e.find(n).css("transform","translate3d("+-d+"px, 0px, 0px)"),e.data("current-slide",a)},jdgm.slideNext=function(t){return jdgm.performSliding(t||e(i).first(),1)},jdgm.slidePrev=function(t){return jdgm.performSliding(t||e(i).first(),-1)},jdgm.updateCarousel=function(e){return l(e),jdgm.performSliding(e,0)},jdgm.autoSlideCarousel=function(e){var t,n;return n=1e3*(jdgmSettings.featured_carousel_autoslide_interval||jdgmSettings.autoSlideInterval),t=setInterval(function(){return jdgm.performSliding(e,1)},n),e.data("auto-slider",t)},a=function(){return e(".jdgm-carousel-wrapper, .jdgm-carousel-title, .jdgm-all-reviews-rating-wrapper, .jdgm-carousel").addClass("jdgm-hidden")},jdgm.initializeCarousel=function(){return jdgm.asyncEach(e(i),function(t){var n,i;return n=e(t),d(n),i=n.find(".jdgm-carousel-item"),jdgm.customizeCarouselTimestamp(i),!jdgmSettings.carouselNoAutoSlide&&jdgmSettings.featured_carousel_autoslide_interval>0&&jdgm.autoSlideCarousel(n),r(n),0===i.length?a():void 0})},setTimeout(jdgm.initializeCarousel,0),e(window).on("resize",function(){return jdgm.asyncEach(e(i),function(t){return jdgm.updateCarousel(e(t))})})})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u,l,c,m,g,p,f,h,v,_,j,w,b,y,x,S,C;return a=".jdgm-revs-tab .jdgm-rev",i=e(".jdgm-revs-tab"),n=e(".jdgm-revs-tab__wrapper"),t=e(".jdgm-revs-tab__content"),r=e(".jdgm-revs-tab-btn"),l=jdgmSettings.widget_first_sub_tab||"product-reviews",jdgm.showReviewsTab=function(){return n.length>0?(n.addClass("jdgm-show"),e("body").addClass("jdgm-lock-scroll"),jdgm.triggerEvent("doneShowReviewsTab",{$tabModal:n})):void 0},jdgm.hideReviewsTab=function(){return n.removeClass("jdgm-show"),e("body").removeClass("jdgm-lock-scroll")},_=function(n){var i,r;return i=t.find(".jdgm-revs-tab__content-body"),i.length>0?(r=e(n.html).find(".jdgm-revs-tab__content-body").html(),i.html(r)):(r=e(n.html).find(".jdgm-revs-tab__content").html(),t.html(r))},C=function(t){var n,r,a;return n=e(t.html).find(".jdgm-revs-tab__content-header"),a=n.data("number-of-shop-reviews")||0,r=n.data("number-of-product-reviews"),i.find(".jdgm-subtab__name[data-tabname=product-reviews] .jdgm-subtab__count").text(r),i.find(".jdgm-subtab__name[data-tabname=shop-reviews] .jdgm-subtab__count").text(a)},h=function(){return jdgm.customizeReviews(),jdgm.setupMediaGallery(e(".jdgm-revs-tab__reviews"))},d=function(){return e(".jdgm-revs-tab__spinner").show(),e(".jdgm-revs-tab__reviews").slideUp()},u=function(t){return _(t),C(t),h(),e(".jdgm-revs-tab__spinner").hide()},f=function(){return e.extend(jdgm.ajaxParamsFor(i),{review_type:l})},x=function(){return jdgm.setupPaginate(i,d,u,f),jdgm._setupSortAndFilterFor(i,d,u,f)},v=function(){var e,t,n,r;return e=i.find(".jdgm-revs-tab__content-header"),r=e.data("number-of-shop-reviews")||0,n=e.data("number-of-product-reviews"),"shop-reviews"===l&&0>=n||"product-reviews"===l&&0>=r?void 0:(t=jdgm._renderAllRevsSubtab(r,n),t.insertAfter(e),t.data("open-tab-callback",p))},p=function(t){return l!==t?(l=t,d(),e.ajax({url:i.find(".jdgm-paginate").data("url"),data:f(),success:u})):void 0},o=function(){return jdgm.hasBgColor(r)?void 0:(r.css("background-color",jdgmSettings.linkColor),r.css("color",jdgmSettings.bgColor))},w=function(){return o(),"0px"===r.css("padding")?r.css("padding","8px 16px"):void 0},b=function(){return e(document).keydown(function(t){return 27!==t.keyCode||e.magnificPopup.instance.isOpen?void 0:jdgm.hideReviewsTab()})},g=function(){return e(".jdgm-revs-tab__main").prepend(e(".jdgm-revs-tab__header").detach())},j=function(){return e(".jdgm-close-ico").on("click",jdgm.hideReviewsTab),e(".jdgm-revs-tab .jdgm-mask").on("click",jdgm.hideReviewsTab)},m=function(){return e(a).length>0?i.show():void 0},c=function(){return jdgmSettings.floating_tab_button_name&&e(".jdgm-revs-tab-btn").text()!==jdgmSettings.floating_tab_button_name&&e(".jdgm-revs-tab-btn").text(jdgmSettings.floating_tab_button_name),jdgmSettings.floating_tab_title&&e(".jdgm-revs-tab__title").text()!==jdgmSettings.floating_tab_title?e(".jdgm-revs-tab__title").text(jdgmSettings.floating_tab_title):void 0},S=function(){return s(),jdgm.setupSearch(i,d,u,f)},s=function(){var t;return t=e(".jdgm-revs-tab__content-header"),t.prepend(jdgm.widgetActionsWrapper()),t.find(".jdgm-widget-actions-wrapper").append(t.find(".jdgm-write-rev-link").detach()),t.prepend(t.find(".jdgm-review-search").detach())},(y=function(){return m(),b(),g(),w(),v(),x(),j(),c(),S(),r.on("click",jdgm.showReviewsTab)})()})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d;return n=".jdgm-question-form-wrapper",i=".jdgm-review-widget",t=".jdgm-ask-question-btn",jdgm.openQuestionForm=jdgmSettings.openQuestionForm||function(e){return jdgm.closeForm(e),e.find(n).slideDown(),e.find(".jdgm-question-form input[name=reviewer_name]").focus()},jdgm.closeQuestionForm=jdgmSettings.closeQuestionForm||function(e){return e.find(n).slideUp()},jdgm.submitQuestion=function(t){return t.find(".jdgm-submit-question").prop("disabled","disabled"),e.ajax({url:"https://judge.me/api/questions",method:"POST",data:e.extend({},jdgm.shopParams(),jdgm.getQuestionFormData(t)),success:function(){var e;return e=t.closest(i),jdgm.closeQuestionForm(e),jdgm._showSuccessQuestionMsg(e)}})},jdgm.getQuestionFormData=function(e){return{name:e.find("input[name=reviewer_name]").val(),email:e.find("input[name=reviewer_email]").val(),question_content:e.find("textarea[name=question_content]").val(),id:e.closest(i).data("id"),product_title:e.closest(i).data("product-title"),handle:a(e)}},jdgm._showSuccessQuestionMsg=function(t){var i;return i=jdgmSettings.widget_question_submit_success_text,e(""+i+"
").insertBefore(t.find(n)),jdgm.changeToRefreshBtn(t)},r=function(e){return e.find(".jdgm-rev-widg__header").append(jdgm.templates.questionForm())},o=function(t){var n;return n=e(""+jdgmSettings.widget_open_question_form_text+""),n.insertAfter(t.find(".jdgm-write-rev-link"))},s=function(e){var i;return i=e.find(t),i.on("click",function(){var t;return t=e.find(n),t.is(":visible")&&jdgm.closeQuestionForm(e)||jdgm.openQuestionForm(e),!1})},d=function(t){return t.find(n).on("submit",function(t){return t.preventDefault(),jdgm.submitQuestion(e(this))})},a=function(){var e;return e=window.location.pathname.split("/"),e.pop()||e.pop()},jdgm._setupQuestionsForm=function(e){return e.find(n).length>0||!jdgmSettings.enable_question_anwser?void 0:(r(e),o(e),s(e),d(e))},jdgmSettings.enable_question_anwser?jdgm.eachRevWidgets(function(e){return jdgm._setupQuestionsForm(e)}):void 0})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u;return t="",i=".jdgm-quest-widg__body",n=".jdgm-rev-widg__paginate-spinner-wrapper",jdgm.fetchQuestsFirstTime=function(t){var n,i,r,o;return o=t.find(".jdgm-rev-widg").data("number-of-questions")||0,t.data("first-time-quests-load")||0>=o?void 0:(t.data("first-time-quests-load",!0),n=t.find(".jdgm-subtab__name.jdgm--active").data("tabname"),"questions"===n&&u(t),i=t.data("id"),r="api/questions/questions_for_widget","example-product-id"===i&&(r="api/questions/fake_question_widget"),e.ajax({url:"https://judge.me/"+r,data:{product_id:i,shop_domain:jdgm.shopDomain(),platform:jdgmSettings.platform},success:function(e){return a(e,t)}}))},d=function(e){var t,n,i;return t=e.find(".jdgm-rev-widg"),i=t.data("number-of-reviews")||0,n=t.data("number-of-questions")||0,0>=n?void 0:o(e,i,n)},o=function(n,i,a){var o,s;return s=[{key:"reviews",title:jdgmSettings.widget_reviews_subtab_text,count:i},{key:"questions",title:jdgmSettings.widget_questions_subtab_text,count:a}],o=e(jdgm._renderSubtab(s)),o.insertAfter(n.find(".jdgm-rev-widg__header")),o.data("open-tab-callback",function(e){return r(n,e)}),e(t).insertAfter(n.find(".jdgm-rev-widg__body"))},r=function(e,t){return null==t&&(t="reviews"),e.find(".jdgm-rev-widg__body").toggle("reviews"===t),e.find(i).toggle("questions"===t),"questions"===t?jdgm.fetchQuestsFirstTime(e):void 0},a=function(e,t){return t.find(i).html(e.html),jdgm._fixAuthorNameIfFromShop(t),jdgm.customizeQuestions(),t.find(n).hide(),t.find(i).slideDown()},s=function(e){var t,n,r;return n=function(){return{product_id:e.data("id")}},t=function(){return u(e)},r=function(t){return a(t,e)},jdgm.setupPaginate(e.find(i),t,r,n)},u=function(e){return e.find(n).show(),e.find(i).slideUp(),jdgm.scrollTo(e)},jdgmSettings.enable_question_anwser?jdgm.eachRevWidgets(function(e){return d(e),s(e)}):void 0})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u,l;return jdgm.addProductJld=function(t,n){var i,r,a,o;if(!s())return i=e(".jdgm-rev-widg"),a=i.data("number-of-reviews"),o=i.data("average-rating"),t||(t=e("link[rel='canonical']").prop("href")+"#product"),n||(n=e(".jdgm-review-widget").data("product-title")),a>0&&o&&t&&n?(r=document.createElement("script"),r.className="jdgm-aggregate-rating-jld",r.type="application/ld+json",r.text=JSON.stringify({"@context":"http://schema.org","@type":"Product","@id":t,name:n,aggregateRating:{"@type":"AggregateRating",ratingValue:o,reviewCount:a}}),document.querySelector("body").appendChild(r)):void 0},jdgm.addJldToAllReviewsPage=function(t){var n,i,r,a,o;if(!s())return n=e(".jdgm-all-reviews__header"),r=n.data("number-of-reviews"),a=n.data("average-rating"),t||(t=e('meta[property="og:site_name"]').attr("content")||e("title").text()),o=jdgmSettings.allReviewsPageStructuredDataType||"Product",r>0&&a&&t?(i=document.createElement("script"),i.className="jdgm-aggregate-rating-jld",i.type="application/ld+json",i.text=JSON.stringify({"@context":"http://schema.org","@type":o,name:t,aggregateRating:{"@type":"AggregateRating",ratingValue:a,reviewCount:r}}),document.querySelector("body").appendChild(i)):void 0},jdgm.productJldUriId=function(){var e,s,d,u;return u=t().filter(r).filter(i),s=u[0],s?s["@id"]:(e=a(t().filter(n).map(o)),(d=e[0])?d["@id"]:void 0)},d=function(e){return e.aggregateRating&&"Product"===e["@type"]},n=function(e){return!!e["@graph"]},r=function(e){return"Product"===e["@type"]},i=function(e){return!!e["@id"]},o=function(){return function(e){return e["@graph"].filter(r).filter(i)}}(this),a=function(e){return[].concat.apply([],e)},t=function(){return e.map(e('script[type="application/ld+json"]'),function(e){var t;try{return JSON.parse(e.innerText)}catch(n){return t=n,{}}})},s=function(){return t().filter(d).length>0},l=e(".jdgm-rich-snippet.jdgm--old").length<=0,jdgmSettings.jldDisable||jdgmSettings.disable_json_ld||!l||(u=jdgmSettings.jldCanonicalUrl||jdgm.productJldUriId(),jdgm.addProductJld(u,jdgmSettings.jldProductTitle)),jdgmSettings.add_json_ld_snippet_on_all_reviews_page&&l&&jdgm.addJldToAllReviewsPage(jdgmSettings.shopName),jdgmSettings.removeMicrodata||jdgmSettings.remove_microdata_snippet?e(".jdgm-rich-snippet").remove():void 0})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s;return t=".jdgm-rev-widg__paginate-spinner-wrapper",n=".jdgm-rev-widg__body",o=function(e){var t,i,o;return i=function(){return jdgm.ajaxParamsFor(e)},t=function(){return r(e)},o=function(t){return a(t,e)},jdgm.setupPaginate(e.find(n),t,o,i)},a=function(e,i){return i.find(n).html(e.html),jdgm.customizeReviews(),jdgm.setupMediaGallery(i.find(".jdgm-rev-widg__reviews")),i.find(t).hide(),i.find(n).slideDown(),jdgm.scrollTo(i)},r=function(e){return jdgm.openSubtab(e,"reviews"),e.find(t).show(),e.find(n).slideUp(),jdgm.scrollTo(e)},s=function(e){var t,n,i;return n=function(){return jdgm.ajaxParamsFor(e)},t=function(){return r(e)},i=function(t){return a(t,e)},jdgm.setupSearch(e,t,i,n)},i=function(e,t){var n,i,o;return i=function(){return jdgm.ajaxParamsFor(t)},n=function(){return r(t)},o=function(e){return a(e,t)},jdgm.fetchSingleReview(t,e,n,o,i)},jdgm._setupLoadReviewsEventsFor=function(e){return jdgm._setupSortAndFilterFor(e,r,a),o(e),s(e)},jdgm.eachRevWidgets(function(t){return jdgm._setupLoadReviewsEventsFor(t),e.urlParam("judgeme_review_uuid")?setTimeout(function(){return i(e.urlParam("judgeme_review_uuid"),t)},0):void 0})})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u;return n=location.origin+"/products/",t="jdgm-widget jdgm-preview-badge jdgm--from-js",r="jdgm--waiting-for-batch-done",i=3e3,jdgm.batchRenderBadges=function(t){var n;return n=e.map(t,function(e){return u(e.productHandle,e.badgePlaceholder)}),e.when.apply(this,n).then(a(t),function(){return setTimeout(a(t),i)})},jdgm.batchRenderBadgesWithCallback=function(e,t){return jdgmSettings.renderBadge=t,jdgm.batchRenderBadges(e)},jdgm.renderJsBadge=function(n,i,r){var a,o;return o=d(n,i),a=e(r),a.addClass(t).html(o),jdgm.buildStarsFor(a.find(".jdgm-prev-badge__stars"),n),a},u=function(t,i){var a;return a=jdgmSettings.productUrlBuilder&&jdgmSettings.productUrlBuilder({handle:t})||n+t,e.ajax(a).success(function(n){var a;return s(n,i,t),a=e(i),a.find(".jdgm-prev-badge").addClass(r)})},s=function(t,n,i){var r,a,o;return r=e(t).find(".jdgm-rev-widg"),a=r.data("average-rating")||0,o=r.data("number-of-reviews")||0,jdgmSettings.renderBadge?jdgmSettings.renderBadge(a,o,n,i):jdgm.renderJsBadge(a,o,n)},a=function(t){return function(){return jdgm.customizeBadges(),jdgm.asyncEach(t,function(t){return e(t.badgePlaceholder).find(".jdgm-prev-badge").removeClass(r)})}},d=function(e,t){var n;return 0===t?jdgm.templates.emptyBadge():(n=o(t),jdgm.templates.badge({averageRating:e,reviewCount:t,previewBadgeText:n}))},o=function(e){var t;return t=1===e&&" review"||" reviews",e+t}})}.call(this),function(){jdgm.$(function(e){var t;return(t=function(){return jdgm.asyncEach(e(".jdgm-all-reviews-rating"),function(t){return jdgm.buildStarsFor(e(t))})})()})}.call(this),function(){jdgm.$(function(e){var t,n,i,r,a,o,s,d,u;return t="https://cache.judge.me",n=t+"/widgets/"+jdgmSettings.platform+"/"+jdgm.shopDomain(),i="jdgm--waiting-for-batch-done",jdgm.loadBadgesInContainer=function(t,n){var i,a,o,s;return null==t&&(t=document),null==n&&(n=jdgm.PUBLIC_TOKEN),i=e(t),a=i.find(".jdgm-preview-badge"),s={public_token:n},a.length>0&&(o=a.map(function(t,n){return e(n).data("id")}),s.preview_badge_product_ids=o.toArray().join(",")),s.preview_badge_product_ids?u(s,r,a):void 0},jdgm.loadBadgesFromList=function(t,n){var i,r;return null==n&&(n=jdgm.PUBLIC_TOKEN),r={public_token:n},i=e.map(t,function(e){return e.productId}),r.preview_badge_product_ids=i.join(","),r.preview_badge_product_ids?u(r,a,t):void 0},u=function(t,i,r){return e.ajax({url:n,method:"GET",data:t,success:function(e){return i(r,e.preview_badges)}})},a=function(t,n){return jdgm.asyncEach(t,function(t){var r,a,o,s;return o=t.badgePlaceholder,r=e(o),s=t.productId,a=""+n[s]+"
",r.html(a),r.find(".jdgm-prev-badge").addClass(i)}),setTimeout(function(){return o(t)},0)},r=function(t,n){return jdgm.asyncEach(t,function(t){var i;return i=e(t),i.data("added-from-cache-server")?void 0:(i.html(n[i.data("id")]),d(i))}),setTimeout(function(){return s(t)},0)},d=function(e){var t;return e.removeClass(jdgm.DONE_SETUP_CLASS),t=e.find(".jdgm-prev-badge").data("number-of-reviews"),e.toggle(t>0),e.find(".jdgm-prev-badge").addClass(i),e.data("added-from-cache-server",!0)},s=function(e){return jdgm.customizeBadges(),e.find("."+i).removeClass(i)},o=function(t){return jdgm.customizeBadges(),jdgm.asyncEach(t,function(t){return e(t.badgePlaceholder).find(".jdgm-prev-badge").removeClass(i)})}})}.call(this);
\ No newline at end of file