var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):r(e.value).then(s,a)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./index-c820db66.system.js","./index-8fad73f5.system.js","./index-b0fe4e4c.system.js"],(function(e){"use strict";var t,n,i,r,o,s;return{setters:[function(e){t=e.r;n=e.j;i=e.h;r=e.g},function(e){o=e.M;s=e.T},function(){}],execute:function(){var a=".sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}";var u=e("smoothly_frame",function(){function e(e){t(this,e);this.trigger=n(this,"trigger",7);this.message=n(this,"message",7)}Object.defineProperty(e.prototype,"contentWindow",{get:function(){var e=this.element&&this.element.firstElementChild?this.element.firstElementChild:undefined;return e&&e.contentWindow||undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultOrigin",{get:function(){var e=this.url.match(/^(([a-z]+\+)*[a-z]+:\/\/)?[^/^\n]+/);return e?e[0]:"*"},enumerable:false,configurable:true});e.prototype.componentDidLoad=function(){var e=this;var t;if(this.contentWindow)o.listen((t=this.origin)!==null&&t!==void 0?t:this.defaultOrigin,(function(t,n){if(t==e.name)if(s.is(n))e.trigger.emit(n);else e.message.emit({destination:t,content:n})}),window)};e.prototype.send=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,i;return __generator(this,(function(r){if(typeof e=="string")o.send(((n=this.origin)!==null&&n!==void 0?n:this.defaultOrigin)+"#"+e,t,this.contentWindow);else if(o.is(e)&&this.contentWindow)o.send({destination:((i=this.origin)!==null&&i!==void 0?i:this.defaultOrigin)+"#"+e.destination,content:e.destination},this.contentWindow);return[2]}))}))};e.prototype.render=function(){return i("iframe",{src:this.url+"#"+window.location.origin,height:"100%",width:"100%"})};Object.defineProperty(e.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());u.style=a}}}));