@osovitny/anatoly 2.0.45 → 2.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("@ngx-translate/core"),require("date-fns"),require("date-fns-tz"),require("date-fns/locale/en-US"),require("@angular/common"),require("@ngx-translate/http-loader"),require("sweetalert2"),require("ngx-toastr"),require("uuid"),require("@angular/platform-browser"),require("@angular/forms"),require("angular-froala-wysiwyg")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","@angular/core","@angular/router","@angular/common/http","rxjs/operators","rxjs","@ngx-translate/core","date-fns","date-fns-tz","date-fns/locale/en-US","@angular/common","@ngx-translate/http-loader","sweetalert2","ngx-toastr","uuid","@angular/platform-browser","@angular/forms","angular-froala-wysiwyg"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.ng.core,t.ng.router,t.ng.common.http,t.rxjs.operators,t.rxjs,t.i1$1,t.dateFns,t.dateFnsTz,t.enUS,t.ng.common,t.httpLoader,t.Swal,t.i1$2,t.uuid,t.ng.platformBrowser,t.ng.forms,t.angularFroalaWysiwyg)}(this,(function(t,e,n,r,o,i,a,s,u,c,l,p,d,f,h,g,m,y){"use strict";function v(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var b=v(c),S=v(d),I=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),C=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings")),T=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();function w(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("@ngx-translate/core"),require("date-fns"),require("date-fns-tz"),require("date-fns/locale/en-US"),require("@angular/common"),require("@ngx-translate/http-loader"),require("sweetalert2"),require("ngx-toastr"),require("uuid"),require("@angular/platform-browser"),require("@angular/forms"),require("angular-froala-wysiwyg")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","@angular/core","@angular/router","@angular/common/http","rxjs/operators","rxjs","@ngx-translate/core","date-fns","date-fns-tz","date-fns/locale/en-US","@angular/common","@ngx-translate/http-loader","sweetalert2","ngx-toastr","uuid","@angular/platform-browser","@angular/forms","angular-froala-wysiwyg"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.ng.core,t.ng.router,t.ng.common.http,t.rxjs.operators,t.rxjs,t.i1$1,t.dateFns,t.dateFnsTz,t.enUS,t.ng.common,t.httpLoader,t.Swal,t.i1$2,t.uuid,t.ng.platformBrowser,t.ng.forms,t.angularFroalaWysiwyg)}(this,(function(t,e,n,r,o,i,a,s,u,c,l,p,d,f,h,g,m,y){"use strict";function v(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var b=v(c),S=v(d),I=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),T=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings")),w=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();function C(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */T.decorators=[{type:e.Injectable}],T.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:n.Router}]};var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function P(t,e){function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function L(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function z(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function E(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(z(arguments[e]));return t}Object.create;var O=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return P(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),500)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e.prototype.reset=function(){this.counter>0&&this.next(!1),this.counter=0},e}(i.BehaviorSubject);O.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new O},token:O,providedIn:"root"}),O.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],O.ctorParameters=function(){return[]};var D=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();D.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new D},token:D,providedIn:"root"}),D.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],D.ctorParameters=function(){return[]};var N=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,i,a,s,u,c,l=this,p=C.IsCDNEnabled,d=C.CDNSASToken,f=this.loadingService.isFreezed,h=t.url.toLowerCase(),g=t.url,m=!f;if(!f)try{for(var y=L(this.longRunningExceptionsList),v=y.next();!v.done;v=y.next()){var b=v.value;if(h.indexOf(this.longRunningExceptionsList[b])>=0){m=!1;break}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}if(p)try{for(var S=L(this.autoCDNSASTokenUrls),I=S.next();!I.done;I=S.next()){b=I.value;if(h.indexOf(this.autoCDNSASTokenUrls[b])>=0){t=t.clone({url:g+d});break}}}catch(t){a={error:t}}finally{try{I&&!I.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var T=L(this.externalSiteUrls),w=T.next();!w.done;w=T.next()){b=w.value;if(h.indexOf(this.externalSiteUrls[b])>=0){!0;break}}}catch(t){u={error:t}}finally{try{w&&!w.done&&(c=T.return)&&c.call(T)}finally{if(u)throw u.error}}if(h.indexOf("/api/")>-1){var x="",P=(new Date).getTime().toString();x=h.indexOf("?")>-1?g+"&t="+P:g+"?t="+P,t=t.clone({url:x})}return t=(t=t.clone({headers:t.headers.set("Accept","application/json")})).clone({headers:t.headers.set("Accept","application/text")}),this.onRequestStart(m),e.handle(t).pipe(o.tap((function(t){t instanceof r.HttpResponse&&l.onRequestEnd(m)}),(function(t){l.onRequestEnd(m),l.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();N.decorators=[{type:e.Injectable}],N.ctorParameters=function(){return[{type:O},{type:D}]};var U=function(){function t(){}return t.toLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t}(),j=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return this.dateFnsLocale={locale:b.default},t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:b.default};break;default:t={locale:b.default}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return s.isValid(new Date(t))?s.format(new Date(t),"dd.MM.yyyy",this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(s.isValid(e)){var n=U.toLocalizedDateTime(e);return s.format(n,"dd.MM.yyyy HH:mm",this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return s.isValid(new Date(t))&&s.isValid(new Date(e))?s.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getUTCToLocalizedDate=function(t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z")),e){var n=u.utcToZonedTime(t,e);return s.format(n,"dd.MM.yyyy",this.dateFnsLocale)}return s.format(new Date(t),"dd.MM.yyyy",this.dateFnsLocale)},t.prototype.getUTCToLocalizedDateTime=function(t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z")),e){var n=u.utcToZonedTime(t,e);return s.format(n,"dd.MM.yyyy HH:mm",this.dateFnsLocale)}return s.format(new Date(t),"dd.MM.yyyy HH:mm",this.dateFnsLocale)},t.prototype.getUTCToLocalizedDistanceToNowInWords=function(t){return t=this.safeUtcToZonedTime(t),s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.safeUtcToZonedTime=function(t){var e=t;try{t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z"));var n=Intl.DateTimeFormat().resolvedOptions().timeZone;e=n?u.utcToZonedTime(t,n).toString():new Date(t).toString()}catch(e){t&&console.log("UTC to Local conversion failed for :"+t.toString())}return e},t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j(e.ɵɵinject(a.TranslateService))},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[{type:a.TranslateService}]};var V=function(){function t(t){this.localizeService=t}return t.prototype.transform=function(t,e,n){if(t)return e||(e="tr"),"tr"===e?this.localizeService.getLocalizedValue(t):"d"===e?this.localizeService.getLocalizedDate(t):"dt"===e?this.localizeService.getLocalizedDateTime(t):"dis"===e?this.localizeService.getLocalizedDistanceInWords(t,n):"dis2now"===e?this.localizeService.getLocalizedDistanceToNowInWords(t):"u2d"===e?this.localizeService.getUTCToLocalizedDate(t):"u2dt"===e?this.localizeService.getUTCToLocalizedDateTime(t):"u2dis2now"===e?this.localizeService.getUTCToLocalizedDistanceToNowInWords(t):t},t}();function A(t){return new p.TranslateHttpLoader(t,C.resourcesUrl+"/",".json")}function M(t,e,n){return function(){return new Promise((function(r){n.get(l.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var n=e.configureTranslationSettings(t);t.use(n).subscribe((function(){}),(function(){r(null)}),(function(){r(null)}))}))}))}}V.decorators=[{type:e.Pipe,args:[{name:"localize"}]}],V.ctorParameters=function(){return[{type:j}]};var B=a.TranslateModule.forRoot({loader:{provide:a.TranslateLoader,useFactory:A,deps:[r.HttpClient]}}),F=function(e){this.injector=e,t.LocalizationInjectorInstance=this.injector};F.decorators=[{type:e.NgModule,args:[{imports:[B],providers:[{provide:e.APP_INITIALIZER,useFactory:M,deps:[a.TranslateService,j,e.Injector],multi:!0}],exports:[]}]}],F.ctorParameters=function(){return[{type:e.Injector}]};var k=function(){};k.decorators=[{type:e.NgModule,args:[{imports:[a.TranslateModule],exports:[a.TranslateModule,V],declarations:[V],providers:[]}]}];var q=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(D).logError(t),t},t}();q.decorators=[{type:e.Injectable}],q.ctorParameters=function(){return[{type:e.Injector}]};var R=function(){function e(){}return Object.defineProperty(e,"localizationService",{get:function(){return t.LocalizationInjectorInstance.get(j)},enumerable:!1,configurable:!0}),e.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},e}(),G=function(){function t(){}return t.success=function(t,e,n,r){t=R.getLocalizedValue(t,e,"OperationSuccessFull"),n=R.getLocalizedValue(n,null,"Success"),S.default.fire({text:t,title:n,icon:"success",confirmButtonText:R.getLocalizedValue("Ok")}).then((function(){r&&r()}))},t.info=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n,null,"Info"),S.default.fire({text:t,title:n,icon:"info",confirmButtonText:R.getLocalizedValue("Ok")})},t.warning=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n,null,"Warning"),S.default.fire({text:t,title:n,icon:"warning",confirmButtonText:R.getLocalizedValue("Ok")})},t.error=function(t,e,n){t=R.getLocalizedValue(t,e,"ErrorOccured"),n=R.getLocalizedValue(n,null,"Error"),S.default.fire({text:t,title:n,icon:"error",confirmButtonText:R.getLocalizedValue("Ok")})},t.cancel=function(t,e,n){t=R.getLocalizedValue(t,e,"OperationCancelled"),n=R.getLocalizedValue(n,null,"Cancelled"),S.default.fire({text:t,title:n,icon:"info"})},t.notImplemented=function(){this.warning("Not Implemented Yet")},t.areYouSure=function(t,e,n,r,o,i){t=R.getLocalizedValue(t),e=R.getLocalizedValue(e,null,"AreYouSure"),n=R.getLocalizedValue(n,null,"AreYouSure-ConfirmButtonText"),r=R.getLocalizedValue(r,null,"AreYouSure-CancelButtonText"),S.default.fire({text:t,title:e,icon:"warning",confirmButtonText:n,cancelButtonText:r,showCancelButton:!0}).then((function(t){t.value?o&&o():t.dismiss!=S.default.DismissReason.cancel&&t.dismiss!=S.default.DismissReason.close||i&&i()}))},t}(),H=function(){function t(){}return t.newGuid=function(){return h.v4()},t}(),K=function(){function t(t){this.toastrService=t,this._sessionNotifications=new i.BehaviorSubject([]),this._serverNotifications=new i.BehaviorSubject([]),this.sessionNotifications$=this._sessionNotifications.asObservable(),this.serverNotifications$=this._serverNotifications.asObservable()}return t.prototype.addSessionNotification=function(t,e){var n={id:H.newGuid(),isNew:!0,isSession:!0,text:t,type:e,createdDate:new Date(Date.now()).toISOString()};this.addSessionNotificationToList(n)},t.prototype.addSessionNotificationToList=function(t){this.sessionNotifications=E([t],this.sessionNotifications)},t.prototype.removeNotification=function(t,e){e?this.sessionNotifications=this.sessionNotifications.filter((function(e){return e.id!==t})):this.serverNotifications=this.serverNotifications.filter((function(e){return e.id!==t}))},t.prototype.success=function(t,e,n,r){void 0===r&&(r=!0),t=R.getLocalizedValue(t,e,"OperationSuccessFull"),n=R.getLocalizedValue(n),this.toastrService.success(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"success")},t.prototype.info=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.warning=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n),this.toastrService.warning(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.error=function(t,e,n,r){void 0===r&&(r=!0),t=R.getLocalizedValue(t,e,"ErrorOccured"),n=R.getLocalizedValue(n),this.toastrService.error(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"error")},t.prototype.cancel=function(t,e,n){t=R.getLocalizedValue(t,e,"OperationCancelled"),n=R.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},Object.defineProperty(t.prototype,"sessionNotifications",{get:function(){return this._sessionNotifications.getValue()},set:function(t){this._sessionNotifications.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverNotifications",{get:function(){return this._serverNotifications.getValue()},set:function(t){this._serverNotifications.next(t)},enumerable:!1,configurable:!0}),t}();K.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new K(e.ɵɵinject(f.ToastrService))},token:K,providedIn:"root"}),K.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],K.ctorParameters=function(){return[{type:f.ToastrService}]};var _=function(){function t(t){this.http=t}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(o.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getExternalTextFile=function(t){return this.http.get(t)},t.prototype.getExternalJsonFile=function(t){return this.http.get(t)},t.prototype.getJsonFile=function(t){var e=C.jsonsUrl,n=C.jsonVersion,r=C.isCDNEnabled,i=C.cdnSasToken,a="";return a=r?e+"/"+t+i:e+"/"+t+"?"+n,this.http.get(a).pipe(o.map((function(t){return t})))},t}();_.decorators=[{type:e.Injectable}],_.ctorParameters=function(){return[{type:r.HttpClient}]};var Z=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return P(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return I.isUserSignedIn},e.prototype.isUserAdmin=function(){return I.isUserAdmin},e}(_);Z.decorators=[{type:e.Injectable}],Z.ctorParameters=function(){return[{type:r.HttpClient}]};var W=function(){function t(){this.expired$=new i.Subject}return t.prototype.startWatching=function(t){var e=this;return this.idle$=i.merge(i.fromEvent(document,"mousemove"),i.fromEvent(document,"click"),i.fromEvent(document,"mousedown"),i.fromEvent(document,"keypress"),i.fromEvent(document,"DOMMouseScroll"),i.fromEvent(document,"mousewheel"),i.fromEvent(document,"touchmove"),i.fromEvent(document,"MSPointerMove"),i.fromEvent(window,"mousemove"),i.fromEvent(window,"resize")),this.timeOutMilliSeconds=1e3*t,this.idleSubscription=this.idle$.subscribe((function(t){e.resetTimer()})),this.startTimer(),this.expired$},t.prototype.startTimer=function(){var t=this;this.timer$=i.timer(this.timeOutMilliSeconds,this.timeOutMilliSeconds).subscribe((function(e){t.expired$.next(!0)}))},t.prototype.resetTimer=function(){this.timer$.unsubscribe(),this.startTimer()},t.prototype.stopTimer=function(){this.timer$.unsubscribe(),this.idleSubscription.unsubscribe()},t.prototype.restartIdleTimer=function(){var t=this;this.timer$.unsubscribe(),this.idleSubscription.unsubscribe(),this.idleSubscription=this.idle$.subscribe((function(e){t.resetTimer()})),this.startTimer()},t}();W.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new W},token:W,providedIn:"root"}),W.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var Y=function(){function t(t){this.currentClientKey=C.SERVICES_CONF.selectedClientID,this.storage="local"===t||"localStorage"===t?localStorage:sessionStorage}return t.prototype.setItem=function(t,e){this.storage.setItem(this.currentClientKey+t,e)},t.prototype.setObject=function(t,e){this.storage.setItem(this.currentClientKey+t,JSON.stringify(e))},t.prototype.getItem=function(t){return this.storage.getItem(this.currentClientKey+t)},t.prototype.getObject=function(t){return JSON.parse(this.storage.getItem(this.currentClientKey+t)||"{}")},t.prototype.remove=function(t){this.storage.removeItem(this.currentClientKey+t)},t}(),J=function(t){function e(){return t.call(this,"localStorage")||this}return P(e,t),e}(Y);J.decorators=[{type:e.Injectable}],J.ctorParameters=function(){return[]};var Q=function(t){function e(){return t.call(this,"sessionStorage")||this}return P(e,t),e}(Y);Q.decorators=[{type:e.Injectable}],Q.ctorParameters=function(){return[]};var X=function(){function t(t,e,n){this.title=t,this.meta=e,this.dom=n}return t.prototype.updateTitle=function(t){this.title.setTitle(t)},t.prototype.updateDescription=function(t){this.meta.updateTag({name:"description",content:t})},t.prototype.updateKeywords=function(t){this.meta.updateTag({name:"keywords",content:t})},t.prototype.updateMetaTags=function(t){var e=this;t.forEach((function(t){return e.meta.updateTag(t)}))},t.prototype.setCanonicalUrl=function(t){var e=void 0===t?this.dom.URL:t,n=this.dom.createElement("link");n.setAttribute("rel","canonical"),this.dom.head.appendChild(n),n.setAttribute("href",e)},t.prototype.updateCanonicalUrl=function(t){var e=void 0===t?this.dom.URL:t,n=this.dom.getElementsByTagName("head")[0],r=this.dom.querySelector("link[rel='canonical']")||null;null==r&&(r=this.dom.createElement("link"),n.appendChild(r)),r.setAttribute("rel","canonical"),r.setAttribute("href",e)},t}();X.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new X(e.ɵɵinject(g.Title),e.ɵɵinject(g.Meta),e.ɵɵinject(l.DOCUMENT))},token:X,providedIn:"root"}),X.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],X.ctorParameters=function(){return[{type:g.Title},{type:g.Meta},{type:void 0,decorators:[{type:e.Inject,args:[l.DOCUMENT]}]}]};var tt=function(){function t(t){this.router=t}return t.prototype.subscribe=function(){this.subscription=this.router.events.subscribe((function(t){t instanceof n.NavigationEnd&&window.ga&&(window.ga("set","page",t.urlAfterRedirects),window.ga("send","pageview"))}))},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t}();tt.decorators=[{type:e.Injectable}],tt.ctorParameters=function(){return[{type:n.Router}]};var et=function(e,n){this.injector=e,w(n,"AnatolyCoreModule"),t.InjectorInstance=this.injector};et.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule],exports:[],providers:[D,K,Z,O,X,tt]}]}],et.ctorParameters=function(){return[{type:e.Injector},{type:et,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var nt=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),rt=function(){function t(){}return t.getValueByNameInQS=function(e){return t.getValueByName(location.search,e)},t.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},t.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},t.downloadBlobFile=function(e,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(e,n);else{var r=window.URL.createObjectURL(e);t.downloadFile(n,r)}},t}(),ot=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.data=[],n}return P(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var i=this;if(this.data.length)return t.prototype.next.call(this,this.data);var a=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(a=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(a).pipe(o.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(i,e),n&&n()}),(function(t){r&&r(t)}))},e}(i.BehaviorSubject);ot.decorators=[{type:e.Injectable}],ot.ctorParameters=function(){return[{type:r.HttpClient}]};var it=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n}return P(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.delete=function(t,e){var n=this;this.reset();var r=this.baseUrl+"/delete"+this.serializeParams(t);return this.http.delete(r).subscribe((function(){n.read(),e&&e()}),(function(){n.read()}))},e.prototype.post=function(t,e){var n=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(n,e).pipe(o.map((function(t){return t})))},e}(ot);it.decorators=[{type:e.Injectable}],it.ctorParameters=function(){return[{type:r.HttpClient}]};var at="api/billing",st="api/notifications",ut=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=st,n}return P(e,t),e.prototype.retrieveNotifications=function(){return this.get("retrieveNotifications")},e}(_);ut.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new ut(e.ɵɵinject(r.HttpClient))},token:ut,providedIn:"root"}),ut.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],ut.ctorParameters=function(){return[{type:r.HttpClient}]};var ct=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=at,n}return P(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){e&&e()}),(function(t){n&&n()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(e){t&&t()}),(function(t){e&&e()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){e&&e()}),(function(t){n&&n()}))},e}(_);ct.decorators=[{type:e.Injectable}],ct.ctorParameters=function(){return[{type:r.HttpClient}]};var lt=function(t){w(t,"AnatolyDataModule")};lt.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule],providers:[ct]}]}],lt.ctorParameters=function(){return[{type:lt,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var pt=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;G.areYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){G.success("Access Granted",null,null,(function(){window.location.reload()}))}))}))},t}();pt.decorators=[{type:e.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],pt.ctorParameters=function(){return[{type:Z},{type:ct}]},pt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var dt=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();dt.decorators=[{type:e.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],dt.ctorParameters=function(){return[{type:Z}]},dt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var ft=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;G.areYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){G.success("Your request for changing plan has been sent.",null,null,(function(){window.location.reload()}))}))}))},t}();ft.decorators=[{type:e.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],ft.ctorParameters=function(){return[{type:ct}]},ft.propDecorators={currentplantitle:[{type:e.Input}],requestedplan:[{type:e.Input}],requestedplantitle:[{type:e.Input}]};var ht=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();ht.decorators=[{type:e.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],ht.propDecorators={title:[{type:e.Input}]};var gt={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},mt=function(){function t(){this.subs=new nt}return t.prototype.getQSId=function(){var t=rt.getValueByNameInQS("id");return void 0===t||""==t?null:t},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}(),yt=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return P(e,t),e.prototype.isActionAdding=function(){var t=rt.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e.prototype.addControl=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).addControl(t,e)},e.prototype.removeControl=function(t,e){void 0===e&&(e=null);var n=e||this.formGroup;n.get(t)&&n.removeControl(t)},e.prototype.createFormControl=function(t,e,n){return new m.FormControl(t,e,n)},e.prototype.setControlError=function(t,e,n){var r;void 0===n&&(n=null),null===(r=(n||this.formGroup).get(t))||void 0===r||r.setErrors(e)},e.prototype.setInValidError=function(t,e){var n;void 0===e&&(e=null),null===(n=(e||this.formGroup).get(t))||void 0===n||n.setErrors({invalid:!0})},Object.defineProperty(e.prototype,"fc",{get:function(){return this.formGroup.controls},enumerable:!1,configurable:!0}),e}(mt);yt.propDecorators={formGroup:[{type:e.Input}],formSubmitted:[{type:e.Input}]};var vt=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return P(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},gt,t),n=C.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(yt);vt.propDecorators={editorLabelText:[{type:e.Input}],editorOptions:[{type:e.Input}]};var bt=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return P(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(vt);bt.decorators=[{type:e.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],bt.ctorParameters=function(){return[]},bt.propDecorators={editorFormKey:[{type:e.Input}]};var St=function(t){function e(){return t.call(this)||this}return P(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(vt);St.decorators=[{type:e.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],St.ctorParameters=function(){return[]};var It=function(){};It.decorators=[{type:e.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],It.ctorParameters=function(){return[]},It.propDecorators={classbtn:[{type:e.Input}]};var Ct=function(){};Ct.decorators=[{type:e.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],Ct.ctorParameters=function(){return[]},Ct.propDecorators={classbtn:[{type:e.Input}]};var Tt=function(){};Tt.decorators=[{type:e.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],Tt.propDecorators={classbtn:[{type:e.Input}]};var wt=function(){function t(t){this.loadingService=t,this.subs=new nt,this.show=!1}return t.prototype.ngOnInit=function(){var t=this;this.subs.sink=this.loadingService.subscribe((function(e){t.show=e}))},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}();wt.decorators=[{type:e.Component,args:[{selector:"anatoly-loading",template:'<div *ngIf="show">\r\n <span id="pnlLoading" class="k-icon k-i-loading"></span>\r\n</div>\r\n'}]}],wt.ctorParameters=function(){return[{type:O}]};var xt={spinnerLine:"spinner-line-material",ChasingDots:"spinner-chasing-dots",CubeGrid:"spinner-cube-grid",DoubleBounce:"spinner-double-bounce",RotatingPlane:"spinner-rotationg-plane",SpinnerPulse:"spinner-spinner-pulse",ThreeBounce:"spinner-three-bounce",WanderingCubes:"spinner-wandering-cubes",Wave:"spinner-wave"},Pt=function(){function t(t,e){var r=this;this.router=t,this.document=e,this.isSpinnerVisible=!0,this.spinnerSpinKit=xt,this.backgroundColor="#007CB0",this.spinner=xt.spinnerLine,this.router.events.subscribe((function(t){t instanceof n.NavigationStart?r.isSpinnerVisible=!0:(t instanceof n.NavigationEnd||t instanceof n.NavigationCancel||t instanceof n.NavigationError)&&(r.isSpinnerVisible=!1)}),(function(){r.isSpinnerVisible=!1}))}return t.prototype.ngOnDestroy=function(){this.isSpinnerVisible=!1},t}();Pt.decorators=[{type:e.Component,args:[{selector:"spinner",template:'<div id="spinner-loader" *ngIf="isSpinnerVisible">\r\n <div class="loader-bg">\r\n <div class="spinner-line-material" [class.colored]="!backgroundColor" *ngIf="spinner === spinnerSpinKit.spinnerLine">\r\n <div class="spinner-child spinner-bounce1" [style.background-color]=\'backgroundColor\'></div>\r\n </div>\r\n </div>\r\n</div>\r\n',encapsulation:e.ViewEncapsulation.None}]}],Pt.ctorParameters=function(){return[{type:n.Router},{type:Document,decorators:[{type:e.Inject,args:[l.DOCUMENT]}]}]},Pt.propDecorators={backgroundColor:[{type:e.Input}],spinner:[{type:e.Input}]};var Lt=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();Lt.decorators=[{type:e.Directive,args:[{selector:"[formControl], [formControlName]"}]}],Lt.ctorParameters=function(){return[{type:e.ElementRef},{type:m.NgControl}]};var zt=function(){function t(){}return t.prototype.transform=function(t,e,n){return t?t.replace(new RegExp(e,"g"),n):t},t}();zt.decorators=[{type:e.Pipe,args:[{name:"replaceText"}]}];var Et=function(){function t(){this.units=["Bytes","KB","MB","GB","TB","PB"]}return t.prototype.transform=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=0),isNaN(parseFloat(String(t)))||!isFinite(t))return"";for(var n=0;t>=1024;)t/=1024,n++;return t.toFixed(+e)+" "+this.units[n]},t}();Et.decorators=[{type:e.Pipe,args:[{name:"filesize"}]}];var Ot=function(){function t(t){this.sanitized=t}return t.prototype.transform=function(t){return this.sanitized.bypassSecurityTrustHtml(t)},t}();Ot.decorators=[{type:e.Pipe,args:[{name:"safeHtml"}]}],Ot.ctorParameters=function(){return[{type:g.DomSanitizer}]};var Dt=function(t){function e(){return t.call(this)||this}return P(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(yt),Nt=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return P(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,E(t)),this.customerrors.length>0&&e.push.apply(e,E(this.customerrors)),e},e}(Dt);Nt.decorators=[{type:e.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],Nt.ctorParameters=function(){return[]},Nt.propDecorators={visible:[{type:e.Input}],customerrors:[{type:e.Input}],viewtype:[{type:e.Input}]};var Ut=function(t){function e(){return t.call(this)||this}return P(e,t),e}(Dt);Ut.decorators=[{type:e.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={controlName:[{type:e.Input}],controlTitle:[{type:e.Input}]};var jt=y.FroalaEditorModule.forRoot(),Vt=y.FroalaViewModule.forRoot(),At=function(){};At.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule,m.ReactiveFormsModule,m.FormsModule,jt,Vt],exports:[dt,ft,pt,It,Tt,Ct,Nt,Ut,St,bt,ht,Pt,wt,Lt,Ot,zt,Et],declarations:[dt,ft,pt,It,Tt,Ct,Nt,Ut,St,bt,ht,Pt,wt,Lt,Ot,zt,Et]}]}],t.Alerts=G,t.AnatolyCoreModule=et,t.AnatolyDataModule=lt,t.AnatolyHttpInterceptor=N,t.AnatolyUIModule=At,t.AppContextService=Z,t.AppCoreSettings=C,t.BaseApiService=_,t.BaseComponent=mt,t.BaseEditComponent=yt,t.BaseGoService=T,t.BaseGridEditService=it,t.BaseGridReadService=ot,t.BaseHtmlEditorComponent=vt,t.BillingApiService=ct,t.BuyAccessButtonComponent=pt,t.ContentHeaderComponent=ht,t.ContextInitState=I,t.Convert=U,t.DefaultEditorOptions=gt,t.DigitalMarketingService=X,t.FileSizePipe=Et,t.FormValidationSummaryComponent=Nt,t.FormsHtmlEditorComponent=bt,t.FroalaEditorModuleWithProviders=jt,t.FroalaViewModuleWithProviders=Vt,t.GlobalErrorHandler=q,t.GoogleAnalyticsService=tt,t.Guid=H,t.HtmlEditorComponent=St,t.IdleService=W,t.ItemValidationSummaryComponent=Ut,t.LoadingComponent=wt,t.LoadingService=O,t.LocalStorageService=J,t.LocalizationModule=k,t.LocalizationService=j,t.LocalizationSettingsModule=F,t.LocalizePipe=V,t.LoggingService=D,t.NativeElementDirective=Lt,t.NotificationService=K,t.NotificationsApiService=ut,t.ReplaceTextPipe=zt,t.SafeHtmlPipe=Ot,t.SessionStorageService=Q,t.SignInButtonComponent=It,t.SignOutButtonComponent=Ct,t.SignUpButtonComponent=Tt,t.SpinnerComponent=Pt,t.Subs=nt,t.SubscribePlanButtonComponent=dt,t.TranslateModuleAtRoot=B,t.UpgradePlanButtonComponent=ft,t.Urls={notificationsSocketUrl:"/hubs/notifications"},t.Utils=rt,t.ValidationSummaryComponent=Dt,t.customTranslateLoaderFactory=A,t.localizationInitializerFactory=M,t.throwIfAlreadyLoaded=w,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */w.decorators=[{type:e.Injectable}],w.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:n.Router}]};var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function P(t,e){function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function L(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function z(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(z(arguments[e]));return t}Object.create;var E=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return P(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),500)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e.prototype.reset=function(){this.counter>0&&this.next(!1),this.counter=0},e}(i.BehaviorSubject);E.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new E},token:E,providedIn:"root"}),E.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[]};var O=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();O.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new O},token:O,providedIn:"root"}),O.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],O.ctorParameters=function(){return[]};var N=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,i,a,s,u,c,l=this,p=T.IsCDNEnabled,d=T.CDNSASToken,f=this.loadingService.isFreezed,h=t.url.toLowerCase(),g=t.url,m=!f;if(!f)try{for(var y=L(this.longRunningExceptionsList),v=y.next();!v.done;v=y.next()){var b=v.value;if(h.indexOf(this.longRunningExceptionsList[b])>=0){m=!1;break}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}if(p)try{for(var S=L(this.autoCDNSASTokenUrls),I=S.next();!I.done;I=S.next()){b=I.value;if(h.indexOf(this.autoCDNSASTokenUrls[b])>=0){t=t.clone({url:g+d});break}}}catch(t){a={error:t}}finally{try{I&&!I.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=L(this.externalSiteUrls),C=w.next();!C.done;C=w.next()){b=C.value;if(h.indexOf(this.externalSiteUrls[b])>=0){!0;break}}}catch(t){u={error:t}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(h.indexOf("/api/")>-1){var x="",P=(new Date).getTime().toString();x=h.indexOf("?")>-1?g+"&t="+P:g+"?t="+P,t=t.clone({url:x})}return t=(t=t.clone({headers:t.headers.set("Accept","application/json")})).clone({headers:t.headers.set("Accept","application/text")}),this.onRequestStart(m),e.handle(t).pipe(o.tap((function(t){t instanceof r.HttpResponse&&l.onRequestEnd(m)}),(function(t){l.onRequestEnd(m),l.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();N.decorators=[{type:e.Injectable}],N.ctorParameters=function(){return[{type:E},{type:O}]};var U=function(){function t(){}return t.toLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t}(),j=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return this.dateFnsLocale={locale:b.default},t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:b.default};break;default:t={locale:b.default}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return s.isValid(new Date(t))?s.format(new Date(t),"dd.MM.yyyy",this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(s.isValid(e)){var n=U.toLocalizedDateTime(e);return s.format(n,"dd.MM.yyyy HH:mm",this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return s.isValid(new Date(t))&&s.isValid(new Date(e))?s.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getUTCToLocalizedDate=function(t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z")),e){var n=u.utcToZonedTime(t,e);return s.format(n,"dd.MM.yyyy",this.dateFnsLocale)}return s.format(new Date(t),"dd.MM.yyyy",this.dateFnsLocale)},t.prototype.getUTCToLocalizedDateTime=function(t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z")),e){var n=u.utcToZonedTime(t,e);return s.format(n,"dd.MM.yyyy HH:mm",this.dateFnsLocale)}return s.format(new Date(t),"dd.MM.yyyy HH:mm",this.dateFnsLocale)},t.prototype.getUTCToLocalizedDistanceToNowInWords=function(t){return t=this.safeUtcToZonedTime(t),s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.safeUtcToZonedTime=function(t){var e=t;try{t&&(-1==t.indexOf("T")&&(t=t.replace(" ","T")),-1==t.indexOf("Z")&&(t+="Z"));var n=Intl.DateTimeFormat().resolvedOptions().timeZone;e=n?u.utcToZonedTime(t,n).toString():new Date(t).toString()}catch(e){t&&console.log("UTC to Local conversion failed for :"+t.toString())}return e},t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j(e.ɵɵinject(a.TranslateService))},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[{type:a.TranslateService}]};var V=function(){function t(t){this.localizeService=t}return t.prototype.transform=function(t,e,n){if(t)return e||(e="tr"),"tr"===e?this.localizeService.getLocalizedValue(t):"d"===e?this.localizeService.getLocalizedDate(t):"dt"===e?this.localizeService.getLocalizedDateTime(t):"dis"===e?this.localizeService.getLocalizedDistanceInWords(t,n):"dis2now"===e?this.localizeService.getLocalizedDistanceToNowInWords(t):"u2d"===e?this.localizeService.getUTCToLocalizedDate(t):"u2dt"===e?this.localizeService.getUTCToLocalizedDateTime(t):"u2dis2now"===e?this.localizeService.getUTCToLocalizedDistanceToNowInWords(t):t},t}();function A(t){return new p.TranslateHttpLoader(t,T.resourcesUrl+"/",".json")}function M(t,e,n){return function(){return new Promise((function(r){n.get(l.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var n=e.configureTranslationSettings(t);t.use(n).subscribe((function(){}),(function(){r(null)}),(function(){r(null)}))}))}))}}V.decorators=[{type:e.Pipe,args:[{name:"localize"}]}],V.ctorParameters=function(){return[{type:j}]};var B=a.TranslateModule.forRoot({loader:{provide:a.TranslateLoader,useFactory:A,deps:[r.HttpClient]}}),F=function(e){this.injector=e,t.LocalizationInjectorInstance=this.injector};F.decorators=[{type:e.NgModule,args:[{imports:[B],providers:[{provide:e.APP_INITIALIZER,useFactory:M,deps:[a.TranslateService,j,e.Injector],multi:!0}],exports:[]}]}],F.ctorParameters=function(){return[{type:e.Injector}]};var k=function(){};k.decorators=[{type:e.NgModule,args:[{imports:[a.TranslateModule],exports:[a.TranslateModule,V],declarations:[V],providers:[]}]}];var q=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(O).logError(t),t},t}();q.decorators=[{type:e.Injectable}],q.ctorParameters=function(){return[{type:e.Injector}]};var R=function(){function e(){}return Object.defineProperty(e,"localizationService",{get:function(){return t.LocalizationInjectorInstance.get(j)},enumerable:!1,configurable:!0}),e.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},e}(),G=function(){function t(){}return t.success=function(t,e,n,r){t=R.getLocalizedValue(t,e,"OperationSuccessFull"),n=R.getLocalizedValue(n,null,"Success"),S.default.fire({text:t,title:n,icon:"success",confirmButtonText:R.getLocalizedValue("Ok")}).then((function(){r&&r()}))},t.info=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n,null,"Info"),S.default.fire({text:t,title:n,icon:"info",confirmButtonText:R.getLocalizedValue("Ok")})},t.warning=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n,null,"Warning"),S.default.fire({text:t,title:n,icon:"warning",confirmButtonText:R.getLocalizedValue("Ok")})},t.error=function(t,e,n){t=R.getLocalizedValue(t,e,"ErrorOccured"),n=R.getLocalizedValue(n,null,"Error"),S.default.fire({text:t,title:n,icon:"error",confirmButtonText:R.getLocalizedValue("Ok")})},t.cancel=function(t,e,n){t=R.getLocalizedValue(t,e,"OperationCancelled"),n=R.getLocalizedValue(n,null,"Cancelled"),S.default.fire({text:t,title:n,icon:"info"})},t.notImplemented=function(){this.warning("Not Implemented Yet")},t.areYouSure=function(t,e,n,r,o,i){t=R.getLocalizedValue(t),e=R.getLocalizedValue(e,null,"AreYouSure"),n=R.getLocalizedValue(n,null,"AreYouSure-ConfirmButtonText"),r=R.getLocalizedValue(r,null,"AreYouSure-CancelButtonText"),S.default.fire({text:t,title:e,icon:"warning",confirmButtonText:n,cancelButtonText:r,showCancelButton:!0}).then((function(t){t.value?o&&o():t.dismiss!=S.default.DismissReason.cancel&&t.dismiss!=S.default.DismissReason.close||i&&i()}))},t}(),H=function(){function t(){}return t.newGuid=function(){return h.v4()},t}(),_=function(){function t(t){this.toastrService=t,this._sessionNotifications=new i.BehaviorSubject([]),this._serverNotifications=new i.BehaviorSubject([]),this.sessionNotifications$=this._sessionNotifications.asObservable(),this.serverNotifications$=this._serverNotifications.asObservable()}return t.prototype.addSessionNotification=function(t,e){var n={id:H.newGuid(),isNew:!0,isSession:!0,text:t,type:e,createdDate:new Date(Date.now()).toISOString()};this.addSessionNotificationToList(n)},t.prototype.addSessionNotificationToList=function(t){this.sessionNotifications=D([t],this.sessionNotifications)},t.prototype.removeNotification=function(t,e){e?this.sessionNotifications=this.sessionNotifications.filter((function(e){return e.id!==t})):this.serverNotifications=this.serverNotifications.filter((function(e){return e.id!==t}))},t.prototype.success=function(t,e,n,r){void 0===r&&(r=!0),t=R.getLocalizedValue(t,e,"OperationSuccessFull"),n=R.getLocalizedValue(n),this.toastrService.success(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"success")},t.prototype.info=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.warning=function(t,e,n){t=R.getLocalizedValue(t,e),n=R.getLocalizedValue(n),this.toastrService.warning(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.error=function(t,e,n,r){void 0===r&&(r=!0),t=R.getLocalizedValue(t,e,"ErrorOccured"),n=R.getLocalizedValue(n),this.toastrService.error(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"error")},t.prototype.cancel=function(t,e,n){t=R.getLocalizedValue(t,e,"OperationCancelled"),n=R.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},Object.defineProperty(t.prototype,"sessionNotifications",{get:function(){return this._sessionNotifications.getValue()},set:function(t){this._sessionNotifications.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverNotifications",{get:function(){return this._serverNotifications.getValue()},set:function(t){this._serverNotifications.next(t)},enumerable:!1,configurable:!0}),t}();_.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new _(e.ɵɵinject(f.ToastrService))},token:_,providedIn:"root"}),_.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],_.ctorParameters=function(){return[{type:f.ToastrService}]};var Z=function(){function t(t){this.http=t}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(o.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getExternalTextFile=function(t){return this.http.get(t)},t.prototype.getExternalJsonFile=function(t){return this.http.get(t)},t.prototype.getJsonFile=function(t){var e=T.jsonsUrl,n=T.jsonVersion,r=T.isCDNEnabled,i=T.cdnSasToken,a="";return a=r?e+"/"+t+i:e+"/"+t+"?"+n,this.http.get(a).pipe(o.map((function(t){return t})))},t}();Z.decorators=[{type:e.Injectable}],Z.ctorParameters=function(){return[{type:r.HttpClient}]};var K=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return P(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return I.isUserSignedIn},e.prototype.isUserAdmin=function(){return I.isUserAdmin},e}(Z);K.decorators=[{type:e.Injectable}],K.ctorParameters=function(){return[{type:r.HttpClient}]};var W=function(){function t(){this.expired$=new i.Subject}return t.prototype.resetTimeCounters=function(t){this.timeOutSeconds=t,this.timeOutMilliSeconds=1e3*t,this.startDate=new Date},t.prototype.startTimer=function(){var t=this;this.timer$=i.timer(this.timeOutMilliSeconds,1e3).subscribe((function(e){var n=new Date,r=new Date(t.startDate.getTime()+t.timeOutMilliSeconds);n.getTime()>=r.getTime()&&t.expired$.next(!0)}))},t.prototype.resetTimer=function(){this.startDate=new Date},t.prototype.startWatching=function(t){var e=this;return this.idle$=i.merge(i.fromEvent(document,"mousemove"),i.fromEvent(document,"click"),i.fromEvent(document,"mousedown"),i.fromEvent(document,"keypress"),i.fromEvent(document,"DOMMouseScroll"),i.fromEvent(document,"mousewheel"),i.fromEvent(document,"touchmove"),i.fromEvent(document,"MSPointerMove"),i.fromEvent(window,"mousemove"),i.fromEvent(window,"resize")),this.resetTimeCounters(t),this.idleSubscription=this.idle$.subscribe((function(t){e.resetTimer()})),this.startTimer(),this.expired$},t.prototype.stopWatching=function(){this.timer$.unsubscribe(),this.idleSubscription.unsubscribe()},t.prototype.restartIdleTimer=function(t){this.timer$.unsubscribe(),this.resetTimeCounters(t),this.startTimer()},t}();W.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new W},token:W,providedIn:"root"}),W.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var Y=function(){function t(t){this.storage="local"===t||"localStorage"===t?localStorage:sessionStorage}return t.prototype.setItem=function(t,e){this.storage.setItem(t,e)},t.prototype.setObject=function(t,e){this.storage.setItem(t,JSON.stringify(e))},t.prototype.getItem=function(t){return this.storage.getItem(t)},t.prototype.getObject=function(t){return JSON.parse(this.storage.getItem(t)||"{}")},t.prototype.remove=function(t){this.storage.removeItem(t)},t}(),J=function(t){function e(){return t.call(this,"localStorage")||this}return P(e,t),e}(Y);J.decorators=[{type:e.Injectable}],J.ctorParameters=function(){return[]};var Q=function(t){function e(){return t.call(this,"sessionStorage")||this}return P(e,t),e}(Y);Q.decorators=[{type:e.Injectable}],Q.ctorParameters=function(){return[]};var X=function(){function t(t,e,n){this.title=t,this.meta=e,this.dom=n}return t.prototype.updateTitle=function(t){this.title.setTitle(t)},t.prototype.updateDescription=function(t){this.meta.updateTag({name:"description",content:t})},t.prototype.updateKeywords=function(t){this.meta.updateTag({name:"keywords",content:t})},t.prototype.updateMetaTags=function(t){var e=this;t.forEach((function(t){return e.meta.updateTag(t)}))},t.prototype.setCanonicalUrl=function(t){var e=void 0===t?this.dom.URL:t,n=this.dom.createElement("link");n.setAttribute("rel","canonical"),this.dom.head.appendChild(n),n.setAttribute("href",e)},t.prototype.updateCanonicalUrl=function(t){var e=void 0===t?this.dom.URL:t,n=this.dom.getElementsByTagName("head")[0],r=this.dom.querySelector("link[rel='canonical']")||null;null==r&&(r=this.dom.createElement("link"),n.appendChild(r)),r.setAttribute("rel","canonical"),r.setAttribute("href",e)},t}();X.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new X(e.ɵɵinject(g.Title),e.ɵɵinject(g.Meta),e.ɵɵinject(l.DOCUMENT))},token:X,providedIn:"root"}),X.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],X.ctorParameters=function(){return[{type:g.Title},{type:g.Meta},{type:void 0,decorators:[{type:e.Inject,args:[l.DOCUMENT]}]}]};var tt=function(){function t(t){this.router=t}return t.prototype.subscribe=function(){this.subscription=this.router.events.subscribe((function(t){t instanceof n.NavigationEnd&&window.ga&&(window.ga("set","page",t.urlAfterRedirects),window.ga("send","pageview"))}))},t.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},t}();tt.decorators=[{type:e.Injectable}],tt.ctorParameters=function(){return[{type:n.Router}]};var et=function(e,n){this.injector=e,C(n,"AnatolyCoreModule"),t.InjectorInstance=this.injector};et.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule],exports:[],providers:[O,_,K,E,X,tt,J,Q]}]}],et.ctorParameters=function(){return[{type:e.Injector},{type:et,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var nt=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),rt=function(){function t(){}return t.getValueByNameInQS=function(e){return t.getValueByName(location.search,e)},t.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},t.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},t.downloadBlobFile=function(e,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(e,n);else{var r=window.URL.createObjectURL(e);t.downloadFile(n,r)}},t}(),ot=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.data=[],n}return P(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var i=this;if(this.data.length)return t.prototype.next.call(this,this.data);var a=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(a=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(a).pipe(o.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(i,e),n&&n()}),(function(t){r&&r(t)}))},e}(i.BehaviorSubject);ot.decorators=[{type:e.Injectable}],ot.ctorParameters=function(){return[{type:r.HttpClient}]};var it=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n}return P(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.delete=function(t,e){var n=this;this.reset();var r=this.baseUrl+"/delete"+this.serializeParams(t);return this.http.delete(r).subscribe((function(){n.read(),e&&e()}),(function(){n.read()}))},e.prototype.post=function(t,e){var n=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(n,e).pipe(o.map((function(t){return t})))},e}(ot);it.decorators=[{type:e.Injectable}],it.ctorParameters=function(){return[{type:r.HttpClient}]};var at="api/billing",st="api/notifications",ut=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=st,n}return P(e,t),e.prototype.retrieveNotifications=function(){return this.get("retrieveNotifications")},e}(Z);ut.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new ut(e.ɵɵinject(r.HttpClient))},token:ut,providedIn:"root"}),ut.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],ut.ctorParameters=function(){return[{type:r.HttpClient}]};var ct=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=at,n}return P(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){e&&e()}),(function(t){n&&n()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(e){t&&t()}),(function(t){e&&e()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){e&&e()}),(function(t){n&&n()}))},e}(Z);ct.decorators=[{type:e.Injectable}],ct.ctorParameters=function(){return[{type:r.HttpClient}]};var lt=function(t){C(t,"AnatolyDataModule")};lt.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule],providers:[ct]}]}],lt.ctorParameters=function(){return[{type:lt,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var pt=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;G.areYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){G.success("Access Granted",null,null,(function(){window.location.reload()}))}))}))},t}();pt.decorators=[{type:e.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],pt.ctorParameters=function(){return[{type:K},{type:ct}]},pt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var dt=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();dt.decorators=[{type:e.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],dt.ctorParameters=function(){return[{type:K}]},dt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var ft=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;G.areYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){G.success("Your request for changing plan has been sent.",null,null,(function(){window.location.reload()}))}))}))},t}();ft.decorators=[{type:e.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],ft.ctorParameters=function(){return[{type:ct}]},ft.propDecorators={currentplantitle:[{type:e.Input}],requestedplan:[{type:e.Input}],requestedplantitle:[{type:e.Input}]};var ht=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();ht.decorators=[{type:e.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],ht.propDecorators={title:[{type:e.Input}]};var gt={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},mt=function(){function t(){this.subs=new nt}return t.prototype.getQSId=function(){var t=rt.getValueByNameInQS("id");return void 0===t||""==t?null:t},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}(),yt=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return P(e,t),e.prototype.isActionAdding=function(){var t=rt.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e.prototype.addControl=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).addControl(t,e)},e.prototype.removeControl=function(t,e){void 0===e&&(e=null);var n=e||this.formGroup;n.get(t)&&n.removeControl(t)},e.prototype.createFormControl=function(t,e,n){return new m.FormControl(t,e,n)},e.prototype.setControlError=function(t,e,n){var r;void 0===n&&(n=null),null===(r=(n||this.formGroup).get(t))||void 0===r||r.setErrors(e)},e.prototype.setInValidError=function(t,e){var n;void 0===e&&(e=null),null===(n=(e||this.formGroup).get(t))||void 0===n||n.setErrors({invalid:!0})},Object.defineProperty(e.prototype,"fc",{get:function(){return this.formGroup.controls},enumerable:!1,configurable:!0}),e}(mt);yt.propDecorators={formGroup:[{type:e.Input}],formSubmitted:[{type:e.Input}]};var vt=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return P(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},gt,t),n=T.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(yt);vt.propDecorators={editorLabelText:[{type:e.Input}],editorOptions:[{type:e.Input}]};var bt=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return P(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(vt);bt.decorators=[{type:e.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],bt.ctorParameters=function(){return[]},bt.propDecorators={editorFormKey:[{type:e.Input}]};var St=function(t){function e(){return t.call(this)||this}return P(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(vt);St.decorators=[{type:e.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],St.ctorParameters=function(){return[]};var It=function(){};It.decorators=[{type:e.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],It.ctorParameters=function(){return[]},It.propDecorators={classbtn:[{type:e.Input}]};var Tt=function(){};Tt.decorators=[{type:e.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],Tt.ctorParameters=function(){return[]},Tt.propDecorators={classbtn:[{type:e.Input}]};var wt=function(){};wt.decorators=[{type:e.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],wt.propDecorators={classbtn:[{type:e.Input}]};var Ct=function(){function t(t){this.loadingService=t,this.subs=new nt,this.show=!1}return t.prototype.ngOnInit=function(){var t=this;this.subs.sink=this.loadingService.subscribe((function(e){t.show=e}))},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}();Ct.decorators=[{type:e.Component,args:[{selector:"anatoly-loading",template:'<div *ngIf="show">\r\n <span id="pnlLoading" class="k-icon k-i-loading"></span>\r\n</div>\r\n'}]}],Ct.ctorParameters=function(){return[{type:E}]};var xt={spinnerLine:"spinner-line-material",ChasingDots:"spinner-chasing-dots",CubeGrid:"spinner-cube-grid",DoubleBounce:"spinner-double-bounce",RotatingPlane:"spinner-rotationg-plane",SpinnerPulse:"spinner-spinner-pulse",ThreeBounce:"spinner-three-bounce",WanderingCubes:"spinner-wandering-cubes",Wave:"spinner-wave"},Pt=function(){function t(t,e){var r=this;this.router=t,this.document=e,this.isSpinnerVisible=!0,this.spinnerSpinKit=xt,this.backgroundColor="#007CB0",this.spinner=xt.spinnerLine,this.router.events.subscribe((function(t){t instanceof n.NavigationStart?r.isSpinnerVisible=!0:(t instanceof n.NavigationEnd||t instanceof n.NavigationCancel||t instanceof n.NavigationError)&&(r.isSpinnerVisible=!1)}),(function(){r.isSpinnerVisible=!1}))}return t.prototype.ngOnDestroy=function(){this.isSpinnerVisible=!1},t}();Pt.decorators=[{type:e.Component,args:[{selector:"spinner",template:'<div id="spinner-loader" *ngIf="isSpinnerVisible">\r\n <div class="loader-bg">\r\n <div class="spinner-line-material" [class.colored]="!backgroundColor" *ngIf="spinner === spinnerSpinKit.spinnerLine">\r\n <div class="spinner-child spinner-bounce1" [style.background-color]=\'backgroundColor\'></div>\r\n </div>\r\n </div>\r\n</div>\r\n',encapsulation:e.ViewEncapsulation.None}]}],Pt.ctorParameters=function(){return[{type:n.Router},{type:Document,decorators:[{type:e.Inject,args:[l.DOCUMENT]}]}]},Pt.propDecorators={backgroundColor:[{type:e.Input}],spinner:[{type:e.Input}]};var Lt=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();Lt.decorators=[{type:e.Directive,args:[{selector:"[formControl], [formControlName]"}]}],Lt.ctorParameters=function(){return[{type:e.ElementRef},{type:m.NgControl}]};var zt=function(){function t(){}return t.prototype.transform=function(t,e,n){return t?t.replace(new RegExp(e,"g"),n):t},t}();zt.decorators=[{type:e.Pipe,args:[{name:"replaceText"}]}];var Dt=function(){function t(){this.units=["Bytes","KB","MB","GB","TB","PB"]}return t.prototype.transform=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=0),isNaN(parseFloat(String(t)))||!isFinite(t))return"";for(var n=0;t>=1024;)t/=1024,n++;return t.toFixed(+e)+" "+this.units[n]},t}();Dt.decorators=[{type:e.Pipe,args:[{name:"filesize"}]}];var Et=function(){function t(t){this.sanitized=t}return t.prototype.transform=function(t){return this.sanitized.bypassSecurityTrustHtml(t)},t}();Et.decorators=[{type:e.Pipe,args:[{name:"safeHtml"}]}],Et.ctorParameters=function(){return[{type:g.DomSanitizer}]};var Ot=function(t){function e(){return t.call(this)||this}return P(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(yt),Nt=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return P(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,D(t)),this.customerrors.length>0&&e.push.apply(e,D(this.customerrors)),e},e}(Ot);Nt.decorators=[{type:e.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],Nt.ctorParameters=function(){return[]},Nt.propDecorators={visible:[{type:e.Input}],customerrors:[{type:e.Input}],viewtype:[{type:e.Input}]};var Ut=function(t){function e(){return t.call(this)||this}return P(e,t),e}(Ot);Ut.decorators=[{type:e.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={controlName:[{type:e.Input}],controlTitle:[{type:e.Input}]};var jt=y.FroalaEditorModule.forRoot(),Vt=y.FroalaViewModule.forRoot(),At=function(){};At.decorators=[{type:e.NgModule,args:[{imports:[l.CommonModule,m.ReactiveFormsModule,m.FormsModule,jt,Vt],exports:[dt,ft,pt,It,wt,Tt,Nt,Ut,St,bt,ht,Pt,Ct,Lt,Et,zt,Dt],declarations:[dt,ft,pt,It,wt,Tt,Nt,Ut,St,bt,ht,Pt,Ct,Lt,Et,zt,Dt]}]}],t.Alerts=G,t.AnatolyCoreModule=et,t.AnatolyDataModule=lt,t.AnatolyHttpInterceptor=N,t.AnatolyUIModule=At,t.AppContextService=K,t.AppCoreSettings=T,t.BaseApiService=Z,t.BaseComponent=mt,t.BaseEditComponent=yt,t.BaseGoService=w,t.BaseGridEditService=it,t.BaseGridReadService=ot,t.BaseHtmlEditorComponent=vt,t.BillingApiService=ct,t.BuyAccessButtonComponent=pt,t.ContentHeaderComponent=ht,t.ContextInitState=I,t.Convert=U,t.DefaultEditorOptions=gt,t.DigitalMarketingService=X,t.FileSizePipe=Dt,t.FormValidationSummaryComponent=Nt,t.FormsHtmlEditorComponent=bt,t.FroalaEditorModuleWithProviders=jt,t.FroalaViewModuleWithProviders=Vt,t.GlobalErrorHandler=q,t.GoogleAnalyticsService=tt,t.Guid=H,t.HtmlEditorComponent=St,t.IdleService=W,t.ItemValidationSummaryComponent=Ut,t.LoadingComponent=Ct,t.LoadingService=E,t.LocalStorageService=J,t.LocalizationModule=k,t.LocalizationService=j,t.LocalizationSettingsModule=F,t.LocalizePipe=V,t.LoggingService=O,t.NativeElementDirective=Lt,t.NotificationService=_,t.NotificationsApiService=ut,t.ReplaceTextPipe=zt,t.SafeHtmlPipe=Et,t.SessionStorageService=Q,t.SignInButtonComponent=It,t.SignOutButtonComponent=Tt,t.SignUpButtonComponent=wt,t.SpinnerComponent=Pt,t.Subs=nt,t.SubscribePlanButtonComponent=dt,t.TranslateModuleAtRoot=B,t.UpgradePlanButtonComponent=ft,t.Urls={notificationsSocketUrl:"/hubs/notifications"},t.Utils=rt,t.ValidationSummaryComponent=Ot,t.customTranslateLoaderFactory=A,t.localizationInitializerFactory=M,t.throwIfAlreadyLoaded=C,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=osovitny-anatoly.umd.min.js.map