var lt=Object.defineProperty;var dt=(e,t,i)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var x=(e,t,i)=>(dt(e,typeof t!="symbol"?t+"":t,i),i),$=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var P=(e,t,i)=>($(e,t,"read from private field"),i?i.call(e):t.get(e)),p=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},M=(e,t,i,r)=>($(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var g=(e,t,i)=>($(e,t,"access private method"),i);import{c as ut}from"./vendor-react-ece1c85f.js";import{_ as ct}from"./vendor-pdf-b2a5d8b1.js";import"./vendor-mui-69397583.js";const ht=["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","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"];var Z;const D=(Z=globalThis.document)==null?void 0:Z.createElement("template");D&&(D.innerHTML=`
    <style>
      :host {
        display: inline-block;
        line-height: 0;
      }

      video,
      audio {
        max-width: 100%;
        max-height: 100%;
        min-width: 100%;
        min-height: 100%;
      }
    </style>
    <slot></slot>
  `);const tt=(e,{tag:t,is:i})=>{var y,h,E,H,et,k,C,S,_,f,L,b,j,m,it,n,ot,u,st,w,nt,N,rt;const r=(y=globalThis.document)==null?void 0:y.createElement(t,{is:i}),c=r?J(r):[];return h=class extends e{constructor(){super();p(this,b);p(this,m);p(this,n);p(this,u);p(this,w);p(this,N);p(this,k,void 0);p(this,C,void 0);p(this,S,!1);p(this,_,!1);p(this,f,void 0);p(this,L,void 0);this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.load!==h.prototype.load&&(this.loadComplete=new K)}static get observedAttributes(){var s,v;return g(s=h,H,et).call(s),[...((v=r==null?void 0:r.constructor)==null?void 0:v.observedAttributes)??[],"autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"]}get loadComplete(){return P(this,C)}set loadComplete(o){M(this,_,!1),M(this,C,o),o==null||o.then(()=>{M(this,_,!0)})}get isLoaded(){return P(this,_)}get nativeEl(){return P(this,f)??this.shadowRoot.querySelector(t)??this.querySelector(t)}set nativeEl(o){M(this,f,o)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(o){this.toggleAttribute("muted",!!o)}get src(){return this.getAttribute("src")}set src(o){this.setAttribute("src",`${o}`)}get preload(){var o;return this.getAttribute("preload")??((o=this.nativeEl)==null?void 0:o.preload)}set preload(o){this.setAttribute("preload",`${o}`)}attributeChangedCallback(o,s,v){g(this,b,j).call(this),o==="src"&&this.load!==h.prototype.load&&g(this,w,nt).call(this),g(this,N,rt).call(this,o,s,v)}connectedCallback(){g(this,b,j).call(this)}},E=new WeakMap,H=new WeakSet,et=function(){if(P(this,E))return;M(this,E,!0);const o=new Set(this.observedAttributes);o.delete("muted");for(let s of c){if(s in this.prototype)continue;if(typeof r[s]=="function")this.prototype[s]=function(...A){g(this,b,j).call(this);const a=()=>this.call?this.call(s,...A):this.nativeEl[s].apply(this.nativeEl,A);return this.loadComplete&&!this.isLoaded?this.loadComplete.then(a):a()};else{let A={get(){var l,T;g(this,b,j).call(this);let a=s.toLowerCase();if(o.has(a)){const R=this.getAttribute(a);return R===null?!1:R===""?!0:R}return((l=this.get)==null?void 0:l.call(this,s))??((T=this.nativeEl)==null?void 0:T[s])??P(this,L)[s]}};s!==s.toUpperCase()&&(A.set=async function(a){g(this,b,j).call(this);let l=s.toLowerCase();if(o.has(l)){a===!0||a===!1||a==null?this.toggleAttribute(l,!!a):this.setAttribute(l,a);return}if(this.loadComplete&&!this.isLoaded&&await this.loadComplete,this.set){this.set(s,a);return}this.nativeEl[s]=a}),Object.defineProperty(this.prototype,s,A)}}},k=new WeakMap,C=new WeakMap,S=new WeakMap,_=new WeakMap,f=new WeakMap,L=new WeakMap,b=new WeakSet,j=async function(){var v,A;if(P(this,k))return;M(this,k,!0),g(this,n,ot).call(this),g(this,u,st).call(this);for(let a of c)g(this,m,it).call(this,a);const o=new Map,s=this.shadowRoot.querySelector("slot:not([name])");s==null||s.addEventListener("slotchange",()=>{const a=new Map(o);s.assignedElements().filter(l=>["track","source"].includes(l.localName)).forEach(async l=>{var R,G;a.delete(l);let T=o.get(l);T||(T=l.cloneNode(),o.set(l,T)),this.loadComplete&&!this.isLoaded&&await this.loadComplete,(G=(R=this.nativeEl).append)==null||G.call(R,T)}),a.forEach(l=>l.remove())});for(let a of this.constructor.Events)(A=(v=this.shadowRoot).addEventListener)==null||A.call(v,a,l=>{l.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(l.type,{detail:l.detail}))},!0)},m=new WeakSet,it=function(o){if(Object.prototype.hasOwnProperty.call(this,o)){const s=this[o];delete this[o],this[o]=s}},n=new WeakSet,ot=function(){const o=document.createElement(t,{is:i});o.muted=this.hasAttribute("muted");for(let{name:s,value:v}of this.attributes)o.setAttribute(s,v);M(this,L,{});for(let s of J(o))P(this,L)[s]=o[s];o.removeAttribute("src"),o.load()},u=new WeakSet,st=async function(){if(this.loadComplete&&!this.isLoaded&&await this.loadComplete,!this.nativeEl){const o=document.createElement(t,{is:i});o.part=t,this.shadowRoot.append(o)}this.nativeEl.muted=this.hasAttribute("muted")},w=new WeakSet,nt=async function(){var o;P(this,S)&&(this.loadComplete=new K),M(this,S,!0),await Promise.resolve(),await this.load(),(o=this.loadComplete)==null||o.resolve(),await this.loadComplete},N=new WeakSet,rt=async function(o,s,v){var A,a,l,T;this.loadComplete&&!this.isLoaded&&await this.loadComplete,!["id","class",...this.constructor.skipAttributes].includes(o)&&(v===null?(a=(A=this.nativeEl).removeAttribute)==null||a.call(A,o):(T=(l=this.nativeEl).setAttribute)==null||T.call(l,o,v))},p(h,H),x(h,"Events",ht),x(h,"template",D),x(h,"skipAttributes",[]),p(h,E,void 0),h};function J(e){let t=[];for(let i=Object.getPrototypeOf(e);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i))t.push(...Object.getOwnPropertyNames(i));return t}class K extends Promise{constructor(t=()=>{}){let i,r;super((c,y)=>{t(c,y),i=c,r=y}),this.resolve=i,this.reject=r}}const pt=globalThis.document?tt(HTMLElement,{tag:"video"}):class{};globalThis.document&&tt(HTMLElement,{tag:"audio"});var Q,V;const W=(Q=globalThis.document)==null?void 0:Q.createElement("template");W&&(W.innerHTML=`
  <div class="wistia_embed"></div>
  `);const F=(V=globalThis.document)==null?void 0:V.createElement("template");F&&(F.innerHTML=`
  <style>
    :host {
      display: inline-block;
      min-width: 300px;
      min-height: 150px;
      position: relative;
    }
    ::slotted(.wistia_embed) {
      position: absolute;
      width: 100%;
      height: 100%;
    }
  </style>
  <slot></slot>
  `);class I extends pt{get nativeEl(){var t;return((t=this.api)==null?void 0:t.elem())??this.querySelector("video")}async load(){var t;if((t=this.querySelector(".wistia_embed"))==null||t.remove(),!this.src)return;await new Promise(E=>setTimeout(E,50));const i=/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/i,r=this.src.match(i)[1],c={autoPlay:this.autoplay,preload:this.preload??"metadata",playsinline:this.playsInline,endVideoBehavior:this.loop&&"loop",chromeless:!this.controls,playButton:this.controls,muted:this.defaultMuted};this.append(W.content.cloneNode(!0));const y=this.querySelector(".wistia_embed");y.id||(y.id=vt(r)),y.classList.add(`wistia_async_${r}`),await ft("https://fast.wistia.com/assets/external/E-v1.js","Wistia"),this.api=await new Promise(E=>{globalThis._wq.push({id:y.id,onReady:E,options:c})})}async attributeChangedCallback(t,i,r){if(t==="controls"){switch(await this.loadComplete,t){case"controls":this.api.bigPlayButtonEnabled(this.controls),this.controls?this.api.releaseChromeless():this.api.requestChromeless();break}return}super.attributeChangedCallback(t,i,r)}get duration(){var t;return(t=this.api)==null?void 0:t.duration()}async play(){return await this.loadComplete,this.api.play(),new Promise(t=>this.addEventListener("playing",t))}}x(I,"template",F),x(I,"skipAttributes",["src"]);const B={};async function ft(e,t){return t?B[e]?B[e]:self[t]?self[t]:B[e]=new Promise((i,r)=>{const c=document.createElement("script");c.defer=!0,c.src=e,c.onload=()=>i(self[t]),c.onerror=r,document.head.append(c)}):ct(()=>import(e),[])}let mt=0;function vt(e){const t=++mt;return`${e}${t}`}globalThis.customElements&&!globalThis.customElements.get("wistia-video")&&globalThis.customElements.define("wistia-video",I);var yt=I,bt=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),wt={className:"class",htmlFor:"for"};function at(e){return e.toLowerCase()}function X(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function gt({react:e,tagName:t,elementClass:i,events:r,displayName:c,defaultProps:y,toAttributeName:h=at,toAttributeValue:E=X}){const H=Number.parseInt(e.version)>=19,U=e.forwardRef((k,C)=>{var S,_;const f=e.useRef(null),L=e.useRef(new Map),b={},z={},m={},q={};for(const[n,d]of Object.entries(k)){if(bt.has(n)){m[n]=d;continue}const u=h(wt[n]??n);if(i.prototype&&n in i.prototype&&!(n in(((S=globalThis.HTMLElement)==null?void 0:S.prototype)??{}))&&!((_=i.observedAttributes)!=null&&_.some(w=>w===u))){q[n]=d;continue}if(n.startsWith("on")){b[n]=d;continue}const O=E(d);if(u&&O!=null&&(z[u]=String(O),H||(m[u]=O)),u&&H){const w=X(d);O!==w?m[u]=O:m[u]=d}}if(typeof window<"u"){for(const n in b){const d=b[n],u=n.endsWith("Capture"),O=((r==null?void 0:r[n])??n.slice(2).toLowerCase()).slice(0,u?-7:void 0);e.useLayoutEffect(()=>{const w=f==null?void 0:f.current;if(!(!w||typeof d!="function"))return w.addEventListener(O,d,u),()=>{w.removeEventListener(O,d,u)}},[f==null?void 0:f.current,d])}e.useLayoutEffect(()=>{if(f.current===null)return;const n=new Map;for(const d in q)Y(f.current,d,q[d]),L.current.delete(d),n.set(d,q[d]);for(const[d,u]of L.current)Y(f.current,d,void 0);L.current=n})}if(typeof window>"u"&&(i!=null&&i.getTemplateHTML)&&(i!=null&&i.shadowRootOptions)){const{mode:n,delegatesFocus:d}=i.shadowRootOptions,u=e.createElement("template",{shadowrootmode:n,shadowrootdelegatesfocus:d,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(z,k)},key:"ce-la-react-ssr-template-shadow-root"});m.children=[u,m.children]}return e.createElement(t,{...y,...m,ref:e.useCallback(n=>{f.current=n,typeof C=="function"?C(n):C!==null&&(C.current=n)},[C])},m.children)});return U.displayName=c??i.name,U}function Y(e,t,i){var r;e[t]=i,i==null&&t in(((r=globalThis.HTMLElement)==null?void 0:r.prototype)??{})&&e.removeAttribute(t)}var _t=gt({react:ut,tagName:"wistia-video",elementClass:yt,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":at(e)}});/*! Bundled license information:

ce-la-react/dist/ce-la-react.js:
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: BSD-3-Clause
   *
   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
   *)
*/export{_t as default};
