; (self.AMP=self.AMP||[]).push({m:0,v:"2301261900000",n:"amp-facebook",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 o(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)}var i=Array.isArray;function u(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r=n.length?{done:!0}:{done:!1,value:n[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f=Object.prototype,c=f.hasOwnProperty,l=f.toString;function s(n){var t=Object.create(null);return n&&Object.assign(t,n),t}function v(n,t,r,e,o,i,u,a,f,c,l){return n}function h(n){return JSON.parse(n)}function d(n,t){try{return h(n)}catch(n){return null==t||t(n),null}}function m(n){var t,r=parseFloat(n);return"number"==typeof(t=r)&&isFinite(t)?r:void 0}var p=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function b(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return t}}function y(n){var t,r=s();if(!n)return r;for(;t=p.exec(n);){var e=b(t[1],t[1]),o=t[2]?b(t[2].replace(/\+/g," "),t[2]):"";r[e]=o}return r}function g(n){var t=(n||self).location;return y(t.originalHash||t.hash)}var w="";function j(n){var t=n||self;return t.__AMP_MODE?t.__AMP_MODE:t.__AMP_MODE=function(n){return{localDev:!1,development:S(n,g(n)),esm:!1,test:!1,rtvVersion:O(n),ssrReady:!1}}(t)}function O(n){var t;return w||(w=(null===(t=n.AMP_CONFIG)||void 0===t?void 0:t.v)||"01".concat("2301261900000")),w}function S(n,t){var r=t||g(n);return["1","actions","amp","amp4ads","amp4email"].includes(r.development)||!!n.AMP_DEV_MODE}function E(n,t,r){return t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n}function k(n){var t=Object.getOwnPropertyDescriptor(n,"message");if(null!=t&&t.writable)return n;var r=n.message,e=n.stack,o=new Error(r);for(var i in n)o[i]=n[i];return o.stack=e,o}function x(n){for(var t,r=null,e="",o=a(arguments,!0);!(t=o()).done;){var i=t.value;i instanceof Error&&!r?r=k(i):(e&&(e+=" "),e+=i)}return r?e&&(r.message=e+": "+r.message):r=new Error(e),r}function A(n){var t,r;null===(t=(r=self).__AMP_REPORT_ERROR)||void 0===t||t.call(r,n)}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var I=self.__AMP_LOG;function R(n,t){throw new Error("failed to call initLogConstructor")}function M(n){return I.user||(I.user=F()),function(n,t){return t&&t.ownerDocument.defaultView!=n}(I.user.win,n)?I.userForEmbed||(I.userForEmbed=F()):I.user}function F(n){return R()}function T(){return I.dev||(I.dev=R())}function N(n,t,r,e,o,i,u,a,f,c,l){return n}function C(n,t,r,e,o,i,u,a,f,c,l){return M().assert(n,t,r,e,o,i,u,a,f,c,l)}function P(n,t){return L(n=function(n){return n.__AMP_TOP||(n.__AMP_TOP=n)}(n),t)}function V(n,t){return L((r=_(n),(e=_(r)).isSingleDoc()?e.win:e),t);var r,e}function _(n){return n.nodeType?(r=n,t=(r.ownerDocument||r).defaultView,P(t,"ampdoc")).getAmpDoc(n):n;var t,r}function L(n,t){N(function(n,t){var r=n.__AMP_SERVICES&&n.__AMP_SERVICES[t];return!(!r||!r.ctor)}(n,t));var r=function(n){var t=n.__AMP_SERVICES;return t||(t=n.__AMP_SERVICES={}),t}(n)[t];return r.obj||(N(r.ctor),N(r.context),r.obj=new r.ctor(r.context),N(r.obj),r.context=null,r.resolve&&r.resolve(r.obj)),r.obj}var U,z;function B(n){return n.data}function D(n){return function(n,t){if(v(1===t.length),v(Array.isArray(t)||(e=t,c.call(e,"raw"))),self.trustedTypes&&self.trustedTypes.createPolicy){var r=self.trustedTypes.createPolicy("static-template#createNode",{createHTML:function(n){return t[0]}});n.innerHTML=r.createHTML("ignored")}else n.innerHTML=t[0];var e,o=n.firstElementChild;return v(o),v(!o.nextElementSibling),n.removeChild(o),o}(z,n)}var G,J=[''],H=["Webkit","webkit","Moz","moz","ms","O","o"];function q(n,t,r,e,o){var i=function(n,t,r){if(t.startsWith("--"))return t;G||(G=s());var e=G[t];if(!e||r){if(e=t,void 0===n[t]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(t),i=function(n,t){for(var r=0;r>>0)}(function(n){for(var t=[],r=0;1==(null==(i=n)?void 0:i.nodeType)&&r<25;){var e="";n.id&&(e="/".concat(n.id));var o=n.nodeName.toLowerCase();t.push("".concat(o).concat(e).concat(K(n))),r++,n=n.parentElement}var i;return t.join()}(n))},n}();function K(n){for(var t=n.nodeName,r=0,e=0,o=n.previousElementSibling;o&&e<25&&r<100;)o.nodeName==t&&e++,r++,o=o.previousElementSibling;return e<25&&r<100?".".concat(e):""}function W(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}function Z(n){for(var t=1;t=0&&d<=1&&(f[l]=Math.random()=0&&t.indexOf(r,e)==e);var t,r,e}new Set(["c","v","a","ad"]);var un=function(){return self.AMP.config.urls}(),an={};function fn(n,t,r,e){var o=r||t.getAttribute("type");C(o,"Attribute type required for : %s",t);var i=function(n){for(var t=0,r=n;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+sn(n)}(n),u={};return function(n,t){var r=n.dataset;for(var e in r)e.startsWith("vars")||(t[e]=r[e]);var o=n.getAttribute("json");if(o){var i=d(o);if(void 0===i)throw M().createError("Error parsing JSON in json attribute in element %s",n);for(var u in i)t[u]=i[u]}}(t,u),u=function(n,t,r,e){var o=Date.now(),i=t.getAttribute("width"),u=t.getAttribute("height");(e=e||{}).width=m(i),e.height=m(u),t.getAttribute("title")&&(e.title=t.getAttribute("title"));var a=n.location.href;"about:srcdoc"==a&&(a=n.parent.location.href);var f,c,l,s,v=_(t),h=V(t,"documentInfo").get(),d=(s=t,V(s,"viewer")).getUnconfirmedReferrerUrl(),p=function(n){for(var t=n.ownerDocument.body,r=0,e=0,o=n;o&&o!=t;o=o.offsetParent)r+=o.offsetLeft,e+=o.offsetTop;var i=n.offsetHeight;return function(n,t,r,e){return{left:n,top:t,width:r,height:e,bottom:t+e,right:n+r,x:n,y:t}}(r,e,n.offsetWidth,i)}(t);e._context={"ampcontextVersion":"2301261900000","ampcontextFilepath":"".concat(tn.thirdParty,"/").concat("2301261900000","/ampcontext-v0.js"),"sourceUrl":h.sourceUrl,"referrer":d,"canonicalUrl":h.canonicalUrl,"pageViewId":h.pageViewId,"location":{"href":a},"startTime":o,"tagName":t.tagName,"mode":{localDev:!1,development:j(l).development,esm:j(l).esm,test:!1,rtvVersion:j(l).rtvVersion},"canary":(f=n,!(null===(c=f.AMP_CONFIG)||void 0===c||!c.canary)),"hidden":!v.isVisible(),"initialLayoutRect":p?{"left":p.left,"top":p.top,"width":p.width,"height":p.height}:null,"domFingerprint":X.generate(t),"experimentToggles":Q(n),"sentinel":r};var b=t.getAttribute("src");return b&&(e.src=b),e}(n,t,i,u),u.type=o,Object.assign(u._context,e),u}function cn(n){return"".concat(un.thirdParty,"/").concat("2301261900000","/vendor/").concat(n).concat(".js")}function ln(n,t,r){return function(n,t,r){var e=t.getMetaByName("amp-3p-iframe-src");if(!e)return null;var o=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"source";return C(null!=n,"%s %s must be available",t,r),C(on(n)||/^\/\//.test(n),'%s %s must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: %s',t,r,n),n}(e,'meta[name="amp-3p-iframe-src"]');C(-1==o.indexOf("?"),"3p iframe url must not include query string %s in element %s.",o,e);var i=en(o);return C("localhost"==i.hostname&&!r||i.origin!=en(n.location.href).origin,"3p iframe url must not be on the same origin as the current document %s (%s) in element %s. See https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-iframe-origin-policy.md for details.",o,i.origin,e),"".concat(o,"?").concat("2301261900000")}(n,t,r)||function(n,t){return n.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=n.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+sn(n),"https://"+n.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(un.thirdPartyFrameHost,"/").concat("2301261900000","/")+"".concat("frame",".html")}(n)}function sn(n){var t;if(n.crypto&&n.crypto.getRandomValues){var r=new Uint32Array(2);n.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(n.Math.random()).substr(2)+"0";return t}function vn(n){if(n.sandbox&&n.sandbox.supports){for(var t=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],r=0;r=0;r--){var e=n[r];if(!e.frame.contentWindow){n.splice(r,1);var o=e.events;for(var i in o)o[i].splice(0,1/0).forEach((function(n){n(t)}))}}}var yn=function(n){!function(n,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),r&&t(n,r)}(a,n);var e,i,u=(e=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}(),function(){var n,t=r(e);if(i){var u=r(this).constructor;n=Reflect.construct(t,arguments,u)}else n=t.apply(this,arguments);return o(this,n)});function a(n){var t;return(t=u.call(this,n)).ob=null,t.rR=n.hasAttribute("data-locale")?n.getAttribute("data-locale"):window.navigator.language.replace("-","_"),t.Qb=null,t.oR=0,t}a.createLoaderLogoCallback=function(n){return function(n){var t,r;return{color:"#1877F2",content:(r=(t=n).ownerDocument||t,z&&z.ownerDocument===r||(z=r.createElement("div")),D)(J)}}(n)};var f=a.prototype;return f.renderOutsideViewport=function(){return.75},f.preconnectCallback=function(n){var t=P(this.win,"preconnect");t.url(this.getAmpDoc(),"https://facebook.com",n),t.preload(this.getAmpDoc(),"https://connect.facebook.net/"+this.rR+"/sdk.js","script"),function(n,t,r,e){var o=ln(n,r);e.preload(r,o,"document"),e.preload(r,cn("facebook"),"script")}(this.win,0,this.getAmpDoc(),t)},f.isLayoutSupported=function(n){return function(n){return"fixed"==n||"fixed-height"==n||"responsive"==n||"fill"==n||"flex-item"==n||"fluid"==n||"intrinsic"==n}(n)},f.layoutCallback=function(){var n,t,r=this,e=this.element.getAttribute("data-embed-as");if("comment"!==e){C(!e||-1!==["post","video"].indexOf(e),'Attribute data-embed-as for value is wrong, should be "post" or "video" but was: %s',e);var o=function(n,t,r,e){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=o.allowFullscreen,u=void 0!==i&&i,a=o.initialIntersection;N(void 0===t.isConnected||!0===t.isConnected);var f=fn(n,t,r,e);a&&(f._context.initialIntersection=a);var c=n.document.createElement("iframe");an[f.type]||(an[f.type]=0),an[f.type]+=1;var l=t.getAmpDoc(),s=ln(n,l),v=en(s).hostname,h=JSON.stringify({"host":v,"bootstrap":cn(f.type),"type":f.type,"count":an[f.type],"attributes":f});return c.src=s,c.ampLocation=en(s),c.name=h,f.width&&(c.width=f.width),f.height&&(c.height=f.height),f.title&&(c.title=f.title),u&&c.setAttribute("allowfullscreen","true"),c.setAttribute("scrolling","no"),q(c,"border","none"),c.onload=function(){this.readyState="complete"},c.setAttribute("allow","sync-xhr 'none';"),["facebook"].includes(r)||vn(c),c.setAttribute("data-amp-3p-sentinel",f._context.sentinel),c}(this.win,this.element,"facebook");return o.title=this.element.title||"Facebook",o.classList.add("i-amphtml-fill-content"),this.element.hasAttribute("data-allowfullscreen")&&o.setAttribute("allowfullscreen","true"),function(n,t,r,e,o,i){N(n.src),N(!n.parentNode),N(r);var u=n.ownerDocument.defaultView;!function(n){n.listeningFors||n.addEventListener("message",(function(t){if(B(t)){var r=function(n){return"string"==typeof n&&(n="{"==n.charAt(0)?d(n,(function(n){T().warn("IFRAME-HELPER","Postmessage could not be parsed. Is it in a valid JSON format?",n)}))||null:hn(n)?function(n){if(!hn(n))return null;var t=n.indexOf("{");return v(-1!=t),d(n.substr(t),(function(t){!function(n){var t=x.apply(null,arguments);setTimeout((function(){throw A(t),t}))}(new Error("MESSAGING: Failed to parse message: ".concat(n,"\n").concat(t.message)))}))}(n):null),n}(B(t));if(r&&r.sentinel){var e=function(n,t,r,e){var o,i=mn(n,t);if(!i)return i;for(var u=0;u-1&&l.splice(n,1),s=null,l=null,r=null}}}(o,0,(function(n){r.forceChangeHeight(n.height)})),this.Qb=(n=this.win,t=this.iR.bind(this),function(n,t,r,e){var o=n,i=r,u=function(n){try{return i(n)}catch(n){var t,r;throw null===(t=(r=self).__AMP_REPORT_ERROR)||void 0===t||t.call(r,n),n}},a=function(){if(void 0!==U)return U;U=!1;try{var n={get capture(){return U=!0,!1}};self.addEventListener("test-options",null,n),self.removeEventListener("test-options",null,n)}catch(n){}return U}();return o.addEventListener(t,u,!!a&&e),function(){null==o||o.removeEventListener(t,u,!!a&&e),i=null,o=null,u=null}}(n,"message",t,void 0)),this.toggleLoading(!0),this.element.appendChild(o),this.ob=o,this.loadPromise(o)}this.user().warn("AMP-FACEBOOK","Embedded Comments have been deprecated: https://developers.facebook.com/docs/plugins/embedded-comments")},f.iR=function(n){if(!this.ob||n.source==this.ob.contentWindow){var t,r=B(n);r&&(t=r,("[object Object]"===l.call(t)?r:d(r))&&"ready"==r.action&&this.toggleLoading(!1))}},f.unlayoutOnPause=function(){return!0},f.unlayoutCallback=function(){var n,t;return this.ob&&(null===(t=(n=this.ob).parentElement)||void 0===t||t.removeChild(n),this.ob=null),this.Qb&&this.Qb(),!0},a}(n.BaseElement);n.registerElement("amp-facebook",yn)}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-facebook-0.1.js.map