@wethegit/react-autoplay-video
Version:
Viewport-aware auto-playing video component for use in React projects.
47 lines (43 loc) • 31.7 kB
JavaScript
(function(oe,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],B):(oe=typeof globalThis<"u"?globalThis:oe||self,B(oe.ReactAutoplayVideo={},oe.React))})(this,function(oe,B){"use strict";function dr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pe={exports:{}},be={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Le;function vr(){if(Le)return be;Le=1;var n=B,g=Symbol.for("react.element"),p=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,P=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function C(f,v,y){var c,b={},A=null,F=null;y!==void 0&&(A=""+y),v.key!==void 0&&(A=""+v.key),v.ref!==void 0&&(F=v.ref);for(c in v)l.call(v,c)&&!s.hasOwnProperty(c)&&(b[c]=v[c]);if(f&&f.defaultProps)for(c in v=f.defaultProps,v)b[c]===void 0&&(b[c]=v[c]);return{$$typeof:g,type:f,key:A,ref:F,props:b,_owner:P.current}}return be.Fragment=p,be.jsx=C,be.jsxs=C,be}var he={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ve;function pr(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var n=B,g=Symbol.for("react.element"),p=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),z=Symbol.iterator,M="@@iterator";function W(e){if(e===null||typeof e!="object")return null;var r=z&&e[z]||e[M];return typeof r=="function"?r:null}var $=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function L(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),d=1;d<r;d++)a[d-1]=arguments[d];q("error",e,a)}}function q(e,r,a){{var d=$.ReactDebugCurrentFrame,I=d.getStackAddendum();I!==""&&(r+="%s",a=a.concat([I]));var Y=a.map(function(x){return String(x)});Y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,Y)}}var N=!1,i=!1,re=!1,me=!1,Ee=!1,fe;fe=Symbol.for("react.module.reference");function ge(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===s||Ee||e===P||e===y||e===c||me||e===F||N||i||re||typeof e=="object"&&e!==null&&(e.$$typeof===A||e.$$typeof===b||e.$$typeof===C||e.$$typeof===f||e.$$typeof===v||e.$$typeof===fe||e.getModuleId!==void 0))}function ce(e,r,a){var d=e.displayName;if(d)return d;var I=r.displayName||r.name||"";return I!==""?a+"("+I+")":a}function le(e){return e.displayName||"Context"}function K(e){if(e==null)return null;if(typeof e.tag=="number"&&L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case p:return"Portal";case s:return"Profiler";case P:return"StrictMode";case y:return"Suspense";case c:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var r=e;return le(r)+".Consumer";case C:var a=e;return le(a._context)+".Provider";case v:return ce(e,e.render,"ForwardRef");case b:var d=e.displayName||null;return d!==null?d:K(e.type)||"Memo";case A:{var I=e,Y=I._payload,x=I._init;try{return K(x(Y))}catch{return null}}}return null}var H=Object.assign,te=0,X,ee,ie,de,t,u,R;function T(){}T.__reactDisabledLog=!0;function h(){{if(te===0){X=console.log,ee=console.info,ie=console.warn,de=console.error,t=console.group,u=console.groupCollapsed,R=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}te++}}function w(){{if(te--,te===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},e,{value:X}),info:H({},e,{value:ee}),warn:H({},e,{value:ie}),error:H({},e,{value:de}),group:H({},e,{value:t}),groupCollapsed:H({},e,{value:u}),groupEnd:H({},e,{value:R})})}te<0&&L("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=$.ReactCurrentDispatcher,E;function _(e,r,a){{if(E===void 0)try{throw Error()}catch(I){var d=I.stack.trim().match(/\n( *(at )?)/);E=d&&d[1]||""}return`
`+E+e}}var j=!1,S;{var J=typeof WeakMap=="function"?WeakMap:Map;S=new J}function o(e,r){if(!e||j)return"";{var a=S.get(e);if(a!==void 0)return a}var d;j=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=m.current,m.current=null,h();try{if(r){var x=function(){throw Error()};if(Object.defineProperty(x.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(x,[])}catch(ne){d=ne}Reflect.construct(e,[],x)}else{try{x.call()}catch(ne){d=ne}e.call(x.prototype)}}else{try{throw Error()}catch(ne){d=ne}e()}}catch(ne){if(ne&&d&&typeof ne.stack=="string"){for(var O=ne.stack.split(`
`),G=d.stack.split(`
`),V=O.length-1,U=G.length-1;V>=1&&U>=0&&O[V]!==G[U];)U--;for(;V>=1&&U>=0;V--,U--)if(O[V]!==G[U]){if(V!==1||U!==1)do if(V--,U--,U<0||O[V]!==G[U]){var Q=`
`+O[V].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),typeof e=="function"&&S.set(e,Q),Q}while(V>=1&&U>=0);break}}}finally{j=!1,m.current=Y,w(),Error.prepareStackTrace=I}var ye=e?e.displayName||e.name:"",lr=ye?_(ye):"";return typeof e=="function"&&S.set(e,lr),lr}function Z(e,r,a){return o(e,!1)}function ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ue(e,r,a){if(e==null)return"";if(typeof e=="function")return o(e,ve(e));if(typeof e=="string")return _(e);switch(e){case y:return _("Suspense");case c:return _("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Z(e.render);case b:return ue(e.type,r,a);case A:{var d=e,I=d._payload,Y=d._init;try{return ue(Y(I),r,a)}catch{}}}return""}var Se=Object.prototype.hasOwnProperty,Qe={},er=$.ReactDebugCurrentFrame;function Oe(e){if(e){var r=e._owner,a=ue(e.type,e._source,r?r.type:null);er.setExtraStackFrame(a)}else er.setExtraStackFrame(null)}function Cr(e,r,a,d,I){{var Y=Function.call.bind(Se);for(var x in e)if(Y(e,x)){var O=void 0;try{if(typeof e[x]!="function"){var G=Error((d||"React class")+": "+a+" type `"+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[x]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw G.name="Invariant Violation",G}O=e[x](r,x,d,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){O=V}O&&!(O instanceof Error)&&(Oe(I),L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",a,x,typeof O),Oe(null)),O instanceof Error&&!(O.message in Qe)&&(Qe[O.message]=!0,Oe(I),L("Failed %s type: %s",a,O.message),Oe(null))}}}var wr=Array.isArray;function Me(e){return wr(e)}function xr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function jr(e){try{return rr(e),!1}catch{return!0}}function rr(e){return""+e}function tr(e){if(jr(e))return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xr(e)),rr(e)}var Te=$.ReactCurrentOwner,Ar={key:!0,ref:!0,__self:!0,__source:!0},nr,ar,Fe;Fe={};function Ir(e){if(Se.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function kr(e){if(Se.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Dr(e,r){if(typeof e.ref=="string"&&Te.current&&r&&Te.current.stateNode!==r){var a=K(Te.current.type);Fe[a]||(L('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',K(Te.current.type),e.ref),Fe[a]=!0)}}function Mr(e,r){{var a=function(){nr||(nr=!0,L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Fr(e,r){{var a=function(){ar||(ar=!0,L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Yr=function(e,r,a,d,I,Y,x){var O={$$typeof:g,type:e,key:r,ref:a,props:x,_owner:Y};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function Wr(e,r,a,d,I){{var Y,x={},O=null,G=null;a!==void 0&&(tr(a),O=""+a),kr(r)&&(tr(r.key),O=""+r.key),Ir(r)&&(G=r.ref,Dr(r,I));for(Y in r)Se.call(r,Y)&&!Ar.hasOwnProperty(Y)&&(x[Y]=r[Y]);if(e&&e.defaultProps){var V=e.defaultProps;for(Y in V)x[Y]===void 0&&(x[Y]=V[Y])}if(O||G){var U=typeof e=="function"?e.displayName||e.name||"Unknown":e;O&&Mr(x,U),G&&Fr(x,U)}return Yr(e,O,G,I,d,Te.current,x)}}var Ye=$.ReactCurrentOwner,or=$.ReactDebugCurrentFrame;function pe(e){if(e){var r=e._owner,a=ue(e.type,e._source,r?r.type:null);or.setExtraStackFrame(a)}else or.setExtraStackFrame(null)}var We;We=!1;function $e(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}function ir(){{if(Ye.current){var e=K(Ye.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function $r(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
Check your code at `+r+":"+a+"."}return""}}var ur={};function Lr(e){{var r=ir();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
Check the top-level render call using <`+a+">.")}return r}}function sr(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Lr(r);if(ur[a])return;ur[a]=!0;var d="";e&&e._owner&&e._owner!==Ye.current&&(d=" It was passed a child from "+K(e._owner.type)+"."),pe(e),L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,d),pe(null)}}function fr(e,r){{if(typeof e!="object")return;if(Me(e))for(var a=0;a<e.length;a++){var d=e[a];$e(d)&&sr(d,r)}else if($e(e))e._store&&(e._store.validated=!0);else if(e){var I=W(e);if(typeof I=="function"&&I!==e.entries)for(var Y=I.call(e),x;!(x=Y.next()).done;)$e(x.value)&&sr(x.value,r)}}}function Vr(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===v||r.$$typeof===b))a=r.propTypes;else return;if(a){var d=K(r);Cr(a,e.props,"prop",d,e)}else if(r.PropTypes!==void 0&&!We){We=!0;var I=K(r);L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nr(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var d=r[a];if(d!=="children"&&d!=="key"){pe(e),L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d),pe(null);break}}e.ref!==null&&(pe(e),L("Invalid attribute `ref` supplied to `React.Fragment`."),pe(null))}}function cr(e,r,a,d,I,Y){{var x=ge(e);if(!x){var O="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var G=$r(I);G?O+=G:O+=ir();var V;e===null?V="null":Me(e)?V="array":e!==void 0&&e.$$typeof===g?(V="<"+(K(e.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):V=typeof e,L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,O)}var U=Wr(e,r,a,I,Y);if(U==null)return U;if(x){var Q=r.children;if(Q!==void 0)if(d)if(Me(Q)){for(var ye=0;ye<Q.length;ye++)fr(Q[ye],e);Object.freeze&&Object.freeze(Q)}else L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else fr(Q,e)}return e===l?Nr(U):Vr(U),U}}function Ur(e,r,a){return cr(e,r,a,!0)}function qr(e,r,a){return cr(e,r,a,!1)}var zr=qr,Br=Ur;he.Fragment=l,he.jsx=zr,he.jsxs=Br}()),he}process.env.NODE_ENV==="production"?Pe.exports=vr():Pe.exports=pr();var se=Pe.exports,Ce={exports:{}},Re={exports:{}},k={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ne;function yr(){if(Ne)return k;Ne=1;var n=typeof Symbol=="function"&&Symbol.for,g=n?Symbol.for("react.element"):60103,p=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,P=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,C=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,v=n?Symbol.for("react.async_mode"):60111,y=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,b=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,F=n?Symbol.for("react.memo"):60115,z=n?Symbol.for("react.lazy"):60116,M=n?Symbol.for("react.block"):60121,W=n?Symbol.for("react.fundamental"):60117,$=n?Symbol.for("react.responder"):60118,L=n?Symbol.for("react.scope"):60119;function q(i){if(typeof i=="object"&&i!==null){var re=i.$$typeof;switch(re){case g:switch(i=i.type,i){case v:case y:case l:case s:case P:case b:return i;default:switch(i=i&&i.$$typeof,i){case f:case c:case z:case F:case C:return i;default:return re}}case p:return re}}}function N(i){return q(i)===y}return k.AsyncMode=v,k.ConcurrentMode=y,k.ContextConsumer=f,k.ContextProvider=C,k.Element=g,k.ForwardRef=c,k.Fragment=l,k.Lazy=z,k.Memo=F,k.Portal=p,k.Profiler=s,k.StrictMode=P,k.Suspense=b,k.isAsyncMode=function(i){return N(i)||q(i)===v},k.isConcurrentMode=N,k.isContextConsumer=function(i){return q(i)===f},k.isContextProvider=function(i){return q(i)===C},k.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===g},k.isForwardRef=function(i){return q(i)===c},k.isFragment=function(i){return q(i)===l},k.isLazy=function(i){return q(i)===z},k.isMemo=function(i){return q(i)===F},k.isPortal=function(i){return q(i)===p},k.isProfiler=function(i){return q(i)===s},k.isStrictMode=function(i){return q(i)===P},k.isSuspense=function(i){return q(i)===b},k.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===l||i===y||i===s||i===P||i===b||i===A||typeof i=="object"&&i!==null&&(i.$$typeof===z||i.$$typeof===F||i.$$typeof===C||i.$$typeof===f||i.$$typeof===c||i.$$typeof===W||i.$$typeof===$||i.$$typeof===L||i.$$typeof===M)},k.typeOf=q,k}var D={};/** @license React v16.13.1
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ue;function br(){return Ue||(Ue=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,g=n?Symbol.for("react.element"):60103,p=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,P=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,C=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,v=n?Symbol.for("react.async_mode"):60111,y=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,b=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,F=n?Symbol.for("react.memo"):60115,z=n?Symbol.for("react.lazy"):60116,M=n?Symbol.for("react.block"):60121,W=n?Symbol.for("react.fundamental"):60117,$=n?Symbol.for("react.responder"):60118,L=n?Symbol.for("react.scope"):60119;function q(o){return typeof o=="string"||typeof o=="function"||o===l||o===y||o===s||o===P||o===b||o===A||typeof o=="object"&&o!==null&&(o.$$typeof===z||o.$$typeof===F||o.$$typeof===C||o.$$typeof===f||o.$$typeof===c||o.$$typeof===W||o.$$typeof===$||o.$$typeof===L||o.$$typeof===M)}function N(o){if(typeof o=="object"&&o!==null){var Z=o.$$typeof;switch(Z){case g:var ve=o.type;switch(ve){case v:case y:case l:case s:case P:case b:return ve;default:var ue=ve&&ve.$$typeof;switch(ue){case f:case c:case z:case F:case C:return ue;default:return Z}}case p:return Z}}}var i=v,re=y,me=f,Ee=C,fe=g,ge=c,ce=l,le=z,K=F,H=p,te=s,X=P,ee=b,ie=!1;function de(o){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),t(o)||N(o)===v}function t(o){return N(o)===y}function u(o){return N(o)===f}function R(o){return N(o)===C}function T(o){return typeof o=="object"&&o!==null&&o.$$typeof===g}function h(o){return N(o)===c}function w(o){return N(o)===l}function m(o){return N(o)===z}function E(o){return N(o)===F}function _(o){return N(o)===p}function j(o){return N(o)===s}function S(o){return N(o)===P}function J(o){return N(o)===b}D.AsyncMode=i,D.ConcurrentMode=re,D.ContextConsumer=me,D.ContextProvider=Ee,D.Element=fe,D.ForwardRef=ge,D.Fragment=ce,D.Lazy=le,D.Memo=K,D.Portal=H,D.Profiler=te,D.StrictMode=X,D.Suspense=ee,D.isAsyncMode=de,D.isConcurrentMode=t,D.isContextConsumer=u,D.isContextProvider=R,D.isElement=T,D.isForwardRef=h,D.isFragment=w,D.isLazy=m,D.isMemo=E,D.isPortal=_,D.isProfiler=j,D.isStrictMode=S,D.isSuspense=J,D.isValidElementType=q,D.typeOf=N}()),D}var qe;function ze(){return qe||(qe=1,process.env.NODE_ENV==="production"?Re.exports=yr():Re.exports=br()),Re.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var we,Be;function hr(){if(Be)return we;Be=1;var n=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;function l(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function P(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var C={},f=0;f<10;f++)C["_"+String.fromCharCode(f)]=f;var v=Object.getOwnPropertyNames(C).map(function(c){return C[c]});if(v.join("")!=="0123456789")return!1;var y={};return"abcdefghijklmnopqrst".split("").forEach(function(c){y[c]=c}),Object.keys(Object.assign({},y)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return we=P()?Object.assign:function(s,C){for(var f,v=l(s),y,c=1;c<arguments.length;c++){f=Object(arguments[c]);for(var b in f)g.call(f,b)&&(v[b]=f[b]);if(n){y=n(f);for(var A=0;A<y.length;A++)p.call(f,y[A])&&(v[y[A]]=f[y[A]])}}return v},we}var xe,Je;function je(){if(Je)return xe;Je=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xe=n,xe}var Ae,Ge;function He(){return Ge||(Ge=1,Ae=Function.call.bind(Object.prototype.hasOwnProperty)),Ae}var Ie,Ke;function mr(){if(Ke)return Ie;Ke=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var g=je(),p={},l=He();n=function(s){var C="Warning: "+s;typeof console<"u"&&console.error(C);try{throw new Error(C)}catch{}}}function P(s,C,f,v,y){if(process.env.NODE_ENV!=="production"){for(var c in s)if(l(s,c)){var b;try{if(typeof s[c]!="function"){var A=Error((v||"React class")+": "+f+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}b=s[c](C,c,v,f,null,g)}catch(z){b=z}if(b&&!(b instanceof Error)&&n((v||"React class")+": type specification of "+f+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in p)){p[b.message]=!0;var F=y?y():"";n("Failed "+f+" type: "+b.message+(F??""))}}}}return P.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(p={})},Ie=P,Ie}var ke,Xe;function Er(){if(Xe)return ke;Xe=1;var n=ze(),g=hr(),p=je(),l=He(),P=mr(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(f){var v="Warning: "+f;typeof console<"u"&&console.error(v);try{throw new Error(v)}catch{}});function C(){return null}return ke=function(f,v){var y=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function b(t){var u=t&&(y&&t[y]||t[c]);if(typeof u=="function")return u}var A="<<anonymous>>",F={array:$("array"),bigint:$("bigint"),bool:$("boolean"),func:$("function"),number:$("number"),object:$("object"),string:$("string"),symbol:$("symbol"),any:L(),arrayOf:q,element:N(),elementType:i(),instanceOf:re,node:ge(),objectOf:Ee,oneOf:me,oneOfType:fe,shape:le,exact:K};function z(t,u){return t===u?t!==0||1/t===1/u:t!==t&&u!==u}function M(t,u){this.message=t,this.data=u&&typeof u=="object"?u:{},this.stack=""}M.prototype=Error.prototype;function W(t){if(process.env.NODE_ENV!=="production")var u={},R=0;function T(w,m,E,_,j,S,J){if(_=_||A,S=S||E,J!==p){if(v){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=_+":"+E;!u[Z]&&R<3&&(s("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+_+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),u[Z]=!0,R++)}}return m[E]==null?w?m[E]===null?new M("The "+j+" `"+S+"` is marked as required "+("in `"+_+"`, but its value is `null`.")):new M("The "+j+" `"+S+"` is marked as required in "+("`"+_+"`, but its value is `undefined`.")):null:t(m,E,_,j,S)}var h=T.bind(null,!1);return h.isRequired=T.bind(null,!0),h}function $(t){function u(R,T,h,w,m,E){var _=R[T],j=X(_);if(j!==t){var S=ee(_);return new M("Invalid "+w+" `"+m+"` of type "+("`"+S+"` supplied to `"+h+"`, expected ")+("`"+t+"`."),{expectedType:t})}return null}return W(u)}function L(){return W(C)}function q(t){function u(R,T,h,w,m){if(typeof t!="function")return new M("Property `"+m+"` of component `"+h+"` has invalid PropType notation inside arrayOf.");var E=R[T];if(!Array.isArray(E)){var _=X(E);return new M("Invalid "+w+" `"+m+"` of type "+("`"+_+"` supplied to `"+h+"`, expected an array."))}for(var j=0;j<E.length;j++){var S=t(E,j,h,w,m+"["+j+"]",p);if(S instanceof Error)return S}return null}return W(u)}function N(){function t(u,R,T,h,w){var m=u[R];if(!f(m)){var E=X(m);return new M("Invalid "+h+" `"+w+"` of type "+("`"+E+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return W(t)}function i(){function t(u,R,T,h,w){var m=u[R];if(!n.isValidElementType(m)){var E=X(m);return new M("Invalid "+h+" `"+w+"` of type "+("`"+E+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return W(t)}function re(t){function u(R,T,h,w,m){if(!(R[T]instanceof t)){var E=t.name||A,_=de(R[T]);return new M("Invalid "+w+" `"+m+"` of type "+("`"+_+"` supplied to `"+h+"`, expected ")+("instance of `"+E+"`."))}return null}return W(u)}function me(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),C;function u(R,T,h,w,m){for(var E=R[T],_=0;_<t.length;_++)if(z(E,t[_]))return null;var j=JSON.stringify(t,function(J,o){var Z=ee(o);return Z==="symbol"?String(o):o});return new M("Invalid "+w+" `"+m+"` of value `"+String(E)+"` "+("supplied to `"+h+"`, expected one of "+j+"."))}return W(u)}function Ee(t){function u(R,T,h,w,m){if(typeof t!="function")return new M("Property `"+m+"` of component `"+h+"` has invalid PropType notation inside objectOf.");var E=R[T],_=X(E);if(_!=="object")return new M("Invalid "+w+" `"+m+"` of type "+("`"+_+"` supplied to `"+h+"`, expected an object."));for(var j in E)if(l(E,j)){var S=t(E,j,h,w,m+"."+j,p);if(S instanceof Error)return S}return null}return W(u)}function fe(t){if(!Array.isArray(t))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),C;for(var u=0;u<t.length;u++){var R=t[u];if(typeof R!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(R)+" at index "+u+"."),C}function T(h,w,m,E,_){for(var j=[],S=0;S<t.length;S++){var J=t[S],o=J(h,w,m,E,_,p);if(o==null)return null;o.data&&l(o.data,"expectedType")&&j.push(o.data.expectedType)}var Z=j.length>0?", expected one of type ["+j.join(", ")+"]":"";return new M("Invalid "+E+" `"+_+"` supplied to "+("`"+m+"`"+Z+"."))}return W(T)}function ge(){function t(u,R,T,h,w){return H(u[R])?null:new M("Invalid "+h+" `"+w+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return W(t)}function ce(t,u,R,T,h){return new M((t||"React class")+": "+u+" type `"+R+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+h+"`.")}function le(t){function u(R,T,h,w,m){var E=R[T],_=X(E);if(_!=="object")return new M("Invalid "+w+" `"+m+"` of type `"+_+"` "+("supplied to `"+h+"`, expected `object`."));for(var j in t){var S=t[j];if(typeof S!="function")return ce(h,w,m,j,ee(S));var J=S(E,j,h,w,m+"."+j,p);if(J)return J}return null}return W(u)}function K(t){function u(R,T,h,w,m){var E=R[T],_=X(E);if(_!=="object")return new M("Invalid "+w+" `"+m+"` of type `"+_+"` "+("supplied to `"+h+"`, expected `object`."));var j=g({},R[T],t);for(var S in j){var J=t[S];if(l(t,S)&&typeof J!="function")return ce(h,w,m,S,ee(J));if(!J)return new M("Invalid "+w+" `"+m+"` key `"+S+"` supplied to `"+h+"`.\nBad object: "+JSON.stringify(R[T],null," ")+`
Valid keys: `+JSON.stringify(Object.keys(t),null," "));var o=J(E,S,h,w,m+"."+S,p);if(o)return o}return null}return W(u)}function H(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(H);if(t===null||f(t))return!0;var u=b(t);if(u){var R=u.call(t),T;if(u!==t.entries){for(;!(T=R.next()).done;)if(!H(T.value))return!1}else for(;!(T=R.next()).done;){var h=T.value;if(h&&!H(h[1]))return!1}}else return!1;return!0;default:return!1}}function te(t,u){return t==="symbol"?!0:u?u["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&u instanceof Symbol:!1}function X(t){var u=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":te(u,t)?"symbol":u}function ee(t){if(typeof t>"u"||t===null)return""+t;var u=X(t);if(u==="object"){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return u}function ie(t){var u=ee(t);switch(u){case"array":case"object":return"an "+u;case"boolean":case"date":case"regexp":return"a "+u;default:return u}}function de(t){return!t.constructor||!t.constructor.name?A:t.constructor.name}return F.checkPropTypes=P,F.resetWarningCache=P.resetWarningCache,F.PropTypes=F,F},ke}var De,Ze;function gr(){if(Ze)return De;Ze=1;var n=je();function g(){}function p(){}return p.resetWarningCache=g,De=function(){function l(C,f,v,y,c,b){if(b!==n){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}}l.isRequired=l;function P(){return l}var s={array:l,bigint:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:P,element:l,elementType:l,instanceOf:P,node:l,objectOf:P,oneOf:P,oneOfType:P,shape:P,exact:P,checkPropTypes:p,resetWarningCache:g};return s.PropTypes=s,s},De}if(process.env.NODE_ENV!=="production"){var Tr=ze(),Rr=!0;Ce.exports=Er()(Tr.isElement,Rr)}else Ce.exports=gr()();var _r=Ce.exports;const ae=dr(_r);function Sr(n=.3,g=!0,p=!1){const[l,P]=B.useState(!1),[s,C]=B.useState(),f=B.useRef(),v=B.useCallback(([y],c)=>{const b=y.isIntersecting||p&&y.boundingClientRect.top<0;P(b),g&&b&&c.unobserve(y.target)},[g,p]);return B.useEffect(()=>{if(f.current||!s)return;const y=typeof n=="number"?{threshold:n}:n;return f.current=new IntersectionObserver(v,y),f.current.observe(s),()=>{f.current&&f.current.unobserve(s)}},[v,s,n]),[C,l,s]}B.createContext({});const Or=(n=[])=>{if(!n||!Array.isArray(n)||!n.length)return null;let g=[];return n.forEach(p=>{typeof p=="string"&&g.push(p)}),g.join(" ")},Pr=n=>{let g=0,p,l;if(n.length===0)return g;for(p=0;p<n.length;p++)l=n.charCodeAt(p),g=(g<<5)-g+l,g|=0;return g},Jr="",_e=B.forwardRef(({className:n,description:g,paused:p,posterImg:l,prefersReducedMotion:P,renderReducedMotionFallback:s,src:C,loop:f=!0},v)=>{const[y,c]=B.useState(!1),[b,A]=Sr(0),F=g?`autoplay-video-desc-${Pr(g)}`:null,z=B.useRef(),M=v||z,W=()=>{M.current&&M.current.pause()},$=()=>{!M.current||p||M.current.play()};return B.useEffect(()=>{A&&c(!0)},[A]),B.useEffect(()=>{y&&(p?W():A&&!p?$():W())},[A,y,p,P]),se.jsx("div",{ref:b,className:Or(["autoplay-video",n]),children:P&&s?se.jsx("div",{className:"autoplay-video__media",children:s()}):se.jsxs(se.Fragment,{children:[F&&se.jsx("p",{id:F,className:"autoplay-video-util-visually-hidden",children:g}),se.jsx("video",{"aria-describedby":F,autoPlay:!0,className:"autoplay-video__media",loop:f,muted:!0,playsInline:!0,poster:l,ref:M,src:y?C:null})]})})});_e.defaultProps={description:"",inViewRootMargin:"0px 0px 400px 0px",paused:!1,prefersReducedMotion:!1,loop:!0},_e.propTypes={className:ae.string,description:ae.string,paused:ae.bool,posterImg:ae.string,prefersReducedMotion:ae.bool.isRequired,renderReducedMotionFallback:ae.func,src:ae.string,loop:ae.bool},_e.displayName="AutoplayVideo",oe.AutoplayVideo=_e,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});