"use strict";async function kord_io_init(){var t=document.getElementsByClassName("kord-io-widget");if(0!==t.length){var e=Math.min(t.length,10);async function r(e){var i=t[e];try{const t="kord-io-widget-"+e,a="Nr2LxBsvmHfjgI2Fa3-8xIrvq8-7i-EXWSTZ6kQExHA",o=i.getAttribute("data-vin")||"",s=i.getAttribute("data-mileage")||"",n=i.getAttribute("data-mileage-unit")||"",d=i.getAttribute("data-year")||"",l=i.getAttribute("data-make")||"",g=i.getAttribute("data-model")||"",c=i.getAttribute("data-trim")||"",u=parseInt(i.getAttribute("data-price"))||0,h=isNaN(u)?0:u,m=i.getAttribute("data-condition")||"",y=i.getAttribute("data-intrinsic-height")||!1;var r=document.getElementById(t);if(r&&i.removeChild(r),!o||!s||!n)return;let b="";try{const t=await fetch("https://labs.kord.io/kapi/initWidget/",{method:"POST",body:JSON.stringify({apiKey:a,vin:o,mileage:s,unit:n,year:d,make:l,model:g,trim:c,condition:m})});b=(await t.json()).report_id}catch(t){console.error(t)}const p=document.createElement("iframe");p.setAttribute("id",t),p.setAttribute("class","kord-io-iframe"),p.setAttribute("title","kord.io widget"),p.setAttribute("scrolling","no"),p.setAttribute("frameBorder","0"),p.setAttribute("src","https://labs.kord.io/widgets/w/?reportId="+(b||"")+"&vin="+o+"&price="+h+"&apiKey="+a+"&widgetId="+t+"&intrinsicHeight="+!!y),p.style.display="block",p.style.position="absolute",p.style.top="0",p.style.left="0",p.style.width="100%",p.style.height=y?"1000px":"100%",i.style.display="block",i.style.position="relative",i.style.width="100%",y||(i.style.height="100%"),i.appendChild(p)}catch(t){console.error(t)}}for(var i=0;i{if("https://labs.kord.io"!==t.origin)return;const e=t.data,i=document.getElementById(e.widgetId);i&&(i.style.height=e.height+"px");const r=i?i.parentElement:null;r&&(r.style.height=e.height+"px")}))}else setTimeout(kord_io_init,1500)}setTimeout(kord_io_init,150);