(function(){'use strict';var d="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b};function e(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var f=e(this),g;
if("function"==typeof Object.setPrototypeOf)g=Object.setPrototypeOf;else{var h;a:{var k={a:!0},l={};try{l.__proto__=k;h=l.a;break a}catch(a){}h=!1}g=h?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var m=g;function n(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")}function p(a){if(n(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&n(a))return a;return null};function r(a,b){var c=void 0===c?null:c;var q=document.createEvent("CustomEvent");q.initCustomEvent(a,!0,!0,c);b.dispatchEvent(q)};var t=Object.keys(HTMLIFrameElement.prototype).concat("source");function u(){var a=HTMLElement.call(this)||this;a.g=a.ownerDocument.createElement("iframe");a.h="";a.m=a.o.bind(a);a.i=!1;a.j=!1;a.l=!1;return a}var v=HTMLElement;u.prototype=d(v.prototype);u.prototype.constructor=u;if(m)m(u,v);else for(var w in v)if("prototype"!=w)if(Object.defineProperties){var x=Object.getOwnPropertyDescriptor(v,w);x&&Object.defineProperty(u,w,x)}else u[w]=v[w];
u.prototype.connectedCallback=function(){var a=this;if(!this.l){for(;this.firstChild;)this.removeChild(this.firstChild);this.h=this.getAttribute("source");this.g.setAttribute("allowtransparency",!0);this.g.setAttribute("border",0);this.g.setAttribute("frameborder",0);this.g.setAttribute("sandbox","allow-same-origin allow-forms allow-scripts");this.g.setAttribute("seamless","seamless");var b=this.ownerDocument.createElement("div");b.classList.add("intermediate-element");b.appendChild(this.g);this.appendChild(b);
setTimeout(function(){if(!a.gwdIsLoaded()){var c=p(a);c?c.gwdIsLoaded()&&a.gwdLoad():a.gwdLoad()}},1);this.l=!0}};u.prototype.attributeChangedCallback=function(a,b,c){"source"===a||"src"===a?(a=null===c?"":c,this.i?this.setUrl(a):(this.h=a,this.j&&this.g.setAttribute("src",this.h))):(b=this.g,this.hasAttribute(a)?(c=this.getAttribute(a),b.setAttribute(a,c)):b.removeAttribute(a))};
u.prototype.o=function(){this.j=!1;this.i=!0;this.g.removeEventListener("load",this.m,!1);r("iframeload",this);r("ready",this)};u.prototype.setUrl=function(a){a!=this.h&&(this.i=!1,this.h=a);this.gwdLoad()};u.prototype.gwdLoad=function(){this.i||(this.j=!0,this.g.addEventListener("load",this.m,!1),this.g.setAttribute("src",this.h))};u.prototype.gwdIsLoaded=function(){return this.i};
f.Object.defineProperties(u.prototype,{nativeElement:{configurable:!0,enumerable:!0,get:function(){return this.g}},src:{configurable:!0,enumerable:!0,get:function(){return this.g.getAttribute("src")},set:function(a){this.g.setAttribute("src",a)}},srcdoc:{configurable:!0,enumerable:!0,get:function(){return this.g.getAttribute("srcdoc")},set:function(a){this.g.setAttribute("srcdoc",a)}},scrolling:{configurable:!0,enumerable:!0,get:function(){return this.g.getAttribute("scrolling")},set:function(a){this.g.setAttribute("scrolling",
a)}},allowFullscreen:{configurable:!0,enumerable:!0,get:function(){return this.g.hasAttribute("allowFullscreen")},set:function(a){a?this.g.setAttribute("allowFullscreen",""):this.g.removeAttribute("allowFullscreen")}},name:{configurable:!0,enumerable:!0,get:function(){return this.g.getAttribute("name")},set:function(a){this.g.setAttribute("name",a)}}});f.Object.defineProperties(u,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return t}}});customElements.define("gwd-iframe",u);}).call(this);
