(()=>{"use strict";var e={5385:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AggEvent=void 0;const r=i(s(4890));class n{constructor(e,t){this.queue=[],this.timerHandle=0,this.flush=()=>{if(clearTimeout(this.timerHandle),0===this.queue.length)return;const e={organization_id:this.organization_id,sid:r.default.getId()||"",events:[...this.queue]};this.queue=[],this.api.sendBeacon("/agg-event",e)},this.send=e=>{this.queue.push(e),clearTimeout(this.timerHandle),this.queue.length>=n.maxQueueLength?this.flush():this.timerHandle=setTimeout(this.flush,n.sendDelay)},this.api=e,this.organization_id=t,window.addEventListener("visibilitychange",this.flush),window.addEventListener("pagehide",this.flush)}}t.AggEvent=n,n.maxQueueLength=10,n.sendDelay=1e3},9563:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(s(4890));t.default=class{constructor(e){this.apiDomain=e}request(e,t,s,i){const n=new XMLHttpRequest;"/"===t.charAt(0)&&(t=`${this.apiDomain}${t}`);const a=r.default.getId();if(a)t+=t.indexOf("?")<0?`?sid=${a}`:`&sid=${a}`;else{const e=encodeURIComponent(document.referrer);t+=t.indexOf("?")<0?`?referrer=${e}`:`&referrer=${e}`}n.open(e,t),"GET"===e||"HEAD"===e?n.send():(n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.send(JSON.stringify(s))),n.onload=function(){if(200!=n.status)i({status:n.status,message:n.statusText});else{const t="HEAD"!==e?JSON.parse(n.response):{};i(null,t)}},n.onerror=function(){i({status:n.status,message:n.statusText})}}get(e,t){return this.request("GET",e,void 0,t)}post(e,t,s){return this.request("POST",e,t,s)}head(e,t){return this.request("HEAD",e,{},t)}sendBeacon(e,t){const s=this.apiDomain+e;navigator.sendBeacon?navigator.sendBeacon(s,new Blob([JSON.stringify(t)])):this.post(s,t,(()=>{}))}}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){this.setupConversion(e)}setupConversion(e){const{querySelector:t,id:s}=e;document.querySelectorAll(t).forEach((e=>e.addEventListener("submit",(e=>tmary("conversion",{id:s})))))}}},4890:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;const s=(e=6)=>{try{let t="";return window.crypto.getRandomValues(new Uint8Array(e)).forEach((e=>{t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-".charAt(e>>2)})),t}catch(e){return Math.random().toString()}},i=()=>({id:s(),updatedAt:(new Date).getTime(),referrer:document.referrer,conversions:[],experiments:{}});class r{constructor(){const e=this.loadSession();if(e){this.session=e,void 0===this.session.id&&(this.session.id=s()),void 0===this.session.referrer&&(this.session.referrer=document.referrer);const t=(new Date).getTime();void 0===this.session.updatedAt&&(this.session.updatedAt=t);const r=t-this.session.updatedAt;(""!==document.referrer&&!document.referrer.startsWith(window.location.origin)&&this.session.referrer!==document.referrer||r>36e5)&&(this.session={...this.session,...i()}),this.session.updatedAt=t,Array.isArray(this.session.conversions)||(this.session.conversions=[])}else this.session=i();this.writeSession()}loadSession(){try{const e=localStorage.getItem("tmary");if(!e)return null;return JSON.parse(e)}catch(e){return null}}writeSession(){try{localStorage.setItem("tmary",JSON.stringify(this.session))}catch(e){}}clear(){this.session=i(),this.writeSession()}getId(){return this.session.id}}t.Session=r,t.default=new r},8980:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tmary=void 0;t.tmary=(e,t)=>{const{tmary:s}=window;"function"==typeof s&&s(e,t)}},5214:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(s(9563)),n=i(s(3734)),a=i(s(1734)),o=i(s(400));t.default=class{constructor(e,t){this.updateApp=e=>{e&&e.conversions&&this.setupConversionTracking(e.conversions),e&&(e.popup&&(this.popup=new a.default(e.popup)),e.widget&&(this.widget=new o.default(null,this.aggEvent,e.widget)))},this.api=new r.default("https://embed.trustmary.io"),this.appId=e,this.aggEvent=t,this.loadApp(this.updateApp)}loadApp(e){this.api.get(`/app/${this.appId}?${(()=>{const e={locale:navigator.language,timezoneOffset:(new Date).getTimezoneOffset(),href:window.location.href};return Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join("&")})()}`,((t,s)=>{if(t)return console.log(t);e(s)}))}setupConversionTracking(e){e.forEach((e=>{new n.default(e)}))}}},1130:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=s(9871);t.default=class{constructor(e,t,s){this.postMessage=(e,t={})=>{this.frame.contentWindow?.postMessage({frameId:this.id,type:e,attr:t},"*")},null!=t&&(this.id=`embed-${e}`,this.el=this.parseEl(t),this.embedId=t.dataset.trustmaryEmbed,this.doc=t.ownerDocument,this.frameLoaded=!1,this.attributes=(0,i.parseElementAttributes)(t),this.handleFrameMessage=this.handleFrameMessage.bind(this),this.siteStyles="string"==typeof s?s.trim():"",this.renderFrame())}parseEl(e){if("A"===e.tagName){const t=e.ownerDocument.createElement("div");t.classList.add("trustmary-embed-root");const s=e;return s.parentNode?.insertBefore(t,s),s.target="_blank",s.style.cssText="\n display: block;\n text-decoration: none;\n text-indent: -5000em;\n background: url('https://d2nce6johdc51d.cloudfront.net/img/tm-badge.svg') no-repeat center center rgba(0,0,0,0.3);\n border-radius: 2px;\n border: none;\n width: 88px;\n height: 25px;\n margin: 20px auto;\n padding: 0;\n position: static;\n ",t}return e.classList.add("trustmary-embed-root"),e}renderFrame(){this.frame=this.doc.createElement("iframe"),this.frame.onload=()=>this.handleFrameLoad(),this.frame.id=`trustmary-embed-frame-${this.id}`,this.frame.style.cssText="display: block;width: 1px; min-width: 100%;height: 0;border:none;max-height: none;background: transparent;",this.frame.src="about:blank",this.frame.scrolling="no",this.el.appendChild(this.frame),this.frame.contentWindow?.document.open(),this.frame.contentWindow?.document.write(this.getFrameContents()),this.frame.contentWindow?.document.close()}getFrameContents(){return`\n\n\n \n