@ampproject/amp-facebook
Advanced tools
Comparing version 1.2108100143.0 to 1.2108101942.0
; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("preact")),preactDOM=__toModule(require("preact")),hooks=__toModule(require("preact/hooks"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,t){return hooks.useMemo(e,t)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var _MAP,compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty2(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,s=e.contentProps,u=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,h=e.style,g=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,className:"".concat(a||""," ").concat(g||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},h),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},s),{},{ref:u,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys2(Object(r),!0).forEach((function(t){_defineProperty3(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys2(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties2(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose2(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys3(Object(r),!0).forEach((function(t){_defineProperty4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys3(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties3(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose3(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,s=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,u=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),h=useAmpContext().playable,g=useLoading(d),O=g!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var t=P.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),S=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return S.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=S.current;if(!h&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),useLayoutEffect2((function(){var e=S.current;if(e&&O){var t=function(e){var t=S.current;t&&e.source==t.contentWindow&&s(e.origin)&&u(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[s,u,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:S,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var t;if(isProd())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function isMinified(){return!0}function version(){return"2108100143000"}IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")},isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}function tryParseJson(e,t){try{return parseJson(e)}catch(e){return null==t||t(e),null}}var LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG,logConstructor=null;function callLogConstructor(e,t){if(!logConstructor)throw new Error("failed to call initLogConstructor");return new logConstructor(self,e,t)}function dev(){return logs.dev||(logs.dev=callLogConstructor((function(e){return e>=3?LogLevel.FINE:e>=2?LogLevel.INFO:LogLevel.OFF})))}function devAssert2(e,t,r,n,o,a,i,c,l,s,u){return isMinified()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),dev().assert(e,t,r,n,o,a,i,c,l,s,u))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(t){_classCallCheck(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,t){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,t?null:urlCache)}function parseUrlWithA(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(r,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function generateSentinel(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys4(Object(r),!0).forEach((function(t){_defineProperty5(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose4(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,t){var r=e.allow,n=void 0===r?BLOCK_SYNC_XHR:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,s=e.options,u=e.sandbox,f=void 0===u?DEFAULT_SANDBOX:u,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),h=useRef2(null),g=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,S=O[1];return useLayoutEffect2((function(){var e,t,r=null===(e=m.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?getDefaultBootstrapBaseUrl(r):"about:blank";if(c)S({name:c,src:n});else if(r){var i=Object.assign(dict({"location":{"href":r.location.href},"sentinel":generateSentinel(r)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),s);S({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":g,"attributes":l})),src:n})}}),[o,a,g,c,s,p,b,d]),useEffect2((function(){var e,t=null===(e=h.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[P]),useImperativeHandle2(t,(function(){return{get readyState(){var e;return null===(e=h.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=h.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:h,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var t=e.indexOf("{");return devAssert2(-1!=t),tryParseJson(e.substr(t),(function(t){return dev().error("MESSAGING","Failed to parse message: "+e,t)}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys5(Object(r),!0).forEach((function(t){_defineProperty6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys5(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray2(e,t){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,t)||_unsupportedIterableToArray2(e,t)||_nonIterableRest2()}function _nonIterableRest2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray2(e,t):void 0}}function _arrayLikeToArray2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose5(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,s=e.kdSite,u=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,h=e.showFacepile,g=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,S=e.title,w=void 0===S?DEFAULT_TITLE:S,A=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],L=useCallback2((function(e){var t,r=null!==(t=tryParseJson(e.data))&&void 0!==t?t:deserializeMessage(e.data);if("ready"==r.action&&(null==d||d()),r.type==MessageType.EMBED_SIZE){var n=r.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),T=_slicedToArray2(useState2(f),2),C=T[0],I=T[1];return useLayoutEffect2((function(){var e,r;if(f)I(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&I(dashToUnderline(n.navigator.language))}}),[f,t]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":s,layout:u,locale:C,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:h,showText:g,size:O,smallHeader:v,tabs:j},ref:t,title:w},A),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:L,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("preact")),preactDOM=__toModule(require("preact")),hooks=__toModule(require("preact/hooks"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,t){return hooks.useMemo(e,t)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var _MAP,compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty2(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,s=e.contentProps,u=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,h=e.style,g=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,className:"".concat(a||""," ").concat(g||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},h),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},s),{},{ref:u,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys2(Object(r),!0).forEach((function(t){_defineProperty3(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys2(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties2(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose2(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys3(Object(r),!0).forEach((function(t){_defineProperty4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys3(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties3(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose3(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,s=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,u=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),h=useAmpContext().playable,g=useLoading(d),O=g!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var t=P.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),S=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return S.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=S.current;if(!h&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),useLayoutEffect2((function(){var e=S.current;if(e&&O){var t=function(e){var t=S.current;t&&e.source==t.contentWindow&&s(e.origin)&&u(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[s,u,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:S,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var t;if(isProd())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function isMinified(){return!0}function version(){return"2108101942000"}IframeEmbed.displayName="IframeEmbed";var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}function tryParseJson(e,t){try{return parseJson(e)}catch(e){return null==t||t(e),null}}var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")},LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG,logConstructor=null;function callLogConstructor(e,t){if(!logConstructor)throw new Error("failed to call initLogConstructor");return new logConstructor(self,e,t)}function dev(){return logs.dev||(logs.dev=callLogConstructor((function(e){return e>=3?LogLevel.FINE:e>=2?LogLevel.INFO:LogLevel.OFF})))}function devAssert2(e,t,r,n,o,a,i,c,l,s,u){return isMinified()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),dev().assert(e,t,r,n,o,a,i,c,l,s,u))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(t){_classCallCheck(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,t){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,t?null:urlCache)}function parseUrlWithA(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(r,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function generateSentinel(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys4(Object(r),!0).forEach((function(t){_defineProperty5(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose4(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,t){var r=e.allow,n=void 0===r?BLOCK_SYNC_XHR:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,s=e.options,u=e.sandbox,f=void 0===u?DEFAULT_SANDBOX:u,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),h=useRef2(null),g=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,S=O[1];return useLayoutEffect2((function(){var e,t,r=null===(e=m.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?getDefaultBootstrapBaseUrl(r):"about:blank";if(c)S({name:c,src:n});else if(r){var i=Object.assign(dict({"location":{"href":r.location.href},"sentinel":generateSentinel(r)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),s);S({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":g,"attributes":l})),src:n})}}),[o,a,g,c,s,p,b,d]),useEffect2((function(){var e,t=null===(e=h.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[P]),useImperativeHandle2(t,(function(){return{get readyState(){var e;return null===(e=h.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=h.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:h,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var t=e.indexOf("{");return devAssert2(-1!=t),tryParseJson(e.substr(t),(function(t){return dev().error("MESSAGING","Failed to parse message: "+e,t)}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys5(Object(r),!0).forEach((function(t){_defineProperty6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys5(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray2(e,t){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,t)||_unsupportedIterableToArray2(e,t)||_nonIterableRest2()}function _nonIterableRest2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray2(e,t):void 0}}function _arrayLikeToArray2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose5(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,s=e.kdSite,u=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,h=e.showFacepile,g=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,S=e.title,w=void 0===S?DEFAULT_TITLE:S,A=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],L=useCallback2((function(e){var t,r=null!==(t=tryParseJson(e.data))&&void 0!==t?t:deserializeMessage(e.data);if("ready"==r.action&&(null==d||d()),r.type==MessageType.EMBED_SIZE){var n=r.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),T=_slicedToArray2(useState2(f),2),C=T[0],I=T[1];return useLayoutEffect2((function(){var e,r;if(f)I(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&I(dashToUnderline(n.navigator.language))}}),[f,t]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":s,layout:u,locale:C,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:h,showText:g,size:O,smallHeader:v,tabs:j},ref:t,title:w},A),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:L,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -449,5 +449,21 @@ var __create = Object.create; | ||
function version() { | ||
return "2108100143000"; | ||
return "2108101942000"; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -481,18 +497,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -499,0 +499,0 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; |
@@ -465,5 +465,18 @@ // src/preact/index.js | ||
function version() { | ||
return "2108100143000"; | ||
return "2108101942000"; | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -497,15 +510,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -512,0 +512,0 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; |
; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"preact";import{hydrate as o,render as a}from"preact";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"preact/hooks";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function v(e,t){return l(e,t)}function w(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as D}from"preact/compat";function E(e){return D(e)}var _=["auto","lazy","eager","unload"],A={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C,M=[null,"paint","layout","content","size","size paint","size layout","strict"],z={"position":"relative","width":"100%","height":"100%"},T=E((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,N)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:M[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&z),{},{"overflow":f?"hidden":"visible"},s)}),n))})),L=["as","children","className","style","wrapperClassName","wrapperStyle"];function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(){const e=C||(C=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}E((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,L)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=E((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=A[e]||0,n=A[t]||0,o=Math.max(r,n);return _[o]}(e,t)}(f),S="unload"!==P,x=O(!1),D=function(e){const t=O(null);return t.current=e,t}(p),E=v((e=>{if(e!==x.current){x.current=e;const t=D.current;null==t||t(e?"complete":"loading")}}),[D]),N=O(null);return w(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[]),g((()=>{S||E(!1)}),[S,E]),m((()=>{const e=N.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(T,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>E(!0),part:"iframe",ref:N,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));W.displayName="IframeEmbed";var Z=self.AMP_CONFIG||{},K=("string"==typeof Z.thirdPartyFrameRegex?new RegExp(Z.thirdPartyFrameRegex):Z.thirdPartyFrameRegex,("string"==typeof Z.cdnProxyRegex?new RegExp(Z.cdnProxyRegex):Z.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Q(e){if(!self.document||!self.document.head)return null;if(self.location&&K.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var X=Z.thirdPartyUrl||"https://3p.ampproject.net",Y=Z.thirdPartyFrameHost||"ampproject.net";function ee(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}Z.cdnUrl||Q("runtime-host"),Z.errorReportingUrl,Z.betaErrorReportingUrl,Z.localDev,Z.geoApiUrl||Q("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var te,re=self.__AMP_LOG;function ne(e){return`${X}/2108100143000/vendor/${e}.mjs`}function oe(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ae(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+oe(e)}new Set(["c","v","a","ad"]);var le=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se={},ue="sync-xhr 'none'",fe=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),pe=E((function(e,t){let{allow:r=ue,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=fe,src:u,type:p,title:y=p}=e,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,le);if(h=r,"number"!=typeof S&&(S=0),S+(j=ue).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${ue}". Found "${r}".`);var h,j,S;const x=O(null),D=O(null),E=f((()=>(se[p]||(se[p]=function(){let e=0;return()=>String(++e)}()),se[p]())),[p]),{0:{name:_,src:A},1:N}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+oe(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${Y}/2108100143000/frame.html`):"about:blank";var i;if(l)return void N({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ae(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;N({name:JSON.stringify(P({"host":(b=a,te||(te=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(te,b)).hostname,"bootstrap":null!=n?n:ne(p),"type":p,"count":E,"attributes":f})),src:a})}),[n,o,E,l,c,u,y,p]),m((()=>{var e;const t=null===(e=D.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[_]),w(t,(()=>({get readyState(){var e;return null===(e=D.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=D.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:_,ref:D,ready:!!_,sandbox:a?void 0:s,src:A,title:y},v))}));pe.displayName="ProxyIframeEmbed";var ye=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var me=()=>!0,ge="Facebook comments",ve=E((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:w,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:D,tabs:E,title:_=ge}=e,A=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ye);const{0:N,1:R}=d(null),k=v((e=>{var t;const r=null!==(t=ee(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return ee(e.substr(t),(t=>(re.dev||(re.dev=function(e,t){throw new Error("failed to call initLogConstructor")}())).error("MESSAGING","Failed to parse message: "+e,t)))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;w?(w(e),R("100%")):R(e)}}),[w,y]),{0:F,1:C}=d(f);return g((()=>{var e,r;if(f)return void C(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&C(n.navigator.language.replace("-","_"))}),[f,t]),b(pe,de(de({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:E},ref:t,title:_},A),{},{excludeSandbox:!0,matchesMessagingOrigin:me,messageHandler:k,type:"facebook",style:N?de(de({},D),{},{height:N}):D}))}));ve.displayName="Facebook";export{ve as Facebook}; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"preact";import{hydrate as o,render as a}from"preact";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"preact/hooks";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function v(e,t){return l(e,t)}function w(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as D}from"preact/compat";function E(e){return D(e)}var _=["auto","lazy","eager","unload"],A={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C,M=[null,"paint","layout","content","size","size paint","size layout","strict"],z={"position":"relative","width":"100%","height":"100%"},T=E((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,N)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:M[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&z),{},{"overflow":f?"hidden":"visible"},s)}),n))})),L=["as","children","className","style","wrapperClassName","wrapperStyle"];function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(){const e=C||(C=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}E((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,L)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=E((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=A[e]||0,n=A[t]||0,o=Math.max(r,n);return _[o]}(e,t)}(f),S="unload"!==P,x=O(!1),D=function(e){const t=O(null);return t.current=e,t}(p),E=v((e=>{if(e!==x.current){x.current=e;const t=D.current;null==t||t(e?"complete":"loading")}}),[D]),N=O(null);return w(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[]),g((()=>{S||E(!1)}),[S,E]),m((()=>{const e=N.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(T,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>E(!0),part:"iframe",ref:N,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));function Z(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}W.displayName="IframeEmbed";var K=self.AMP_CONFIG||{},Q=("string"==typeof K.thirdPartyFrameRegex?new RegExp(K.thirdPartyFrameRegex):K.thirdPartyFrameRegex,("string"==typeof K.cdnProxyRegex?new RegExp(K.cdnProxyRegex):K.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function X(e){if(!self.document||!self.document.head)return null;if(self.location&&Q.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Y=K.thirdPartyUrl||"https://3p.ampproject.net",ee=K.thirdPartyFrameHost||"ampproject.net";K.cdnUrl||X("runtime-host"),K.errorReportingUrl,K.betaErrorReportingUrl,K.localDev,K.geoApiUrl||X("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var te,re=self.__AMP_LOG;function ne(e){return`${Y}/2108101942000/vendor/${e}.mjs`}function oe(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ae(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+oe(e)}new Set(["c","v","a","ad"]);var le=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se={},ue="sync-xhr 'none'",fe=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),pe=E((function(e,t){let{allow:r=ue,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=fe,src:u,type:p,title:y=p}=e,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,le);if(h=r,"number"!=typeof S&&(S=0),S+(j=ue).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${ue}". Found "${r}".`);var h,j,S;const x=O(null),D=O(null),E=f((()=>(se[p]||(se[p]=function(){let e=0;return()=>String(++e)}()),se[p]())),[p]),{0:{name:_,src:A},1:N}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+oe(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${ee}/2108101942000/frame.html`):"about:blank";var i;if(l)return void N({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ae(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;N({name:JSON.stringify(P({"host":(b=a,te||(te=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(te,b)).hostname,"bootstrap":null!=n?n:ne(p),"type":p,"count":E,"attributes":f})),src:a})}),[n,o,E,l,c,u,y,p]),m((()=>{var e;const t=null===(e=D.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[_]),w(t,(()=>({get readyState(){var e;return null===(e=D.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=D.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:_,ref:D,ready:!!_,sandbox:a?void 0:s,src:A,title:y},v))}));pe.displayName="ProxyIframeEmbed";var ye=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var me=()=>!0,ge="Facebook comments",ve=E((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:w,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:D,tabs:E,title:_=ge}=e,A=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ye);const{0:N,1:R}=d(null),k=v((e=>{var t;const r=null!==(t=Z(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return Z(e.substr(t),(t=>(re.dev||(re.dev=function(e,t){throw new Error("failed to call initLogConstructor")}())).error("MESSAGING","Failed to parse message: "+e,t)))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;w?(w(e),R("100%")):R(e)}}),[w,y]),{0:F,1:C}=d(f);return g((()=>{var e,r;if(f)return void C(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&C(n.navigator.language.replace("-","_"))}),[f,t]),b(pe,de(de({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:E},ref:t,title:_},A),{},{excludeSandbox:!0,matchesMessagingOrigin:me,messageHandler:k,type:"facebook",style:N?de(de({},D),{},{height:N}):D}))}));ve.displayName="Facebook";export{ve as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("react")),preactDOM=__toModule(require("react-dom")),hooks=__toModule(require("react"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,t){return hooks.useMemo(e,t)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var _MAP,compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty2(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,g=e.style,h=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,className:"".concat(a||""," ").concat(h||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},u),{},{ref:s,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys2(Object(r),!0).forEach((function(t){_defineProperty3(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys2(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties2(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose2(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys3(Object(r),!0).forEach((function(t){_defineProperty4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys3(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties3(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose3(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),g=useAmpContext().playable,h=useLoading(d),O=h!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var t=P.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),S=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return S.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=S.current;if(!g&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[g]),useLayoutEffect2((function(){var e=S.current;if(e&&O){var t=function(e){var t=S.current;t&&e.source==t.contentWindow&&u(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:S,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var t;if(isProd())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function isMinified(){return!0}function version(){return"2108100143000"}IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")},isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}function tryParseJson(e,t){try{return parseJson(e)}catch(e){return null==t||t(e),null}}var LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG,logConstructor=null;function callLogConstructor(e,t){if(!logConstructor)throw new Error("failed to call initLogConstructor");return new logConstructor(self,e,t)}function dev(){return logs.dev||(logs.dev=callLogConstructor((function(e){return e>=3?LogLevel.FINE:e>=2?LogLevel.INFO:LogLevel.OFF})))}function devAssert2(e,t,r,n,o,a,i,c,l,u,s){return isMinified()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),dev().assert(e,t,r,n,o,a,i,c,l,u,s))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(t){_classCallCheck(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,t){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,t?null:urlCache)}function parseUrlWithA(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(r,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function generateSentinel(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys4(Object(r),!0).forEach((function(t){_defineProperty5(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose4(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,t){var r=e.allow,n=void 0===r?BLOCK_SYNC_XHR:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?DEFAULT_SANDBOX:s,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),g=useRef2(null),h=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,S=O[1];return useLayoutEffect2((function(){var e,t,r=null===(e=m.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?getDefaultBootstrapBaseUrl(r):"about:blank";if(c)S({name:c,src:n});else if(r){var i=Object.assign(dict({"location":{"href":r.location.href},"sentinel":generateSentinel(r)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),u);S({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":h,"attributes":l})),src:n})}}),[o,a,h,c,u,p,b,d]),useEffect2((function(){var e,t=null===(e=g.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[P]),useImperativeHandle2(t,(function(){return{get readyState(){var e;return null===(e=g.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=g.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:g,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var t=e.indexOf("{");return devAssert2(-1!=t),tryParseJson(e.substr(t),(function(t){return dev().error("MESSAGING","Failed to parse message: "+e,t)}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys5(Object(r),!0).forEach((function(t){_defineProperty6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys5(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray2(e,t){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,t)||_unsupportedIterableToArray2(e,t)||_nonIterableRest2()}function _nonIterableRest2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray2(e,t):void 0}}function _arrayLikeToArray2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose5(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,g=e.showFacepile,h=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,S=e.title,w=void 0===S?DEFAULT_TITLE:S,A=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],L=useCallback2((function(e){var t,r=null!==(t=tryParseJson(e.data))&&void 0!==t?t:deserializeMessage(e.data);if("ready"==r.action&&(null==d||d()),r.type==MessageType.EMBED_SIZE){var n=r.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),T=_slicedToArray2(useState2(f),2),C=T[0],I=T[1];return useLayoutEffect2((function(){var e,r;if(f)I(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&I(dashToUnderline(n.navigator.language))}}),[f,t]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":u,layout:s,locale:C,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:g,showText:h,size:O,smallHeader:v,tabs:j},ref:t,title:w},A),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:L,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("react")),preactDOM=__toModule(require("react-dom")),hooks=__toModule(require("react"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,t){return hooks.useMemo(e,t)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var _MAP,compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty2(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,g=e.style,h=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,className:"".concat(a||""," ").concat(h||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},u),{},{ref:s,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys2(Object(r),!0).forEach((function(t){_defineProperty3(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys2(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty3(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties2(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose2(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys3(Object(r),!0).forEach((function(t){_defineProperty4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys3(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty4(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectWithoutProperties3(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose3(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),g=useAmpContext().playable,h=useLoading(d),O=h!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var t=P.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),S=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return S.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=S.current;if(!g&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[g]),useLayoutEffect2((function(){var e=S.current;if(e&&O){var t=function(e){var t=S.current;t&&e.source==t.contentWindow&&u(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:S,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var t;if(isProd())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function isMinified(){return!0}function version(){return"2108101942000"}IframeEmbed.displayName="IframeEmbed";var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}function tryParseJson(e,t){try{return parseJson(e)}catch(e){return null==t||t(e),null}}var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")},LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG,logConstructor=null;function callLogConstructor(e,t){if(!logConstructor)throw new Error("failed to call initLogConstructor");return new logConstructor(self,e,t)}function dev(){return logs.dev||(logs.dev=callLogConstructor((function(e){return e>=3?LogLevel.FINE:e>=2?LogLevel.INFO:LogLevel.OFF})))}function devAssert2(e,t,r,n,o,a,i,c,l,u,s){return isMinified()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),dev().assert(e,t,r,n,o,a,i,c,l,u,s))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(t){_classCallCheck(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,t){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,t?null:urlCache)}function parseUrlWithA(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(r,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function generateSentinel(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys4(Object(r),!0).forEach((function(t){_defineProperty5(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose4(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,t){var r=e.allow,n=void 0===r?BLOCK_SYNC_XHR:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?DEFAULT_SANDBOX:s,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),g=useRef2(null),h=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,S=O[1];return useLayoutEffect2((function(){var e,t,r=null===(e=m.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?getDefaultBootstrapBaseUrl(r):"about:blank";if(c)S({name:c,src:n});else if(r){var i=Object.assign(dict({"location":{"href":r.location.href},"sentinel":generateSentinel(r)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),u);S({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":h,"attributes":l})),src:n})}}),[o,a,h,c,u,p,b,d]),useEffect2((function(){var e,t=null===(e=g.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[P]),useImperativeHandle2(t,(function(){return{get readyState(){var e;return null===(e=g.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=g.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:g,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var t=e.indexOf("{");return devAssert2(-1!=t),tryParseJson(e.substr(t),(function(t){return dev().error("MESSAGING","Failed to parse message: "+e,t)}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread5(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys5(Object(r),!0).forEach((function(t){_defineProperty6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys5(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray2(e,t){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,t)||_unsupportedIterableToArray2(e,t)||_nonIterableRest2()}function _nonIterableRest2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray2(e,t):void 0}}function _arrayLikeToArray2(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit2(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _objectWithoutPropertiesLoose5(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,g=e.showFacepile,h=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,S=e.title,w=void 0===S?DEFAULT_TITLE:S,A=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],L=useCallback2((function(e){var t,r=null!==(t=tryParseJson(e.data))&&void 0!==t?t:deserializeMessage(e.data);if("ready"==r.action&&(null==d||d()),r.type==MessageType.EMBED_SIZE){var n=r.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),T=_slicedToArray2(useState2(f),2),C=T[0],I=T[1];return useLayoutEffect2((function(){var e,r;if(f)I(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&I(dashToUnderline(n.navigator.language))}}),[f,t]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":u,layout:s,locale:C,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:g,showText:h,size:O,smallHeader:v,tabs:j},ref:t,title:w},A),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:L,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -449,5 +449,21 @@ var __create = Object.create; | ||
function version() { | ||
return "2108100143000"; | ||
return "2108101942000"; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -481,18 +497,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -499,0 +499,0 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; |
@@ -465,5 +465,18 @@ // src/preact/index.js | ||
function version() { | ||
return "2108100143000"; | ||
return "2108101942000"; | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -497,15 +510,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -512,0 +512,0 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; |
; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"react";import{hydrate as o,render as a}from"react-dom";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"react";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function v(e,t){return l(e,t)}function w(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as D}from"react";function E(e){return D(e)}var _=["auto","lazy","eager","unload"],A={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C,M=[null,"paint","layout","content","size","size paint","size layout","strict"],z={"position":"relative","width":"100%","height":"100%"},T=E((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,N)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:M[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&z),{},{"overflow":f?"hidden":"visible"},s)}),n))})),L=["as","children","className","style","wrapperClassName","wrapperStyle"];function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(){const e=C||(C=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}E((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,L)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=E((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=A[e]||0,n=A[t]||0,o=Math.max(r,n);return _[o]}(e,t)}(f),S="unload"!==P,x=O(!1),D=function(e){const t=O(null);return t.current=e,t}(p),E=v((e=>{if(e!==x.current){x.current=e;const t=D.current;null==t||t(e?"complete":"loading")}}),[D]),N=O(null);return w(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[]),g((()=>{S||E(!1)}),[S,E]),m((()=>{const e=N.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(T,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>E(!0),part:"iframe",ref:N,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));W.displayName="IframeEmbed";var Z=self.AMP_CONFIG||{},K=("string"==typeof Z.thirdPartyFrameRegex?new RegExp(Z.thirdPartyFrameRegex):Z.thirdPartyFrameRegex,("string"==typeof Z.cdnProxyRegex?new RegExp(Z.cdnProxyRegex):Z.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Q(e){if(!self.document||!self.document.head)return null;if(self.location&&K.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var X=Z.thirdPartyUrl||"https://3p.ampproject.net",Y=Z.thirdPartyFrameHost||"ampproject.net";function ee(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}Z.cdnUrl||Q("runtime-host"),Z.errorReportingUrl,Z.betaErrorReportingUrl,Z.localDev,Z.geoApiUrl||Q("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var te,re=self.__AMP_LOG;function ne(e){return`${X}/2108100143000/vendor/${e}.mjs`}function oe(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ae(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+oe(e)}new Set(["c","v","a","ad"]);var le=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se={},ue="sync-xhr 'none'",fe=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),pe=E((function(e,t){let{allow:r=ue,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=fe,src:u,type:p,title:y=p}=e,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,le);if(h=r,"number"!=typeof S&&(S=0),S+(j=ue).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${ue}". Found "${r}".`);var h,j,S;const x=O(null),D=O(null),E=f((()=>(se[p]||(se[p]=function(){let e=0;return()=>String(++e)}()),se[p]())),[p]),{0:{name:_,src:A},1:N}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+oe(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${Y}/2108100143000/frame.html`):"about:blank";var i;if(l)return void N({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ae(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;N({name:JSON.stringify(P({"host":(b=a,te||(te=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(te,b)).hostname,"bootstrap":null!=n?n:ne(p),"type":p,"count":E,"attributes":f})),src:a})}),[n,o,E,l,c,u,y,p]),m((()=>{var e;const t=null===(e=D.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[_]),w(t,(()=>({get readyState(){var e;return null===(e=D.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=D.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:_,ref:D,ready:!!_,sandbox:a?void 0:s,src:A,title:y},v))}));pe.displayName="ProxyIframeEmbed";var ye=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var me=()=>!0,ge="Facebook comments",ve=E((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:w,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:D,tabs:E,title:_=ge}=e,A=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ye);const{0:N,1:R}=d(null),k=v((e=>{var t;const r=null!==(t=ee(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return ee(e.substr(t),(t=>(re.dev||(re.dev=function(e,t){throw new Error("failed to call initLogConstructor")}())).error("MESSAGING","Failed to parse message: "+e,t)))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;w?(w(e),R("100%")):R(e)}}),[w,y]),{0:F,1:C}=d(f);return g((()=>{var e,r;if(f)return void C(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&C(n.navigator.language.replace("-","_"))}),[f,t]),b(pe,de(de({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:E},ref:t,title:_},A),{},{excludeSandbox:!0,matchesMessagingOrigin:me,messageHandler:k,type:"facebook",style:N?de(de({},D),{},{height:N}):D}))}));ve.displayName="Facebook";export{ve as Facebook}; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"react";import{hydrate as o,render as a}from"react-dom";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"react";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function v(e,t){return l(e,t)}function w(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as D}from"react";function E(e){return D(e)}var _=["auto","lazy","eager","unload"],A={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var C,M=[null,"paint","layout","content","size","size paint","size layout","strict"],z={"position":"relative","width":"100%","height":"100%"},T=E((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,N)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:M[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&z),{},{"overflow":f?"hidden":"visible"},s)}),n))})),L=["as","children","className","style","wrapperClassName","wrapperStyle"];function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(){const e=C||(C=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}E((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,L)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=E((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=A[e]||0,n=A[t]||0,o=Math.max(r,n);return _[o]}(e,t)}(f),S="unload"!==P,x=O(!1),D=function(e){const t=O(null);return t.current=e,t}(p),E=v((e=>{if(e!==x.current){x.current=e;const t=D.current;null==t||t(e?"complete":"loading")}}),[D]),N=O(null);return w(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[]),g((()=>{S||E(!1)}),[S,E]),m((()=>{const e=N.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(T,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>E(!0),part:"iframe",ref:N,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));function Z(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}W.displayName="IframeEmbed";var K=self.AMP_CONFIG||{},Q=("string"==typeof K.thirdPartyFrameRegex?new RegExp(K.thirdPartyFrameRegex):K.thirdPartyFrameRegex,("string"==typeof K.cdnProxyRegex?new RegExp(K.cdnProxyRegex):K.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function X(e){if(!self.document||!self.document.head)return null;if(self.location&&Q.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Y=K.thirdPartyUrl||"https://3p.ampproject.net",ee=K.thirdPartyFrameHost||"ampproject.net";K.cdnUrl||X("runtime-host"),K.errorReportingUrl,K.betaErrorReportingUrl,K.localDev,K.geoApiUrl||X("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var te,re=self.__AMP_LOG;function ne(e){return`${Y}/2108101942000/vendor/${e}.mjs`}function oe(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ae(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+oe(e)}new Set(["c","v","a","ad"]);var le=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se={},ue="sync-xhr 'none'",fe=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),pe=E((function(e,t){let{allow:r=ue,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=fe,src:u,type:p,title:y=p}=e,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,le);if(h=r,"number"!=typeof S&&(S=0),S+(j=ue).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${ue}". Found "${r}".`);var h,j,S;const x=O(null),D=O(null),E=f((()=>(se[p]||(se[p]=function(){let e=0;return()=>String(++e)}()),se[p]())),[p]),{0:{name:_,src:A},1:N}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+oe(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${ee}/2108101942000/frame.html`):"about:blank";var i;if(l)return void N({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ae(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;N({name:JSON.stringify(P({"host":(b=a,te||(te=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(te,b)).hostname,"bootstrap":null!=n?n:ne(p),"type":p,"count":E,"attributes":f})),src:a})}),[n,o,E,l,c,u,y,p]),m((()=>{var e;const t=null===(e=D.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[_]),w(t,(()=>({get readyState(){var e;return null===(e=D.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=D.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:_,ref:D,ready:!!_,sandbox:a?void 0:s,src:A,title:y},v))}));pe.displayName="ProxyIframeEmbed";var ye=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var me=()=>!0,ge="Facebook comments",ve=E((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:w,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:D,tabs:E,title:_=ge}=e,A=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ye);const{0:N,1:R}=d(null),k=v((e=>{var t;const r=null!==(t=Z(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return Z(e.substr(t),(t=>(re.dev||(re.dev=function(e,t){throw new Error("failed to call initLogConstructor")}())).error("MESSAGING","Failed to parse message: "+e,t)))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;w?(w(e),R("100%")):R(e)}}),[w,y]),{0:F,1:C}=d(f);return g((()=>{var e,r;if(f)return void C(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&C(n.navigator.language.replace("-","_"))}),[f,t]),b(pe,de(de({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:E},ref:t,title:_},A),{},{excludeSandbox:!0,matchesMessagingOrigin:me,messageHandler:k,type:"facebook",style:N?de(de({},D),{},{height:N}):D}))}));ve.displayName="Facebook";export{ve as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
{ | ||
"name": "@ampproject/amp-facebook", | ||
"version": "1.2108100143.0", | ||
"version": "1.2108101942.0", | ||
"description": "AMP HTML amp-facebook Component", | ||
@@ -5,0 +5,0 @@ "author": "The AMP HTML Authors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1472478