@ampproject/amp-instagram
Advanced tools
Comparing version 1.2108232044.0 to 1.2108242314.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,{Instagram:function(){return Instagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}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 useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,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","class","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.class,i=e.contentAs,c=void 0===i?"div":i,u=e.contentClassName,l=e.contentProps,s=e.contentRef,p=e.contentStyle,f=e.layout,d=void 0!==f&&f,y=e.paint,b=void 0!==y&&y,_=e.size,O=void 0!==_&&_,g=e.style,m=e.wrapperClassName,P=e.wrapperStyle,j=(O?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,class:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,class:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","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.class,i=e.style,c=e.wrapperClassName,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,class:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),u)}),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,u=e.matchesMessagingOrigin,l=void 0===u?DEFAULT_MATCHES_MESSAGING_ORIGIN:u,s=e.messageHandler,p=e.ready,f=void 0===p||p,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,O=_objectWithoutProperties3(e,_excluded3),g=useAmpContext().playable,m=useLoading(d),P=m!==Loading.UNLOAD,j=useRef2(!1),v=useValueRef(y),h=useCallback2((function(e){if(e!==j.current){j.current=e;var t=v.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[v]),w=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return j.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return w.current}}}),[]),useLayoutEffect2((function(){P||h(!1)}),[P,h]),useEffect2((function(){var e=w.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=w.current;if(e&&P){var t=function(e){var t=w.current;t&&e.source==t.contentWindow&&l(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[l,s,P,f]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},O),{},{layout:!0,size:!0,paint:!0}),P&&f&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:m,name:i,onLoad:function(){return h(!0)},part:"iframe",ref:w,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);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")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","requestResize","shortcode","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 NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function InstagramWithRef(e,t){var r=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,i=void 0===a?"Instagram":a,c=_objectWithoutProperties4(e,_excluded4),u=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),l=u[0],s=u[1],p=_slicedToArray(useState2(0),2),f=p[0],d=p[1],y=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r=t.details.height;n&&n(r),s(dict({"height":r})),d(1)}}),[n]);return createElement2(IframeEmbed,_objectSpread4({allowTransparency:!0,iframeStyle:{opacity:f},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:y,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:l},c))}var Instagram=forwardRef2(InstagramWithRef);Instagram.displayName="Instagram"; | ||
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,a=__getOwnPropNames(t),o=0,i=a.length;o<i;o++)n=a[o],__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)};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}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 _objectSpread2(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){_defineProperty(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 _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}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 _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 _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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}__export(exports,{Instagram:function(){return Instagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}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 useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var _MAP,compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(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,a=Math.max(r,n);return ORDER[a]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],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,a=e.children,o=e.class,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,d=e.contentStyle,p=e.layout,f=void 0!==p&&p,_=e.paint,y=void 0!==_&&_,m=e.size,g=void 0!==m&&m,b=e.style,v=e.wrapperClassName,h=e.wrapperStyle,O=(g?4:0)+(f?2:0)+(y?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(o||""," ").concat(v||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},b),h),{},{contain:CONTAIN[O]})}),createElement2(c,_objectSpread2(_objectSpread2({},u),{},{ref:s,class:l,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":y?"hidden":"visible"},d)}),a))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(o||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),a)}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"],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,a=e.allowTransparency,o=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,d=e.ready,p=void 0===d||d,f=e.loading,_=e.onReadyState,y=e.sandbox,m=e.src,g=_objectWithoutPropertiesLoose(e,_excluded3),b=useAmpContext().playable,v=useLoading(f),h=v!==Loading.UNLOAD,O=useRef2(!1),A=useValueRef(_),S=useCallback2((function(e){if(e!==O.current){O.current=e;var t=A.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[A]),P=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return O.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return P.current}}}),[]),useLayoutEffect2((function(){h||S(!1)}),[h,S]),useEffect2((function(){var e=P.current;if(!b&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),useLayoutEffect2((function(){var e=P.current;if(e&&h){var t=function(e){var t=P.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,h,p]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},g),{},{layout:!0,size:!0,paint:!0}),h&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:v,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:P,sandbox:y,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);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")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function InstagramWithRef(e,t){var r=e.captioned,n=e.requestResize,a=e.shortcode,o=e.title,i=void 0===o?"Instagram":o,c=_objectWithoutPropertiesLoose(e,_excluded4),l=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),u=l[0],s=l[1],d=_slicedToArray(useState2(0),2),p=d[0],f=d[1],_=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r=t.details.height;n&&n(r),s(dict({"height":r})),f(1)}}),[n]);return createElement2(IframeEmbed,_objectSpread2({allowTransparency:!0,iframeStyle:{opacity:p},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:_,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:u},c))}var Instagram=forwardRef2(InstagramWithRef);Instagram.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
; | ||
var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"preact";import{hydrate as l,render as i}from"preact";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"preact/hooks";function d(e,t,r){return a.apply(void 0,arguments)}function m(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"preact/compat";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},R=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function z(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k,A=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"class":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return d(r,N(N({},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,R)),{},{ref:t,class:`${o||""} ${b||""}`.trim()||null,style:N(N(N({},y),O),{},{contain:A[g]})}),d(a,N(N({},l),{},{ref:i,class:c,style:N(N({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","class","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(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=k||(k=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"class":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return d(r,U(U({},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,M)),{},{ref:t,class:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,m=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),R=function(e){const t=w(null);return t.current=e,t}(b),z=P((e=>{if(e!==x.current){x.current=e;const t=R.current;null==t||t(e?"complete":"loading")}}),[R]),N=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[])}(t),j((()=>{S||z(!1)}),[S,z]),p((()=>{const e=N.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),d(I,T(T({},m),{},{layout:!0,size:!0,paint:!0}),S&&u&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>z(!0),part:"iframe",ref:N,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const[i,s]=m(Y),[u,p]=m(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return d(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram}; | ||
function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(t){e(r,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}function n(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function l(e){return e||{}}import{cloneElement as i,createContext as s,createElement as c,createRef as u}from"preact";import{hydrate as p,render as d}from"preact";import{useCallback as f,useContext as m,useEffect as y,useImperativeHandle as g,useLayoutEffect as w,useMemo as h,useRef as b,useState as O}from"preact/hooks";function v(e,t,r){return c.apply(void 0,arguments)}function P(e){return O(e)}function S(e){return b(e)}function x(e,t){w(e,t)}function R(e,t){return f(e,t)}import{Children as j,createPortal as z,forwardRef as E}from"preact/compat";function N(e){return E(e)}var _,A=["auto","lazy","eager","unload"],F={auto:0,lazy:1,eager:2,unload:3},M=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],C=[null,"paint","layout","content","size","size paint","size layout","strict"],U={"position":"relative","width":"100%","height":"100%"},D=N((function(e,t){let{as:a="div",children:o,"class":l,contentAs:i="div",contentClassName:s,contentProps:c,contentRef:u,contentStyle:p,layout:d=!1,paint:f=!1,size:m=!1,"style":y,wrapperClassName:g,wrapperStyle:w}=e;const h=(m?4:0)+(d?2:0)+(f?1:0);return v(a,r(r({},n(e,M)),{},{ref:t,class:`${l||""} ${g||""}`.trim()||null,style:r(r(r({},y),w),{},{contain:C[h]})}),v(i,r(r({},c),{},{ref:u,class:s,style:r(r({},m&&U),{},{"overflow":f?"hidden":"visible"},p)}),o))})),L=["as","children","class","style","wrapperClassName","wrapperStyle"];function $(){const e=_||(_=s({renderable:!0,playable:!0,loading:"auto"},void 0));return m(e)}N((function(e,t){let{as:a="div",children:o,"class":l,"style":i,wrapperClassName:s,wrapperStyle:c}=e;return v(a,r(r({},n(e,L)),{},{ref:t,class:`${l||""} ${s||""}`.trim()||null,style:r(r({},i),c)}),o)}));var I=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],k=()=>!1,G=N((function(e,t){let{allow:a,allowFullScreen:o,allowTransparency:l,iframeStyle:i,name:s,title:c,matchesMessagingOrigin:u=k,messageHandler:p,ready:d=!0,loading:f,onReadyState:m,sandbox:w,src:h}=e,b=n(e,I);const{playable:O}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=F[e]||0,n=F[t]||0,a=Math.max(r,n);return A[a]}(e,t)}(f),j="unload"!==P,z=S(!1),E=function(e){const t=S(null);return t.current=e,t}(m),N=R((e=>{if(e!==z.current){z.current=e;const t=E.current;null==t||t(e?"complete":"loading")}}),[E]),_=S(null);return function(e,t,r){g(e,(()=>({get readyState(){return z.current?"complete":"loading"},get node(){return _.current}})),[])}(t),x((()=>{j||N(!1)}),[j,N]),y((()=>{const e=_.current;if(!O&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[O]),x((()=>{const e=_.current;if(!e||!j)return;const t=e=>{const t=_.current;t&&e.source==t.contentWindow&&u(e.origin)&&p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[u,p,j,d]),v(D,r(r({},b),{},{layout:!0,size:!0,paint:!0}),j&&d&&v("iframe",{allow:a,allowFullScreen:o,allowTransparency:l,frameborder:"0",loading:P,name:s,onLoad:()=>N(!0),part:"iframe",ref:_,sandbox:w,scrolling:"no",src:h,style:r(r({},i),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}));G.displayName="IframeEmbed";var H=self.AMP_CONFIG||{},T=("string"==typeof H.thirdPartyFrameRegex?new RegExp(H.thirdPartyFrameRegex):H.thirdPartyFrameRegex,("string"==typeof H.cdnProxyRegex?new RegExp(H.cdnProxyRegex):H.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function q(e){if(!self.document||!self.document.head)return null;if(self.location&&T.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}H.thirdPartyUrl,H.thirdPartyFrameHost,H.cdnUrl||q("runtime-host"),H.errorReportingUrl,H.betaErrorReportingUrl,H.localDev,H.geoApiUrl||q("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var V=["captioned","requestResize","shortcode","title"],B=l(),J=e=>"https://www.instagram.com"===e,W=N((function(e,t){let{captioned:a,requestResize:o,shortcode:i,title:s="Instagram"}=e,c=n(e,V);const[u,p]=P(B),[d,f]=P(0),m=R((e=>{const t=(r=function(e){return e.data}(e),JSON.parse(r));var r;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),p(l({"height":e})),f(1)}}),[o]);return v(G,r({allowTransparency:!0,iframeStyle:{opacity:d},matchesMessagingOrigin:J,messageHandler:m,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(i)+"/embed/"+(a?"captioned/":"")+"?cr=1&v=12",title:s,wrapperStyle:u},c))}));W.displayName="Instagram";export{W as Instagram}; | ||
/*! 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,{Instagram:function(){return Instagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}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 useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,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","class","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.class,i=e.contentAs,c=void 0===i?"div":i,u=e.contentClassName,l=e.contentProps,s=e.contentRef,p=e.contentStyle,f=e.layout,d=void 0!==f&&f,y=e.paint,b=void 0!==y&&y,_=e.size,O=void 0!==_&&_,g=e.style,m=e.wrapperClassName,P=e.wrapperStyle,j=(O?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:t,class:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,class:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","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.class,i=e.style,c=e.wrapperClassName,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,class:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),u)}),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,u=e.matchesMessagingOrigin,l=void 0===u?DEFAULT_MATCHES_MESSAGING_ORIGIN:u,s=e.messageHandler,p=e.ready,f=void 0===p||p,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,O=_objectWithoutProperties3(e,_excluded3),g=useAmpContext().playable,m=useLoading(d),P=m!==Loading.UNLOAD,j=useRef2(!1),v=useValueRef(y),h=useCallback2((function(e){if(e!==j.current){j.current=e;var t=v.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[v]),w=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return j.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return w.current}}}),[]),useLayoutEffect2((function(){P||h(!1)}),[P,h]),useEffect2((function(){var e=w.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=w.current;if(e&&P){var t=function(e){var t=w.current;t&&e.source==t.contentWindow&&l(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[l,s,P,f]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},O),{},{layout:!0,size:!0,paint:!0}),P&&f&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:m,name:i,onLoad:function(){return h(!0)},part:"iframe",ref:w,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);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")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","requestResize","shortcode","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 NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function InstagramWithRef(e,t){var r=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,i=void 0===a?"Instagram":a,c=_objectWithoutProperties4(e,_excluded4),u=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),l=u[0],s=u[1],p=_slicedToArray(useState2(0),2),f=p[0],d=p[1],y=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r=t.details.height;n&&n(r),s(dict({"height":r})),d(1)}}),[n]);return createElement2(IframeEmbed,_objectSpread4({allowTransparency:!0,iframeStyle:{opacity:f},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:y,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:l},c))}var Instagram=forwardRef2(InstagramWithRef);Instagram.displayName="Instagram"; | ||
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,a=__getOwnPropNames(t),o=0,i=a.length;o<i;o++)n=a[o],__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)};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}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 _objectSpread2(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){_defineProperty(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 _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}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 _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 _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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}__export(exports,{Instagram:function(){return Instagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}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 useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var _MAP,compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(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,a=Math.max(r,n);return ORDER[a]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],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,a=e.children,o=e.class,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,d=e.contentStyle,p=e.layout,f=void 0!==p&&p,_=e.paint,y=void 0!==_&&_,m=e.size,g=void 0!==m&&m,b=e.style,v=e.wrapperClassName,h=e.wrapperStyle,O=(g?4:0)+(f?2:0)+(y?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(o||""," ").concat(v||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},b),h),{},{contain:CONTAIN[O]})}),createElement2(c,_objectSpread2(_objectSpread2({},u),{},{ref:s,class:l,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":y?"hidden":"visible"},d)}),a))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(o||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),a)}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"],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,a=e.allowTransparency,o=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,d=e.ready,p=void 0===d||d,f=e.loading,_=e.onReadyState,y=e.sandbox,m=e.src,g=_objectWithoutPropertiesLoose(e,_excluded3),b=useAmpContext().playable,v=useLoading(f),h=v!==Loading.UNLOAD,O=useRef2(!1),A=useValueRef(_),S=useCallback2((function(e){if(e!==O.current){O.current=e;var t=A.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[A]),P=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return O.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return P.current}}}),[]),useLayoutEffect2((function(){h||S(!1)}),[h,S]),useEffect2((function(){var e=P.current;if(!b&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),useLayoutEffect2((function(){var e=P.current;if(e&&h){var t=function(e){var t=P.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,h,p]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},g),{},{layout:!0,size:!0,paint:!0}),h&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:v,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:P,sandbox:y,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);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")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function InstagramWithRef(e,t){var r=e.captioned,n=e.requestResize,a=e.shortcode,o=e.title,i=void 0===o?"Instagram":o,c=_objectWithoutPropertiesLoose(e,_excluded4),l=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),u=l[0],s=l[1],d=_slicedToArray(useState2(0),2),p=d[0],f=d[1],_=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r=t.details.height;n&&n(r),s(dict({"height":r})),f(1)}}),[n]);return createElement2(IframeEmbed,_objectSpread2({allowTransparency:!0,iframeStyle:{opacity:p},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:_,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:u},c))}var Instagram=forwardRef2(InstagramWithRef);Instagram.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
; | ||
var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"react";import{hydrate as l,render as i}from"react-dom";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"react";function d(e,t,r){return a.apply(void 0,arguments)}function m(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"react";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},R=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function z(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A,k=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"class":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return d(r,N(N({},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,R)),{},{ref:t,class:`${o||""} ${b||""}`.trim()||null,style:N(N(N({},y),O),{},{contain:k[g]})}),d(a,N(N({},l),{},{ref:i,class:c,style:N(N({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","class","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(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=A||(A=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"class":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return d(r,U(U({},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,M)),{},{ref:t,class:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,m=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),R=function(e){const t=w(null);return t.current=e,t}(b),z=P((e=>{if(e!==x.current){x.current=e;const t=R.current;null==t||t(e?"complete":"loading")}}),[R]),N=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return N.current}})),[])}(t),j((()=>{S||z(!1)}),[S,z]),p((()=>{const e=N.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=N.current;if(!e||!S)return;const t=e=>{const t=N.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),d(I,T(T({},m),{},{layout:!0,size:!0,paint:!0}),S&&u&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>z(!0),part:"iframe",ref:N,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const[i,s]=m(Y),[u,p]=m(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return d(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram}; | ||
function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(t){e(r,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}function n(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function l(e){return e||{}}import{cloneElement as i,createContext as s,createElement as c,createRef as u}from"react";import{hydrate as p,render as d}from"react-dom";import{useCallback as f,useContext as m,useEffect as y,useImperativeHandle as g,useLayoutEffect as w,useMemo as h,useRef as b,useState as O}from"react";function v(e,t,r){return c.apply(void 0,arguments)}function P(e){return O(e)}function S(e){return b(e)}function x(e,t){w(e,t)}function R(e,t){return f(e,t)}import{Children as j,createPortal as z,forwardRef as E}from"react";function N(e){return E(e)}var _,A=["auto","lazy","eager","unload"],F={auto:0,lazy:1,eager:2,unload:3},M=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],C=[null,"paint","layout","content","size","size paint","size layout","strict"],U={"position":"relative","width":"100%","height":"100%"},D=N((function(e,t){let{as:a="div",children:o,"class":l,contentAs:i="div",contentClassName:s,contentProps:c,contentRef:u,contentStyle:p,layout:d=!1,paint:f=!1,size:m=!1,"style":y,wrapperClassName:g,wrapperStyle:w}=e;const h=(m?4:0)+(d?2:0)+(f?1:0);return v(a,r(r({},n(e,M)),{},{ref:t,class:`${l||""} ${g||""}`.trim()||null,style:r(r(r({},y),w),{},{contain:C[h]})}),v(i,r(r({},c),{},{ref:u,class:s,style:r(r({},m&&U),{},{"overflow":f?"hidden":"visible"},p)}),o))})),L=["as","children","class","style","wrapperClassName","wrapperStyle"];function $(){const e=_||(_=s({renderable:!0,playable:!0,loading:"auto"},void 0));return m(e)}N((function(e,t){let{as:a="div",children:o,"class":l,"style":i,wrapperClassName:s,wrapperStyle:c}=e;return v(a,r(r({},n(e,L)),{},{ref:t,class:`${l||""} ${s||""}`.trim()||null,style:r(r({},i),c)}),o)}));var I=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],G=()=>!1,H=N((function(e,t){let{allow:a,allowFullScreen:o,allowTransparency:l,iframeStyle:i,name:s,title:c,matchesMessagingOrigin:u=G,messageHandler:p,ready:d=!0,loading:f,onReadyState:m,sandbox:w,src:h}=e,b=n(e,I);const{playable:O}=$(),P=function(e){const{loading:t}=$();return function(e,t){const r=F[e]||0,n=F[t]||0,a=Math.max(r,n);return A[a]}(e,t)}(f),j="unload"!==P,z=S(!1),E=function(e){const t=S(null);return t.current=e,t}(m),N=R((e=>{if(e!==z.current){z.current=e;const t=E.current;null==t||t(e?"complete":"loading")}}),[E]),_=S(null);return function(e,t,r){g(e,(()=>({get readyState(){return z.current?"complete":"loading"},get node(){return _.current}})),[])}(t),x((()=>{j||N(!1)}),[j,N]),y((()=>{const e=_.current;if(!O&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[O]),x((()=>{const e=_.current;if(!e||!j)return;const t=e=>{const t=_.current;t&&e.source==t.contentWindow&&u(e.origin)&&p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[u,p,j,d]),v(D,r(r({},b),{},{layout:!0,size:!0,paint:!0}),j&&d&&v("iframe",{allow:a,allowFullScreen:o,allowTransparency:l,frameborder:"0",loading:P,name:s,onLoad:()=>N(!0),part:"iframe",ref:_,sandbox:w,scrolling:"no",src:h,style:r(r({},i),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}));H.displayName="IframeEmbed";var T=self.AMP_CONFIG||{},k=("string"==typeof T.thirdPartyFrameRegex?new RegExp(T.thirdPartyFrameRegex):T.thirdPartyFrameRegex,("string"==typeof T.cdnProxyRegex?new RegExp(T.cdnProxyRegex):T.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}T.thirdPartyUrl,T.thirdPartyFrameHost,T.cdnUrl||q("runtime-host"),T.errorReportingUrl,T.betaErrorReportingUrl,T.localDev,T.geoApiUrl||q("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var V=["captioned","requestResize","shortcode","title"],B=l(),J=e=>"https://www.instagram.com"===e,W=N((function(e,t){let{captioned:a,requestResize:o,shortcode:i,title:s="Instagram"}=e,c=n(e,V);const[u,p]=P(B),[d,f]=P(0),m=R((e=>{const t=(r=function(e){return e.data}(e),JSON.parse(r));var r;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),p(l({"height":e})),f(1)}}),[o]);return v(H,r({allowTransparency:!0,iframeStyle:{opacity:d},matchesMessagingOrigin:J,messageHandler:m,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(i)+"/embed/"+(a?"captioned/":"")+"?cr=1&v=12",title:s,wrapperStyle:u},c))}));W.displayName="Instagram";export{W as Instagram}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
{ | ||
"name": "@ampproject/amp-instagram", | ||
"version": "1.2108232044.0", | ||
"version": "1.2108242314.0", | ||
"description": "AMP HTML amp-instagram 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
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
431687
2065