!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";!function(){const t={DASH_PUBLIC_API:"https://api-beta.dealerinnovations.com/api/v1/public/dealers",DEV_URL:""};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,t)}catch(t){}globalThis.process={env:t}}();var t=function(){return fetch("".concat(process.env.DASH_PUBLIC_API,"?url=").concat(process.env.DEV_URL||document.location.host)).then((function(t){return t.json()}))},e=function(){return document.querySelectorAll("div[data-dash-vehicle-vin]").length},n=function(t){console.log(t);for(var e=document.querySelectorAll("div[data-dash-vehicle-vin]"),n=t&&t.customer_data&&t.customer_data.widget&&t.customer_data.widget.button,o=function(){var o=e[i].getAttribute("data-dash-vehicle-vin"),c=document.createElement("div");c.innerHTML=n?"
\n ').concat(n.buttonTitle||"Buy now on Dash","\n
"):"\n
\n Buy Online\n
\n",c.onclick=function(){var e=document.createElement("iframe");e.src=t.domain&&t.domain.indexOf("http")>-1?"".concat(t.domain,"/vehicle/").concat(o):"https://".concat(t.domain,"/vehicle/").concat(o,"?iframe=").concat(window.location.host),e.style.position="fixed",e.style.top="0px",e.style.bottom="0px",e.style.left="0px",e.style.right="0px",e.width="100%",e.height="100%",e.style.border="none",e.style.zIndex="9999";var n=document.createElement("div");n.style.zIndex="9999",n.id="dash--iframe-wrapper",n.style.position="fixed",n.style.top="0px",n.style.bottom="0px",n.style.left="0px",n.style.right="0px",n.style.backgroundColor="white",n.style.width="100vw",n.style.height="100vh",n.style.display="flex";var i=document.createElement("img");i.src="http://media.giphy.com/media/s4KqhlPU9Ypnq/giphy.gif",i.style.width="100px",i.style.height="100px",i.style.objectFit="contain",i.style.margin="auto",n.appendChild(i),n.appendChild(e);var c=document.createElement("div");c.style.position="fixed",c.style.top="20px",c.style.right="20px",c.style.backgroundColor="#000",c.style.width="50px",c.style.height="50px",c.style.color="#fff",c.style.borderRadius="25px",c.textContent="X",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.padding="15px",c.style.zIndex="10000",c.onclick=function(){document.getElementById("dash--iframe-wrapper").remove()},n.appendChild(c),document.body.appendChild(n)},c.style.textDecoration="auto",e[i].appendChild(c)},i=0;i