; (self.AMP=self.AMP||[]).push({m:0,v:"2305252018001",n:"amp-instagram",ev:"0.1",l:!0,f:function(n,t){!function(){function t(n,r){return(t=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,r)}function r(n){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function e(n){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function i(n,t){if(t&&("object"===e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n)}Array.isArray;var o=Object.prototype,u=(o.hasOwnProperty,o.toString);function f(n){return"[object Object]"===u.call(n)}var c,a=["Webkit","webkit","Moz","moz","ms","O","o"];function s(n,t,r,e,i){var o=function(n,t,r){if(t.startsWith("--"))return t;var e;c||(e=Object.create(null),c=e);var i=c[t];if(!i||r){if(i=t,void 0===n[t]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(t),u=function(n,t){for(var r=0;r %s",t=this.element,(l.user||(l.user=d()),void l.user.win?l.userForEmbed||(l.userForEmbed=d()):l.user).assert(n,"The data-shortcode attribute is required for %s",t,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined)),this.Jnn=this.element.hasAttribute("data-captioned")?"captioned/":""},a.isLayoutSupported=function(n){return function(n){return"fixed"==n||"fixed-height"==n||"responsive"==n||"fill"==n||"flex-item"==n||"fluid"==n||"intrinsic"==n}(n)},a.layoutCallback=function(){var n,t,r,e,i,o,u,f,c=this,a=this.element.ownerDocument.createElement("iframe");return this.wb=a,this.kb=(n=this.win,t="message",r=this.Znn.bind(this),e=void 0,i=n,o=r,u=function(n){try{return o(n)}catch(n){var t,r;throw null===(t=(r=self).__AMP_REPORT_ERROR)||void 0===t||t.call(r,n),n}},f=function(){if(void 0!==m)return m;m=!1;try{var n={get capture(){return m=!0,!1}};self.addEventListener("test-options",null,n),self.removeEventListener("test-options",null,n)}catch(n){}return m}(),i.addEventListener(t,u,!!f&&e),function(){null==i||i.removeEventListener(t,u,!!f&&e),o=null,i=null,u=null}),a.setAttribute("scrolling","no"),a.setAttribute("frameborder","0"),a.setAttribute("allowtransparency","true"),a.setAttribute("title","Instagram: "+this.element.getAttribute("alt")),a.src="https://www.instagram.com/p/"+encodeURIComponent(this.Bnn)+"/embed/"+this.Jnn+"?cr=1&v=12",function(n,t){n.classList.add("i-amphtml-fill-content")}(a),this.element.appendChild(a),s(a,"opacity",0),this.Inn=this.loadPromise(a).then((function(){c.getVsync().mutate((function(){s(a,"opacity",1)}))}))},a.Znn=function(n){var t=this;if("https://www.instagram.com"==n.origin&&n.source==this.wb.contentWindow){var r=function(n){return n.data}(n);if(r&&(f(r)||r.startsWith("{"))){var e=f(r)?r:function(n,t){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r);if(void 0!==e&&"MEASURE"==e.type&&e.details){var i=e.details.height;this.getVsync().measure((function(){t.wb&&t.wb.offsetHeight!==i&&t.forceChangeHeight(i)}))}}}},a.unlayoutOnPause=function(){return!0},a.unlayoutCallback=function(){var n,t;return this.wb&&(null===(t=(n=this.wb).parentElement)||void 0===t||t.removeChild(n),this.wb=null,this.Inn=null),this.kb&&this.kb(),!0},c}(n.BaseElement);n.registerElement("amp-instagram",p,"amp-instagram.amp-instagram-default-framing{border:1px solid #dbdbdb!important}\n/*# sourceURL=/extensions/amp-instagram/0.1/amp-instagram.css*/")}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-instagram-0.1.js.map