HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/smarthr-co-in/demo/angular/template/chunk-OYVF23CL.js
import{b as ge}from"./chunk-FNGOIWEU.js";import{a as fe}from"./chunk-ILLDEPHH.js";import{d as ue}from"./chunk-WA2UGD5L.js";import"./chunk-BT37DHWM.js";import{$a as ae,Ha as O,Hd as me,Jb as de,Mb as U,Nb as Q,Pb as q,Qb as K,Rb as G,Sb as _,Tb as p,Ub as v,Vb as j,Wb as R,Xb as x,_a as D,ab as M,ac as Z,bc as X,cc as g,db as le,dc as Y,ec as L,f as re,fa as w,fb as c,ic as b,ja as C,jc as y,kc as E,pa as z,pb as he,qa as P,rb as N,sa as se,sb as m,sc as V,ta as S,tc as T,uc as ce,yb as B}from"./chunk-AQ27DSQO.js";import{d as Re,e as xe}from"./chunk-EQDQRRRY.js";var pe=Re((J,ee)=>{"use strict";(function(n,l){typeof define=="function"&&define.amd?define([],l):typeof J<"u"?l():(l(),n.FileSaver={})})(J,function(){"use strict";function n(o,s){return typeof s>"u"?s={autoBom:!1}:typeof s!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function l(o,s,d){var h=new XMLHttpRequest;h.open("GET",o),h.responseType="blob",h.onload=function(){a(h.response,s,d)},h.onerror=function(){console.error("could not download file")},h.send()}function e(o){var s=new XMLHttpRequest;s.open("HEAD",o,!1);try{s.send()}catch{}return 200<=s.status&&299>=s.status}function t(o){try{o.dispatchEvent(new MouseEvent("click"))}catch{var s=document.createEvent("MouseEvents");s.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(s)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,r=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(o,s,d){var h=i.URL||i.webkitURL,f=document.createElement("a");s=s||o.name||"download",f.download=s,f.rel="noopener",typeof o=="string"?(f.href=o,f.origin===location.origin?t(f):e(f.href)?l(o,s,d):t(f,f.target="_blank")):(f.href=h.createObjectURL(o),setTimeout(function(){h.revokeObjectURL(f.href)},4e4),setTimeout(function(){t(f)},0))}:"msSaveOrOpenBlob"in navigator?function(o,s,d){if(s=s||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(n(o,d),s);else if(e(o))l(o,s,d);else{var h=document.createElement("a");h.href=o,h.target="_blank",setTimeout(function(){t(h)})}}:function(o,s,d,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof o=="string")return l(o,s,d);var f=o.type==="application/octet-stream",we=/constructor/i.test(i.HTMLElement)||i.safari,ne=/CriOS\/[\d]+/.test(navigator.userAgent);if((ne||f&&we||r)&&typeof FileReader<"u"){var W=new FileReader;W.onloadend=function(){var A=W.result;A=ne?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=A:location=A,h=null},W.readAsDataURL(o)}else{var oe=i.URL||i.webkitURL,$=oe.createObjectURL(o);h?h.location=$:location.href=$,h=null,setTimeout(function(){oe.revokeObjectURL($)},4e4)}});i.saveAs=a.saveAs=a,typeof ee<"u"&&(ee.exports=a)})});var _e=xe(pe(),1);var ve=(()=>{class n{get isFileSaverSupported(){try{return!!new Blob}catch{return!1}}genType(e){if(!e||e.lastIndexOf(".")===-1)return"text/plain";let t=e.substr(e.lastIndexOf(".")+1);switch(t){case"txt":return"text/plain";case"xml":case"html":return`text/${t}`;case"json":return"octet/stream";default:return`application/${t}`}}save(e,t,i,r){if(!e)throw new Error("Data argument should be a blob instance");let a=new Blob([e],{type:i||e.type||this.genType(t)});(0,_e.saveAs)(a,decodeURI(t||"download"),r)}saveText(e,t,i){let r=new Blob([e]);this.save(r,t,void 0,i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var u={CHANGE_PAGE:1,CLOSE:2,OPEN:3,ZOOM_IN:4,ZOOM_OUT:5,ROTATE_LEFT:6,ROTATE_RIGHT:7},I=(()=>{class n{constructor(){this._lightboxEventSource=new re,this.lightboxEvent$=this._lightboxEventSource.asObservable()}broadcastLightboxEvent(e){this._lightboxEventSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac}),n})();function Ce(){return window}var te=(()=>{class n{get nativeWindow(){return Ce()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac}),n})();var Le=["outerContainer"],Se=["container"],Oe=["leftArrow"],Be=["rightArrow"],Te=["navArrow"],ke=["dataContainer"],Ae=["image"],De=["caption"],Me=["number"],Ne=["lb-content",""],be=(()=>{class n{constructor(e,t,i,r,a,o,s,d){this._elemRef=e,this._rendererRef=t,this._lightboxEvent=i,this._lightboxElem=r,this._lightboxWindowRef=a,this._fileSaverService=o,this._sanitizer=s,this._documentRef=d,this.options=this.options||{},this.album=this.album||[],this.currentImageIndex=this.currentImageIndex||0,this._windowRef=this._lightboxWindowRef.nativeWindow,this.ui={showReloader:!0,showLeftArrow:!1,showRightArrow:!1,showArrowNav:!1,showZoomButton:!1,showRotateButton:!1,showPageNumber:!1,showCaption:!1,showDownloadButton:!1,classList:"lightbox animation fadeIn"},this.content={pageNumber:""},this._event={},this._lightboxElem=this._elemRef,this._event.subscription=this._lightboxEvent.lightboxEvent$.subscribe(h=>this._onReceivedEvent(h)),this.rotate=0}ngOnInit(){this.album.forEach(e=>{e.caption&&(e.caption=this._sanitizer.sanitize(D.HTML,e.caption))})}ngAfterViewInit(){this._cssValue={containerTopPadding:Math.round(this._getCssStyleValue(this._containerElem,"padding-top")),containerRightPadding:Math.round(this._getCssStyleValue(this._containerElem,"padding-right")),containerBottomPadding:Math.round(this._getCssStyleValue(this._containerElem,"padding-bottom")),containerLeftPadding:Math.round(this._getCssStyleValue(this._containerElem,"padding-left")),imageBorderWidthTop:Math.round(this._getCssStyleValue(this._imageElem,"border-top-width")),imageBorderWidthBottom:Math.round(this._getCssStyleValue(this._imageElem,"border-bottom-width")),imageBorderWidthLeft:Math.round(this._getCssStyleValue(this._imageElem,"border-left-width")),imageBorderWidthRight:Math.round(this._getCssStyleValue(this._imageElem,"border-right-width"))},this._validateInputData()&&(this._prepareComponent(),this._registerImageLoadingEvent())}ngOnDestroy(){this.options.disableKeyboardNav||this._disableKeyboardNav(),this._event.subscription.unsubscribe()}close(e){e.stopPropagation(),(e.target.classList.contains("lightbox")||e.target.classList.contains("lb-loader")||e.target.classList.contains("lb-close"))&&this._lightboxEvent.broadcastLightboxEvent({id:u.CLOSE,data:null})}download(e){e.stopPropagation();let t=this.album[this.currentImageIndex].src,i=this.album[this.currentImageIndex].downloadUrl,r=t.split("/"),a=r[r.length-1],o=document.createElement("canvas"),s=o.getContext("2d"),d=new Image,h=this;d.onload=function(){o.width=this.naturalWidth,o.height=this.naturalHeight,s.drawImage(this,0,0),o.toBlob(function(f){h._fileSaverService.save(f,a)},"image/jpeg",.75)},d.crossOrigin="",i&&i.length>0?d.src=this._sanitizer.sanitize(D.URL,i):d.src=this._sanitizer.sanitize(D.URL,t)}control(e){e.stopPropagation();let t,i;e.target.classList.contains("lb-turnLeft")?(this.rotate=this.rotate-90,this._rotateContainer(),this._calcTransformPoint(),this._documentRef.getElementById("image").style.transform=`rotate(${this.rotate}deg)`,this._documentRef.getElementById("image").style.webkitTransform=`rotate(${this.rotate}deg)`,this._lightboxEvent.broadcastLightboxEvent({id:u.ROTATE_LEFT,data:null})):e.target.classList.contains("lb-turnRight")?(this.rotate=this.rotate+90,this._rotateContainer(),this._calcTransformPoint(),this._documentRef.getElementById("image").style.transform=`rotate(${this.rotate}deg)`,this._documentRef.getElementById("image").style.webkitTransform=`rotate(${this.rotate}deg)`,this._lightboxEvent.broadcastLightboxEvent({id:u.ROTATE_RIGHT,data:null})):e.target.classList.contains("lb-zoomOut")?(t=parseInt(this._documentRef.getElementById("outerContainer").style.height,10)/1.5,i=parseInt(this._documentRef.getElementById("outerContainer").style.width,10)/1.5,this._documentRef.getElementById("outerContainer").style.height=t+"px",this._documentRef.getElementById("outerContainer").style.width=i+"px",t=parseInt(this._documentRef.getElementById("image").style.height,10)/1.5,i=parseInt(this._documentRef.getElementById("image").style.width,10)/1.5,this._documentRef.getElementById("image").style.height=t+"px",this._documentRef.getElementById("image").style.width=i+"px",this._lightboxEvent.broadcastLightboxEvent({id:u.ZOOM_OUT,data:null})):e.target.classList.contains("lb-zoomIn")&&(t=parseInt(this._documentRef.getElementById("outerContainer").style.height,10)*1.5,i=parseInt(this._documentRef.getElementById("outerContainer").style.width,10)*1.5,this._documentRef.getElementById("outerContainer").style.height=t+"px",this._documentRef.getElementById("outerContainer").style.width=i+"px",t=parseInt(this._documentRef.getElementById("image").style.height,10)*1.5,i=parseInt(this._documentRef.getElementById("image").style.width,10)*1.5,this._documentRef.getElementById("image").style.height=t+"px",this._documentRef.getElementById("image").style.width=i+"px",this._lightboxEvent.broadcastLightboxEvent({id:u.ZOOM_IN,data:null}))}_rotateContainer(){let e=this.rotate;e<0&&(e*=-1),e/90%4===1||e/90%4===3?(this._documentRef.getElementById("outerContainer").style.height=this._documentRef.getElementById("image").style.width,this._documentRef.getElementById("outerContainer").style.width=this._documentRef.getElementById("image").style.height,this._documentRef.getElementById("container").style.height=this._documentRef.getElementById("image").style.width,this._documentRef.getElementById("container").style.width=this._documentRef.getElementById("image").style.height):(this._documentRef.getElementById("outerContainer").style.height=this._documentRef.getElementById("image").style.height,this._documentRef.getElementById("outerContainer").style.width=this._documentRef.getElementById("image").style.width,this._documentRef.getElementById("container").style.height=this._documentRef.getElementById("image").style.width,this._documentRef.getElementById("container").style.width=this._documentRef.getElementById("image").style.height)}_resetImage(){this.rotate=0,this._documentRef.getElementById("image").style.transform=`rotate(${this.rotate}deg)`,this._documentRef.getElementById("image").style.webkitTransform=`rotate(${this.rotate}deg)`}_calcTransformPoint(){let e=parseInt(this._documentRef.getElementById("image").style.height,10),t=parseInt(this._documentRef.getElementById("image").style.width,10),i=this.rotate%360;i<0&&(i=360+i),i===90?this._documentRef.getElementById("image").style.transformOrigin=e/2+"px "+e/2+"px":i===180?this._documentRef.getElementById("image").style.transformOrigin=t/2+"px "+e/2+"px":i===270&&(this._documentRef.getElementById("image").style.transformOrigin=t/2+"px "+t/2+"px")}nextImage(){this.album.length!==1&&(this.currentImageIndex===this.album.length-1?this._changeImage(0):this._changeImage(this.currentImageIndex+1))}prevImage(){this.album.length!==1&&(this.currentImageIndex===0&&this.album.length>1?this._changeImage(this.album.length-1):this._changeImage(this.currentImageIndex-1))}_validateInputData(){if(this.album&&this.album instanceof Array&&this.album.length>0){for(let e=0;e<this.album.length;e++)if(!this.album[e].src)throw new Error("One of the album data does not have source data")}else throw new Error("No album data or album data is not correct in type");if(isNaN(this.currentImageIndex))throw new Error("Current image index is not a number");return this.currentImageIndex=Number(this.currentImageIndex),!0}_registerImageLoadingEvent(){let e=new Image;e.onload=()=>{this._onLoadImageSuccess()};let t=this.album[this.currentImageIndex].src;e.src=this._sanitizer.sanitize(D.URL,t)}_onLoadImageSuccess(){this.options.disableKeyboardNav||this._disableKeyboardNav();let e,t,i,r,a,o,s,d;t=s=this._imageElem.nativeElement.naturalWidth,e=d=this._imageElem.nativeElement.naturalHeight,this.options.fitImageInViewPort&&(o=this._windowRef.innerWidth,a=this._windowRef.innerHeight,r=o-this._cssValue.containerLeftPadding-this._cssValue.containerRightPadding-this._cssValue.imageBorderWidthLeft-this._cssValue.imageBorderWidthRight-20,i=a-this._cssValue.containerTopPadding-this._cssValue.containerTopPadding-this._cssValue.imageBorderWidthTop-this._cssValue.imageBorderWidthBottom-120,(s>r||d>i)&&(s/r>d/i?(t=r,e=Math.round(d/(s/t))):(e=i,t=Math.round(s/(d/e)))),this._rendererRef.setStyle(this._imageElem.nativeElement,"width",`${t}px`),this._rendererRef.setStyle(this._imageElem.nativeElement,"height",`${e}px`)),this._sizeContainer(t,e),this.options.centerVertically&&this._centerVertically(t,e)}_centerVertically(e,t){let i=this._documentRef.documentElement.scrollTop,a=this._windowRef.innerHeight/2-t/2,o=i+a;this._rendererRef.setStyle(this._lightboxElem.nativeElement,"top",`${o}px`)}_sizeContainer(e,t){let i=this._outerContainerElem.nativeElement.offsetWidth,r=this._outerContainerElem.nativeElement.offsetHeight,a=e+this._cssValue.containerRightPadding+this._cssValue.containerLeftPadding+this._cssValue.imageBorderWidthLeft+this._cssValue.imageBorderWidthRight,o=t+this._cssValue.containerTopPadding+this._cssValue.containerBottomPadding+this._cssValue.imageBorderWidthTop+this._cssValue.imageBorderWidthBottom;Math.abs(i-a)+Math.abs(r-o)>5?(this._rendererRef.setStyle(this._outerContainerElem.nativeElement,"width",`${a}px`),this._rendererRef.setStyle(this._outerContainerElem.nativeElement,"height",`${o}px`),this.options.enableTransition?(this._event.transitions=[],["transitionend","webkitTransitionEnd","oTransitionEnd","MSTransitionEnd"].forEach(s=>{this._event.transitions.push(this._rendererRef.listen(this._outerContainerElem.nativeElement,s,d=>{d.target===d.currentTarget&&this._postResize(a,o)}))})):this._postResize(a,o)):this._postResize(a,o)}_postResize(e,t){Array.isArray(this._event.transitions)&&(this._event.transitions.forEach(i=>{i()}),this._event.transitions=[]),this._rendererRef.setStyle(this._dataContainerElem.nativeElement,"width",`${e}px`),this._showImage()}_showImage(){this.ui.showReloader=!1,this._updateNav(),this._updateDetails(),this.options.disableKeyboardNav||this._enableKeyboardNav()}_prepareComponent(){this._addCssAnimation(),this._positionLightBox(),setTimeout(()=>{this.ui.showZoomButton=this.options.showZoom,this.ui.showRotateButton=this.options.showRotate,this.ui.showDownloadButton=this.options.showDownloadButton},0)}_positionLightBox(){let e=(this._windowRef.pageYOffset||this._documentRef.documentElement.scrollTop)+this.options.positionFromTop,t=this._windowRef.pageXOffset||this._documentRef.documentElement.scrollLeft;this.options.centerVertically||this._rendererRef.setStyle(this._lightboxElem.nativeElement,"top",`${e}px`),this._rendererRef.setStyle(this._lightboxElem.nativeElement,"left",`${t}px`),this._rendererRef.setStyle(this._lightboxElem.nativeElement,"display","block"),this.options.disableScrolling&&this._rendererRef.addClass(this._documentRef.documentElement,"lb-disable-scrolling")}_addCssAnimation(){let e=this.options.resizeDuration,t=this.options.fadeDuration;this._rendererRef.setStyle(this._lightboxElem.nativeElement,"-webkit-animation-duration",`${t}s`),this._rendererRef.setStyle(this._lightboxElem.nativeElement,"animation-duration",`${t}s`),this._rendererRef.setStyle(this._outerContainerElem.nativeElement,"-webkit-transition-duration",`${e}s`),this._rendererRef.setStyle(this._outerContainerElem.nativeElement,"transition-duration",`${e}s`),this._rendererRef.setStyle(this._dataContainerElem.nativeElement,"-webkit-animation-duration",`${t}s`),this._rendererRef.setStyle(this._dataContainerElem.nativeElement,"animation-duration",`${t}s`),this._rendererRef.setStyle(this._imageElem.nativeElement,"-webkit-animation-duration",`${t}s`),this._rendererRef.setStyle(this._imageElem.nativeElement,"animation-duration",`${t}s`),this._rendererRef.setStyle(this._captionElem.nativeElement,"-webkit-animation-duration",`${t}s`),this._rendererRef.setStyle(this._captionElem.nativeElement,"animation-duration",`${t}s`),this._rendererRef.setStyle(this._numberElem.nativeElement,"-webkit-animation-duration",`${t}s`),this._rendererRef.setStyle(this._numberElem.nativeElement,"animation-duration",`${t}s`)}_end(){this.ui.classList="lightbox animation fadeOut",this.options.disableScrolling&&this._rendererRef.removeClass(this._documentRef.documentElement,"lb-disable-scrolling"),setTimeout(()=>{this.cmpRef.destroy()},this.options.fadeDuration*1e3)}_updateDetails(){typeof this.album[this.currentImageIndex].caption<"u"&&this.album[this.currentImageIndex].caption!==""&&(this.ui.showCaption=!0),this.album.length>1&&this.options.showImageNumberLabel&&(this.ui.showPageNumber=!0,this.content.pageNumber=this._albumLabel())}_albumLabel(){return this.options.albumLabel.replace(/%1/g,Number(this.currentImageIndex+1)).replace(/%2/g,this.album.length)}_changeImage(e){this._resetImage(),this.currentImageIndex=e,this._hideImage(),this._registerImageLoadingEvent(),this._lightboxEvent.broadcastLightboxEvent({id:u.CHANGE_PAGE,data:e})}_hideImage(){this.ui.showReloader=!0,this.ui.showArrowNav=!1,this.ui.showLeftArrow=!1,this.ui.showRightArrow=!1,this.ui.showPageNumber=!1,this.ui.showCaption=!1}_updateNav(){let e=!1;try{this._documentRef.createEvent("TouchEvent"),e=!!this.options.alwaysShowNavOnTouchDevices}catch{}this._showArrowNav(),this.album.length>1&&(this.options.wrapAround?(e&&(this._rendererRef.setStyle(this._leftArrowElem.nativeElement,"opacity","1"),this._rendererRef.setStyle(this._rightArrowElem.nativeElement,"opacity","1")),this._showLeftArrowNav(),this._showRightArrowNav()):(this.currentImageIndex>0&&(this._showLeftArrowNav(),e&&this._rendererRef.setStyle(this._leftArrowElem.nativeElement,"opacity","1")),this.currentImageIndex<this.album.length-1&&(this._showRightArrowNav(),e&&this._rendererRef.setStyle(this._rightArrowElem.nativeElement,"opacity","1"))))}_showLeftArrowNav(){this.ui.showLeftArrow=!0}_showRightArrowNav(){this.ui.showRightArrow=!0}_showArrowNav(){this.ui.showArrowNav=this.album.length!==1}_enableKeyboardNav(){this._event.keyup=this._rendererRef.listen("document","keyup",e=>{this._keyboardAction(e)})}_disableKeyboardNav(){this._event.keyup&&this._event.keyup()}_keyboardAction(e){let a=e.keyCode,o=String.fromCharCode(a).toLowerCase();a===27||o.match(/x|o|c/)?this._lightboxEvent.broadcastLightboxEvent({id:u.CLOSE,data:null}):o==="p"||a===37?this.currentImageIndex!==0?this._changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this._changeImage(this.album.length-1):(o==="n"||a===39)&&(this.currentImageIndex!==this.album.length-1?this._changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this._changeImage(0))}_getCssStyleValue(e,t){return parseFloat(this._windowRef.getComputedStyle(e.nativeElement,null).getPropertyValue(t))}_onReceivedEvent(e){switch(e.id){case u.CLOSE:this._end();break;default:break}}}return n.\u0275fac=function(e){return new(e||n)(m(O),m(N),m(I),m(O),m(te),m(ve),m(ue),m(S))},n.\u0275cmp=B({type:n,selectors:[["","lb-content",""]],viewQuery:function(e,t){if(e&1&&(b(Le,5),b(Se,5),b(Oe,5),b(Be,5),b(Te,5),b(ke,5),b(Ae,5),b(De,5),b(Me,5)),e&2){let i;y(i=E())&&(t._outerContainerElem=i.first),y(i=E())&&(t._containerElem=i.first),y(i=E())&&(t._leftArrowElem=i.first),y(i=E())&&(t._rightArrowElem=i.first),y(i=E())&&(t._navArrowElem=i.first),y(i=E())&&(t._dataContainerElem=i.first),y(i=E())&&(t._imageElem=i.first),y(i=E())&&(t._captionElem=i.first),y(i=E())&&(t._numberElem=i.first)}},hostVars:2,hostBindings:function(e,t){e&1&&g("click",function(r){return t.close(r)}),e&2&&V(t.ui.classList)},inputs:{album:"album",currentImageIndex:"currentImageIndex",options:"options",cmpRef:"cmpRef"},attrs:Ne,decls:34,vars:14,consts:[["id","outerContainer",1,"lb-outerContainer","transition"],["outerContainer",""],["id","container",1,"lb-container"],["container",""],["id","image",1,"lb-image","animation","fadeIn",3,"src","hidden"],["image",""],[1,"lb-nav",3,"hidden"],["navArrow",""],[1,"lb-prev",3,"hidden","click"],["leftArrow",""],[1,"lb-next",3,"hidden","click"],["rightArrow",""],[1,"lb-loader",3,"hidden","click"],[1,"lb-cancel"],[1,"lb-dataContainer",3,"hidden"],["dataContainer",""],[1,"lb-data"],[1,"lb-details"],[1,"lb-caption","animation","fadeIn",3,"hidden","innerHtml"],["caption",""],[1,"lb-number","animation","fadeIn",3,"hidden"],["number",""],[1,"lb-controlContainer"],[1,"lb-closeContainer"],[1,"lb-close",3,"click"],[1,"lb-downloadContainer",3,"hidden"],[1,"lb-download",3,"click"],[1,"lb-turnContainer",3,"hidden"],[1,"lb-turnLeft",3,"click"],[1,"lb-turnRight",3,"click"],[1,"lb-zoomContainer",3,"hidden"],[1,"lb-zoomOut",3,"click"],[1,"lb-zoomIn",3,"click"]],template:function(e,t){e&1&&(p(0,"div",0,1)(2,"div",2,3),j(4,"img",4,5),p(6,"div",6,7)(8,"a",8,9),g("click",function(){return t.prevImage()}),v(),p(10,"a",10,11),g("click",function(){return t.nextImage()}),v()(),p(12,"div",12),g("click",function(r){return t.close(r)}),j(13,"a",13),v()()(),p(14,"div",14,15)(16,"div",16)(17,"div",17),j(18,"span",18,19),p(20,"span",20,21),T(22),v()(),p(23,"div",22)(24,"div",23)(25,"a",24),g("click",function(r){return t.close(r)}),v()(),p(26,"div",25)(27,"a",26),g("click",function(r){return t.download(r)}),v()(),p(28,"div",27)(29,"a",28),g("click",function(r){return t.control(r)}),v(),p(30,"a",29),g("click",function(r){return t.control(r)}),v()(),p(31,"div",30)(32,"a",31),g("click",function(r){return t.control(r)}),v(),p(33,"a",32),g("click",function(r){return t.control(r)}),v()()()()()),e&2&&(c(4),_("src",t.album[t.currentImageIndex].src,M)("hidden",t.ui.showReloader),c(2),_("hidden",!t.ui.showArrowNav),c(2),_("hidden",!t.ui.showLeftArrow),c(2),_("hidden",!t.ui.showRightArrow),c(2),_("hidden",!t.ui.showReloader),c(2),_("hidden",t.ui.showReloader),c(4),_("hidden",!t.ui.showCaption)("innerHtml",t.album[t.currentImageIndex].caption,ae),c(2),_("hidden",!t.ui.showPageNumber),c(2),ce(t.content.pageNumber),c(4),_("hidden",!t.ui.showDownloadButton),c(2),_("hidden",!t.ui.showRotateButton),c(3),_("hidden",!t.ui.showZoomButton))},encapsulation:2}),n})();var H=(()=>{class n{constructor(){this.fadeDuration=.7,this.resizeDuration=.5,this.fitImageInViewPort=!0,this.positionFromTop=20,this.showImageNumberLabel=!1,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1,this.disableKeyboardNav=!1,this.disableScrolling=!1,this.centerVertically=!1,this.enableTransition=!0,this.albumLabel="Image %1 of %2",this.showZoom=!1,this.showRotate=!1,this.containerElementResolver=e=>e.querySelector("body")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac}),n})();var Ve=["lb-overlay",""],ye=(()=>{class n{constructor(e,t,i,r){this._elemRef=e,this._rendererRef=t,this._lightboxEvent=i,this._documentRef=r,this.classList="lightboxOverlay animation fadeInOverlay",this._subscription=this._lightboxEvent.lightboxEvent$.subscribe(a=>this._onReceivedEvent(a))}close(){this._lightboxEvent.broadcastLightboxEvent({id:u.CLOSE,data:null})}ngAfterViewInit(){let e=this.options.fadeDuration;this._rendererRef.setStyle(this._elemRef.nativeElement,"-webkit-animation-duration",`${e}s`),this._rendererRef.setStyle(this._elemRef.nativeElement,"animation-duration",`${e}s`),this._sizeOverlay()}onResize(){this._sizeOverlay()}ngOnDestroy(){this._subscription.unsubscribe()}_sizeOverlay(){let e=this._getOverlayWidth(),t=this._getOverlayHeight();this._rendererRef.setStyle(this._elemRef.nativeElement,"width",`${e}px`),this._rendererRef.setStyle(this._elemRef.nativeElement,"height",`${t}px`)}_onReceivedEvent(e){switch(e.id){case u.CLOSE:this._end();break;default:break}}_end(){this.classList="lightboxOverlay animation fadeOutOverlay",setTimeout(()=>{this.cmpRef.destroy()},this.options.fadeDuration*1e3)}_getOverlayWidth(){return Math.max(this._documentRef.body.scrollWidth,this._documentRef.body.offsetWidth,this._documentRef.documentElement.clientWidth,this._documentRef.documentElement.scrollWidth,this._documentRef.documentElement.offsetWidth)}_getOverlayHeight(){return Math.max(this._documentRef.body.scrollHeight,this._documentRef.body.offsetHeight,this._documentRef.documentElement.clientHeight,this._documentRef.documentElement.scrollHeight,this._documentRef.documentElement.offsetHeight)}}return n.\u0275fac=function(e){return new(e||n)(m(O),m(N),m(I),m(S))},n.\u0275cmp=B({type:n,selectors:[["","lb-overlay",""]],hostVars:2,hostBindings:function(e,t){e&1&&g("click",function(){return t.close()})("resize",function(){return t.onResize()},!1,le),e&2&&V(t.classList)},inputs:{options:"options",cmpRef:"cmpRef"},attrs:Ve,decls:0,vars:0,template:function(e,t){},encapsulation:2}),n})();var F=(()=>{class n{constructor(e,t,i,r,a,o){this._componentFactoryResolver=e,this._injector=t,this._applicationRef=i,this._lightboxConfig=r,this._lightboxEvent=a,this._documentRef=o}open(e,t=0,i={}){let r=this._createComponent(ye),a=this._createComponent(be),o={};this._lightboxEvent.broadcastLightboxEvent({id:u.OPEN}),Object.assign(o,this._lightboxConfig,i),a.instance.album=e,a.instance.currentImageIndex=t,a.instance.options=o,a.instance.cmpRef=a,r.instance.options=o,r.instance.cmpRef=r,setTimeout(()=>{this._applicationRef.attachView(r.hostView),this._applicationRef.attachView(a.hostView),r.onDestroy(()=>{this._applicationRef.detachView(r.hostView)}),a.onDestroy(()=>{this._applicationRef.detachView(a.hostView)});let s=o.containerElementResolver(this._documentRef);s.appendChild(r.location.nativeElement),s.appendChild(a.location.nativeElement)})}close(){this._lightboxEvent&&this._lightboxEvent.broadcastLightboxEvent({id:u.CLOSE})}_createComponent(e){return this._componentFactoryResolver.resolveComponentFactory(e).create(this._injector)}}return n.\u0275fac=function(e){return new(e||n)(C(he),C(se),C(de),C(H),C(I),C(S))},n.\u0275prov=w({token:n,factory:n.\u0275fac}),n})();function Fe(n,l){if(n&1){let e=Z();R(0,"div",10)(1,"img",11),Y("click",function(){z(e);let i=L().$index,r=L();return P(r.open(i,r.albumsOne))}),x()()}if(n&2){let e=L().$implicit;c(),X("src",e.src,M)}}function We(n,l){if(n&1&&U(0,Fe,2,1,"div",10),n&2){let e=l.$index;Q(e<2?0:-1)}}function $e(n,l){if(n&1){let e=Z();R(0,"div",10)(1,"img",11),Y("click",function(){z(e);let i=L().$index,r=L();return P(r.open(i,r.albumsTwo))}),x()()}if(n&2){let e=L().$implicit;c(),X("src",e.src,M)}}function ze(n,l){if(n&1&&U(0,$e,2,1,"div",10),n&2){let e=l.$index;Q(e>2?0:-1)}}var Ee=class n{constructor(l){this._lightbox=l;for(let e=1;e<=5;e++){let t="assets/img/img-0"+e+".jpg",i="Image "+e+" caption here";this.albumsOne.push({src:t}),this.albumsTwo.push({src:t,caption:i})}}routes=fe;albumsOne=[];albumsTwo=[];open(l,e){this._lightbox.open(e,l)}close(){this._lightbox.close()}static \u0275fac=function(e){return new(e||n)(m(F))};static \u0275cmp=B({type:n,selectors:[["app-ui-lightbox"]],decls:25,vars:0,consts:[[1,"cardhead"],[1,"page-header"],[1,"row"],[1,"col-sm-12"],[1,"page-title"],[1,"col-md-12"],[1,"card"],[1,"card-header"],[1,"card-title"],[1,"card-body"],[1,"col-md-4","mb-2","mb-md-0"],[1,"img-fluid",3,"click","src"]],template:function(e,t){e&1&&(R(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3",4),T(5,"Light Box"),x()()()(),R(6,"div",2)(7,"div",5)(8,"div",6)(9,"div",7)(10,"h5",8),T(11,"Single Image Lightbox"),x()(),R(12,"div",9)(13,"div",2),K(14,We,1,1,null,null,q),x()()()(),R(16,"div",5)(17,"div",6)(18,"div",7)(19,"h5",8),T(20,"Image with Description"),x()(),R(21,"div",9)(22,"div",2),K(23,ze,1,1,null,null,q),x()()()()()()),e&2&&(c(14),G(t.albumsOne),c(9),G(t.albumsTwo))},dependencies:[me,ge],encapsulation:2})};export{Ee as UiLightboxComponent};