System.register(["./index-b0fe4e4c.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.I}],execute:function(){var n=function(){function e(){}Object.defineProperty(e,"value",{get:function(){e.valueCache=localStorage.getItem("clientIdentifier")||undefined;if(!e.valueCache){e.valueCache=t.generate(12);localStorage.setItem("clientIdentifier",e.valueCache)}return e.valueCache},enumerable:false,configurable:true});return e}();var i=function(){function e(){}e.is=function(e){return typeof e=="object"&&typeof e.destination=="string"&&e.content!=undefined};e.send=function(t,n,i){if(e.is(t)&&i==undefined){i=n;if(!i)i=window;var s=t.destination.split("#",2);t={destination:s[1],content:t.content};i.postMessage(t,s[0])}else if(typeof i!="string"){if(!i)i=window;if(typeof t=="string")e.send({destination:t,content:n},i)}};e.listen=function(t,n,i){var s=t.split("#",2);var r="";if(s.length==2){t=s[0];r=s[1]}(i||window).addEventListener("message",(function(i){var s=i.data;if(e.is(s)&&(t=="*"||i.origin==t)&&(r==""||s.destination==r))n(s.destination,s.content)}))};return e}();e("M",i);var s=function(){function e(e,t,n){var i=this;this.stateValue=e;this.messageValue=t;this.task=n;this.listeners=[];switch(e){case"delayed":this.timer=window.setTimeout((function(){return i.execute()}),5e3);break;case"executing":this.execute();break;case"success":case"warning":case"failed":this.startCloseTimer();break;default:break}}Object.defineProperty(e.prototype,"state",{get:function(){return this.stateValue},set:function(e){if(this.stateValue!=e){this.stateValue=e;this.emit()}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"message",{get:function(){return this.messageValue},set:function(e){if(this.messageValue!=e){this.messageValue=e;this.emit()}},enumerable:false,configurable:true});e.prototype.listen=function(e){this.listeners.push(e)};e.prototype.unlisten=function(e){this.listeners.filter((function(t){return t!=e}))};e.prototype.emit=function(){var e=this;this.listeners.forEach((function(t){return t(e)}))};e.prototype.execute=function(){var e=this;this.clearTimer();if(this.task){this.state="executing";this.task(this).then((function(t){e.messageValue=t[1];e.state=t[0]?"success":"failed";e.startCloseTimer()}))}else this.state="failed"};e.prototype.startCloseTimer=function(){var e=this;this.timer=window.setTimeout((function(){return e.close()}),15e3)};e.prototype.close=function(){this.clearTimer();this.state="closed"};e.prototype.clearTimer=function(){if(this.timer){window.clearTimeout(this.timer);this.timer=undefined}};e.delay=function(t,n){return new e("delayed",t,n)};e.execute=function(t,n){return new e("executing",t,n)};e.succeded=function(t){return new e("success",t)};e.failed=function(t){return new e("failed",t)};e.warn=function(t){return new e("warning",t)};return e}();e("N",s);var r=function(){function e(){}e.is=function(e){return typeof e=="object"&&typeof e.name=="string"};return e}();e("T",r)}}}));