"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),c=require("lodash"),u=["src"],d=n.defineComponent({name:"zv-media-iframe"}),f=n.defineComponent({...d,props:{basicOption:{},sceneOption:{},useEvents:{}},emits:["on-iframe-event-listener"],setup(o,{expose:i,emit:r}){const t=n.ref(),s=o,l=r;return window.addEventListener("message",e=>{l("on-iframe-event-listener",e.data),s.useEvents&&c.isArray(s.useEvents)&&window.SHJParseEvent(s.useEvents,"on-iframe-event-listener",e.data)},!1),i({sendChildrenMessages:(e,a)=>{e[0].dataType==="params"?t.value.contentWindow.postMessage(a,s.basicOption.url):t.value.contentWindow.postMessage(e[0].data,s.basicOption.url)}}),(e,a)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"iframeRef",ref:t,src:e.basicOption.url,class:"iframe",sandbox:"allow-scripts allow-same-origin allow-forms"},null,8,u))}});exports.default=f;
