var w=document.createElement("script");function inIframe(){try{return window.self!==window.top}catch(t){return!1}}function tryParseJson(t,e){try{e=Object.assign(e,JSON.parse(t))}catch(t){return!1}return!0}w.type="text/javascript",w.src=trustpilot_widget_script_url,w.async=!0,document.head.appendChild(w),inIframe()&&window.addEventListener("message",function(t){var e=new URL(window.location).hostname;if(t.data&&-1!==t.origin.indexOf(e)){var r={};if("undefined"!=typeof TrustpilotPreview)"string"==typeof t.data&&"submit"===t.data?TrustpilotPreview.sendTrustboxes():tryParseJson(t.data,r)&&(r.trustbox?TrustpilotPreview.setSettings(r.trustbox):r.customised&&TrustpilotPreview.updateActive(r.customised));else if(tryParseJson(t.data,r)){var i=document.createElement("script");i.type="text/javascript",i.onload=function(){const e=t.source.parent.document.getElementById("configuration_iframe").contentWindow;TrustpilotPreview.init([trustpilot_preview_css_url],r,e,t.source)},i.src=trustpilot_preview_script_url,document.head.appendChild(i)}}});
//# sourceMappingURL=preview.min.js.map
