1"use strict";(self.webpackChunkcode_project_angular4_portal=self.webpackChunkcode_project_angular4_portal||[]).push([["default-node_modules_ngx-doc-viewer_fesm2020_ngx-doc-viewer_mjs"],{19885:(N,p,a)=>{a.d(p,{$j:()=>K,EE:()=>U});var d=a(10467),r=a(17705),v=a(345),u=o=>{const i=o.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return i&&{href:o,protocol:i[1],host:i[2],hostname:i[3],port:i[4],pathname:i[5],search:i[6],hash:i[7]}},_=function(){var o=(0,d.A)(function*(i){mammoth||console.error("Please install mammoth and make sure mammoth.browser.min.js is loaded.");const e=yield(o=>new Promise((i,e)=>{try{const t=new XMLHttpRequest;t.open("GET",o,!0),t.responseType="arraybuffer",t.onload=()=>{t.status>=200&&t.status<300?i(t.response):e(`error while retrieving file ${o} (status ${t.status}).`)},t.onerror=()=>e(`error while retrieving file ${o}.`),t.send()}catch{e(`error while retrieving file ${o}.`)}}))(i);return(yield mammoth.convertToHtml({arrayBuffer:e})).value});return function(e){return o.apply(this,arguments)}}(),g=o=>{let i=!1;try{i=!o?.contentDocument}catch{}return i},h=(o,i="google",e="",t="")=>{switch(i){case"google":t="https://docs.google.com/gview?url=%URL%&embedded=true";break;case"office":t="https://view.officeapps.live.com/op/embed.aspx?src=%URL%";break;case"pdf":t=""}const n="google"===i||"office"===i||"url"===i,s=o?.indexOf("/")?encodeURIComponent(o):o;let c=t?t.replace("%URL%",s):o;return e&&n&&"url"!==i&&(c=`${c}${e.startsWith("&")?"":"&"}${e}`),{url:c,externalViewer:n}},m=a(60177);const T=["iframe"];function V(o,i){if(1&o&&r.nrm(0,"div",3),2&o){const e=r.XpG(2);r.Y8G("innerHtml",e.docHtml,r.npT)}}function k(o,i){if(1&o&&(r.j41(0,"object",4)(1,"p"),r.EFF(2," Your browser does not support PDFs. "),r.j41(3,"a",5),r.EFF(4,"Download the PDF"),r.k0s(),r.EFF(5,". "),r.k0s()()),2&o){const e=r.XpG(2);r.Y8G("data",e.fullUrl,r.f$h),r.R7$(3),r.Y8G("href",e.fullUrl,r.B4B)}}function D(o,i){if(1&o&&(r.qex(0),r.DNE(1,V,1,1,"div",1),r.DNE(2,k,6,2,"object",2),r.bVm()),2&o){const e=r.XpG();r.R7$(1),r.Y8G("ngIf","pdf"!==e.configuredViewer),r.R7$(1),r.Y8G("ngIf",e.fullUrl&&"pdf"===e.configuredViewer)}}function S(o,i){if(1&o){const e=r.RV6();r.j41(0,"iframe",8,9),r.bIt("load",function(){r.eBV(e);const n=r.XpG(2);return r.Njj(n.iframeLoaded())}),r.k0s()}if(2&o){const e=r.XpG(2);r.Y8G("src",e.fullUrl,r.f$h)}}function F(o,i){if(1&o){const e=r.RV6();r.j41(0,"iframe",12,9),r.bIt("load",function(){r.eBV(e);const n=r.XpG(3);return r.Njj(n.iframeLoaded())}),r.k0s()}if(2&o){const e=r.XpG(3);r.Y8G("src",e.fullUrl,r.f$h)}}function G(o,i){if(1&o&&(r.j41(0,"div",10),r.nrm(1,"div"),r.DNE(2,F,2,1,"iframe",11),r.k0s()),2&o){const e=r.XpG(2);r.R7$(1),r.xc7("background-color","popout-hide"===e.disableContent?"#fff":"transparent"),r.AVh("overlay-full","all"===e.disableContent)("overlay-popout-google","google"===e.configuredViewer&&("popout"===e.disableContent||"popout-hide"===e.disableContent))("overlay-popout-office","office"===e.configuredViewer&&("popout"===e.disableContent||"popout-hide"===e.disableContent)),r.R7$(1),r.Y8G("ngIf",e.fullUrl)}}function L(o,i){if(1&o&&(r.qex(0),r.DNE(1,S,2,1,"iframe",6),r.DNE(2,G,3,9,"div",7),r.bVm()),2&o){const e=r.XpG();r.R7$(1),r.Y8G("ngIf",e.fullUrl&&"none"===e.disableContent),r.R7$(1),r.Y8G("ngIf","none"!==e.disableContent)}}let K=(()=>{class o{constructor(e,t){this.domSanitizer=e,this.ngZone=t,this.loaded=new r.bkB,this.url="",this.queryParams="",this.viewerUrl="",this.googleCheckInterval=3e3,this.googleMaxChecks=5,this.disableContent="none",this.googleCheckContentLoaded=!0,this.viewer="google",this.overrideLocalhost="",this.iframes=void 0,this.fullUrl=void 0,this.externalViewer=!1,this.docHtml="",this.configuredViewer="google",this.checkIFrameSubscription=void 0,this.shouldCheckIframe=!1}ngAfterViewInit(){if(this.shouldCheckIframe){const e=this.iframes?.first?.nativeElement;e&&(this.shouldCheckIframe=!1,this.reloadIframe(e))}}ngOnDestroy(){this.checkIFrameSubscription&&this.checkIFrameSubscription.unsubscribe()}ngOnChanges(e){var t=this;return(0,d.A)(function*(){if(e&&e.viewer&&(e.viewer.isFirstChange||e.viewer.currentValue!==e.viewer.previousValue)&&("google"!==t.viewer&&"office"!==t.viewer&&"mammoth"!==t.viewer&&"pdf"!==t.viewer&&"url"!==t.viewer&&console.error(`Unsupported viewer: '${t.viewer}'. Supported viewers: google, office, mammoth and pdf`),t.configuredViewer=t.viewer),e.url&&e.url.currentValue!==e.url.previousValue||e.viewer&&e.viewer.currentValue!==e.viewer.previousValue||e.viewerUrl&&e.viewerUrl.currentValue!==e.viewerUrl.previousValue){let n=h(t.url,t.configuredViewer,t.queryParams,t.viewerUrl);
1if(t.externalViewer=n.externalViewer,n.externalViewer&&t.overrideLocalhost&&(o=>{const e=u(o)?.hostname||"";return["localhost","127.0.0.1","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")})(t.url)){const s=((o,i)=>{const e=u(o),t=u(i);return e&&t?o.replace(e.port?`${e.hostname}:${e.port}`:e.hostname,t.port?`${t.hostname}:${t.port}`:t.hostname):o})(t.url,t.overrideLocalhost);n=h(s,t.configuredViewer,t.queryParams,t.viewerUrl)}t.docHtml="",t.checkIFrameSubscription&&t.checkIFrameSubscription.unsubscribe(),t.url?n.externalViewer||"url"===t.configuredViewer||"pdf"===t.configuredViewer?(t.fullUrl=t.domSanitizer.bypassSecurityTrustResourceUrl(n.url),"google"===t.configuredViewer&&t.googleCheckContentLoaded&&t.ngZone.runOutsideAngular(()=>{const s=t.iframes?.first?.nativeElement;s?t.reloadIframe(s):t.shouldCheckIframe=!0})):"mammoth"===t.configuredViewer&&(t.docHtml=yield _(t.url)):t.fullUrl=void 0}})()}reloadIframe(e){this.checkIFrameSubscription=(()=>{let o,i=0;return{subscribe:(e,t=3e3,n=5)=>(g(e)?o&&clearInterval(o):o=setInterval(()=>{i++,i>=n&&clearInterval(o),(o=>{if(o){const i=o.src;o.src="about:blank",setTimeout(()=>{o&&(o.src=i)},100)}})(e)},t),o),unsubscribe:()=>{o&&clearInterval(o)}}})(),this.checkIFrameSubscription.subscribe(e,this.googleCheckInterval,this.googleMaxChecks)}iframeLoaded(){const e=this.iframes?.first?.nativeElement;e&&g(e)&&(this.loaded.emit(void 0),this.checkIFrameSubscription&&this.checkIFrameSubscription.unsubscribe())}}return o.\u0275fac=function(e){return new(e||o)(r.rXU(v.up),r.rXU(r.SKi))},o.\u0275cmp=r.VBU({type:o,selectors:[["ngx-doc-viewer"]],viewQuery:function(e,t){if(1&e&&r.GBs(T,5),2&e){let n;r.mGM(n=r.lsd())&&(t.iframes=n)}},inputs:{url:"url",queryParams:"queryParams",viewerUrl:"viewerUrl",googleCheckInterval:"googleCheckInterval",googleMaxChecks:"googleMaxChecks",disableContent:"disableContent",googleCheckContentLoaded:"googleCheckContentLoaded",viewer:"viewer",overrideLocalhost:"overrideLocalhost"},outputs:{loaded:"loaded"},features:[r.OA$],decls:2,vars:2,consts:[[4,"ngIf"],[3,"innerHtml",4,"ngIf"],["type","application/pdf","width","100%","height","100%",3,"data",4,"ngIf"],[3,"innerHtml"],["type","application/pdf","width","100%","height","100%",3,"data"],[3,"href"],["id","iframe-doc-viewer","frameBorder","0",3,"src","load",4,"ngIf"],["class","container",4,"ngIf"],["id","iframe-doc-viewer","frameBorder","0",3,"src","load"],["iframe",""],[1,"container"],["id","iframe","frameBorder","0",3,"src","load",4,"ngIf"],["id","iframe","frameBorder","0",3,"src","load"]],template:function(e,t){1&e&&(r.DNE(0,D,3,2,"ng-container",0),r.DNE(1,L,3,2,"ng-container",0)),2&e&&(r.Y8G("ngIf",!t.externalViewer),r.R7$(1),r.Y8G("ngIf",t.externalViewer))},dependencies:[m.bT],styles:["[_nghost-%COMP%]{display:block}.container[_ngcontent-%COMP%]{width:100%;height:100%;position:relative}.overlay-popout-google[_ngcontent-%COMP%]{width:40px;height:40px;right:26px;top:11.5px;position:absolute;z-index:1000}.overlay-popout-office[_ngcontent-%COMP%]{width:100px;height:20px;right:0;bottom:0;position:absolute;z-index:1000}.overlay-full[_ngcontent-%COMP%]{width:100%;height:100%;right:0;top:0;position:absolute;z-index:1000}iframe[_ngcontent-%COMP%]{width:100%;height:100%}"]}),o})(),U=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=r.$C({type:o}),o.\u0275inj=r.G2t({imports:[m.MD]}),o})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.