"use strict";var e=require("@kdcloudjs/kwc"),t=require("./shadowBaseClassPrivate.js"),s=require("./messageDispatcher.js"),i=require("../ssr-RXknEJpO.js");require("../observable-BXDJFaLN.js"),require("../i18n-CP31jeWH.js"),require("../utilsPrivate-DL4VBetH.js"),require("../client-Co_j5m_k.js"),require("./iso8601Utils.js"),require("../colorValid-BBnkvgd_.js"),require("../empty_html-hFq4zm9t.js");var n=[function(e,t,s){return".kdds-non-salseforce-resource"+(e?"["+e+"]":"")+" {display: none;}"}];function o(e,t,s,i){const{b:n,h:o}=e,{_m0:r}=i;return[o("iframe",{style:t.frameStyle,attrs:{src:t.src,title:t.title,width:t.width,height:t.height,lang:t.language},key:0,on:r||(i._m0={load:n(t.handleContentLoad)})})]}var r=e.registerTemplate(o);o.stylesheets=[],o.stylesheetToken="kwc-7d89m8ebf1g",o.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveIframe-undefined_primitiveIframe",n&&o.stylesheets.push.apply(o.stylesheets,n),e.freezeTemplate(o);class a extends t{constructor(...e){super(...e),this.src=void 0,this.domain=void 0,this.width="100%",this.height="100%",this.frameStyle="",this.title=void 0,this.language=void 0}connectedCallback(){super.connectedCallback(),s.registerDomain(this.src)}renderedCallback(){this.language=i.isCSR&&document.documentElement.lang||null}disconnectedCallback(){s.unregisterDomain(this.src)}handleContentLoad(){const e=new CustomEvent("iframeload",{detail:{callbacks:{postToWindow:this.postToWindow.bind(this)}}});this.contentWindow=this.template.querySelector("iframe").contentWindow,this.dispatchEvent(e)}postToWindow(e){this.contentWindow&&this.contentWindow.postMessage(e,this.domain)}}e.registerDecorators(a,{publicProps:{src:{config:0},domain:{config:0},width:{config:0},height:{config:0},frameStyle:{config:0},title:{config:0}},publicMethods:["postToWindow"],fields:["language"]});const l=e.registerComponent(a,{tmpl:r,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveIframe-",apiVersion:63});module.exports=l;
