System.register(["./index-legacy-kPmrjNKx.js","./_plugin-vue_export-helper-legacy-BVIICed7.js"],function(e,o){"use strict";var t,n,l,a,i,d,r,s,u,c,v,p,h,y,f,g,w;return{setters:[e=>{t=e.r,n=e.a,l=e.c,a=e.n,i=e.o,d=e.b,r=e.d,s=e.w,u=e.e,c=e.v,v=e.f,p=e.g,h=e.h,y=e.i,f=e.s,g=e.j},e=>{w=e._}],execute:function(){var o=document.createElement("style");o.textContent=".container[data-v-fd167a09]{position:absolute}.info[data-v-fd167a09]{padding:20px;position:absolute;top:20px;left:20px;right:20px;background-color:rgba(0,0,0,.4);font-size:80%;border-radius:5px}\n/*$vite$:1*/",document.head.appendChild(o),e("default",w({__name:"BlankContainer",props:{id:String,layoutId:String,partner:String},setup(e){const o="https://display24.ru",w=t(!1);let b=null;const x=e;let O=n({id:null,layoutId:null,schedule:null});const S=l(()=>{var e,o,t,n,l,i,d,r,s;return{top:O.top+"px",left:O.left+"px",width:O.width+"px",height:O.height+"px",backgroundColor:a(null===(e=O.background)||void 0===e?void 0:e.color)||"#000",zIndex:O.zIndex||0,borderColor:(null===(o=O.border)||void 0===o?void 0:o.color)||"#fff",borderStyle:(null===(t=O.border)||void 0===t?void 0:t.style)||"solid",borderWidth:((null===(n=O.border)||void 0===n?void 0:n.width)||0)+"px",borderRadius:(null===(l=O.border)||void 0===l?void 0:l.radius)+"px",boxShadow:`${null===(i=O.shadow)||void 0===i?void 0:i.x}px ${null===(d=O.shadow)||void 0===d?void 0:d.y}px ${null===(r=O.shadow)||void 0===r?void 0:r.b}px ${null===(s=O.shadow)||void 0===s?void 0:s.color}`}});return i(async()=>{O.id=x.id,O.layoutId=x.layoutId,await async function(){try{const n=(await y.get(`${o}/api/v1/player/layouts/${O.layoutId}?v=`+Date.now(),{headers:{"Content-Type":"application/json"},timeout:5e3})).data;if(!n||"object"!=typeof n||!0!==n.online)throw new Error("OFFLINE_OR_HTML_STUB_200");if(200==(null==n?void 0:n.code)){var e,t;let o=(null===(e=n.data)||void 0===e?void 0:e[0])||{};o=JSON.parse(JSON.stringify(o));let l=null===(t=o)||void 0===t?void 0:t.content.find(e=>e.id==O.id);l&&Object.assign(O,l),f("layouts",O.layoutId,o).then(e=>e&&console.info("BlankContainer (layouts): Сохранение данных в кэш")).catch(console.error)}else console.warn("BlankContainer (layouts): Нет данных")}catch(l){let e=await g("layouts",O.layoutId)||{};if(e=JSON.parse(JSON.stringify(e)),e){var n;let o=null===(n=e)||void 0===n?void 0:n.content.find(e=>e.id==O.id);return o&&Object.assign(O,o),console.warn("BlankContainer (layouts): Данные загружены из кэша"),!0}return console.error("BlankContainer (layouts): Нет данных в кэше."),!1}}(),await async function(){if(O.schedule)try{const n=(await y.get(`${o}/api/v1/player/schedules/${O.schedule}?v=`+Date.now(),{headers:{"Content-Type":"application/json"},timeout:5e3})).data;if(!n||"object"!=typeof n||!0!==n.online)throw new Error("OFFLINE_OR_HTML_STUB_200");if(200==(null==n?void 0:n.code)){var e,t;let o=(null===(e=n.data)||void 0===e?void 0:e[0])||{};o=JSON.parse(JSON.stringify(o));let l=(null===(t=o)||void 0===t?void 0:t.content)||null;Object.assign(O,{scheduleData:l}),w.value=d(null==O?void 0:O.scheduleData),f("schedule",O.schedule,o).then(e=>e&&console.info("BlankContainer (schedules): Сохранение данных в кэш")).catch(console.error)}else console.warn("BlankContainer (schedules): Нет данных")}catch(l){let e=await g("schedule",O.schedule)||{};if(e=JSON.parse(JSON.stringify(e)),e){var n;let o=(null===(n=e)||void 0===n?void 0:n.content)||null;return Object.assign(O,{scheduleData:o}),w.value=d(null==O?void 0:O.scheduleData),console.warn("BlankContainer (schedules): Данные загружены из кэша"),!0}return console.error("BlankContainer (schedules): Нет данных в кэше"),!1}}(),b=setInterval(()=>{w.value=d(null==O?void 0:O.scheduleData)},1e3)}),r(()=>{b&&clearInterval(b)}),s(()=>O.scheduleData,e=>{w.value=d(e)}),(e,o)=>u((p(),v("div",{class:"container",style:h(S.value)},null,4)),[[c,w.value]])}},[["__scopeId","data-v-fd167a09"]]))}}});
