1var rpi=rpi||{}; 2rpi.Time={getFormatTime:function(a,b,d){a=new Date(this._ms(a));var n=d||"en";d=function(q){return 10>q?"0"+q:""+q};var m=a.getHours(),h=((new Intl.DateTimeFormat(n,{day:"numeric",month:"short"})).formatToParts(a).find(function(q){return"month"===q.type})||{}).value;n=(new Intl.DateTimeFormat(n,{day:"numeric",month:"long"})).formatToParts(a).find(function(q){return"month"===q.type}).value;var g=a.getFullYear(),l=String(g).slice(-2),r={yyyy:g,Y:g,yy:l,y:l,MMMM:n,MMM:h,M:h,MM:d(a.getMonth()+1),m:d(a.getMonth()+ 31),dd:d(a.getDate()),d:d(a.getDate()),HH:d(m),H:m,hh:d(m%12||12),h:m%12||12,mm:d(a.getMinutes()),i:d(a.getMinutes()),ss:d(a.getSeconds()),s:d(a.getSeconds()),a:12<=m?"pm":"am",A:12<=m?"PM":"AM"};return b.replace(/(MMMM|MMM|yyyy|HH|hh|MM|mm|dd|ss|yy|H|h|M|m|d|Y|y|i|s|a|A)/g,q=>null!=r[q]?r[q]:q)},getTimeAgo:function(a,b){a=(this._ms(a)-Date.now())/1E3;var d=Math.abs(a);b=new Intl.RelativeTimeFormat(b||"en",{numeric:"auto"});return 60>d?b.format(Math.round(a),"second"):3600>d?b.format(Math.round(a/ 460),"minute"):86400>d?b.format(Math.round(a/3600),"hour"):2592E3>d?b.format(Math.round(a/86400),"day"):31536E3>d?b.format(Math.round(a/2592E3),"month"):b.format(Math.round(a/31536E3),"year")},_ms:function(a){a=parseInt(a,10);return 1E10>a?1E3*a:a}};rpi=rpi||{}; 5rpi.Utils={__:function(a,b){return b&&b[a]||a},isVisible:function(a){let b=window.getComputedStyle(a);return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==b.visibility&&"none"!==b.display},isInViewport:function(a,b=0){a=a.getBoundingClientRect();return a.top<window.innerHeight*(1+b)&&a.bottom>-window.innerHeight*b&&a.left<window.innerWidth*(1+b)&&a.right>-window.innerWidth*b},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"): 6document.body.currentStyle.direction)},getParent:function(a,b="rplg"){b=Array.isArray(b)?b:[b];return a?a.closest("."+b.join(",.")):null},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,b,d){var n=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+b+", height="+d+", top="+((window.innerHeight?window.innerHeight:n.clientHeight?n.clientHeight:screen.height)/2-d/2+(void 0!=window.screenTop?window.screenTop: 7window.screenY))+", left="+((window.innerWidth?window.innerWidth:n.clientWidth?n.clientWidth:screen.width)/2-b/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,b,d,n){const m=new XMLHttpRequest;m.open(b,a,!0);m.setRequestHeader("Content-Type","application/json");m.onreadystatechange=function(){if((m.readyState===XMLHttpRequest.DONE||m.readyState===m.DONE)&&200===m.status){const h=JSON.parse(m.responseText);"function"===typeof n?n(h): 8"function"===typeof d&&d(h)}};m.send(d&&"function"!==typeof d?JSON.stringify(d):null)},anchor:function(a,b,d,n,m){const h=[];d.open_link&&h.push("noopener");d.nofollow_link&&h.push("nofollow");return'<a href="'+a+'"'+(n?' class="'+n+'"':"")+(d.open_link?' target="_blank"':"")+(h.length?' rel="'+h.join(" ")+'"':"")+(m?' aria-label="'+m+'"':"")+">"+b+"</a>"},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},url:function(a){try{return(new URL(a, 9window.location.origin)).href}catch(b){return""}},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{}; 10rpi.Column=function(a,b,d){const n=a.getAttribute("data-id"),m=new RegExp(d.col+"-[xsml]+"),h=new RegExp('$|(\\[data-id="'+n+'"\\]\\s+.'+d.card+"\\s*{\\s*--col:\\s*\\d+\\s*!important\\s*;?(\\s*--gap:\\s*\\d+\\s*!important;?)?})"),g=a.getElementsByClassName(d.cnt)[0];var l=null;return l={init:function(r,q){rpi.Utils.isVisible(g)?(r&&r(),l.resize(),window.addEventListener("resize",l.resize),q&&q(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(l)):setTimeout(l.init,300)},resize:function(){let r= 11l.getSize();g.className=g.className.replace(m,d.col+"-"+r);if(b.breakpoints){let q=g.offsetWidth,c=b.breakpoints.split(",");c.sort(l.brsort);for(let e=0;e<c.length;e++){let k=c[e].split(":");if(q<parseInt(k[0])){l.setCol(k[1]);break}}}return r},getSize:function(){let r=g.offsetWidth;return 510>r?"xs":750>r?"x":1050>r?"s":1450>r?"m":1800>r?"l":"xl"},setCol:function(r){const q=this.getStyle();q.innerHTML=q.innerHTML.replace(h,(n?'[data-id="'+n+'"] ':"")+"."+d.card+"{--col:"+r+"!important;--gap:"+(r- 121)+"!important}")},getCol:function(){let r=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return r&&1<r.length?r[1]:!1},getStyle:function(){let r=document.getElementById("rpi-style");r||(r=document.createElement("style"),r.id="rpi-style",document.head.appendChild(r));return r},setBreakpoints:function(r){b.breakpoints=r},brsort:function(r,q){return parseInt(r.split(":")[0])>parseInt(q.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",l.resize)}}};rpi=rpi||{};rpi.AVA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; 13rpi.Common=function(a,b,d){let n=null;const m=rpi.Utils.lang();
13return n={init(){let h=a.getElementsByClassName(d.time),g=a.getElementsByClassName(d.text);for(const l of h)n.setTime(l);for(const l of g)n.setText(l)},initOnce(h){let g=h.getElementsByClassName(d.time)[0];h=h.getElementsByClassName(d.text)[0];n.setTime(g);n.setText(h)},setText(h){if(h&&h.textContent){var g=n.trimtext(h.textContent);h.textContent=g[0];g[1]&&(h.appendChild(rpi.el({tag:"span",cl:"rpi-s",text:"... "})),h.appendChild(rpi.el({tag:"span", 14cl:d.readmore,text:rpi.Utils.__("read more",b.trans),data:{hidden:g[1]}})),h.lastChild.onclick=n.opentext)}},trimtext(h){const g=parseInt(b.text_size,10);if(!h||!g||h.length<=g)return[h||"",""];h=Array.from(h);let l=h.slice(0,g).join("").lastIndexOf(" ");l=-1===l?g:l;return[h.slice(0,l).join("").trimEnd(),h.slice(l).join("")]},opentext(){let h=this.parentNode,g=this.dataset.hidden||"";rpi.Utils.rm(this.previousElementSibling);rpi.Utils.rm(this);h.appendChild(document.createTextNode(g))},setTime(h){h&& 15(h.textContent=n.time(h.dataset.time))},time(h){return b.time_format?rpi.Time.getFormatTime(h,b.time_format,m):rpi.Time.getTimeAgo(h,m)}}}; 16rpi.el=function(a={},...b){const d=document.createElement("string"===typeof a?a:a.tag||"div");"string"!==typeof a&&(a.id&&(d.id=a.id),a.cl&&d.classList.add(...[].concat(a.cl).join(" ").split(/\s+/).filter(Boolean)),null!=a.text&&(d.textContent=a.text),a.data&&Object.assign(d.dataset,Object.fromEntries(Object.entries(a.data).filter(([,n])=>void 0!==n&&null!==n))),a.style&&(d.style.cssText=a.style),a.atts&&Object.keys(a.atts).forEach(n=>{const m=a.atts[n];null!==m&&void 0!==m&&!1!==m&&d.setAttribute(n, 17m)}),a.html&&(d.innerHTML=a.html),b=a.children?[].concat(a.children).concat(b):b);b.flat().forEach(n=>{n&&d.appendChild(n instanceof Node?n:document.createTextNode(String(n)))});return d};window.brb_vars=window.brb_vars||{ajaxurl:"/wp-admin/admin-ajax.php",gavatar:""};rpi=rpi||{}; 18rpi.View=function(a,b={},d={}){const n=b.id??a.getAttribute("data-id");a.getElementsByClassName("rpi-cnt");const m=a.getElementsByClassName("rpi-header")[0],h=a.getElementsByClassName(d&&d.names&&d.names.content||"rpi-content")[0],g=h?h.getElementsByClassName(d&&d.names&&d.names.cards||"rpi-cards")[0]:null,l=a.getElementsByClassName("rpi-url")[0],r=rpi.Media(a);var q=null;return q={media:r,boot:function(){d.cb&&d.cb.pre&&d.cb.pre();rpi.Utils.ajax(q.getAjaxUrl({act:"widget"}),"POST",function(c){g.setAttribute("data-offset", 19c.offset);g.setAttribute("data-count",c.count);c.bizs&&q.addBusiness(c.bizs[0],c.options);q.addReviews(c,[],function(e){q.initStyle();d.cb&&d.cb.post&&d.cb.post()})});q.initPagin()},init:function(){r.init();q.initStyle();q.initPagin()},initPagin:function(){l&&(l.onclick=function(){l.disabled=!0;q.loadNextReviews(b.pagination,function(c){q.delPaginBtn();d.cbp&&d.cbp(c);l.disabled=!1});return!1})},loadNextReviews:function(c,e){if(0<c){const k=[];c=parseInt(c);q.preloadReviews(k,c);q.loadAjaxReviews(k, 20c,e)}},preloadReviews:function(c,e){var k=parseInt(g.getAttribute("data-offset")),f=parseInt(g.getAttribute("data-count"));e=f-k>e?e:f-k;k=g.getElementsByClassName(d&&d.names&&d.names.card||"rpi-card");if(k.length){f=k.length-1;for(let u=0;u<e;u++){let y=k[Math.round(Math.random()*f)].cloneNode(!0);y.style="filter: blur(4px);";g.appendChild(y);c.push(y)}}},loadAjaxReviews:function(c,e,k){rpi.Utils.ajax(q.getAjaxUrl({act:"reviews",size:e}),"POST",function(f){g.setAttribute("data-offset",f.offset); 21g.setAttribute("data-count",f.count);q.addReviews(f,c,k)})},getAjaxUrl:function(c){return rpi.View.ajaxurl({...c,id:n,offset:c.offset??(g?parseInt(g.dataset.offset):0),...(d.filter?.bid&&{bid:d.filter.bid}),...(d.filter?.provider&&{provider:d.filter.provider})},b)},addBusiness:function(c,e){m.getElementsByClassName("rpi-cards")[0].appendChild(q.createRating(c,e))},createRating:function(c,e){return rpi.el({cl:"rpi-card",data:{provider:c.provider}},q.ratingInner(c,e))},ratingInner:function(c,e){var k= 22rpi.el({cl:"rpi-info",children:[!e.header_hide_scale&&rpi.el({cl:"rpi-scale",text:q.scale(c)}),!e.header_hide_name&&rpi.el({tag:"a",cl:"rpi-name",atts:{href:c.url},text:c.name}),rpi.View.stars(c.rating,c.provider,!0),!e.header_hide_count&&q.based(c)]});k=rpi.el({cl:"rpi-flex",children:[!e.header_hide_photo&&rpi.el({cl:"rpi-img-wrap"},q.bizPhoto(c)),k]});return rpi.el({cl:["rpi-card-inner rpi-flexwrap rpi-logo","rpi-logo-"+c.provider],children:[k,(!e.header_hide_seeall||!e.header_hide_write)&&q.ratingBtns(c,
23e)]})},scale:function(c){return 4.2<c.rating?rpi.Utils.__("Excellent",b.trans):3.7<c.rating?rpi.Utils.__("Great",b.trans):2.7<c.rating?rpi.Utils.__("Good",b.trans):1.7<c.rating?rpi.Utils.__("Fair",b.trans):rpi.Utils.__("Poor",b.trans)},based:function(c){return rpi.el({cl:"rpi-based",text:rpi.Utils.__("Based on %s reviews",b.trans).replace("%s",c.total||c.review_count)})},bizPhoto:function(c,e=""){return rpi.el({tag:"img",cl:"rpi-img",atts:{loading:"lazy",alt:e,...(c.photo?{src:c.photo}:{})}})},ratingBtns:function(c, 24e){const k=rpi.el({cl:"rpi-slider-btn"});e.header_hide_seeall||k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable",children:rpi.el({tag:"a",atts:{target:"_blank",rel:"noopener",href:rpi.View.allReviewsUrl(c)},text:rpi.Utils.__("See all reviews",b.trans)})}));if(!e.header_hide_write){const f=rpi.View.writeReviewUrl(c);c=rpi.el({tag:"a",cl:["rpi-logo_after","rpi-logo-"+c.provider],atts:{target:"_blank",rel:"noopener",href:f},text:rpi.Utils.__("review us on",b.trans)});c.addEventListener("click", 25function(u){u.preventDefault();rpi.Utils.popup(f,800,600)});k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable"},c))}return k},addReviews:function(c,e,k){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});for(let f=0;f<c.reviews.length;f++){let u;d&&d.cb&&d.cb.createCard?u=d.cb.createCard(e.shift(),c.reviews[f]):(u=q.createCard(e.shift(),c.reviews[f]),d.common.initOnce(u),q.initReviewStyle(u,b),q.initLogoStyle(u,b.style_logo));e.length||g.appendChild(u)}for(;e.length;)rpi.Utils.rm(e.shift()); 26r.init();q.delPaginBtn();k&&k(c)},createCard:function(c,e){c||=rpi.el({cl:"rpi-card"});c.setAttribute("data-rat",e.rating);c.setAttribute("data-provider",e.provider);c.textContent="";c.appendChild(q.reviewInner(e));c.style="";return c},reviewInner:function(c){const e=c.reply?c.reply.text||c.reply:null;var k=rpi.el({cl:"rpi-info",children:[!b.hide_name&&q.reviewName(c),!b.disable_review_time&&q.reviewTime(c),rpi.View.stars(c.rating,c.provider)]});k=rpi.el({cl:"rpi-flex",children:[!b.hide_avatar&&q.reviewAvatar(c), 27k]});const f=rpi.el({cl:"rpi-body"},rpi.el({cl:"rpi-text rpi-scroll",atts:{tabindex:"0"},text:(c.text??"")+" "}));c.media&&c.media.length&&f.appendChild(rpi.el({cl:"rpi-media"},q.reviewMedia(c)));e&&f.appendChild(rpi.el({cl:"rpi-reply rpi-scroll",children:[rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner",b.trans)+":"}),document.createTextNode(" "+e)]}));return rpi.el({cl:"rpi-card-inner",children:[rpi.el("i"),k,f]})},reviewTime:function(c){return rpi.el({cl:"rpi-time",data:c.time?{time:String(c.time)}: 28{}})},reviewName:function(c){const e=rpi.Utils.capit(c.provider)+" user",k=c.author_name?c.author_name:e;return c.author_url&&!b.disable_user_link?rpi.el({tag:"a",cl:"rpi-name",atts:{target:"_blank",rel:"noopener",href:rpi.Utils.url(c.author_url),"aria-label":e+" profile"},text:k}):rpi.el({cl:"rpi-name",text:k})},reviewAvatar:function(c){var e=c.author_avatar,k=a.style.getPropertyValue("--img-size");k=k?k.replace("px",""):b.reviewer_avatar_size||56;const f=b.hide_name&&c.author_name?c.author_name: 29"";switch(c.provider){case "google":(c=e&&e.match(/googleusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/photo\.jpg/))&&4<c.length&&"AAAAAAAAAAA"===c[3][0]&&(e=e.replace("/photo.jpg","/s128-c0x00000000-cc-rp-mo/photo.jpg"));e&&=/=.*s\d{2,3}/.test(e)?e.replace(/(=.*)s\d{2,3}/,"$1s"+k):-1<e.indexOf("-mo")?e.replace("-mo","-mo-s"+k):e.replace("-rp","-rp-s"+k);break;case "yelp":e&&=e.replace(/(ms)|(o)\.jpg/,128>=k?"ms":"o")}e=rpi.el({tag:"img",cl:"rpi-img",atts:{width:k,height:k,alt:f,...(b.lazy_load_img? 30{loading:"lazy"}:{}),...(e?{src:e}:{})}});e.addEventListener("error",function(){this.src!==brb_vars.gavatar&&(this.src=brb_vars.gavatar)});return rpi.el({cl:"rpi-img-wrap"},e)},reviewMedia:function(c){if(!c.media||!c.media.length)return[];const e=a.style.getPropertyValue("--media-lines"),k=22*(e?e:2);return c.media.map(function(f){(f=f.thumbnailUrl||"")&&(f=f.replace(/(=.*)s\d{2,3}/,"$1s"+k));return rpi.el({tag:"img",cl:"rpi-thumb rpi-clickable",atts:{loading:"lazy",alt:"",...(f?{src:f}:{})}})})}, 31reviewReply:function(c,e){let k=c.getElementsByClassName("rpi-reply")[0];k||(k=rpi.el({cl:"rpi-reply rpi-scroll"}),c.getElementsByClassName("rpi-body")[0].appendChild(k));k.innerHTML="";k.appendChild(rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner",b.trans)+":"}));k.appendChild(document.createTextNode(" "+e))},initStyle:function(){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});if(m){var c=m.getElementsByClassName("rpi-card");for(var e=0;e<c.length;e++)this.initLogoStyle(c[e], 32b.head_logo),this.initYelpBasedLogo(c[e],b.head_logo)}if(h){c=g.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initReviewStyle(c[e],b);this.initCtrlStyle(b);c=h.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initLogoStyle(c[e],b.style_logo)}},initYelpBasedLogo:function(c,e){5==e&&(c=c.getElementsByClassName("rpi-logo-yelp")[0])&&!c.textContent&&(c.classList.remove("rpi-logo"),c.classList.add("rpi-logo_after"))},initReviewStyle:function(c,e){let k=c.getElementsByClassName("rpi-card-inner")[0], 33f=c.getElementsByClassName("rpi-triangle")[0],u=c.getElementsByClassName("rpi-flex")[0],y=c.getElementsByClassName("rpi-img-wrap")[0],x=c.getElementsByClassName("rpi-info")[0],t=c.getElementsByClassName("rpi-time")[0],A=c.getElementsByClassName("rpi-name")[0],w=c.querySelector('[class^="rpi-star"]'),z=c.getElementsByClassName("rpi-body")[0],C=c.getElementsByClassName("rpi-text")[0],D=c.getElementsByClassName("rpi-reply")[0];A&&x.appendChild(A);t&&x.appendChild(t);w&&x.appendChild(w);c.className="rpi-card"; 34k.className="rpi-card-inner";u.className="rpi-flex";z.className="rpi-body";f&&(f.className="rpi-triangle");switch(e.style_style){case void 0:case "1":case "7":k.appendChild(u);z&&k.appendChild(z);z.className+=" rpi-normal-up__body";break;case "2":case "8":z&&k.appendChild(z);k.appendChild(u);z.className+=" rpi-normal-down__body";break;case "3":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(u);c.appendChild(k);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_up";u.className+=" rpi-bubble__flex rpi-bubble__flex_up"; 35"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_up",k.className+=" rpi-bubble__inner rpi-bubble__inner_up");break;case "4":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(k);c.appendChild(u);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_down";u.className+=" rpi-bubble__flex rpi-bubble__flex_down";"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_down",k.className+=" rpi-bubble__inner rpi-bubble__inner_down");break;case "5":k.appendChild(u); 36u.appendChild(x);z&&x.appendChild(z);u.className+=" rpi-shift-up__flex";break;case "6":k.appendChild(u),u.appendChild(x),z&&x.prepend(z),u.className+=" rpi-shift-down__flex"}
36switch(e.style_style){case "7":c.className+=" rpi-avaborder-up";break;case "8":c.className+=" rpi-avaborder-down"}z&&D&&z.appendChild(D);if(w)switch(e.style_stars){case "1":t?(x.insertBefore(w,t),x.insertBefore(t,w)):A?(x.insertBefore(w,A),x.insertBefore(A,w)):x.appendChild(w);break;case "2":t?x.insertBefore(w,t):x.appendChild(w); 37break;case "3":A?x.insertBefore(w,A):t?x.insertBefore(w,t):x.prepend(w);break;case void 0:case "4":z?z.prepend(w):k.appendChild(w);break;case "5":C?C.prepend(w):z.appendChild(w);break;case "6":z?z.appendChild(w):k.appendChild(w)}if(y)switch(e.style_ava){case "1":u.appendChild(y);u.appendChild(x);break;case "2":u.appendChild(x),u.appendChild(y)}},initCtrlStyle:function(c){let e=h.getElementsByClassName("rpi-controls")[0];if(e)switch(e.className="rpi-controls",c.style_style){case "3":e.className+=" rpi-bubble-up__ctrl"; 38break;case "4":e.className+=" rpi-bubble-down__ctrl"}},initLogoStyle:function(c,e){const k=c.getElementsByClassName("rpi-card-inner")[0],f=c.getAttribute("data-provider");if(f){var u=f.split(",");1<u.length?this.initLogoMultiple(c,k,u,e):this.initLogoSingle(c,k,f,e)}},initLogoSingle:function(c,e,k,f){let u=c.getElementsByClassName("rpi-logo")[0];var y=["rpi-logo","rpi-logo-"+k];u&&u.classList.remove(...y);switch(f){case "1":case "6":k=c.getElementsByClassName("rpi-body")[0];"6"==f&&y.push("rpi-logo-left"); 39e.classList.contains("rpi-bubble__inner")&&k?k.classList.add(...y):e.classList.add(...y);break;case "2":(e=c.getElementsByClassName("rpi-name")[0])&&e.classList.add(...y);break;case "3":(y=c.getElementsByClassName("rpi-img-wrap")[0])&&y.classList.add(...["rpi-logo_after","rpi-logo-"+k]);break;case "4":e=c.querySelector('[class^="rpi-star"]');
39if(!e)break;u||=rpi.el("span");u.classList.add(...y);u.contains(e)||(e.replaceWith(u),u.appendChild(e));break;case "5":if(e=c.getElementsByClassName("rpi-based")[0])k= 40e.textContent.trim().match(/\d+/)[0],e.textContent=e.textContent.replace(k,k+" "),e.appendChild(rpi.el({tag:"span",cl:y}))}},initLogoMultiple:function(c,e,k,f){let u=c.getElementsByClassName("rpi-logos")[0];u||=this.createLogos(k);switch(f){case "0":rpi.Utils.rm(u);break;case "1":e.prepend(u);break;case "2":(c=c.getElementsByClassName("rpi-name")[0])&&c.prepend(u);break;case "4":e=c.getElementsByClassName("rpi-info")[0];k=c.getElementsByClassName("rpi-based")[0];c=c.querySelector('[class^="rpi-star"]'); 41u.appendChild(c);k?e.insertBefore(u,k):e.appendChild(u);break;case "5":if(c=c.getElementsByClassName("rpi-based")[0])e=c.textContent.trim().match(/\d+/)[0],c.textContent=c.textContent.replace(e,e+" "),c.appendChild(u)}},createLogos:function(c){return rpi.el({tag:"span",cl:"rpi-logos"},c.map(e=>q.logo(e)))},logo:function(c){return rpi.el({tag:"span",cl:["rpi-logo","rpi-logo-"+c]})},getCssVar:function(c){return a.style.getPropertyValue(c)},delPaginBtn:function(){if(l){const c=parseInt(g.getAttribute("data-offset")), 42e=parseInt(g.getAttribute("data-count"));c>=e&&rpi.Utils.rm(l)}}}}; 43Object.assign(rpi.View,{ajaxurl(a,b={}){if("function"===typeof b.api)return b.api(a);const d={widget:b.v2?"rpi_reviews":"brb_widget",reviews:b.v2?"rpi_reviews":"brb_get_reviews"},{id:n,offset:m,bid:h,provider:g}=a;a=new URLSearchParams({action:d[a.act],id:n,offset:m,size:a.size??b.pagination});h&&a.set("bid",h);g&&a.set("provider",g);return brb_vars.ajaxurl+"?"+a},allReviewsUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/reviews?placeid="+ 44a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+a.id+"/reviews");case "yelp":return rpi.Utils.url(a.url)}},writeReviewUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/writereview?placeid="+a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+a.id+"/reviews");case "yelp":return rpi.Utils.url("https://www.yelp.com/writeareview/biz/"+a.id)}},stars(a,b,d=!1){switch(b){case "facebook":return d? 45rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+a,text:a}):rpi.el({tag:"span",cl:"rpi-star-fb",data:{rating:a},text:(2>a?"doesn't ":"")+"recommends"});case "yelp":case "tripadvisor":return b=rpi.el({tag:"span",cl:"rpi-stars-"+b,data:{stars:Math.floor(2*a)/2}},Array.from({length:5},()=>rpi.el("i"))),d&&b.append(a),b;default:return rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+a,text:d?a:null})}},starRating(a){return rpi.el({tag:"span",cl:"rpi-star",data:{rating:String(a)}})},sidebar(a,b){function d(e){e&& 46e.preventDefault();r.classList.remove("rpi-open");c&&(c.classList.remove("rpi-open"),document.body.style.overflow="");g&&g.focus();return!1}const {id:n}=a,m=a.root||document.body,h=["rpi-sb"];"left"===a.pos&&h.push("rpi-left");let g,l=document.getElementById(n),r;l?r=l.getElementsByClassName("rpi-sb")[0]:(l=rpi.el({id:n,cl:"rpi"}),r=rpi.el({cl:h,atts:{role:"dialog","aria-modal":"true","aria-label":a.label||"Reviews"},html:'<div class="rpi-sbh"></div><div class="rpi-sbc"></div><button type="button" class="rpi-x" aria-label="Close"></button>'}), 47l.appendChild(r),m.appendChild(l),a.overlay&&m.appendChild(rpi.el({cl:"rpi-overlay"})));const q=r.getElementsByClassName("rpi-x")[0],c=m.querySelector(".rpi-overlay");q.addEventListener("click",d);c&&c.addEventListener("click",d);b&&b(r);return{rt:l,sb:r,toggle(e){r.classList.contains("rpi-open")?d():(g=e||null,r.classList.add("rpi-open"),c&&(c.classList.add("rpi-open"),document.body.style.overflow="hidden"),q.focus())}}},ajaxsb(a,b,d){const {id:n,bid:m,prov:h}=b.query,{data:g,...l}=b.options;d=["rpi-sb", 48n,m,h].filter(Boolean).join("_");return rpi.View.sidebar({root:a,id:d,pos:l.badge_pos,overlay:l.overlay},r=>{rpi.Utils.ajax(rpi.View.ajaxurl(b.query,l),"POST",function(q){var c=r.getElementsByClassName("rpi-sbc")[0];const e=q.bizs??(g?g.bizs.find(f=>(!m||f.id===m)&&(!h||f.provider===h)):{}),k={};m&&(k.bid=m);h&&(k.provider=h);rpi.Layout(c,{id:n,data:{bizs:[e],...q},header_hide_scale:!0,header_hide_count:!0,autoplay:!1,...l,view_mode:l.tag_sidebar,cfg:{filter:k}}).render();q=r.getElementsByClassName("rpi-sbh")[0]; 49c=c.getElementsByClassName("rpi-header")[0];q.appendChild(c)})})},widthAnim(a,b,d){const n=a.style,m=b+"px";"none"==n.display?(n.display="block",setTimeout(function(){n.opacity=0<n.opacity?0:1;n.width=n.width!=m?m:0},10)):(n.opacity=0<n.opacity?0:1,n.width=n.width!=m?m:0,setTimeout(function(){n.display="none"},d))}});rpi=rpi||{}; 50rpi.Media=function(a,b={},{root:d="rpi",card:n="rpi-card"}={}){let m,h=null,g=null;return g={init:function(){h=a.getElementsByClassName("rpi-thumb");for(let l=0;l<h.length;l++)h[l].setAttribute("data-idx",l),function(r,q){r.onclick=function(){g.show(r,q);return!1}}(h[l],l)},thumbs:function(l){if(Array.isArray(l)){var r=[];for(const q of l)l=document.createElement("img"),l.className="rpi-thumb rpi-clickable",l.src=q.thumbnailUrl,l.alt=rpi.Utils.__("Photo from customer review",b.trans),l.loading="lazy", 51r.push(l);return r}},clicks:function(l){l=l.getElementsByClassName("rpi-thumb");for(let r=0;r<l.length;r++)(function(q,c){q.onclick=function(){let e=parseInt(q.getAttribute("data-idx"));g.show(h[e],e);return!1}})(l[r],r)},show:function(l,r){if(!(0>r||r>=h.length)){var q=l.src.replace(/=s[0-9]{1,3}/g,"=s500");l=(l=rpi.Utils.getParent(l,[n,"rpi-review"]))?l.outerHTML:"";if(m){let c=m.querySelector(".rpi-lightbox-media img"),e=m.querySelector(".rpi-lightbox-review"),k=m.querySelector(".rpi-lightbox-prev"), 52f=m.querySelector(".rpi-lightbox-next");c.src=q;e.innerHTML!==l&&(e.innerHTML=l,g.clicks(e));k.onclick=function(u){g.show(h[r-1],r-1)};
52f.onclick=function(u){g.show(h[r+1],r+1)}}else m=document.createElement("div"),m.className="rpi-lightbox",m.innerHTML='<div class="rpi-x"></div><div class="rpi-lightbox-inner"><div class="rpi-lightbox-xxx"><div class="rpi-lightbox-content"><div class="rpi-lightbox-media"><div class="rpi-lightbox-btn rpi-lightbox-prev"></div><img src="'+q+'" alt=""><div class="rpi-lightbox-btn rpi-lightbox-next"></div></div><div class="'+ 53d+' rpi-lightbox-review">'+l+"</div></div></div></div>",q=m.querySelector(".rpi-x"),l=m.querySelector(".rpi-lightbox-prev"),next=m.querySelector(".rpi-lightbox-next"),q.onclick=function(){m.style.display="none"},m.onclick=function(c){m==c.target&&(m.style.display="none")},l.onclick=function(c){g.show(h[r-1],r-1)},next.onclick=function(c){g.show(h[r+1],r+1)},g.clicks(m),document.body.appendChild(m);m.style.display="flex"}}}};rpi=rpi||{}; 54rpi.Flash=function(a,b){if(b.data)a.appendChild(rpi.Flash.render(b));else{const d=a.getElementsByClassName("rpi-flash")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Flash.main(a,b);a.init();return a}; 55Object.assign(rpi.Flash,{LOGO:'<span style="position:relative;display:inline-block"><svg viewBox="0 0 1792 1792" width="44" height="44"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#FFAF02"></path></svg><svg width="25" height="25" viewBox="0 0 1792 1792" style="position:absolute;bottom:0;right:0;border:1px solid #fff;border-radius:50%;background:#fff"><path d="M1299 813l-422 422q-19 19-45 19t-45-19l-294-294q-19-19-19-45t19-45l102-102q19-19 45-19t45 19l147 147 275-275q19-19 45-19t45 19l102 102q19 19 19 45t-19 45zm141 83q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" fill="#8cc976"></path></svg></span>',render(a){return rpi.el({cl:["rpi-flash", 56a.flash_hide_mobile?"rpi-flash-hide":""],children:this.wrap(a)})},wrap(a){return rpi.el({cl:["rpi-flash-wrap","right"==a.flash_pos?"rpi-flash-right":""],children:this.content(a)})},content(a){return rpi.el({cl:"rpi-flash-content",children:[rpi.el({cl:"rpi-flash-card",children:[this.story(),this.form(a)]}),rpi.el({cl:"rpi-x"})]})},story(){return rpi.el({cl:["rpi-flash-story","rpi-flex"],data:{idx:1}})},form(a){return rpi.el({cl:["rpi-flash-form","rpi-content"],children:[rpi.el({cl:"rpi-cards",data:{count:a.data.count, 57offset:a.data.reviews.length}}),rpi.el({style:"text-align:center",children:rpi.el({tag:"a",cl:"rpi-url",atts:{href:"#"},text:rpi.Utils.__("More reviews",a.trans)})})]})},main(a,b){const d="rpi_flash_"+a.dataset.id;if(sessionStorage.getItem(d))return{};const n=a.getElementsByClassName("rpi-flash")[0],m=a.getElementsByClassName("rpi-flash-content")[0],h=m.getElementsByClassName("rpi-x")[0],g=m.getElementsByClassName("rpi-flash-card")[0],l=m.getElementsByClassName("rpi-flash-story")[0],r=[],q=rpi.Common(a, 58b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:q,cbp:t=>r.push(...t.reviews)});b.data&&c.addReviews(b.data,[]);let e=0,k=!1,f=1E3*(b.flash_start||3),u=1E3*(b.flash_visible||5),y=1E3*(b.flash_invisible||5),x=null;return{init(){this.destroy();q.init();c.init();this.fillReviews();r.length&&(h.onclick=this.hide,l.onclick=()=>this.showReview(),document.body.appendChild(a),setTimeout(()=>this.showStory(),f))},destroy(){clearTimeout(x);x=null},fillReviews(){let t=a.getElementsByClassName("rpi-card"); 59for(let w=0;w<t.length;w++){let z=t[w].dataset.rat;var A="";b.disable_review_time||(A=t[w].getElementsByClassName("rpi-time")[0],A=b.time_format?A.textContent:A.dataset.time);let C=t[w].getElementsByClassName("rpi-name"),D=t[w].getElementsByClassName("rpi-text"),F=t[w].querySelector("img.rpi-img");r.push({rating:z,text:D[0]?.firstChild?.nodeValue??"",time:A,author_avatar:b.hide_avatar?"":F?.getAttribute("src")??"",author_name:b.hide_name?"":C[0]?.textContent??"",author_url:b.hide_name?"":C[0]?.href?? 60"",provider:t[w].dataset.provider})}},showStory(){clearTimeout(x);if(!k)if(this.nextStory(r,e),m.className="rpi-flash-content rpi-flash-visible",e+1<r.length)e+=1;else{var t=a.getElementsByClassName("rpi-cards")[0];const A=parseInt(t.dataset.count,10)||0;t=parseInt(t.dataset.offset,10)||0;if(A>t){clearTimeout(x);c.loadNextReviews(b.pagination,w=>{r.push(...w.reviews);e=e+1<r.length?e+1:0;this.waitStory()});return}e=0}this.waitStory()},waitStory(){x=setTimeout(()=>{k||m&&m.matches(":hover")||(m.className= 61"rpi-flash-content");x=setTimeout(()=>this.showStory(),y)},u)},showReview(){k=!0;const t=g.querySelector(".rpi-flash-form .rpi-card:nth-child("+parseInt(l.dataset.idx)+")");t.className="rpi-card rpi-highlight";setTimeout(()=>{t.scrollIntoView({block:"center"})},50);g.className="rpi-flash-card rpi-flash-expanded";m.className="rpi-flash-content rpi-flash-visible";h.className="rpi-x rpi-xa";h.onclick=()=>{t.className="rpi-card";g.className="rpi-flash-card";h.className="rpi-x";k=!1;h.onclick=this.hide}}, 62hide(){let t=JSON.parse(sessionStorage.getItem(d)||"{}");t.hide=!0;sessionStorage.setItem(d,JSON.stringify(t));clearTimeout(x);a.getElementsByClassName("rpi-flash-content")[0].className="rpi-flash-content"},nextStory(t,A){const w=t[A];g.style.height="auto";n.style.setProperty("--flash-height","auto");if(l.firstChild){t=l.getElementsByClassName("rpi-flash-img");const z=l.getElementsByClassName("rpi-flash-head"),C=l.getElementsByClassName("rpi-flash-body"),D=l.getElementsByClassName("rpi-flash-footer"); 63b.flash_user_photo&&t.length&&(t[0].innerHTML=this.img(w));z.length&&(z[0].innerHTML=this.head(w));C.length&&(C[0].innerHTML=this.body(w));D.length&&(D[0].innerHTML=this.footer(w));l.dataset.idx=A+1}else l.innerHTML=this.createStory(t,A);l.dataset.provider=w.provider;setTimeout(()=>{n.style.setProperty("--flash-height",l.offsetHeight+"px");g.style.height=""},1)},createStory(t,A){t=t[A];return(b.flash_hide_logo&&!b.flash_user_photo?"":'<div class="rpi-flash-img">'+this.img(t)+"</div>")+'<div class="rpi-info"><div class="rpi-flash-head">'+ 64this.head(t)+'</div><div class="rpi-flash-body">'+this.body(t)+'</div><div class="rpi-flash-footer">'+this.footer(t)+"</div></div>"},img(t){return b.flash_user_photo?this.photoImg(t,44,44):rpi.Flash.LOGO},head(t){return b.flash_head?this.temp(t,b.flash_head):this.photo(t,16,16)+(b.hide_name?"":this.name(t))+"<sp
64an> "+b.text.m1.replace("%s",this.star(t))+"</span>"},body(t){return b.flash_body?this.temp(t,b.flash_body):rpi.View.stars(t.rating,t.provider).outerHTML+b.text.m2+this.provider(t)},footer(t){return b.flash_footer? 65this.temp(t,b.flash_footer):b.disable_review_time?"":q.time(t.time)},name(t){return'<span class="rpi-flash-name">'+t.author_name+"</span> "},star(t){return'<span class="rpi-flash-rating rpi-star" data-rating="'+t.rating+'"></span>'},provider(t){return'<span class="rpi-logo rpi-logo-'+t.provider+'"></span>'},photo(t,A,w){return b.flash_user_photo||b.hide_avatar?"":this.photoImg(t,A,w)},photoImg(t,A,w){let z=t.author_avatar;return'<span class="rpi-flash-photo rpi-img-wrap"><img src="'+z+'" class="rpi-img" alt="'+ 66t.author_name+'" width="'+A+'" height="'+w+'" onerror="if(this.src!=\''+z+"')this.src='"+rpi.AVA+"'\"></span>"},temp(t,A){return decodeURIComponent(A).replace("{{review_rating}}",this.star(t)).replace("{{review_stars}}",rpi.View.stars(t.rating,t.provider).outerHTML).replace("{{review_text}}",q.trimtext(t.text,!0)).replace("{{review_time}}",q.time(t.time)).replace("{{review_provider}}",this.provider(t)).replace("{{review_name}}",this.name(t)).replace("{{review_name_url}}",t.author_url).replace("{{review_photo}}", 67this.photo(t,16,16))}}}});rpi=rpi||{};rpi.Badge=function(a,b){if(b.data)a.appendChild(rpi.Badge.render(b));else{const d=a.getElementsByClassName("rpi-badge-cnt")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Badge.main(a,b);a.init();return a}; 68Object.assign(rpi.Badge,{render(a){return rpi.el({cl:["rpi-badge-cnt","rpi-badge-"+(a.badge_pos||"right"),a.badge_display_block?"rpi-badge-block":"",a.hide_float_badge?"rpi-badge-hide":""],children:a.data.bizs.map(b=>this.badge(b,a))})},badge(a,b){return rpi.el({cl:"rpi-badge",style:"display:none",data:"summary"!==a.provider?{id:a.id,provider:a.provider}:null,children:[!b.badge_line_hide&&rpi.el({cl:"rpi-badge-line"}),b.badge_close&&rpi.el({cl:"rpi-x"}),this.body(a,b)]})},body(a,b){return rpi.el({cl:["rpi-badge-body", 69"rpi-flex","disable"!==b.badge_click&&"rpi-badge-clickable"],children:[this.img(a,b),this.info(a,b)]})},img(a,b){return"summary"===a.provider||b.badge_use_photo?rpi.el({tag:"img",cl:"rpi-logo",atts:{src:a.photo||"",alt:a.name||"",width:"44",height:"44",loading:b.lazy_load_img?"lazy":"eager"}}):rpi.el({cl:"rpi-logo rpi-logo-"+a.provider})},info(a,b){return rpi.el({cl:"rpi-info",children:[!b.badge_name_hide&&rpi.el({cl:"rpi-name",text:this.title(a,b)}),!b.badge_stars_hide&&rpi.View.stars(a.rating,a.provider, 70!0),!b.badge_based_hide&&rpi.el({cl:"rpi-based",text:"Based on "+a.total+" reviews"})]})},title(a,b){return"summary"===a.provider?b.summary_name||"Social Rating":b.badge_use_name?a.name||"":rpi.Utils.capit(a.provider)+" Rating"},main:function(a,b){const d=a.dataset.id;return{init(){[...a.getElementsByClassName("rpi-badge")].forEach(n=>this.initBadge(n))},initBadge(n){const m=`rpi_badge_${[d,n.dataset.provider,n.dataset.id].join("_")}`;var h=sessionStorage.getItem(m);n.style.display=h?"none":"inline-block"; 71if(!h){if(h=n.querySelector(".rpi-x"))h.onclick=()=>{sessionStorage.setItem(m,1);n.style.display="none"};if("sidebar"===b.badge_click){const g=n.querySelector(".rpi-badge-body");g&&(g.onclick=()=>{var {dataset:l}=g.parentNode;l=rpi.View.ajaxsb(document.body,{query:{act:"reviews",id:d,bid:l.id,prov:l.provider},options:b});setTimeout(l.toggle,5);g.onclick=l.toggle})}}}}}});rpi=rpi||{};rpi.Tag=function(a,b){const d=b.data;d&&a.appendChild(rpi.Tag.render(d,b));a=rpi.Tag.main(a,b);a.init();return a}; 72Object.assign(rpi.Tag,{render(a,b){return rpi.el({cl:this.cls(b),children:[b.tag_text?rpi.el({cl:"rpi-tag-text",text:b.tag_text}):null,this.cnt(a,b)]})},cls:function(a){const b=["rpi-tag"];a.tag_popup&&b.push("rpi-pop");a.tag_pos&&b.push(a.tag_pos);a.tag_push&&b.push("push");a.tag_expand&&b.push("expand");return b},cnt:function(a,b){a=a.bizs[0];return rpi.el({cl:"rpi-tag-cnt",atts:{onclick:this.click(a,b)},children:[rpi.el({tag:"span",cl:"rpi-logos",children:a.platform.map(d=>rpi.el({tag:"span",cl:"rpi-logo rpi-logo-"+ 73d}))}),rpi.View.stars(a.rating,a.provider,b.tag_rating)]})},click:function(a,b){let d=null;switch(b.tag_click){case "link":d=b.tag_link;break;case "reviews":d=rpi.View.allReviewsUrl(a)}a=b.open_link?"blank":"self";return d?"window.open('"+d+"', '_"+a+"');return false":null},main:function(a,b){const d=a.getAttribute("data-id"),n=a.getElementsByClassName("rpi-tag")[0],m=a.getElementsByClassName("rpi-tag-cnt")[0];return{init:function(){let h=a.querySelector(".rpi-stars[data-reviewus]");h&&(this.starsInit(h), 74h.onclick=function(g){g="svg"==g.target.tagName?g.target:g.target.parentNode;g=[...g.parentNode.children].indexOf(g);rpi.Utils.popup(2<g?this.getAttribute("data-reviewus"):"https://app.richplugins.com/feedback?s="+g,800,600)});0<b.tag_popup&&setTimeout(function(){n.className+=" rpi-pop-up"},1E3*b.tag_popup);"sidebar"===b.tag_click&&m&&(m.onclick=function(){const g=rpi.View.ajaxsb(a,{query:{act:"reviews",id:d},options:b});setTimeout(g.toggle,5);m.onclick=g.toggle})},starsInit:function(h){}}}}); 75rpi=rpi||{}; 76rpi.Slider=function(a,b,d,n){a.getAttribute("data-id");
76const m=a.getElementsByClassName(d.cnt)[0],h=a.getElementsByClassName(d.content)[0],g=h?h.getElementsByClassName(d.cards)[0]:null,l=h?h.getElementsByClassName(d.dotsWrap)[0]:null,r=h?h.getElementsByClassName(d.dots)[0]:null,q=g?parseInt(g.getAttribute("data-count")):0,{autoplay:c=!0,speed:e=5,mousestop:k=!0}=b;var f=null,u=h?h.getElementsByClassName(d.card):null,y="",x="",t=null,A=null,w=null,z=null,C=!1,D=!1,F=0,G=0;return f={init:function(p,v){rpi.Utils.isVisible(m)? 77(p&&p(),f.resize(),f.actions(),u.length&&f.swipeAutoStart(),v&&v(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(f)):setTimeout(f.init,300)},resize:function(p){let v=n.column.resize(),B=n.column.getCol();p&&g.scrollLeft!=p*f.reviewWidth()&&g.scrollTo(u[p].offsetLeft,0);!u.length||y==v&&x==B||(f.hasDots()&&(f.dotsInit(),f.dotSwipe(p,!0)),y=v,x=B)},actions:function(){k&&f.addMouseEvents();window.addEventListener("resize",f.resizeListener);g&&(g.addEventListener("scroll",f.scrollListener,!1),b.wheelscroll&& 78h.addEventListener("wheel",f.wheelListener,!1));var p=m.getElementsByClassName(d.btnPrev)[0];p&&(p.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(-1)});if(p=m.getElementsByClassName(d.btnNext)[0])p.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(1)}},resizeListener:function(){var p=G;clearTimeout(t);t=setTimeout(f.resize,150,p)},scrollListener:function(){clearTimeout(A);clearTimeout(w);w=setTimeout(f.scrollEnd,150)},wheelListener:function(p){var v=p.target; 79if((v=-1<v.className.indexOf(d.text)?v:-1<v.parentNode.className.indexOf(d.text)?v.parentNode:null)&&v.scrollHeight>v.clientHeight)return!0;p.preventDefault();F++;clearTimeout(z);z=setTimeout(f.wheelEnd,150,p)},addMouseEvents:function(){m.addEventListener("mouseover",f.mouseOver,!1);m.addEventListener("mouseleave",f.mouseLeave,!1)},delMouseEvents:function(){m.removeEventListener("mouseover",f.mouseOver);m.removeEventListener("mouseleave",f.mouseLeave)},mouseOver:function(){C=1;f.swipeAutoStop()}, 80mouseLeave:function(){C=0;f.swipeAutoStart()},btnClick:function(p){f.swipeManual(p*f.swipePerBtn())},wheelEnd:function(p){f.swipeManual(Math.sign(p.wheelDelta)*F*f.swipeStep());F=0},scrollEnd:function(){G=f.reviewsIdx();D?D=!1:f.loadNextReviews();(!k||C)&&k||(!b.clickstop||D)&&b.clickstop||f.swipeAutoStart();f.hasDots()&&f.dotSwipe(void 0,!0)},loadNextReviews:function(p){p=p?f.reviewsIdx()+parseInt(p):f.hasDots()?(p=r.getElementsByClassName("active")[0])?parseInt(p.getAttribute("data-index"))*f.swipePerDot(): 81f.reviewsIdx():f.reviewsIdx();p=f.getAjaxSize(p);0<p&&n.view.loadNextReviews(p)},getAjaxSize:function(p){let v=0;const B=parseInt(g.getAttribute("data-offset")),E=parseInt(b.pagination);if(q>B){let H=p-B;Math.abs(H)<3*f.swipePerDot()?v=E:H&&(v=Math.ceil(p/E)*E-B)}p=B+v-q;return 0<p?v-p:v},dotsInit:function(){if(r){var p=Math.round(q/f.swipePerDot());r.innerHTML="";for(let v=0;v<p;v++){let B=document.createElement("button");B.className=d.dot;B.setAttribute("data-index",v);B.setAttribute("title",v); 82B.setAttribute("aria-label","Go to page "+v);B.onclick=f.dotClick;r.appendChild(B)}f.dotsPadding()}},dotClick:function(p){p.preventDefault();p.stopPropagation();p=parseInt(this.getAttribute("data-index"));var v=r.getElementsByClassName("active")[0];v=parseInt(v.getAttribute("data-index"));f.swipeManual(Math.abs(p-v)*f.swipePerDot()*Math.sign(p-v))},dotsPadding:function(){let p=l.getBoundingClientRect().height;m.style.paddingBottom=p+"px"},dotSwipe:function(p,v){p=Math.round((void 0!==p?p:f.reviewsIdx())/ 83f.swipePerDot());p=0>p?0:p>=r.childNodes.length?r.childNodes.length-1:p;p=r.querySelector("."+d.dot+'[data-index="'+p+'"]');let B=r.getElementsByClassName("active")[0];f.dotActivate(B,p);f.dotScroll(p,v)},dotScroll:function(p,v){let B=Math.round(r.scrollWidth/r.childNodes.length),E=Math.floor(Math.round(r.offsetWidth/B)/2);v?r.scrollTo(p.offsetLeft-E*B,0):r.scrollTo({left:p.offsetLeft-E*B,behavior:"smooth"})},dotActivate:function(p,v){p&&(p.classList.remove("active"),p.classList.remove("s1"),p.previousSibling&& 84(p.previousSibling.classList.remove("s2"),p.previousSibling.previousSibling&&p.previousSibling.previousSibling.classList.remove("s3")),p.nextSibling&&(p.nextSibling.classList.remove("s2"),p.nextSibling.nextSibling&&p.nextSibling.nextSibling.classList.remove("s3")));v&&(v.classList.add("active"),v.classList.add("s1"),v.previousSibling&&(v.previousSibling.classList.add("s2"),v.previousSibling.previousSibling&&v.previousSibling.previousSibling.classList.add("s3")),v.nextSibling&&(v.nextSibling.classList.add("s2"), 85v.nextSibling.nextSibling&&v.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(p){D=!0;f.loadNextReviews(p);f.scroll(p);b.clickstop&&(f.swipeAutoStop(),f.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(m))if(f.isScrollEnd())f.scroll(-(q-f.reviewsPerView()));else{let p=f.swipeStep()<f.reviewsAhead()?f.swipeStep():f.reviewsAhead();f.scroll(p)}f.swipeAutoStart()},scroll:function(p){p=f.reviewsIdx()+parseInt(p);let v=rpi.Utils.isRTL()?p+f.reviewsPerView()-1:p;v=0>v? 860:v>=u.length?u.length-1:v;-1<v&&v<u.length&&(g.scrollTo({left:u[v].offsetLeft,behavior:"smooth"}),f.hasDots()&&f.dotSwipe(p))},swipeAutoStart:function(){c&&(A=setTimeout(f.swipeAuto,1E3*parseInt(e)))},swipeAutoStop:function(){clearTimeout(A);w&&setTimeout(function(){clearTimeout(w)},100)},isScrollEnd:function(){var p=g.querySelector("."+d.card+":last-child"),v=p.getBoundingClientRect();p=p.parentNode.getBoundingClientRect();return(2>Math.abs(p.left-v.left)||p.left<=v.left)&&v.left<p.right&&(2>Math.abs(p.right- 87v.right)||p.right>=v.right)&&v.right>p.left},swipeStep:function(){return b.swipe_step||f.reviewsPerView()},swipePerBtn:function(){return b.swipe_per_btn||f.reviewsPerView()},swipePerDot:function(){return b.swipe_per_dot||f.reviewsPerView()},reviewWidth:function(){return Math.round(g.scrollWidth/u.length)},reviewHeight:function(){return u[0].offsetHeight},reviewsPerView:function(){return Math.round(g.offsetWidth/f.reviewWidth())},reviewsIdx:function(){let p=rpi.Utils.isRTL()?-g.scrollLeft:g.scrollLeft; 88return Math.round(p/f.reviewWidth())},reviewsAhead:function(){return u.length-(f.reviewsIdx()+f.reviewsPerView())},hasDots:function(){return r&&!b.hide_dots&&0<f.swipePerDot()}
88,setBreakpoints:function(p){n.column.setBreakpoints(p);f.resize()},clear:function(){clearTimeout(t);clearTimeout(A);clearTimeout(w);clearTimeout(z);window.removeEventListener("resize",f.resizeListener);g.removeEventListener("scroll",f.scrollListener);h.removeEventListener("wheel",f.wheelListener)}}};rpi=rpi||{}; 89rpi.Temp=function(a,b){const d=b.data;d&&(a.innerHTML=rpi.Temp.render(d,b));a=rpi.Temp.main(a,b);d&&a.init(d);return a}; 90Object.assign(rpi.Temp,{HEADER:"<div class=\"rpi-header\" data-temp='{{temp_rating}}'></div>",CONTENT:'<div class="rpi-content" data-temp=\'{{temp_review}}\' data-count="{{count}}" data-offset="{{offset}}"></div>',PAGIN:'<a href="#" class="rpi-url">{{label}}</a>',RATINGS:'<div class="rpi-rating">\n {{photo}}\n <a href="{{writereview_url}}" onclick="rpi.Utils.popup(this.href,620,580);return !1;">{{name}}</a>\n {{rating}} {{stars}}\n Based on <a href="{{reviews_url}}" target="_blank" rel="noopener">{{count}} reviews</a>\n </div>',REVIEWS:'<div class="rpi-review">\n <div>{{review_photo}} {{review_name_url}} {{review_time}} {{review_logo}}</div>\n <div>{{review_stars}}</div>\n <div class="rpi-text">{{review_text}}</div>\n {{review_media}}\n <div>{{review_reply}}</div>\n </div>', 91render(a,b){b=a.options??{};let d="";!1!==b.rating_temp_on&&(d+=this.fill(this.HEADER,{temp_rating:this.esc(b.rating_temp||encodeURIComponent(this.RATINGS))}));!1!==b.review_temp_on&&(d+=this.fill(this.CONTENT,{temp_review:this.esc(b.review_temp||encodeURIComponent(this.REVIEWS)),count:this.esc(a.count),offset:this.esc((a.reviews??[]).length)}));return d},ratings(a,b,d){const n=d.bizPhoto(b);return rpi.Temp.fill(a,{scale:d.scale(b),name:rpi.Temp.esc(b.name),photo:n?.outerHTML??"",stars:rpi.View.stars(b.rating, 92b.provider,!1).outerHTML,rating_stars:rpi.View.stars(b.rating,b.provider,!0).outerHTML,rating:rpi.Temp.esc(b.rating),count:rpi.Temp.esc(b.total??b.review_count),reviews_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.allReviewsUrl(b))),writereview_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.writeReviewUrl(b)))})},reviews(a,b,d){const n=b.media?d.media.thumbs(b.media).map(m=>m.outerHTML).join(" "):"";return rpi.Temp.fill(a,{review_photo:d.reviewAvatar(b).outerHTML,review_provider:rpi.Temp.esc(b.provider), 93review_logo:d.logo(b.provider).outerHTML,review_url:rpi.Temp.esc(rpi.Temp.safeUrl(b.author_url)),review_name:rpi.Temp.esc(b.author_name),review_name_url:d.reviewName(b).outerHTML,review_time:d.reviewTime(b).outerHTML,review_rating:rpi.Temp.esc(b.rating),review_stars:rpi.View.stars(b.rating,b.provider).outerHTML,review_text:rpi.Temp.esc(b.text??""),review_media:n,review_reply:rpi.Temp.esc(b.reply??"")})},fill(a,b){return Object.entries(b).reduce((d,[n,m])=>d.replace(new RegExp(`\\{\\{${n}\\}\\}`,"g"), 94m),a)},esc(a){return String(a??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},safeUrl(a){a=String(a??"").trim();if(!a)return"";if(/^(#|\/|\?|\.)/.test(a))return a;try{const {protocol:b,href:d}=new URL(a,window.location.href);return["http:","https:","mailto:","tel:"].includes(b.toLowerCase())?d:"#"}catch{return"#"}},decode(a,b){try{return decodeURIComponent(a||encodeURIComponent(b))}catch{return b}},main(a,b){let d=null;const {decode:n, 95ratings:m,reviews:h,RATINGS:g,REVIEWS:l}=rpi.Temp,r=a.dataset.id,q=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:q}),e=a.querySelector(".rpi-header"),k=a.querySelector(".rpi-content"),f=(u,y,x)=>{const t=document.createElement("span");for(t.innerHTML=y;t.firstChild;)y=t.firstChild,x&&y.nodeType===Node.ELEMENT_NODE&&x(y),u.appendChild(y)};if(k&&b.pagination){let u=a.getElementsByClassName("rpi-url")[0];u=u??rpi.el({tag:"button",cl:"rpi-url",text:rpi.Utils.__("More reviews", 96b.trans)});u.onclick=()=>{var y=parseInt(k.dataset.offset,10)||0;y=c.getAjaxUrl({id:r,offset:y,api:b.api,act:"reviews",size:b.pagination});rpi.Utils.ajax(y,"POST",x=>{x.reviews&&d.initReviews(x.reviews);k.setAttribute("data-count",x.count);k.setAttribute("data-offset",x.offset);x.offset>=x.count&&rpi.Utils.rm(u)});return!1};a.appendChild(u)}q.init();return d={init(u){u&&(e&&u.bizs&&this.initRatings(u.bizs),k&&u.reviews&&this.initReviews(u.reviews))},initRatings(u){if(e){var y=n(e.dataset.temp,g); 97for(const x of u)f(e,m(y,x,c))}},initReviews(u){if(k){var y=n(k.dataset.temp,l);for(const x of u)f(k,h(y,x,c),t=>q.initOnce(t))}}}}});rpi=rpi||{}; 98rpi.Layout=function(a,b){function d(){var g=["rpi-cnt","rpi-col-m","rpi-"+b.view_mode];"grid"!==b.view_mode&&"slider"!==b.view_mode||g.push("rpi-sh");g=rpi.el({cl:g,data:{opts:"{}"},style:"visibility:var(--visible, hidden)"});h.bizs&&g.appendChild(n());h.reviews&&g.appendChild(m());a.appendChild(g);const l=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),r=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),q=rpi.View(a,b,{common:l,...(b.cfg??{})});h.bizs&&h.bizs.length&& 99q.addBusiness(h.bizs[0],b);q.addReviews(h,[]);"slider"===b.view_mode?rpi.Slider(a,b,{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card",text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:q,column:r}).init(function(){l.init()}
99,function(){q.init();console.log("RichPlugins slider initialized")}):(l.init(),q.init());return g}function n(){var g="slider"===b.view_mode;const l=["rpi-header",`rpi-header_${1== 100(g?b.slider_head_pos||2:b.head_pos||1)?"top":"row"}`];g&&!b.slider_hide_nextprev&&l.push("rpi-header_pad");g=rpi.el({cl:l,data:{opts:""}});g.appendChild(rpi.el({cl:"rpi-cards"}));return g}function m(){var g="slider"===b.view_mode;const l=rpi.el({cl:["rpi-content",`rpi-content_${1==(g?b.slider_head_pos:b.head_pos)?"top":"row"}`]});g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-lt rpi-slider-prev",atts:{"aria-label":"Previous reviews",tabindex:"0"}}));var r=l.appendChild; 101var q=["rpi-cards"];var c="slider"===b.view_mode;c&&!b.slider_hide_nextprev&&q.push("rpi-slides-bite");var e=h.reviews?.length;q=rpi.el({cl:q,data:{offset:e,count:h.count}});!c&&0<b.pagination&&h.count>e&&(c=rpi.el({style:"text-align:center"}),e=rpi.el({tag:"button",cl:"rpi-url",text:"More reviews"}),c.appendChild(e),e=document.createDocumentFragment(),e.appendChild(q),e.appendChild(c),q=e);r.call(l,q);g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-gt rpi-slider-next", 102atts:{"aria-label":"Next reviews",tabindex:"0"}}));g&&!b.slider_hide_pagin&&(g=rpi.el({cl:"rpi-dots-wrap"}),g.appendChild(rpi.el({cl:"rpi-dots"})),l.appendChild(g));return l}const h=b.data;return{render:function(){a.innerHTML="";b.style_vars&&(a.style.cssText=b.style_vars);switch(b.view_mode){case "tag":rpi.Tag(a,b);break;case "flash":rpi.Flash(a,b);break;case "badge":rpi.Badge(a,b);break;case "temp":rpi.Temp(a,b);break;default:d()}}}}; 103var RichPlugins=RichPlugins||{opts(a,b,d){a=a.getElementsByClassName(d)[0];return{...b,...(a?.dataset?.opts?JSON.parse(a.dataset.opts):{})}},Tag:function(a,b){return{init:()=>rpi.Tag(a,RichPlugins.opts(a,b,"rpi-tag-cnt"))}},Flash:function(a,b){return{init:()=>rpi.Flash(a,RichPlugins.opts(a,b,"rpi-flash"))}},Badge:function(a,b){return{init:()=>rpi.Badge(a,RichPlugins.opts(a,b,"rpi-badge-cnt"))}},Temp:function(a,b){return{init:()=>rpi.Temp(a,b)}},List:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time", 104text:"rpi-text",readmore:"rpi-readmore"}),n=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d});return{init:()=>{d.init();n.init();m.init()}}},Slider:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),n=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d}),h=rpi.Slider(a,RichPlugins.opts(a,{},"rpi-cnt"),{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card", 105text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:m,column:n});return{init:()=>h.init(d.init.bind(d),m.init.bind(m))}},init:function(a){a.setAttribute("data-exec","1");let b=JSON.parse(a.getAttribute("data-opts")),d=rpi.Utils.capit(b.layout);"List"==d||"Grid"==d?RichPlugins.List(a,b).init():RichPlugins[d]&&RichPlugins[d](a,b).init()}}; 106window.rpi_boot=function(){function a(){const d=document.querySelectorAll('.rpi[data-exec=""]');if(!d.length)return!1;rpi.Utils.clear();d.forEach(n=>RichPlugins.init(n));return!0}function b(){(new MutationObserver((d,n)=>{a()&&n.disconnect()})).observe(document.body,{childList:!0,subtree:!0})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{a()||b()}):a()||b()};window.rpi_boot();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.