System.register(["./index-legacy-BiCnHnDr.js","./artplayer-legacy-Gcf7JRwd.js","./containers-legacy-DlhFG1K3.js","./_plugin-vue_export-helper-legacy-BVIICed7.js"],function(t,e){"use strict";var o,a,l,r,n,d,i,c,u,s,v,p,h,y,g,w,b,f,m,x,I,C;return{setters:[t=>{o=t.u,a=t.r,l=t.a,r=t.G,n=t.w,d=t.c,i=t.n,c=t.o,u=t.b,s=t.d,v=t.e,p=t.v,h=t.f,y=t.g,g=t.h,w=t.i,b=t.l,f=t.E},t=>{m=t.e},t=>{x=t.l,I=t.a},t=>{C=t._}],execute:function(){var e=document.createElement("style");e.textContent='@charset "UTF-8";.container[data-v-2578c914]{position:absolute}.art-video-player[data-v-2578c914]{background-color:transparent!important}.art-controls[data-v-2578c914],.art-progress[data-v-2578c914]{display:none!important}[data-v-2578c914] .art-video-player{background-color:transparent!important}[data-v-2578c914] .art-controls,[data-v-2578c914] .art-progress,[data-v-2578c914] .art-bottom,[data-v-2578c914] .art-control-pip,[data-v-2578c914] .art-control-fullscreen,[data-v-2578c914] .art-control-fullscreenWeb,.art-state[data-v-2578c914],.art-state-icon[data-v-2578c914]{display:none!important}\n/*$vite$:1*/',document.head.appendChild(e),t("default",C({__name:"AudioContainer",props:{id:String,layoutId:String,partner:String,code:String},setup(t){const e=o();m.CONTEXTMENU=!1,m.NOTICE_TIME=0,m.CONTROL_HIDE_TIME=0,m.RECONNECT_TIME_MAX=10;const C="https://display24.ru",_=a(!1);let E=null;const T=t,$=l({id:null,displayCode:null,layoutId:null,content:null,schedule:null,scheduleData:null,top:0,left:0,width:0,height:0,background:{color:"#000"},zIndex:0,border:{width:0,style:"solid",color:"#fff",radius:0},shadow:{x:0,y:0,b:0,color:"transparent"}}),k=a(null),S=a(r(32));n(()=>e.mute,t=>{k.value&&(k.value.muted=t)});const j=d(()=>{var t,e,o,a,l,r,n,d,c;return{position:"absolute",top:$.top+"px",left:$.left+"px",width:$.width+"px",height:$.height+"px",backgroundColor:i(null===(t=$.background)||void 0===t?void 0:t.color)||"#000",zIndex:$.zIndex||0,borderColor:(null===(e=$.border)||void 0===e?void 0:e.color)||"#fff",borderStyle:(null===(o=$.border)||void 0===o?void 0:o.style)||"solid",borderWidth:((null===(a=$.border)||void 0===a?void 0:a.width)||0)+"px",borderRadius:(null===(l=$.border)||void 0===l?void 0:l.radius)+"px",boxShadow:`${null===(r=$.shadow)||void 0===r?void 0:r.x}px ${null===(n=$.shadow)||void 0===n?void 0:n.y}px ${null===(d=$.shadow)||void 0===d?void 0:d.b}px ${null===(c=$.shadow)||void 0===c?void 0:c.color}`}}),M=t=>{var e,o;switch(t){case 1:return{objectFit:"fill",width:$.width+"px",height:$.height+"px"};case 2:return{objectFit:"cover",width:"100%",height:"100%"};default:return{objectFit:"none",width:(null===(e=$.content)||void 0===e?void 0:e.width)+"px",height:(null===(o=$.content)||void 0===o?void 0:o.height)+"px"}}};return c(async()=>{$.id=T.id,$.displayCode=T.code,$.layoutId=T.layoutId,await x($,C,"AudioContainer (layouts)"),await I($,_,C,"AudioContainer (schedule)"),E=setInterval(()=>{_.value=u(null==$?void 0:$.scheduleData)},1e3)}),s(()=>{E&&clearInterval(E),k.value&&k.value.destroy(!1)}),n(()=>$.content,async t=>{if(!t||!t.filename)return;const e=document.querySelector(".audio-"+S.value);if(!e)return void console.error("Контейнер для аудио-плеера не найден");k.value&&(k.value.destroy(!1),k.value=null);const o=await(async t=>{const e=`https://cdn.display24.ru/partners/${T.partner}/${t}`;return await f(e)})(t.filename);k.value=new m({container:e,url:o,autoplay:!1,muted:!1,loop:!0,volume:1,isLive:!1,setting:!1,hotkey:!1,pip:!1,mutex:!1,fullscreen:!1,fullscreenWeb:!1,miniProgressBar:!1,preload:"auto",playsinline:!0,controlsList:"nodownload",controls:[],clickToPlay:!1,show:!1,icons:{state:""},moreVideoAttr:{playsinline:!0,controlsList:"nodownload"}}),k.value.play().catch(t=>{console.warn("Автозапуск заблокирован/ошибка",t)})}),n(_,t=>{const e=k.value;if(!e)return;const o=e.template.$video||e.template.video;if(o)if(t)e.play().catch(t=>{console.warn("Автозапуск заблокирован/ошибка",t)});else try{o.pause(),o.currentTime=0}catch(a){}}),n(()=>$.scheduleData,t=>{_.value=u(t)}),(t,e)=>{var o;return v((y(),h("div",{class:"container",style:w(j.value)},[g("",!0),(y(),h("div",{class:b("audio-"+S.value),style:w(M(null===(o=$.content)||void 0===o?void 0:o.mediaMode)),key:S.value},null,6))],4)),[[p,_.value]])}}},[["__scopeId","data-v-2578c914"]]))}}});
