@maveio/components 0.0.168 → 0.0.169

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 (112) hide show
  1. package/dist/chunk-2E5GLLOS.cjs +19 -0
  2. package/dist/chunk-2EIQ3VMA.cjs +1 -0
  3. package/dist/chunk-2FUCHY2J.cjs +35 -0
  4. package/dist/chunk-5PIHL662.js +19 -0
  5. package/dist/chunk-5QLIDHRT.cjs +33 -0
  6. package/dist/chunk-AOBEOJ2U.cjs +10 -0
  7. package/dist/chunk-B6P2GJBQ.js +9 -0
  8. package/dist/chunk-BL2IUHCP.cjs +1663 -0
  9. package/dist/chunk-BTCK3T4L.cjs +24 -0
  10. package/dist/{chunk-DITZCOYN.cjs → chunk-C3CI3U2Z.js} +6 -6
  11. package/dist/{chunk-H5YWUSBE.js → chunk-CNPQ5Q2M.js} +1 -1
  12. package/dist/chunk-CVXHA76S.js +3 -0
  13. package/dist/chunk-DL4BV5IH.cjs +24 -0
  14. package/dist/chunk-FAONFKQ2.cjs +9 -0
  15. package/dist/{chunk-62PQDUAE.js → chunk-GHE5KR7E.js} +4 -4
  16. package/dist/chunk-GSVKVWEI.js +33 -0
  17. package/dist/chunk-IBQULJZC.cjs +3 -0
  18. package/dist/chunk-IETV3B4F.cjs +38 -0
  19. package/dist/{chunk-RIIKHYMD.cjs → chunk-IMY6Z3YA.cjs} +3 -3
  20. package/dist/{chunk-LGKQ3C7I.cjs → chunk-K5Z7QHTN.cjs} +1 -1
  21. package/dist/{chunk-LHWG7RHD.js → chunk-KLJGACPT.js} +3 -3
  22. package/dist/{chunk-6KO66K2G.cjs → chunk-L667KKJP.cjs} +4 -4
  23. package/dist/{chunk-4UB3XJZV.cjs → chunk-MU4WLTQR.cjs} +4 -4
  24. package/dist/chunk-N2L5GXPF.cjs +211 -0
  25. package/dist/chunk-NPP5B5PV.cjs +16 -0
  26. package/dist/chunk-OVZCXWUJ.js +1663 -0
  27. package/dist/{chunk-FLXLRYLI.js → chunk-OX42Y2HR.js} +1 -1
  28. package/dist/{chunk-NX7L7P75.js → chunk-P5OWX4UR.js} +4 -4
  29. package/dist/chunk-PTN427IG.js +24 -0
  30. package/dist/chunk-Q3FGRSLA.js +38 -0
  31. package/dist/chunk-QFF6OUH6.js +9 -0
  32. package/dist/chunk-QOM4AP6R.cjs +9 -0
  33. package/dist/chunk-QQDH35OW.cjs +9 -0
  34. package/dist/{chunk-ZZBI6DXY.js → chunk-R3SDTEHC.js} +1 -1
  35. package/dist/chunk-RHTBV6KZ.js +24 -0
  36. package/dist/{chunk-RBBM42XM.cjs → chunk-RQN3DXJB.cjs} +1 -1
  37. package/dist/{chunk-FQRZLSBE.js → chunk-SWRFZ3FV.js} +1 -1
  38. package/dist/chunk-TFOTA27Y.js +211 -0
  39. package/dist/chunk-TH3DUBVR.js +35 -0
  40. package/dist/{chunk-42VJWULJ.cjs → chunk-TKJYRGEU.cjs} +1 -1
  41. package/dist/{chunk-T2P4BAWY.js → chunk-V54NMMTT.cjs} +6 -6
  42. package/dist/chunk-WOXKZOJ3.js +10 -0
  43. package/dist/chunk-WTS6WHUH.js +1 -0
  44. package/dist/chunk-YPCQNE3R.js +16 -0
  45. package/dist/components/audio-track-menu.cjs +1 -1
  46. package/dist/components/audio-track-menu.js +1 -1
  47. package/dist/components/clip.cjs +1 -1
  48. package/dist/components/clip.js +1 -1
  49. package/dist/components/files.cjs +1 -1
  50. package/dist/components/files.js +1 -1
  51. package/dist/components/img.cjs +1 -1
  52. package/dist/components/img.js +1 -1
  53. package/dist/components/list.cjs +1 -1
  54. package/dist/components/list.js +1 -1
  55. package/dist/components/player.cjs +1 -1
  56. package/dist/components/player.js +1 -1
  57. package/dist/components/pop.cjs +1 -1
  58. package/dist/components/pop.js +1 -1
  59. package/dist/components/text.cjs +1 -1
  60. package/dist/components/text.js +1 -1
  61. package/dist/components/upload.cjs +1 -1
  62. package/dist/components/upload.js +1 -1
  63. package/dist/embed/caption.cjs +1 -1
  64. package/dist/embed/caption.js +1 -1
  65. package/dist/embed/controller.cjs +1 -1
  66. package/dist/embed/controller.js +1 -1
  67. package/dist/embed/socket.cjs +1 -1
  68. package/dist/embed/socket.js +1 -1
  69. package/dist/index.cjs +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/react.cjs +1 -1
  72. package/dist/react.js +1 -1
  73. package/dist/themes/loader.cjs +1 -1
  74. package/dist/themes/loader.js +1 -1
  75. package/dist/utils/localization.cjs +1 -1
  76. package/dist/utils/localization.d.cts +2 -2
  77. package/dist/utils/localization.d.ts +2 -2
  78. package/dist/utils/localization.js +1 -1
  79. package/dist/utils/mave_element.cjs +1 -1
  80. package/dist/utils/mave_element.js +1 -1
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.d.cts +16 -16
  83. package/dist/vue.d.ts +16 -16
  84. package/dist/vue.js +1 -1
  85. package/package.json +1 -1
  86. package/dist/chunk-27BWRXCN.js +0 -29
  87. package/dist/chunk-3J6Q5HPF.js +0 -37
  88. package/dist/chunk-3SSU5VNZ.cjs +0 -1532
  89. package/dist/chunk-43KJ6TMU.cjs +0 -17
  90. package/dist/chunk-6PSWE4MR.js +0 -3
  91. package/dist/chunk-6XBQ5C3V.js +0 -17
  92. package/dist/chunk-7SJMIXXD.js +0 -10
  93. package/dist/chunk-D75M3UFL.js +0 -1
  94. package/dist/chunk-D7LG2SMD.cjs +0 -33
  95. package/dist/chunk-ES5FUTSE.cjs +0 -1
  96. package/dist/chunk-ETDEE7EL.cjs +0 -10
  97. package/dist/chunk-GO6BV3T4.cjs +0 -29
  98. package/dist/chunk-J74VK4RB.cjs +0 -9
  99. package/dist/chunk-M22WSPSU.js +0 -9
  100. package/dist/chunk-N27UPJGV.cjs +0 -37
  101. package/dist/chunk-NB5PC42C.js +0 -33
  102. package/dist/chunk-O2WRWRDO.cjs +0 -9
  103. package/dist/chunk-O4QBLS42.js +0 -17
  104. package/dist/chunk-OIZ5B5LE.cjs +0 -17
  105. package/dist/chunk-PJMR6NFX.js +0 -211
  106. package/dist/chunk-QPYU4D32.cjs +0 -3
  107. package/dist/chunk-VMGLCRPK.js +0 -35
  108. package/dist/chunk-WIS6FQDY.cjs +0 -24
  109. package/dist/chunk-WYXWOUKN.cjs +0 -211
  110. package/dist/chunk-XKFWCRVL.js +0 -1532
  111. package/dist/chunk-ZJWT7IOI.js +0 -24
  112. package/dist/chunk-ZQ3G5EQT.cjs +0 -35
@@ -1,17 +0,0 @@
1
- 'use strict';var chunkRRCW5BBR_cjs=require('./chunk-RRCW5BBR.cjs'),chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs');var fe=class{constructor(e,{target:s,config:r,callback:d,skipInitial:b}){this.t=new Set,this.o=false,this.i=false,this.h=e,s!==null&&this.t.add(s??e),this.o=b??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)},ne=(i,e,s)=>e.has(i)||pe("Cannot "+s),t=(i,e,s)=>(ne(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)=>(ne(i,e,"write to private field"),e.set(i,s),s),h=(i,e,s)=>(ne(i,e,"access private method"),s),H,_e=class x{static setDebug(e){n(x,H,e);}static debugEnabled(){if(t(x,H))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){x.debugEnabled()&&(typeof s>"u"?console.debug(`[mave_data]: ${e}`):console.debug(`[mave_data]: ${e}`,s));}};H=new WeakMap;o(_e,H,false);var f=_e,q,m,I,S,ae,G,z,W,p,me,ve,$,he,ge,be,ye,we,ke,Ae,Le=class g{constructor(){if(o(this,p),o(this,q,{apiEndpoint:""}),o(this,m,[]),o(this,I,null),o(this,S,null),o(this,ae,5e3),o(this,G,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;ae=new WeakMap;G=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,ae))),t(this,m).length>=t(this,G)&&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,b=h(this,p,be).call(this,e);f.debug("Data.flush.start",{url:s,buffered:e.length,batches:b.map(_=>_.length),keepalive:r,preferBeacon:d});let B=false;n(this,W,(async()=>{for(let _ of b){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,he).call(this),B&&h(this,p,$).call(this);}));};he=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,he).call(this),n(this,m,[]),n(this,W,null);};be=function(i){let e=[],s=[],r=0;for(let d of i){let b=h(this,p,ye).call(this,d),B=r+b>t(this,z),_=s.length>=t(this,G);s.length>0&&(B||_)&&(e.push(s),s=[],r=0),s.push(d),r+=b;}return s.length>0&&e.push(s),e};ye=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=Le;function Be(){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 re=(i=>(i.PLAYING="playing",i.ENDED="ended",i.PAUSE="pause",i))(re||{}),a,c,y,w,C,T,O,P,k,D,v,A,le,oe,ce,M,J,l,U,j,X,R,Y,L,Te,Ee,Me,F,se,$e,Se,Pe,N,E,De,Re=class{constructor(...i){if(o(this,l),this.VERSION="0.1.0",o(this,a),o(this,c,null),o(this,y,false),o(this,w,false),o(this,C,null),o(this,T,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,le,750),o(this,oe,1),o(this,ce,300),o(this,M,false),o(this,J,e=>h(this,l,De).call(this,e)),o(this,j,()=>{if(!t(this,y)||!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,T,false),h(this,l,F).call(this),h(this,l,E).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,y)&&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,y)&&t(this,a)){if(t(this,c)==="play"){n(this,w,false),n(this,T,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,M,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),n(this,T,false),u.flush(),n(this,w,false);}else n(this,T,true),n(this,w,false);}},200))));}),o(this,R,()=>{t(this,y)&&document.visibilityState==="hidden"&&u.flush();}),o(this,Y,e=>{if(t(this,y)){if(e.persisted){u.flush();return}h(this,l,se).call(this),h(this,l,Me).call(this),u.flushOnExit();}}),this.sessionId=Be(),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,y)?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,R)),window.addEventListener("pagehide",t(this,Y)),n(this,y,true)):f.error(`${this.querySelectorable} is not a valid reference to a HTMLVideoElement.`),this)}demonitor(){t(this,y)&&(h(this,l,se).call(this),h(this,l,Te).call(this),h(this,l,U).call(this),h(this,l,E).call(this),h(this,l,Pe).call(this),window.removeEventListener("visibilitychange",t(this,R)),window.removeEventListener("pagehide",t(this,Y)),n(this,y,false));}};a=new WeakMap;c=new WeakMap;y=new WeakMap;w=new WeakMap;C=new WeakMap;T=new WeakMap;O=new WeakMap;P=new WeakMap;k=new WeakMap;D=new WeakMap;v=new WeakMap;A=new WeakMap;le=new WeakMap;oe=new WeakMap;ce=new WeakMap;M=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;R=new WeakMap;Y=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()}};Te=function(){t(this,a)&&(t(this,a).paused||t(this,c)!=="pause"&&(t(this,v)||(h(this,l,Ee).call(this),u.flush())));};Ee=function(){t(this,a)&&t(this,c)!=="pause"&&(t(this,v)||(u.push(h(this,l,L).call(this,"pause")),n(this,c,"pause")));};Me=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);};se=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,M,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,ce))));};Se=function(){f.debug("Metrics.listeners.attach",{embed_id:this.embedId,session_id:this.sessionId});for(let i of Object.values(re))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(re))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,y)&&!t(this,a).paused&&!t(this,a).ended?n(this,k,window.requestAnimationFrame(i)):n(this,k,null);};n(this,k,window.requestAnimationFrame(i));};E=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,T)}),i.type){case "playing":if(h(this,l,F).call(this),t(this,T)){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,M,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),u.flush();}n(this,T,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,M,false),h(this,l,N).call(this);break;case "pause":if(t(this,a)?.seeking){h(this,l,E).call(this);break}if(t(this,c)==="pause"){h(this,l,E).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,le)&&(r<=t(this,oe)||t(this,M))){h(this,l,$e).call(this,{...e,name:"pause"}),h(this,l,E).call(this);break}u.push({...e,name:"pause"}),n(this,c,"pause"),n(this,M,false),h(this,l,E).call(this),u.flush();break;case "ended":h(this,l,F).call(this),h(this,l,E).call(this),t(this,c)!=="pause"&&(u.push({...e,name:"pause"}),n(this,c,"pause"),u.flush());break;}};var{I:Fe}=chunkGO6BV3T4_cjs.g;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),Ve(e);}};function Ne(i){this._$AN!==void 0?(Q(this),this._$AM=i,We(this)):this._$AM=i;}function Oe(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 b=s;b<r.length;b++)V(r[b],false),Q(r[b]);else r!=null&&(V(r,false),Q(r));else V(this,i);}var Ve=i=>{i.type==chunkRRCW5BBR_cjs.a.CHILD&&(i._$AP??(i._$AP=Oe),i._$AQ??(i._$AQ=Ne));},K=class extends chunkRRCW5BBR_cjs.c{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 ue=new WeakMap,et=chunkRRCW5BBR_cjs.b(class extends K{render(i){return chunkGO6BV3T4_cjs.f}update(i,[e]){let s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=i.options?.host,this.rt(this.ct=i.element)),chunkGO6BV3T4_cjs.f}rt(i){if(typeof this.Y=="function"){let e=this.ht??globalThis,s=ue.get(e);s===void 0&&(s=new WeakMap,ue.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i);}else this.Y.value=i;}get lt(){return typeof this.Y=="function"?ue.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});/*! Bundled license information:
2
-
3
- lit-html/directive-helpers.js:
4
- lit-html/directives/ref.js:
5
- (**
6
- * @license
7
- * Copyright 2020 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- *)
10
-
11
- lit-html/async-directive.js:
12
- (**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
- */exports.a=fe;exports.b=Re;exports.c=et;
@@ -1,3 +0,0 @@
1
- import {a}from'./chunk-ZTDQPDC6.js';var C=e=>typeof e=="function"?e:function(){return e},L=typeof self<"u"?self:null,T=typeof window<"u"?window:null,g=L||T||g,_="2.0.0",f={connecting:0,open:1,closing:2,closed:3},P=1e4,H=1e3,c={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},d={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},y={longpoll:"longpoll",websocket:"websocket"},B={complete:4},v=class{constructor(e,t,i,s){this.channel=e,this.event=t,this.payload=i||function(){return {}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=false;}resend(e){this.timeout=e,this.reset(),this.send();}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=true,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}));}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=false;}matchReceive({status:e,response:t,_ref:i}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.callback(t));}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent);}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null;}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e);}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{});},this.timeout);}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t});}},S=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0;}reset(){this.tries=0,clearTimeout(this.timer);}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback();},this.timerCalc(this.tries+1));}},x=class{constructor(e,t,i){this.state=c.closed,this.topic=e,this.params=C(t||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=false,this.joinPush=new v(this,d.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new S(()=>{this.socket.isConnected()&&this.rejoin();},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin();})),this.joinPush.receive("ok",()=>{this.state=c.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[];}),this.joinPush.receive("error",()=>{this.state=c.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout();}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=c.closed,this.socket.remove(this);}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=c.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout();}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new v(this,d.leave,C({}),this.timeout).send(),this.state=c.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout();}),this.on(d.reply,(s,r)=>{this.trigger(this.replyEventName(r),s);});}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=true,this.rejoin(),this.joinPush}onClose(e){this.on(d.close,e);}onError(e){return this.on(d.error,t=>e(t))}on(e,t){let i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}off(e,t){this.bindings=this.bindings.filter(i=>!(i.event===e&&(typeof t>"u"||t===i.ref)));}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,i=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new v(this,e,function(){return t},i);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=c.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(d.close,"leave");},i=new v(this,d.leave,C({}),e);return i.receive("ok",()=>t()).receive("timeout",()=>t()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(e,t,i){return t}isMember(e,t,i,s){return this.topic!==e?false:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:s}),false):true}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=c.joining,this.joinPush.resend(e));}trigger(e,t,i,s){let r=this.onMessage(e,t,i,s);if(t&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let n=this.bindings.filter(h=>h.event===e);for(let h=0;h<n.length;h++)n[h].callback(r,i,s||this.joinRef());}replyEventName(e){return `chan_reply_${e}`}isClosed(){return this.state===c.closed}isErrored(){return this.state===c.errored}isJoined(){return this.state===c.joined}isJoining(){return this.state===c.joining}isLeaving(){return this.state===c.leaving}},E=class{static request(e,t,i,s,r,n,h){if(g.XDomainRequest){let o=new g.XDomainRequest;return this.xdomainRequest(o,e,t,s,r,n,h)}else {let o=new g.XMLHttpRequest;return this.xhrRequest(o,e,t,i,s,r,n,h)}}static xdomainRequest(e,t,i,s,r,n,h){return e.timeout=r,e.open(t,i),e.onload=()=>{let o=this.parseJSON(e.responseText);h&&h(o);},n&&(e.ontimeout=n),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,i,s,r,n,h,o){return e.open(t,i,true),e.timeout=n,e.setRequestHeader("Content-Type",s),e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{if(e.readyState===B.complete&&o){let a=this.parseJSON(e.responseText);o(a);}},h&&(e.ontimeout=h),e.send(r),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let i=[];for(var s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let r=t?`${t}[${s}]`:s,n=e[s];typeof n=="object"?i.push(this.serialize(n,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(n));}return i.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let i=e.match(/\?/)?"&":"?";return `${e}${i}${this.serialize(t)}`}},$=e=>{let t="",i=new Uint8Array(e),s=i.byteLength;for(let r=0;r<s;r++)t+=String.fromCharCode(i[r]);return btoa(t)},m=class{constructor(e){this.endPoint=null,this.token=null,this.skipHeartbeat=true,this.reqs=new Set,this.awaitingBatchAck=false,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=f.connecting,setTimeout(()=>this.poll(),0);}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+y.websocket),"$1/"+y.longpoll)}endpointURL(){return E.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,i){this.close(e,t,i),this.readyState=f.connecting;}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",false);}isActive(){return this.readyState===f.open||this.readyState===f.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:i,messages:s}=e;this.token=i;}else t=0;switch(t){case 200:s.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0);}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=f.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",false);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}});}send(e){typeof e!="string"&&(e=$(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null;},0));}batchSend(e){this.awaitingBatchAck=true,this.ajax("POST","application/x-ndjson",e.join(`
2
- `),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=false,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",false)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[]);});}close(e,t,i){for(let r of this.reqs)r.abort();this.readyState=f.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:true},{code:e,reason:t,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s);}ajax(e,t,i,s,r){let n,h=()=>{this.reqs.delete(n),s();};n=E.request(e,this.endpointURL(),t,i,this.timeout,h,o=>{this.reqs.delete(n),this.isActive()&&r(o);}),this.reqs.add(n);}};var b={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(i))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[i,s,r,n,h]=JSON.parse(e);return t({join_ref:i,ref:s,topic:r,event:n,payload:h})}},binaryEncode(e){let{join_ref:t,ref:i,event:s,topic:r,payload:n}=e,h=this.META_LENGTH+t.length+i.length+r.length+s.length,o=new ArrayBuffer(this.HEADER_LENGTH+h),a=new DataView(o),l=0;a.setUint8(l++,this.KINDS.push),a.setUint8(l++,t.length),a.setUint8(l++,i.length),a.setUint8(l++,r.length),a.setUint8(l++,s.length),Array.from(t,u=>a.setUint8(l++,u.charCodeAt(0))),Array.from(i,u=>a.setUint8(l++,u.charCodeAt(0))),Array.from(r,u=>a.setUint8(l++,u.charCodeAt(0))),Array.from(s,u=>a.setUint8(l++,u.charCodeAt(0)));var p=new Uint8Array(o.byteLength+n.byteLength);return p.set(new Uint8Array(o),0),p.set(new Uint8Array(n),o.byteLength),p.buffer},binaryDecode(e){let t=new DataView(e),i=t.getUint8(0),s=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,i){let s=t.getUint8(1),r=t.getUint8(2),n=t.getUint8(3),h=this.HEADER_LENGTH+this.META_LENGTH-1,o=i.decode(e.slice(h,h+s));h=h+s;let a=i.decode(e.slice(h,h+r));h=h+r;let l=i.decode(e.slice(h,h+n));h=h+n;let p=e.slice(h,e.byteLength);return {join_ref:o,ref:null,topic:a,event:l,payload:p}},decodeReply(e,t,i){let s=t.getUint8(1),r=t.getUint8(2),n=t.getUint8(3),h=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,a=i.decode(e.slice(o,o+s));o=o+s;let l=i.decode(e.slice(o,o+r));o=o+r;let p=i.decode(e.slice(o,o+n));o=o+n;let u=i.decode(e.slice(o,o+h));o=o+h;let w=e.slice(o,e.byteLength),A={status:u,response:w};return {join_ref:a,ref:l,topic:p,event:d.reply,payload:A}},decodeBroadcast(e,t,i){let s=t.getUint8(1),r=t.getUint8(2),n=this.HEADER_LENGTH+2,h=i.decode(e.slice(n,n+s));n=n+s;let o=i.decode(e.slice(n,n+r));n=n+r;let a=e.slice(n,e.byteLength);return {join_ref:null,ref:null,topic:h,event:o,payload:a}}},j=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||P,this.transport=t.transport||g.WebSocket||m,this.primaryPassedHealthCheck=false,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||g&&g.sessionStorage,this.establishedConnections=0,this.defaultEncoder=b.encode.bind(b),this.defaultDecoder=b.decode.bind(b),this.closeWasClean=false,this.disconnecting=false,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==m?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;T&&T.addEventListener&&(T.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),i=this.connectClock);}),T.addEventListener("pageshow",s=>{i===this.connectClock&&(i=null,this.connect());})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,r,n)=>{console.log(`${s}: ${r}`,n);}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=C(t.params||{}),this.endPoint=`${e}/${y.websocket}`,this.vsn=t.vsn||_,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new S(()=>{this.teardown(()=>this.connect());},this.reconnectAfterMs);}getLongPollTransport(){return m}replaceTransport(e){this.connectClock++,this.closeWasClean=true,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e;}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=E.appendParams(E.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,i){this.connectClock++,this.disconnecting=true,this.closeWasClean=true,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=false,e&&e();},t,i);}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=C(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==m?this.connectWithFallback(m,this.longPollFallbackMs):this.transportConnect());}log(e,t,i){this.logger&&this.logger(e,t,i);}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return false;let t=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let s=this.onMessage(r=>{r.ref===t&&(this.off([s]),e(Date.now()-i));});return true}transportConnect(){this.connectClock++,this.closeWasClean=false,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e);}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t);}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let i=false,s=true,r,n,h=o=>{this.log("transport",`falling back to ${e.name}...`,o),this.off([r,n]),s=false,this.replaceTransport(e),this.transportConnect();};if(this.getSession(`phx:fallback:${e.name}`))return h("memorized");this.fallbackTimer=setTimeout(h,t),n=this.onError(o=>{this.log("transport","error",o),s&&!i&&(clearTimeout(this.fallbackTimer),h(o));}),this.onOpen(()=>{if(i=true,!s)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${e.name}`,"true"),this.log("transport",`established ${e.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,t),this.ping(o=>{this.log("transport","connected to primary after",o),this.primaryPassedHealthCheck=true,clearTimeout(this.fallbackTimer);});}),this.transportConnect();}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer);}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=false,this.disconnecting=false,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e());}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=false,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),H,"heartbeat timeout"));}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs));}teardown(e,t,i){if(!this.conn)return e&&e();let s=this.connectClock;this.waitForBufferDone(()=>{s===this.connectClock&&(this.conn&&(t?this.conn.close(t,i||""):this.conn.close()),this.waitForSocketClosed(()=>{s===this.connectClock&&(this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e());}));});}waitForBufferDone(e,t=1){if(t===5||!this.conn||!this.conn.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(e,t+1);},150*t);}waitForSocketClosed(e,t=1){if(t===5||!this.conn||this.conn.readyState===f.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(e,t+1);},150*t);}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&t!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(e));}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,s])=>{s(e,t,i);}),(t===this.transport||i>0)&&this.triggerChanError();}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(d.error);});}connectionState(){switch(this.conn&&this.conn.readyState){case f.connecting:return "connecting";case f.open:return "open";case f.closing:return "closing";default:return "closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e);}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([i])=>e.indexOf(i)===-1);}channel(e,t={}){let i=new x(e,t,this);return this.channels.push(i),i}push(e){if(this.hasLogger()){let{topic:t,event:i,payload:s,ref:r,join_ref:n}=e;this.log("push",`${t} ${i} (${n}, ${r})`,s);}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)));}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs));}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[]);}onConnMessage(e){this.decode(e.data,t=>{let{topic:i,event:s,payload:r,ref:n,join_ref:h}=t;n&&n===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${i} ${s} ${n&&"("+n+")"||""}`,r);for(let o=0;o<this.channels.length;o++){let a=this.channels[o];a.isMember(i,s,r,h)&&a.trigger(s,r,n,h);}for(let o=0;o<this.stateChangeCallbacks.message.length;o++){let[,a]=this.stateChangeCallbacks.message[o];a(t);}});}leaveOpenTopic(e){let t=this.channels.find(i=>i.topic===e&&(i.isJoined()||i.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave());}};var R=class{static connect(t){if(typeof window>"u"){let n={on:()=>n,push:()=>n,join:()=>n,leave:()=>Promise.resolve(),off:()=>{}};return {token:t,channel:n}}let i=new j(a.upload.socket,{params:{token:t},reconnectAfterMs:n=>[1e3,3e3,5e3,1e4][n-1]||1e4});i.connect();let s=i.channel(`embed:${t}`),r={token:t,channel:s,socket:i};return s.on("initiate",({upload_id:n})=>{r.upload_id=n;}),s.join(),r}static async disconnect(t){if(t){try{await t.channel.leave();}catch{}t.socket?.disconnect();}}};
3
- export{R as a};
@@ -1,17 +0,0 @@
1
- var h=window,c=h.ShadowRoot&&(h.ShadyCSS===void 0||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,m=Symbol(),_=new WeakMap,l=class{constructor(t,e,s){if(this._$cssResult$=true,s!==m)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(c&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=_.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&_.set(e,t));}return t}toString(){return this.cssText}},g=r=>new l(typeof r=="string"?r:r+"",void 0,m);var v=(r,t)=>{c?r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((e=>{let s=document.createElement("style"),i=h.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s);}));},u=c?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return g(e)})(r):r;var f,d=window,$=d.trustedTypes,A=$?$.emptyScript:"",b=d.reactiveElementPolyfillSupport,y={toAttribute(r,t){switch(t){case Boolean:r=r?A: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}},p=(r,t)=>t!==r&&(t==t||r==r),S={attribute:true,type:String,converter:y,reflect:false,hasChanged:p},n=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=false,this.hasUpdated=false,this._$El=null,this.u();}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t);}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach(((e,s)=>{let i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i));})),t}static createProperty(t,e=S){if(e.state&&(e.attribute=false),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){return {get(){return this[e]},set(i){let o=this[t];this[e]=i,this.requestUpdate(t,o,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)||S}static finalize(){if(this.hasOwnProperty("finalized"))return false;this.finalized=true;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let i of s)this.createProperty(i,e[i]);}return this.elementStyles=this.finalizeStyles(this.styles),true}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(u(i));}else t!==void 0&&e.push(u(t));return e}static _$Ep(t,e){let s=e.attribute;return s===false?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach((e=>e(this)));}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t));}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e]);}));}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return v(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(true),(t=this._$ES)===null||t===void 0||t.forEach((e=>{var s;return (s=e.hostConnected)===null||s===void 0?void 0:s.call(e)}));}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach((e=>{var s;return (s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)}));}attributeChangedCallback(t,e,s){this._$AK(t,s);}_$EO(t,e,s=S){var i;let o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===true){let a=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:y).toAttribute(e,s.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null;}}_$AK(t,e){var s;let i=this.constructor,o=i._$Ev.get(t);if(o!==void 0&&this._$El!==o){let a=i.getPropertyOptions(o),U=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?a.converter:y;this._$El=o,this[o]=U.fromAttribute(e,a.type),this._$El=null;}}requestUpdate(t,e,s){let i=true;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===true&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=false),!this.isUpdatePending&&i&&(this._$E_=this._$Ej());}async _$Ej(){this.isUpdatePending=true;try{await this._$E_;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((i,o)=>this[o]=i)),this._$Ei=void 0);let e=false,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach((i=>{var o;return (o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)})),this.update(s)):this._$Ek();}catch(i){throw e=false,this._$Ek(),i}e&&this._$AE(s);}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach((s=>{var i;return (i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$Ek(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return true}update(t){this._$EC!==void 0&&(this._$EC.forEach(((e,s)=>this._$EO(s,this[s],e))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}};n.finalized=true,n.elementProperties=new Map,n.elementStyles=[],n.shadowRootOptions={mode:"open"},b?.({ReactiveElement:n}),((f=d.reactiveElementVersions)!==null&&f!==void 0?f:d.reactiveElementVersions=[]).push("1.6.1");var w=Symbol(),E=class{get taskComplete(){return this.t||(this.status===1?this.t=new Promise(((t,e)=>{this.i=t,this.o=e;})):this.status===3?this.t=Promise.reject(this.h):this.t=Promise.resolve(this.l)),this.t}constructor(t,e,s){this.u=0,this.status=0,(this.p=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this._=i.task,this.v=i.args,this.j=i.argsEqual??C,this.m=i.onComplete,this.g=i.onError,this.autoRun=i.autoRun??true,"initialValue"in i&&(this.l=i.initialValue,this.status=2,this.k=this.A?.());}hostUpdate(){this.autoRun===true&&this.O();}hostUpdated(){this.autoRun==="afterUpdate"&&this.O();}A(){if(this.v===void 0)return;let t=this.v();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async O(){let t=this.A(),e=this.k;this.k=t,t===e||t===void 0||e!==void 0&&this.j(e,t)||await this.run(t);}async run(t){let e,s;t??(t=this.A()),this.k=t,this.status===1?this.T?.abort():(this.t=void 0,this.i=void 0,this.o=void 0),this.status=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this.p.requestUpdate())):this.p.requestUpdate();let i=++this.u;this.T=new AbortController;let o=false;try{e=await this._(t,{signal:this.T.signal});}catch(a){o=true,s=a;}if(this.u===i){if(e===w)this.status=0;else {if(o===false){try{this.m?.(e);}catch{}this.status=2,this.i?.(e);}else {try{this.g?.(s);}catch{}this.status=3,this.o?.(s);}this.l=e,this.h=s;}this.p.requestUpdate();}}abort(t){this.status===1&&this.T?.abort(t);}get value(){return this.l}get error(){return this.h}render(t){switch(this.status){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.status)}}},C=(r,t)=>r===t||r.length===t.length&&r.every(((e,s)=>!p(e,t[s])));/*! 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
- @lit/task/task.js:
12
- (**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
- */export{E as a};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-FQRZLSBE.js';import {h,c}from'./chunk-27BWRXCN.js';var e=class extends a{get poster(){return `${this.cdn_root}/${this.embedId}/poster.webp`}render(){return c`<img src=${this.poster} />`}};e.styles=h`
2
- :host {
3
- display: block;
4
- }
5
-
6
- img {
7
- width: 100%;
8
- max-height: 100vh;
9
- }
10
- `;typeof window<"u"&&window.customElements&&(window.customElements.get("mave-img")||window.customElements.define("mave-img",e));export{e as a};
@@ -1 +0,0 @@
1
- import {a as a$1}from'./chunk-P6SBZPDR.js';import {i,c as c$1,h as h$1}from'./chunk-27BWRXCN.js';var a=["default","synthwave","dolphin"],h={default:()=>import('./themes/default.js'),synthwave:()=>import('./themes/synthwave.js'),dolphin:()=>import('./themes/dolphin.js')};async function p(t){if(!a.includes(t))return;if(!!a$1()){let e=`./dist/themes/${t}.js`;return c(e)}let s=h[t];return s?s():void 0}async function c(t){return import(t)}var d=class t{constructor(){this.themes=[];}static async get(n,s){if(t.instance||(t.instance=new t),t.instance.themes.find(e=>e.name===n))return Promise.resolve(t.instance);t.instance.themes.push({name:n}),t.instance.currentTheme=n;try{if(typeof document<"u"&&!a.includes(n)){let e=document.createElement("link");e.rel="stylesheet",e.href=`${s}/${n}.css`,document.head.appendChild(e);}}catch(e){console.log("[mave-player]: theme css not loaded",e);}try{if(s&&!a.includes(n)){let{build:e}=await c(`${s}/${n}.js`);e(n,i,c$1,h$1);}else {let e=await p(n);if(e)e.build(n,i,c$1,h$1);else {let m=`./${a$1()}themes/${n}.js`,{build:u}=await c(m);u(n,i,c$1,h$1);}}}catch(e){console.log("[mave-player]: theme not loaded",e);}return Promise.resolve(t.instance)}static async external(n){t.instance||(t.instance=new t);let s=n.split("/").pop()?.replace(".js","")||"";try{if(typeof document<"u"){let e=document.createElement("link");e.rel="stylesheet",e.href=`${n.replace(".js","")}.css`,document.head.appendChild(e);}}catch(e){console.log("[mave-player]: theme css not loaded",e);}if(t.instance.themes.find(e=>e.name===s))return Promise.resolve(t.instance);t.instance.themes.push({name:s}),t.instance.currentTheme=s;try{let{build:e}=await c(n);e(s,i,c$1,h$1);}catch(e){console.log("[mave-player]: theme not loaded",e);}return Promise.resolve(t.instance)}static getTheme(){return t.instance?t.instance.currentTheme:""}};export{d 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 M=e=>typeof e!="string"&&"strTag"in e,p=(e,t,o)=>{let n=e[0];for(let r=1;r<e.length;r++)n+=t[o?o[r-1]:r-1],n+=e[r];return n};var c=(e=>M(e)?p(e.strings,e.values):e);var d="lit-localize-status";var x=class{constructor(t){this.__litLocalizeEventHandler=o=>{o.detail.status==="ready"&&this.host.requestUpdate();},this.host=t;}hostConnected(){window.addEventListener(d,this.__litLocalizeEventHandler);}hostDisconnected(){window.removeEventListener(d,this.__litLocalizeEventHandler);}},F=e=>e.addController(new x(e)),I=F;var N=()=>(e,t)=>(e.addInitializer(I),e);var u=class{constructor(){this.settled=false,this.promise=new Promise((t,o)=>{this._resolve=t,this._reject=o;});}resolve(t){this.settled=true,this._resolve(t);}reject(t){this.settled=true,this._reject(t);}};var i=[];for(let e=0;e<256;e++)i[e]=(e>>4&15).toString(16)+(e&15).toString(16);function C(e){let t=0,o=8997,n=0,r=33826,s=0,a=40164,L=0,f=52210;for(let v=0;v<e.length;v++)o^=e.charCodeAt(v),t=o*435,n=r*435,s=a*435,L=f*435,s+=o<<8,L+=r<<8,n+=t>>>16,o=t&65535,s+=n>>>16,r=n&65535,f=L+(s>>>16)&65535,a=s&65535;return i[f>>8]+i[f&255]+i[a>>8]+i[a&255]+i[r>>8]+i[r&255]+i[o>>8]+i[o&255]}var W="",$="h",b="s";function z(e,t){return (t?$:b)+C(typeof e=="string"?e:e.join(W))}var A=new WeakMap,R=new Map;function j(e,t,o){if(e){let n=o?.id??O(t),r=e[n];if(r){if(typeof r=="string")return r;if("strTag"in r)return p(r.strings,t.values,r.values);{let s=A.get(r);return s===void 0&&(s=r.values,A.set(r,s)),{...r,values:s.map(a=>t.values[a])}}}}return c(t)}function O(e){let t=typeof e=="string"?e:e.strings,o=R.get(t);return o===void 0&&(o=z(t,typeof e!="string"&&!("strTag"in e)),R.set(t,o)),o}function _(e){window.dispatchEvent(new CustomEvent(d,{detail:e}));}var g="",E,H,h,w,P,l=new u;l.resolve();var m=0,U=e=>(S(((t,o)=>j(P,t,o))),g=H=e.sourceLocale,h=new Set(e.targetLocales),h.add(e.sourceLocale),w=e.loadLocale,{getLocale:k,setLocale:X}),k=()=>g,X=e=>{if(e===(E??g))return l.promise;if(!h||!w)throw new Error("Internal error");if(!h.has(e))throw new Error("Invalid locale code");m++;let t=m;return E=e,l.settled&&(l=new u),_({status:"loading",loadingLocale:e}),(e===H?Promise.resolve({templates:void 0}):w(e)).then(n=>{m===t&&(g=e,E=void 0,P=n.templates,_({status:"ready",readyLocale:e}),l.resolve());},n=>{m===t&&(_({status:"error",errorLocale:e,errorMessage:n.toString()}),l.reject(n));}),l.promise};exports.b=c;var V=false;function S(e){if(V)throw new Error("lit-localize can only be configured once");exports.b=e,V=true;}var G={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 B(e){return G[e]}async function J(e){let t=chunkJ7OISSKU_cjs.a();if(!t)return null;try{return await import(new URL(`./${t}generated/locales/${e}.js`,(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-D7LG2SMD.cjs', document.baseURI).href))).href)}catch{return null}}var K=U({sourceLocale:"default",targetLocales:["en","nl","de","fr"],loadLocale:async e=>{let t=B(e);if(t)try{return await t()}catch(n){console.error(`[mave-player]: failed to load locale ${e}`,n);}let o=await J(e);return o||(console.log(`[mave-player]: locale not loaded for ${e}`),null)}}),y=false,D=class{constructor(t){this._onLoad=t=>{t.detail.status==="loading"?y=false:t.detail.status==="ready"&&(y=true),this.host.requestUpdate();};this.host=t,t.addController(this);}get loaded(){return y}set locale(t){this._locale!==t&&(K.setLocale(t),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/str-tag.js:
4
- @lit/localize/internal/default-msg.js:
5
- @lit/localize/internal/locale-status-event.js:
6
- @lit/localize/internal/types.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.a=N;exports.c=K;exports.d=D;
@@ -1 +0,0 @@
1
- 'use strict';var chunkJ7OISSKU_cjs=require('./chunk-J7OISSKU.cjs'),chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs');var a=["default","synthwave","dolphin"],h={default:()=>import('./themes/default.cjs'),synthwave:()=>import('./themes/synthwave.cjs'),dolphin:()=>import('./themes/dolphin.cjs')};async function p(t){if(!a.includes(t))return;if(!!chunkJ7OISSKU_cjs.a()){let e=`./dist/themes/${t}.js`;return c(e)}let s=h[t];return s?s():void 0}async function c(t){return import(t)}var d=class t{constructor(){this.themes=[];}static async get(n,s){if(t.instance||(t.instance=new t),t.instance.themes.find(e=>e.name===n))return Promise.resolve(t.instance);t.instance.themes.push({name:n}),t.instance.currentTheme=n;try{if(typeof document<"u"&&!a.includes(n)){let e=document.createElement("link");e.rel="stylesheet",e.href=`${s}/${n}.css`,document.head.appendChild(e);}}catch(e){console.log("[mave-player]: theme css not loaded",e);}try{if(s&&!a.includes(n)){let{build:e}=await c(`${s}/${n}.js`);e(n,chunkGO6BV3T4_cjs.i,chunkGO6BV3T4_cjs.c,chunkGO6BV3T4_cjs.h);}else {let e=await p(n);if(e)e.build(n,chunkGO6BV3T4_cjs.i,chunkGO6BV3T4_cjs.c,chunkGO6BV3T4_cjs.h);else {let m=`./${chunkJ7OISSKU_cjs.a()}themes/${n}.js`,{build:u}=await c(m);u(n,chunkGO6BV3T4_cjs.i,chunkGO6BV3T4_cjs.c,chunkGO6BV3T4_cjs.h);}}}catch(e){console.log("[mave-player]: theme not loaded",e);}return Promise.resolve(t.instance)}static async external(n){t.instance||(t.instance=new t);let s=n.split("/").pop()?.replace(".js","")||"";try{if(typeof document<"u"){let e=document.createElement("link");e.rel="stylesheet",e.href=`${n.replace(".js","")}.css`,document.head.appendChild(e);}}catch(e){console.log("[mave-player]: theme css not loaded",e);}if(t.instance.themes.find(e=>e.name===s))return Promise.resolve(t.instance);t.instance.themes.push({name:s}),t.instance.currentTheme=s;try{let{build:e}=await c(n);e(s,chunkGO6BV3T4_cjs.i,chunkGO6BV3T4_cjs.c,chunkGO6BV3T4_cjs.h);}catch(e){console.log("[mave-player]: theme not loaded",e);}return Promise.resolve(t.instance)}static getTheme(){return t.instance?t.instance.currentTheme:""}};exports.a=d;
@@ -1,10 +0,0 @@
1
- 'use strict';var chunk42VJWULJ_cjs=require('./chunk-42VJWULJ.cjs'),chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs');var e=class extends chunk42VJWULJ_cjs.a{get poster(){return `${this.cdn_root}/${this.embedId}/poster.webp`}render(){return chunkGO6BV3T4_cjs.c`<img src=${this.poster} />`}};e.styles=chunkGO6BV3T4_cjs.h`
2
- :host {
3
- display: block;
4
- }
5
-
6
- img {
7
- width: 100%;
8
- max-height: 100vh;
9
- }
10
- `;typeof window<"u"&&window.customElements&&(window.customElements.get("mave-img")||window.customElements.define("mave-img",e));exports.a=e;
@@ -1,29 +0,0 @@
1
- 'use strict';var x=globalThis,L=x.trustedTypes,rt=L?L.createPolicy("lit-html",{createHTML:r=>r}):void 0,Q="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,X="?"+$,Ut=`<${X}>`,A=document,O=()=>A.createComment(""),R=r=>r===null||typeof r!="object"&&typeof r!="function",ct=Array.isArray,pt=r=>ct(r)||typeof r?.[Symbol.iterator]=="function",G=`[
2
- \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,nt=/>/g,S=RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ht=/'/g,at=/"/g,dt=/^(?:script|style|textarea|title)$/i,ut=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),Zt=ut(1),Ft=ut(2),E=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),lt=new WeakMap,g=A.createTreeWalker(A,129);function $t(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return rt!==void 0?rt.createHTML(t):t}var _t=(r,t)=>{let e=r.length-1,s=[],i,o=t===2?"<svg>":"",n=U;for(let d=0;d<e;d++){let h=r[d],l,p,a=-1,u=0;for(;u<h.length&&(n.lastIndex=u,p=n.exec(h),p!==null);)u=n.lastIndex,n===U?p[1]==="!--"?n=ot:p[1]!==void 0?n=nt:p[2]!==void 0?(dt.test(p[2])&&(i=RegExp("</"+p[2],"g")),n=S):p[3]!==void 0&&(n=S):n===S?p[0]===">"?(n=i??U,a=-1):p[1]===void 0?a=-2:(a=n.lastIndex-p[2].length,l=p[1],n=p[3]===void 0?S:p[3]==='"'?at:ht):n===at||n===ht?n=S:n===ot||n===nt?n=U:(n=S,i=void 0);let f=n===S&&r[d+1].startsWith("/>")?" ":"";o+=n===U?h+Ut:a>=0?(s.push(l),h.slice(0,a)+Q+h.slice(a)+$+f):h+$+(a===-2?d:f);}return [$t(r,o+(r[e]||"<?>")+(t===2?"</svg>":"")),s]},T=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0,d=t.length-1,h=this.parts,[l,p]=_t(t,e);if(this.el=r.createElement(l,s),g.currentNode=this.el.content,e===2){let a=this.el.content.firstChild;a.replaceWith(...a.childNodes);}for(;(i=g.nextNode())!==null&&h.length<d;){if(i.nodeType===1){if(i.hasAttributes())for(let a of i.getAttributeNames())if(a.endsWith(Q)){let u=p[n++],f=i.getAttribute(a).split($),k=/([.?@])?(.*)/.exec(u);h.push({type:1,index:o,name:k[2],strings:f,ctor:k[1]==="."?j:k[1]==="?"?D:k[1]==="@"?B:b}),i.removeAttribute(a);}else a.startsWith($)&&(h.push({type:6,index:o}),i.removeAttribute(a));if(dt.test(i.tagName)){let a=i.textContent.split($),u=a.length-1;if(u>0){i.textContent=L?L.emptyScript:"";for(let f=0;f<u;f++)i.append(a[f],O()),g.nextNode(),h.push({type:2,index:++o});i.append(a[u],O());}}}else if(i.nodeType===8)if(i.data===X)h.push({type:2,index:o});else {let a=-1;for(;(a=i.data.indexOf($,a+1))!==-1;)h.push({type:7,index:o}),a+=$.length-1;}o++;}}static createElement(t,e){let s=A.createElement("template");return s.innerHTML=t,s}};function v(r,t,e=r,s){if(t===E)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,o=R(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=v(r,i._$AS(r,t.values),i,s)),t}var z=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,true);g.currentNode=i;let o=g.nextNode(),n=0,d=0,h=s[0];for(;h!==void 0;){if(n===h.index){let l;h.type===2?l=new w(o,o.nextSibling,this,t):h.type===1?l=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(l=new I(o,this,t)),this._$AV.push(l),h=s[++d];}n!==h?.index&&(o=g.nextNode(),n++);}return g.currentNode=A,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++;}},w=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=v(this,t,e),R(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t);}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t));}_(t){this._$AH!==c&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t;}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=T.createElement($t(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new z(i,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o;}}_$AC(t){let e=lt.get(t.strings);return e===void 0&&lt.set(t.strings,e=new T(t)),e}k(t){ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new r(this.S(O()),this.S(O()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i);}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s;}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t));}},b=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c;}_$AI(t,e=this,s,i){let o=this.strings,n=false;if(o===void 0)t=v(this,t,e,0),n=!R(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else {let d=t,h,l;for(t=o[0],h=0;h<o.length-1;h++)l=v(this,d[s+h],e,h),l===E&&(l=this._$AH[h]),n||(n=!R(l)||l!==this._$AH[h]),l===c?t=c:t!==c&&(t+=(l??"")+o[h+1]),this._$AH[h]=l;}n&&!i&&this.j(t);}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},j=class extends b{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===c?void 0:t;}},D=class extends b{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c);}},B=class extends b{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5;}_$AI(t,e=this){if((t=v(this,t,e,0)??c)===E)return;let s=this._$AH,i=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}},I=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){v(this,t);}},Gt={P:Q,A:$,C:X,M:1,L:_t,R:z,D:pt,V:v,I:w,H:b,N:D,U:B,B:j,F:I},xt=x.litHtmlPolyfillSupport;xt?.(T,w),(x.litHtmlVersions??(x.litHtmlVersions=[])).push("3.1.2");var ft=(r,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let o=e?.renderBefore??null;s._$litPart$=i=new w(t.insertBefore(O(),o),o,void 0,e??{});}return i._$AI(r),i};var W=globalThis,V=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),mt=new WeakMap,M=class{constructor(t,e,s){if(this._$cssResult$=true,s!==Y)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(V&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&mt.set(e,t));}return t}toString(){return this.cssText}},yt=r=>new M(typeof r=="string"?r:r+"",void 0,Y),Ot=(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 M(e,r,Y)},tt=(r,t)=>{if(V)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=W.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s);}},q=V?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return yt(e)})(r):r;var{is:Rt,defineProperty:Tt,getOwnPropertyDescriptor:Mt,getOwnPropertyNames:Nt,getOwnPropertySymbols:Ht,getPrototypeOf:kt}=Object,m=globalThis,St=m.trustedTypes,Lt=St?St.emptyScript:"",zt=m.reactiveElementPolyfillSupport,N=(r,t)=>r,et={toAttribute(r,t){switch(t){case Boolean:r=r?Lt: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}},At=(r,t)=>!Rt(r,t),gt={attribute:true,type:String,converter:et,reflect:false,hasChanged:At};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),m.litPropertyMetadata??(m.litPropertyMetadata=new WeakMap);var _=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=gt){if(e.state&&(e.attribute=false),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Tt(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){let{get:i,set:o}=Mt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n;}};return {get(){return i?.call(this)},set(n){let d=i?.call(this);o.call(this,n),this.requestUpdate(t,d,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??gt}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;let t=kt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(N("properties"))){let e=this.properties,s=[...Nt(e),...Ht(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(q(i));}else t!==void 0&&e.push(q(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 tt(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);}_$EC(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:et).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:et;this._$Em=i,this[i]=n.fromAttribute(e,o.type),this._$Em=null;}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??At)(this[t],e))return;this.P(t,e,s);}this.isUpdatePending===false&&(this._$ES=this._$ET());}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===true&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t);}async _$ET(){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)o.wrapped!==true||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],o);}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._$EU();}catch(s){throw t=false,this._$EU(),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);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((e=>this._$EC(e,this[e])))),this._$EU();}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[N("elementProperties")]=new Map,_[N("finalized")]=new Map,zt?.({ReactiveElement:_}),(m.reactiveElementVersions??(m.reactiveElementVersions=[])).push("2.0.4");var P=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;let t=super.createRenderRoot();return (e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ft(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}};P._$litElement$=true,P.finalized=true,globalThis.litElementHydrateSupport?.({LitElement:P});var jt=globalThis.litElementPolyfillSupport;jt?.({LitElement:P});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");var K=globalThis,Z=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Et=new WeakMap,J=class{constructor(t,e,s){if(this._$cssResult$=true,s!==vt)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(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Et.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Et.set(e,t));}return t}toString(){return this.cssText}},bt=r=>new J(typeof r=="string"?r:r+"",void 0,vt);var st=(r,t)=>{if(Z)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=K.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s);}},F=Z?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return bt(e)})(r):r;var {is:Dt,defineProperty:Bt,getOwnPropertyDescriptor:It,getOwnPropertyNames:Wt,getOwnPropertySymbols:Vt,getPrototypeOf:qt}=Object,y=globalThis,Ct=y.trustedTypes,Kt=Ct?Ct.emptyScript:"",Jt=y.reactiveElementPolyfillSupport,H=(r,t)=>r,it={toAttribute(r,t){switch(t){case Boolean:r=r?Kt: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}},Pt=(r,t)=>!Dt(r,t),wt={attribute:true,type:String,converter:it,reflect:false,hasChanged:Pt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),y.litPropertyMetadata??(y.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=wt){if(e.state&&(e.attribute=false),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Bt(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){let{get:i,set:o}=It(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n;}};return {get(){return i?.call(this)},set(n){let d=i?.call(this);o.call(this,n),this.requestUpdate(t,d,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??wt}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;let t=qt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(H("properties"))){let e=this.properties,s=[...Wt(e),...Vt(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(F(i));}else t!==void 0&&e.push(F(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 st(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);}_$EC(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:it).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:it;this._$Em=i,this[i]=n.fromAttribute(e,o.type),this._$Em=null;}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??Pt)(this[t],e))return;this.P(t,e,s);}this.isUpdatePending===false&&(this._$ES=this._$ET());}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===true&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t);}async _$ET(){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)o.wrapped!==true||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],o);}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._$EU();}catch(s){throw t=false,this._$EU(),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);}_$EU(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((e=>this._$EC(e,this[e])))),this._$EU();}updated(t){}firstUpdated(t){}};C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[H("elementProperties")]=new Map,C[H("finalized")]=new Map,Jt?.({ReactiveElement:C}),(y.reactiveElementVersions??(y.reactiveElementVersions=[])).push("2.0.4");/*! Bundled license information:
4
-
5
- lit-html/lit-html.js:
6
- @lit/reactive-element/reactive-element.js:
7
- lit-element/lit-element.js:
8
- @lit/reactive-element/reactive-element.js:
9
- (**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- *)
14
-
15
- @lit/reactive-element/css-tag.js:
16
- @lit/reactive-element/css-tag.js:
17
- (**
18
- * @license
19
- * Copyright 2019 Google LLC
20
- * SPDX-License-Identifier: BSD-3-Clause
21
- *)
22
-
23
- lit-html/is-server.js:
24
- (**
25
- * @license
26
- * Copyright 2022 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- *)
29
- */exports.a=it;exports.b=Pt;exports.c=Zt;exports.d=Ft;exports.e=E;exports.f=c;exports.g=Gt;exports.h=Ot;exports.i=P;
@@ -1,9 +0,0 @@
1
- 'use strict';var chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs');var e=t=>t??chunkGO6BV3T4_cjs.f;/*! 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
- */exports.a=e;
@@ -1,9 +0,0 @@
1
- import {b,c,a}from'./chunk-MMHEOMF5.js';import {e}from'./chunk-27BWRXCN.js';var u="important",d=" !"+u,h=b(class extends c{constructor(s){if(super(s),s.type!==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 e}});/*! 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
- */export{h as a};
@@ -1,37 +0,0 @@
1
- 'use strict';var chunk43KJ6TMU_cjs=require('./chunk-43KJ6TMU.cjs'),chunkSDKTBB4N_cjs=require('./chunk-SDKTBB4N.cjs'),chunkJ74VK4RB_cjs=require('./chunk-J74VK4RB.cjs'),chunkRBBM42XM_cjs=require('./chunk-RBBM42XM.cjs'),chunkWIS6FQDY_cjs=require('./chunk-WIS6FQDY.cjs'),chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.cjs'),chunkEVKPEPYP_cjs=require('./chunk-EVKPEPYP.cjs'),chunkJHSFSCC2_cjs=require('./chunk-JHSFSCC2.cjs');var i,v,c,u,y,M,p,I,S,T,r=class extends chunkGO6BV3T4_cjs.i{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 chunk43KJ6TMU_cjs.a(this,{callback:chunkJHSFSCC2_cjs.g(this,i,S).bind(this)});this.embedController=new chunkRBBM42XM_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)??false;}get loop(){return this._loop}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,o)=>e.size===o.size?chunkJHSFSCC2_cjs.d(this,i,u).indexOf(e.codec)-chunkJHSFSCC2_cjs.d(this,i,u).indexOf(o.codec):chunkJHSFSCC2_cjs.d(this,i,c).indexOf(o.size)-chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size)).map(e=>{let o=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:o,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,o)=>chunkJHSFSCC2_cjs.d(this,i,c).indexOf(o.size)-chunkJHSFSCC2_cjs.d(this,i,c).indexOf(e.size));if(d.length>0){let e=d[0],o=`${e.codec}_${e.size}${e.type&&e.type!="video"?`_${e.type}`:""}.mp4`,m={media:void 0,src:this.embedController.embedFile(o),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 chunkGO6BV3T4_cjs.c`
2
- ${this.embedController.render({complete:t=>{if(this._embed=t,!!t)return chunkGO6BV3T4_cjs.c`
3
- <video
4
- @click=${chunkJHSFSCC2_cjs.g(this,i,T)}
5
- preload="metadata"
6
- style=${chunkJ74VK4RB_cjs.a(this._failedPlay||this.autoplay==="off"?"cursor: pointer":void 0)}
7
- muted
8
- playsinline
9
- poster=${chunkJ74VK4RB_cjs.a(this._failedPlay?this.poster:void 0)}
10
- ${chunk43KJ6TMU_cjs.c(chunkJHSFSCC2_cjs.g(this,i,I))}
11
- ?autoplay=${this.autoplay==="always"}
12
- ?loop=${this.loop||true}
13
- >
14
- ${this.sources.map(s=>chunkGO6BV3T4_cjs.c`
15
- <source
16
- media=${chunkJ74VK4RB_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 o=0;if(s<e&&d>0){let m=t+e;o=(e-s)/m*this._videoElement.duration;}o>=0&&o<=this._videoElement.duration&&(this._videoElement.currentTime=o);}},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),o=/iPhone|iPad/.test(t);return e&&(d||s)||o?["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});chunk43KJ6TMU_cjs.b.config={apiEndpoint:chunkEVKPEPYP_cjs.a.metrics.endpoint},chunkEVKPEPYP_cjs.a.metrics.enabled&&(this._metricsInstance=new chunk43KJ6TMU_cjs.b(this._videoElement,this.embed,{component:"clip"}));}this._queue.length&&(this._queue.forEach(s=>s()),this._queue=[]);},S=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();}},T=function(){(this.autoplay==="off"||this._failedPlay)&&(this._videoElement?.paused?chunkJHSFSCC2_cjs.g(this,i,p).call(this):this._videoElement?.pause());},r.styles=chunkGO6BV3T4_cjs.h`
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: cover;
36
- }
37
- `,chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"embed",1),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"autoplay",2),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"quality",2),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"fallback",2),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"loop",1),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"poster",1),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_cjs.a()],r.prototype,"token",1),chunkJHSFSCC2_cjs.c([chunkWIS6FQDY_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,33 +0,0 @@
1
- import {a}from'./chunk-P6SBZPDR.js';var M=e=>typeof e!="string"&&"strTag"in e,p=(e,t,o)=>{let n=e[0];for(let r=1;r<e.length;r++)n+=t[o?o[r-1]:r-1],n+=e[r];return n};var c=(e=>M(e)?p(e.strings,e.values):e);var d="lit-localize-status";var x=class{constructor(t){this.__litLocalizeEventHandler=o=>{o.detail.status==="ready"&&this.host.requestUpdate();},this.host=t;}hostConnected(){window.addEventListener(d,this.__litLocalizeEventHandler);}hostDisconnected(){window.removeEventListener(d,this.__litLocalizeEventHandler);}},F=e=>e.addController(new x(e)),I=F;var N=()=>(e,t)=>(e.addInitializer(I),e);var u=class{constructor(){this.settled=false,this.promise=new Promise((t,o)=>{this._resolve=t,this._reject=o;});}resolve(t){this.settled=true,this._resolve(t);}reject(t){this.settled=true,this._reject(t);}};var i=[];for(let e=0;e<256;e++)i[e]=(e>>4&15).toString(16)+(e&15).toString(16);function C(e){let t=0,o=8997,n=0,r=33826,s=0,a=40164,L=0,f=52210;for(let v=0;v<e.length;v++)o^=e.charCodeAt(v),t=o*435,n=r*435,s=a*435,L=f*435,s+=o<<8,L+=r<<8,n+=t>>>16,o=t&65535,s+=n>>>16,r=n&65535,f=L+(s>>>16)&65535,a=s&65535;return i[f>>8]+i[f&255]+i[a>>8]+i[a&255]+i[r>>8]+i[r&255]+i[o>>8]+i[o&255]}var W="",$="h",b="s";function z(e,t){return (t?$:b)+C(typeof e=="string"?e:e.join(W))}var A=new WeakMap,R=new Map;function j(e,t,o){if(e){let n=o?.id??O(t),r=e[n];if(r){if(typeof r=="string")return r;if("strTag"in r)return p(r.strings,t.values,r.values);{let s=A.get(r);return s===void 0&&(s=r.values,A.set(r,s)),{...r,values:s.map(a=>t.values[a])}}}}return c(t)}function O(e){let t=typeof e=="string"?e:e.strings,o=R.get(t);return o===void 0&&(o=z(t,typeof e!="string"&&!("strTag"in e)),R.set(t,o)),o}function _(e){window.dispatchEvent(new CustomEvent(d,{detail:e}));}var g="",E,H,h,w,P,l=new u;l.resolve();var m=0,U=e=>(S(((t,o)=>j(P,t,o))),g=H=e.sourceLocale,h=new Set(e.targetLocales),h.add(e.sourceLocale),w=e.loadLocale,{getLocale:k,setLocale:X}),k=()=>g,X=e=>{if(e===(E??g))return l.promise;if(!h||!w)throw new Error("Internal error");if(!h.has(e))throw new Error("Invalid locale code");m++;let t=m;return E=e,l.settled&&(l=new u),_({status:"loading",loadingLocale:e}),(e===H?Promise.resolve({templates:void 0}):w(e)).then(n=>{m===t&&(g=e,E=void 0,P=n.templates,_({status:"ready",readyLocale:e}),l.resolve());},n=>{m===t&&(_({status:"error",errorLocale:e,errorMessage:n.toString()}),l.reject(n));}),l.promise};var q=c,V=false;function S(e){if(V)throw new Error("lit-localize can only be configured once");q=e,V=true;}var G={en:()=>import('./generated/locales/en.js'),nl:()=>import('./generated/locales/nl.js'),de:()=>import('./generated/locales/de.js'),fr:()=>import('./generated/locales/fr.js')};function B(e){return G[e]}async function J(e){let t=a();if(!t)return null;try{return await import(new URL(`./${t}generated/locales/${e}.js`,import.meta.url).href)}catch{return null}}var K=U({sourceLocale:"default",targetLocales:["en","nl","de","fr"],loadLocale:async e=>{let t=B(e);if(t)try{return await t()}catch(n){console.error(`[mave-player]: failed to load locale ${e}`,n);}let o=await J(e);return o||(console.log(`[mave-player]: locale not loaded for ${e}`),null)}}),y=false,D=class{constructor(t){this._onLoad=t=>{t.detail.status==="loading"?y=false:t.detail.status==="ready"&&(y=true),this.host.requestUpdate();};this.host=t,t.addController(this);}get loaded(){return y}set locale(t){this._locale!==t&&(K.setLocale(t),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/str-tag.js:
4
- @lit/localize/internal/default-msg.js:
5
- @lit/localize/internal/locale-status-event.js:
6
- @lit/localize/internal/types.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
- */export{N as a,q as b,K as c,D as d};
@@ -1,9 +0,0 @@
1
- 'use strict';var chunkRRCW5BBR_cjs=require('./chunk-RRCW5BBR.cjs'),chunkGO6BV3T4_cjs=require('./chunk-GO6BV3T4.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 chunkGO6BV3T4_cjs.e}});/*! 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,17 +0,0 @@
1
- import {b,c as c$1,a as a$1}from'./chunk-MMHEOMF5.js';import {g,f as f$1}from'./chunk-27BWRXCN.js';var fe=class{constructor(e,{target:s,config:r,callback:d,skipInitial:b}){this.t=new Set,this.o=false,this.i=false,this.h=e,s!==null&&this.t.add(s??e),this.o=b??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)},ne=(i,e,s)=>e.has(i)||pe("Cannot "+s),t=(i,e,s)=>(ne(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)=>(ne(i,e,"write to private field"),e.set(i,s),s),h=(i,e,s)=>(ne(i,e,"access private method"),s),H,_e=class x{static setDebug(e){n(x,H,e);}static debugEnabled(){if(t(x,H))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){x.debugEnabled()&&(typeof s>"u"?console.debug(`[mave_data]: ${e}`):console.debug(`[mave_data]: ${e}`,s));}};H=new WeakMap;o(_e,H,false);var f=_e,q,m,I,S,ae,G,z,W,p,me,ve,$,he,ge,be,ye,we,ke,Ae,Le=class g{constructor(){if(o(this,p),o(this,q,{apiEndpoint:""}),o(this,m,[]),o(this,I,null),o(this,S,null),o(this,ae,5e3),o(this,G,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;ae=new WeakMap;G=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,ae))),t(this,m).length>=t(this,G)&&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,b=h(this,p,be).call(this,e);f.debug("Data.flush.start",{url:s,buffered:e.length,batches:b.map(_=>_.length),keepalive:r,preferBeacon:d});let B=false;n(this,W,(async()=>{for(let _ of b){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,he).call(this),B&&h(this,p,$).call(this);}));};he=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,he).call(this),n(this,m,[]),n(this,W,null);};be=function(i){let e=[],s=[],r=0;for(let d of i){let b=h(this,p,ye).call(this,d),B=r+b>t(this,z),_=s.length>=t(this,G);s.length>0&&(B||_)&&(e.push(s),s=[],r=0),s.push(d),r+=b;}return s.length>0&&e.push(s),e};ye=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=Le;function Be(){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 re=(i=>(i.PLAYING="playing",i.ENDED="ended",i.PAUSE="pause",i))(re||{}),a,c,y,w,C,T,O,P,k,D,v,A,le,oe,ce,M,J,l,U,j,X,R,Y,L,Te,Ee,Me,F,se,$e,Se,Pe,N,E,De,Re=class{constructor(...i){if(o(this,l),this.VERSION="0.1.0",o(this,a),o(this,c,null),o(this,y,false),o(this,w,false),o(this,C,null),o(this,T,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,le,750),o(this,oe,1),o(this,ce,300),o(this,M,false),o(this,J,e=>h(this,l,De).call(this,e)),o(this,j,()=>{if(!t(this,y)||!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,T,false),h(this,l,F).call(this),h(this,l,E).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,y)&&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,y)&&t(this,a)){if(t(this,c)==="play"){n(this,w,false),n(this,T,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,M,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),n(this,T,false),u.flush(),n(this,w,false);}else n(this,T,true),n(this,w,false);}},200))));}),o(this,R,()=>{t(this,y)&&document.visibilityState==="hidden"&&u.flush();}),o(this,Y,e=>{if(t(this,y)){if(e.persisted){u.flush();return}h(this,l,se).call(this),h(this,l,Me).call(this),u.flushOnExit();}}),this.sessionId=Be(),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,y)?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,R)),window.addEventListener("pagehide",t(this,Y)),n(this,y,true)):f.error(`${this.querySelectorable} is not a valid reference to a HTMLVideoElement.`),this)}demonitor(){t(this,y)&&(h(this,l,se).call(this),h(this,l,Te).call(this),h(this,l,U).call(this),h(this,l,E).call(this),h(this,l,Pe).call(this),window.removeEventListener("visibilitychange",t(this,R)),window.removeEventListener("pagehide",t(this,Y)),n(this,y,false));}};a=new WeakMap;c=new WeakMap;y=new WeakMap;w=new WeakMap;C=new WeakMap;T=new WeakMap;O=new WeakMap;P=new WeakMap;k=new WeakMap;D=new WeakMap;v=new WeakMap;A=new WeakMap;le=new WeakMap;oe=new WeakMap;ce=new WeakMap;M=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;R=new WeakMap;Y=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()}};Te=function(){t(this,a)&&(t(this,a).paused||t(this,c)!=="pause"&&(t(this,v)||(h(this,l,Ee).call(this),u.flush())));};Ee=function(){t(this,a)&&t(this,c)!=="pause"&&(t(this,v)||(u.push(h(this,l,L).call(this,"pause")),n(this,c,"pause")));};Me=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);};se=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,M,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,ce))));};Se=function(){f.debug("Metrics.listeners.attach",{embed_id:this.embedId,session_id:this.sessionId});for(let i of Object.values(re))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(re))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,y)&&!t(this,a).paused&&!t(this,a).ended?n(this,k,window.requestAnimationFrame(i)):n(this,k,null);};n(this,k,window.requestAnimationFrame(i));};E=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,T)}),i.type){case "playing":if(h(this,l,F).call(this),t(this,T)){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,M,true),n(this,O,Date.now()+1500),h(this,l,N).call(this),u.flush();}n(this,T,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,M,false),h(this,l,N).call(this);break;case "pause":if(t(this,a)?.seeking){h(this,l,E).call(this);break}if(t(this,c)==="pause"){h(this,l,E).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,le)&&(r<=t(this,oe)||t(this,M))){h(this,l,$e).call(this,{...e,name:"pause"}),h(this,l,E).call(this);break}u.push({...e,name:"pause"}),n(this,c,"pause"),n(this,M,false),h(this,l,E).call(this),u.flush();break;case "ended":h(this,l,F).call(this),h(this,l,E).call(this),t(this,c)!=="pause"&&(u.push({...e,name:"pause"}),n(this,c,"pause"),u.flush());break;}};var{I:Fe}=g;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),Ve(e);}};function Ne(i){this._$AN!==void 0?(Q(this),this._$AM=i,We(this)):this._$AM=i;}function Oe(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 b=s;b<r.length;b++)V(r[b],false),Q(r[b]);else r!=null&&(V(r,false),Q(r));else V(this,i);}var Ve=i=>{i.type==a$1.CHILD&&(i._$AP??(i._$AP=Oe),i._$AQ??(i._$AQ=Ne));},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 ue=new WeakMap,et=b(class extends K{render(i){return f$1}update(i,[e]){let s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=i.options?.host,this.rt(this.ct=i.element)),f$1}rt(i){if(typeof this.Y=="function"){let e=this.ht??globalThis,s=ue.get(e);s===void 0&&(s=new WeakMap,ue.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i);}else this.Y.value=i;}get lt(){return typeof this.Y=="function"?ue.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});/*! Bundled license information:
2
-
3
- lit-html/directive-helpers.js:
4
- lit-html/directives/ref.js:
5
- (**
6
- * @license
7
- * Copyright 2020 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- *)
10
-
11
- lit-html/async-directive.js:
12
- (**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
- */export{fe as a,Re as b,et as c};
@@ -1,17 +0,0 @@
1
- 'use strict';var h=window,c=h.ShadowRoot&&(h.ShadyCSS===void 0||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,m=Symbol(),_=new WeakMap,l=class{constructor(t,e,s){if(this._$cssResult$=true,s!==m)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(c&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=_.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&_.set(e,t));}return t}toString(){return this.cssText}},g=r=>new l(typeof r=="string"?r:r+"",void 0,m);var v=(r,t)=>{c?r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((e=>{let s=document.createElement("style"),i=h.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s);}));},u=c?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return g(e)})(r):r;var f,d=window,$=d.trustedTypes,A=$?$.emptyScript:"",b=d.reactiveElementPolyfillSupport,y={toAttribute(r,t){switch(t){case Boolean:r=r?A: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}},p=(r,t)=>t!==r&&(t==t||r==r),S={attribute:true,type:String,converter:y,reflect:false,hasChanged:p},n=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=false,this.hasUpdated=false,this._$El=null,this.u();}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t);}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach(((e,s)=>{let i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i));})),t}static createProperty(t,e=S){if(e.state&&(e.attribute=false),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i);}}static getPropertyDescriptor(t,e,s){return {get(){return this[e]},set(i){let o=this[t];this[e]=i,this.requestUpdate(t,o,s);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)||S}static finalize(){if(this.hasOwnProperty("finalized"))return false;this.finalized=true;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let i of s)this.createProperty(i,e[i]);}return this.elementStyles=this.finalizeStyles(this.styles),true}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(u(i));}else t!==void 0&&e.push(u(t));return e}static _$Ep(t,e){let s=e.attribute;return s===false?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach((e=>e(this)));}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t));}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e]);}));}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return v(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(true),(t=this._$ES)===null||t===void 0||t.forEach((e=>{var s;return (s=e.hostConnected)===null||s===void 0?void 0:s.call(e)}));}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach((e=>{var s;return (s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)}));}attributeChangedCallback(t,e,s){this._$AK(t,s);}_$EO(t,e,s=S){var i;let o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===true){let a=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:y).toAttribute(e,s.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null;}}_$AK(t,e){var s;let i=this.constructor,o=i._$Ev.get(t);if(o!==void 0&&this._$El!==o){let a=i.getPropertyOptions(o),U=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?a.converter:y;this._$El=o,this[o]=U.fromAttribute(e,a.type),this._$El=null;}}requestUpdate(t,e,s){let i=true;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||p)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===true&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=false),!this.isUpdatePending&&i&&(this._$E_=this._$Ej());}async _$Ej(){this.isUpdatePending=true;try{await this._$E_;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((i,o)=>this[o]=i)),this._$Ei=void 0);let e=false,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach((i=>{var o;return (o=i.hostUpdate)===null||o===void 0?void 0:o.call(i)})),this.update(s)):this._$Ek();}catch(i){throw e=false,this._$Ek(),i}e&&this._$AE(s);}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach((s=>{var i;return (i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$Ek(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return true}update(t){this._$EC!==void 0&&(this._$EC.forEach(((e,s)=>this._$EO(s,this[s],e))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}};n.finalized=true,n.elementProperties=new Map,n.elementStyles=[],n.shadowRootOptions={mode:"open"},b?.({ReactiveElement:n}),((f=d.reactiveElementVersions)!==null&&f!==void 0?f:d.reactiveElementVersions=[]).push("1.6.1");var w=Symbol(),E=class{get taskComplete(){return this.t||(this.status===1?this.t=new Promise(((t,e)=>{this.i=t,this.o=e;})):this.status===3?this.t=Promise.reject(this.h):this.t=Promise.resolve(this.l)),this.t}constructor(t,e,s){this.u=0,this.status=0,(this.p=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this._=i.task,this.v=i.args,this.j=i.argsEqual??C,this.m=i.onComplete,this.g=i.onError,this.autoRun=i.autoRun??true,"initialValue"in i&&(this.l=i.initialValue,this.status=2,this.k=this.A?.());}hostUpdate(){this.autoRun===true&&this.O();}hostUpdated(){this.autoRun==="afterUpdate"&&this.O();}A(){if(this.v===void 0)return;let t=this.v();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async O(){let t=this.A(),e=this.k;this.k=t,t===e||t===void 0||e!==void 0&&this.j(e,t)||await this.run(t);}async run(t){let e,s;t??(t=this.A()),this.k=t,this.status===1?this.T?.abort():(this.t=void 0,this.i=void 0,this.o=void 0),this.status=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this.p.requestUpdate())):this.p.requestUpdate();let i=++this.u;this.T=new AbortController;let o=false;try{e=await this._(t,{signal:this.T.signal});}catch(a){o=true,s=a;}if(this.u===i){if(e===w)this.status=0;else {if(o===false){try{this.m?.(e);}catch{}this.status=2,this.i?.(e);}else {try{this.g?.(s);}catch{}this.status=3,this.o?.(s);}this.l=e,this.h=s;}this.p.requestUpdate();}}abort(t){this.status===1&&this.T?.abort(t);}get value(){return this.l}get error(){return this.h}render(t){switch(this.status){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.status)}}},C=(r,t)=>r===t||r.length===t.length&&r.every(((e,s)=>!p(e,t[s])));/*! 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
- @lit/task/task.js:
12
- (**
13
- * @license
14
- * Copyright 2017 Google LLC
15
- * SPDX-License-Identifier: BSD-3-Clause
16
- *)
17
- */exports.a=E;