(self.AMP=self.AMP||[]).push({n:"amp-embedly-card",ev:"0.1",l:true,v:"2108132216000",m:0,f:function(AMP,_){"use strict";function aa(a){var b=0;return function(){return b","amp-embedly-key",this.element)};U.prototype.isLayoutSupported=function(a){return"nodisplay"===a};var V,Aa="Webkit webkit Moz moz ms O o".split(" ");function Ba(a){var b=a.style;if("border".startsWith("--"))b="border";else{V||(V=Object.create(null));var c=V.border;if(!c){c="border";if(void 0===b.border){var d;b:{for(d=0;d: %s",b);var c=0;for(var d=a;d&&d!=d.parent;d=d.parent)c++;c=String(c)+"-"+Fa(a);var g,e=d={},f=b.dataset;for(g in f)g.startsWith("vars")||(e[g]=f[g]);if(g=b.getAttribute("json")){g=E(g);if(void 0===g)throw va().createError("Error parsing JSON in json attribute in element %s",b);for(var h in g)e[h]=g[h]}h=d;d=Date.now();e=b.getAttribute("width");g=b.getAttribute("height");h=h?h:{};h.width=la(e);h.height=la(g);b.getAttribute("title")&&(h.title=b.getAttribute("title"));var u=a.location.href;"about:srcdoc"==u&&(u=a.parent.location.href);var m=T(b),w=za(b,"documentInfo").get();e=za(b,"viewer").getUnconfirmedReferrerUrl();var q=b.ownerDocument.body;f=g=0;for(var v=b;v&&v!=q;v=v.offsetParent)g+=v.offsetLeft,f+=v.offsetTop;q=b.offsetWidth;v=b.offsetHeight;var l={left:g,top:f,width:q,height:v,bottom:f+v,right:g+q,x:g,y:f};g=h;f=H();q=K.thirdParty+"/"+H()+"/ampcontext-v0.js";v=w.sourceUrl;var Ia=w.canonicalUrl;w=w.pageViewId;u={href:u};var Ja=b.tagName,y=self;if(y.__AMP_MODE)var F=y.__AMP_MODE;else{var p=ra(y)||ra(y);p=["1","actions","amp","amp4ads","amp4email"].includes(p.development)||!!y.AMP_DEV_MODE;L||(L=(null==(F=y.AMP_CONFIG)?void 0:F.v)||"01"+H());F=y.__AMP_MODE={localDev:!1,development:p,esm:!1,test:!1,rtvVersion:L}}F={localDev:!1,development:!1,esm:!1,test:!1,rtvVersion:F.rtvVersion};var O;y=!(null==(O=a.AMP_CONFIG)||!O.canary);O=!m.isVisible();m=l?{left:l.left,top:l.top,width:l.width,height:l.height}:null;l=b;p=[];for(var z=0;1==(null==l?void 0:l.nodeType)&&25>z;){var P="";l.id&&(P="/"+l.id);var ba=l.nodeName.toLowerCase(),G=p,Ka=G.push;P=""+ba+P;ba=l.nodeName;for(var ca=0,Q=0,R=l.previousElementSibling;R&&25>Q&&100>ca;)R.nodeName==ba&&Q++,ca++,R=R.previousElementSibling;Ka.call(G,P+(25>Q&&100>ca?"."+Q:""));z++;l=l.parentElement}l=p.join();p=l.length;z=5381;for(G=0;G>>0);if(a.__AMP__EXPERIMENT_TOGGLES)a=a.__AMP__EXPERIMENT_TOGGLES;else{a.__AMP__EXPERIMENT_TOGGLES=Object.create(null);p=a.__AMP__EXPERIMENT_TOGGLES;var n,x,wa;z=Object.assign({},null!=(x=a.AMP_CONFIG)?x:{},null!=(wa=a.AMP_EXP)?wa:JSON.parse((null==(n=a.__AMP_EXP)?void 0:n.textContent)||"{}"));for(var A in z)n=z[A],"number"===typeof n&&0<=n&&1>=n&&(p[A]=Math.random() %s","amp-embedly-card",this.element);var a=document.querySelector("amp-embedly-key");a&&(this.A=a.getAttribute("value"))};Z.prototype.layoutCallback=function(){var a=this;this.A&&this.element.setAttribute("data-card-key",this.A);var b=Ga(this.win,this.element);b.title=this.element.title||"Embedly card";Ua(b,(function(c){a.forceChangeHeight(c.height)}));b.classList.add("i-amphtml-fill-content");this.getVsync().mutate((function(){a.element.appendChild(b)}));this.j=b;return this.loadPromise(b)};Z.prototype.unlayoutCallback=function(){if(this.j){var b,a=this.j;null==(b=a.parentElement)||b.removeChild(a);this.j=null}return!0};Z.prototype.isLayoutSupported=function(a){return"responsive"==a};Z.prototype.preconnectCallback=function(a){xa(this.win,"preconnect").url(this.getAmpDoc(),"https://cdn.embedly.com",a)};(function(a){a.registerElement("amp-embedly-card",Z);a.registerElement("amp-embedly-key",U)})(self.AMP)}});//# sourceMappingURL=amp-embedly-card-0.1.js.map