"use strict";(self.webpackChunkdemo1=self.webpackChunkdemo1||[]).push([["src_app_pages_ess-iframe_ess-iframe_module_ts"],{84959:(x,d,i)=>{i.r(d),i.d(d,{EssIframeModule:()=>M});var c=i(36895),s=i(8988),e=i(94650),l=i(24006),f=i(71935),h=i(53326),g=i(11481),p=i(13469);function u(t,r){1&t&&(e.\u0275\u0275elementStart(0,"div",3),e.\u0275\u0275element(1,"i",4),e.\u0275\u0275elementEnd())}function v(t,r){if(1&t){const n=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"iframe",5),e.\u0275\u0275listener("load",function(){e.\u0275\u0275restoreView(n);const a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.iframeLoaded())}),e.\u0275\u0275elementEnd()}if(2&t){const n=e.\u0275\u0275nextContext();e.\u0275\u0275property("src",n.safeUrl,e.\u0275\u0275sanitizeResourceUrl)}}const C=[{path:"dashboard",component:(()=>{class t{constructor(n,o,a,m,E,b,j,w,L,O){this.route=n,this.fb=o,this.router=a,this.cdRef=m,this.genService=E,this.activatedRoute=b,this.urlService=j,this.sanitizer=w,this.location=L,this.cookieService=O,this.iframeLoading=!1,this.LoggedInMedium=this.genService.GetLoggedInMedium(),this.iframeLoading=!0}ngOnInit(){this.route.params.subscribe(n=>{this.path=n.param;const o=this.urlService.getCompanyUrlByParam(this.path);this.updateCompanyUrl(o)}),this.screenWidth=window.innerWidth,this.screenHeight=window.innerHeight}updateCompanyUrl(n){this.iframeLoading=!0,n&&(console.log("Iframe loaded updateCompanyUrl.",this.iframeLoading),this.CompanyUrl=n,this.safeUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.CompanyUrl),console.log("URL for Iframe:",this.safeUrl))}onOrientationChange(n){this.screenWidth=window.screen.width,this.screenHeight=window.screen.height,this.cdRef.detectChanges()}iframeLoaded(){this.iframeLoading=!1,console.log("Iframe loaded iframeLoaded.",this.iframeLoading)}}return t.\u0275fac=function(n){return new(n||t)(e.\u0275\u0275directiveInject(s.gz),e.\u0275\u0275directiveInject(l.qu),e.\u0275\u0275directiveInject(s.F0),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(f.m),e.\u0275\u0275directiveInject(s.gz),e.\u0275\u0275directiveInject(h.X),e.\u0275\u0275directiveInject(g.H7),e.\u0275\u0275directiveInject(c.Location),e.\u0275\u0275directiveInject(p.N))},t.\u0275cmp=e.\u0275\u0275defineComponent({type:t,selectors:[["app-ess-iframe"]],hostBindings:function(n,o){1&n&&e.\u0275\u0275listener("orientationchange",function(m){return o.onOrientationChange(m)},!1,e.\u0275\u0275resolveWindow)},decls:3,vars:2,consts:[[1,"full-height-container"],["class","mask",4,"ngIf"],["width","100%","height","100%","frameborder","0","scrolling","auto",3,"src","load",4,"ngIf"],[1,"mask"],[1,"pei","pei-spinner"],["width","100%","height","100%","frameborder","0","scrolling","auto",3,"src","load"]],template:function(n,o){1&n&&(e.\u0275\u0275elementStart(0,"div",0),e.\u0275\u0275template(1,u,2,0,"div",1),e.\u0275\u0275template(2,v,1,1,"iframe",2),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",o.iframeLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",o.safeUrl))},dependencies:[c.NgIf],styles:['.full-height-container[_ngcontent-%COMP%]{width:100%;height:100vh;position:relative;display:flex;justify-content:center;align-items:center}nav[_ngcontent-%COMP%]{font-size:1.5rem;height:3rem;line-height:3rem;background-color:#eee;padding:0 1rem}a[_ngcontent-%COMP%]{padding:0 2rem}.mask[_ngcontent-%COMP%]{position:absolute;width:100%;height:calc(100% - 3.25rem);top:3rem;background-color:#ffffff80;text-align:center}.mask[_ngcontent-%COMP%] > .pei-spinner[_ngcontent-%COMP%]:before{font-size:8rem;margin-top:300px}iframe[_ngcontent-%COMP%]{width:100%;height:calc(100% - 3.25rem);border:0}.pei[_ngcontent-%COMP%]{display:inline-block;position:relative;font-style:normal;font-family:Arial}.pei-spinner[_ngcontent-%COMP%]:before{content:"";vertical-align:text-bottom;display:inline-block;box-sizing:border-box;width:1em;height:1em;border:.1em solid rgba(33,150,243,.8);border-right-color:transparent;border-radius:.625em;animation:_ngcontent-%COMP%_pei-infinite-spinning .75s linear infinite}@keyframes _ngcontent-%COMP%_pei-infinite-spinning{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']}),t})()}];let I=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=e.\u0275\u0275defineInjector({imports:[s.Bz.forChild(C),s.Bz]}),t})();var y=i(51572);let M=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=e.\u0275\u0275defineInjector({imports:[c.CommonModule,I,y.Cq]}),t})()}}]);