!function i(n,a,o){function s(t,e){if(!a[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=a[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,i,n,a,o)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e)|(?:<\/?.*?\/?>)/gi,"$1")}function l(t){return function(e){return""+e+(-1===e.indexOf("?")?"?":"&")+"utm_medium=trustbox&utm_source="+t}}function u(e,t){function r(e){return 255>16)+t),r((n>>8&255)+t),r((255&n)+t)].map(function(e){return e<=15?"0"+e.toString(16):e.toString(16)}),(i?"#":"")+(t=a(n,3))[0]+t[1]+t[2]):e}function c(e){var t=1>16)+","+(e>>8&255)+","+(255&e)+","+t+")"}r.addEventListener=i,r.addUtmParams=l,r.getOnPageReady=function(){return new Promise(function(e){function t(){setTimeout(function(){e()},0)}"complete"===document.readyState?t():i(window,"load",function(){t()})})},r.getTrustpilotBusinessUnitId=function(){var e="46d6a890000064000500e0c3";return 0===e.indexOf("#")?"46d6a890000064000500e0c3":e},r.insertNumberSeparator=function(t,e){try{t.toLocaleString()}catch(e){return t}return t.toLocaleString(e||"en-US")},r.handlePopoverPosition=function(e,t,r,i){var n,a,o=t.getBoundingClientRect(),r=r.getBoundingClientRect(),e=e.getBoundingClientRect();o.leftr.right&&(t.style.right=e.right-r.right+"px",t.style.left="auto",n=t.getBoundingClientRect(),a=getComputedStyle(i).left,i.style.left="calc("+a+" + "+Math.floor(o.right-n.right)+"px)")},r.makeTranslations=function(r,e){return e?Object.keys(r).reduce(function(e,t){return e.split(t).join(r[t])},e):""},r.range=function(e){for(var t=[];0","")).replaceAll("<","")).replaceAll('"',""):e},r.setHtmlContent=function(e,t){e&&(e.innerHTML=!(2"+(e=r,[].concat.apply([],e).join("\n"))+""}}var n=e("./assets/svg"),o=e("./utils"),e=i("a"),s=i("div"),l=(i("img"),i("label"),i("span"));r.a=e,r.div=s,r.span=l,r.mkElemWithSvgLookup=function(e){return s({class:1=this.reviews.length?this._fetchReviews().then(function(e){var t,e=r._makeResponseProcessor(e);return r.nextPage=e.getNextPageLinks(),(t=r.reviews).push.apply(t,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t\n '+t(e,i)+"\n \n "}function o(e,t){var r,i=t.dimensionId,n=t.color,t=t.rating;return'\n \n \n '+(r=n,m[i].lines.reduce(function(e,t){return e+''},""))+"\n "+(e=i,i=n,0===(n=t)?"":'\n \n '+e.p+"\n ")+"\n \n "}function s(e,t){var r=t.rating,i=t.trustScore,t=t.color,n="starRating-"+Math.random().toString(36).substring(2);return'\n \n '+i+' out of five star rating on Trustpilot\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '}function l(e){var t="trustpilotLogo-"+Math.random().toString(36).substring(2);return'\n \n Trustpilot\n \n \n \n \n '}function u(e){return'\n \n \n \n \n'}function c(e,t){return t=t.elementColor,'\n\n \n\n'}function d(e){return'\n\n\n'}function v(e){return'\n\n\n'}function f(e){return'\n\n\n'}var p='style="position: absolute; height: 100%; width: 100%; left: 0; top: 0;"',m=(i(e={},"80x15",{dimensions:{width:80,height:15},lines:[{x1:80,y1:7.5,x2:0,y2:7.5},{x1:.5,y1:3.5,x2:.5,y2:11.5},{x1:20.5,y1:6,x2:20.5,y2:9},{x1:40.5,y1:6,x2:40.5,y2:9},{x1:60.5,y1:6,x2:60.5,y2:9},{x1:80,y1:3.5,x2:80,y2:11.5}],stars:[{x:1.5,w:14,h:14,p:''},{x:13.5,w:14,h:14,p:''},{x:13.5,w:14,h:14,p:''},{x:33.5,w:14,h:14,p:''},{x:64.5,w:14,h:14,p:''}]}),i(e,"90x16",{dimensions:{width:90,height:16},lines:[{x1:90,y1:8.5,x2:0,y2:8.5},{x1:.5,y1:5,x2:.5,y2:12},{x1:23.2185,y1:7,x2:23.2185,y2:10},{x1:45.5,y1:7,x2:45.5,y2:10},{x1:67.7815,y1:7,x2:67.7815,y2:10},{x1:90,y1:5,x2:90,y2:12}],stars:[{x:1.5,w:15,h:15,p:''},{x:15.5,w:15,h:15,p:''},{x:37.5,w:15,h:15,p:''},{x:60.5,w:15,h:15,p:''},{x:73.5,w:15,h:15,p:''}]}),i(e,"105x19",{dimensions:{width:105,height:19},lines:[{x1:105,y1:10,x2:0,y2:10},{x1:.5,y1:6,x2:.5,y2:14.3125},{x1:26.5,y1:8,x2:26.5,y2:12},{x1:52.5,y1:8,x2:52.5,y2:12},{x1:78.5,y1:8,x2:78.5,y2:12},{x1:105,y1:6,x2:105,y2:14.3125}],stars:[{x:1.5,w:18,h:19,p:''},{x:17.5682,w:18,h:18,p:''},{x:43.5,w:18,h:18,p:''},{x:69.7046,w:18,h:18,p:''},{x:85.7727,w:18,h:18,p:''}]}),e),g="#dcdce6",h={width:251,height:46},w={width:126,height:31},b={width:24,height:24},y={width:12,height:9},L={width:14,height:14},I={width:14,height:14},E={width:14,height:12};r.svgMap={scale:function(e){return a(m[e.dimensionId].dimensions,o,e)},stars:function(e){return a(h,s,e)},logo:function(){return a(w,l)},arrowSlider:function(){return a(b,u)},replyArrow:function(e){return a(y,c,e)},verifiedReview:function(e){return a(L,d,e)},invitedReview:function(e){return a(I,v,e)},redirectedReview:function(e){return a(E,f,e)}}},{"../utils":63}],42:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.styleAlignmentPositions=["left","right"]},{}],61:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getFrameworkTranslation=r.formatLocale=r.defaultLocale=void 0;var e=e("../localization"),n=(e=e)&&e.__esModule?e:{default:e};function a(e){var t,r=(e=e.split("-"))[0],e=(e=e[1])||i[t=r]||t;return r&&e?r+"-"+e.toUpperCase():o}var o="en-US",i={da:"DK",en:"US",ja:"JP",nb:"NO",sv:"SE"};r.defaultLocale=o,r.formatLocale=a,r.getFrameworkTranslation=function(e){var t=1").replace("[LINK-BEGIN]",t)},t)}},{"../localization":17}],46:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r=r?{minWidth:r,reviewsForWidth:t}:e},null);this._reviewsPerPage=e.reviewsForWidth,this._defaultSliderWidth=e.minWidth}},{key:"attachObserver",value:function(e){this.observers.push(e)}},{key:"detachObserver",value:function(t){this.observers=this.observers.filter(function(e){return e!==t})}},{key:"attachResizeListener",value:function(){var e=this;(0,a.addEventListener)(window,"resize",function(){null!==e.resizeTimeout&&window.clearTimeout(e.resizeTimeout),e.resizeTimeout=window.setTimeout(function(){e.windowResize()},200)})}},{key:"attachPopoverListeners",value:function(){var i=this;this.elements.slider.querySelectorAll(".tp-widget-review__source.popover-activator").forEach(function(r){(0,a.addEventListener)(r,"mouseover",function(){var e=r.querySelector(".tp-widget-review__source__information"),t=r.querySelector(".tp-widget-review__source__arrow");(0,a.handlePopoverPosition)(r,e,i.elements.sliderContainer,t)})})}},{key:"windowResize",value:function(){var t=this;this.setPageOnResize();var e=Math.ceil(this.reviewCount/this._reviewsPerPage)*this._reviewsPerPage*this.reviewWidthWithMargins;this.elements.slider.style.width=e+"px",this.reviewElements.forEach(function(e){e.style.width=t.reviewWidth+"px"}),this.observers.forEach(function(e){return e.onResize()})}},{key:"setPageOnResize",value:function(){this.currentPage;var e=this._reviewsPerPage*(this.currentPage-1),e=(this.calculateReviewsPerPage(),Math.floor(e/this._reviewsPerPage)+1);this.jumpToPage(e,0),this.touch.setPageWidth(this.sliderContainerWidth)}},{key:"moveContent",value:function(e){var t=1this.sensitivity&&!e?t:t-1}},{key:"setPageWidth",value:function(e){this.pageWidth=e}},{key:"attach",value:function(){var i=this;this.targetElement.addEventListener("touchstart",function(e){i.startTouchTime=(new Date).getTime(),i.touchPosition.start.x=e.changedTouches[0].screenX,i.touchPosition.start.y=e.changedTouches[0].screenY;var t=window.getComputedStyle(i.targetElement),r=0;window.DOMMatrix&&(r=new window.DOMMatrix(t.webkitTransform).m41,i.initialX=Math.round(r/i.pageWidth)*i.pageWidth,i.offsetDistanceX=r-i.initialX),i.scrollAxis="none",5=Math.abs(t.y)?"x":"y"),"x"===i.scrollAxis&&(e.preventDefault(),i.directionX=t.x-i.lastDragDistanceX,i.lastDragDistanceX=t.x,i.touchMoveCallback({translateX:t.x+i.offsetDistanceX+i.initialX}))}),this.targetElement.addEventListener("touchend",function(){var e=((new Date).getTime()-i.startTouchTime)/1e3,t=i.getDragDistance(),e=Math.abs(t.x)/e,e=i.pageWidth/e,t=t.x+i.offsetDistanceX+i.initialX,t=Math.sign(i.initialX-t),r=Math.sign(i.directionX)===t,r="x"===i.scrollAxis?i.getPagesToSwipe(r):0;i.touchEndCallback({pagesToSwipe:r*t,transitionDuration:e})})}}]),o);function o(e){var t=e.targetElement,t=void 0===t?null:t,r=e.pageWidth,r=void 0===r?null:r,i=e.sensitivity,i=void 0===i?25:i,n=e.touchEndCallback,n=void 0===n?function(){}:n,a=e.touchMoveCallback,a=void 0===a?function(){}:a,e=e.touchStartCallback,e=void 0===e?function(){}:e;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.targetElement=t,this.pageWidth=r,this.sensitivity=i,this.touchEndCallback=n,this.touchMoveCallback=a,this.touchStartCallback=e,this.initialX=0,this.offsetDistanceX=0,this.startTouchTime=0,this.lastDragDistanceX=0,this.directionX=0,this.scrollAxis="none",this.touchPosition={start:{x:0,y:0},stop:{x:0,y:0}},this.targetElement.style.userSelect="none",this.targetElement.style.transitionTimingFunction="ease"}},{}],51:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=e("./translations"),l={0:"january",1:"february",2:"march",3:"april",4:"may",5:"june",6:"july",7:"august",8:"september",9:"october",10:"november",11:"december"};function u(e,t){return(i=t)<(r=e)&&i/2<=r%i?Math.ceil(e/t):Math.floor(e/t);var r,i}function c(e){return 1===e?"singular":"plural"}r.default=function(e,t){var r,i,n,a,o;return t?(e=(0,s.formatLocale)(e),t=Date.parse(t),a=new Date(t),r=new Date,t=u(r=Math.floor((r-t)/1e3),60),i=u(t,60),7<=(n=u(i,24))?(o=a.getMonth(),a=a.getDate(),o=(0,s.getFrameworkTranslation)("monthNames."+l[o],e),e===s.defaultLocale?o+" "+a:"ja-JP"===e?o+" "+a+"日":a+" "+o):0":">",'"':""","'":"'","/":"/","=":"=","`":"`"};return e.replace(/[<>"'`=\/]/g,function(e){return t[e]})}Object.defineProperty(r,"__esModule",{value:!0}),r.truncateText=function(e,t){if(isNaN(t))return e;if(t<=0)return"";if(e&&e.length>t){for(var r=(e=e.substring(0,t)).charAt(e.length-1);" "===r||"."===r||","===r;)r=(e=e.substr(0,e.length-1)).charAt(e.length-1);e+="..."}return i(e)},r.escapeHtml=i},{}],62:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.LabelTypes=void 0;var i=Object.assign||function(e){for(var t=1;t'])}}),u(t,h.VERIFIED_DOE,{info:function(){return(0,o.getFrameworkTranslation)("reviews.serviceReviewTypeLabels.verifiedReview.info",e,{},[''])}}),u(t,h.REDIRECTED,{info:function(){return(0,o.getFrameworkTranslation)("reviews.serviceReviewTypeLabels.redirectedReview.info",e,{},[''])}}),u(t,h.INVITED_MANUAL,{info:function(){return(0,o.getFrameworkTranslation)("reviews.serviceReviewTypeLabels.invitedReview.info",e,{},[''])}}),u(t,h.INVITED_SELF_INVITER,{info:function(){return(0,o.getFrameworkTranslation)("reviews.serviceReviewTypeLabels.invitedReview.info",e,{},[''])}}),u(t,h.INVITED_TRUSTPILOT,{info:function(){return(0,o.getFrameworkTranslation)("reviews.serviceReviewTypeLabels.invitedReview.infoTrustpilot",e,{"[BOLD-BEGIN]":"","[BOLD-END]":""})}}),t[this.tooltipType].info();var e,t}},{key:"icon",value:function(){var e;return(e=c(this.locale)[this.labelType].icon)&&(0,s.mkElemWithSvgLookup)(e)}}]),b);function b(e,t,r){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.labelType=e,this.tooltipType=t,this.locale=r}function y(e){function t(){return-1!==[p.KICKSTART,p.COPY_PASTE_INVITATION,p.FILE_UPLOAD_INVITATION,p.MANUAL_INPUT_INVITATION].indexOf(o)}function r(){var e=[p.INVITATION_LINK_API,p.BUSINESS_GENERATED_LINK,p.LEGACY_UNIQUE_LINK,p.UNIQUE_LINK,p.EMBEDDED_BUSINESS_GENERATED_LINK_FORM,p.EMBEDDED_UNIQUE_LINK_FORM,p.BANNER_REDIRECT],t=new Date(n),r=new Date("2020-10-02");return-1!==e.indexOf(o)&&r<=t}var i=e.locale,n=e.createdAt,a=e.isVerified,o=e.reviewSource,s=e.verificationLevel,l=e.verificationSource;if(s)switch(s){case f.VERIFIED:return l===m.COMPLIANCE_DOCUMENTATION?new w(g.VERIFIED,h.VERIFIED_DOE,i):new w(g.VERIFIED,h.VERIFIED_AUTOMATIC,i);case f.INVITED:if(t())return new w(g.INVITED,h.INVITED_MANUAL,i);if(r())return new w(g.INVITED,h.INVITED_SELF_INVITER,i);if(o===p.BASIC_LINK)return new w(g.NOT_VERIFIED,h.NOT_VERIFIED,i);break;case f.REDIRECTED:return new w(g.REDIRECTED,h.REDIRECTED,i);case f.NOT_VERIFIED:return new w(g.NOT_VERIFIED,h.NOT_VERIFIED,i)}return a?l===m.COMPLIANCE_DOCUMENTATION?new w(g.VERIFIED,h.VERIFIED_DOE,i):t()?new w(g.INVITED,h.INVITED_MANUAL,i):r()?new w(g.INVITED,h.INVITED_SELF_INVITER,i):new w(g.VERIFIED,h.VERIFIED_AUTOMATIC,i):o!==p.BASIC_LINK&&o===p.DOMAIN_LINK?new w(g.REDIRECTED,h.REDIRECTED,i):new w(g.NOT_VERIFIED,h.NOT_VERIFIED,i)}r.default=function(e,t){t=y(i({locale:e},t.verification));return t.labelType===g.INVITED&&v===d?new w(g.INVITED,h.INVITED_TRUSTPILOT,e):t}},{"./queryString":43,"./templating":58,"./translations":61,"./utils":63}]},{},[1]); //# sourceMappingURL=main.js.map