var __extends=this&&this.__extends||function(){var t=function(n,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i))t[i]=n[i]};return t(n,i)};return function(n,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(n,i);function e(){this.constructor=n}n.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}();System.register(["./p-6722281a.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.b}],execute:function(){var i=function(){function t(t){this.notifyCallback=t;this.observers=[]}t.prototype.attach=function(t){var n=this.observers.includes(t);if(n){return console.log("Subject: Observer has been attached already.")}this.observers.push(t)};t.prototype.detach=function(t){var n=this.observers.indexOf(t);if(n===-1){return console.log("Subject: Nonexistent observer.")}this.observers.splice(n,1)};t.prototype.notify=function(t){for(var n=0,i=this.observers;n<i.length;n++){var e=i[n];if(typeof e==="function"){e(t)}else{if(this.notifyCallback){this.notifyCallback(e,t)}}}};return t}();t("S",i);var e=function(){function t(t){this.notifyCallback=t}t.prototype.attach=function(t){this.observer=t};t.prototype.detach=function(){this.observer=undefined};t.prototype.notify=function(t){if(this.observer){if(typeof this.observer==="function"){this.observer(t)}else{if(this.notifyCallback){this.notifyCallback(this.observer,t)}}}};return t}();t("a",e);var s=function(t){__extends(i,t);function i(){var n=t.apply(this,arguments)||this;n.el=undefined;return n}i.prototype.connect=function(t){if(t){this.el=t}else{if(n.hasWindow){this.el=window}}};i.prototype.disconnect=function(){this.el=undefined};i.prototype.add=function(n){t.prototype.attach.call(this,n)};i.prototype.remove=function(n){t.prototype.detach.call(this,n)};return i}(i);t("L",s)}}}));