@maveio/components 0.0.172 → 0.0.174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dist/chunk-3FKZJPP6.cjs +2 -0
  2. package/dist/chunk-HDVI5ING.js +2583 -0
  3. package/dist/chunk-KCEF7VQS.cjs +2583 -0
  4. package/dist/chunk-SWNRHAZK.js +2 -0
  5. package/dist/config.cjs +1 -1
  6. package/dist/config.d.cts +9 -3
  7. package/dist/config.d.ts +9 -3
  8. package/dist/config.js +1 -1
  9. package/dist/de-4HGSV4NX.cjs +1 -0
  10. package/dist/de-AM53RBF2.js +1 -0
  11. package/dist/{themes/default.cjs → default-LFHA4VXP.cjs} +3 -3
  12. package/dist/{themes/default.js → default-OIQBJJAX.js} +3 -3
  13. package/dist/{themes/dolphin.cjs → dolphin-B2Z26DWX.cjs} +2 -2
  14. package/dist/{themes/dolphin.js → dolphin-JJOJS5EI.js} +2 -2
  15. package/dist/en-H7UBETC6.js +1 -0
  16. package/dist/en-M6OWHDJ2.cjs +1 -0
  17. package/dist/fr-2IL2CZKO.js +1 -0
  18. package/dist/fr-OXQSVAX4.cjs +1 -0
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.d.cts +470 -16
  21. package/dist/index.d.ts +470 -16
  22. package/dist/index.js +1 -1
  23. package/dist/nl-CPFN66G7.js +1 -0
  24. package/dist/nl-YHUQM5IK.cjs +1 -0
  25. package/dist/react.cjs +1 -1
  26. package/dist/react.d.cts +2 -11
  27. package/dist/react.d.ts +2 -11
  28. package/dist/react.js +1 -1
  29. package/dist/{themes/synthwave.cjs → synthwave-JAIVYLQN.cjs} +2 -2
  30. package/dist/{themes/synthwave.js → synthwave-X45G4Z3J.js} +2 -2
  31. package/dist/vue.cjs +1 -1
  32. package/dist/vue.d.cts +1 -0
  33. package/dist/vue.d.ts +1 -0
  34. package/dist/vue.js +1 -1
  35. package/package.json +7 -2
  36. package/dist/chunk-2E5GLLOS.cjs +0 -19
  37. package/dist/chunk-2FUCHY2J.cjs +0 -35
  38. package/dist/chunk-2JCNQPEK.js +0 -1
  39. package/dist/chunk-3BAQWQNY.cjs +0 -25
  40. package/dist/chunk-3UQNIS3L.js +0 -194
  41. package/dist/chunk-474VILDO.cjs +0 -194
  42. package/dist/chunk-5NKBIUPL.cjs +0 -1
  43. package/dist/chunk-5PIHL662.js +0 -19
  44. package/dist/chunk-5ZZKAVXJ.js +0 -38
  45. package/dist/chunk-6DDQAAOQ.cjs +0 -211
  46. package/dist/chunk-AOBEOJ2U.cjs +0 -10
  47. package/dist/chunk-B5K5JDPC.cjs +0 -7
  48. package/dist/chunk-B6P2GJBQ.js +0 -9
  49. package/dist/chunk-BL5IEXIA.cjs +0 -1
  50. package/dist/chunk-BTCK3T4L.cjs +0 -24
  51. package/dist/chunk-CNPQ5Q2M.js +0 -1
  52. package/dist/chunk-CVXHA76S.js +0 -3
  53. package/dist/chunk-CWZPXTU2.cjs +0 -154
  54. package/dist/chunk-DL4BV5IH.cjs +0 -24
  55. package/dist/chunk-DXS4BF7U.js +0 -33
  56. package/dist/chunk-EVKPEPYP.cjs +0 -2
  57. package/dist/chunk-FAONFKQ2.cjs +0 -9
  58. package/dist/chunk-GXOLIMQT.js +0 -1
  59. package/dist/chunk-HMVS6DJE.js +0 -186
  60. package/dist/chunk-IBQULJZC.cjs +0 -3
  61. package/dist/chunk-J7OISSKU.cjs +0 -1
  62. package/dist/chunk-JN3JQJEF.js +0 -1639
  63. package/dist/chunk-K5Z7QHTN.cjs +0 -1
  64. package/dist/chunk-KHVG2CY5.js +0 -7
  65. package/dist/chunk-KNLOZXCA.cjs +0 -33
  66. package/dist/chunk-KO3CETGD.js +0 -25
  67. package/dist/chunk-KZGLJUFY.cjs +0 -38
  68. package/dist/chunk-LVGLIRQU.cjs +0 -186
  69. package/dist/chunk-MK4VIJT3.js +0 -1
  70. package/dist/chunk-MMHEOMF5.js +0 -9
  71. package/dist/chunk-NDPOBFNC.js +0 -20
  72. package/dist/chunk-NPP5B5PV.cjs +0 -16
  73. package/dist/chunk-OX42Y2HR.js +0 -1
  74. package/dist/chunk-P6SBZPDR.js +0 -1
  75. package/dist/chunk-PTN427IG.js +0 -24
  76. package/dist/chunk-QFF6OUH6.js +0 -9
  77. package/dist/chunk-QOM4AP6R.cjs +0 -9
  78. package/dist/chunk-QQDH35OW.cjs +0 -9
  79. package/dist/chunk-R3SDTEHC.js +0 -9
  80. package/dist/chunk-RHTBV6KZ.js +0 -24
  81. package/dist/chunk-RKL7JR7S.js +0 -211
  82. package/dist/chunk-RQN3DXJB.cjs +0 -1
  83. package/dist/chunk-RRCW5BBR.cjs +0 -9
  84. package/dist/chunk-S3D62CAG.js +0 -154
  85. package/dist/chunk-SDKTBB4N.cjs +0 -1
  86. package/dist/chunk-SWRFZ3FV.js +0 -1
  87. package/dist/chunk-TAKTIPT7.cjs +0 -1639
  88. package/dist/chunk-TH3DUBVR.js +0 -35
  89. package/dist/chunk-TJ5F2FGY.cjs +0 -20
  90. package/dist/chunk-TKJYRGEU.cjs +0 -1
  91. package/dist/chunk-WE5NUDRY.js +0 -0
  92. package/dist/chunk-WOXKZOJ3.js +0 -10
  93. package/dist/chunk-X7OGQ4KH.cjs +0 -1
  94. package/dist/chunk-YPCQNE3R.js +0 -16
  95. package/dist/chunk-ZTDQPDC6.js +0 -2
  96. package/dist/components/audio-track-menu.cjs +0 -1
  97. package/dist/components/audio-track-menu.d.cts +0 -27
  98. package/dist/components/audio-track-menu.d.ts +0 -27
  99. package/dist/components/audio-track-menu.js +0 -1
  100. package/dist/components/captions-menu-button.cjs +0 -1
  101. package/dist/components/captions-menu-button.d.cts +0 -10
  102. package/dist/components/captions-menu-button.d.ts +0 -10
  103. package/dist/components/captions-menu-button.js +0 -1
  104. package/dist/components/clip.cjs +0 -1
  105. package/dist/components/clip.d.cts +0 -55
  106. package/dist/components/clip.d.ts +0 -55
  107. package/dist/components/clip.js +0 -1
  108. package/dist/components/files.cjs +0 -1
  109. package/dist/components/files.d.cts +0 -22
  110. package/dist/components/files.d.ts +0 -22
  111. package/dist/components/files.js +0 -1
  112. package/dist/components/img.cjs +0 -1
  113. package/dist/components/img.d.cts +0 -16
  114. package/dist/components/img.d.ts +0 -16
  115. package/dist/components/img.js +0 -1
  116. package/dist/components/list.cjs +0 -1
  117. package/dist/components/list.d.cts +0 -29
  118. package/dist/components/list.d.ts +0 -29
  119. package/dist/components/list.js +0 -1
  120. package/dist/components/player.cjs +0 -1
  121. package/dist/components/player.d.cts +0 -104
  122. package/dist/components/player.d.ts +0 -104
  123. package/dist/components/player.js +0 -1
  124. package/dist/components/pop.cjs +0 -1
  125. package/dist/components/pop.d.cts +0 -37
  126. package/dist/components/pop.d.ts +0 -37
  127. package/dist/components/pop.js +0 -1
  128. package/dist/components/text.cjs +0 -1
  129. package/dist/components/text.d.cts +0 -55
  130. package/dist/components/text.d.ts +0 -55
  131. package/dist/components/text.js +0 -1
  132. package/dist/components/upload.cjs +0 -1
  133. package/dist/components/upload.d.cts +0 -94
  134. package/dist/components/upload.d.ts +0 -94
  135. package/dist/components/upload.js +0 -1
  136. package/dist/embed/api.cjs +0 -1
  137. package/dist/embed/api.d.cts +0 -112
  138. package/dist/embed/api.d.ts +0 -112
  139. package/dist/embed/api.js +0 -1
  140. package/dist/embed/caption.cjs +0 -1
  141. package/dist/embed/caption.d.cts +0 -24
  142. package/dist/embed/caption.d.ts +0 -24
  143. package/dist/embed/caption.js +0 -1
  144. package/dist/embed/controller.cjs +0 -1
  145. package/dist/embed/controller.d.cts +0 -34
  146. package/dist/embed/controller.d.ts +0 -34
  147. package/dist/embed/controller.js +0 -1
  148. package/dist/embed/socket.cjs +0 -1
  149. package/dist/embed/socket.d.cts +0 -14
  150. package/dist/embed/socket.d.ts +0 -14
  151. package/dist/embed/socket.js +0 -1
  152. package/dist/generated/locales/de.cjs +0 -1
  153. package/dist/generated/locales/de.d.cts +0 -17
  154. package/dist/generated/locales/de.d.ts +0 -17
  155. package/dist/generated/locales/de.js +0 -1
  156. package/dist/generated/locales/en.cjs +0 -1
  157. package/dist/generated/locales/en.d.cts +0 -17
  158. package/dist/generated/locales/en.d.ts +0 -17
  159. package/dist/generated/locales/en.js +0 -1
  160. package/dist/generated/locales/fr.cjs +0 -1
  161. package/dist/generated/locales/fr.d.cts +0 -17
  162. package/dist/generated/locales/fr.d.ts +0 -17
  163. package/dist/generated/locales/fr.js +0 -1
  164. package/dist/generated/locales/nl.cjs +0 -1
  165. package/dist/generated/locales/nl.d.cts +0 -17
  166. package/dist/generated/locales/nl.d.ts +0 -17
  167. package/dist/generated/locales/nl.js +0 -1
  168. package/dist/themes/default.d.cts +0 -3
  169. package/dist/themes/default.d.ts +0 -3
  170. package/dist/themes/dolphin.d.cts +0 -3
  171. package/dist/themes/dolphin.d.ts +0 -3
  172. package/dist/themes/loader.cjs +0 -1
  173. package/dist/themes/loader.d.cts +0 -11
  174. package/dist/themes/loader.d.ts +0 -11
  175. package/dist/themes/loader.js +0 -1
  176. package/dist/themes/synthwave.d.cts +0 -3
  177. package/dist/themes/synthwave.d.ts +0 -3
  178. package/dist/utils/localization.cjs +0 -1
  179. package/dist/utils/localization.d.cts +0 -24
  180. package/dist/utils/localization.d.ts +0 -24
  181. package/dist/utils/localization.js +0 -1
  182. package/dist/utils/mave_element.cjs +0 -1
  183. package/dist/utils/mave_element.d.cts +0 -19
  184. package/dist/utils/mave_element.d.ts +0 -19
  185. package/dist/utils/mave_element.js +0 -1
  186. package/dist/utils/origin.cjs +0 -1
  187. package/dist/utils/origin.d.cts +0 -3
  188. package/dist/utils/origin.d.ts +0 -3
  189. package/dist/utils/origin.js +0 -1
  190. package/dist/utils/video_events.cjs +0 -1
  191. package/dist/utils/video_events.d.cts +0 -3
  192. package/dist/utils/video_events.d.ts +0 -3
  193. package/dist/utils/video_events.js +0 -1
@@ -1 +0,0 @@
1
- 'use strict';var chunkQOM4AP6R_cjs=require('./chunk-QOM4AP6R.cjs'),chunkEVKPEPYP_cjs=require('./chunk-EVKPEPYP.cjs');var p=class{constructor(e,d){this.host=e,this.embed=d,this.task=new chunkQOM4AP6R_cjs.a(this.host,async()=>{try{let i=this.embedFile("subtitle.json"),c=await fetch(i);if(c.status!==200)throw new Error;let u=await c.json(),f=u.segments.flatMap(t=>t.words).map(t=>({start:t.start,end:t.end,word:t.word.trim()})),r=[],n={start:0,end:0,text:"",words:[]};f.forEach(t=>{let{start:a,end:o,word:s}=t;n.start===0&&(n.start=a),n.end=o,n.words.push(t),n.text+=(n.text?" ":"")+s,/[.!?]$/.test(s)&&(r.push({...n}),n={start:0,end:0,text:"",words:[]});}),n.words.length>0&&r.push({...n});let h=[],l=1,w=5;if(r.length>0){let t={start:r[0].start,end:r[0].end,text:r[0].text,words:r[0].words},a=1;for(let o=1;o<r.length;o++){let s=r[o],b=r[o-1],S=s.start??0,k=b.end??0;S-k<=l&&a<w?(t.end=s.end,t.text+=" "+s.text,t.words=[...t.words,...s.words],a++):(h.push({...t}),t={start:s.start,end:s.end,text:s.text,words:s.words},a=1);}t.words.length>0&&h.push(t);}return {text:u.text,segments:h}}catch{throw console.warn(`Failed to fetch language file for "${this.embed}"`),new Error}},()=>[this.embed]);}set embed(e){this._embed!=e&&(this._embed=e,this.host.requestUpdate());}get embed(){return this._embed}set token(e){this._token!=e&&(this._token=e,this.host.requestUpdate());}get token(){return this._token}get spaceId(){return this.embed.substring(0,5)}get embedId(){return this.embed.substring(5,this.embed.length)}get version(){return this._version?`/v${this._version}/`:"/"}set version(e){this._version!=e&&(this._version=e,this.host.requestUpdate());}get cdnRoot(){return chunkEVKPEPYP_cjs.a.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}embedFile(e,d=new URLSearchParams){let i=new URL(`${this.cdnRoot}/${this.embedId}${e=="manifest.json"?"/":this.version}${e}`);return this.token&&d.append("token",this.token),i.search=d.toString(),i.toString()}render(e){return this.task?.render(e)}};exports.a=p;
@@ -1,7 +0,0 @@
1
- import {b as b$2}from'./chunk-S3D62CAG.js';import {a as a$2}from'./chunk-SWRFZ3FV.js';import {b as b$1}from'./chunk-OX42Y2HR.js';import {a as a$1}from'./chunk-PTN427IG.js';import {a as a$3,e as e$1}from'./chunk-5PIHL662.js';import {a}from'./chunk-YPCQNE3R.js';import {c,e,g}from'./chunk-KA24PL7V.js';var n,C,b,h,f,p,u=class extends a$2{constructor(){super(...arguments);e(this,n);this.order="newest";this.embedController=new b$1(this,0);}connectedCallback(){super.connectedCallback(),this.embedController.token=this.token;}requestUpdate(e,o){super.requestUpdate(e,o),e==="embed"&&(this.embedController.token=this.token);}get _slottedChildren(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:true})||[]}updated(){this.shadowRoot&&b$2(this.shadowRoot);}refresh(){return this.embedController.refresh()}containsEmbed(e){return this._collection?.videos?.some(o=>o.id===e)}getNextForEmbed(e){let o=g(this,n,C).call(this),t=o.findIndex(s=>s.id===e);if(t!==-1)return o[t+1]}render(){return a$3`
2
- ${this.embedController.render({pending:this.renderPending,error:e=>a$3`<p>${e instanceof Error?e.message:e$1}</p>`,complete:e=>{if(this._collection=e,!e)return this.renderPending();if(e.error)return console.warn(e.error);let o=this._slottedChildren.map(t=>{function s(){let l;return t.nodeName==="TEMPLATE"?l=t.content.cloneNode(true):l=t.cloneNode(true),l}if(t.getAttribute("name")=="list-title"){let l=s();return l.textContent=this._collection?.name,a$3`${l}`}if(t.getAttribute("name")=="mave-list-root"&&this.embedController.embed){let l=s(),i=g(this,n,f).call(this,l,"root-link");return i&&(i.addEventListener("click",a=>{a.preventDefault(),this.emit(this.EVENT_TYPES.CLICK,{action:"back",embedId:""}),this.embedController.embed="";}),g(this,n,p).call(this,i)),a$3`${l}`}if(t.getAttribute("name")=="mave-list-folder"){let l=this._collection.collections?.map(i=>{let a=s(),m=g(this,n,f).call(this,a,"folder-link");return [t,m].forEach(d=>{d instanceof Element&&(d.addEventListener("click",g=>{g.preventDefault(),this.emit(this.EVENT_TYPES.CLICK,{action:"show_collection",collectionId:i.id}),this.embedController.embed=i.id;}),g(this,n,p).call(this,d));}),g(this,n,h).call(this,a,"folder-title",i.name),typeof i.video_count=="number"&&g(this,n,h).call(this,a,"folder-count",i.video_count.toString()),a$3`${a}`});return a$3`${l}`}if(t.getAttribute("name")=="mave-list-item"||!["mave-list-folder","mave-list-item","mave-list-root","list-title"].includes(t.hasAttribute("name")?t.getAttribute("name"):"")&&t.nodeName=="TEMPLATE"){let l=g(this,n,C).call(this).map((i,a)=>{let m=s(),d=a+1;g(this,n,h).call(this,m,"item-title",i.name),g(this,n,h).call(this,m,"item-position",d.toString()),g(this,n,h).call(this,m,"item-duration",this.durationToTime(i.duration)),g(this,n,b).call(this,m,"mave-clip",i.id),g(this,n,b).call(this,m,"mave-player",i.id),g(this,n,b).call(this,m,"mave-img",i.id);let g$1=m.querySelector("mave-clip"),S=g(this,n,f).call(this,m,"item-title"),$=m.querySelector("mave-img");return [g$1,S,$,m].forEach(P=>{P?.addEventListener("click",x=>{this.emit(this.EVENT_TYPES.CLICK,{action:"show_embed",embedId:i.id,position:d});});}),a$3`${m}`});return a$3`${l}`}}).filter(t=>t);return a$3`${this._stylesheets} ${o}`}})}
3
- `}renderPending(){return a$3`<slot style="display: none"></slot>`}};n=new WeakSet,C=function(){if(!this._collection)return [];let e=this._collection.videos;return this.order=="newest"&&(e=this._collection.videos?.sort((o,t)=>t.created-o.created)),this.order=="oldest"&&(e=this._collection.videos?.sort((o,t)=>o.created-t.created)),this.order=="az"&&(e=this._collection.videos?.sort((o,t)=>o.name.localeCompare(t.name))),this.order=="za"&&(e=this._collection.videos?.sort((o,t)=>t.name.localeCompare(o.name))),e},b=function(e,o,t){let s=e.querySelector(o);s&&(s.setAttribute("embed",t),g(this,n,p).call(this,s));},h=function(e,o,t){let s=g(this,n,f).call(this,e,o);s&&(s.textContent=t,g(this,n,p).call(this,s));},f=function(e,o){return e.querySelector(`[slot="${o}"], [data-slot="${o}"]`)},p=function(e){e&&(e.removeAttribute("slot"),e.removeAttribute("data-slot"));},u.styles=a`
4
- :host {
5
- display: block;
6
- }
7
- `,c([a$1()],u.prototype,"token",2),c([a$1()],u.prototype,"order",2);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-list")||window.customElements.define("mave-list",u));export{u as a};
@@ -1,33 +0,0 @@
1
- 'use strict';var chunkJ7OISSKU_cjs=require('./chunk-J7OISSKU.cjs');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;var c="lit-localize-status";var I=t=>typeof t!="string"&&"strTag"in t,p=(t,e,o)=>{let n=t[0];for(let r=1;r<t.length;r++)n+=e[o?o[r-1]:r-1],n+=t[r];return n};var d=(t=>I(t)?p(t.strings,t.values):t);exports.a=d;var C=false;function E(t){if(C)throw new Error("lit-localize can only be configured once");exports.a=t,C=true;}var w=class{constructor(e){this.__litLocalizeEventHandler=o=>{o.detail.status==="ready"&&this.host.requestUpdate();},this.host=e;}hostConnected(){window.addEventListener(c,this.__litLocalizeEventHandler);}hostDisconnected(){window.removeEventListener(c,this.__litLocalizeEventHandler);}},N=t=>t.addController(new w(t)),z=N;var W=()=>(t,e)=>(t.addInitializer(z),t);var u=class{constructor(){this.settled=false,this.promise=new Promise((e,o)=>{this._resolve=e,this._reject=o;});}resolve(e){this.settled=true,this._resolve(e);}reject(e){this.settled=true,this._reject(e);}};var i=[];for(let t=0;t<256;t++)i[t]=(t>>4&15).toString(16)+(t&15).toString(16);function A(t){let e=0,o=8997,n=0,r=33826,s=0,l=40164,L=0,f=52210;for(let v=0;v<t.length;v++)o^=t.charCodeAt(v),e=o*435,n=r*435,s=l*435,L=f*435,s+=o<<8,L+=r<<8,n+=e>>>16,o=e&65535,s+=n>>>16,r=n&65535,f=L+(s>>>16)&65535,l=s&65535;return i[f>>8]+i[f&255]+i[l>>8]+i[l&255]+i[r>>8]+i[r&255]+i[o>>8]+i[o&255]}var $="",b="h",O="s";function R(t,e){return (e?b:O)+A(typeof t=="string"?t:t.join($))}var j=new WeakMap,H=new Map;function P(t,e,o){if(t){let n=o?.id??k(e),r=t[n];if(r){if(typeof r=="string")return r;if("strTag"in r)return p(r.strings,e.values,r.values);{let s=j.get(r);return s===void 0&&(s=r.values,j.set(r,s)),{...r,values:s.map(l=>e.values[l])}}}}return d(e)}function k(t){let e=typeof t=="string"?t:t.strings,o=H.get(e);return o===void 0&&(o=R(e,typeof t!="string"&&!("strTag"in t)),H.set(e,o)),o}function S(t){window.dispatchEvent(new CustomEvent(c,{detail:t}));}var g="",y,U,h,T,V,a=new u;a.resolve();var m=0,q=t=>(E(((e,o)=>P(V,e,o))),g=U=t.sourceLocale,h=new Set(t.targetLocales),h.add(t.sourceLocale),T=t.loadLocale,{getLocale:X,setLocale:G}),X=()=>g,G=t=>{if(t===(y??g))return a.promise;if(!h||!T)throw new Error("Internal error");if(!h.has(t))throw new Error("Invalid locale code");m++;let e=m;return y=t,a.settled&&(a=new u),S({status:"loading",loadingLocale:t}),(t===U?Promise.resolve({templates:void 0}):T(t)).then(n=>{m===e&&(g=t,y=void 0,V=n.templates,S({status:"ready",readyLocale:t}),a.resolve());},n=>{m===e&&(S({status:"error",errorLocale:t,errorMessage:n.toString()}),a.reject(n));}),a.promise};var B={en:()=>import('./generated/locales/en.cjs'),nl:()=>import('./generated/locales/nl.cjs'),de:()=>import('./generated/locales/de.cjs'),fr:()=>import('./generated/locales/fr.cjs')};function J(t){return B[t]}async function D(t){let e=chunkJ7OISSKU_cjs.a();if(!e)return null;try{return await import(new URL(`./${e}generated/locales/${t}.js`,(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KNLOZXCA.cjs', document.baseURI).href))).href)}catch{return null}}var K=q({sourceLocale:"default",targetLocales:["en","nl","de","fr"],loadLocale:async t=>{if(chunkJ7OISSKU_cjs.a()){let n=await D(t);if(n)return n}let e=J(t);if(e)try{return await e()}catch(n){console.error(`[mave-player]: failed to load locale ${t}`,n);}let o=await D(t);return o||(console.log(`[mave-player]: locale not loaded for ${t}`),null)}}),M=false,F=class{constructor(e){this._onLoad=e=>{e.detail.status==="loading"?M=false:e.detail.status==="ready"&&(M=true),this.host.requestUpdate();};this.host=e,e.addController(this);}get loaded(){return M}set locale(e){this._locale!==e&&(K.setLocale(e),this.host.requestUpdate());}get locale(){return this._locale}hostConnected(){typeof window<"u"&&window.addEventListener("lit-localize-status",this._onLoad);}hostDisconnected(){typeof window<"u"&&window.removeEventListener("lit-localize-status",this._onLoad);}};/*! Bundled license information:
2
-
3
- @lit/localize/internal/locale-status-event.js:
4
- @lit/localize/internal/str-tag.js:
5
- @lit/localize/internal/types.js:
6
- @lit/localize/internal/default-msg.js:
7
- @lit/localize/internal/localized-controller.js:
8
- @lit/localize/internal/localized-decorator.js:
9
- @lit/localize/internal/runtime-msg.js:
10
- @lit/localize/init/runtime.js:
11
- @lit/localize/init/transform.js:
12
- (**
13
- * @license
14
- * Copyright 2021 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
-
18
- @lit/localize/internal/deferred.js:
19
- @lit/localize/internal/id-generation.js:
20
- @lit/localize/lit-localize.js:
21
- (**
22
- * @license
23
- * Copyright 2020 Google LLC
24
- * SPDX-License-Identifier: BSD-3-Clause
25
- *)
26
-
27
- @lit/localize/internal/fnv1a64.js:
28
- (**
29
- * @license
30
- * Copyright 2014 Travis Webb
31
- * SPDX-License-Identifier: MIT
32
- *)
33
- */exports.b=W;exports.c=K;exports.d=F;
@@ -1,25 +0,0 @@
1
- import {o,n,M as M$1,d,r as r$1,g as g$1}from'./chunk-3UQNIS3L.js';import {e,g}from'./chunk-KA24PL7V.js';var M=(t="")=>t.split(/\s+/),A=(t="")=>{let[e,n,o]=t.split(":"),i=o?decodeURIComponent(o):void 0;return {kind:e==="cc"?g$1.CAPTIONS:g$1.SUBTITLES,language:n,label:i}},T=(t="",e={})=>M(t).map(n=>{let o=A(n);return {...e,...o}}),k=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?A(e):e):typeof t=="string"?T(t):[t]:[],y=({kind:t,label:e,language:n}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${n}:${encodeURIComponent(e)}`:n,h=(t=[])=>Array.prototype.map.call(t,y).join(" "),U=(t,e)=>n=>n[t]===e,I=t=>{let e=Object.entries(t).map(([n,o])=>U(n,o));return n=>e.every(o=>o(n))},Z=(t,e=[],n=[])=>{let o=k(n).map(I),i=d=>o.some(x=>x(d));Array.from(e).filter(i).forEach(d=>{d.mode=t;});},$=(t,e=()=>true)=>{if(!t?.textTracks)return [];let n=typeof e=="function"?e:I(e);return Array.from(t.textTracks).filter(n)},L=t=>{var e;return !!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(d.MEDIA_SUBTITLES_SHOWING)};var B=`<svg aria-hidden="true" viewBox="0 0 26 24">
2
- <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
3
- </svg>`,D=`<svg aria-hidden="true" viewBox="0 0 26 24">
4
- <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
5
- </svg>`;function H(){return `
6
- <style>
7
- :host([data-captions-enabled="true"]) slot[name=off] {
8
- display: none !important;
9
- }
10
-
11
-
12
- :host(:not([data-captions-enabled="true"])) slot[name=on] {
13
- display: none !important;
14
- }
15
-
16
- :host([aria-expanded="true"]) slot[name=tooltip] {
17
- display: none;
18
- }
19
- </style>
20
-
21
- <slot name="icon">
22
- <slot name="on">${B}</slot>
23
- <slot name="off">${D}</slot>
24
- </slot>
25
- `}function w(){return n("Captions")}var E=t=>{t.setAttribute("data-captions-enabled",L(t).toString());},v=t=>{t.setAttribute("aria-label",n("closed captions"));},r=class extends M$1{static get observedAttributes(){return [...super.observedAttributes,d.MEDIA_SUBTITLES_LIST,d.MEDIA_SUBTITLES_SHOWING,d.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),v(this),E(this);}attributeChangedCallback(e,n,o){super.attributeChangedCallback(e,n,o),e===d.MEDIA_SUBTITLES_SHOWING?E(this):e===d.MEDIA_LANG&&v(this);}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=r$1(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return C(this,d.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){_(this,d.MEDIA_SUBTITLES_LIST,e);}get mediaSubtitlesShowing(){return C(this,d.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){_(this,d.MEDIA_SUBTITLES_SHOWING,e);}};r.getSlotTemplateHTML=H;r.getTooltipContentHTML=w;var C=(t,e)=>{let n=t.getAttribute(e);return n?T(n):[]},_=(t,e,n)=>{if(!n?.length){t.removeAttribute(e);return}let o=h(n);t.getAttribute(e)!==o&&t.setAttribute(e,o);};o.customElements.get("media-captions-menu-button")||o.customElements.define("media-captions-menu-button",r);var l,b,u=class extends r{constructor(){super(...arguments);e(this,l);}connectedCallback(){super.connectedCallback(),g(this,l,b).call(this);}attributeChangedCallback(n,o,i){super.attributeChangedCallback(n,o,i),g(this,l,b).call(this);}};l=new WeakSet,b=function(){this.setAttribute("aria-label",n("Captions"));},u.getTooltipContentHTML=()=>n("Captions");o.customElements.get("mave-captions-menu-button")||o.customElements.define("mave-captions-menu-button",u);export{T as a,k as b,y as c,h as d,Z as e,$ as f,L as g,u as h};
@@ -1,38 +0,0 @@
1
- 'use strict';var chunkBTCK3T4L_cjs=require('./chunk-BTCK3T4L.cjs'),chunkSDKTBB4N_cjs=require('./chunk-SDKTBB4N.cjs'),chunkFAONFKQ2_cjs=require('./chunk-FAONFKQ2.cjs'),chunkRQN3DXJB_cjs=require('./chunk-RQN3DXJB.cjs'),chunkDL4BV5IH_cjs=require('./chunk-DL4BV5IH.cjs'),chunk2E5GLLOS_cjs=require('./chunk-2E5GLLOS.cjs'),chunkNPP5B5PV_cjs=require('./chunk-NPP5B5PV.cjs'),chunkEVKPEPYP_cjs=require('./chunk-EVKPEPYP.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var i,v,c,u,y,M,p,I,L,S,T,r=class extends chunk2E5GLLOS_cjs.g{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,i);this.autoplay="lazy";this.quality="auto";this.fallback="placeholder";this._queue=[];this._failedPlay=false;this._intersectionObserver=new chunkBTCK3T4L_cjs.a(this,{callback:chunkJHSFSCC2_cjs.g(this,i,L).bind(this)});this.embedController=new chunkRQN3DXJB_cjs.b(this);}get embed(){return this._embedId}set embed(t){this._embedId!=t&&(this._embedId=t,this.requestUpdate("embed"),this.embedController.embed=this.embed);}set loop(t){this._loop=t===""||t=="true"||t==true;}get loop(){return this._loop??false}get poster(){return this.embedController.embedFile(`${this.fallback}.jpg`)}set poster(t){if(t){let s=this._poster;this._poster=t,this.requestUpdate("poster",s);}}get token(){return this._token}set token(t){this._token!=t&&(this._token=t,this.requestUpdate("token"),this.embedController.token=this._token);}get sources(){let t=this.autoplay==="scroll"?["clip_keyframes"]:["video","clip"],s=this._embed.video.renditions.filter(e=>(this.quality=="auto"?e.size!=="uhd":chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size)<=chunkJHSFSCC2_cjs.d(this,i,c).indexOf(this.quality))&&e.container==="mp4"&&chunkJHSFSCC2_cjs.d(this,i,u).includes(e.codec)&&(!e.type||t.includes(e.type))).sort((e,n)=>e.size===n.size?chunkJHSFSCC2_cjs.d(this,i,u).indexOf(e.codec)-chunkJHSFSCC2_cjs.d(this,i,u).indexOf(n.codec):chunkJHSFSCC2_cjs.d(this,i,c).indexOf(n.size)-chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size)).map(e=>{let n=chunkJHSFSCC2_cjs.d(this,i,M).find(g=>g.size===e.size)?.media,m=`${e.codec}_${e.size}${e.type&&e.type!="video"?`_${e.type}`:""}.mp4`;return {media:n,src:this.embedController.embedFile(m),codec:chunkJHSFSCC2_cjs.d(this,i,y)[e.codec]??e.codec}}),d=this._embed.video.renditions.filter(e=>chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size)<=chunkJHSFSCC2_cjs.d(this,i,c).indexOf("fhd")&&e.container==="mp4"&&chunkJHSFSCC2_cjs.d(this,i,u).includes(e.codec)&&(!e.type||t.includes(e.type))).sort((e,n)=>chunkJHSFSCC2_cjs.d(this,i,c).indexOf(n.size)-chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size));if(d.length>0){let e=d[0],n=`${e.codec}_${e.size}${e.type&&e.type!="video"?`_${e.type}`:""}.mp4`,m={media:void 0,src:this.embedController.embedFile(n),codec:chunkJHSFSCC2_cjs.d(this,i,y)[e.codec]??e.codec};s.push(m);}return s}connectedCallback(){super.connectedCallback(),typeof document<"u"&&this.autoplay==="scroll"&&document.addEventListener("scroll",chunkJHSFSCC2_cjs.g(this,i,v).bind(this));}disconnectedCallback(){super.disconnectedCallback(),typeof document<"u"&&this.autoplay==="scroll"&&document.removeEventListener("scroll",chunkJHSFSCC2_cjs.g(this,i,v).bind(this)),this._metricsInstance?.demonitor();}set muted(t){this._videoElement?this._videoElement.muted=t:this._queue.push(()=>this._videoElement.muted=t);}get muted(){return this._videoElement?.muted||false}get paused(){return this._videoElement?.paused??true}get duration(){return new Promise((t,s)=>{if(this._videoElement&&!isNaN(this._videoElement.duration))return t(this._videoElement.duration);let d=()=>{this._videoElement?.addEventListener("loadedmetadata",()=>{this._videoElement&&t(this._videoElement.duration);}),this._videoElement?.addEventListener("error",e=>{s(new Error("Failed to load video metadata."));});};this._videoElement?d():this.addEventListener("mave:video_element_ready",()=>{d();});})}set currentTime(t){this._videoElement?this._videoElement.currentTime=t:this._queue.push(()=>this._videoElement.currentTime=t);}get currentTime(){return this._videoElement?this._videoElement?.currentTime:0}play(){this._videoElement?chunkJHSFSCC2_cjs.g(this,i,p).call(this):this._queue.push(()=>chunkJHSFSCC2_cjs.g(this,i,p).call(this));}pause(){this._videoElement?this._videoElement.pause():this._queue.push(()=>this._videoElement?.pause());}render(){return chunk2E5GLLOS_cjs.a`
2
- ${this.embedController.render({complete:t=>{if(this._embed=t,!!t)return chunk2E5GLLOS_cjs.a`
3
- <video
4
- @click=${chunkJHSFSCC2_cjs.g(this,i,S)}
5
- preload="metadata"
6
- style=${chunkFAONFKQ2_cjs.a(this._failedPlay||this.autoplay==="off"?"cursor: pointer":void 0)}
7
- muted
8
- playsinline
9
- poster=${chunkFAONFKQ2_cjs.a(this._failedPlay?this.poster:void 0)}
10
- ${chunkBTCK3T4L_cjs.c(chunkJHSFSCC2_cjs.g(this,i,I))}
11
- ?autoplay=${this.autoplay==="always"}
12
- ?loop=${chunkJHSFSCC2_cjs.d(this,i,T)}
13
- >
14
- ${this.sources.map(s=>chunk2E5GLLOS_cjs.a`
15
- <source
16
- media=${chunkFAONFKQ2_cjs.a(s.media?`(min-width: ${s.media}px)`:void 0)}
17
- src=${s.src}
18
- type=${`video/mp4; ${s.codec}`}
19
- />
20
- `)}
21
- </video>
22
- `}})}
23
- `}};i=new WeakSet,v=function(){if(typeof window>"u")return;let{height:t,top:s,bottom:d}=this.getBoundingClientRect(),e=window.innerHeight;if(this._videoElement){this._videoElement.duration||this._videoElement.load();let n=0;if(s<e&&d>0){let m=t+e;n=(e-s)/m*this._videoElement.duration;}n>=0&&n<=this._videoElement.duration&&(this._videoElement.currentTime=n);}},c=function(){return ["sd","hd","fhd","qhd","uhd"]},u=function(){let t=navigator.userAgent,s=/Edg/.test(t)&&/Mac OS/.test(t),d=/Safari/.test(t)&&!/Chrome/.test(t),e=/Mac OS/.test(t),n=/iPhone|iPad/.test(t);return e&&(d||s)||n?["hevc","h264"]:["av1","h264"]},y=function(){return {av1:"av01.0.08M.08.0.110.01.01.01.0,opus",hevc:"hevc.01.00.78,mp4a.40.2",h264:"avc1.64.00.28,mp4a.40.2"}},M=function(){return [{size:"qhd",media:1280},{size:"fhd",media:1080},{size:"hd",media:720},{size:"sd",media:640}]},p=function(){this._metricsInstance?.monitor(),this._videoElement&&(this._videoElement.muted=true,this._videoElement.play().catch(t=>{this._failedPlay=true;}));},I=function(t){if(this._videoElement||(this._videoElement=t,this.dispatchEvent(new CustomEvent("mave:video_element_ready",{detail:this._videoElement,bubbles:true,composed:true}))),this._intersectionObserver.observe(this._videoElement),this._videoElement&&this._embed){chunkSDKTBB4N_cjs.a.forEach(d=>{this._videoElement?.addEventListener(d,e=>{!this._canPlay&&this.autoplay==="scroll"&&d==="canplay"&&(this._canPlay=true,chunkJHSFSCC2_cjs.g(this,i,v).call(this)),this.dispatchEvent(new CustomEvent(d,{detail:e,bubbles:true,composed:true}));});});({video_id:this._embed.video.id,space_id:this._embed.space_id});chunkBTCK3T4L_cjs.b.config={apiEndpoint:chunkEVKPEPYP_cjs.a.metrics.endpoint},chunkEVKPEPYP_cjs.a.metrics.enabled&&(this._metricsInstance=new chunkBTCK3T4L_cjs.b(this._videoElement,this.embed,{component:"clip"}));}this._queue.length&&(this._queue.forEach(s=>s()),this._queue=[]);},L=function(t){for(let{isIntersecting:s}of t){if(this.autoplay==="always")return;s&&(this.autoplay==="lazy"||this.autoplay==="true")?this._videoElement?.paused&&chunkJHSFSCC2_cjs.g(this,i,p).call(this):this._videoElement?.paused||this._videoElement?.pause();}},S=function(){(this.autoplay==="off"||this._failedPlay)&&(this._videoElement?.paused?chunkJHSFSCC2_cjs.g(this,i,p).call(this):this._videoElement?.pause());},T=function(){return this._loop!==void 0?this._loop:this.autoplay!=="off"},r.styles=chunkNPP5B5PV_cjs.a`
24
- :host {
25
- display: block;
26
- position: relative;
27
- overflow: hidden;
28
- }
29
-
30
- video {
31
- all: initial;
32
- display: block;
33
- width: 100%;
34
- height: 100%;
35
- object-fit: var(--clip-fit, cover);
36
- object-position: var(--clip-position, 50% 50%);
37
- }
38
- `,chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"embed",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"autoplay",2),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"quality",2),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"fallback",2),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"loop",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"poster",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.a()],r.prototype,"token",1),chunkJHSFSCC2_cjs.c([chunkDL4BV5IH_cjs.b()],r.prototype,"_failedPlay",2);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-clip")||window.customElements.define("mave-clip",r));exports.a=r;
@@ -1,186 +0,0 @@
1
- 'use strict';var chunk474VILDO_cjs=require('./chunk-474VILDO.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');function Le({anchor:t,floating:e,placement:i}){let n=Je({anchor:t,floating:e}),{x:s,y:l}=je(n,i);return {x:s,y:l}}function Je({anchor:t,floating:e}){return {anchor:Ve(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Ve(t,e){var i;let n=t.getBoundingClientRect(),s=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return {x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}function je({anchor:t,floating:e},i){let n=et(i)==="x"?"y":"x",s=n==="y"?"height":"width",l=Re(i),h=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,d=t[s]/2-e[s]/2,f;switch(l){case "top":f={x:h,y:t.y-e.height};break;case "bottom":f={x:h,y:t.y+t.height};break;case "right":f={x:t.x+t.width,y:c};break;case "left":f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y};}switch(i.split("-")[1]){case "start":f[n]-=d;break;case "end":f[n]+=d;break}return f}function Re(t){return t.split("-")[0]}function et(t){return ["top","bottom"].includes(Re(t))?"y":"x"}var We=new WeakMap,ie=t=>{let e=We.get(t);return e||We.set(t,e=new Set),e},He=new chunk474VILDO_cjs.o.ResizeObserver(t=>{for(let e of t)for(let i of ie(e.target))i(e);});function L(t,e){ie(t).add(e),He.observe(t);}function R(t,e){let i=ie(t);i.delete(e),i.size||He.unobserve(t);}var fe=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},o=(t,e,i)=>(fe(t,e,"read from private field"),i?i.call(t):e.get(t)),a=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i);},p=(t,e,i,n)=>(fe(t,e,"write to private field"),e.set(t,i),i),r=(t,e,i)=>(fe(t,e,"access private method"),i),v,w,x,z,N,E,O,ne,Oe,Z,pe,F,K,se,oe,De,ae,Pe,re,qe,I,C,M,D,Y,ve,le,$e,ge,Be,he,ze,be,Ne,de,Ke,ce,Ue,W,G,ue,Ze,H,Q,U,me;function Fe({type:t,text:e,value:i,checked:n}){let s=chunk474VILDO_cjs.p.createElement("media-chrome-menu-item");s.type=t??"",s.part.add("menu-item"),t&&s.part.add(t),s.value=i,s.checked=n;let l=chunk474VILDO_cjs.p.createElement("span");return l.textContent=e,s.append(l),s}function Ye(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:true})[0]),i)return i=i.cloneNode(true),i;let n=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return n?n.cloneNode(true):""}function tt(t){return `
2
- <style>
3
- :host {
4
- font: var(--media-font,
5
- var(--media-font-weight, normal)
6
- var(--media-font-size, 14px) /
7
- var(--media-text-content-height, var(--media-control-height, 24px))
8
- var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
9
- color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
10
- --_menu-bg: rgb(20 20 30 / .8);
11
- background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
12
- border-radius: var(--media-menu-border-radius);
13
- border: var(--media-menu-border, none);
14
- display: var(--media-menu-display, inline-flex) !important;
15
-
16
- transition: var(--media-menu-transition-in,
17
- visibility 0s,
18
- opacity .2s ease-out,
19
- transform .15s ease-out,
20
- left .2s ease-in-out,
21
- min-width .2s ease-in-out,
22
- min-height .2s ease-in-out
23
- ) !important;
24
-
25
- visibility: var(--media-menu-visibility, visible);
26
- opacity: var(--media-menu-opacity, 1);
27
- max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
28
- transform: var(--media-menu-transform-in, translateY(0) scale(1));
29
- flex-direction: column;
30
-
31
- min-height: 0;
32
- position: relative;
33
- bottom: var(--_menu-bottom);
34
- box-sizing: border-box;
35
- }
36
-
37
- @-moz-document url-prefix() {
38
- :host{
39
- --_menu-bg: rgb(20 20 30);
40
- }
41
- }
42
-
43
- :host([hidden]) {
44
- transition: var(--media-menu-transition-out,
45
- visibility .15s ease-in,
46
- opacity .15s ease-in,
47
- transform .15s ease-in
48
- ) !important;
49
- visibility: var(--media-menu-hidden-visibility, hidden);
50
- opacity: var(--media-menu-hidden-opacity, 0);
51
- max-height: var(--media-menu-hidden-max-height,
52
- var(--media-menu-max-height, var(--_menu-max-height, 300px)));
53
- transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
54
- pointer-events: none;
55
- }
56
-
57
- :host([slot="submenu"]) {
58
- background: none;
59
- width: 100%;
60
- min-height: 100%;
61
- position: absolute;
62
- bottom: 0;
63
- right: -100%;
64
- }
65
-
66
- #container {
67
- display: flex;
68
- flex-direction: column;
69
- min-height: 0;
70
- transition: transform .2s ease-out;
71
- transform: translate(0, 0);
72
- }
73
-
74
- #container.has-expanded {
75
- transition: transform .2s ease-in;
76
- transform: translate(-100%, 0);
77
- }
78
-
79
- button {
80
- background: none;
81
- color: inherit;
82
- border: none;
83
- padding: 0;
84
- font: inherit;
85
- outline: inherit;
86
- display: inline-flex;
87
- align-items: center;
88
- }
89
-
90
- slot[name="header"][hidden] {
91
- display: none;
92
- }
93
-
94
- slot[name="header"] > *,
95
- slot[name="header"]::slotted(*) {
96
- padding: .4em .7em;
97
- border-bottom: 1px solid rgb(255 255 255 / .25);
98
- cursor: var(--media-cursor, default);
99
- }
100
-
101
- slot[name="header"] > button[part~="back"],
102
- slot[name="header"]::slotted(button[part~="back"]) {
103
- cursor: var(--media-cursor, pointer);
104
- }
105
-
106
- svg[part~="back"] {
107
- height: var(--media-menu-icon-height, var(--media-control-height, 24px));
108
- fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
109
- display: block;
110
- margin-right: .5ch;
111
- }
112
-
113
- slot:not([name]) {
114
- gap: var(--media-menu-gap);
115
- flex-direction: var(--media-menu-flex-direction, column);
116
- overflow: var(--media-menu-overflow, hidden auto);
117
- display: flex;
118
- min-height: 0;
119
- }
120
-
121
- :host([role="menu"]) slot:not([name]) {
122
- padding-block: .4em;
123
- }
124
-
125
- slot:not([name])::slotted([role="menu"]) {
126
- background: none;
127
- }
128
-
129
- media-chrome-menu-item > span {
130
- margin-right: .5ch;
131
- max-width: var(--media-menu-item-max-width);
132
- text-overflow: ellipsis;
133
- overflow: hidden;
134
- }
135
- </style>
136
- <style id="layout-row" media="width:0">
137
-
138
- slot[name="header"] > *,
139
- slot[name="header"]::slotted(*) {
140
- padding: .4em .5em;
141
- }
142
-
143
- slot:not([name]) {
144
- gap: var(--media-menu-gap, .25em);
145
- flex-direction: var(--media-menu-flex-direction, row);
146
- padding-inline: .5em;
147
- }
148
-
149
- media-chrome-menu-item {
150
- padding: .3em .5em;
151
- }
152
-
153
- media-chrome-menu-item[aria-checked="true"] {
154
- background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
155
- }
156
-
157
-
158
- media-chrome-menu-item::part(checked-indicator) {
159
- display: var(--media-menu-item-checked-indicator-display, none);
160
- }
161
- </style>
162
- <div id="container" part="container">
163
- <slot name="header" hidden>
164
- <button part="back button" aria-label="Back to previous menu">
165
- <slot name="back-icon">
166
- <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
167
- <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
168
- </svg>
169
- </slot>
170
- <slot name="title"></slot>
171
- </button>
172
- </slot>
173
- <slot></slot>
174
- </div>
175
- <slot name="checked-indicator" hidden></slot>
176
- `}var _={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},S=class extends chunk474VILDO_cjs.o.HTMLElement{constructor(){if(super(),a(this,ne),a(this,Z),a(this,K),a(this,oe),a(this,ae),a(this,re),a(this,M),a(this,Y),a(this,le),a(this,ge),a(this,he),a(this,be),a(this,de),a(this,ce),a(this,W),a(this,ue),a(this,H),a(this,U),a(this,v,null),a(this,w,null),a(this,x,null),a(this,z,new Set),a(this,N,void 0),a(this,E,false),a(this,O,null),a(this,F,()=>{let e=o(this,z),i=new Set(this.items);for(let n of e)i.has(n)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:n}));for(let n of i)e.has(n)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:n}));p(this,z,i);}),a(this,I,()=>{r(this,M,D).call(this),r(this,Y,ve).call(this,false);}),a(this,C,()=>{r(this,M,D).call(this);}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=chunk474VILDO_cjs.q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e);}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),p(this,N,new MutationObserver(o(this,F))),o(this,N).observe(this.defaultSlot,{childList:true});}static get observedAttributes(){return [_.DISABLED,_.HIDDEN,_.STYLE,_.ANCHOR,chunk474VILDO_cjs.b.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this);}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this);}handleEvent(e){switch(e.type){case "slotchange":r(this,ne,Oe).call(this,e);break;case "invoke":r(this,oe,De).call(this,e);break;case "click":r(this,le,$e).call(this,e);break;case "toggle":r(this,he,ze).call(this,e);break;case "focusout":r(this,de,Ke).call(this,e);break;case "keydown":r(this,ce,Ue).call(this,e);break}}connectedCallback(){var e,i;p(this,O,chunk474VILDO_cjs.C(this.shadowRoot,":host")),r(this,K,se).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),p(this,v,chunk474VILDO_cjs.s(this)),(i=(e=o(this,v))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(L(P(this),o(this,I)),L(this,o(this,C))),r(this,Z,pe).call(this);}disconnectedCallback(){var e,i;R(P(this),o(this,I)),R(this,o(this,C)),this.disable(),(i=(e=o(this,v))==null?void 0:e.unassociateElement)==null||i.call(e,this),p(this,v,null);}attributeChangedCallback(e,i,n){var s,l,h,c;e===_.HIDDEN&&n!==i?(o(this,E)||p(this,E,true),this.hidden?r(this,re,qe).call(this):r(this,ae,Pe).call(this),this.dispatchEvent(new chunk474VILDO_cjs.L({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:true}))):e===chunk474VILDO_cjs.b.MEDIA_CONTROLLER?(i&&((l=(s=o(this,v))==null?void 0:s.unassociateElement)==null||l.call(s,this),p(this,v,null)),n&&this.isConnected&&(p(this,v,chunk474VILDO_cjs.s(this)),(c=(h=o(this,v))==null?void 0:h.associateElement)==null||c.call(h,this))):e===_.DISABLED&&n!==i?n==null?this.enable():this.disable():e===_.STYLE&&n!==i&&r(this,K,se).call(this);}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`);}get anchorElement(){var e;return this.anchor?(e=chunk474VILDO_cjs.y(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:true}).filter(it)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return (i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(n=>n.value===e);i&&r(this,U,me).call(this,i);}focus(){if(p(this,w,chunk474VILDO_cjs.x()),this.items.length){r(this,H,Q).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus();}handleSelect(e){var i;let n=r(this,W,G).call(this,e);n&&(r(this,U,me).call(this,n,n.type==="checkbox"),o(this,x)&&!this.hidden&&((i=o(this,w))==null||i.focus(),this.hidden=true));}get keysUsed(){return ["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,n;let{key:s}=e,l=this.items,h=(n=(i=r(this,W,G).call(this,e))!=null?i:r(this,ue,Ze).call(this))!=null?n:l[0],c=l.indexOf(h),d=Math.max(0,c);s==="ArrowDown"?d++:s==="ArrowUp"?d--:e.key==="Home"?d=0:e.key==="End"&&(d=l.length-1),d<0&&(d=l.length-1),d>l.length-1&&(d=0),r(this,H,Q).call(this,l[d]),l[d].focus();}};v=new WeakMap;w=new WeakMap;x=new WeakMap;z=new WeakMap;N=new WeakMap;E=new WeakMap;O=new WeakMap;ne=new WeakSet;Oe=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:true}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&r(this,Z,pe).call(this),e.name||o(this,F).call(this);};Z=new WeakSet;pe=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0;};F=new WeakMap;K=new WeakSet;se=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0");};oe=new WeakSet;De=function(t){p(this,x,t.relatedTarget),chunk474VILDO_cjs.v(this,t.relatedTarget)||(this.hidden=!this.hidden);};ae=new WeakSet;Pe=function(){var t;(t=o(this,x))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:true}),L(P(this),o(this,I)),L(this,o(this,C));};re=new WeakSet;qe=function(){var t;(t=o(this,x))==null||t.setAttribute("aria-expanded","false"),R(P(this),o(this,I)),R(this,o(this,C));};I=new WeakMap;C=new WeakMap;M=new WeakSet;D=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=Le({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);let s=P(this).getBoundingClientRect(),l=s.width-e-t,h=s.height-i-this.offsetHeight,{style:c}=o(this,O);c.setProperty("position","absolute"),c.setProperty("right",`${Math.max(0,l)}px`),c.setProperty("--_menu-bottom",`${h}px`);let d=getComputedStyle(this),Qe=c.getPropertyValue("--_menu-bottom")===d.bottom?h:parseFloat(d.bottom),Xe=s.height-Qe-parseFloat(d.marginBottom);this.style.setProperty("--_menu-max-height",`${Xe}px`);};Y=new WeakSet;ve=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:n}=o(this,O);if(t||n.setProperty("--media-menu-transition-in","none"),i){let s=i.offsetHeight,l=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${l}px`),this.style.setProperty("min-height",`${s}px`),r(this,M,D).call(this,l);}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),r(this,M,D).call(this);n.removeProperty("--media-menu-transition-in");};le=new WeakSet;$e=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(o(this,ge,Be))){(e=o(this,w))==null||e.focus(),this.hidden=true;return}let i=r(this,W,G).call(this,t);!i||i.hasAttribute("disabled")||(r(this,H,Q).call(this,i),this.handleSelect(t));};ge=new WeakSet;Be=function(){var t;return (t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:true}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};he=new WeakSet;ze=function(t){if(t.target===this)return;r(this,be,Ne).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new chunk474VILDO_cjs.K({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);r(this,Y,ve).call(this,true);};be=new WeakSet;Ne=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e);};de=new WeakSet;Ke=function(t){var e;chunk474VILDO_cjs.v(this,t.relatedTarget)||(o(this,E)&&((e=o(this,w))==null||e.focus()),o(this,x)&&o(this,x)!==t.relatedTarget&&!this.hidden&&(this.hidden=true));};ce=new WeakSet;Ue=function(t){var e,i,n,s,l;let{key:h,ctrlKey:c,altKey:d,metaKey:f}=t;if(!(c||d||f)&&this.keysUsed.includes(h))if(t.preventDefault(),t.stopPropagation(),h==="Tab"){if(o(this,E)){this.hidden=true;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(s=(n=this.nextElementSibling)==null?void 0:n.focus)==null||s.call(n),this.blur();}else h==="Escape"?((l=o(this,w))==null||l.focus(),o(this,E)&&(this.hidden=true)):h==="Enter"||h===" "?this.handleSelect(t):this.handleMove(t);};W=new WeakSet;G=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};ue=new WeakSet;Ze=function(){return this.items.find(t=>t.tabIndex===0)};H=new WeakSet;Q=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1;};U=new WeakSet;me=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(n=>n.checked=false),e?t.checked=!t.checked:t.checked=true,this.checkedItems.some((n,s)=>n!=i[s])&&this.dispatchEvent(new Event("change",{bubbles:true,composed:true}));};S.shadowRootOptions={mode:"open"};S.getTemplateHTML=tt;function it(t){return ["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function P(t){var e;return (e=t.getAttribute("bounds")?chunk474VILDO_cjs.w(t,`#${t.getAttribute("bounds")}`):chunk474VILDO_cjs.r(t)||t.parentElement)!=null?e:t}chunk474VILDO_cjs.o.customElements.get("media-chrome-menu")||chunk474VILDO_cjs.o.customElements.define("media-chrome-menu",S);var nt=`<svg aria-hidden="true" viewBox="0 0 24 24">
177
- <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
178
- <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
179
- </svg>`,k,g,b,ye,q,B,ke=class extends S{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,b);chunkJHSFSCC2_cjs.e(this,k,[]);chunkJHSFSCC2_cjs.e(this,g);chunkJHSFSCC2_cjs.e(this,B,()=>{let i=this.value??chunkJHSFSCC2_cjs.d(this,g);i!=null&&(chunkJHSFSCC2_cjs.f(this,g,String(i)),this.dispatchEvent(new chunk474VILDO_cjs.o.CustomEvent(chunk474VILDO_cjs.a.MEDIA_AUDIO_TRACK_REQUEST,{detail:chunkJHSFSCC2_cjs.d(this,g),composed:true,bubbles:true})),chunkJHSFSCC2_cjs.g(this,b,q).call(this));});}get tracks(){return chunkJHSFSCC2_cjs.d(this,k)}set tracks(i){chunkJHSFSCC2_cjs.f(this,k,[...i??[]]),chunkJHSFSCC2_cjs.g(this,b,ye).call(this);}get selected(){return chunkJHSFSCC2_cjs.d(this,g)}set selected(i){chunkJHSFSCC2_cjs.f(this,g,i??void 0),chunkJHSFSCC2_cjs.g(this,b,q).call(this);}connectedCallback(){super.connectedCallback(),this.addEventListener("change",chunkJHSFSCC2_cjs.d(this,B)),chunkJHSFSCC2_cjs.g(this,b,ye).call(this),chunkJHSFSCC2_cjs.g(this,b,q).call(this);}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",chunkJHSFSCC2_cjs.d(this,B));}};k=new WeakMap,g=new WeakMap,b=new WeakSet,ye=function(){let i=this.defaultSlot;if(i){i.textContent="";for(let n of chunkJHSFSCC2_cjs.d(this,k)){let s=Fe({type:"radio",text:n.label??n.language??"",value:n.id,checked:!!n.enabled});s.prepend(Ye(this,"checked-indicator")),i.append(s);}chunkJHSFSCC2_cjs.g(this,b,q).call(this);}},q=function(){let i=chunkJHSFSCC2_cjs.d(this,k).find(h=>h.enabled)??(chunkJHSFSCC2_cjs.d(this,k).length?chunkJHSFSCC2_cjs.d(this,k)[0]:void 0),n=chunkJHSFSCC2_cjs.d(this,g)??i?.id;chunkJHSFSCC2_cjs.f(this,g,n);let l=this.defaultSlot?.querySelectorAll("media-chrome-menu-item")??this.querySelectorAll("media-chrome-menu-item");for(let h of Array.from(l))"checked"in h&&"value"in h&&(h.checked=h.value===n);n!=null?this.value=n:(this.value="",this.removeAttribute("value"));},B=new WeakMap;var X,Ge,$=class extends chunk474VILDO_cjs.M{constructor(){super(...arguments);chunkJHSFSCC2_cjs.e(this,X);}connectedCallback(){super.connectedCallback(),chunkJHSFSCC2_cjs.g(this,X,Ge).call(this);}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:this.closest("media-controller, mave-player")?.querySelector("mave-audio-track-menu")??null}};X=new WeakSet,Ge=function(){let i=chunk474VILDO_cjs.n("audio tracks");this.setAttribute("aria-label",i);},$.getSlotTemplateHTML=()=>`
180
- <style>
181
- :host([aria-expanded="true"]) slot[name='tooltip'] {
182
- display: none;
183
- }
184
- </style>
185
- <slot name="icon">${nt}</slot>
186
- `,$.getTooltipContentHTML=()=>chunk474VILDO_cjs.n("audio tracks");chunk474VILDO_cjs.o.customElements.get("mave-audio-track-menu")||chunk474VILDO_cjs.o.customElements.define("mave-audio-track-menu",ke);chunk474VILDO_cjs.o.customElements.get("mave-audio-track-menu-button")||chunk474VILDO_cjs.o.customElements.define("mave-audio-track-menu-button",$);exports.a=L;exports.b=R;exports.c=Fe;exports.d=Ye;exports.e=S;exports.f=ke;exports.g=$;
@@ -1 +0,0 @@
1
- var e=["audioprocess","canplay","canplaythrough","complete","duration_change","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"];export{e as a};
@@ -1,9 +0,0 @@
1
- var T={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_=r=>(...t)=>({_$litDirective$:r,values:t}),s=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/*! Bundled license information:
2
-
3
- lit-html/directive.js:
4
- (**
5
- * @license
6
- * Copyright 2017 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
- */export{T as a,_ as b,s as c};
@@ -1,20 +0,0 @@
1
- import {a as a$2}from'./chunk-SWRFZ3FV.js';import {b}from'./chunk-OX42Y2HR.js';import {a as a$1}from'./chunk-PTN427IG.js';import {a as a$3}from'./chunk-5PIHL662.js';import {a}from'./chunk-YPCQNE3R.js';import {c,e,g as g$1}from'./chunk-KA24PL7V.js';var i,l,C,R,g,v,w,z,L,U,F,y,f=class extends a$2{constructor(){super(...arguments);e(this,i);this.embedController=new b(this);}get embed(){return this._embed}set embed(e){this._embed!==e&&(this._embed=e,this.requestUpdate("embed"),this.embedController.embed=this.embed);}get _slottedChildren(){return this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:true})||[]}render(){return a$3`
2
- ${this.embedController.render({pending:this.renderPending,complete:e=>{if(this._data=e,!e)return;let n=g$1(this,i,U).call(this),t=g$1(this,i,F).call(this),o=this._slottedChildren.map(a=>{function h(){let s;return a.nodeName==="TEMPLATE"?s=a.content.cloneNode(true):s=a.cloneNode(true),s}if(a.getAttribute("name")=="mave-files-video"){if(!n)return;let s=h(),d=Number(this._data.created_at),m=d&&d<1e12?d*1e3:d;Number.isFinite(m)&&g$1(this,i,l).call(this,s,"date",new Date(m).toLocaleDateString().replaceAll("/","-"));let p=this._data.video.duration;p&&g$1(this,i,l).call(this,s,"duration",this.durationToTime(p));let u=this._data.video.filetype;u&&g$1(this,i,l).call(this,s,"filetype",u);let k=n.file_size||this._data.video.size;k&&g$1(this,i,l).call(this,s,"size",g$1(this,i,v).call(this,k));let M=g$1(this,i,z).call(this,n),S=n.container||"mp4",b=g$1(this,i,g).call(this,M,`${this._data.name}.${S}`);return b.setAttribute("aria-label","Download video"),b.appendChild(s),a$3`${b}`}if(t&&a.getAttribute("name")=="mave-files-audio"){let s=h(),d=t.codec||g$1(this,i,y).call(this,t.filename)||"mp3";g$1(this,i,l).call(this,s,"filetype",d);let m=t.file_size;m&&g$1(this,i,l).call(this,s,"size",g$1(this,i,v).call(this,m));let p=g$1(this,i,L).call(this,t),u=g$1(this,i,g).call(this,p,t.filename||`${this._data.name}.${d}`);return u.setAttribute("aria-label","Download audio"),u.appendChild(s),a$3`${u}`}let _=this._data.subtitles.find(s=>s.language==this._data.video.language);if(_&&a.getAttribute("name")=="mave-files-subtitles"){let s=h();g$1(this,i,l).call(this,s,"filetype","vtt");let d=g$1(this,i,g).call(this,_.path,`${this._data.name}.vtt`);return d.setAttribute("aria-label","Download subtitles"),d.appendChild(s),a$3`${d}`}});return a$3`${this._stylesheets} ${o}`}})}
3
- `}renderPending(){return a$3`<slot style="display: none"></slot>`}};i=new WeakSet,l=function(e,n,t){let o=e.querySelector(`[slot="${n}"], [data-slot="${n}"]`);o&&(o.textContent=t,o.removeAttribute("slot"),o.removeAttribute("data-slot"));},C=function(e,n){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.style.display="none",o.href=t,o.download=n,this.appendChild(o),o.click(),window.URL.revokeObjectURL(t),this.removeChild(o);},R=function(e,n){return fetch(e).then(t=>{if(!t.ok)throw new Error("Network response was not ok");return t.blob()}).then(t=>g$1(this,i,C).call(this,t,n)).catch(t=>console.error("Something went wrong:",t))},g=function(e,n){let t=document.createElement("a");t.classList.add("link"),t.setAttribute("href",e),t.setAttribute("download",n),t.setAttribute("target","new");let o=false;return t.addEventListener("click",a=>{a.preventDefault(),!o&&(o=true,t.style.cursor="wait",t.style.opacity="0.5",g$1(this,i,R).call(this,e,n).then(()=>{o=false,t.style.cursor="pointer",t.style.opacity="1";}));}),t},v=function(e){let n=e/1e6;if(n<10)return `${n.toFixed(1)} MB`;let t=n%1!==0;return `${n.toFixed(t?1:0)} MB`},w=function(e){let n=this._data?.video?.version&&this._data.video.version>0?`v${this._data.video.version}/`:"";return `${this.cdn_root}/${this.embedId}/${n}${e}`},z=function(e){let n=e?.codec||"h264",t=e?.size||"hd",o=e?.container||"mp4";return g$1(this,i,w).call(this,`${n}_${t}.${o}`)},L=function(e){if(e?.path)return e.path;let n=e?.codec||g$1(this,i,y).call(this,e?.filename||"")||"mp3";return g$1(this,i,w).call(this,`audio.${n}`)},U=function(){let e=this._data?.video?.renditions||[];if(!e.length)return;let n=e.filter(o=>o.container==="mp4"&&o.codec==="h264"&&(!o.type||o.type==="video")),t=["hd","fhd","sd","qhd","uhd"];for(let o of t){let a=n.find(h=>h.size===o);if(a)return a}return n[0]||e.find(o=>o.type==="video")},F=function(){let e=this._data?.audio_tracks||[];if(e.length)return e.find(n=>n.default)||e[0]},y=function(e){if(!e)return;let n=e.split(".");return n.length>1?n.pop():void 0},f.styles=a`
4
- :host {
5
- display: block;
6
- --link-color: #006fc6;
7
- --link-decoration: underline;
8
- --link-decoration-thickness: 1px;
9
- --link-decoration-offset: 1px;
10
- --link-cursor: pointer;
11
- }
12
-
13
- a {
14
- text-decoration: var(--link-decoration);
15
- text-decoration-thickness: var(--link-decoration-thickness);
16
- text-underline-offset: var(--link-decoration-thickness);
17
- color: var(--link-color);
18
- cursor: var(--link-cursor);
19
- }
20
- `,c([a$1({type:String})],f.prototype,"embed",1);typeof window<"u"&&window.customElements&&(window.customElements.get("mave-files")||window.customElements.define("mave-files",f));export{f as a};
@@ -1,16 +0,0 @@
1
- 'use strict';var d=globalThis,u=d.ShadowRoot&&(d.ShadyCSS===void 0||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),E=new WeakMap,l=class{constructor(t,e,s){if(this._$cssResult$=true,s!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o,e=this.t;if(u&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=E.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&E.set(e,t));}return t}toString(){return this.cssText}},_=r=>new l(typeof r=="string"?r:r+"",void 0,f),v=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===true)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.")})(i)+r[o+1],r[0]);return new l(e,r,f)},$=(r,t)=>{if(u)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=d.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s);}},S=u?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return _(e)})(r):r;var {is:w,defineProperty:P,getOwnPropertyDescriptor:C,getOwnPropertyNames:U,getOwnPropertySymbols:A,getPrototypeOf:O}=Object,a=globalThis,m=a.trustedTypes,R=m?m.emptyScript:"",M=a.reactiveElementPolyfillSupport,p=(r,t)=>r,y={toAttribute(r,t){switch(t){case Boolean:r=r?R:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r);}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r);}catch{e=null;}}return e}},b=(r,t)=>!w(r,t),g={attribute:true,type:String,converter:y,reflect:false,useDefault:false,hasChanged:b};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),a.litPropertyMetadata??(a.litPropertyMetadata=new WeakMap);var c=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=g){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&P(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){let{get:i,set:o}=C(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n;}};return {get:i,set(n){let h=i?.call(this);o?.call(this,n),this.requestUpdate(t,h,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??g}static _$Ei(){if(this.hasOwnProperty(p("elementProperties")))return;let t=O(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(p("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(p("properties"))){let e=this.properties,s=[...U(e),...A(e)];for(let i of s)this.createProperty(i,e[i]);}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i);}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(S(i));}else t!==void 0&&e.push(S(t));return e}static _$Eu(t,e){let s=e.attribute;return s===false?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t);}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,e,s){this._$AK(t,s);}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===true){let o=(s.converter?.toAttribute!==void 0?s.converter:y).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null;}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:y;this._$Em=i;let h=n.fromAttribute(e,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null;}}requestUpdate(t,e,s,i=false,o){if(t!==void 0){let n=this.constructor;if(i===false&&(o=this[t]),s??(s=n.getPropertyOptions(t)),!((s.hasChanged??b)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s);}this.isUpdatePending===false&&(this._$ES=this._$EP());}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==true||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===true&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0;}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,o]of s){let{wrapped:n}=o,h=this[i];n!==true||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h);}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(e);}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM();}updated(t){}firstUpdated(t){}};c.elementStyles=[],c.shadowRootOptions={mode:"open"},c[p("elementProperties")]=new Map,c[p("finalized")]=new Map,M?.({ReactiveElement:c}),(a.reactiveElementVersions??(a.reactiveElementVersions=[])).push("2.1.2");/*! Bundled license information:
2
-
3
- @lit/reactive-element/css-tag.js:
4
- (**
5
- * @license
6
- * Copyright 2019 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
-
10
- @lit/reactive-element/reactive-element.js:
11
- (**
12
- * @license
13
- * Copyright 2017 Google LLC
14
- * SPDX-License-Identifier: BSD-3-Clause
15
- *)
16
- */exports.a=v;exports.b=y;exports.c=b;exports.d=c;
@@ -1 +0,0 @@
1
- import {a as a$2}from'./chunk-2JCNQPEK.js';import {a as a$1}from'./chunk-QFF6OUH6.js';import {a as a$3}from'./chunk-ZTDQPDC6.js';var c=(t=>(t[t.Collection=0]="Collection",t[t.Embed=1]="Embed",t))(c||{}),a=class{constructor(e,t=1){this.caching=true;this.loading=true;this.host=e,this.type=t,this.loading=true,this.task=new a$1(this.host,async()=>{try{if(this.type==1&&!this.embed)return;if(this.type==0&&!this.token){console.warn("No token attr provided for mave-list");return}let i=await(await fetch(this.manifest_url)).json();return this.loading=!1,this.type==1?(this._embedData=i,this.version=this._embedData.video?.version||0,this._embedData):i}catch(s){throw console.log(s),new Error(`Failed to fetch "${this.embed}"`)}},()=>[this.embed]);}get manifest_url(){if(this.type==1)return this.embedFile("manifest.json");{let e=new URL(`${a$2}/collection/${this.token}`);return this.embed&&this.embed?.length>1&&e.searchParams.append("embed",this.embed),e.toString()}}set embed(e){this._embed!=e&&(this._embed=e,this.loading=true,this.host.requestUpdate());}get embed(){return this._embed}set token(e){this._token!=e&&(this._token=e,this.host.requestUpdate());}get token(){return this._token}get spaceId(){return this.embed?.substring(0,5)}get embedId(){return this.embed?.substring(5,this.embed?.length)}get version(){return this._version?`/v${this._version}/`:"/"}set version(e){this._version!=e&&(this._version=e,this.host.requestUpdate());}get cdnRoot(){return a$3.cdn.endpoint.replace("${this.spaceId}",this.spaceId)}refresh(){return this.loading=true,this.task?.run()}embedFile(e,t=new URLSearchParams){let s=new URL(`${this.cdnRoot}/${this.embedId}${e=="manifest.json"?"/":this.version}${e}`);if(e.includes("?")){let[i,h]=e.split("?");new URLSearchParams(h).forEach((d,m)=>{t.append(m,d);});}return this.token&&t.append("token",this.token),e=="manifest.json"&&(t.has("e")&&t.delete("e"),t.append("e",new Date().getTime().toString())),e!=="manifest.json"&&!this.caching&&(t.has("e")||t.append("e",new Date().getTime().toString())),s.search=t.toString(),s.toString()}render(e){return this.task?.render(e)}};export{c as a,a as b};
@@ -1 +0,0 @@
1
- function e(){return typeof document>"u"?"":new URL(import.meta.url).pathname.includes("+esm")?"dist/":""}export{e as a};
@@ -1,24 +0,0 @@
1
- import {c,b as b$1}from'./chunk-YPCQNE3R.js';var f={attribute:true,type:String,converter:b$1,reflect:false,hasChanged:c},h=(e=f,o,t)=>{let{kind:a,metadata:c}=t,i=globalThis.litPropertyMetadata.get(c);if(i===void 0&&globalThis.litPropertyMetadata.set(c,i=new Map),a==="setter"&&((e=Object.create(e)).wrapped=true),i.set(t.name,e),a==="accessor"){let{name:n}=t;return {set(s){let r=o.get.call(this);o.set.call(this,s),this.requestUpdate(n,r,e,true,s);},init(s){return s!==void 0&&this.C(n,void 0,e,s),s}}}if(a==="setter"){let{name:n}=t;return function(s){let r=this[n];o.call(this,s),this.requestUpdate(n,r,e,true,s);}}throw Error("Unsupported decorator location: "+a)};function d(e){return (o,t)=>typeof t=="object"?h(e,o,t):((a,c,i)=>{let n=c.hasOwnProperty(i);return c.constructor.createProperty(i,a),n?Object.getOwnPropertyDescriptor(c,i):void 0})(e,o,t)}function b(e){return d({...e,state:true,attribute:false})}var u=(e,o,t)=>(t.configurable=true,t.enumerable=true,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(e,o,t),t);function E(e,o){return (t,a,c)=>{let i=n=>n.renderRoot?.querySelector(e)??null;if(o){let{get:n,set:s}=typeof a=="object"?t:c??(()=>{let r=Symbol();return {get(){return this[r]},set(m){this[r]=m;}}})();return u(t,a,{get(){let r=n.call(this);return r===void 0&&(r=i(this),(r!==null||this.hasUpdated)&&s.call(this,r)),r}})}return u(t,a,{get(){return i(this)}})}}/*! Bundled license information:
2
-
3
- @lit/reactive-element/decorators/property.js:
4
- @lit/reactive-element/decorators/state.js:
5
- @lit/reactive-element/decorators/base.js:
6
- @lit/reactive-element/decorators/query.js:
7
- @lit/reactive-element/decorators/custom-element.js:
8
- @lit/reactive-element/decorators/event-options.js:
9
- @lit/reactive-element/decorators/query-all.js:
10
- @lit/reactive-element/decorators/query-async.js:
11
- @lit/reactive-element/decorators/query-assigned-nodes.js:
12
- (**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
-
18
- @lit/reactive-element/decorators/query-assigned-elements.js:
19
- (**
20
- * @license
21
- * Copyright 2021 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- *)
24
- */export{d as a,b,E as c};
@@ -1,9 +0,0 @@
1
- import {c}from'./chunk-YPCQNE3R.js';var n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s;})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??true,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.());}hostUpdate(){this.autoRun===true&&this.S();}hostUpdated(){this.autoRun==="afterUpdate"&&this.S();}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t);}async run(t){let s,r;t??(t=this.T()),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=false;try{s=await this.v(t,{signal:this.q.signal});}catch(l){a=true,r=l;}if(this.p===i){if(s===n)this.i=0;else {if(a===false){try{this.k?.(s);}catch{}this.i=2,this.o?.(s);}else {try{this.A?.(r);}catch{}this.i=3,this.h?.(r);}this.u=s,this.l=r;}this._.requestUpdate();}}abort(t){this.i===1&&this.q?.abort(t);}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!c(s,t[r])));/*! Bundled license information:
2
-
3
- @lit/task/task.js:
4
- (**
5
- * @license
6
- * Copyright 2017 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
- */export{e as a};
@@ -1,9 +0,0 @@
1
- 'use strict';var chunkNPP5B5PV_cjs=require('./chunk-NPP5B5PV.cjs');var n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s;})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??true,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.());}hostUpdate(){this.autoRun===true&&this.S();}hostUpdated(){this.autoRun==="afterUpdate"&&this.S();}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t);}async run(t){let s,r;t??(t=this.T()),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=false;try{s=await this.v(t,{signal:this.q.signal});}catch(l){a=true,r=l;}if(this.p===i){if(s===n)this.i=0;else {if(a===false){try{this.k?.(s);}catch{}this.i=2,this.o?.(s);}else {try{this.A?.(r);}catch{}this.i=3,this.h?.(r);}this.u=s,this.l=r;}this._.requestUpdate();}}abort(t){this.i===1&&this.q?.abort(t);}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!chunkNPP5B5PV_cjs.c(s,t[r])));/*! Bundled license information:
2
-
3
- @lit/task/task.js:
4
- (**
5
- * @license
6
- * Copyright 2017 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
- */exports.a=e;
@@ -1,9 +0,0 @@
1
- 'use strict';var chunkRRCW5BBR_cjs=require('./chunk-RRCW5BBR.cjs'),chunk2E5GLLOS_cjs=require('./chunk-2E5GLLOS.cjs');var u="important",d=" !"+u,h=chunkRRCW5BBR_cjs.b(class extends chunkRRCW5BBR_cjs.c{constructor(s){if(super(s),s.type!==chunkRRCW5BBR_cjs.a.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((n,t)=>{let e=s[t];return e==null?n:n+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(s,[n]){let{style:t}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(let e of this.ft)n[e]==null&&(this.ft.delete(e),e.includes("-")?t.removeProperty(e):t[e]=null);for(let e in n){let r=n[e];if(r!=null){this.ft.add(e);let i=typeof r=="string"&&r.endsWith(d);e.includes("-")||i?t.setProperty(e,i?r.slice(0,-11):r,i?u:""):t[e]=r;}}return chunk2E5GLLOS_cjs.d}});/*! Bundled license information:
2
-
3
- lit-html/directives/style-map.js:
4
- (**
5
- * @license
6
- * Copyright 2018 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
- */exports.a=h;
@@ -1,9 +0,0 @@
1
- import {e as e$1}from'./chunk-5PIHL662.js';var e=t=>t??e$1;/*! Bundled license information:
2
-
3
- lit-html/directives/if-defined.js:
4
- (**
5
- * @license
6
- * Copyright 2018 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
- */export{e as a};
@@ -1,24 +0,0 @@
1
- import {b as b$1,c as c$1,a as a$1}from'./chunk-MMHEOMF5.js';import {f as f$1,e}from'./chunk-5PIHL662.js';var fe=class{constructor(e,{target:s,config:r,callback:d,skipInitial:y}){this.t=new Set,this.o=false,this.i=false,this.h=e,s!==null&&this.t.add(s??e),this.o=y??this.o,this.callback=d,window.IntersectionObserver?(this.u=new IntersectionObserver(B=>{let _=this.i;this.i=false,this.o&&_||(this.handleChanges(B),this.h.requestUpdate());},r),e.addController(this)):console.warn("IntersectionController error: browser does not support IntersectionObserver.");}handleChanges(e){this.value=this.callback?.(e,this.u);}hostConnected(){for(let e of this.t)this.observe(e);}hostDisconnected(){this.disconnect();}async hostUpdated(){let e=this.u.takeRecords();e.length&&this.handleChanges(e);}observe(e){this.t.add(e),this.u.observe(e),this.i=true;}unobserve(e){this.t.delete(e),this.u.unobserve(e);}disconnect(){this.u.disconnect();}};var pe=i=>{throw TypeError(i)},ie=(i,e,s)=>e.has(i)||pe("Cannot "+s),t=(i,e,s)=>(ie(i,e,"read from private field"),s?s.call(i):e.get(i)),o=(i,e,s)=>e.has(i)?pe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),n=(i,e,s,r)=>(ie(i,e,"write to private field"),e.set(i,s),s),h=(i,e,s)=>(ie(i,e,"access private method"),s),G,_e=class R{static setDebug(e){n(R,G,e);}static debugEnabled(){if(t(R,G))return true;try{let e=globalThis;if(e.__MAVE_DATA_DEBUG__===!0||e.localStorage?.getItem("MAVE_DATA_DEBUG")==="1")return !0}catch{}return false}static log(e){console.log(`[mave_data]: ${e}`);}static error(e,s){typeof s>"u"?console.error(`[mave_data]: ${e}`):console.error(`[mave_data]: ${e}`,s);}static debug(e,s){R.debugEnabled()&&(typeof s>"u"?console.debug(`[mave_data]: ${e}`):console.debug(`[mave_data]: ${e}`,s));}};G=new WeakMap;o(_e,G,false);var f=_e,q,m,I,S,se,Y,z,W,p,me,ve,$,ne,ge,ye,be,we,ke,Ae,Be=class g{constructor(){if(o(this,p),o(this,q,{apiEndpoint:""}),o(this,m,[]),o(this,I,null),o(this,S,null),o(this,se,5e3),o(this,Y,50),o(this,z,48*1024),o(this,W,null),typeof window<"u"){let e=h(this,p,Ae).bind(this);n(this,S,e),document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e);}}static get instance_(){return g.instance||(g.instance=new g),g.instance}static set config(e){n(g.instance_,q,e),typeof e.debug=="boolean"&&f.setDebug(e.debug);}static push(e){var s;h(s=g.instance_,p,me).call(s,e);}static flush(){var e;h(e=g.instance_,p,$).call(e);}static flushAsync(){var e;return h(e=g.instance_,p,ve).call(e)}static flushOnExit(){var e;h(e=g.instance_,p,$).call(e,{keepalive:true,preferBeacon:true});}static __resetForTests(){var e;g.instance&&h(e=g.instance,p,ge).call(e),g.instance=void 0;}};q=new WeakMap;m=new WeakMap;I=new WeakMap;S=new WeakMap;se=new WeakMap;Y=new WeakMap;z=new WeakMap;W=new WeakMap;p=new WeakSet;me=function(i){let e={name:i.name||"unknown",timestamp:i.timestamp||Date.now(),session_id:i.session_id||"",...i};t(this,m).push(e),f.debug("Data.push",{name:e.name,session_id:e.session_id,embed_id:e.embed_id,video_time:e.video_time,buffer_size:t(this,m).length}),!t(this,I)&&typeof globalThis.setInterval=="function"&&n(this,I,globalThis.setInterval(()=>h(this,p,$).call(this),t(this,se))),t(this,m).length>=t(this,Y)&&h(this,p,$).call(this);};ve=function(i){return h(this,p,$).call(this,i),t(this,W)??Promise.resolve(true)};$=function(i){if(t(this,m).length===0||t(this,W))return;let e=[...t(this,m)];n(this,m,[]);let s=t(this,q).apiEndpoint||"https://metrics.video-dns.com/v1/events",r=i?.keepalive??(typeof document<"u"&&document.visibilityState==="hidden"),d=i?.preferBeacon??false,y=h(this,p,ye).call(this,e);f.debug("Data.flush.start",{url:s,buffered:e.length,batches:y.map(_=>_.length),keepalive:r,preferBeacon:d});let B=false;n(this,W,(async()=>{for(let _ of y){let Ce={events:_};if(f.debug("Data.flush.batch",{size:_.length,first:_[0]?.name,last:_[_.length-1]?.name}),!await h(this,p,we).call(this,s,Ce,r,d))return n(this,m,[..._,...t(this,m)]),false}return true})().catch(_=>(f.error("Failed to send metrics",_),n(this,m,[...e,...t(this,m)]),false)).then(_=>(f.debug("Data.flush.done",{ok:_,remaining_buffer:t(this,m).length}),_&&t(this,m).length>0&&(B=true),_)).finally(()=>{n(this,W,null),t(this,m).length===0&&h(this,p,ne).call(this),B&&h(this,p,$).call(this);}));};ne=function(){t(this,I)!=null&&(typeof globalThis.clearInterval=="function"&&globalThis.clearInterval(t(this,I)),n(this,I,null));};ge=function(){typeof window<"u"&&t(this,S)&&(document.removeEventListener("visibilitychange",t(this,S)),window.removeEventListener("pagehide",t(this,S)),window.removeEventListener("beforeunload",t(this,S))),h(this,p,ne).call(this),n(this,m,[]),n(this,W,null);};ye=function(i){let e=[],s=[],r=0;for(let d of i){let y=h(this,p,be).call(this,d),B=r+y>t(this,z),_=s.length>=t(this,Y);s.length>0&&(B||_)&&(e.push(s),s=[],r=0),s.push(d),r+=y;}return s.length>0&&e.push(s),e};be=function(i){try{return JSON.stringify(i).length}catch{return 1024}};we=async function(i,e,s,r){if(r&&s&&h(this,p,ke).call(this,i,e))return f.debug("Data.send.beacon",{url:i,bytes:JSON.stringify(e).length}),true;try{let d=await fetch(i,{method:"POST",keepalive:s,headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return f.debug("Data.send.fetch",{url:i,ok:d.ok,status:d.status}),d.ok}catch(d){return f.error("Failed to send metrics",d),f.debug("Data.send.fetch.error",d),false}};ke=function(i,e){try{if(typeof navigator>"u"||typeof navigator.sendBeacon!="function")return !1;let s=JSON.stringify(e);if(s.length>t(this,z))return !1;let r=new Blob([s],{type:"application/json"});return navigator.sendBeacon(i,r)}catch{return false}};Ae=function(i){let e=i?.type==="pagehide"||i?.type==="beforeunload",s=document.visibilityState==="hidden";(e||s)&&(f.debug(`Data.handleVisibilityChange (${i?.type||"visibility"})`,{state:document.visibilityState}),h(this,p,$).call(this,{keepalive:true,preferBeacon:true}));};var u=Be;function Ne(){let i=globalThis.crypto;if(i?.randomUUID)return i.randomUUID();if(i?.getRandomValues)return "10000000-1000-4000-8000-100000000000".replace(/[018]/g,r=>{let d=i.getRandomValues(new Uint8Array(1))[0]??0;return (Number(r)^(d&15)>>Number(r)/4).toString(16)});let e=Math.random().toString(16).slice(2).padEnd(12,"0"),s=Date.now().toString(16).padStart(12,"0");return `${s.slice(0,8)}-${s.slice(8,12)}-4000-8000-${e.slice(0,12)}`}var ae=(i=>(i.PLAYING="playing",i.ENDED="ended",i.PAUSE="pause",i))(ae||{}),a,c,b,w,C,M,O,P,k,D,v,A,he,re,le,E,J,l,U,j,X,H,x,L,Me,Te,Ee,F,te,$e,Se,Pe,N,T,De,Ge=class{constructor(...i){if(o(this,l),this.VERSION="0.1.0",o(this,a),o(this,c,null),o(this,b,false),o(this,w,false),o(this,C,null),o(this,M,false),o(this,O,0),o(this,P,0),o(this,k,null),o(this,D,null),o(this,v,null),o(this,A,null),o(this,he,750),o(this,re,1),o(this,le,300),o(this,E,false),o(this,J,e=>h(this,l,De).call(this,e)),o(this,j,()=>{if(!t(this,b)||!t(this,a))return;h(this,l,U).call(this),f.debug("Metrics.native.seeking",{currentTime:t(this,a).currentTime,lastObservedVideoTime:t(this,P),paused:t(this,a).paused,seeking:t(this,a).seeking,lastEventType:t(this,c)});let e=t(this,c)==="play"||!t(this,a).paused&&!t(this,a).ended;if(e&&t(this,c)!=="pause"){n(this,w,true),n(this,M,false),h(this,l,F).call(this),h(this,l,T).call(this);let s=t(this,P)||t(this,a).currentTime||0,r=h(this,l,L).call(this,"pause");u.push({...r,name:"pause",video_time:s}),n(this,c,"pause"),u.flush(),f.debug("Metrics.scrub.pause_sent",{pauseTime:s,currentTime:t(this,a).currentTime});}else f.debug("Metrics.scrub.pause_not_sent",{wasPlaying:e,lastEventType:t(this,c)});}),o(this,X,()=>{t(this,b)&&t(this,a)&&(f.debug("Metrics.native.seeked",{currentTime:t(this,a).currentTime,paused:t(this,a).paused,seeking:t(this,a).seeking,wasPlayingBeforeSeek:t(this,w),lastEventType:t(this,c)}),t(this,w)&&(h(this,l,U).call(this),n(this,C,window.setTimeout(()=>{if(n(this,C,null),!!t(this,b)&&t(this,a)){if(t(this,c)==="play"){n(this,w,false),n(this,M,false);return}if(!t(this,a).seeking&&!t(this,a).paused&&!t(this,a).ended){let e=h(this,l,L).call(this,"play");u.push({...e,name:"play"}),n(this,c,"play"),n(this,D,Date.now()),n(this,E,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),n(this,M,false),u.flush(),n(this,w,false);}else n(this,M,true),n(this,w,false);}},200))));}),o(this,H,()=>{t(this,b)&&document.visibilityState==="hidden"&&u.flush();}),o(this,x,e=>{if(t(this,b)){if(e.persisted){u.flush();return}h(this,l,te).call(this),h(this,l,Ee).call(this),u.flushOnExit();}}),this.sessionId=Ne(),i.length<2)f.error("Metrics requires two arguments: a querySelectorable, hls instance or HTMLMediaElement/HTMLVideoElement and a unique embedId for your video.");else if(typeof i[0]=="string"&&(this.querySelectorable=i[0],this.embedId=i[1]),i[0]instanceof HTMLVideoElement||i[0]instanceof HTMLMediaElement?n(this,a,i[0]):typeof i[0]=="object"&&(this.hls=i[0]),this.embedId=i[1],i[2]){let e=i[2];this.component=e.component;}}static set config(i){u.config=i,typeof i.debug=="boolean"&&f.setDebug(i.debug);}monitor(){let i=this.querySelectorable?document.querySelector(this.querySelectorable):this.hls?.media;return t(this,b)?this:(i||t(this,a)?(t(this,a)||n(this,a,i),f.debug("Metrics.monitor",{embed_id:this.embedId,session_id:this.sessionId,currentTime:t(this,a).currentTime,paused:t(this,a).paused,seeking:t(this,a).seeking,readyState:t(this,a).readyState}),h(this,l,Se).call(this),n(this,P,t(this,a).currentTime||0),window.addEventListener("visibilitychange",t(this,H)),window.addEventListener("pagehide",t(this,x)),n(this,b,true)):f.error(`${this.querySelectorable} is not a valid reference to a HTMLVideoElement.`),this)}demonitor(){t(this,b)&&(h(this,l,te).call(this),h(this,l,Me).call(this),h(this,l,U).call(this),h(this,l,T).call(this),h(this,l,Pe).call(this),window.removeEventListener("visibilitychange",t(this,H)),window.removeEventListener("pagehide",t(this,x)),n(this,b,false));}};a=new WeakMap;c=new WeakMap;b=new WeakMap;w=new WeakMap;C=new WeakMap;M=new WeakMap;O=new WeakMap;P=new WeakMap;k=new WeakMap;D=new WeakMap;v=new WeakMap;A=new WeakMap;he=new WeakMap;re=new WeakMap;le=new WeakMap;E=new WeakMap;J=new WeakMap;l=new WeakSet;U=function(){t(this,C)!=null&&(window.clearTimeout(t(this,C)),n(this,C,null));};j=new WeakMap;X=new WeakMap;H=new WeakMap;x=new WeakMap;L=function(i){return {name:i,duration:t(this,a)?.duration,video_time:t(this,a)?.currentTime,session_id:this.sessionId,embed_id:this.embedId||"unknown",component:this.component,source_url:window.location.href,timestamp:Date.now()}};Me=function(){t(this,a)&&(t(this,a).paused||t(this,c)!=="pause"&&(t(this,v)||(h(this,l,Te).call(this),u.flush())));};Te=function(){t(this,a)&&t(this,c)!=="pause"&&(t(this,v)||(u.push(h(this,l,L).call(this,"pause")),n(this,c,"pause")));};Ee=function(){t(this,a)&&t(this,c)==="play"&&(t(this,v)||(u.push(h(this,l,L).call(this,"pause")),n(this,c,"pause")));};F=function(){t(this,v)&&(window.clearTimeout(t(this,v)),n(this,v,null)),n(this,A,null);};te=function(){if(!t(this,v)||!t(this,A))return;window.clearTimeout(t(this,v));let i=t(this,A);n(this,v,null),n(this,A,null),u.push(i),n(this,c,"pause"),n(this,E,false),u.flush();};$e=function(i){t(this,v)||(n(this,A,i),n(this,v,window.setTimeout(()=>{if(!t(this,A)){n(this,v,null);return}let e=t(this,A);n(this,A,null),n(this,v,null),u.push(e),n(this,c,"pause"),u.flush();},t(this,le))));};Se=function(){f.debug("Metrics.listeners.attach",{embed_id:this.embedId,session_id:this.sessionId});for(let i of Object.values(ae))t(this,a).addEventListener(i,t(this,J));t(this,a).addEventListener("seeking",t(this,j)),t(this,a).addEventListener("seeked",t(this,X));};Pe=function(){for(let i of Object.values(ae))t(this,a).removeEventListener(i,t(this,J));t(this,a).removeEventListener("seeking",t(this,j)),t(this,a).removeEventListener("seeked",t(this,X));};N=function(){if(!t(this,a)||t(this,k)!=null)return;let i=()=>{if(!t(this,a)){n(this,k,null);return}n(this,P,t(this,a).currentTime||t(this,P)),t(this,b)&&!t(this,a).paused&&!t(this,a).ended?n(this,k,window.requestAnimationFrame(i)):n(this,k,null);};n(this,k,window.requestAnimationFrame(i));};T=function(){t(this,k)!=null&&(window.cancelAnimationFrame(t(this,k)),n(this,k,null));};De=function(i){let e=h(this,l,L).call(this,i.type);switch(f.debug("Metrics.native.event",{type:i.type,currentTime:t(this,a)?.currentTime,paused:t(this,a)?.paused,seeking:t(this,a)?.seeking,readyState:t(this,a)?.readyState,lastEventType:t(this,c),wasPlayingBeforeSeek:t(this,w),awaitingSeekResumePlay:t(this,M)}),i.type){case "playing":if(h(this,l,F).call(this),t(this,M)){if(t(this,c)!=="play"){let d=h(this,l,L).call(this,"play");u.push({...d,name:"play"}),n(this,c,"play"),n(this,D,Date.now()),n(this,E,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),u.flush();}n(this,M,false);break}if(t(this,a)?.seeking||t(this,w))break;if(Date.now()<t(this,O)){n(this,c,"play"),h(this,l,N).call(this);break}if(t(this,c)==="play")break;u.push({...e,name:"play"}),n(this,c,"play"),n(this,D,Date.now()),n(this,E,false),h(this,l,N).call(this);break;case "pause":if(t(this,a)?.seeking){h(this,l,T).call(this);break}if(t(this,c)==="pause"){h(this,l,T).call(this);break}let s=t(this,D)==null?Number.POSITIVE_INFINITY:Date.now()-t(this,D),r=t(this,a)?.currentTime??0;if(s<=t(this,he)&&(r<=t(this,re)||t(this,E))){h(this,l,$e).call(this,{...e,name:"pause"}),h(this,l,T).call(this);break}u.push({...e,name:"pause"}),n(this,c,"pause"),n(this,E,false),h(this,l,T).call(this),u.flush();break;case "ended":h(this,l,F).call(this),h(this,l,T).call(this),t(this,c)!=="pause"&&(u.push({...e,name:"pause"}),n(this,c,"pause"),u.flush());break;}};var{I:ze}=f$1;var Ie=i=>i.strings===void 0;var V=(i,e)=>{let s=i._$AN;if(s===void 0)return false;for(let r of s)r._$AO?.(e,false),V(r,e);return true},Q=i=>{let e,s;do{if((e=i._$AM)===void 0)break;s=e._$AN,s.delete(i),i=e;}while(s?.size===0)},We=i=>{for(let e;e=i._$AM;i=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(i))break;s.add(i),Re(e);}};function Oe(i){this._$AN!==void 0?(Q(this),this._$AM=i,We(this)):this._$AM=i;}function Ve(i,e=false,s=0){let r=this._$AH,d=this._$AN;if(d!==void 0&&d.size!==0)if(e)if(Array.isArray(r))for(let y=s;y<r.length;y++)V(r[y],false),Q(r[y]);else r!=null&&(V(r,false),Q(r));else V(this,i);}var Re=i=>{i.type==a$1.CHILD&&(i._$AP??(i._$AP=Ve),i._$AQ??(i._$AQ=Oe));},K=class extends c$1{constructor(){super(...arguments),this._$AN=void 0;}_$AT(e,s,r){super._$AT(e,s,r),We(this),this.isConnected=e._$AU;}_$AO(e,s=true){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(V(this,e),Q(this));}setValue(e){if(Ie(this._$Ct))this._$Ct._$AI(e,this);else {let s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0);}}disconnected(){}reconnected(){}};var oe=new WeakMap,it=b$1(class extends K{render(i){return e}update(i,[e$1]){let s=e$1!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e$1,this.ht=i.options?.host,this.rt(this.ct=i.element)),e}rt(i){if(this.isConnected||(i=void 0),typeof this.G=="function"){let e=this.ht??globalThis,s=oe.get(e);s===void 0&&(s=new WeakMap,oe.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,i),i!==void 0&&this.G.call(this.ht,i);}else this.G.value=i;}get lt(){return typeof this.G=="function"?oe.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});/*! Bundled license information:
2
-
3
- @lit-labs/observers/intersection-controller.js:
4
- (**
5
- * @license
6
- * Copyright 2021 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- *)
9
-
10
- lit-html/directive-helpers.js:
11
- lit-html/directives/ref.js:
12
- (**
13
- * @license
14
- * Copyright 2020 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
-
18
- lit-html/async-directive.js:
19
- (**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- *)
24
- */export{fe as a,Ge as b,it as c};