Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ampproject/amp-instagram

Package Overview
Dependencies
Maintainers
16
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampproject/amp-instagram - npm Package Compare versions

Comparing version 1.2106182132.0 to 1.2106212012.0

2

dist/component-preact.js

@@ -1,3 +0,3 @@

var Le=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Le(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),Ue(exports,{Instagram:function(){return Ne}});var u=U(require("preact/hooks")),O=U(require("preact")),oe=U(require("preact"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var V=U(require("preact/compat"));function y(e){return V.forwardRef(e)}var He=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){ke(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ve(e,r){if(null==e)return{};var t,n,o=$e(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function $e(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ze=[null,"paint","layout","content","size","size paint","size layout","strict"],Be={position:"relative",width:"100%",height:"100%"};function We(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},Ve(e,He)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ze[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Be),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y(We),qe=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Je(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Je(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qe(e,r){if(null==e)return{};var t,n,o=Ye(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Ye(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Ze(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},Qe(e,qe)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var M,Ke=y(Ze);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Xe=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(M={},c.AUTO,0),z(M,c.LAZY,1),z(M,c.EAGER,2),z(M,c.UNLOAD,3),M);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Xe[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return ce(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nr(e,r){if(null==e)return{};var t,n,o=or(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function or(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,s=void 0===u?ar:u,f=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=L(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!s(e.origin)||f(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,f,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,dt=ve.hasOwnProperty,vt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var zn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var yr=["captioned","requestResize","shortcode","title"];function Ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function hr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ie(Object(t),!0).forEach((function(r){xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Ar(e)||Or(e,r)||br(e,r)||Er()}function Er(){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 br(e,r){if(e){if("string"==typeof e)return Ce(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ce(e,r)}}function Ce(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Or(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Ar(e){if(Array.isArray(e))return e}function Sr(e,r){if(null==e)return{};var t,n,o=_r(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _r(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Rr=ee(),Pr=function(e){return"https://www.instagram.com"===e};function wr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Sr(e,yr),l=Me(G(Rr),2),u=l[0],s=l[1],f=Me(G(0),2),y=f[0],b=f[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),b(1)}}),[n]);return p(X,hr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Pr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ne=y(wr);Ne.displayName="Instagram";
var Le=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Le(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Ne}});var u=U(require("preact/hooks")),O=U(require("preact")),oe=U(require("preact"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var V=U(require("preact/compat"));function y(e){return V.forwardRef(e)}var He=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){ke(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ve(e,r){if(null==e)return{};var t,n,o=$e(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function $e(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ze=[null,"paint","layout","content","size","size paint","size layout","strict"],Be={position:"relative",width:"100%",height:"100%"};function We(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},Ve(e,He)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ze[P]})}),p(i,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&Be),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(We),qe=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Je(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Je(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qe(e,r){if(null==e)return{};var t,n,o=Ye(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Ye(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Ze(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},Qe(e,qe)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var M,Ke=y(Ze);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Xe=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(M={},c.AUTO,0),z(M,c.LAZY,1),z(M,c.EAGER,2),z(M,c.UNLOAD,3),M);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Xe[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return ce(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nr(e,r){if(null==e)return{};var t,n,o=or(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function or(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,f=void 0===u?ar:u,s=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=L(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,dt=ve.hasOwnProperty,vt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var zn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var yr=["captioned","requestResize","shortcode","title"];function Ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function hr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ie(Object(t),!0).forEach((function(r){xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Ar(e)||Or(e,r)||br(e,r)||Er()}function Er(){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 br(e,r){if(e){if("string"==typeof e)return Ce(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ce(e,r)}}function Ce(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Or(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Ar(e){if(Array.isArray(e))return e}function Sr(e,r){if(null==e)return{};var t,n,o=_r(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _r(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Rr=ee(),Pr=function(e){return"https://www.instagram.com"===e};function wr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Sr(e,yr),l=Me(G(Rr),2),u=l[0],f=l[1],s=Me(G(0),2),y=s[0],b=s[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),b(1)}}),[n]);return p(X,hr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Pr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ne=y(wr);Ne.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-preact.js.map

@@ -11,2 +11,3 @@ var __create = Object.create;

var __export = function(target, all) {
__markAsModule(target);
for (var name in all)

@@ -33,3 +34,2 @@ __defProp(target, name, { get: all[name], enumerable: true });

// extensions/amp-instagram/1.0/component.js
__markAsModule(exports);
__export(exports, {

@@ -36,0 +36,0 @@ Instagram: function() {

@@ -1,3 +0,3 @@

var Le=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Le(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),Ue(exports,{Instagram:function(){return Ne}});var u=U(require("react")),O=U(require("react")),oe=U(require("react-dom"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var V=U(require("react"));function y(e){return V.forwardRef(e)}var He=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){ke(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ve(e,r){if(null==e)return{};var t,n,o=$e(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function $e(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ze=[null,"paint","layout","content","size","size paint","size layout","strict"],Be={position:"relative",width:"100%",height:"100%"};function We(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},Ve(e,He)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ze[P]})}),p(i,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&Be),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(We),qe=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Je(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Je(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qe(e,r){if(null==e)return{};var t,n,o=Ye(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Ye(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Ze(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},Qe(e,qe)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var M,Ke=y(Ze);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Xe=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(M={},c.AUTO,0),z(M,c.LAZY,1),z(M,c.EAGER,2),z(M,c.UNLOAD,3),M);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Xe[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return ce(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nr(e,r){if(null==e)return{};var t,n,o=or(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function or(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,f=void 0===u?ar:u,s=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=L(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,dt=ve.hasOwnProperty,vt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var zn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var yr=["captioned","requestResize","shortcode","title"];function Ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function hr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ie(Object(t),!0).forEach((function(r){xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Ar(e)||Or(e,r)||br(e,r)||Er()}function Er(){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 br(e,r){if(e){if("string"==typeof e)return Ce(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ce(e,r)}}function Ce(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Or(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Ar(e){if(Array.isArray(e))return e}function Sr(e,r){if(null==e)return{};var t,n,o=_r(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _r(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Rr=ee(),Pr=function(e){return"https://www.instagram.com"===e};function wr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Sr(e,yr),l=Me(G(Rr),2),u=l[0],f=l[1],s=Me(G(0),2),y=s[0],b=s[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),b(1)}}),[n]);return p(X,hr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Pr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ne=y(wr);Ne.displayName="Instagram";
var Le=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Le(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Ne}});var u=U(require("react")),O=U(require("react")),oe=U(require("react-dom"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var V=U(require("react"));function y(e){return V.forwardRef(e)}var He=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){ke(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ve(e,r){if(null==e)return{};var t,n,o=$e(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function $e(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ze=[null,"paint","layout","content","size","size paint","size layout","strict"],Be={position:"relative",width:"100%",height:"100%"};function We(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},Ve(e,He)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ze[P]})}),p(i,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&Be),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(We),qe=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Je(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Je(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qe(e,r){if(null==e)return{};var t,n,o=Ye(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Ye(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Ze(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},Qe(e,qe)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var M,Ke=y(Ze);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Xe=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(M={},c.AUTO,0),z(M,c.LAZY,1),z(M,c.EAGER,2),z(M,c.UNLOAD,3),M);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Xe[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return ce(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nr(e,r){if(null==e)return{};var t,n,o=or(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function or(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,f=void 0===u?ar:u,s=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=L(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,dt=ve.hasOwnProperty,vt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var zn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var yr=["captioned","requestResize","shortcode","title"];function Ie(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function hr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ie(Object(t),!0).forEach((function(r){xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Ar(e)||Or(e,r)||br(e,r)||Er()}function Er(){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 br(e,r){if(e){if("string"==typeof e)return Ce(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ce(e,r)}}function Ce(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Or(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Ar(e){if(Array.isArray(e))return e}function Sr(e,r){if(null==e)return{};var t,n,o=_r(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _r(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Rr=ee(),Pr=function(e){return"https://www.instagram.com"===e};function wr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Sr(e,yr),l=Me(G(Rr),2),u=l[0],f=l[1],s=Me(G(0),2),y=s[0],b=s[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),b(1)}}),[n]);return p(X,hr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Pr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ne=y(wr);Ne.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-react.js.map

@@ -11,2 +11,3 @@ var __create = Object.create;

var __export = function(target, all) {
__markAsModule(target);
for (var name in all)

@@ -33,3 +34,2 @@ __defProp(target, name, { get: all[name], enumerable: true });

// extensions/amp-instagram/1.0/component.js
__markAsModule(exports);
__export(exports, {

@@ -36,0 +36,0 @@ Instagram: function() {

{
"name": "@ampproject/amp-instagram",
"version": "1.2106182132.0",
"version": "1.2106212012.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc