(() => {
_MaveInitialData = {
id: null,
root: "https://app.mave.io",
settingsFloat: null,
videoBlurHash: null,
videoAspectRatio: null,
settingsAspectRatio: null,
loop: null,
autoPlay: null,
videoSource: null,
width: null,
height: null,
posterImage: null,
posterVideoSource: null,
originalFileType: null,
}
var et=Object.defineProperty,tt=Object.defineProperties;var it=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var ye=(i,e,t)=>e in i?et(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e)=>{for(var t in e||(e={}))st.call(e,t)&&ye(i,t,e[t]);if(fe)for(var t of fe(e))rt.call(e,t)&&ye(i,t,e[t]);return i},E=(i,e)=>tt(i,it(e));var W=window,G=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ee=Symbol(),_e=new WeakMap,K=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ee)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(G&&e===void 0){let s=t!==void 0&&t.length===1;s&&(e=_e.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&_e.set(t,e))}return e}toString(){return this.cssText}},be=i=>new K(typeof i=="string"?i:i+"",void 0,ee),N=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((s,r,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new K(t,i,ee)},te=(i,e)=>{G?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{let s=document.createElement("style"),r=W.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)})},Q=G?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let s of e.cssRules)t+=s.cssText;return be(t)})(i):i;var ie,J=window,$e=J.trustedTypes,ot=$e?$e.emptyScript:"",Ae=J.reactiveElementPolyfillSupport,se={toAttribute(i,e){switch(e){case Boolean:i=i?ot:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(s){t=null}}return t}},we=(i,e)=>e!==i&&(e==e||i==i),re={attribute:!0,type:String,converter:se,reflect:!1,hasChanged:we},oe="finalized",S=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((t,s)=>{let r=this._$Ep(s,t);r!==void 0&&(this._$Ev.set(r,s),e.push(r))}),e}static createProperty(e,t=re){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){let s=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,s,t);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(r){let o=this[e];this[t]=r,this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||re}static finalize(){if(this.hasOwnProperty(oe))return!1;this[oe]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let t=this.properties,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(let r of s)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let r of s)t.unshift(Q(r))}else e!==void 0&&t.push(Q(e));return t}static _$Ep(e,t){let s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)===null||s===void 0||s.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;let t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return te(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostConnected)===null||s===void 0?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostDisconnected)===null||s===void 0?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EO(e,t,s=re){var r;let o=this.constructor._$Ep(e,s);if(o!==void 0&&s.reflect===!0){let n=(((r=s.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?s.converter:se).toAttribute(t,s.type);this._$El=e,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$El=null}}_$AK(e,t){var s;let r=this.constructor,o=r._$Ev.get(e);if(o!==void 0&&this._$El!==o){let n=r.getPropertyOptions(o),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((s=n.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?n.converter:se;this._$El=o,this[o]=a.fromAttribute(t,n.type),this._$El=null}}requestUpdate(e,t,s){let r=!0;e!==void 0&&(((s=s||this.constructor.getPropertyOptions(e)).hasChanged||we)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,s))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let t=!1,s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(s)):this._$Ek()}catch(r){throw t=!1,this._$Ek(),r}t&&this._$AE(s)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(s=>{var r;return(r=s.hostUpdated)===null||r===void 0?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,s)=>this._$EO(s,this[s],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};S[oe]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},Ae==null||Ae({ReactiveElement:S}),((ie=J.reactiveElementVersions)!==null&&ie!==void 0?ie:J.reactiveElementVersions=[]).push("1.6.3");var ne,Y=window,L=Y.trustedTypes,Ee=L?L.createPolicy("lit-html",{createHTML:i=>i}):void 0,ae="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,Se="?"+k,nt=`<${Se}>`,C=document,F=()=>C.createComment(""),I=i=>i===null||typeof i!="object"&&typeof i!="function",ke=Array.isArray,at=i=>ke(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",le=`[
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xe=/-->/g,Te=/>/g,H=RegExp(`>|${le}(?:([^\\s"'>=/]+)(${le}*=${le}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pe=/'/g,Ce=/"/g,He=/^(?:script|style|textarea|title)$/i,Re=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),x=Re(1),Lt=Re(2),R=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Me=new WeakMap,M=C.createTreeWalker(C,129,null,!1);function Ue(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ee!==void 0?Ee.createHTML(e):e}var lt=(i,e)=>{let t=i.length-1,s=[],r,o=e===2?"":"")),s]},O=class{constructor({strings:e,_$litType$:t},s){let r;this.parts=[];let o=0,n=0,a=e.length-1,l=this.parts,[h,p]=lt(e,t);if(this.el=O.createElement(h,s),M.currentNode=this.el.content,t===2){let v=this.el.content,f=v.firstChild;f.remove(),v.append(...f.childNodes)}for(;(r=M.nextNode())!==null&&l.length0){r.textContent=L?L.emptyScript:"";for(let b=0;b2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,r){let o=this.strings,n=!1;if(o===void 0)e=V(this,e,t,0),n=!I(e)||e!==this._$AH&&e!==R,n&&(this._$AH=e);else{let a=e,l,h;for(e=o[0],l=0;l{var s,r;let o=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e,n=o._$litPart$;if(n===void 0){let a=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=n=new j(e.insertBefore(F(),a),a,void 0,t!=null?t:{})}return n._$AI(i),n};var de,he;var w=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;let s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ie(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return R}};w.finalized=!0,w._$litElement$=!0,(de=globalThis.litElementHydrateSupport)===null||de===void 0||de.call(globalThis,{LitElement:w});var De=globalThis.litElementPolyfillSupport;De==null||De({LitElement:w});((he=globalThis.litElementVersions)!==null&&he!==void 0?he:globalThis.litElementVersions=[]).push("3.3.3");var Be=i=>i.strings===void 0;var ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ue=i=>(...e)=>({_$litDirective$:i,values:e}),Z=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var q=(i,e)=>{var t,s;let r=i._$AN;if(r===void 0)return!1;for(let o of r)(s=(t=o)._$AO)===null||s===void 0||s.call(t,e,!1),q(o,e);return!0},X=i=>{let e,t;do{if((e=i._$AM)===void 0)break;t=e._$AN,t.delete(i),i=e}while((t==null?void 0:t.size)===0)},qe=i=>{for(let e;e=i._$AM;i=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(i))break;t.add(i),ut(e)}};function ht(i){this._$AN!==void 0?(X(this),this._$AM=i,qe(this)):this._$AM=i}function ct(i,e=!1,t=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(s))for(let o=t;o{var e,t,s,r;i.type==ce.CHILD&&((e=(s=i)._$AP)!==null&&e!==void 0||(s._$AP=ct),(t=(r=i)._$AQ)!==null&&t!==void 0||(r._$AQ=ht))},pe=class extends Z{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,s){super._$AT(e,t,s),qe(this),this.isConnected=e._$AU}_$AO(e,t=!0){var s,r;e!==this.isConnected&&(this.isConnected=e,e?(s=this.reconnected)===null||s===void 0||s.call(this):(r=this.disconnected)===null||r===void 0||r.call(this)),t&&(q(this,e),X(this))}setValue(e){if(Be(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var ve=new WeakMap,ze=ue(class extends pe{render(i){return u}update(i,[e]){var t;let s=e!==this.G;return s&&this.G!==void 0&&this.ot(void 0),(s||this.rt!==this.lt)&&(this.G=e,this.dt=(t=i.options)===null||t===void 0?void 0:t.host,this.ot(this.lt=i.element)),u}ot(i){var e;if(typeof this.G=="function"){let t=(e=this.dt)!==null&&e!==void 0?e:globalThis,s=ve.get(t);s===void 0&&(s=new WeakMap,ve.set(t,s)),s.get(this.G)!==void 0&&this.G.call(this.dt,void 0),s.set(this.G,i),i!==void 0&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,e,t;return typeof this.G=="function"?(e=ve.get((i=this.dt)!==null&&i!==void 0?i:globalThis))===null||e===void 0?void 0:e.get(this.G):(t=this.G)===null||t===void 0?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var pt=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?E(A({},e),{finisher(t){t.createProperty(e.key,i)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},vt=(i,e,t)=>{e.constructor.createProperty(t,i)};function m(i){return(e,t)=>t!==void 0?vt(i,e,t):pt(i,e)}function y(i){return m(E(A({},i),{state:!0}))}var U=({finisher:i,descriptor:e})=>(t,s)=>{var r;if(s===void 0){let o=(r=t.originalKey)!==null&&r!==void 0?r:t.key,n=e!=null?{kind:"method",placement:"prototype",key:o,descriptor:e(t.key)}:E(A({},t),{key:o});return i!=null&&(n.finisher=function(a){i(a,o)}),n}{let o=t.constructor;e!==void 0&&Object.defineProperty(t,s,e(s)),i==null||i(o,s)}};function $(i,e){return U({descriptor:t=>{let s={get(){var r,o;return(o=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(i))!==null&&o!==void 0?o:null},enumerable:!0,configurable:!0};if(e){let r=typeof t=="symbol"?Symbol():"__"+t;s.get=function(){var o,n;return this[r]===void 0&&(this[r]=(n=(o=this.renderRoot)===null||o===void 0?void 0:o.querySelector(i))!==null&&n!==void 0?n:null),this[r]}}return s}})}var me,Ai=((me=window.HTMLSlotElement)===null||me===void 0?void 0:me.prototype.assignedElements)!=null?(i,e)=>i.assignedElements(e):(i,e)=>i.assignedNodes(e).filter(t=>t.nodeType===Node.ELEMENT_NODE);var We=Object.defineProperty,mt=Object.defineProperties,gt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,Ke=(i,e,t)=>e in i?We(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,bt=(i,e)=>{for(var t in e||(e={}))yt.call(e,t)&&Ke(i,t,e[t]);if(Ge)for(var t of Ge(e))_t.call(e,t)&&Ke(i,t,e[t]);return i},$t=(i,e)=>mt(i,ft(e)),d=(i,e,t,s)=>{for(var r=s>1?void 0:s?gt(e,t):e,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(e,t,r):n(r))||r);return s&&r&&We(e,t,r),r},_=class{constructor(){this._baseUrl="app.mave.io"}static getInstance(){return _._inst||(_._inst=new _),_._inst}get baseUrl(){return this._baseUrl}set baseUrl(i){this._baseUrl=i}},At=N`
:root {
--mave_embed_dialog_height: 100vh !important;
}
dialog {
position: relative;
display: flex;
float: left;
align-items: center;
border-width: 0;
width: 100%;
height: 100%;
max-width: 100vw !important;
max-height: var(--mave_embed_dialog_height);
padding: 0;
margin: 0;
background: transparent;
align-items: center;
justify-content: center;
}
@media (max-width: 768px) {
dialog {
transition-property: max-height;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
}
.active_fullscreen {
min-width: 100vw !important;
min-height: 100vh !important;
}
dialog::backdrop {
background: black;
}
dialog[open] {
-webkit-animation: show 250ms ease-out normal;
}
@-webkit-keyframes show {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 100;
transform: scale(1);
}
}
canvas,
.poster {
position: absolute;
top: 0;
height: 100%;
}
.active_upload {
width: calc(100vw - 14rem);
height: 100vh;
}
.active_upload::backdrop {
background: rgba(0, 0, 0, 0.5);
}
.active_overlay {
position: fixed;
background: black;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.active_overlay #video {
object-fit: contain;
}
iframe {
position: absolute;
left: 0;
height: 100%;
width: 100%;
z-index: 20;
transition-property: all;
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
transition-duration: 150ms;
}
#video {
transform: scale(1.01);
position: absolute;
top: 0;
z-index: 10;
width: 100%;
height: 100%;
display: flex;
}
#video::cue {
color: white;
opacity: 1;
background-color: rgba(0, 0, 0, 1) !important;
/* background-image: linear-gradient(to bottom, black, black); */
}
#video::-webkit-media-text-track-container {
opacity: 1;
top: -3rem;
overflow: visible !important;
}
#video::-webkit-media-text-track-background {
display: none !important;
}
#video::-webkit-media-text-track-display {
display: inline-block !important;
/* border: 1px solid red; */
overflow: visible !important;
}
#video::-webkit-media-text-track-display-backdrop {
background: transparent !important;
}
#end {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 30;
top: 0;
left: 0;
}
`,T=class extends w{constructor(){super(...arguments);this._ghostActive=!0,this._loaded=!0,this._delayed=!1}connectedCallback(){var i;super.connectedCallback(),setTimeout(()=>{this._delayed=!0},250),this._globalStyle=document.documentElement.getAttribute("style")||"",document.documentElement.setAttribute("style",`${this._globalStyle}; padding-right: 14rem; transition: padding 150ms; transition-timing-function: cubic-bezier(0, 0, 0.2, 1);`),window.addEventListener("resize",this.appHeight),window.addEventListener("focus",this.appHeight),this.appHeight(),setTimeout(()=>{this._ghostActive=!0,this.dialog.showModal()},0),(i=this.iframe)==null||i.addEventListener("load",this.iframeLoaded.bind(this))}appHeight(){document.documentElement.style.setProperty("--app-height",`${window.innerHeight}px`)}disconnectedCallback(){var i;document.documentElement.setAttribute("style",this._globalStyle||""),(i=this.iframe)==null||i.removeEventListener("load",this.iframeLoaded.bind(this)),this.dialog.close(),window.removeEventListener("resize",this.appHeight),window.removeEventListener("focus",this.appHeight),super.disconnectedCallback()}dialogHandler(i){i.type=="close"&&window.postMessage({message:"mave:close_settings",hash:this.embed},"*"),i.target==this.dialog&&this.dialog.close()}render(){return x`
`}iframeLoaded(){this._loaded=!0}};T.styles=N`
dialog {
position: relative;
display: flex;
float: right;
align-items: center;
border-width: 0;
background: transparent;
}
dialog::backdrop {
background: none;
}
.ghost {
background-color: #1c1917;
width: 14rem;
height: 100vh;
position: fixed;
margin-right: -14rem;
top: 0;
right: 0;
z-index: 10000;
transition: margin 150ms;
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.ghost.active {
margin-right: 0;
}
.settings {
width: 14rem;
height: 100vh;
position: fixed;
top: 0;
right: 0;
z-index: 10000;
height: var(--app-height);
min-height: -webkit-fill-available;
}
.initial {
opacity: 0;
transform: scale(0.95);
transition: opacity, transform 150ms;
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.loaded {
opacity: 1;
transform: scale(1);
transition: opacity, transform 150ms;
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
`,d([m({type:String})],T.prototype,"embed",2),d([$("#dialog")],T.prototype,"dialog",2),d([$("#iframe")],T.prototype,"iframe",2),d([y()],T.prototype,"_ghostActive",2),d([y()],T.prototype,"_loaded",2),d([y()],T.prototype,"_delayed",2);customElements.get("mave-settings")||customElements.define("mave-settings",T);var wt=crypto.getRandomValues(new Uint8Array(21)).reduce((i,e)=>i+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e<63?"_":"-",""),Qe=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","castchange","entercast","leavecast"],Et=["mave:video_canplay","mave:video_progress","mave:video_play","mave:video_pause","mave:video_ended","mave:video_timeupdate","mave:vide_muted","mave:vide_muted","mave:video_fullscreen","mave:open_overlay","mave:close_overlay","mave:bitrate"],c=class extends w{constructor(){super(...arguments);this._settingsActive=!1,this._blurhashShouldBeVisible=!0,this._overlayActive=!1,this._isFullscreen=!1,this._uploadActive=!1,this._posterShouldBeVisible=!0,this._hlsLoaded=!1,this._iframeReady=!1,this._initialPlayEventTriggered=!1,this.baseUrl=_.getInstance().baseUrl,this.canPlay=!1,this.loadeddata=!1,this.debouncedAppHeight=this.debounce(this.appHeight.bind(this),550)}connectedCallback(){if(super.connectedCallback(),!this.src&&this.embed){let i=`https://${_.getInstance().baseUrl}/${this.embed}/json`;(async()=>{try{let e=await(await fetch(i)).json();this.autoplay=e.autoPlay,this.loop=e.loop,this.aspectRatio=e.settingsAspectRatio,this.blurhash=e.videoBlurHash,this.src=e.videoSource,this.height=e.height,this.width=e.width,this.posterImage=e.posterImage,this.posterVideoSource=e.posterVideoSource}catch(e){console.log("error",e)}})()}window.addEventListener("message",this.messageHandler.bind(this)),window.addEventListener("load",this.visibilityHandler.bind(this)),window.addEventListener("scroll",this.visibilityHandler.bind(this)),window.addEventListener("resize",this.visibilityHandler.bind(this));for(let i of["fullscreenchange","webkitfullscreenchange"])this.addEventListener(i,this.fullscreenChangeHandler.bind(this));this._hlsLoaded||this.scriptHandler()}disconnectedCallback(){window.removeEventListener("message",this.messageHandler.bind(this)),window.removeEventListener("load",this.visibilityHandler.bind(this)),window.removeEventListener("scroll",this.visibilityHandler.bind(this)),window.removeEventListener("resize",this.visibilityHandler.bind(this));for(let e of["fullscreenchange","webkitfullscreenchange"])this.removeEventListener(e,this.fullscreenChangeHandler.bind(this));let i=document.querySelector("mave-settings");i&&i.remove(),super.disconnectedCallback()}listEvents(){return[...Qe,...Et]}play(){var i,e,t;this.video&&((i=this.video)==null?void 0:i.currentTime)>=((e=this.video)==null?void 0:e.duration)&&(this.video.currentTime=0),(t=this.video)==null||t.play()}pause(){var i;(i=this.video)==null||i.pause()}setVolume(i){this.video&&(i>0&&(this.video.muted=!1),this.video.volume=i,this.sendMessage("mave:volume_change",{volume:i}))}setMuted(i){this.video&&(this.video.muted=i,this.sendMessage("mave:video_muted",{muted:this.video.muted}))}setCurrentTime(i){this.video&&(this.video.currentTime=i)}getCurrentTime(){var i;return(i=this.video)==null?void 0:i.currentTime}toggleEndScreen(){this.endElement&&(this.endElement.style.display==="block"?this.endElement.style.display="none":this.endElement.style.display="block")}initializeVideo(){if(!this.loadeddata&&this.video&&this.video.readyState>=2&&(setTimeout(()=>{this.blurhash&&(this._blurhashShouldBeVisible=!1)},1250),this.loadeddata=!0),!this.canPlay){let i=()=>{var e;this._iframeReady||(this.sendMessage("mave:video_canplay",{duration:(e=this.video)==null?void 0:e.duration}),setTimeout(i.bind(this),25),this.canPlay=!0)};i()}}videoHandler(i){if(this.video)switch(i.type){case"loadeddata":case"canplay":this.initializeVideo();break;case"progress":(!this.canPlay||!this.loadeddata)&&this.initializeVideo();try{let e=this.video.buffered.length-1,t=Math.round(this.video.buffered.end(e)/this.video.duration*100);this.sendMessage("mave:video_progress",{buffer:t})}catch(e){}break;case"play":if(this._posterShouldBeVisible&&(document.webkitExitFullscreen?setTimeout(()=>{this._posterShouldBeVisible=!1},450):this._posterShouldBeVisible=!1),this._iframeReady){this.timeUpdate();let e=this.autoplay&&!this._initialPlayEventTriggered||this.video.currentTime<1e-4?0:this.video.currentTime;this.sendMessage("mave:video_play",{currentTime:e,bitrate:this._bitrate,duration:this.video.duration}),this._initialPlayEventTriggered=!0}break;case"timeupdate":this.sendMessage("mave:video_timeupdate",{currentTime:this.video.currentTime});break;case"volumechange":break;case"pause":case"ended":this.sendMessage("mave:video_timeupdate",{currentTime:this.video.currentTime}),this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0),setTimeout(()=>{this.sendMessage(i.type=="ended"?"mave:video_ended":"mave:video_pause")},25),i.type=="ended"&&!this.loop&&this.endElement&&this.querySelector('[slot="end-screen"]')&&(this.endElement.style.display="block");break}}messageHandler(i){var e;let{data:t}=i,{message:s}=t;if(!(!this.isConnected||!t||t.hash!=this.embed))switch(s){case"mave:player_ready":if(this._iframeReady=!0,this.triggerEvent("ready",{videoElement:this.video}),!this._initialPlayEventTriggered&&this.video&&!this.video.paused){let n=this.autoplay?0:this.video.currentTime;this.sendMessage("mave:video_play",{currentTime:n,bitrate:this._bitrate,duration:this.video.duration}),this._initialPlayEventTriggered=!0}break;case"mave:player_event":if(!this.video)return;let r=t.event;switch(Object.keys(r)[0]){case"play":r.play?this.video.play():this.video.pause();break;case"muted":this.video.muted=r.muted,this.sendMessage("mave:video_muted",{muted:this.video.muted});break;case"volume":this.video.volume=r.volume;break;case"currentTime":this.video.currentTime=r.currentTime;break}break;case"mave:open_popup_overlay":if(this.isFullscreen())return;this.openOverlay();break;case"mave:close_popup_overlay":if(this.isFullscreen())return;this.closeOverlay();break;case"mave:open_dialog":this.dialog.showModal(),this._uploadActive=!0;break;case"mave:close_dialog":this.dialog.close(),this._uploadActive=!1;break;case"mave:toggle_fullscreen":this.isFullscreen()||this._overlayActive?this.closeFullscreen():this.openFullscreen();break;case"mave:open_fullscreen":this._overlayActive||this.openFullscreen();break;case"mave:close_fullscreen":this.closeFullscreen();break;case"mave:open_settings":if(this._settingsActive=!this._settingsActive,this._settingsActive){let n=document.createElement("mave-settings");n.setAttribute("embed",this.embed),document.body.appendChild(n)}else{let n=document.querySelector("mave-settings");n&&n.remove()}break;case"mave:close_settings":this._settingsActive=!1;let o=document.querySelector("mave-settings");o&&o.remove();break;case"mave:update_embed_settings":this.aspectRatio=t.aspect_ratio_enabled?t.aspect_ratio:void 0,this.width=t.aspect_ratio_enabled?void 0:t.width,this.height=t.aspect_ratio_enabled?void 0:t.height,this.loop=t.loop,this.autoplay=t.autoplay_enabled,this.autoplay&&((e=this.video)==null?void 0:e.paused)&&this.video.currentTime{this.visibilityHandler()},20);break;case"mave:render_video":this._hlsLoaded=!1,this._blurhashShouldBeVisible=!1,this.loadeddata=!1,this.canPlay=!1,this.src!=t.video_src&&(this.src=t.video_src),this.fileType!=t.file_type&&(this.fileType=t.file_type),this.autoplay!=t.autoplay&&(this.autoplay=t.autoplay),this.blurhash!=t.blurhash&&(this.blurhash=t.blurhash),this.posterImage!=t.poster_image&&(this.posterImage=t.poster_image),this.posterVideoSource!=t.poster_video_source&&(this.posterVideoSource=t.poster_video_source);break}}fullscreenChangeHandler(){this._isFullscreen=!this._isFullscreen,this.sendMessage("mave:video_fullscreen",{fullscreen:this.isFullscreen()})}generateStyle(){let i=document.createElement("style");if((this._overlayActive||this._isFullscreen)&&(i.textContent=":host { overflow: hidden; width: 100%; height: 100%; }"),this.width&&this.height)i.textContent=`:host { display: block; overflow: hidden; width: ${this.width}; height: ${this.height}; min-width: 320px; min-height: 180px; } canvas, .poster { width: ${this.width}; object-fit: cover; } #video, #video[poster] { object-fit: cover; }`;else if(this.aspectRatio){let e=this.aspectRatio.includes(":")?`${this.aspectRatio.split(":")[0]} / ${this.aspectRatio.split(":")[1]}`:"16 / 9";i.textContent=`:host { display: block; overflow: hidden; aspect-ratio: ${e}; width: 100%; min-width: 320px; min-height: 180px; } canvas, .poster { aspect-ratio: ${e}; object-fit: contain; } #video, #video[poster] { object-fit: contain; }`}else i.textContent=":host { display: block; overflow: hidden; aspect-ratio: 16 / 9; width: 100%; min-width: 320px; min-height: 180px; } #video, #video[poster] { object-fit: contain; }";return i}closeDialog(){this.isFullscreen()?this.closeFullscreen():(this._overlayActive=!1,this._uploadActive=!1,this.sendMessage("mave:close_overlay"))}clickDialog(i){this._uploadActive&&i.target==this.dialog&&(this.closeDialog(),this.sendMessage("mave:cancel_upload"))}poster(){return this.posterImage&&!this.autoplay?this.posterImage:u}videoPoster(){return navigator.userAgent.toLowerCase().includes("chrome")?this.poster():u}videoStyle(){return!navigator.userAgent.toLowerCase().includes("chrome")&&this._posterShouldBeVisible?"opacity: 0;":u}videoRendered(i){Qe.forEach(e=>{i==null||i.addEventListener(e,t=>{var s;let r;e=="seeked"?r={detail:{duration:(s=this.video)==null?void 0:s.duration,embed:this.embed}}:r={detail:{embed:this.embed}},this.dispatchEvent(new CustomEvent(t.type,r))})})}render(){return x`
${this.generateStyle()}
`}firstUpdated(i){this.appHeight()}generateUrl(){return this.jwt?`https://${this.baseUrl}/e/${this.embed}?reference_id=${this.jwt}`:this.reference_id&&this.display_name?`https://${this.baseUrl}/e/${this.embed}?reference_id=${this.reference_id}&display_name=${this.display_name}`:this.reference_id?`https://${this.baseUrl}/e/${this.embed}?reference_id=${this.reference_id}`:this.display_name?`https://${this.baseUrl}/e/${this.embed}?display_name=${this.display_name}`:`https://${this.baseUrl}/e/${this.embed}?reference_id=${wt}`}sendMessage(i,e={}){if(!this.iframe.contentWindow||!this.video)return;let t=$t(bt({message:i},e),{embed:this.embed});this.iframe.contentWindow.postMessage(t,"*"),this.triggerEvent(i,t)}openFullscreen(){this.isFullscreen()||(this.requestFullscreen?this.requestFullscreen():this.webkitRequestFullscreen?this.webkitRequestFullscreen():this.video.webkitEnterFullscreen?this.video.webkitEnterFullscreen():(this.sendMessage("mave:open_overlay",{}),this.openOverlay()),this.video&&!this.video.paused&&(this.video.muted=!1,this.sendMessage("mave:video_muted",{muted:this.video.muted})))}closeFullscreen(){(this.isFullscreen()||this._overlayActive)&&(document.exitFullscreen&&!this._overlayActive?document.exitFullscreen():document.webkitExitFullscreen&&!this._overlayActive?document.webkitExitFullscreen():(this.sendMessage("mave:close_overlay",{}),this.closeOverlay(),this.closeDialog()))}renderCanvas(){}timeUpdate(){this._animationFrame=requestAnimationFrame(()=>{!this.video||(this.sendMessage("mave:video_timeupdate",{currentTime:this.video.currentTime}),this.timeUpdate())})}initiateScript(){if(this.src&&!this.needsHls())return;let i=document.createElement("script");return i.onload=this.scriptHandler.bind(this),i.src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.1.5/hls.min.js",i}needsHls(){var i,e;return((i=this.src)==null?void 0:i.includes(".m3u8"))||((e=this.src)==null?void 0:e.includes("mux.com"))}scriptHandler(){if(!(!this.video||!this.src||this._hlsLoaded||!this.needsHls())){if(Hls.isSupported()){let i=new Hls;i.config.startLevel=3,i.loadSource(this.src),i.attachMedia(this.video);let e=[];i.on(Hls.Events.MANIFEST_LOADED,(t,s)=>{e=s.levels.reverse()}),i.on(Hls.Events.LEVEL_LOADED,(t,s)=>{this._bitrate!=e[s.level].bitrate&&(this._bitrate=e[s.level].bitrate,this.sendMessage("mave:bitrate",{bitrate:this._bitrate}))}),i.subtitleTrack=0,i.subtitleDisplay=!0}this._hlsLoaded=!0}}appHeight(){document.documentElement.style.setProperty("--mave_embed_dialog_height",`${window.innerHeight}px`)}visibilityHandler(){if(!this.iframe||!this.iframe.contentWindow)return;let{top:i,bottom:e}=this.iframe.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,s=(i>0||e>0)&&i{clearTimeout(t),t=setTimeout(()=>{i(...s)},e)}}};c.styles=At,d([m({type:String})],c.prototype,"embed",2),d([m({type:String})],c.prototype,"reference_id",2),d([m({type:String})],c.prototype,"display_name",2),d([m({type:String})],c.prototype,"jwt",2),d([m({type:String})],c.prototype,"classname",2),d([m({type:Boolean})],c.prototype,"muted",2),d([m({type:Boolean})],c.prototype,"autoplay",2),d([m({type:Boolean})],c.prototype,"loop",2),d([m({type:String})],c.prototype,"src",2),d([m({type:String})],c.prototype,"blurhash",2),d([m({type:String,attribute:"aspect-ratio"})],c.prototype,"aspectRatio",2),d([m({type:String})],c.prototype,"width",2),d([m({type:String})],c.prototype,"height",2),d([m({type:String,attribute:"poster-image"})],c.prototype,"posterImage",2),d([m({type:String,attribute:"poster-video-source"})],c.prototype,"posterVideoSource",2),d([m({type:String,attribute:"file-type"})],c.prototype,"fileType",2),d([$("#dialog")],c.prototype,"dialog",2),d([$("#iframe")],c.prototype,"iframe",2),d([$("#video")],c.prototype,"video",2),d([$("#canvas")],c.prototype,"canvas",2),d([$("#script")],c.prototype,"script",2),d([$("#end")],c.prototype,"endElement",2),d([y()],c.prototype,"_settingsActive",2),d([y()],c.prototype,"_blurhashShouldBeVisible",2),d([y()],c.prototype,"_overlayActive",2),d([y()],c.prototype,"_isFullscreen",2),d([y()],c.prototype,"_uploadActive",2),d([y()],c.prototype,"_posterShouldBeVisible",2);customElements.get("mave-component")||customElements.define("mave-component",c);_.getInstance().baseUrl="app.mave.io";var P=A({debug:!1},_MaveInitialData),g=document.currentScript;function St(i){return fetch(`${P.root}/replace?${i}`).then(e=>e.json())}function kt(i){return i.src?i.src:i.querySelector("source").src}var Je=!1;function ge(){let i=document.getElementsByTagName("video");for(let t of i){let s=kt(t);Ye(s).then(r=>{var l;if(r.error)return;let o=t.getAttribute("style"),n=t.getAttribute("class");t.setAttribute("style","opacity: 0;");let a=Ze(r);a.getAttribute("src")||a.setAttribute("src",s),(l=t.parentNode)==null||l.replaceChild(a,t),n&&n!=""&&a.setAttribute("class",n),o&&o!=""&&a.setAttribute("style",o)})}let e=document.getElementsByTagName("iframe");for(let t of e)if(t.src&&t.src.includes("vimeo.com")){let s=new URL(t.src),r=s.search,o=s.pathname.substring(s.pathname.lastIndexOf("video/")+6,s.pathname.length);if(Number.isNaN(+o))t.src=`${P.root}/f/${o}${r}`;else{let n=`${s.origin}${s.pathname}`;Ye(n).then(a=>{a.error||(t.src=`${P.root}/f/${a.id}${r}`)})}}}function Ye(i){return St(`video=${btoa(i)}`)}function xt(){try{let i=new URL(g.src);return i.hash=="#replace"&&(Je=!0,Tt()),i.pathname=="/js"||i.pathname.length==0?void 0:i.pathname.replace("/","").replace("js/","")}catch(i){return}}function Tt(){let i=[];class e{constructor(s,r){this.queue=[];this.buffered=0;this.isPlaying=!1;this.isSetup=!1;this.registeredEvents=[];this.useVimeo=!1;this.mutationObserver=new MutationObserver(this.changed.bind(this));this.options=r;let o;s.length?o=s[0]:o=s;let n=i.find(a=>a.iframe==o&&a.iframe);if(n)return n;this.iframe=o,i.push(this),this.mutationObserver.observe(this.iframe,{attributes:!0}),this.needsSetup()}needsSetup(){new URL(this.iframe.src).host==_.getInstance().baseUrl&&!this.isSetup&&this.setup()}destroy(){this.registeredEvents=[],this.mutationObserver.disconnect(),window.removeEventListener("message",this.maveEvents.bind(this))}changed(s){s.forEach(r=>{let{attributeName:o,target:n}=r;n==this.iframe&&o=="src"&&this.needsSetup()})}setup(){let s=document.createElement("mave-component");window.addEventListener("message",this.maveEvents.bind(this)),this.isSetup=!0}maveEvents(s){let{message:r,data:o}=s.data,a=new URL(this.iframe.src).pathname.split("/f/")[1];if(o&&o.duration&&!this.duration&&(this.duration=o.duration,this.durationResolver&&(this.durationResolver(this.duration),this.durationResolver=null)),!(!o||a!=o.embed)&&new URL(s.origin).host==_.getInstance().baseUrl)switch(r){case"mave:video_canplay":this.iframe.getAttribute("data-ready")!="true"&&(this.options.muted&&this.setMuted(this.options.muted),this.iframe.setAttribute("data-ready",!0),this.trigger("bufferstart",{}),this.trigger("loaded",{}));break;case"mave:video_play":this.isPlaying=!0,this.getPausedResolver&&(this.getPausedResolver(!this.isPlaying),this.getPausedResolver=null),this.playResolver&&(this.playResolver(),this.playResolver=null),this.trigger("play",{duration:o.duration});break;case"mave:video_pause":this.isPlaying=!1,this.getPausedResolver&&(this.getPausedResolver(this.isPlaying),this.getPausedResolver=null),this.pauseResolver&&(this.pauseResolver(),this.pauseResolver=null),this.trigger("pause",{duration:o.duration});break;case"mave:video_progress":this.buffered=o.buffer/100,this.trigger("bufferend",{duration:o.duration}),this.trigger("progress",{percent:this.buffered});break;case"mave:video_timeupdate":this.currentTime=parseInt(o.currentTime),this.currentTimeResolver&&(this.currentTimeResolver(this.currentTime),this.currentTimeResolver=null),this.trigger("timeupdate",{seconds:this.currentTime});break;case"seeked":this.trigger("seeked",{duration:o.duration});break}}trigger(s,r){this.registeredEvents.forEach(o=>{(o==null?void 0:o.event)==s&&(o==null||o.fn(r))})}sendMessage(s,r){this.iframe.getAttribute("data-ready")?this.iframe.contentWindow.postMessage({message:s,data:r},"*"):(this.queue.push({message:s,data:r}),this.interval||(this.interval=setInterval(()=>{this.iframe.getAttribute("data-ready")&&(clearInterval(this.interval),this.interval=null,this.queue.forEach(o=>{this.iframe.contentWindow.postMessage(o,"*")}),this.queue=[])},100)))}on(s,r){this.registeredEvents.push({event:s,fn:r})}off(s,r){this.registeredEvents.filter(o=>(o==null?void 0:o.event)!=s&&(o==null?void 0:o.fn)!=r)}setVolume(s){return this.sendMessage("mave_frame:volume",{volume:s}),Promise.resolve()}setMuted(s){return this.sendMessage("mave_frame:muted",{muted:s}),Promise.resolve()}play(){return this.sendMessage("mave_frame:play",null),new Promise(s=>{this.playResolver=s})}pause(){return this.sendMessage("mave_frame:pause",null),new Promise(s=>{this.pauseResolver=s})}getPaused(){return Promise.resolve(!this.isPlaying)}disableTextTrack(){}getVideoUrl(){return Promise.resolve()}getVideoWidth(){}getVideoHeight(){}setAutopause(){return Promise.resolve()}getVideoTitle(){return Promise.resolve()}getCurrentTime(){return new Promise(s=>{this.currentTime?s(this.currentTime):this.currentTimeResolver=s})}getDuration(){return new Promise(s=>{this.duration?s(this.duration):this.durationResolver=s})}getTextTracks(){return Promise.resolve()}setLoop(){return Promise.resolve()}setPlaybackRate(){return Promise.resolve()}setCurrentTime(s){this.sendMessage("mave_frame:timeupdate",{currentTime:s})}unload(){return this.destroy(),Promise.resolve()}}window.Vimeo&&(window._Vimeo=window.Vimeo),window.Vimeo={Player:e}}function Pt(){var e;if(!g)return;let i=xt();if(!(g.parentNode instanceof HTMLHeadElement)&&!P.id&&console.warn("[Mave warning] For better performance, add the script tag to your "),g.parentNode instanceof HTMLHeadElement||!P.id)g.parentNode instanceof HTMLHeadElement&&P.id&&console.warn("[Mave warning] You're using the specific script tag for a single embed. Move the script tag to the body, or use our generic script."),Je&&(new MutationObserver(s=>{s.some(o=>{let n=!1;return o.addedNodes.forEach(a=>{if(["IFRAME","VIDEO"].includes(a.nodeName))n=!0;else if(a.querySelector){let l=a.querySelector("iframe"),h=a.querySelector("video");(l||h)&&(n=!0)}}),n})&&ge()}).observe(document,{childList:!0,subtree:!0}),window.addEventListener("DOMContentLoaded",()=>{ge()}),window.addEventListener("load",ge));else{P.id=i;let t=Ze(E(A({},P),{id:i}));(e=g.parentNode)==null||e.insertBefore(t,g.nextSibling)}}function Ze(i){let e=document.createElement("mave-component");e.setAttribute("embed",i.id),g.getAttribute("video-source")&&e.setAttribute("src",g.getAttribute("video-source")),g.getAttribute("reference-id")&&e.setAttribute("reference-id",g.getAttribute("reference-id")),g.getAttribute("display-name")&&e.setAttribute("display-name",g.getAttribute("display-name")),g.getAttribute("jwt")&&e.setAttribute("jwt",g.getAttribute("jwt"));for(let{name:t,value:s}of g.attributes)t!="src"&&e.setAttribute(t,s);return(i.muted=="true"||i.autoPlay=="true")&&e.setAttribute("muted","true"),i.autoPlay=="true"&&e.setAttribute("autoplay",i.autoPlay),i.loop=="true"&&e.setAttribute("loop",i.loop),i.settingsFloat&&e.setAttribute("float",i.settingsFloat),i.videoSource&&!g.getAttribute("video-source")&&e.setAttribute("src",i.videoSource),i.videoBlurHash&&e.setAttribute("blurhash",i.videoBlurHash),i.posterImage&&e.setAttribute("poster-image",i.posterImage),i.posterVideoSource&&e.setAttribute("poster-image",i.posterVideoSource),i.originalFileType&&e.setAttribute("file-type",i.originalFileType),i.settingsAspectRatio=="auto"&&e.setAttribute("aspect-ratio",i.videoAspectRatio),i.settingsAspectRatio&&i.settingsAspectRatio!="auto"&&e.setAttribute("aspect-ratio",i.settingsAspectRatio),i.width&&e.setAttribute("width",i.width),i.height&&e.setAttribute("height",i.height),e}Pt();})();
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/