(()=>{"use strict";class t{static setCommonConstants(){this.script=document.currentScript,this.loadedCss=[],this.loadedJs=[]}static addCSS(t,e,i=!1,s=null){if(void 0===this.loadedCss&&(this.loadedCss=[]),!t||-1!==this.loadedCss.indexOf(t))return e?e():null;let r=document.createElement("link");return r.type="text/css",r.rel="stylesheet",r.href=t,i&&window!==window.parent&&this.isCrossDomainIframe()?window.parent.document.head.appendChild(r):document.head.appendChild(r),document.head.appendChild(r),"function"==typeof e&&r.addEventListener("load",e),"function"==typeof s&&r.addEventListener("error",s),this.loadedCss.push(t)}static addJS(t,e,i=!1){if(void 0===this.loadedJs&&(this.loadedJs=[]),!t||-1!==this.loadedJs.indexOf(t))return e?e():null;let s=document.createElement("script");return s.type="text/javascript",s.src=t,i&&window!==window.parent&&this.isCrossDomainIframe()?window.parent.document.head.appendChild(s):document.head.appendChild(s),e&&s.addEventListener("load",e),this.loadedJs.push(t)}static openWindow(t){let e=document.createElement("a");return e.href=t,e.target="_blank",e.rel="noopener noreferrer nofollow",e.click()}static getScriptSelector(t){return'[src*=".trustindex."][src*="'+t+'.js"],[data-src*=".trustindex."][data-src*="'+t+'.js"]'}static getScriptKey(t){let e=t.getAttribute("data-src")||t.getAttribute("src"),i=e.replace(/.+\?([^&]+)/,"$1");return i&&i!==e&&-1===i.indexOf("=")?i:null}static getCDNUrl(){if(void 0!==window.TrustindexCdnUrl&&window.TrustindexCdnUrl)return window.TrustindexCdnUrl;if(void 0!==this.cdnUrl&&this.cdnUrl)return this.cdnUrl;let t="https://cdn.trustindex.io/",e=t;if(this.script&&this.script.src){let t=this.script.src.split("/");t.pop(),e=t.join("/")+"/"}-1===e.indexOf("trustindex.")&&(e=t);let i=this.isProxyUrl(e),s=null;try{i||"undefined"==typeof sessionStorage||(s=sessionStorage.getItem("ti-cdn-url"))}catch(t){s=null}if(s)return s;this.cdnUrl=e;try{this.isAdminUrl()||e===t||i||"undefined"==typeof sessionStorage||sessionStorage.setItem("ti-cdn-url",e)}catch(t){}return e}static isProxyUrl(t){return-1!==t.indexOf("?")}static getWidgetUrl(t){return void 0===t?null:this.getCDNUrl()+"widgets/"+t.substring(0,2)+"/"+t+"/"}static getDecodedHtml(t){let e=document.createElement("textarea");return e.innerHTML=t,e.value}static decodeTextNodes(t){let e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;e.nextNode();)e.currentNode.nodeValue=this.getDecodedHtml(e.currentNode.nodeValue.replace(/=0;t--)if(n>=o[t]){let e=Math.floor(n/o[t]),r=2*t;return e>1&&r++,s.replace("%d",e).replace("%s",i[r])}return r}static getDevicePixelRatio(){let t=1;return void 0!==window.screen.systemXDPI&&void 0!==window.screen.logicalXDPI&&window.screen.systemXDPI>window.screen.logicalXDPI?t=window.screen.systemXDPI/window.screen.logicalXDPI:void 0!==window.devicePixelRatio&&(t=window.devicePixelRatio),Math.min(t,2)}static getDefaultAvatarUrl(){let t=Math.floor(10*Math.random())+1;return this.getCDNUrl()+"assets/default-avatar/noprofile-"+(t<10?"0":"")+t+".svg"}static getDefaultCompanyAvatarUrl(){return this.getCDNUrl()+"companies/default_avatar.jpg"}static getPageLanguage(){return this.getWidgetLanguage(document.documentElement.lang)}static getUserLanguage(){return this.getWidgetLanguage(navigator.language||navigator.userLanguage||document.documentElement.lang)}static getWidgetLanguage(t){let e=(t||"en").toLowerCase();return e.startsWith("zh")?/-(hant|tw|hk|mo)\b/.test(e)?"zh_TW":"zh":e.substr(0,2)}static getLocaleTag(t){return(t||"en").replace("_","-")}static isAdminUrl(t){let e=t?new URL(t):location;return/(admin|stage[0-9kw])\.trustindex/.test(e.hostname)&&-1===e.href.indexOf("test/widget.html")}static isWordpressAdmin(){return!!document.body&&document.body.classList.contains("wp-admin")}static isAdminEditUrl(t){return void 0===t&&(t=location.href),-1!==t.indexOf("widget/edit")}static isTestWidgetUrl(t){return void 0===t&&(t=location.href),-1!==t.indexOf("test/widget.html")}static isInIframe(){return window.top!==window.self}static isAttributeEnabled(t,e){let i=t.getAttribute(e);return null!==i&&-1===["0","false"].indexOf(i.toLowerCase())}static isCrossDomainIframe(){if(window.parent===window)return!1;try{let t=new URL(window.parent.location);return t.protocol!==location.protocol||t.hostname!==location.hostname||t.port!==location.port}catch(t){return null}}static isMobileDevice(){return this.isAdminUrl()&&!this.isAdminEditUrl()?!!document.querySelector(".widget-editor.mobile"):/mobi/i.test(navigator.userAgent||navigator.vendor||window.opera)}static show(t,e){t.style.display=e||""}static hide(t){t.style.display="none"}static isEditorPreview(){return!!(this.isAdminUrl()||this.isTestWidgetUrl()||this.isWordpressAdmin())||-1!==location.href.indexOf("elementor-preview=")}static onFirstActivity(t){if(this.hadFirstActivity)return t();if(void 0===this.firstActivityCallbacks){this.firstActivityCallbacks=[];let t=["keydown","mousemove","wheel","touchmove","touchstart"],e=()=>{t.forEach((t=>window.removeEventListener(t,e))),this.hadFirstActivity=!0,this.firstActivityCallbacks.forEach((t=>t())),this.firstActivityCallbacks=[]};t.forEach((t=>window.addEventListener(t,e,{passive:!0})))}return this.firstActivityCallbacks.push(t)}static onApproachingViewport(t,e,i=300){if("undefined"==typeof IntersectionObserver||this.isInLoadTriggerZone(t,i))return e();let s=new IntersectionObserver((t=>{t[0].isIntersecting&&(s.disconnect(),e())}),{rootMargin:i+"px"});return s.observe(t)}static convertToDialog(t){if(!t||"DIALOG"===t.tagName)return t;let e=document.createElement("dialog");return Array.from(t.attributes).forEach((t=>e.setAttribute(t.name,t.value))),e.append(...t.childNodes),Object.assign(e.style,{border:"0",padding:"0",margin:"0",maxHeight:"none",overflow:"visible"}),t.parentNode&&t.replaceWith(e),e}static isCrawler(){if(void 0!==this.cacheIsCrawler)return this.cacheIsCrawler;return this.cacheIsCrawler=new RegExp(["googlebot","googleother","google-inspectiontool","storebot-google","bingbot","bingpreview","applebot","duckduckbot","yandexbot","baiduspider","petalbot","seznambot","slurp","gptbot","oai-searchbot","chatgpt-user","claudebot","claude-web","claude-user","claude-searchbot","anthropic-ai","perplexity","duckassistbot","meta-externalagent","meta-externalfetcher","bytespider","amazonbot","ccbot","cohere-ai","youbot","diffbot","mistralai-user","imagesiftbot","timpibot","omgilibot","webzio-extended","ahrefsbot","semrushbot","screaming frog","dataforseo","chrome-lighthouse","prerender","facebookexternalhit","twitterbot","linkedinbot","slackbot","discordbot","telegrambot","embedly"].join("|"),"i").test(navigator.userAgent||""),this.cacheIsCrawler}static isWebpSupported(t){if(void 0!==this.cacheWebpSupported)return t(this.cacheWebpSupported);let e=e=>(this.cacheWebpSupported=e,t(e)),i=new Image;i.onload=()=>e(i.width>0&&i.height>0),i.onerror=()=>e(!1),i.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}static isDarkMode(){var t,e;return!!(null==(e=null==(t=null==window?void 0:window.matchMedia)?void 0:t.call(window,"(prefers-color-scheme:dark)"))?void 0:e.matches)}static isReducedMotion(){var t,e;return!!(null==(e=null==(t=null==window?void 0:window.matchMedia)?void 0:t.call(window,"(prefers-reduced-motion:reduce)"))?void 0:e.matches)}static waitForVisibility(t,e,i=0){if(t.offsetWidth>0)return i?setTimeout(e,i):e();new ResizeObserver((function(t){t[0].target.offsetWidth>0&&(e(),this.disconnect())})).observe(t)}static isInLoadTriggerZone(t,e=1200){let i=t.closest(".x-slide.slider-section");if(i&&i.classList.contains("is-current-slide"))return!0;let s=t.getBoundingClientRect();return s.right<=(window.innerWidth||document.documentElement.clientWidth)+e&&s.bottom<=(window.innerHeight||document.documentElement.clientHeight)+e}static getProxyUrl(t="eu"){if(!t){t={Europe:"eu"}[Intl.DateTimeFormat().resolvedOptions().timeZone.split("/")[0]]||"eu"}return{eu:{url:"https://de-proxy.trustindex.io/",key:"base64:3j5bZXQ07QEkVq0lFnTw5g=="}}[t]?{eu:{url:"https://de-proxy.trustindex.io/",key:"base64:3j5bZXQ07QEkVq0lFnTw5g=="}}[t].url+"trustindex-1stp/cdn-loader.php":""}static disableBodyScroll(){void 0===this.oldBodyScrollAttributes&&this.isBodyScrollApplicable()&&(this.oldBodyScrollAttributes={documentElement:{overflow:document.documentElement.style.overflow,position:document.documentElement.style.position,height:document.documentElement.style.height},body:{overflowX:document.body.style.overflowX,height:document.body.style.height}},document.documentElement.style.overflow="hidden",document.documentElement.style.position="relative",document.documentElement.style.height="unset",document.body.style.overflowX="unset",document.body.style.height="unset")}static enableBodyScroll(){if(void 0!==this.oldBodyScrollAttributes){for(let t in this.oldBodyScrollAttributes)for(let e in this.oldBodyScrollAttributes[t])document[t].style[e]=this.oldBodyScrollAttributes[t][e];delete this.oldBodyScrollAttributes}}static isBodyScrollApplicable(){if("hidden"===document.documentElement.style.overflow||"hidden"===document.documentElement.style.overflowX||"hidden"===document.body.style.overflow||"hidden"===document.body.style.overflowX)return!1;let t=window.getComputedStyle(document.documentElement);return"hidden"!==(t.overflow||"").split(" ")[0]&&"hidden"!==(t.overflowX||"")&&(t=window.getComputedStyle(document.body),"hidden"!==(t.overflow||"").split(" ")[0]&&"hidden"!==(t.overflowX||""))}static getFetchApi(){if(void 0!==this.fetchApi&&this.fetchApi)return this.fetchApi;let t=document.createElement("iframe");return document.body.appendChild(t),this.fetchApi=t.contentWindow.fetch.bind(window),t.remove(),this.fetchApi}static request(t,e="GET"){return new Promise(((i,s)=>{const r=new XMLHttpRequest;r.open(e,t,!0),r.onload=function(){r.status>=200&&r.status<300?i(r.responseText):i(!1)},r.onerror=function(){i(!1)},r.send()}))}}var e=(t,e,i)=>new Promise(((s,r)=>{var o=t=>{try{a(i.next(t))}catch(t){r(t)}},n=t=>{try{a(i.throw(t))}catch(t){r(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(o,n);a((i=i.apply(t,e)).next())}));class i extends t{static resize_widgets(){}static init(){}static init_pager(){-1!==decodeURIComponent(location.href).indexOf("page=testimonial-widgets/tabs/create-widget.php")&&(this.destroyWidgets(),this.initWidgetsFromDom(!0))}static setConstants(){this.setCommonConstants(),this.svgs={good:'',bad:''},this.additionalLogoStyles={"header-logo":{Google:"height: 25px; top: -2px",Facebook:"height: 17px",Trustindex:"height: 19px",Tripadvisor:"height: 24px; top: -2px",Airbnb:"height: 26px; top: -3px",Yelp:"height: 32px; top: -8px",Amazon:"height: 13px; top: 1px",Arukereso:"height: 17px; top: 5px",Vrbo:"height: 20px; top: -2px",BBB:"height: 25px; top: -2px",Expedia:"height: 25px; top: -3px",Ebay:"height: 25px; top: -2px",Sitejabber:"height: 20px; top: 1px",Thumbtack:"height: 25px; top: -3px",Provenexpert:"height: 25px; top: 1px",Hotels:"height: 22px; top: -1px",Zillow:"height: 17px",Yell:"height: 18px",Checkatrade:"height: 15px; top: 2px",Capterra:"height: 15px; top: 2px",Etsy:"height: 20px; top: 1px",WordpressPlugin:"height: 13px; top: 1px",AngiesList:"height: 24px; top: -1px",OnlinePenztarca:"height: 30px; top: -3px",ConsumerAffairs:"height: 30px; top: -3px",Reviewsio:"height: 20px; top: 0px",Foursquare:"height: 15px; top: 3px",Justdial:"height: 15px; top: 3px",Houzz:"height: 20px; top: -3px",Indeed:"height: 17px; top: 0px"},"large-logo":{Facebook:"width: 145px; height: 28px",Google:"width: 110px; height: 35px",Yelp:"width: 95px; height: 46px; top: -5px",Airbnb:"width: 120px; height: 38px",Tripadvisor:"width: 155px; height: 33px",Trustpilot:"width: 140px; height: 34px",Hotels:"width: 152px; height: 30px",Amazon:"width: 120px; height: 25px",Bookatable:"height: 27px; left: 7px",Foursquare:"height: 20px; top: 3px",Trustindex:"width: 152px; height: 26px; top: 3px",Booking:"height: 25px",Opentable:"height: 35px",Capterra:"height: 34px",Thumbtack:"height: 34px",Fresha:"height: 21px",Expedia:"height: 44px",Mobilede:"height: 35px",Checkatrade:"height: 22px",Pricerunner:"height: 21px",Easyweddings:"height: 50px; top: 3px",Whichtrustedtraders:"width: 80px; height: 55px; top: -15px; left: 10px",Abia:"width: 100px; height: 41px",WordpressPlugin:"height: 35px",Zoover:"height: 22px",Arukereso:"height: 25px","Arukereso-ro":"height: 29px",Pricespy:"height: 39px","Pricespy-dk":"height: 42px","Pricespy-fi":"height: 35px","Pricespy-fr":"height: 31px","Pricespy-no":"height: 43px",Szallashu:"height: 26px","Szallashu-com":"height: 29px","Szallashu-cz":"height: 47px","Szallashu-pl":"height: 34px","Szallashu-ro":"height: 29px"},"small-logo":{Facebook:"width: 78px; height: 15px; top: 1px",Google:"width: 62px; height: 20px; top: 1px",Yelp:"width: 45px; height: 22px; top: -3px",Airbnb:"width: 64px; height: 20px",Tripadvisor:"width: 97px; height: 21px; top: 1px",Trustpilot:"width: 65px; top: 2px",Hotels:"width: 100px; height: 20px",Amazon:"width: 68px; height: 20px; top: 1px",Bookatable:"width: 83px; height: 15px; top: 1px",Foursquare:"width: 98px; height: 13px; top: 3px",Trustindex:"width: 95px; height: 16px; top: 2px",Booking:"width: 90px; height: 15px; top: 3px",Opentable:"width: 100px; height: 23px; top: -1px",Capterra:"width: 79px; height: 18px; top: 1px",Thumbtack:"width: 79px; height: 18px; top: 2px",Fresha:"width: 93px; height: 13px; top: 2px; left: 1px",Expedia:"width: 65px; height: 19px; top: 2px",Zillow:"width: 67px; height: 14px; top: 2px",Reco:"width: 76px; height: 16px",Mobilede:"width: 68px; height: 16px; top: 2px",Checkatrade:"width: 90px; height: 13px; top: 1.5px",Pricerunner:"width: 102px; height: 14px; top: 1px",Easyweddings:"width: 60px; height: 20px",Whichtrustedtraders:"width: 34px; height: 23px; top: -1px",Abia:"width: 40px; height: 16px",Ebay:"width: 45px; height: 18px; top: 1px",BBB:"width: 42px; height: 16px; top: 2px",WordpressPlugin:"width: 85px; height: 11px; top: 2px",Arukereso:"width: 92px; height: 15px; top: 1px","Arukereso-bg":"width: 89px; height: 15px; top: 3px","Arukereso-ro":"width: 77px; height: 15px; top: 3px",Pricespy:"width: 69px; height: 18px","Pricespy-dk":"width: 64px; height: 18px","Pricespy-fi":"width: 77px; height: 18px","Pricespy-fr":"width: 88px; height: 18px","Pricespy-no":"width: 63px; height: 18px","Pricespy-nu":"width: 63px; height: 18px",Szallashu:"width: 76px; height: 13px; top: 2px","Szallashu-com":"width: 95px; height: 18px","Szallashu-cz":"width: 61px; height: 19px; top: 3px","Szallashu-pl":"width: 74px; height: 17px; top: 3px","Szallashu-ro":"width: 100px; height: 19px",Provenexpert:"width: 98px; height: 21px; top: 3px",Vrbo:"width: 45px; height: 15px; top: 1px",Yell:"width: 38px; height: 14px; top: 2.5px",AngiesList:"width: 27px; height: 16px; top: 3px",Sitejabber:"width: 85px; height: 16px; top: 4px",Aliexpress:"width: 67px; height: 16px; top: 3.5px"}},this.richSnippetLoaded=document.querySelectorAll('script[src*=".trustindex.io/assets/js/richsnippet.js"], script[type="application/ld+json"][data-trustindex="1"]').length>0}static loadRichSnippet(t){this.richSnippetLoaded||!t||this.isProxyUrl(this.getCDNUrl())||(this.richSnippetLoaded=!0,this.addJS(this.getCDNUrl()+"assets/js/richsnippet.js?"+t))}static loadWidgetsFromDom(){return e(this,null,(function*(){document.querySelectorAll(this.getScriptSelector("loader")).forEach((t=>{if(t.getAttribute("data-ti-widget-inited"))return;t.setAttribute("data-ti-widget-inited",!0);let i=this.getScriptKey(t);if(!i)return;let s=!this.isInIframe()&&this.isAttributeEnabled(t,"data-enable-delay-load");if("SCRIPT"===t.tagName){let e=document.createElement("div");e.key=t.key,this.addScriptEmbedNoticeForWordpress(t,i),t.replaceWith(e),t=e}t.key=i,t.isTriggerLoad=e=>this.isInLoadTriggerZone(t,e),(t=>{e(this,null,(function*(){let e=yield this.getWidgetHtml(t);if(!1===e)return t.innerHTML='\n\t\t\t\t\t\tWidget not found! Probably it is already deleted or there is typo in its ID.\n\t\t\t\t\t\tWe suggest that you log in to the Trustindex system and follow the widget configuration instructions.\n\t\t\t\t\t\tOr, if you don\'t have an account, create one for free at www.trustindex.io\n\t\t\t\t\t';if(!e)return t.replaceWith(document.createComment("Trustindex widget ("+t.key+") is empty here."));if(/style="[^"]*border: 4px dashed red[^"]*"/.test(e))return t.innerHTML=e;let i=-1!==e.indexOf('data-lazy-load-disabled="1"');s||this.isInIframe()||(s=-1!==e.indexOf('data-delay-load="1" class="ti-widget'));let r=/(?:data-layout-category="[^"]*floating[^"]*"|data-layout-id="(?:17|21|52|53)")/.test(e);if(t.closest("head")&&!r)return;t.contentHtml=e;let o=/data-rich-snippet="([^"]+)"/.exec(e);this.loadRichSnippet(o?o[1]:null),i||r||this.isCrawler()?new TrustindexWidget(null,t):t.isTriggerLoad(100)?s?window.tiElementToWaitForActivity.push(t):new TrustindexWidget(null,t):this.isInIframe()?this.onApproachingViewport(t,(()=>new TrustindexWidget(null,t))):(t.isWaitForVisibility=!0,window.tiElementToWaitForActivity.push(t))}))})(t)}))}))}static addScriptEmbedNoticeForWordpress(t,e){let i=document.querySelector('meta[name="ti-notice-script-tag"]');if(!i)return;let s="["+(i.getAttribute("content")||"trustindex")+' data-widget-id="'+e+'"]',r=document.createElement("div");r.setAttribute("style","margin: 20px 0px; padding: 15px; color: #31708f; background-color: #d9edf7; border-color: #bcdff1; border-radius: 5px"),r.innerHTML=`Do you want AI tools to understand your reviews?\n\t\t\t
Replace the JavaScript embed code with the shortcode below. Copy and paste it where you want the widget to appear. This makes your review content easier for search engines and AI tools to discover and understand.\n\t\t\t
\n\t\t\t\t${s}\n\t\t\t\t\n\t\t\t
\n\t\t\t(This message is not visible to visitors in public mode.)`;let o=r.querySelector("button");o.addEventListener("click",(()=>{navigator.clipboard.writeText(s).then((()=>{let t=o.textContent;o.textContent="✓",setTimeout((()=>o.textContent=t),1500)}))}));let n=document.querySelector('meta[name="ti-notice-dismiss-url"]');n&&this.addNoticeDismissLink(r,n.getAttribute("content")),t.before(r)}static initNoticesForWordpress(){document.querySelectorAll(".ti-wp-notice:not([data-ti-notice-inited])").forEach((t=>{t.setAttribute("data-ti-notice-inited","1");let e=t.getAttribute("data-ti-notice-dismiss-url");e&&this.addNoticeDismissLink(t,e,t.getAttribute("data-ti-notice-dismiss-text"))}))}static addNoticeDismissLink(t,e,i=null){let s=document.createElement("div");s.setAttribute("style","margin-top: 10px; text-align: right");let r=document.createElement("a");r.setAttribute("href","#"),r.setAttribute("style","color: inherit; text-decoration: underline; cursor: pointer"),r.textContent=i||"Dismiss",r.addEventListener("click",(i=>{i.preventDefault(),t.remove(),this.request(e,"POST").then((t=>{}))})),s.appendChild(r),t.appendChild(s)}static initWidgetsFromDom(t=!1,e,i){let s=this.widgetsForInit||document.querySelectorAll(".ti-widget:not(.ti-certificate):not(.ti-feed-widget)"+(t?"":":not([data-trustindex-widget])"));s.forEach((t=>this.loadRichSnippet(t.getAttribute("data-rich-snippet")))),void 0!==e&&s.length?(void 0===this.widgetsForInit&&(this.widgetsForInit=s),new TrustindexWidget(s[e]),++ethis.initWidgetsFromDom(t,e,i)),20):(delete this.widgetsForInit,i&&i())):(s.forEach((t=>new TrustindexWidget(t))),i&&i())}static getWidgetHtml(t){return e(this,null,(function*(){let e=this.getWidgetUrl(t.key)+"content.html";if("wp-widget"===t.key){let i=t.getAttribute("data-template-id");if(i){let e=document.getElementById(i);if(e)return t.removeAttribute("data-template-id"),e.innerHTML.replace(/decoding="async"/g,"").replace(/ (?:src|srcset|data-src|data-srcset|data-ti-src|data-ti-srcset|consent-original-src-_|consent-original-srcset-_|consent-original-data-src-_|consent-original-data-srcset-_)="(?!http)[^"]*"/g,"").replace(/data-ti-src="[^"]+lazy\.(png|jpg|jpeg|gif|svg)"/g,"").replace(/consent-original-class-_="/g,'class="').replace(/consent-original-src-_="/g,'src="').replace(/consent-original-srcset-_="/g,'srcset="').replace(/consent-original-data-src-_="/g,'data-src="').replace(/consent-original-data-srcset="/g,'data-srcset="').replace(/