@ampproject/amp-instagram
Advanced tools
Comparing version 1.2106141722.0 to 1.2106160500.0
@@ -1,3 +0,3 @@ | ||
var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=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 s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("preact/compat"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(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?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(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 He(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 ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(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,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["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){Be(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 Be(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=We(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 We(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 Je(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,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);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"},Ye=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(C={},c.AUTO,0),z(C,c.LAZY,1),z(C,c.EAGER,2),z(C,c.UNLOAD,3),C);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return ue(Ze())}function me(e){return ce(e,K().loading)}var Ke=["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){Xe(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 Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(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 rr(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 tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(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?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==c.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.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,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,lt=ve.hasOwnProperty,ct=ve.toString;function ee(e){return e||{}}var q=Array.isArray,f=self.AMP_CONFIG||{},cr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:cr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,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||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(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 dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){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 yr(e,r){if(e){if("string"==typeof e)return we(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 we(e,r)}}function we(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 hr(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 xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(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 br(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 Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram"; | ||
var Ce=Object.create,D=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Me=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Me(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Ne(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=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 s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("preact/compat"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(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?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(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 He(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 ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(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,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,j=e.style,w=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(w||"").trim()||null,style:v(v(v({},j),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["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){Be(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 Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function We(e,r){if(null==e)return{};var t,n,o=qe(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 qe(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 Je(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,$($({},We(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);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"},Ye=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(C={},c.AUTO,0),z(C,c.LAZY,1),z(C,c.EAGER,2),z(C,c.UNLOAD,3),C);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return ue(Ze())}function me(e){return ce(e,K().loading)}var Ke=["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){Xe(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 Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(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 rr(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 tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(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?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),j=K().playable,w=me(b),h=w!==c.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!j&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.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,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:w,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,lt=ve.hasOwnProperty,ct=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},cr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:cr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,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||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var In=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(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 dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){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 yr(e,r){if(e){if("string"==typeof e)return we(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 we(e,r)}}function we(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 hr(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 xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(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 br(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 Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map |
@@ -1,3 +0,3 @@ | ||
import{useCallback as _e,useContext as Oe,useEffect as ye,useImperativeHandle as be,useLayoutEffect as Ee,useMemo as yt,useRef as xe,useState as he}from"preact/hooks";import{Fragment as ht,cloneElement as mt,createContext as ge,createElement as de,createRef as xt}from"preact";import{hydrate as gt,render as dt}from"preact";function u(e,t,r){return de.apply(void 0,arguments)}function J(e){return ge(e,void 0)}function w(e){return he(e)}function S(e){return xe(e)}function Q(e,t){ye(e,t)}function C(e,t){Ee(e,t)}function W(e){return Oe(e)}function I(e,t){return _e(e,t)}function U(e,t,r){return be(e,t,r)}import{Children as bt,createPortal as _t,forwardRef as ve}from"preact/compat";function m(e){return ve(e)}var Se=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Y(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){if(null==e)return{};var r,n,a=Pe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Pe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var we=[null,"paint","layout","content","size","size paint","size layout","strict"],Ce={position:"relative",width:"100%",height:"100%"};function Ie(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:c,contentProps:i,contentRef:s,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:b,wrapperClassName:m,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return u(r,l(l({},Re(e,Se)),{},{ref:t,className:`${a||""} ${m||""}`.trim()||null,style:l(l(l({},b),g),{},{contain:we[d]})}),u(o,l(l({},i),{},{ref:s,className:c,style:l(l({},O&&Ce),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(Ie),Ne=["as","children","className","style","wrapperClassName","wrapperStyle"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=je(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function je(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function De(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:c}=e;return u(r,N(N({},Me(e,Ne)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),c)}),n)}var Fe=m(De);function $(e){let t=S(null);return t.current=e,t}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Te=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],K={[c.AUTO]:0,[c.LAZY]:1,[c.EAGER]:2,[c.UNLOAD]:3};function X(e,t){let r=K[e]||0,n=K[t]||0,a=Math.max(r,n);return Te[a]}var ee,A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ue(){return ee||(ee=J({renderable:!0,playable:!0,loading:c.AUTO}))}function G(){return W(Ue())}function te(e){let{loading:t}=G();return X(e,t)}var ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function re(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){$e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e,t){if(null==e)return{};var r,n,a=Ve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ve(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var He=()=>!1,ze="about:blank",qe=e=>e&&e!=ze&&!e.includes("#");function Be(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=He,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:b,src:m}=e,g=Ge(e,ke),{playable:d}=G(),w=te(y),h=w!==c.UNLOAD,j=S(!1),P=$(O),v=I((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),Q((()=>{let e=E.current;if(!d&&e){let{src:t}=e;qe(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),u(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&u("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:b,scrolling:"no",src:m,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var V=m(Be);V.displayName="IframeEmbed";var{hasOwnProperty:or,toString:sr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},Ke=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,ue=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function le(e){if(!self.document||!self.document.head||self.location&&ue.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Xe={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Ke,cdn:a.cdnUrl||le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:ue,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var bn=self.__AMP_LOG;function fe(e){return e.data}function pe(e){return JSON.parse(e)}var et=["captioned","requestResize","shortcode","title"];function me(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 tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e,t){if(null==e)return{};var r,n,a=ot(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ot(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var st=H(),it=e=>"https://www.instagram.com"===e;function at(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=nt(e,et),{0:c,1:i}=w(st),{0:s,1:p}=w(0),f=I((e=>{let t=pe(fe(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),i(H({height:e})),p(1)}}),[n]);return u(V,tt({allowTransparency:!0,iframeStyle:{opacity:s},matchesMessagingOrigin:it,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:c},l))}var ct=m(at);ct.displayName="Instagram";export{ct as Instagram}; | ||
import{useCallback as _e,useContext as Oe,useEffect as ye,useImperativeHandle as be,useLayoutEffect as Ee,useMemo as yt,useRef as xe,useState as he}from"preact/hooks";import{Fragment as ht,cloneElement as mt,createContext as ge,createElement as de,createRef as xt}from"preact";import{hydrate as gt,render as dt}from"preact";function c(e,t,r){return de.apply(void 0,arguments)}function J(e){return ge(e,void 0)}function w(e){return he(e)}function S(e){return xe(e)}function W(e,t){ye(e,t)}function C(e,t){Ee(e,t)}function Q(e){return Oe(e)}function N(e,t){return _e(e,t)}function U(e,t,r){return be(e,t,r)}import{Children as bt,createPortal as _t,forwardRef as ve}from"preact/compat";function m(e){return ve(e)}var Se=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Y(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){if(null==e)return{};var r,n,a=Pe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Pe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var we=[null,"paint","layout","content","size","size paint","size layout","strict"],Ce={position:"relative",width:"100%",height:"100%"};function Ne(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:i,contentProps:s,contentRef:u,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return c(r,l(l({},Re(e,Se)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:we[d]})}),c(o,l(l({},s),{},{ref:u,className:i,style:l(l({},O&&Ce),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(Ne),Ie=["as","children","className","style","wrapperClassName","wrapperStyle"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=je(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function je(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function De(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:i}=e;return c(r,I(I({},Me(e,Ie)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:I(I({},o),i)}),n)}var Fe=m(De);function $(e){let t=S(null);return t.current=e,t}var u={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Te=[u.AUTO,u.LAZY,u.EAGER,u.UNLOAD],K={[u.AUTO]:0,[u.LAZY]:1,[u.EAGER]:2,[u.UNLOAD]:3};function X(e,t){let r=K[e]||0,n=K[t]||0,a=Math.max(r,n);return Te[a]}var ee,A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ue(){return ee||(ee=J({renderable:!0,playable:!0,loading:u.AUTO}))}function G(){return Q(Ue())}function te(e){let{loading:t}=G();return X(e,t)}var ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function re(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){$e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e,t){if(null==e)return{};var r,n,a=Ve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ve(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var He=()=>!1,ze="about:blank",qe=e=>e&&e!=ze&&!e.includes("#");function Be(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=He,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=Ge(e,ke),{playable:d}=G(),w=te(y),h=w!==u.UNLOAD,j=S(!1),P=$(O),v=N((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;qe(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),c(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&c("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var V=m(Be);V.displayName="IframeEmbed";var{hasOwnProperty:or,toString:sr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},Ke=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,ce=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function le(e){if(!self.document||!self.document.head||self.location&&ce.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Xe={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Ke,cdn:a.cdnUrl||le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:ce,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var vn=self.__AMP_LOG;function fe(e){return e.data}function pe(e){return JSON.parse(e)}var et=["captioned","requestResize","shortcode","title"];function me(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 tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e,t){if(null==e)return{};var r,n,a=ot(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ot(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var st=H(),it=e=>"https://www.instagram.com"===e;function at(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=nt(e,et),{0:i,1:s}=w(st),{0:u,1:p}=w(0),f=N((e=>{let t=pe(fe(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),s(H({height:e})),p(1)}}),[n]);return c(V,tt({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:it,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:i},l))}var ut=m(at);ut.displayName="Instagram";export{ut as Instagram}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.module.js.map |
@@ -1,3 +0,3 @@ | ||
var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=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 s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("react"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(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?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(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 He(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 ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(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,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["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){Be(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 Be(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=We(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 We(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 Je(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,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);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"},Ye=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(C={},c.AUTO,0),z(C,c.LAZY,1),z(C,c.EAGER,2),z(C,c.UNLOAD,3),C);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return ue(Ze())}function me(e){return ce(e,K().loading)}var Ke=["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){Xe(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 Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(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 rr(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 tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(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?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==c.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.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,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,lt=ve.hasOwnProperty,ct=ve.toString;function ee(e){return e||{}}var q=Array.isArray,f=self.AMP_CONFIG||{},cr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:cr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,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||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(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 dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){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 yr(e,r){if(e){if("string"==typeof e)return we(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 we(e,r)}}function we(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 hr(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 xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(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 br(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 Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram"; | ||
var Ce=Object.create,D=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Me=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Me(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Ne(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=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 s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("react"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(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?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(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 He(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 ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(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,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,j=e.style,w=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(w||"").trim()||null,style:v(v(v({},j),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["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){Be(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 Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function We(e,r){if(null==e)return{};var t,n,o=qe(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 qe(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 Je(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,$($({},We(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);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"},Ye=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],le=(z(C={},c.AUTO,0),z(C,c.LAZY,1),z(C,c.EAGER,2),z(C,c.UNLOAD,3),C);function ce(e,r){var t=le[e]||0,n=le[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return ue(Ze())}function me(e){return ce(e,K().loading)}var Ke=["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){Xe(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 Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(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 rr(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 tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(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?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),j=K().playable,w=me(b),h=w!==c.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!j&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.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,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:w,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,lt=ve.hasOwnProperty,ct=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},cr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:cr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,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||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var In=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(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 dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){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 yr(e,r){if(e){if("string"==typeof e)return we(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 we(e,r)}}function we(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 hr(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 xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(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 br(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 Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map |
@@ -1,3 +0,3 @@ | ||
import{useCallback as _e,useContext as Oe,useEffect as ye,useImperativeHandle as be,useLayoutEffect as Ee,useMemo as yt,useRef as xe,useState as he}from"react";import{Fragment as ht,cloneElement as mt,createContext as ge,createElement as de,createRef as xt}from"react";import{hydrate as gt,render as dt}from"react-dom";function u(e,t,r){return de.apply(void 0,arguments)}function J(e){return ge(e,void 0)}function w(e){return he(e)}function S(e){return xe(e)}function Q(e,t){ye(e,t)}function C(e,t){Ee(e,t)}function W(e){return Oe(e)}function I(e,t){return _e(e,t)}function U(e,t,r){return be(e,t,r)}import{Children as bt,createPortal as _t,forwardRef as ve}from"react";function m(e){return ve(e)}var Se=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Y(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){if(null==e)return{};var r,n,a=Pe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Pe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var we=[null,"paint","layout","content","size","size paint","size layout","strict"],Ce={position:"relative",width:"100%",height:"100%"};function Ie(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:c,contentProps:i,contentRef:s,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:b,wrapperClassName:m,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return u(r,l(l({},Re(e,Se)),{},{ref:t,className:`${a||""} ${m||""}`.trim()||null,style:l(l(l({},b),g),{},{contain:we[d]})}),u(o,l(l({},i),{},{ref:s,className:c,style:l(l({},O&&Ce),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(Ie),Ne=["as","children","className","style","wrapperClassName","wrapperStyle"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=je(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function je(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function De(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:c}=e;return u(r,N(N({},Me(e,Ne)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),c)}),n)}var Fe=m(De);function $(e){let t=S(null);return t.current=e,t}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Te=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],K={[c.AUTO]:0,[c.LAZY]:1,[c.EAGER]:2,[c.UNLOAD]:3};function X(e,t){let r=K[e]||0,n=K[t]||0,a=Math.max(r,n);return Te[a]}var ee,A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ue(){return ee||(ee=J({renderable:!0,playable:!0,loading:c.AUTO}))}function G(){return W(Ue())}function te(e){let{loading:t}=G();return X(e,t)}var ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function re(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){$e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e,t){if(null==e)return{};var r,n,a=Ve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ve(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var He=()=>!1,ze="about:blank",qe=e=>e&&e!=ze&&!e.includes("#");function Be(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=He,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:b,src:m}=e,g=Ge(e,ke),{playable:d}=G(),w=te(y),h=w!==c.UNLOAD,j=S(!1),P=$(O),v=I((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),Q((()=>{let e=E.current;if(!d&&e){let{src:t}=e;qe(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),u(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&u("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:b,scrolling:"no",src:m,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var V=m(Be);V.displayName="IframeEmbed";var{hasOwnProperty:or,toString:sr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},Ke=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,ue=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function le(e){if(!self.document||!self.document.head||self.location&&ue.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Xe={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Ke,cdn:a.cdnUrl||le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:ue,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var bn=self.__AMP_LOG;function fe(e){return e.data}function pe(e){return JSON.parse(e)}var et=["captioned","requestResize","shortcode","title"];function me(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 tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e,t){if(null==e)return{};var r,n,a=ot(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ot(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var st=H(),it=e=>"https://www.instagram.com"===e;function at(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=nt(e,et),{0:c,1:i}=w(st),{0:s,1:p}=w(0),f=I((e=>{let t=pe(fe(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),i(H({height:e})),p(1)}}),[n]);return u(V,tt({allowTransparency:!0,iframeStyle:{opacity:s},matchesMessagingOrigin:it,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:c},l))}var ct=m(at);ct.displayName="Instagram";export{ct as Instagram}; | ||
import{useCallback as _e,useContext as Oe,useEffect as ye,useImperativeHandle as be,useLayoutEffect as Ee,useMemo as yt,useRef as xe,useState as he}from"react";import{Fragment as ht,cloneElement as mt,createContext as ge,createElement as de,createRef as xt}from"react";import{hydrate as gt,render as dt}from"react-dom";function c(e,t,r){return de.apply(void 0,arguments)}function J(e){return ge(e,void 0)}function w(e){return he(e)}function S(e){return xe(e)}function W(e,t){ye(e,t)}function C(e,t){Ee(e,t)}function Q(e){return Oe(e)}function N(e,t){return _e(e,t)}function U(e,t,r){return be(e,t,r)}import{Children as bt,createPortal as _t,forwardRef as ve}from"react";function m(e){return ve(e)}var Se=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Y(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Re(e,t){if(null==e)return{};var r,n,a=Pe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Pe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var we=[null,"paint","layout","content","size","size paint","size layout","strict"],Ce={position:"relative",width:"100%",height:"100%"};function Ne(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:i,contentProps:s,contentRef:u,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return c(r,l(l({},Re(e,Se)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:we[d]})}),c(o,l(l({},s),{},{ref:u,className:i,style:l(l({},O&&Ce),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(Ne),Ie=["as","children","className","style","wrapperClassName","wrapperStyle"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=je(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function je(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function De(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:i}=e;return c(r,I(I({},Me(e,Ie)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:I(I({},o),i)}),n)}var Fe=m(De);function $(e){let t=S(null);return t.current=e,t}var u={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Te=[u.AUTO,u.LAZY,u.EAGER,u.UNLOAD],K={[u.AUTO]:0,[u.LAZY]:1,[u.EAGER]:2,[u.UNLOAD]:3};function X(e,t){let r=K[e]||0,n=K[t]||0,a=Math.max(r,n);return Te[a]}var ee,A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ue(){return ee||(ee=J({renderable:!0,playable:!0,loading:u.AUTO}))}function G(){return Q(Ue())}function te(e){let{loading:t}=G();return X(e,t)}var ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function re(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){$e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e,t){if(null==e)return{};var r,n,a=Ve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ve(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var He=()=>!1,ze="about:blank",qe=e=>e&&e!=ze&&!e.includes("#");function Be(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=He,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=Ge(e,ke),{playable:d}=G(),w=te(y),h=w!==u.UNLOAD,j=S(!1),P=$(O),v=N((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;qe(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),c(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&c("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var V=m(Be);V.displayName="IframeEmbed";var{hasOwnProperty:or,toString:sr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},Ke=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,ce=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function le(e){if(!self.document||!self.document.head||self.location&&ce.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Xe={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Ke,cdn:a.cdnUrl||le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:ce,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var vn=self.__AMP_LOG;function fe(e){return e.data}function pe(e){return JSON.parse(e)}var et=["captioned","requestResize","shortcode","title"];function me(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 tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e,t){if(null==e)return{};var r,n,a=ot(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ot(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var st=H(),it=e=>"https://www.instagram.com"===e;function at(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=nt(e,et),{0:i,1:s}=w(st),{0:u,1:p}=w(0),f=N((e=>{let t=pe(fe(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),s(H({height:e})),p(1)}}),[n]);return c(V,tt({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:it,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:i},l))}var ut=m(at);ut.displayName="Instagram";export{ut as Instagram}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.module.js.map |
{ | ||
"name": "@ampproject/amp-instagram", | ||
"version": "1.2106141722.0", | ||
"version": "1.2106160500.0", | ||
"description": "AMP HTML amp-instagram Component", | ||
@@ -5,0 +5,0 @@ "author": "The AMP HTML Authors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package