@ampproject/amp-instagram
Advanced tools
Comparing version 1.2108112212.0 to 1.2108130315.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 _MAP,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)}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"},compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}var _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,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,className:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,className:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),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,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".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 _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray,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}function parseJson(e){return JSON.parse(e)}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,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","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,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,className:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,className:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),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,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".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"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -39,2 +39,18 @@ var __create = Object.create; | ||
// src/core/types/object/index.js | ||
var _Object$prototype = Object.prototype; | ||
var hasOwn_ = _Object$prototype.hasOwnProperty; | ||
var toString_ = _Object$prototype.toString; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// src/preact/index.js | ||
@@ -72,2 +88,8 @@ var preact = __toModule(require("preact")); | ||
// src/preact/compat.js | ||
var compat = __toModule(require("preact/compat")); | ||
function forwardRef2(fn) { | ||
return compat.forwardRef(fn); | ||
} | ||
// src/core/constants/loading-instructions.js | ||
@@ -100,8 +122,2 @@ var _MAP; | ||
// src/preact/compat.js | ||
var compat = __toModule(require("preact/compat")); | ||
function forwardRef2(fn) { | ||
return compat.forwardRef(fn); | ||
} | ||
// src/preact/component/contain.js | ||
@@ -363,13 +379,2 @@ var _excluded = ["as", "children", "className", "contentAs", "contentClassName", "contentProps", "contentRef", "contentStyle", "layout", "paint", "size", "style", "wrapperClassName", "wrapperStyle"]; | ||
// src/core/types/object/index.js | ||
var _Object$prototype = Object.prototype; | ||
var hasOwn_ = _Object$prototype.hasOwnProperty; | ||
var toString_ = _Object$prototype.toString; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/config.js | ||
@@ -416,7 +421,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// extensions/amp-instagram/1.0/component.js | ||
@@ -423,0 +423,0 @@ var _excluded4 = ["captioned", "requestResize", "shortcode", "title"]; |
@@ -0,1 +1,15 @@ | ||
// src/core/types/object/index.js | ||
var { | ||
hasOwnProperty: hasOwn_, | ||
toString: toString_ | ||
} = Object.prototype; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// src/preact/index.js | ||
@@ -50,2 +64,12 @@ import { | ||
// src/preact/compat.js | ||
import { | ||
Children, | ||
createPortal, | ||
forwardRef | ||
} from "preact/compat"; | ||
function forwardRef2(fn) { | ||
return forwardRef(fn); | ||
} | ||
// src/core/constants/loading-instructions.js | ||
@@ -82,12 +106,2 @@ var Loading = { | ||
// src/preact/compat.js | ||
import { | ||
Children, | ||
createPortal, | ||
forwardRef | ||
} from "preact/compat"; | ||
function forwardRef2(fn) { | ||
return forwardRef(fn); | ||
} | ||
// src/preact/component/contain.js | ||
@@ -383,11 +397,2 @@ var _excluded = ["as", "children", "className", "contentAs", "contentClassName", "contentProps", "contentRef", "contentStyle", "layout", "paint", "size", "style", "wrapperClassName", "wrapperStyle"]; | ||
// src/core/types/object/index.js | ||
var { | ||
hasOwnProperty: hasOwn_, | ||
toString: toString_ | ||
} = Object.prototype; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/config.js | ||
@@ -434,7 +439,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// extensions/amp-instagram/1.0/component.js | ||
@@ -441,0 +441,0 @@ var _excluded4 = ["captioned", "requestResize", "shortcode", "title"]; |
; | ||
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 c,useContext as l,useEffect as i,useImperativeHandle as s,useLayoutEffect as u,useMemo as p,useRef as f,useState as y}from"preact/hooks";function b(e,t,n){return r.apply(void 0,arguments)}function O(e){return y(e)}function g(e){return f(e)}function m(e,t){u(e,t)}function d(e,t){return c(e,t)}var w=["auto","lazy","eager","unload"],j={auto:0,lazy:1,eager:2,unload:3};import{Children as P,createPortal as h,forwardRef as v}from"preact/compat";function S(e){return v(e)}var x=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function E(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 D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R,z=[null,"paint","layout","content","size","size paint","size layout","strict"],_={"position":"relative","width":"100%","height":"100%"},k=S((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:O,wrapperStyle:g}=e;const m=(f?4:0)+(u?2:0)+(p?1:0);return b(r,D(D({},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,x)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:D(D(D({},y),g),{},{contain:z[m]})}),b(a,D(D({},l),{},{ref:i,className:c,style:D(D({},f&&_),{},{"overflow":p?"hidden":"visible"},s)}),n))})),A=["as","children","className","style","wrapperClassName","wrapperStyle"];function F(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?F(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(){const e=R||(R=t({renderable:!0,playable:!0,loading:"auto"},void 0));return l(e)}S((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=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,A)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:I(I({},a),l)}),n)}));var U=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function L(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 $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H=()=>!1,T=S((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:u=H,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:P,src:h}=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,U);const{playable:S}=C(),x=function(e){const{loading:t}=C();return function(e,t){const r=j[e]||0,n=j[t]||0,o=Math.max(r,n);return w[o]}(e,t)}(y),E="unload"!==x,D=g(!1),N=function(e){const t=g(null);return t.current=e,t}(O),R=d((e=>{if(e!==D.current){D.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=g(null);return function(e,t,r){s(e,(()=>({get readyState(){return D.current?"complete":"loading"},get node(){return z.current}})),[])}(t),m((()=>{E||R(!1)}),[E,R]),i((()=>{const e=z.current;if(!S&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[S]),m((()=>{const e=z.current;if(!e||!E)return;const t=e=>{const t=z.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,E,f]),b(k,$($({},v),{},{layout:!0,size:!0,paint:!0}),E&&f&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:x,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:P,scrolling:"no",src:h,style:$($({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));T.displayName="IframeEmbed";var{hasOwnProperty:q,toString:V}=Object.prototype;function B(e){return e||{}}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=B(),ee=e=>"https://www.instagram.com"===e,te=S((function(e,t){let{captioned:r,requestResize:n,shortcode:o,title:a="Instagram"}=e,c=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{0:l,1:i}=O(Y),{0:s,1:u}=O(0),p=d((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;n&&n(e),i(B({"height":e})),u(1)}}),[n]);return b(T,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:s},matchesMessagingOrigin:ee,messageHandler:p,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:a,wrapperStyle:l},c))}));te.displayName="Instagram";export{te as Instagram}; | ||
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 m(e,t,r){return a.apply(void 0,arguments)}function d(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},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 z(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){_(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 _(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,"className":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 m(r,z(z({},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||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:A[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","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,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(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,className:`${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,d=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),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.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=z.current;if(!e||!S)return;const t=e=>{const t=z.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]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,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{0:i,1:s}=d(Y),{0:u,1:p}=d(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 m(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}; | ||
/*! 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 _MAP,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)}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"},compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}var _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,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,className:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,className:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),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,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".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 _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray,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}function parseJson(e){return JSON.parse(e)}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,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","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,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,className:"".concat(a||""," ").concat(m||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},g),P),{},{contain:CONTAIN[j]})}),createElement2(c,_objectSpread(_objectSpread({},l),{},{ref:s,className:u,style:_objectSpread(_objectSpread({},O&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},p)}),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,u=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:t,className:"".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"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -39,2 +39,18 @@ var __create = Object.create; | ||
// src/core/types/object/index.js | ||
var _Object$prototype = Object.prototype; | ||
var hasOwn_ = _Object$prototype.hasOwnProperty; | ||
var toString_ = _Object$prototype.toString; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// src/preact/index.js | ||
@@ -72,2 +88,8 @@ var preact = __toModule(require("react")); | ||
// src/preact/compat.js | ||
var compat = __toModule(require("react")); | ||
function forwardRef2(fn) { | ||
return compat.forwardRef(fn); | ||
} | ||
// src/core/constants/loading-instructions.js | ||
@@ -100,8 +122,2 @@ var _MAP; | ||
// src/preact/compat.js | ||
var compat = __toModule(require("react")); | ||
function forwardRef2(fn) { | ||
return compat.forwardRef(fn); | ||
} | ||
// src/preact/component/contain.js | ||
@@ -363,13 +379,2 @@ var _excluded = ["as", "children", "className", "contentAs", "contentClassName", "contentProps", "contentRef", "contentStyle", "layout", "paint", "size", "style", "wrapperClassName", "wrapperStyle"]; | ||
// src/core/types/object/index.js | ||
var _Object$prototype = Object.prototype; | ||
var hasOwn_ = _Object$prototype.hasOwnProperty; | ||
var toString_ = _Object$prototype.toString; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/config.js | ||
@@ -416,7 +421,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// extensions/amp-instagram/1.0/component.js | ||
@@ -423,0 +423,0 @@ var _excluded4 = ["captioned", "requestResize", "shortcode", "title"]; |
@@ -0,1 +1,15 @@ | ||
// src/core/types/object/index.js | ||
var { | ||
hasOwnProperty: hasOwn_, | ||
toString: toString_ | ||
} = Object.prototype; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// src/preact/index.js | ||
@@ -50,2 +64,12 @@ import { | ||
// src/preact/compat.js | ||
import { | ||
Children, | ||
createPortal, | ||
forwardRef | ||
} from "react"; | ||
function forwardRef2(fn) { | ||
return forwardRef(fn); | ||
} | ||
// src/core/constants/loading-instructions.js | ||
@@ -82,12 +106,2 @@ var Loading = { | ||
// src/preact/compat.js | ||
import { | ||
Children, | ||
createPortal, | ||
forwardRef | ||
} from "react"; | ||
function forwardRef2(fn) { | ||
return forwardRef(fn); | ||
} | ||
// src/preact/component/contain.js | ||
@@ -383,11 +397,2 @@ var _excluded = ["as", "children", "className", "contentAs", "contentClassName", "contentProps", "contentRef", "contentStyle", "layout", "paint", "size", "style", "wrapperClassName", "wrapperStyle"]; | ||
// src/core/types/object/index.js | ||
var { | ||
hasOwnProperty: hasOwn_, | ||
toString: toString_ | ||
} = Object.prototype; | ||
function dict(opt_initial) { | ||
return opt_initial || {}; | ||
} | ||
// src/config.js | ||
@@ -434,7 +439,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
// extensions/amp-instagram/1.0/component.js | ||
@@ -441,0 +441,0 @@ var _excluded4 = ["captioned", "requestResize", "shortcode", "title"]; |
; | ||
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 c,useContext as l,useEffect as i,useImperativeHandle as s,useLayoutEffect as u,useMemo as p,useRef as f,useState as y}from"react";function b(e,t,n){return r.apply(void 0,arguments)}function O(e){return y(e)}function g(e){return f(e)}function m(e,t){u(e,t)}function d(e,t){return c(e,t)}var w=["auto","lazy","eager","unload"],j={auto:0,lazy:1,eager:2,unload:3};import{Children as P,createPortal as h,forwardRef as v}from"react";function S(e){return v(e)}var x=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function E(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 D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R,z=[null,"paint","layout","content","size","size paint","size layout","strict"],_={"position":"relative","width":"100%","height":"100%"},A=S((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:O,wrapperStyle:g}=e;const m=(f?4:0)+(u?2:0)+(p?1:0);return b(r,D(D({},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,x)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:D(D(D({},y),g),{},{contain:z[m]})}),b(a,D(D({},l),{},{ref:i,className:c,style:D(D({},f&&_),{},{"overflow":p?"hidden":"visible"},s)}),n))})),k=["as","children","className","style","wrapperClassName","wrapperStyle"];function F(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?F(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(){const e=R||(R=t({renderable:!0,playable:!0,loading:"auto"},void 0));return l(e)}S((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=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,k)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:I(I({},a),l)}),n)}));var U=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function L(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 $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H=()=>!1,T=S((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:u=H,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:P,src:h}=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,U);const{playable:S}=C(),x=function(e){const{loading:t}=C();return function(e,t){const r=j[e]||0,n=j[t]||0,o=Math.max(r,n);return w[o]}(e,t)}(y),E="unload"!==x,D=g(!1),N=function(e){const t=g(null);return t.current=e,t}(O),R=d((e=>{if(e!==D.current){D.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=g(null);return function(e,t,r){s(e,(()=>({get readyState(){return D.current?"complete":"loading"},get node(){return z.current}})),[])}(t),m((()=>{E||R(!1)}),[E,R]),i((()=>{const e=z.current;if(!S&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[S]),m((()=>{const e=z.current;if(!e||!E)return;const t=e=>{const t=z.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,E,f]),b(A,$($({},v),{},{layout:!0,size:!0,paint:!0}),E&&f&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:x,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:P,scrolling:"no",src:h,style:$($({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));T.displayName="IframeEmbed";var{hasOwnProperty:q,toString:V}=Object.prototype;function B(e){return e||{}}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=B(),ee=e=>"https://www.instagram.com"===e,te=S((function(e,t){let{captioned:r,requestResize:n,shortcode:o,title:a="Instagram"}=e,c=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{0:l,1:i}=O(Y),{0:s,1:u}=O(0),p=d((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;n&&n(e),i(B({"height":e})),u(1)}}),[n]);return b(T,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:s},matchesMessagingOrigin:ee,messageHandler:p,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:a,wrapperStyle:l},c))}));te.displayName="Instagram";export{te as Instagram}; | ||
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 m(e,t,r){return a.apply(void 0,arguments)}function d(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},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 z(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){_(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 _(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,"className":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 m(r,z(z({},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||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:k[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","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,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(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,className:`${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,d=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),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.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=z.current;if(!e||!S)return;const t=e=>{const t=z.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]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,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{0:i,1:s}=d(Y),{0:u,1:p}=d(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 m(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}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
{ | ||
"name": "@ampproject/amp-instagram", | ||
"version": "1.2108112212.0", | ||
"version": "1.2108130315.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
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
863548