{"version":3,"sources":["node_modules/ngx-slick-carousel/fesm2022/ngx-slick-carousel.mjs","src/app/shared/widgets/carousel-message-tile/carousel-message-tile.component.ts","src/app/shared/widgets/carousel-message-tile/carousel-message-tile.component.html","src/app/shared/widgets/news-carousel/news-carousel.component.ts","src/app/shared/widgets/news-carousel/news-carousel.component.html"],"sourcesContent":["import { isPlatformServer, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { EventEmitter, ElementRef, inject, NgZone, PLATFORM_ID, forwardRef, Component, Input, Output, Renderer2, Directive, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * Slick component\n */\nconst _c0 = [\"*\"];\nlet SlickCarouselComponent = /*#__PURE__*/(() => {\n class SlickCarouselComponent {\n config;\n afterChange = new EventEmitter();\n beforeChange = new EventEmitter();\n breakpoint = new EventEmitter();\n destroy = new EventEmitter();\n init = new EventEmitter();\n $instance;\n // access from parent component can be a problem with change detection timing. Please use afterChange output\n currentIndex = 0;\n slides = [];\n initialized = false;\n _removedSlides = [];\n _addedSlides = [];\n el = inject(ElementRef);\n zone = inject(NgZone);\n isServer = isPlatformServer(inject(PLATFORM_ID));\n /**\n * On component destroy\n */\n ngOnDestroy() {\n this.unslick();\n }\n ngAfterViewInit() {\n this.ngAfterViewChecked();\n }\n /**\n * On component view checked\n */\n ngAfterViewChecked() {\n if (this.isServer) {\n return;\n }\n if (this._addedSlides.length > 0 || this._removedSlides.length > 0) {\n const nextSlidesLength = this.slides.length - this._removedSlides.length + this._addedSlides.length;\n if (!this.initialized) {\n if (nextSlidesLength > 0) {\n this.initSlick();\n }\n // if nextSlidesLength is zere, do nothing\n } else if (nextSlidesLength === 0) {\n // unslick case\n this.unslick();\n } else {\n this._addedSlides.forEach(slickItem => {\n this.slides.push(slickItem);\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickAdd', slickItem.el.nativeElement);\n });\n });\n this._addedSlides = [];\n this._removedSlides.forEach(slickItem => {\n const idx = this.slides.indexOf(slickItem);\n this.slides = this.slides.filter(s => s !== slickItem);\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickRemove', idx);\n });\n });\n this._removedSlides = [];\n }\n }\n }\n /**\n * init slick\n */\n initSlick() {\n this.slides = this._addedSlides;\n this._addedSlides = [];\n this._removedSlides = [];\n this.zone.runOutsideAngular(() => {\n this.$instance = jQuery(this.el.nativeElement);\n this.$instance.on('init', (event, slick) => {\n this.zone.run(() => {\n this.init.emit({\n event,\n slick\n });\n });\n });\n this.$instance.slick(this.config);\n this.zone.run(() => {\n this.initialized = true;\n this.currentIndex = this.config?.initialSlide || 0;\n });\n this.$instance.on('afterChange', (event, slick, currentSlide) => {\n this.zone.run(() => {\n this.afterChange.emit({\n event,\n slick,\n currentSlide,\n first: currentSlide === 0,\n last: slick.$slides.length === currentSlide + slick.options.slidesToScroll\n });\n this.currentIndex = currentSlide;\n });\n });\n this.$instance.on('beforeChange', (event, slick, currentSlide, nextSlide) => {\n this.zone.run(() => {\n this.beforeChange.emit({\n event,\n slick,\n currentSlide,\n nextSlide\n });\n this.currentIndex = nextSlide;\n });\n });\n this.$instance.on('breakpoint', (event, slick, breakpoint) => {\n this.zone.run(() => {\n this.breakpoint.emit({\n event,\n slick,\n breakpoint\n });\n });\n });\n this.$instance.on('destroy', (event, slick) => {\n this.zone.run(() => {\n this.destroy.emit({\n event,\n slick\n });\n this.initialized = false;\n });\n });\n });\n }\n addSlide(slickItem) {\n this._addedSlides.push(slickItem);\n }\n removeSlide(slickItem) {\n this._removedSlides.push(slickItem);\n }\n /**\n * Slick Method\n */\n slickGoTo(index) {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickGoTo', index);\n });\n }\n slickNext() {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickNext');\n });\n }\n slickPrev() {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickPrev');\n });\n }\n slickPause() {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickPause');\n });\n }\n slickPlay() {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickPlay');\n });\n }\n unslick() {\n if (this.$instance) {\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('unslick');\n });\n this.$instance = undefined;\n }\n this.initialized = false;\n }\n ngOnChanges(changes) {\n if (this.initialized) {\n const config = changes['config'];\n if (config.previousValue !== config.currentValue && config.currentValue !== undefined) {\n const refresh = config.currentValue['refresh'];\n const newOptions = Object.assign({}, config.currentValue);\n delete newOptions['refresh'];\n this.zone.runOutsideAngular(() => {\n this.$instance.slick('slickSetOption', newOptions, refresh);\n });\n }\n }\n }\n /** @nocollapse */\n static ɵfac = function SlickCarouselComponent_Factory(t) {\n return new (t || SlickCarouselComponent)();\n };\n /** @nocollapse */\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SlickCarouselComponent,\n selectors: [[\"ngx-slick-carousel\"]],\n inputs: {\n config: \"config\"\n },\n outputs: {\n afterChange: \"afterChange\",\n beforeChange: \"beforeChange\",\n breakpoint: \"breakpoint\",\n destroy: \"destroy\",\n init: \"init\"\n },\n exportAs: [\"slick-carousel\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SlickCarouselComponent),\n multi: true\n }]), i0.ɵɵNgOnChangesFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function SlickCarouselComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2\n });\n }\n return SlickCarouselComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SlickItemDirective = /*#__PURE__*/(() => {\n class SlickItemDirective {\n carousel = inject(SlickCarouselComponent, {\n host: true\n });\n renderer = inject(Renderer2);\n el = inject(ElementRef);\n isServer = isPlatformServer(inject(PLATFORM_ID));\n ngOnInit() {\n this.carousel.addSlide(this);\n if (this.isServer && this.carousel.slides.length > 0) {\n // Do not show other slides in server side rendering (broken ui can be affacted to Core Web Vitals)\n this.renderer.setStyle(this.el, 'display', 'none');\n }\n }\n ngOnDestroy() {\n this.carousel.removeSlide(this);\n }\n /** @nocollapse */\n static ɵfac = function SlickItemDirective_Factory(t) {\n return new (t || SlickItemDirective)();\n };\n /** @nocollapse */\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: SlickItemDirective,\n selectors: [[\"\", \"ngxSlickItem\", \"\"]]\n });\n }\n return SlickItemDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SlickCarouselModule = /*#__PURE__*/(() => {\n class SlickCarouselModule {\n /** @nocollapse */static ɵfac = function SlickCarouselModule_Factory(t) {\n return new (t || SlickCarouselModule)();\n };\n /** @nocollapse */\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SlickCarouselModule\n });\n /** @nocollapse */\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n return SlickCarouselModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SlickCarouselComponent, SlickCarouselModule, SlickItemDirective };\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { MatDivider } from '@angular/material/divider';\nimport { NewsModel } from '../../../models/interfaces/news-model';\nimport { NgClass } from '@angular/common';\n\n@Component({\n selector: 'my-gwo-carousel-message-tile',\n standalone: true,\n imports: [MatDivider, NgClass],\n templateUrl: './carousel-message-tile.component.html',\n styleUrl: './carousel-message-tile.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CarouselMessageTileComponent {\n @Input() message!: NewsModel;\n\n @Input() mobile: boolean = false;\n\n}\n","