var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r["throw"](t))}catch(t){o(t)}}function c(t){t.done?n(t.value):i(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=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++;i=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=e.call(t,n)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-bcb8811f.system.js","./p-91543c07.system.js","./p-a77fefb8.system.js","./p-7dff37f8.system.js","./p-28972b53.system.js"],(function(t,e){"use strict";var n,r,i,o,a,s,c;return{setters:[function(t){n=t.r;r=t.h;i=t.g;o=t.H},function(t){a=t.l;s=t.r},function(t){c=t.L},function(){},function(){}],execute:function(){var u="bal-spinner,.bal-spinner{text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center}bal-spinner svg,.bal-spinner svg{-webkit-transform:unset !important;transform:unset !important}";var f=undefined&&undefined.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)if(a=t[s])o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o;return i>3&&o&&Object.defineProperty(e,n,o),o};var l=t("bal_spinner",function(){function t(t){var r=this;n(this,t);this.animate=function(){return __awaiter(r,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:e.sent();if(this.currentRaf!==undefined){cancelAnimationFrame(this.currentRaf)}if(this.shouldAnimate()){this.destroy();this.currentRaf=a((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){if(this.animationFunction){this.animationFunction(this.el,this.getColor())}return[2]}))}))}))}return[2]}}))}))};this.destroy=function(){if(r.animationItem&&r.animationItem.destroy){r.animationItem.destroy()}r.el.innerHTML=""};this.shouldAnimate=function(){if(typeof window==="undefined"){return false}if(r.animationFunction===undefined){return false}return!r.deactivated};this.load=function(){return __awaiter(r,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){return[2,new Promise((function(n,r){if(t.animationFunction){return n()}else{s((function(){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.import("./p-678e3a5b.system.js").then((function(e){t.animationFunction=e.animate;n()})).catch(r);return[2]}))}))}))}}))]}))}))};this.inverted=false;this.deactivated=false;this.color="blue";this.small=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.deactivatedWatcher=function(t,e){if(t!==e){if(this.deactivated){this.destroy()}else{this.animate()}}};t.prototype.componentDidLoad=function(){this.animate()};t.prototype.disconnectedCallback=function(){if(this.el&&!this.el.isConnected){this.destroy()}};t.prototype.getColor=function(){return this.inverted||this.color==="white"?"#ffffff":"#151f6d"};t.prototype.render=function(){return r(o,{role:"progressbar",style:{width:this.small?"32px":"64px"}})};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{deactivated:["deactivatedWatcher"]}},enumerable:false,configurable:true});return t}());f([c("bal-spinner")],l.prototype,"createLogger",null);l.style={css:u}}}}));