UNPKG

reactjs-vimeo-player

Version:
28 lines (24 loc) 37.4 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Ne=require("react"),Xe=(r=>r&&typeof r=="object"&&"default"in r?r:{default:r})(Ne);/*! @vimeo/player v2.18.0 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */function ut(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function Ue(r,a){for(var c=0;c<a.length;c++){var o=a[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}var Ge=typeof global<"u"&&{}.toString.call(global)==="[object global]";function Be(r,a){return r.indexOf(a.toLowerCase())===0?r:"".concat(a.toLowerCase()).concat(r.substr(0,1).toUpperCase()).concat(r.substr(1))}function ct(r){return Boolean(r&&r.nodeType===1&&"nodeName"in r&&r.ownerDocument&&r.ownerDocument.defaultView)}function lt(r){return!isNaN(parseFloat(r))&&isFinite(r)&&Math.floor(r)==r}function le(r){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(r)}function Ye(r){return/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(r)}function Ke(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.id,c=r.url,o=a||c;if(!o)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(lt(o))return"https://vimeo.com/".concat(o);if(le(o))return o.replace("http:","https:");throw a?new TypeError("\u201C".concat(a,"\u201D is not a valid video id.")):new TypeError("\u201C".concat(o,"\u201D is not a vimeo.com url."))}var st=Array.prototype.indexOf!==void 0,ft=typeof window<"u"&&window.postMessage!==void 0;if(!(Ge||st&&ft))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var Ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill * https://github.com/polygonplanet/weakmap-polyfill * Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com> * @license MIT */(function(r){if(!r.WeakMap){var a=Object.prototype.hasOwnProperty,c=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{value:1}).x===1}catch{}}(),o=function(n,i,p){c?Object.defineProperty(n,i,{configurable:!0,writable:!0,value:p}):n[i]=p};r.WeakMap=function(){function n(){if(this===void 0)throw new TypeError("Constructor WeakMap requires 'new'");if(o(this,"_id",p("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function i(d,_){if(!e(d)||!a.call(d,"_id"))throw new TypeError(_+" method called on incompatible receiver "+typeof d)}function p(d){return d+"_"+v()+"."+v()}function v(){return Math.random().toString().substring(2)}return o(n.prototype,"delete",function(d){if(i(this,"delete"),!e(d))return!1;var _=d[this._id];return!(!_||_[0]!==d)&&(delete d[this._id],!0)}),o(n.prototype,"get",function(d){if(i(this,"get"),e(d)){var _=d[this._id];return _&&_[0]===d?_[1]:void 0}}),o(n.prototype,"has",function(d){if(i(this,"has"),!e(d))return!1;var _=d[this._id];return!(!_||_[0]!==d)}),o(n.prototype,"set",function(d,_){if(i(this,"set"),!e(d))throw new TypeError("Invalid value used as weak map key");var E=d[this._id];return E&&E[0]===d?(E[1]=_,this):(o(d,this._id,[d,_]),this)}),o(n,"_polyfill",!0),n}()}function e(n){return Object(n)===n}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ze);var He,Ae,te=(He=function(r){/*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */var a,c,o;o=function(){var e,n,i,p=Object.prototype.toString,v=typeof setImmediate<"u"?function(u){return setImmediate(u)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(u,l,s,b){return Object.defineProperty(u,l,{value:s,writable:!0,configurable:b!==!1})}}catch{e=function(l,s,b){return l[s]=b,l}}function d(u,l){i.add(u,l),n||(n=v(i.drain))}function _(u){var l,s=typeof u;return u==null||s!="object"&&s!="function"||(l=u.then),typeof l=="function"&&l}function E(){for(var u=0;u<this.chain.length;u++)q(this,this.state===1?this.chain[u].success:this.chain[u].failure,this.chain[u]);this.chain.length=0}function q(u,l,s){var b,w;try{l===!1?s.reject(u.msg):(b=l===!0?u.msg:l.call(void 0,u.msg))===s.promise?s.reject(TypeError("Promise-chain cycle")):(w=_(b))?w.call(b,s.resolve,s.reject):s.resolve(b)}catch(M){s.reject(M)}}function A(u){var l,s=this;if(!s.triggered){s.triggered=!0,s.def&&(s=s.def);try{(l=_(u))?d(function(){var b=new F(s);try{l.call(u,function(){A.apply(b,arguments)},function(){x.apply(b,arguments)})}catch(w){x.call(b,w)}}):(s.msg=u,s.state=1,s.chain.length>0&&d(E,s))}catch(b){x.call(new F(s),b)}}}function x(u){var l=this;l.triggered||(l.triggered=!0,l.def&&(l=l.def),l.msg=u,l.state=2,l.chain.length>0&&d(E,l))}function $(u,l,s,b){for(var w=0;w<l.length;w++)(function(M){u.resolve(l[M]).then(function(z){s(M,z)},b)})(w)}function F(u){this.def=u,this.triggered=!1}function Y(u){this.promise=u,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function L(u){if(typeof u!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var l=new Y(this);this.then=function(s,b){var w={success:typeof s!="function"||s,failure:typeof b=="function"&&b};return w.promise=new this.constructor(function(M,z){if(typeof M!="function"||typeof z!="function")throw TypeError("Not a function");w.resolve=M,w.reject=z}),l.chain.push(w),l.state!==0&&d(E,l),w.promise},this.catch=function(s){return this.then(void 0,s)};try{u.call(void 0,function(s){A.call(l,s)},function(s){x.call(l,s)})}catch(s){x.call(l,s)}}i=function(){var u,l,s;function b(w,M){this.fn=w,this.self=M,this.next=void 0}return{add:function(w,M){s=new b(w,M),l?l.next=s:u=s,l=s,s=void 0},drain:function(){var w=u;for(u=l=n=void 0;w;)w.fn.call(w.self),w=w.next}}}();var H=e({},"constructor",L,!1);return L.prototype=H,e(H,"__NPO__",0,!1),e(L,"resolve",function(u){return u&&typeof u=="object"&&u.__NPO__===1?u:new this(function(l,s){if(typeof l!="function"||typeof s!="function")throw TypeError("Not a function");l(u)})}),e(L,"reject",function(u){return new this(function(l,s){if(typeof l!="function"||typeof s!="function")throw TypeError("Not a function");s(u)})}),e(L,"all",function(u){var l=this;return p.call(u)!="[object Array]"?l.reject(TypeError("Not an array")):u.length===0?l.resolve([]):new l(function(s,b){if(typeof s!="function"||typeof b!="function")throw TypeError("Not a function");var w=u.length,M=Array(w),z=0;$(l,u,function(ne,W){M[ne]=W,++z===w&&s(M)},b)})}),e(L,"race",function(u){var l=this;return p.call(u)!="[object Array]"?l.reject(TypeError("Not an array")):new l(function(s,b){if(typeof s!="function"||typeof b!="function")throw TypeError("Not a function");$(l,u,function(w,M){s(M)},b)})}),L},(c=Ze)[a="Promise"]=c[a]||o(),r.exports&&(r.exports=c[a])},He(Ae={exports:{}},Ae.exports),Ae.exports),B=new WeakMap;function je(r,a,c){var o=B.get(r.element)||{};a in o||(o[a]=[]),o[a].push(c),B.set(r.element,o)}function Fe(r,a){return(B.get(r.element)||{})[a]||[]}function Me(r,a,c){var o=B.get(r.element)||{};if(!o[a])return!0;if(!c)return o[a]=[],B.set(r.element,o),!0;var e=o[a].indexOf(c);return e!==-1&&o[a].splice(e,1),B.set(r.element,o),o[a]&&o[a].length===0}function dt(r,a){var c=B.get(r);B.set(a,c),B.delete(r)}function Ie(r){if(typeof r=="string")try{r=JSON.parse(r)}catch(a){return console.warn(a),{}}return r}function Ce(r,a,c){if(r.element.contentWindow&&r.element.contentWindow.postMessage){var o={method:a};c!==void 0&&(o.value=c);var e=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));e>=8&&e<10&&(o=JSON.stringify(o)),r.element.contentWindow.postMessage(o,r.origin)}}function pt(r,a){var c,o=[];if((a=Ie(a)).event)a.event==="error"&&Fe(r,a.data.method).forEach(function(n){var i=new Error(a.data.message);i.name=a.data.name,n.reject(i),Me(r,a.data.method,n)}),o=Fe(r,"event:".concat(a.event)),c=a.data;else if(a.method){var e=function(n,i){var p=Fe(n,i);if(p.length<1)return!1;var v=p.shift();return Me(n,i,v),v}(r,a.method);e&&(o.push(e),c=a.value)}o.forEach(function(n){try{if(typeof n=="function")return void n.call(r,c);n.resolve(c)}catch{}})}var ht=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function et(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ht.reduce(function(c,o){var e=r.getAttribute("data-vimeo-".concat(o));return(e||e==="")&&(c[o]=e===""?1:e),c},a)}function Ve(r,a){var c=r.html;if(!a)throw new TypeError("An element must be provided");if(a.getAttribute("data-vimeo-initialized")!==null)return a.querySelector("iframe");var o=document.createElement("div");return o.innerHTML=c,a.appendChild(o.firstChild),a.setAttribute("data-vimeo-initialized","true"),a.querySelector("iframe")}function tt(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0;return new Promise(function(o,e){if(!le(r))throw new TypeError("\u201C".concat(r,"\u201D is not a vimeo.com url."));var n="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(r));for(var i in a)a.hasOwnProperty(i)&&(n+="&".concat(i,"=").concat(encodeURIComponent(a[i])));var p="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;p.open("GET",n,!0),p.onload=function(){if(p.status!==404)if(p.status!==403)try{var v=JSON.parse(p.responseText);if(v.domain_status_code===403)return Ve(v,c),void e(new Error("\u201C".concat(r,"\u201D is not embeddable.")));o(v)}catch(d){e(d)}else e(new Error("\u201C".concat(r,"\u201D is not embeddable.")));else e(new Error("\u201C".concat(r,"\u201D was not found.")))},p.onerror=function(){var v=p.status?" (".concat(p.status,")"):"";e(new Error("There was an error fetching the embed code from Vimeo".concat(v,".")))},p.send()})}var we=new WeakMap,qe=new WeakMap,D={},$e=function(){function r(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ut(this,r),window.jQuery&&e instanceof jQuery&&(e.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),e=e[0]),typeof document<"u"&&typeof e=="string"&&(e=document.getElementById(e)),!ct(e))throw new TypeError("You must pass either a valid element or a valid id.");if(e.nodeName!=="IFRAME"){var p=e.querySelector("iframe");p&&(e=p)}if(e.nodeName==="IFRAME"&&!le(e.getAttribute("src")||""))throw new Error("The player element passed isn\u2019t a Vimeo embed.");if(we.has(e))return we.get(e);this._window=e.ownerDocument.defaultView,this.element=e,this.origin="*";var v=new te(function(_,E){if(n._onMessage=function(A){if(le(A.origin)&&n.element.contentWindow===A.source){n.origin==="*"&&(n.origin=A.origin);var x=Ie(A.data);if(x&&x.event==="error"&&x.data&&x.data.method==="ready"){var $=new Error(x.data.message);return $.name=x.data.name,void E($)}var F=x&&x.event==="ready",Y=x&&x.method==="ping";if(F||Y)return n.element.setAttribute("data-ready","true"),void _();pt(n,x)}},n._window.addEventListener("message",n._onMessage),n.element.nodeName!=="IFRAME"){var q=et(e,i);tt(Ke(q),q,e).then(function(A){var x=Ve(A,e);return n.element=x,n._originalElement=e,dt(e,x),we.set(n.element,n),A}).catch(E)}});if(qe.set(this,v),we.set(this.element,this),this.element.nodeName==="IFRAME"&&Ce(this,"ping"),D.isEnabled){var d=function(){return D.exit()};this.fullscreenchangeHandler=function(){D.isFullscreen?je(n,"event:exitFullscreen",d):Me(n,"event:exitFullscreen",d),n.ready().then(function(){Ce(n,"fullscreenchange",D.isFullscreen)})},D.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var a,c,o;return a=r,c=[{key:"callMethod",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new te(function(p,v){return n.ready().then(function(){je(n,e,{resolve:p,reject:v}),Ce(n,e,i)}).catch(v)})}},{key:"get",value:function(e){var n=this;return new te(function(i,p){return e=Be(e,"get"),n.ready().then(function(){je(n,e,{resolve:i,reject:p}),Ce(n,e)}).catch(p)})}},{key:"set",value:function(e,n){var i=this;return new te(function(p,v){if(e=Be(e,"set"),n==null)throw new TypeError("There must be a value to set.");return i.ready().then(function(){je(i,e,{resolve:p,reject:v}),Ce(i,e,n)}).catch(v)})}},{key:"on",value:function(e,n){if(!e)throw new TypeError("You must pass an event name.");if(!n)throw new TypeError("You must pass a callback function.");if(typeof n!="function")throw new TypeError("The callback must be a function.");Fe(this,"event:".concat(e)).length===0&&this.callMethod("addEventListener",e).catch(function(){}),je(this,"event:".concat(e),n)}},{key:"off",value:function(e,n){if(!e)throw new TypeError("You must pass an event name.");if(n&&typeof n!="function")throw new TypeError("The callback must be a function.");Me(this,"event:".concat(e),n)&&this.callMethod("removeEventListener",e).catch(function(i){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=qe.get(this)||new te(function(n,i){i(new Error("Unknown player. Probably unloaded."))});return te.resolve(e)}},{key:"addCuePoint",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,n){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:n})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return D.isEnabled?D.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return D.isEnabled?D.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return D.isEnabled?te.resolve(D.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new te(function(n){if(qe.delete(e),we.delete(e.element),e._originalElement&&(we.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&e.element.nodeName==="IFRAME"&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&e.element.nodeName==="DIV"&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var i=e.element.querySelector("iframe");i&&i.parentNode&&(i.parentNode.parentNode&&e._originalElement&&e._originalElement!==i.parentNode?i.parentNode.parentNode.removeChild(i.parentNode):i.parentNode.removeChild(i))}e._window.removeEventListener("message",e._onMessage),D.isEnabled&&D.off("fullscreenchange",e.fullscreenchangeHandler),n()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}],c&&Ue(a.prototype,c),o&&Ue(a,o),r}();Ge||(D=function(){var r=function(){for(var o,e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,i=e.length,p={};n<i;n++)if((o=e[n])&&o[1]in document){for(n=0;n<o.length;n++)p[e[0][n]]=o[n];return p}return!1}(),a={fullscreenchange:r.fullscreenchange,fullscreenerror:r.fullscreenerror},c={request:function(o){return new Promise(function(e,n){var i=function v(){c.off("fullscreenchange",v),e()};c.on("fullscreenchange",i);var p=(o=o||document.documentElement)[r.requestFullscreen]();p instanceof Promise&&p.then(i).catch(n)})},exit:function(){return new Promise(function(o,e){if(c.isFullscreen){var n=function p(){c.off("fullscreenchange",p),o()};c.on("fullscreenchange",n);var i=document[r.exitFullscreen]();i instanceof Promise&&i.then(n).catch(e)}else o()})},on:function(o,e){var n=a[o];n&&document.addEventListener(n,e)},off:function(o,e){var n=a[o];n&&document.removeEventListener(n,e)}};return Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(document[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[r.fullscreenEnabled])}}}),c}(),function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,a=[].slice.call(r.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),c=function(o){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(o))};a.forEach(function(o){try{if(o.getAttribute("data-vimeo-defer")!==null)return;var e=et(o);tt(Ke(e),e,o).then(function(n){return Ve(n,o)}).catch(c)}catch(n){c(n)}})}(),function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var a=function(c){if(le(c.origin)&&c.data&&c.data.event==="spacechange"){for(var o=r.querySelectorAll("iframe"),e=0;e<o.length;e++)if(o[e].contentWindow===c.source){o[e].parentElement.style.paddingBottom="".concat(c.data.data[0].bottom,"px");break}}};window.addEventListener("message",a)}}(),function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoSeoMetadataAppended){window.VimeoSeoMetadataAppended=!0;var a=function(c){if(le(c.origin)){var o=Ie(c.data);if(o&&o.event==="ready")for(var e=r.querySelectorAll("iframe"),n=0;n<e.length;n++){var i=e[n],p=i.contentWindow===c.source;Ye(i.src)&&p&&new $e(i).callMethod("appendVideoMetadata",window.location.href)}}};window.addEventListener("message",a)}}(),function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var a=function(o){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(o))},c=function(o){if(le(o.origin)){var e=Ie(o.data);if(e&&e.event==="ready")for(var n=r.querySelectorAll("iframe"),i=0;i<n.length;i++){var p=n[i],v=p.contentWindow===o.source;Ye(p.src)&&v&&function(){var d=new $e(p);d.getVideoId().then(function(_){var E=new RegExp("[?&]vimeo_t_".concat(_,"=([^&#]*)")).exec(window.location.href);if(E&&E[1]){var q=decodeURI(E[1]);d.setCurrentTime(q)}}).catch(a)}()}}};window.addEventListener("message",c)}}());const yt="_VimeoPlayer_18d3k_1";var Qe,nt={exports:{}},xe={},Je,Re={};/** * @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. */function mt(){return Je||(Je=1,process.env.NODE_ENV!=="production"&&function(){var r=Xe.default,a=Symbol.for("react.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),p=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),x=Symbol.iterator,$=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function F(t){for(var h=arguments.length,f=new Array(h>1?h-1:0),P=1;P<h;P++)f[P-1]=arguments[P];Y("error",t,f)}function Y(t,h,f){var P=$.ReactDebugCurrentFrame.getStackAddendum();P!==""&&(h+="%s",f=f.concat([P]));var k=f.map(function(S){return String(S)});k.unshift("Warning: "+h),Function.prototype.apply.call(console[t],console,k)}var L;function H(t){return t.displayName||"Context"}function u(t){if(t==null)return null;if(typeof t.tag=="number"&&F("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case o:return"Fragment";case c:return"Portal";case n:return"Profiler";case e:return"StrictMode";case d:return"Suspense";case _:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case p:return H(t)+".Consumer";case i:return H(t._context)+".Provider";case v:return function(S,j,T){var R=S.displayName;if(R)return R;var I=j.displayName||j.name||"";return I!==""?T+"("+I+")":T}(t,t.render,"ForwardRef");case E:var h=t.displayName||null;return h!==null?h:u(t.type)||"Memo";case q:var f=t,P=f._payload,k=f._init;try{return u(k(P))}catch{return null}}return null}L=Symbol.for("react.module.reference");var l,s,b,w,M,z,ne,W=Object.assign,Q=0;function se(){}se.__reactDisabledLog=!0;var re,oe=$.ReactCurrentDispatcher;function J(t,h,f){if(re===void 0)try{throw Error()}catch(k){var P=k.stack.trim().match(/\n( *(at )?)/);re=P&&P[1]||""}return` `+re+t}var X,ae=!1,be=typeof WeakMap=="function"?WeakMap:Map;function fe(t,h){if(!t||ae)return"";var f,P=X.get(t);if(P!==void 0)return P;ae=!0;var k,S=Error.prepareStackTrace;Error.prepareStackTrace=void 0,k=oe.current,oe.current=null,function(){if(Q===0){l=console.log,s=console.info,b=console.warn,w=console.error,M=console.group,z=console.groupCollapsed,ne=console.groupEnd;var C={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}Q++}();try{if(h){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(C){f=C}Reflect.construct(t,[],j)}else{try{j.call()}catch(C){f=C}t.call(j.prototype)}}else{try{throw Error()}catch(C){f=C}t()}}catch(C){if(C&&f&&typeof C.stack=="string"){for(var T=C.stack.split(` `),R=f.stack.split(` `),I=T.length-1,O=R.length-1;I>=1&&O>=0&&T[I]!==R[O];)O--;for(;I>=1&&O>=0;I--,O--)if(T[I]!==R[O]){if(I!==1||O!==1)do if(I--,--O<0||T[I]!==R[O]){var m=` `+T[I].replace(" at new "," at ");return t.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",t.displayName)),typeof t=="function"&&X.set(t,m),m}while(I>=1&&O>=0);break}}}finally{ae=!1,oe.current=k,function(){if(--Q==0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},C,{value:l}),info:W({},C,{value:s}),warn:W({},C,{value:b}),error:W({},C,{value:w}),group:W({},C,{value:M}),groupCollapsed:W({},C,{value:z}),groupEnd:W({},C,{value:ne})})}Q<0&&F("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=S}var N=t?t.displayName||t.name:"",y=N?J(N):"";return typeof t=="function"&&X.set(t,y),y}function G(t,h,f){if(t==null)return"";if(typeof t=="function")return fe(t,!(!(P=t.prototype)||!P.isReactComponent));var P;if(typeof t=="string")return J(t);switch(t){case d:return J("Suspense");case _:return J("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case v:return function(T,R,I){return fe(T,!1)}(t.render);case E:return G(t.type,h,f);case q:var k=t,S=k._payload,j=k._init;try{return G(j(S),h,f)}catch{}}return""}X=new be;var K=Object.prototype.hasOwnProperty,de={},pe=$.ReactDebugCurrentFrame;function Z(t){if(t){var h=t._owner,f=G(t.type,t._source,h?h.type:null);pe.setExtraStackFrame(f)}else pe.setExtraStackFrame(null)}var ke=Array.isArray;function ee(t){return ke(t)}function he(t){return""+t}function ye(t){if(function(h){try{return he(h),!1}catch{return!0}}(t))return F("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(h){return typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object"}(t)),he(t)}var me,ve,ie,U=$.ReactCurrentOwner,Ee={key:!0,ref:!0,__self:!0,__source:!0};ie={};function _e(t,h,f,P,k){var S,j={},T=null,R=null;for(S in f!==void 0&&(ye(f),T=""+f),function(m){if(K.call(m,"key")){var N=Object.getOwnPropertyDescriptor(m,"key").get;if(N&&N.isReactWarning)return!1}return m.key!==void 0}(h)&&(ye(h.key),T=""+h.key),function(m){if(K.call(m,"ref")){var N=Object.getOwnPropertyDescriptor(m,"ref").get;if(N&&N.isReactWarning)return!1}return m.ref!==void 0}(h)&&(R=h.ref,function(m,N){if(typeof m.ref=="string"&&U.current&&N&&U.current.stateNode!==N){var y=u(U.current.type);ie[y]||(F('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',u(U.current.type),m.ref),ie[y]=!0)}}(h,k)),h)K.call(h,S)&&!Ee.hasOwnProperty(S)&&(j[S]=h[S]);if(t&&t.defaultProps){var I=t.defaultProps;for(S in I)j[S]===void 0&&(j[S]=I[S])}if(T||R){var O=typeof t=="function"?t.displayName||t.name||"Unknown":t;T&&function(m,N){var y=function(){me||(me=!0,F("%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)",N))};y.isReactWarning=!0,Object.defineProperty(m,"key",{get:y,configurable:!0})}(j,O),R&&function(m,N){var y=function(){ve||(ve=!0,F("%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)",N))};y.isReactWarning=!0,Object.defineProperty(m,"ref",{get:y,configurable:!0})}(j,O)}return function(m,N,y,C,Pe,Se,it){var ge={$$typeof:a,type:m,key:N,ref:y,props:it,_owner:Se,_store:{}};return Object.defineProperty(ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:C}),Object.defineProperty(ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ge.props),Object.freeze(ge)),ge}(t,T,R,k,P,U.current,j)}var ue,ce=$.ReactCurrentOwner,Oe=$.ReactDebugCurrentFrame;function V(t){if(t){var h=t._owner,f=G(t.type,t._source,h?h.type:null);Oe.setExtraStackFrame(f)}else Oe.setExtraStackFrame(null)}function g(t){return typeof t=="object"&&t!==null&&t.$$typeof===a}function Te(){if(ce.current){var t=u(ce.current.type);if(t)return` Check the render method of \``+t+"`."}return""}ue=!1;var De={};function Le(t,h){if(t._store&&!t._store.validated&&t.key==null){t._store.validated=!0;var f=function(k){var S=Te();if(!S){var j=typeof k=="string"?k:k.displayName||k.name;j&&(S=` Check the top-level render call using <`+j+">.")}return S}(h);if(!De[f]){De[f]=!0;var P="";t&&t._owner&&t._owner!==ce.current&&(P=" It was passed a child from "+u(t._owner.type)+"."),V(t),F('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',f,P),V(null)}}}function We(t,h){if(typeof t=="object"){if(ee(t))for(var f=0;f<t.length;f++){var P=t[f];g(P)&&Le(P,h)}else if(g(t))t._store&&(t._store.validated=!0);else if(t){var k=function(T){if(T===null||typeof T!="object")return null;var R=x&&T[x]||T["@@iterator"];return typeof R=="function"?R:null}(t);if(typeof k=="function"&&k!==t.entries)for(var S,j=k.call(t);!(S=j.next()).done;)g(S.value)&&Le(S.value,h)}}}function rt(t){var h,f=t.type;if(f!=null&&typeof f!="string"){if(typeof f=="function")h=f.propTypes;else{if(typeof f!="object"||f.$$typeof!==v&&f.$$typeof!==E)return;h=f.propTypes}if(h){var P=u(f);(function(k,S,j,T,R){var I=Function.call.bind(K);for(var O in k)if(I(k,O)){var m=void 0;try{if(typeof k[O]!="function"){var N=Error((T||"React class")+": "+j+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof k[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}m=k[O](S,O,T,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){m=y}!m||m instanceof Error||(Z(R),F("%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).",T||"React class",j,O,typeof m),Z(null)),m instanceof Error&&!(m.message in de)&&(de[m.message]=!0,Z(R),F("Failed %s type: %s",j,m.message),Z(null))}})(h,t.props,"prop",P,t)}else f.PropTypes!==void 0&&!ue&&(ue=!0,F("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u(f)||"Unknown"));typeof f.getDefaultProps!="function"||f.getDefaultProps.isReactClassApproved||F("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ze(t,h,f,P,k,S){var j=function(y){return typeof y=="string"||typeof y=="function"||y===o||y===n||y===e||y===d||y===_||y===A||typeof y=="object"&&y!==null&&(y.$$typeof===q||y.$$typeof===E||y.$$typeof===i||y.$$typeof===p||y.$$typeof===v||y.$$typeof===L||y.getModuleId!==void 0)}(t);if(!j){var T="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(T+=" 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 R,I=function(y){return y!==void 0?` Check your code at `+y.fileName.replace(/^.*[\\\/]/,"")+":"+y.lineNumber+".":""}(k);T+=I||Te(),t===null?R="null":ee(t)?R="array":t!==void 0&&t.$$typeof===a?(R="<"+(u(t.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):R=typeof t,F("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,T)}var O=_e(t,h,f,k,S);if(O==null)return O;if(j){var m=h.children;if(m!==void 0)if(P)if(ee(m)){for(var N=0;N<m.length;N++)We(m[N],t);Object.freeze&&Object.freeze(m)}else F("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 We(m,t)}return t===o?function(y){for(var C=Object.keys(y.props),Pe=0;Pe<C.length;Pe++){var Se=C[Pe];if(Se!=="children"&&Se!=="key"){V(y),F("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Se),V(null);break}}y.ref!==null&&(V(y),F("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}(O):rt(O),O}var ot=function(t,h,f){return ze(t,h,f,!1)},at=function(t,h,f){return ze(t,h,f,!0)};Re.Fragment=o,Re.jsx=ot,Re.jsxs=at}()),Re}(function(r){process.env.NODE_ENV==="production"?r.exports=function(){if(Qe)return xe;Qe=1;var a=Xe.default,c=Symbol.for("react.element"),o=Symbol.for("react.fragment"),e=Object.prototype.hasOwnProperty,n=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function p(v,d,_){var E,q={},A=null,x=null;for(E in _!==void 0&&(A=""+_),d.key!==void 0&&(A=""+d.key),d.ref!==void 0&&(x=d.ref),d)e.call(d,E)&&!i.hasOwnProperty(E)&&(q[E]=d[E]);if(v&&v.defaultProps)for(E in d=v.defaultProps)q[E]===void 0&&(q[E]=d[E]);return{$$typeof:c,type:v,key:A,ref:x,props:q,_owner:n.current}}return xe.Fragment=o,xe.jsx=p,xe.jsxs=p,xe}():r.exports=mt()})(nt);const vt=nt.exports.jsx;exports.VimeoPlayer=function(r){const{className:a="",fullWidth:c=!1,id:o,autopause:e=!0,autoplay:n=!1,background:i=!1,byline:p=!0,color:v="00adef",controls:d=!0,dnt:_=!1,height:E,interactive_params:q,keyboard:A=!0,loop:x=!1,maxheight:$,maxwidth:F,muted:Y=!1,pip:L=!1,playsinline:H=!0,portrait:u=!0,quality:l,responsive:s=!1,speed:b=!1,texttrack:w,title:M=!0,transparent:z=!0,width:ne=400,onPlay:W,onPlaying:Q,onPause:se,onEnded:re,onTimeUpdate:oe,onProgress:J,onSeeking:X,onSeeked:ae,onTextTrackChange:be,onChapterChange:fe,onCueChange:G,onCuePoint:K,onVolumeChange:de,onPlaybackRateChange:pe,onBufferStart:Z,onBufferEnd:ke,onError:ee,onLoaded:he,onDurationChange:ye,onFullScreenChange:me,onQualityChange:ve,onCameraChange:ie,onResize:U,onEnterPictureInPicture:Ee,onLeavePictureInPicture:_e,onInteractiveHotspotClicked:ue,onInteractiveOverlayPanelClicked:ce}=r,Oe=c?`${yt} ${a}`:a,V=Ne.useRef(),g=Ne.useRef();return Ne.useEffect(()=>{var Te;!(g!=null&&g.current)&&(V==null?void 0:V.current)&&(g.current=new $e(V==null?void 0:V.current,{id:o,autopause:e,autoplay:n,background:i,byline:p,color:v,controls:d,dnt:_,height:E,interactive_params:q,keyboard:A,loop:x,maxheight:$,maxwidth:F,muted:Y,pip:L,playsinline:H,portrait:u,quality:l,responsive:s,speed:b,texttrack:w,title:M,transparent:z,width:ne}),W&&g.current.on("play",W),Q&&g.current.on("playing",Q),se&&g.current.on("pause",se),re&&g.current.on("ended",re),oe&&g.current.on("timeupdate",oe),J&&g.current.on("progress",J),X&&g.current.on("seeking",X),ae&&g.current.on("seeked",ae),be&&g.current.on("texttrackchange",be),fe&&g.current.on("chapterchange",fe),G&&g.current.on("cuechange",G),K&&g.current.on("cuepoint",K),de&&g.current.on("volumechange",de),pe&&g.current.on("playbackratechange",pe),Z&&g.current.on("bufferstart",Z),ke&&g.current.on("bufferend",ke),ee&&(g.current.on("error",ee),(Te=g.current.ready())==null||Te.catch(ee)),he&&g.current.on("loaded",he),ye&&g.current.on("durationchange",ye),me&&g.current.on("fullscreenchange",me),ve&&g.current.on("qualitychange",ve),ie&&g.current.on("camerachange",ie),U&&g.current.on("resize",U),Ee&&g.current.on("enterpictureinpicture",Ee),_e&&g.current.on("leavepictureinpicture",_e),ue&&g.current.on("interactivehotspotclicked",ue),ce&&g.current.on("interactiveoverlaypanelclicked",ce))},[o,e,n,i,p,v,d,_,E,q,A,x,$,F,Y,L,H,u,l,s,b,w,M,z,ne,W,re,se,Q,oe,J,X,ae,be,fe,G,K,de,pe,Z,ke,ee,he,ye,me,ve,ie,U,Ee,_e,ue,ce]),vt("div",{ref:V,className:Oe})};