1import { 2 animate, 3 state, 4 style, 5 transition, 6 trigger 7} from "./chunk-AKEJTI6X.js"; 8import { 9 ChangeDetectionStrategy, 10 ChangeDetectorRef, 11 CommonModule, 12 Component, 13 DomSanitizer, 14 ElementRef, 15 EventEmitter, 16 HAMMER_GESTURE_CONFIG, 17 HammerGestureConfig, 18 HostBinding, 19 HostListener, 20 Injectable, 21 Input, 22 NgClass, 23 NgForOf, 24 NgIf, 25 NgModule, 26 Output, 27 Renderer2, 28 ViewChild, 29 ViewEncapsulation, 30 setClassMetadata, 31 ɵɵNgOnChangesFeature, 32 ɵɵProvidersFeature, 33 ɵɵadvance, 34 ɵɵattribute, 35 ɵɵclassMap, 36 ɵɵclassProp, 37 ɵɵdefineComponent, 38 ɵɵdefineInjectable, 39 ɵɵdefineInjector, 40 ɵɵdefineNgModule, 41 ɵɵdirectiveInject, 42 ɵɵelement, 43 ɵɵelementContainerEnd, 44 ɵɵelementContainerStart, 45 ɵɵelementEnd, 46 ɵɵelementStart, 47 ɵɵgetCurrentView, 48 ɵɵgetInheritedFactory, 49 ɵɵinject, 50 ɵɵinterpolate, 51 ɵɵinterpolate1, 52 ɵɵinterpolate2, 53 ɵɵlistener, 54 ɵɵloadQuery, 55 ɵɵnextContext, 56 ɵɵproperty, 57 ɵɵpureFunction0, 58 ɵɵpureFunction1, 59 ɵɵpureFunction2, 60 ɵɵqueryRefresh, 61 ɵɵresetView, 62 ɵɵresolveWindow, 63 ɵɵrestoreView, 64 ɵɵsanitizeHtml, 65 ɵɵsanitizeUrl, 66 ɵɵstyleProp, 67 ɵɵtemplate, 68 ɵɵtext, 69 ɵɵtextInterpolate1, 70 ɵɵviewQuery 71} from "./chunk-FZAX2C6X.js"; 72 73// node_modules/@kolkov/ngx-gallery/fesm2020/kolkov-ngx-gallery.mjs 74var _c0 = (a0) => ({ 75 "ngx-gallery-active": a0 76}); 77function NgxGalleryBulletsComponent_div_0_Template(rf, ctx) { 78 if (rf & 1) { 79 const _r1 = \u0275\u0275getCurrentView(); 80 \u0275\u0275elementStart(0, "div", 1); 81 \u0275\u0275listener("click", function NgxGalleryBulletsComponent_div_0_Template_div_click_0_listener($event) { 82 const i_r2 = \u0275\u0275restoreView(_r1).index; 83 const ctx_r2 = \u0275\u0275nextContext(); 84 return \u0275\u0275resetView(ctx_r2.handleChange($event, i_r2)); 85 }); 86 \u0275\u0275elementEnd(); 87 } 88 if (rf & 2) { 89 const i_r2 = ctx.index; 90 const ctx_r2 = \u0275\u0275nextContext(); 91 \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(1, _c0, i_r2 === ctx_r2.active)); 92 } 93} 94var _c1 = ["previewImage"]; 95function NgxGalleryPreviewComponent_ngx_gallery_arrows_0_Template(rf, ctx) { 96 if (rf & 1) { 97 const _r1 = \u0275\u0275getCurrentView(); 98 \u0275\u0275elementStart(0, "ngx-gallery-arrows", 17); 99 \u0275\u0275listener("prevClick", function NgxGalleryPreviewComponent_ngx_gallery_arrows_0_Template_ngx_gallery_arrows_prevClick_0_listener() { 100 \u0275\u0275restoreView(_r1); 101 const ctx_r1 = \u0275\u0275nextContext(); 102 return \u0275\u0275resetView(ctx_r1.showPrev()); 103 })("nextClick", function NgxGalleryPreviewComponent_ngx_gallery_arrows_0_Template_ngx_gallery_arrows_nextClick_0_listener() { 104 \u0275\u0275restoreView(_r1); 105 const ctx_r1 = \u0275\u0275nextContext(); 106 return \u0275\u0275resetView(ctx_r1.showNext()); 107 }); 108 \u0275\u0275elementEnd(); 109 } 110 if (rf & 2) { 111 const ctx_r1 = \u0275\u0275nextContext(); 112 \u0275\u0275property("prevDisabled", !ctx_r1.canShowPrev())("nextDisabled", !ctx_r1.canShowNext())("arrowPrevIcon", ctx_r1.arrowPrevIcon)("arrowNextIcon", ctx_r1.arrowNextIcon); 113 } 114} 115function NgxGalleryPreviewComponent_ngx_gallery_action_3_Template(rf, ctx) { 116 if (rf & 1) { 117 const _r3 = \u0275\u0275getCurrentView(); 118 \u0275\u0275elementStart(0, "ngx-gallery-action", 18); 119 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_3_Template_ngx_gallery_action_closeClick_0_listener($event) { 120 const action_r4 = \u0275\u0275restoreView(_r3).$implicit; 121 const ctx_r1 = \u0275\u0275nextContext(); 122 return \u0275\u0275resetView(action_r4.onClick($event, ctx_r1.index)); 123 }); 124 \u0275\u0275elementEnd(); 125 } 126 if (rf & 2) { 127 const action_r4 = ctx.$implicit; 128 \u0275\u0275property("icon", action_r4.icon)("disabled", action_r4.disabled)("titleText", action_r4.titleText); 129 } 130} 131function NgxGalleryPreviewComponent_a_4_Template(rf, ctx) { 132 if (rf & 1) { 133 \u0275\u0275elementStart(0, "a", 19); 134 \u0275\u0275element(1, "i"); 135 \u0275\u0275elementEnd(); 136 } 137 if (rf & 2) { 138 const ctx_r1 = \u0275\u0275nextContext(); 139 \u0275\u0275property("href", ctx_r1.src, \u0275\u0275sanitizeUrl); 140 \u0275\u0275advance(); 141 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-icon-content ", ctx_r1.downloadIcon)); 142 } 143} 144function NgxGalleryPreviewComponent_ngx_gallery_action_5_Template(rf, ctx) { 145 if (rf & 1) { 146 const _r5 = \u0275\u0275getCurrentView(); 147 \u0275\u0275elementStart(0, "ngx-gallery-action", 20); 148 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_5_Template_ngx_gallery_action_closeClick_0_listener() { 149 \u0275\u0275restoreView(_r5); 150 const ctx_r1 = \u0275\u0275nextContext();
151 return \u0275\u0275resetView(ctx_r1.zoomOut()); 152 }); 153 \u0275\u0275elementEnd(); 154 } 155 if (rf & 2) { 156 const ctx_r1 = \u0275\u0275nextContext(); 157 \u0275\u0275property("icon", ctx_r1.zoomOutIcon)("disabled", !ctx_r1.canZoomOut()); 158 } 159} 160function NgxGalleryPreviewComponent_ngx_gallery_action_6_Template(rf, ctx) { 161 if (rf & 1) { 162 const _r6 = \u0275\u0275getCurrentView(); 163 \u0275\u0275elementStart(0, "ngx-gallery-action", 20); 164 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_6_Template_ngx_gallery_action_closeClick_0_listener() { 165 \u0275\u0275restoreView(_r6); 166 const ctx_r1 = \u0275\u0275nextContext(); 167 return \u0275\u0275resetView(ctx_r1.zoomIn()); 168 }); 169 \u0275\u0275elementEnd(); 170 } 171 if (rf & 2) { 172 const ctx_r1 = \u0275\u0275nextContext(); 173 \u0275\u0275property("icon", ctx_r1.zoomInIcon)("disabled", !ctx_r1.canZoomIn()); 174 } 175} 176function NgxGalleryPreviewComponent_ngx_gallery_action_7_Template(rf, ctx) { 177 if (rf & 1) { 178 const _r7 = \u0275\u0275getCurrentView(); 179 \u0275\u0275elementStart(0, "ngx-gallery-action", 8); 180 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_7_Template_ngx_gallery_action_closeClick_0_listener() { 181 \u0275\u0275restoreView(_r7); 182 const ctx_r1 = \u0275\u0275nextContext(); 183 return \u0275\u0275resetView(ctx_r1.rotateLeft()); 184 }); 185 \u0275\u0275elementEnd(); 186 } 187 if (rf & 2) { 188 const ctx_r1 = \u0275\u0275nextContext(); 189 \u0275\u0275property("icon", ctx_r1.rotateLeftIcon); 190 } 191} 192function NgxGalleryPreviewComponent_ngx_gallery_action_8_Template(rf, ctx) { 193 if (rf & 1) { 194 const _r8 = \u0275\u0275getCurrentView(); 195 \u0275\u0275elementStart(0, "ngx-gallery-action", 8); 196 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_8_Template_ngx_gallery_action_closeClick_0_listener() { 197 \u0275\u0275restoreView(_r8); 198 const ctx_r1 = \u0275\u0275nextContext(); 199 return \u0275\u0275resetView(ctx_r1.rotateRight()); 200 }); 201 \u0275\u0275elementEnd(); 202 } 203 if (rf & 2) { 204 const ctx_r1 = \u0275\u0275nextContext(); 205 \u0275\u0275property("icon", ctx_r1.rotateRightIcon); 206 } 207} 208function NgxGalleryPreviewComponent_ngx_gallery_action_9_Template(rf, ctx) { 209 if (rf & 1) { 210 const _r9 = \u0275\u0275getCurrentView(); 211 \u0275\u0275elementStart(0, "ngx-gallery-action", 8); 212 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_ngx_gallery_action_9_Template_ngx_gallery_action_closeClick_0_listener() { 213 \u0275\u0275restoreView(_r9); 214 const ctx_r1 = \u0275\u0275nextContext(); 215 return \u0275\u0275resetView(ctx_r1.manageFullscreen()); 216 }); 217 \u0275\u0275elementEnd(); 218 } 219 if (rf & 2) { 220 const ctx_r1 = \u0275\u0275nextContext(); 221 \u0275\u0275property("icon", "ngx-gallery-fullscreen " + ctx_r1.fullscreenIcon); 222 } 223} 224function NgxGalleryPreviewComponent_img_15_Template(rf, ctx) { 225 if (rf & 1) { 226 const _r10 = \u0275\u0275getCurrentView(); 227 \u0275\u0275elementStart(0, "img", 21, 0); 228 \u0275\u0275listener("click", function NgxGalleryPreviewComponent_img_15_Template_img_click_0_listener($event) { 229 return $event.stopPropagation(); 230 })("mouseenter", function NgxGalleryPreviewComponent_img_15_Template_img_mouseenter_0_listener() { 231 \u0275\u0275restoreView(_r10); 232 const ctx_r1 = \u0275\u0275nextContext(); 233 return \u0275\u0275resetView(ctx_r1.imageMouseEnter()); 234 })("mouseleave", function NgxGalleryPreviewComponent_img_15_Template_img_mouseleave_0_listener() { 235 \u0275\u0275restoreView(_r10); 236 const ctx_r1 = \u0275\u0275nextContext(); 237 return \u0275\u0275resetView(ctx_r1.imageMouseLeave()); 238 })("mousedown", function NgxGalleryPreviewComponent_img_15_Template_img_mousedown_0_listener($event) { 239 \u0275\u0275restoreView(_r10); 240 const ctx_r1 = \u0275\u0275nextContext(); 241 return \u0275\u0275resetView(ctx_r1.mouseDownHandler($event)); 242 })("touchstart", function NgxGalleryPreviewComponent_img_15_Template_img_touchstart_0_listener($event) { 243 \u0275\u0275restoreView(_r10); 244 const ctx_r1 = \u0275\u0275nextContext();
245 return \u0275\u0275resetView(ctx_r1.mouseDownHandler($event)); 246 }); 247 \u0275\u0275elementEnd(); 248 } 249 if (rf & 2) { 250 const ctx_r1 = \u0275\u0275nextContext(); 251 \u0275\u0275styleProp("transform", ctx_r1.getTransform())("left", ctx_r1.positionLeft + "px")("top", ctx_r1.positionTop + "px"); 252 \u0275\u0275classProp("ngx-gallery-active", !ctx_r1.loading)("animation", ctx_r1.animation)("ngx-gallery-grab", ctx_r1.canDragOnZoom()); 253 \u0275\u0275property("src", ctx_r1.src, \u0275\u0275sanitizeUrl); 254 } 255} 256function NgxGalleryPreviewComponent_video_16_Template(rf, ctx) { 257 if (rf & 1) { 258 const _r11 = \u0275\u0275getCurrentView(); 259 \u0275\u0275elementStart(0, "video", 22, 0); 260 \u0275\u0275listener("click", function NgxGalleryPreviewComponent_video_16_Template_video_click_0_listener($event) { 261 return $event.stopPropagation(); 262 })("mouseenter", function NgxGalleryPreviewComponent_video_16_Template_video_mouseenter_0_listener() { 263 \u0275\u0275restoreView(_r11); 264 const ctx_r1 = \u0275\u0275nextContext(); 265 return \u0275\u0275resetView(ctx_r1.imageMouseEnter()); 266 })("mouseleave", function NgxGalleryPreviewComponent_video_16_Template_video_mouseleave_0_listener() { 267 \u0275\u0275restoreView(_r11); 268 const ctx_r1 = \u0275\u0275nextContext(); 269 return \u0275\u0275resetView(ctx_r1.imageMouseLeave()); 270 })("mousedown", function NgxGalleryPreviewComponent_video_16_Template_video_mousedown_0_listener($event) { 271 \u0275\u0275restoreView(_r11); 272 const ctx_r1 = \u0275\u0275nextContext(); 273 return \u0275\u0275resetView(ctx_r1.mouseDownHandler($event)); 274 })("touchstart", function NgxGalleryPreviewComponent_video_16_Template_video_touchstart_0_listener($event) { 275 \u0275\u0275restoreView(_r11); 276 const ctx_r1 = \u0275\u0275nextContext(); 277 return \u0275\u0275resetView(ctx_r1.mouseDownHandler($event)); 278 }); 279 \u0275\u0275element(2, "source", 23); 280 \u0275\u0275text(3, " Your browser does not support the video tag. "); 281 \u0275\u0275elementEnd(); 282 } 283 if (rf & 2) { 284 const ctx_r1 = \u0275\u0275nextContext(); 285 \u0275\u0275styleProp("transform", ctx_r1.getTransform())("left", ctx_r1.positionLeft + "px")("top", ctx_r1.positionTop + "px"); 286 \u0275\u0275classProp("ngx-gallery-active", !ctx_r1.loading)("animation", ctx_r1.animation)("ngx-gallery-grab", ctx_r1.canDragOnZoom()); 287 \u0275\u0275advance(2); 288 \u0275\u0275property("src", ctx_r1.src); 289 } 290} 291function NgxGalleryPreviewComponent_ngx_gallery_bullets_17_Template(rf, ctx) { 292 if (rf & 1) { 293 const _r12 = \u0275\u0275getCurrentView(); 294 \u0275\u0275elementStart(0, "ngx-gallery-bullets", 24); 295 \u0275\u0275listener("bulletChange", function NgxGalleryPreviewComponent_ngx_gallery_bullets_17_Template_ngx_gallery_bullets_bulletChange_0_listener($event) { 296 \u0275\u0275restoreView(_r12); 297 const ctx_r1 = \u0275\u0275nextContext(); 298 return \u0275\u0275resetView(ctx_r1.showAtIndex($event)); 299 }); 300 \u0275\u0275elementEnd(); 301 } 302 if (rf & 2) { 303 const ctx_r1 = \u0275\u0275nextContext(); 304 \u0275\u0275property("count", ctx_r1.images.length)("active", ctx_r1.index); 305 } 306} 307function NgxGalleryPreviewComponent_div_18_Template(rf, ctx) { 308 if (rf & 1) { 309 \u0275\u0275elementStart(0, "div", 25); 310 \u0275\u0275listener("click", function NgxGalleryPreviewComponent_div_18_Template_div_click_0_listener($event) { 311 return $event.stopPropagation(); 312 }); 313 \u0275\u0275elementEnd(); 314 } 315 if (rf & 2) { 316 const ctx_r1 = \u0275\u0275nextContext(); 317 \u0275\u0275property("innerHTML", ctx_r1.description, \u0275\u0275sanitizeHtml); 318 } 319} 320var _c2 = (a0) => ({ 321 "ngx-gallery-clickable": a0 322}); 323function NgxGalleryImageComponent_ng_container_1_div_1_ngx_gallery_action_2_Template(rf, ctx) { 324 if (rf & 1) { 325 const _r4 = \u0275\u0275getCurrentView(); 326 \u0275\u0275elementStart(0, "ngx-gallery-action", 8); 327 \u0275\u0275listener("closeClick", function NgxGalleryImageComponent_ng_container_1_div_1_ngx_gallery_action_2_Template_ngx_gallery_action_closeClick_0_listener($event) { 328 const action_r5 = \u0275\u0275restoreView(_r4).$implicit; 329 const image_r2 = \u0275\u0275nextContext(2).$implicit;
330 return \u0275\u0275resetView(action_r5.onClick($event, image_r2.index)); 331 }); 332 \u0275\u0275elementEnd(); 333 } 334 if (rf & 2) { 335 const action_r5 = ctx.$implicit; 336 \u0275\u0275property("icon", action_r5.icon)("disabled", action_r5.disabled)("titleText", action_r5.titleText); 337 } 338} 339function NgxGalleryImageComponent_ng_container_1_div_1_div_3_Template(rf, ctx) { 340 if (rf & 1) { 341 \u0275\u0275elementStart(0, "div", 9); 342 \u0275\u0275listener("click", function NgxGalleryImageComponent_ng_container_1_div_1_div_3_Template_div_click_0_listener($event) { 343 return $event.stopPropagation(); 344 }); 345 \u0275\u0275elementEnd(); 346 } 347 if (rf & 2) { 348 const image_r2 = \u0275\u0275nextContext(2).$implicit; 349 const ctx_r2 = \u0275\u0275nextContext(); 350 \u0275\u0275property("innerHTML", ctx_r2.descriptions[image_r2.index], \u0275\u0275sanitizeHtml); 351 } 352} 353function NgxGalleryImageComponent_ng_container_1_div_1_Template(rf, ctx) { 354 if (rf & 1) { 355 const _r1 = \u0275\u0275getCurrentView(); 356 \u0275\u0275elementStart(0, "div", 4); 357 \u0275\u0275listener("click", function NgxGalleryImageComponent_ng_container_1_div_1_Template_div_click_0_listener($event) { 358 \u0275\u0275restoreView(_r1); 359 const image_r2 = \u0275\u0275nextContext().$implicit; 360 const ctx_r2 = \u0275\u0275nextContext(); 361 return \u0275\u0275resetView(ctx_r2.handleClick($event, image_r2.index)); 362 })("@animation.start", function NgxGalleryImageComponent_ng_container_1_div_1_Template_div_animation_animation_start_0_listener($event) { 363 \u0275\u0275restoreView(_r1); 364 const ctx_r2 = \u0275\u0275nextContext(2); 365 return \u0275\u0275resetView(ctx_r2.onStart($event)); 366 })("@animation.done", function NgxGalleryImageComponent_ng_container_1_div_1_Template_div_animation_animation_done_0_listener($event) { 367 \u0275\u0275restoreView(_r1); 368 const ctx_r2 = \u0275\u0275nextContext(2); 369 return \u0275\u0275resetView(ctx_r2.onDone($event)); 370 }); 371 \u0275\u0275elementStart(1, "div", 5); 372 \u0275\u0275template(2, NgxGalleryImageComponent_ng_container_1_div_1_ngx_gallery_action_2_Template, 1, 3, "ngx-gallery-action", 6); 373 \u0275\u0275elementEnd(); 374 \u0275\u0275template(3, NgxGalleryImageComponent_ng_container_1_div_1_div_3_Template, 1, 1, "div", 7); 375 \u0275\u0275elementEnd(); 376 } 377 if (rf & 2) { 378 const image_r2 = \u0275\u0275nextContext().$implicit; 379 const ctx_r2 = \u0275\u0275nextContext(); 380 \u0275\u0275styleProp("background-image", ctx_r2.getSafeUrl(image_r2.src)); 381 \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(6, _c2, ctx_r2.clickable))("@animation", ctx_r2.action); 382 \u0275\u0275advance(2); 383 \u0275\u0275property("ngForOf", ctx_r2.actions); 384 \u0275\u0275advance(); 385 \u0275\u0275property("ngIf", ctx_r2.showDescription && ctx_r2.descriptions[image_r2.index]); 386 } 387} 388function NgxGalleryImageComponent_ng_container_1_div_2_ngx_gallery_action_5_Template(rf, ctx) { 389 if (rf & 1) { 390 const _r7 = \u0275\u0275getCurrentView(); 391 \u0275\u0275elementStart(0, "ngx-gallery-action", 8); 392 \u0275\u0275listener("closeClick", function NgxGalleryImageComponent_ng_container_1_div_2_ngx_gallery_action_5_Template_ngx_gallery_action_closeClick_0_listener($event) { 393 const action_r8 = \u0275\u0275restoreView(_r7).$implicit; 394 const image_r2 = \u0275\u0275nextContext(2).$implicit; 395 return \u0275\u0275resetView(action_r8.onClick($event, image_r2.index)); 396 }); 397 \u0275\u0275elementEnd(); 398 } 399 if (rf & 2) { 400 const action_r8 = ctx.$implicit; 401 \u0275\u0275property("icon", action_r8.icon)("disabled", action_r8.disabled)("titleText", action_r8.titleText); 402 } 403} 404function NgxGalleryImageComponent_ng_container_1_div_2_div_6_Template(rf, ctx) { 405 if (rf & 1) { 406 \u0275\u0275elementStart(0, "div", 9); 407 \u0275\u0275listener("click", function NgxGalleryImageComponent_ng_container_1_div_2_div_6_Template_div_click_0_listener($event) { 408 return $event.stopPropagation(); 409 }); 410 \u0275\u0275elementEnd(); 411 } 412 if (rf & 2) { 413 const image_r2 = \u0275\u0275nextContext(2).$implicit; 414 const ctx_r2 = \u0275\u0275nextContext(); 415 \u0275\u0275property("innerHTML", ctx_r2.descriptions[image_r2.index], \u0275\u0275sanitizeHtml); 416 } 417} 418function NgxGalleryImageComponent_ng_container_1_div_2_Template(rf, ctx) { 419 if (rf & 1) { 420 const _r6 = \u0275\u0275getCurrentView(); 421 \u0275\u0275elementStart(0, "div", 4); 422 \u0275\u0275listener("click", function NgxGalleryImageComponent_ng_container_1_div_2_Template_div_click_0_listener($event) { 423 \u0275\u0275restoreView(_r6); 424 const image_r2 = \u0275\u0275nextContext().$implicit; 425 const ctx_r2 = \u0275\u0275nextContext();
426 return \u0275\u0275resetView(ctx_r2.handleClick($event, image_r2.index)); 427 })("@animation.start", function NgxGalleryImageComponent_ng_container_1_div_2_Template_div_animation_animation_start_0_listener($event) { 428 \u0275\u0275restoreView(_r6); 429 const ctx_r2 = \u0275\u0275nextContext(2); 430 return \u0275\u0275resetView(ctx_r2.onStart($event)); 431 })("@animation.done", function NgxGalleryImageComponent_ng_container_1_div_2_Template_div_animation_animation_done_0_listener($event) { 432 \u0275\u0275restoreView(_r6); 433 const ctx_r2 = \u0275\u0275nextContext(2); 434 return \u0275\u0275resetView(ctx_r2.onDone($event)); 435 }); 436 \u0275\u0275elementStart(1, "video", 10); 437 \u0275\u0275element(2, "source", 11); 438 \u0275\u0275text(3, " Your browser does not support the video tag. "); 439 \u0275\u0275elementEnd(); 440 \u0275\u0275elementStart(4, "div", 5); 441 \u0275\u0275template(5, NgxGalleryImageComponent_ng_container_1_div_2_ngx_gallery_action_5_Template, 1, 3, "ngx-gallery-action", 6); 442 \u0275\u0275elementEnd(); 443 \u0275\u0275template(6, NgxGalleryImageComponent_ng_container_1_div_2_div_6_Template, 1, 1, "div", 7); 444 \u0275\u0275elementEnd(); 445 } 446 if (rf & 2) { 447 const image_r2 = \u0275\u0275nextContext().$implicit; 448 const ctx_r2 = \u0275\u0275nextContext(); 449 \u0275\u0275styleProp("background-image", ctx_r2.getSafeUrl(image_r2.src)); 450 \u0275\u0275property("ngClass", \u0275\u0275pureFunction1(7, _c2, ctx_r2.clickable))("@animation", ctx_r2.action); 451 \u0275\u0275advance(2); 452 \u0275\u0275property("src", image_r2.src); 453 \u0275\u0275advance(3); 454 \u0275\u0275property("ngForOf", ctx_r2.actions); 455 \u0275\u0275advance(); 456 \u0275\u0275property("ngIf", ctx_r2.showDescription && ctx_r2.descriptions[image_r2.index]); 457 } 458} 459function NgxGalleryImageComponent_ng_container_1_Template(rf, ctx) { 460 if (rf & 1) { 461 \u0275\u0275elementContainerStart(0); 462 \u0275\u0275template(1, NgxGalleryImageComponent_ng_container_1_div_1_Template, 4, 8, "div", 3)(2, NgxGalleryImageComponent_ng_container_1_div_2_Template, 7, 9, "div", 3); 463 \u0275\u0275elementContainerEnd(); 464 } 465 if (rf & 2) { 466 const image_r2 = ctx.$implicit; 467 const ctx_r2 = \u0275\u0275nextContext(); 468 \u0275\u0275advance(); 469 \u0275\u0275property("ngIf", image_r2.type === "image" && image_r2.index === ctx_r2._selectedIndex); 470 \u0275\u0275advance(); 471 \u0275\u0275property("ngIf", image_r2.type === "video" && image_r2.index === ctx_r2._selectedIndex); 472 } 473} 474function NgxGalleryImageComponent_ngx_gallery_bullets_2_Template(rf, ctx) { 475 if (rf & 1) { 476 const _r9 = \u0275\u0275getCurrentView(); 477 \u0275\u0275elementStart(0, "ngx-gallery-bullets", 12); 478 \u0275\u0275listener("bulletChange", function NgxGalleryImageComponent_ngx_gallery_bullets_2_Template_ngx_gallery_bullets_bulletChange_0_listener($event) { 479 \u0275\u0275restoreView(_r9); 480 const ctx_r2 = \u0275\u0275nextContext(); 481 return \u0275\u0275resetView(ctx_r2.show($event)); 482 }); 483 \u0275\u0275elementEnd(); 484 } 485 if (rf & 2) { 486 const ctx_r2 = \u0275\u0275nextContext(); 487 \u0275\u0275property("count", ctx_r2.images.length)("active", ctx_r2._selectedIndex); 488 } 489} 490function NgxGalleryImageComponent_ngx_gallery_arrows_3_Template(rf, ctx) { 491 if (rf & 1) { 492 const _r10 = \u0275\u0275getCurrentView(); 493 \u0275\u0275elementStart(0, "ngx-gallery-arrows", 13); 494 \u0275\u0275listener("prevClick", function NgxGalleryImageComponent_ngx_gallery_arrows_3_Template_ngx_gallery_arrows_prevClick_0_listener() { 495 \u0275\u0275restoreView(_r10); 496 const ctx_r2 = \u0275\u0275nextContext(); 497 return \u0275\u0275resetView(ctx_r2.showPrev()); 498 })("nextClick", function NgxGalleryImageComponent_ngx_gallery_arrows_3_Template_ngx_gallery_arrows_nextClick_0_listener() { 499 \u0275\u0275restoreView(_r10); 500 const ctx_r2 = \u0275\u0275nextContext(); 501 return \u0275\u0275resetView(ctx_r2.showNext()); 502 }); 503 \u0275\u0275elementEnd(); 504 } 505 if (rf & 2) { 506 const ctx_r2 = \u0275\u0275nextContext(); 507 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-image-size-", ctx_r2.size)); 508 \u0275\u0275property("prevDisabled", !ctx_r2.canShowPrev())("nextDisabled", !ctx_r2.canShowNext())("arrowPrevIcon", ctx_r2.arrowPrevIcon)("arrowNextIcon", ctx_r2.arrowNextIcon); 509 } 510} 511var _c3 = (a0, a1) => ({ 512 "ngx-gallery-active": a0, 513 "ngx-gallery-clickable": a1 514}); 515function NgxGalleryThumbnailsComponent_a_2_div_1_Template(rf, ctx) { 516 if (rf & 1) { 517 \u0275\u0275element(0, "div", 9); 518 } 519 if (rf & 2) { 520 const ctx_r3 = \u0275\u0275nextContext(); 521 const image_r5 = ctx_r3.$implicit; 522 const i_r2 = ctx_r3.index; 523 const ctx_r2 = \u0275\u0275nextContext(); 524 \u0275\u0275styleProp("background-image", ctx_r2.getSafeUrl(image_r5)); 525 \u0275\u0275property("ngClass", \u0275\u0275pureFunction2(3, _c3, i_r2 === ctx_r2.selectedIndex, ctx_r2.clickable)); 526 } 527} 528function NgxGalleryThumbnailsComponent_a_2_div_2_Template(rf, ctx) { 529 if (rf & 1) { 530 \u0275\u0275elementStart(0, "div", 10)(1, "video", 11); 531 \u0275\u0275element(2, "source", 12); 532 \u0275\u0275text(3, " Your browser does not support the video tag. "); 533 \u0275\u0275elementEnd()(); 534 } 535 if (rf & 2) { 536 const ctx_r3 = \u0275\u0275nextContext(); 537 const image_r5 = ctx_r3.$implicit; 538 const i_r2 = ctx_r3.index; 539 const ctx_r2 = \u0275\u0275nextContext(); 540 \u0275\u0275advance(); 541 \u0275\u0275property("ngClass", \u0275\u0275pureFunction2(2, _c3, i_r2 === ctx_r2.selectedIndex, ctx_r2.clickable)); 542 \u0275\u0275advance(); 543 \u0275\u0275property("src", image_r5); 544 } 545} 546function NgxGalleryThumbnailsComponent_a_2_ngx_gallery_action_4_Template(rf, ctx) { 547 if (rf & 1) { 548 const _r6 = \u0275\u0275getCurrentView(); 549 \u0275\u0275elementStart(0, "ngx-gallery-action", 13); 550 \u0275\u0275listener("closeClick", function NgxGalleryThumbnailsComponent_a_2_ngx_gallery_action_4_Template_ngx_gallery_action_closeClick_0_listener($event) { 551 const action_r7 = \u0275\u0275restoreView(_r6).$implicit; 552 const i_r2 = \u0275\u0275nextContext().index;
553 return \u0275\u0275resetView(action_r7.onClick($event, i_r2)); 554 }); 555 \u0275\u0275elementEnd(); 556 } 557 if (rf & 2) { 558 const action_r7 = ctx.$implicit; 559 \u0275\u0275property("icon", action_r7.icon)("disabled", action_r7.disabled)("titleText", action_r7.titleText); 560 } 561} 562function NgxGalleryThumbnailsComponent_a_2_div_5_Template(rf, ctx) { 563 if (rf & 1) { 564 \u0275\u0275elementStart(0, "div", 14)(1, "span", 15); 565 \u0275\u0275text(2); 566 \u0275\u0275elementEnd()(); 567 } 568 if (rf & 2) { 569 const ctx_r2 = \u0275\u0275nextContext(2); 570 \u0275\u0275advance(2); 571 \u0275\u0275textInterpolate1("+", ctx_r2.remainingCountValue); 572 } 573} 574function NgxGalleryThumbnailsComponent_a_2_Template(rf, ctx) { 575 if (rf & 1) { 576 const _r1 = \u0275\u0275getCurrentView(); 577 \u0275\u0275elementStart(0, "a", 3); 578 \u0275\u0275listener("click", function NgxGalleryThumbnailsComponent_a_2_Template_a_click_0_listener($event) { 579 const i_r2 = \u0275\u0275restoreView(_r1).index; 580 const ctx_r2 = \u0275\u0275nextContext(); 581 return \u0275\u0275resetView(ctx_r2.handleClick($event, i_r2)); 582 }); 583 \u0275\u0275template(1, NgxGalleryThumbnailsComponent_a_2_div_1_Template, 1, 6, "div", 4)(2, NgxGalleryThumbnailsComponent_a_2_div_2_Template, 4, 5, "div", 5); 584 \u0275\u0275elementStart(3, "div", 6); 585 \u0275\u0275template(4, NgxGalleryThumbnailsComponent_a_2_ngx_gallery_action_4_Template, 1, 3, "ngx-gallery-action", 7); 586 \u0275\u0275elementEnd(); 587 \u0275\u0275template(5, NgxGalleryThumbnailsComponent_a_2_div_5_Template, 3, 1, "div", 8); 588 \u0275\u0275elementEnd(); 589 } 590 if (rf & 2) { 591 const image_r5 = ctx.$implicit; 592 const i_r2 = ctx.index; 593 const ctx_r2 = \u0275\u0275nextContext(); 594 \u0275\u0275styleProp("width", ctx_r2.getThumbnailWidth())("height", ctx_r2.getThumbnailHeight())("left", ctx_r2.getThumbnailLeft(i_r2))("top", ctx_r2.getThumbnailTop(i_r2)); 595 \u0275\u0275property("href", ctx_r2.hasLink(i_r2) ? ctx_r2.links[i_r2] : "#", \u0275\u0275sanitizeUrl)("target", ctx_r2.linkTarget)("ngClass", \u0275\u0275pureFunction2(16, _c3, i_r2 === ctx_r2.selectedIndex, ctx_r2.clickable)); 596 \u0275\u0275attribute("aria-label", ctx_r2.labels[i_r2]); 597 \u0275\u0275advance(); 598 \u0275\u0275property("ngIf", ctx_r2.getFileType(image_r5) === "image"); 599 \u0275\u0275advance(); 600 \u0275\u0275property("ngIf", ctx_r2.getFileType(image_r5) === "video"); 601 \u0275\u0275advance(2); 602 \u0275\u0275property("ngForOf", ctx_r2.actions); 603 \u0275\u0275advance(); 604 \u0275\u0275property("ngIf", ctx_r2.remainingCount && ctx_r2.remainingCountValue && i_r2 === ctx_r2.rows * ctx_r2.columns - 1); 605 } 606} 607function NgxGalleryThumbnailsComponent_ngx_gallery_arrows_3_Template(rf, ctx) { 608 if (rf & 1) { 609 const _r8 = \u0275\u0275getCurrentView(); 610 \u0275\u0275elementStart(0, "ngx-gallery-arrows", 16); 611 \u0275\u0275listener("prevClick", function NgxGalleryThumbnailsComponent_ngx_gallery_arrows_3_Template_ngx_gallery_arrows_prevClick_0_listener() { 612 \u0275\u0275restoreView(_r8); 613 const ctx_r2 = \u0275\u0275nextContext(); 614 return \u0275\u0275resetView(ctx_r2.moveLeft()); 615 })("nextClick", function NgxGalleryThumbnailsComponent_ngx_gallery_arrows_3_Template_ngx_gallery_arrows_nextClick_0_listener() { 616 \u0275\u0275restoreView(_r8); 617 const ctx_r2 = \u0275\u0275nextContext(); 618 return \u0275\u0275resetView(ctx_r2.moveRight()); 619 }); 620 \u0275\u0275elementEnd(); 621 } 622 if (rf & 2) { 623 const ctx_r2 = \u0275\u0275nextContext(); 624 \u0275\u0275property("prevDisabled", !ctx_r2.canMoveLeft())("nextDisabled", !ctx_r2.canMoveRight())("arrowPrevIcon", ctx_r2.arrowPrevIcon)("arrowNextIcon", ctx_r2.arrowNextIcon); 625 } 626} 627var _c4 = () => []; 628function NgxGalleryComponent_ngx_gallery_image_1_Template(rf, ctx) { 629 if (rf & 1) { 630 const _r1 = \u0275\u0275getCurrentView(); 631 \u0275\u0275elementStart(0, "ngx-gallery-image", 3); 632 \u0275\u0275listener("imageClick", function NgxGalleryComponent_ngx_gallery_image_1_Template_ngx_gallery_image_imageClick_0_listener($event) { 633 \u0275\u0275restoreView(_r1); 634 const ctx_r1 = \u0275\u0275nextContext();
635 return \u0275\u0275resetView(ctx_r1.openPreview($event)); 636 })("activeChange", function NgxGalleryComponent_ngx_gallery_image_1_Template_ngx_gallery_image_activeChange_0_listener($event) { 637 \u0275\u0275restoreView(_r1); 638 const ctx_r1 = \u0275\u0275nextContext(); 639 return \u0275\u0275resetView(ctx_r1.selectFromImage($event)); 640 })("animating", function NgxGalleryComponent_ngx_gallery_image_1_Template_ngx_gallery_image_animating_0_listener($event) { 641 \u0275\u0275restoreView(_r1); 642 const ctx_r1 = \u0275\u0275nextContext(); 643 return \u0275\u0275resetView(ctx_r1.setAnimating($event)); 644 }); 645 \u0275\u0275elementEnd(); 646 } 647 if (rf & 2) { 648 const ctx_r1 = \u0275\u0275nextContext(); 649 \u0275\u0275styleProp("height", ctx_r1.getImageHeight()); 650 \u0275\u0275property("images", ctx_r1.mediumImages)("clickable", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.preview)("selectedIndex", ctx_r1.selectedIndex)("arrows", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageArrows)("arrowsAutoHide", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageArrowsAutoHide)("arrowPrevIcon", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.arrowPrevIcon)("arrowNextIcon", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.arrowNextIcon)("swipe", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageSwipe)("animation", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageAnimation)("size", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageSize)("autoPlay", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageAutoPlay)("autoPlayInterval", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageAutoPlayInterval)("autoPlayPauseOnHover", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageAutoPlayPauseOnHover)("infinityMove", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageInfinityMove)("lazyLoading", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.lazyLoading)("actions", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageActions)("descriptions", ctx_r1.descriptions)("showDescription", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageDescription)("bullets", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.imageBullets); 651 } 652} 653function NgxGalleryComponent_ngx_gallery_thumbnails_2_Template(rf, ctx) { 654 if (rf & 1) { 655 const _r3 = \u0275\u0275getCurrentView(); 656 \u0275\u0275elementStart(0, "ngx-gallery-thumbnails", 4); 657 \u0275\u0275listener("activeChange", function NgxGalleryComponent_ngx_gallery_thumbnails_2_Template_ngx_gallery_thumbnails_activeChange_0_listener($event) { 658 \u0275\u0275restoreView(_r3); 659 const ctx_r1 = \u0275\u0275nextContext(); 660 return \u0275\u0275resetView(ctx_r1.selectFromThumbnails($event)); 661 }); 662 \u0275\u0275elementEnd(); 663 } 664 if (rf & 2) { 665 const ctx_r1 = \u0275\u0275nextContext(); 666 \u0275\u0275styleProp("margin-top", ctx_r1.getThumbnailsMarginTop())("margin-bottom", ctx_r1.getThumbnailsMarginBottom())("height", ctx_r1.getThumbnailsHeight()); 667 \u0275\u0275property("images", ctx_r1.smallImages)("isAnimating", ctx_r1.isAnimating)("links", (ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsAsLinks) ? ctx_r1.links : \u0275\u0275pureFunction0(28, _c4))("labels", ctx_r1.labels)("linkTarget", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.linkTarget)("selectedIndex", ctx_r1.selectedIndex)("columns", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsColumns)("rows", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsRows)("margin", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailMargin)("arrows", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsArrows)("arrowsAutoHide", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsArrowsAutoHide)("arrowPrevIcon", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.arrowPrevIcon)("arrowNextIcon", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.arrowNextIcon)("clickable", (ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.image) || (ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.preview))("swipe",
667ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsSwipe)("size", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailSize)("moveSize", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsMoveSize)("order", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsOrder)("remainingCount", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailsRemainingCount)("lazyLoading", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.lazyLoading)("actions", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailActions)("ngClass", ctx_r1.currentOptions == null ? null : ctx_r1.currentOptions.thumbnailClasses); 668 } 669} 670var NgxGalleryService = class { 671 constructor(renderer) { 672 this.renderer = renderer; 673 this.swipeHandlers = /* @__PURE__ */ new Map(); 674 } 675 manageSwipe(status, element, id, nextHandler, prevHandler) { 676 const handlers = this.getSwipeHandlers(id); 677 try { 678 if (status && !handlers) { 679 this.swipeHandlers.set(id, [this.renderer.listen(element.nativeElement, "swipeleft", () => nextHandler()), this.renderer.listen(element.nativeElement, "swiperight", () => prevHandler())]); 680 } else if (!status && handlers) { 681 handlers.map((handler) => handler()); 682 this.removeSwipeHandlers(id); 683 } 684 } catch (e) { 685 } 686 } 687 validateUrl(url) { 688 if (url.replace) { 689 return url.replace(new RegExp(" ", "g"), "%20").replace(new RegExp("'", "g"), "%27"); 690 } else { 691 return url; 692 } 693 } 694 getBackgroundUrl(image) { 695 return "url('" + this.validateUrl(image) + "')"; 696 } 697 getFileType(fileSource) { 698 const fileExtension = fileSource.split(".").pop().toLowerCase(); 699 if (fileExtension === "avi" || fileExtension === "flv" || fileExtension === "wmv" || fileExtension === "mov" || fileExtension === "mp4") { 700 return "video"; 701 } 702 return "image"; 703 } 704 getSwipeHandlers(id) { 705 return this.swipeHandlers.get(id); 706 } 707 removeSwipeHandlers(id) { 708 this.swipeHandlers.delete(id); 709 } 710}; 711NgxGalleryService.\u0275fac = function NgxGalleryService_Factory(__ngFactoryType__) { 712 return new (__ngFactoryType__ || NgxGalleryService)(\u0275\u0275inject(Renderer2)); 713}; 714NgxGalleryService.\u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ 715 token: NgxGalleryService, 716 factory: NgxGalleryService.\u0275fac, 717 providedIn: "root" 718}); 719(() => { 720 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryService, [{ 721 type: Injectable, 722 args: [{ 723 providedIn: "root" 724 }] 725 }], function() { 726 return [{ 727 type: Renderer2 728 }]; 729 }, null); 730})(); 731var NgxGalleryArrowsComponent = class { 732 constructor() { 733 this.prevClick = new EventEmitter(); 734 this.nextClick = new EventEmitter(); 735 } 736 handlePrevClick() { 737 this.prevClick.emit(); 738 } 739 handleNextClick() { 740 this.nextClick.emit(); 741 } 742}; 743NgxGalleryArrowsComponent.\u0275fac = function NgxGalleryArrowsComponent_Factory(__ngFactoryType__) { 744 return new (__ngFactoryType__ || NgxGalleryArrowsComponent)(); 745}; 746NgxGalleryArrowsComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 747 type: NgxGalleryArrowsComponent, 748 selectors: [["ngx-gallery-arrows"]], 749 inputs: { 750 prevDisabled: "prevDisabled", 751 nextDisabled: "nextDisabled", 752 arrowPrevIcon: "arrowPrevIcon", 753 arrowNextIcon: "arrowNextIcon" 754 }, 755 outputs: { 756 prevClick: "prevClick", 757 nextClick: "nextClick" 758 }, 759 standalone: false, 760 decls: 6, 761 vars: 10, 762 consts: [[1, "ngx-gallery-arrows-wrapper", "ngx-gallery-arrow-left"], ["aria-hidden", "true", 1, "ngx-gallery-icon", "ngx-gallery-arrow", 3, "click"], [1, "ngx-gallery-arrows-wrapper", "ngx-gallery-arrow-right"]], 763 template: function NgxGalleryArrowsComponent_Template(rf, ctx) { 764 if (rf & 1) { 765 \u0275\u0275elementStart(0, "div", 0)(1, "div", 1); 766 \u0275\u0275listener("click", function NgxGalleryArrowsComponent_Template_div_click_1_listener() { 767 return ctx.handlePrevClick(); 768 }); 769 \u0275\u0275element(2, "i"); 770 \u0275\u0275elementEnd()(); 771 \u0275\u0275elementStart(3, "div", 2)(4, "div", 1); 772 \u0275\u0275listener("click", function NgxGalleryArrowsComponent_Template_div_click_4_listener() { 773 return ctx.handleNextClick(); 774 }); 775 \u0275\u0275element(5, "i"); 776 \u0275\u0275elementEnd()(); 777 } 778 if (rf & 2) { 779 \u0275\u0275advance(); 780 \u0275\u0275classProp("ngx-gallery-disabled", ctx.prevDisabled); 781 \u0275\u0275advance(); 782 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-icon-content ", ctx.arrowPrevIcon)); 783 \u0275\u0275advance(2); 784 \u0275\u0275classProp("ngx-gallery-disabled", ctx.nextDisabled); 785 \u0275\u0275advance(); 786 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-icon-content ", ctx.arrowNextIcon)); 787 } 788 }, 789 styles: [".ngx-gallery-arrow-wrapper[_ngcontent-%COMP%]{position:absolute;height:100%;width:1px;display:table;table-layout:fixed}.ngx-gallery-preview-img-wrapper[_ngcontent-%COMP%] .ngx-gallery-arrow-wrapper[_ngcontent-%COMP%]{z-index:10001}.ngx-gallery-arrow-left[_ngcontent-%COMP%]{left:0}.ngx-gallery-arrow-right[_ngcontent-%COMP%]{right:0}.ngx-gallery-arrow[_ngcontent-%COMP%]{top:50%;transform:translateY(-50%);cursor:pointer}.ngx-gallery-arrow.ngx-gallery-disabled[_ngcontent-%COMP%]{opacity:.6;cursor:default}.ngx-gallery-arrow-left[_ngcontent-%COMP%] .ngx-gallery-arrow[_ngcontent-%COMP%]{left:10px}.ngx-gallery-arrow-right[_ngcontent-%COMP%] .ngx-gallery-arrow[_ngcontent-%COMP%]{right:10px}"],
790 changeDetection: 0 791}); 792(() => { 793 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryArrowsComponent, [{ 794 type: Component, 795 args: [{ 796 selector: "ngx-gallery-arrows", 797 changeDetection: ChangeDetectionStrategy.OnPush, 798 template: '<div class="ngx-gallery-arrows-wrapper ngx-gallery-arrow-left">\n <div class="ngx-gallery-icon ngx-gallery-arrow" aria-hidden="true" (click)="handlePrevClick()" [class.ngx-gallery-disabled]="prevDisabled">\n <i class="ngx-gallery-icon-content {{arrowPrevIcon}}"></i>\n </div>\n</div>\n<div class="ngx-gallery-arrows-wrapper ngx-gallery-arrow-right">\n <div class="ngx-gallery-icon ngx-gallery-arrow" aria-hidden="true" (click)="handleNextClick()" [class.ngx-gallery-disabled]="nextDisabled">\n <i class="ngx-gallery-icon-content {{arrowNextIcon}}"></i>\n </div>\n</div>\n', 799 styles: [".ngx-gallery-arrow-wrapper{position:absolute;height:100%;width:1px;display:table;table-layout:fixed}.ngx-gallery-preview-img-wrapper .ngx-gallery-arrow-wrapper{z-index:10001}.ngx-gallery-arrow-left{left:0}.ngx-gallery-arrow-right{right:0}.ngx-gallery-arrow{top:50%;transform:translateY(-50%);cursor:pointer}.ngx-gallery-arrow.ngx-gallery-disabled{opacity:.6;cursor:default}.ngx-gallery-arrow-left .ngx-gallery-arrow{left:10px}.ngx-gallery-arrow-right .ngx-gallery-arrow{right:10px}\n"] 800 }] 801 }], function() { 802 return []; 803 }, { 804 prevDisabled: [{ 805 type: Input 806 }], 807 nextDisabled: [{ 808 type: Input 809 }], 810 arrowPrevIcon: [{ 811 type: Input 812 }], 813 arrowNextIcon: [{ 814 type: Input 815 }], 816 prevClick: [{ 817 type: Output 818 }], 819 nextClick: [{ 820 type: Output 821 }] 822 }); 823})(); 824var NgxGalleryActionComponent = class { 825 constructor() { 826 this.disabled = false; 827 this.titleText = ""; 828 this.closeClick = new EventEmitter(); 829 } 830 handleClick(event) { 831 if (!this.disabled) { 832 this.closeClick.emit(event); 833 } 834 event.stopPropagation(); 835 event.preventDefault(); 836 } 837}; 838NgxGalleryActionComponent.\u0275fac = function NgxGalleryActionComponent_Factory(__ngFactoryType__) { 839 return new (__ngFactoryType__ || NgxGalleryActionComponent)(); 840}; 841NgxGalleryActionComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 842 type: NgxGalleryActionComponent, 843 selectors: [["ngx-gallery-action"]], 844 inputs: { 845 icon: "icon", 846 disabled: "disabled", 847 titleText: "titleText" 848 }, 849 outputs: { 850 closeClick: "closeClick" 851 }, 852 standalone: false, 853 decls: 2, 854 vars: 7, 855 consts: [["aria-hidden", "true", 1, "ngx-gallery-icon", 3, "click", "title"]], 856 template: function NgxGalleryActionComponent_Template(rf, ctx) { 857 if (rf & 1) { 858 \u0275\u0275elementStart(0, "div", 0); 859 \u0275\u0275listener("click", function NgxGalleryActionComponent_Template_div_click_0_listener($event) { 860 return ctx.handleClick($event); 861 }); 862 \u0275\u0275element(1, "i"); 863 \u0275\u0275elementEnd(); 864 } 865 if (rf & 2) { 866 \u0275\u0275classProp("ngx-gallery-icon-disabled", ctx.disabled); 867 \u0275\u0275property("title", \u0275\u0275interpolate(ctx.titleText)); 868 \u0275\u0275advance(); 869 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-icon-content ", ctx.icon)); 870 } 871 }, 872 styles: [".ngx-gallery-icon[_ngcontent-%COMP%]{color:#fff;font-size:25px;position:absolute;z-index:2000;display:inline-block}.ngx-gallery-icon[_ngcontent-%COMP%]{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-icon[_ngcontent-%COMP%] .ngx-gallery-icon-content[_ngcontent-%COMP%]{display:block}"], 873 changeDetection: 0 874}); 875(() => { 876 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryActionComponent, [{ 877 type: Component, 878 args: [{ 879 selector: "ngx-gallery-action", 880 changeDetection: ChangeDetectionStrategy.OnPush, 881 template: '<div class="ngx-gallery-icon" [class.ngx-gallery-icon-disabled]="disabled"\n aria-hidden="true"\n title="{{ titleText }}"\n (click)="handleClick($event)">\n <i class="ngx-gallery-icon-content {{ icon }}"></i>\n</div>\n', 882 styles: [".ngx-gallery-icon{color:#fff;font-size:25px;position:absolute;z-index:2000;display:inline-block}.ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}\n"] 883 }] 884 }], function() { 885 return []; 886 }, { 887 icon: [{ 888 type: Input 889 }], 890 disabled: [{ 891 type: Input 892 }], 893 titleText: [{ 894 type: Input 895 }], 896 closeClick: [{ 897 type: Output 898 }] 899 }); 900})(); 901var NgxGalleryBulletsComponent = class { 902 constructor() { 903 this.active = 0; 904 this.bulletChange = new EventEmitter(); 905 } 906 getBullets() { 907 return Array(this.count); 908 } 909 handleChange(event, index) { 910 this.bulletChange.emit(index); 911 } 912}; 913NgxGalleryBulletsComponent.\u0275fac = function NgxGalleryBulletsComponent_Factory(__ngFactoryType__) { 914 return new (__ngFactoryType__ || NgxGalleryBulletsComponent)(); 915}; 916NgxGalleryBulletsComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({
917 type: NgxGalleryBulletsComponent, 918 selectors: [["ngx-gallery-bullets"]], 919 inputs: { 920 count: "count", 921 active: "active" 922 }, 923 outputs: { 924 bulletChange: "bulletChange" 925 }, 926 standalone: false, 927 decls: 1, 928 vars: 1, 929 consts: [["class", "ngx-gallery-bullet", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "ngx-gallery-bullet", 3, "click", "ngClass"]], 930 template: function NgxGalleryBulletsComponent_Template(rf, ctx) { 931 if (rf & 1) { 932 \u0275\u0275template(0, NgxGalleryBulletsComponent_div_0_Template, 1, 3, "div", 0); 933 } 934 if (rf & 2) { 935 \u0275\u0275property("ngForOf", ctx.getBullets()); 936 } 937 }, 938 dependencies: [NgForOf, NgClass], 939 styles: ["[_nghost-%COMP%]{position:absolute;z-index:2000;display:inline-flex;left:50%;transform:translate(-50%);bottom:0;padding:10px}.ngx-gallery-bullet[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;cursor:pointer;background:white}.ngx-gallery-bullet[_ngcontent-%COMP%]:not(:first-child){margin-left:5px}.ngx-gallery-bullet[_ngcontent-%COMP%]:hover, .ngx-gallery-bullet.ngx-gallery-active[_ngcontent-%COMP%]{background:black}"], 940 changeDetection: 0 941}); 942(() => { 943 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryBulletsComponent, [{ 944 type: Component, 945 args: [{ 946 selector: "ngx-gallery-bullets", 947 changeDetection: ChangeDetectionStrategy.OnPush, 948 template: `<div class="ngx-gallery-bullet" *ngFor="let bullet of getBullets(); let i = index;" (click)="handleChange($event, i)" 949 [ngClass]="{ 'ngx-gallery-active': i === active }"></div> 950`, 951 styles: [":host{position:absolute;z-index:2000;display:inline-flex;left:50%;transform:translate(-50%);bottom:0;padding:10px}.ngx-gallery-bullet{width:10px;height:10px;border-radius:50%;cursor:pointer;background:white}.ngx-gallery-bullet:not(:first-child){margin-left:5px}.ngx-gallery-bullet:hover,.ngx-gallery-bullet.ngx-gallery-active{background:black}\n"] 952 }] 953 }], function() { 954 return []; 955 }, { 956 count: [{ 957 type: Input 958 }], 959 active: [{ 960 type: Input 961 }], 962 bulletChange: [{ 963 type: Output 964 }] 965 }); 966})(); 967var NgxGalleryPreviewComponent = class { 968 constructor(sanitization, elementRef, helperService, renderer, changeDetectorRef) { 969 this.sanitization = sanitization; 970 this.elementRef = elementRef; 971 this.helperService = helperService; 972 this.renderer = renderer; 973 this.changeDetectorRef = changeDetectorRef; 974 this.showSpinner = false; 975 this.positionLeft = 0; 976 this.positionTop = 0; 977 this.zoomValue = 1; 978 this.loading = false; 979 this.rotateValue = 0; 980 this.index = 0; 981 this.previewOpen = new EventEmitter(); 982 this.previewClose = new EventEmitter(); 983 this.activeChange = new EventEmitter(); 984 this.isOpen = false; 985 this.initialX = 0; 986 this.initialY = 0; 987 this.initialLeft = 0; 988 this.initialTop = 0; 989 this.isMove = false; 990 } 991 ngOnInit() { 992 if (this.arrows && this.arrowsAutoHide) { 993 this.arrows = false; 994 } 995 } 996 ngOnChanges(changes) { 997 if (changes["swipe"]) { 998 this.helperService.manageSwipe(this.swipe, this.elementRef, "preview", () => this.showNext(), () => this.showPrev()); 999 } 1000 } 1001 ngOnDestroy() { 1002 if (this.keyDownListener) { 1003 this.keyDownListener(); 1004 } 1005 } 1006 onMouseEnter() { 1007 if (this.arrowsAutoHide && !this.arrows) { 1008 this.arrows = true; 1009 } 1010 } 1011 onMouseLeave() { 1012 if (this.arrowsAutoHide && this.arrows) { 1013 this.arrows = false; 1014 } 1015 } 1016 onKeyDown(e) { 1017 if (this.isOpen) { 1018 if (this.keyboardNavigation) { 1019 if (this.isKeyboardPrev(e)) { 1020 this.showPrev(); 1021 } else if (this.isKeyboardNext(e)) { 1022 this.showNext(); 1023 } 1024 } 1025 if (this.closeOnEsc && this.isKeyboardEsc(e)) { 1026 this.close(); 1027 } 1028 } 1029 } 1030 open(index) { 1031 this.previewOpen.emit(); 1032 this.index = index; 1033 this.isOpen = true; 1034 this.show(true); 1035 if (this.forceFullscreen) { 1036 this.manageFullscreen(); 1037 } 1038 this.keyDownListener = this.renderer.listen("window", "keydown", (e) => this.onKeyDown(e)); 1039 } 1040 close() { 1041 this.isOpen = false;
1042 const video = this.previewImage.nativeElement; 1043 if (video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2) { 1044 video.pause(); 1045 } 1046 this.closeFullscreen(); 1047 this.previewClose.emit(); 1048 this.stopAutoPlay(); 1049 if (this.keyDownListener) { 1050 this.keyDownListener(); 1051 } 1052 } 1053 imageMouseEnter() { 1054 if (this.autoPlay && this.autoPlayPauseOnHover) { 1055 this.stopAutoPlay(); 1056 } 1057 } 1058 imageMouseLeave() { 1059 if (this.autoPlay && this.autoPlayPauseOnHover) { 1060 this.startAutoPlay(); 1061 } 1062 } 1063 startAutoPlay() { 1064 if (this.autoPlay) { 1065 this.stopAutoPlay(); 1066 this.timer = setTimeout(() => { 1067 if (!this.showNext()) { 1068 this.index = -1; 1069 this.showNext(); 1070 } 1071 }, this.autoPlayInterval); 1072 } 1073 } 1074 stopAutoPlay() { 1075 if (this.timer) { 1076 clearTimeout(this.timer); 1077 } 1078 } 1079 showAtIndex(index) { 1080 this.index = index; 1081 this.show(); 1082 } 1083 showNext() { 1084 if (this.canShowNext()) { 1085 this.index++; 1086 if (this.index === this.images.length) { 1087 this.index = 0; 1088 } 1089 this.show(); 1090 return true; 1091 } else { 1092 return false; 1093 } 1094 } 1095 showPrev() { 1096 if (this.canShowPrev()) { 1097 this.index--; 1098 if (this.index < 0) { 1099 this.index = this.images.length - 1; 1100 } 1101 this.show(); 1102 } 1103 } 1104 canShowNext() { 1105 if (this.loading) { 1106 return false; 1107 } else if (this.images) { 1108 return this.infinityMove || this.index < this.images.length - 1; 1109 } else { 1110 return false; 1111 } 1112 } 1113 canShowPrev() { 1114 if (this.loading) { 1115 return false; 1116 } else if (this.images) { 1117 return this.infinityMove || this.index > 0; 1118 } else { 1119 return false; 1120 } 1121 } 1122 manageFullscreen() { 1123 if (this.fullscreen || this.forceFullscreen) { 1124 const doc = document; 1125 if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) { 1126 this.openFullscreen(); 1127 } else { 1128 this.closeFullscreen(); 1129 } 1130 } 1131 } 1132 getSafeUrl(image) { 1133 return this.sanitization.bypassSecurityTrustUrl(image); 1134 } 1135 getFileType(fileSource) { 1136 return this.helperService.getFileType(fileSource); 1137 } 1138 zoomIn() { 1139 if (this.canZoomIn()) { 1140 this.zoomValue += this.zoomStep; 1141 if (this.zoomValue > this.zoomMax) { 1142 this.zoomValue = this.zoomMax; 1143 } 1144 } 1145 } 1146 zoomOut() { 1147 if (this.canZoomOut()) { 1148 this.zoomValue -= this.zoomStep; 1149 if (this.zoomValue < this.zoomMin) { 1150 this.zoomValue = this.zoomMin; 1151 } 1152 if (this.zoomValue <= 1) { 1153 this.resetPosition(); 1154 } 1155 } 1156 } 1157 rotateLeft() { 1158 this.rotateValue -= 90; 1159 } 1160 rotateRight() { 1161 this.rotateValue += 90; 1162 } 1163 getTransform() { 1164 return this.sanitization.bypassSecurityTrustStyle("scale(" + this.zoomValue + ") rotate(" + this.rotateValue + "deg)"); 1165 } 1166 canZoomIn() { 1167 return this.zoomValue < this.zoomMax; 1168 } 1169 canZoomOut() { 1170 return this.zoomValue > this.zoomMin; 1171 } 1172 canDragOnZoom() { 1173 return this.zoom && this.zoomValue > 1; 1174 } 1175 mouseDownHandler(e) { 1176 if (this.canDragOnZoom()) { 1177 this.initialX = this.getClientX(e); 1178 this.initialY = this.getClientY(e); 1179 this.initialLeft = this.positionLeft; 1180 this.initialTop = this.positionTop; 1181 this.isMove = true; 1182 e.preventDefault(); 1183 } 1184 } 1185 mouseUpHandler(e) { 1186 this.isMove = false; 1187 } 1188 mouseMoveHandler(e) { 1189 if (this.isMove) { 1190 this.positionLeft = this.initialLeft + (this.getClientX(e) - this.initialX); 1191 this.positionTop = this.initialTop + (this.getClientY(e) - this.initialY); 1192 } 1193 } 1194 getClientX(e) { 1195 return e.touches && e.touches.length ? e.touches[0].clientX : e.clientX; 1196 } 1197 getClientY(e) { 1198 return e.touches && e.touches.length ? e.touches[0].clientY : e.clientY; 1199 } 1200 resetPosition() { 1201 if (this.zoom) { 1202 this.positionLeft = 0; 1203 this.positionTop = 0; 1204 } 1205 } 1206 isKeyboardNext(e) { 1207 return e.keyCode === 39; 1208 } 1209 isKeyboardPrev(e) { 1210 return e.keyCode === 37; 1211 } 1212 isKeyboardEsc(e) { 1213 return e.keyCode === 27; 1214 } 1215 openFullscreen() { 1216 const element = document.documentElement; 1217 if (element.requestFullscreen) { 1218 element.requestFullscreen(); 1219 } else if (element.msRequestFullscreen) { 1220 element.msRequestFullscreen(); 1221 } else if (element.mozRequestFullScreen) { 1222 element.mozRequestFullScreen(); 1223 } else if (element.webkitRequestFullscreen) { 1224 element.webkitRequestFullscreen(); 1225 } 1226 } 1227 closeFullscreen() { 1228 if (this.isFullscreen()) { 1229 const doc = document; 1230 if (doc.exitFullscreen) { 1231 doc.exitFullscreen(); 1232 } else if (doc.msExitFullscreen) { 1233 doc.msExitFullscreen(); 1234 } else if (doc.mozCancelFullScreen) { 1235 doc.mozCancelFullScreen(); 1236 } else if (doc.webkitExitFullscreen) { 1237 doc.webkitExitFullscreen(); 1238 } 1239 } 1240 } 1241 isFullscreen() { 1242 const doc = document; 1243 return doc.fullscreenElement || doc.webkitFullscreenElement || doc.mozFullScreenElement || doc.msFullscreenElement; 1244 } 1245 show(first = false) { 1246 this.loading = true; 1247 this.stopAutoPlay(); 1248 this.activeChange.emit(this.index); 1249 if (first || !this.animation) { 1250 this._show(); 1251 } else { 1252 setTimeout(() => this._show(), 600); 1253 } 1254 } 1255 _show() { 1256 this.zoomValue = 1; 1257 this.rotateValue = 0; 1258 this.resetPosition();
1259 this.src = this.getSafeUrl(this.images[this.index]); 1260 this.type = this.getFileType(this.images[this.index]); 1261 this.srcIndex = this.index; 1262 this.description = this.descriptions[this.index]; 1263 this.changeDetectorRef.markForCheck(); 1264 setTimeout(() => { 1265 if (this.isLoaded(this.previewImage.nativeElement) || this.type === "video") { 1266 this.loading = false; 1267 this.startAutoPlay(); 1268 this.changeDetectorRef.markForCheck(); 1269 } else if (this.type === "video") { 1270 } else { 1271 setTimeout(() => { 1272 if (this.loading) { 1273 this.showSpinner = true; 1274 this.changeDetectorRef.markForCheck(); 1275 } 1276 }); 1277 this.previewImage.nativeElement.onload = () => { 1278 this.loading = false; 1279 this.showSpinner = false; 1280 this.previewImage.nativeElement.onload = null; 1281 this.startAutoPlay(); 1282 this.changeDetectorRef.markForCheck(); 1283 }; 1284 } 1285 }); 1286 } 1287 isLoaded(img) { 1288 if (!img.complete) { 1289 return false; 1290 } 1291 return !(typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0); 1292 } 1293}; 1294NgxGalleryPreviewComponent.\u0275fac = function NgxGalleryPreviewComponent_Factory(__ngFactoryType__) { 1295 return new (__ngFactoryType__ || NgxGalleryPreviewComponent)(\u0275\u0275directiveInject(DomSanitizer), \u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(NgxGalleryService), \u0275\u0275directiveInject(Renderer2), \u0275\u0275directiveInject(ChangeDetectorRef)); 1296}; 1297NgxGalleryPreviewComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 1298 type: NgxGalleryPreviewComponent, 1299 selectors: [["ngx-gallery-preview"]], 1300 viewQuery: function NgxGalleryPreviewComponent_Query(rf, ctx) { 1301 if (rf & 1) { 1302 \u0275\u0275viewQuery(_c1, 5); 1303 } 1304 if (rf & 2) { 1305 let _t; 1306 \u0275\u0275queryRefresh(_t = \u0275\u0275loadQuery()) && (ctx.previewImage = _t.first); 1307 } 1308 }, 1309 hostBindings: function NgxGalleryPreviewComponent_HostBindings(rf, ctx) { 1310 if (rf & 1) { 1311 \u0275\u0275listener("mouseenter", function NgxGalleryPreviewComponent_mouseenter_HostBindingHandler() { 1312 return ctx.onMouseEnter(); 1313 })("mouseleave", function NgxGalleryPreviewComponent_mouseleave_HostBindingHandler() { 1314 return ctx.onMouseLeave(); 1315 }); 1316 } 1317 }, 1318 inputs: { 1319 images: "images", 1320 descriptions: "descriptions", 1321 showDescription: "showDescription", 1322 arrows: "arrows", 1323 arrowsAutoHide: "arrowsAutoHide", 1324 swipe: "swipe", 1325 fullscreen: "fullscreen", 1326 forceFullscreen: "forceFullscreen", 1327 closeOnClick: "closeOnClick", 1328 closeOnEsc: "closeOnEsc", 1329 keyboardNavigation: "keyboardNavigation", 1330 arrowPrevIcon: "arrowPrevIcon", 1331 arrowNextIcon: "arrowNextIcon", 1332 closeIcon: "closeIcon", 1333 fullscreenIcon: "fullscreenIcon", 1334 spinnerIcon: "spinnerIcon", 1335 autoPlay: "autoPlay", 1336 autoPlayInterval: "autoPlayInterval", 1337 autoPlayPauseOnHover: "autoPlayPauseOnHover", 1338 infinityMove: "infinityMove", 1339 zoom: "zoom", 1340 zoomStep: "zoomStep", 1341 zoomMax: "zoomMax", 1342 zoomMin: "zoomMin", 1343 zoomInIcon: "zoomInIcon", 1344 zoomOutIcon: "zoomOutIcon", 1345 animation: "animation", 1346 actions: "actions", 1347 rotate: "rotate", 1348 rotateLeftIcon: "rotateLeftIcon", 1349 rotateRightIcon: "rotateRightIcon", 1350 download: "download", 1351 downloadIcon: "downloadIcon", 1352 bullets: "bullets" 1353 }, 1354 outputs: { 1355 previewOpen: "previewOpen", 1356 previewClose: "previewClose", 1357 activeChange: "activeChange" 1358 }, 1359 standalone: false, 1360 features: [\u0275\u0275NgOnChangesFeature], 1361 decls: 19, 1362 vars: 18, 1363 consts: [["previewImage", ""], [3, "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon", "prevClick", "nextClick", 4, "ngIf"], [1, "ngx-gallery-preview-top"], [1, "ngx-gallery-preview-icons"], [3, "icon", "disabled", "titleText", "closeClick", 4, "ngFor", "ngForOf"], ["class", "ngx-gallery-icon", "aria-hidden", "true", "download", "", 3, "href", 4, "ngIf"], [3, "icon", "disabled", "closeClick", 4, "ngIf"], [3, "icon", "closeClick", 4, "ngIf"], [3, "closeClick", "icon"], [1, "ngx-spinner-wrapper", "ngx-gallery-center"], ["aria-hidden", "true"], [1, "ngx-gallery-preview-wrapper", 3, "click", "mouseup", "mousemove", "touchend", "touchmove"], [1, "ngx-gallery-preview-img-wrapper"], ["class", "ngx-gallery-preview-img ngx-gallery-center", 3, "src", "ngx-gallery-active", "animation", "ngx-gallery-grab", "transform", "left", "top", "click", "mouseenter", "mouseleave", "mousedown", "touchstart", 4, "ngIf"], ["controls", "", "style", "width: 100%; height: 100%;", "class", "ngx-gallery-preview-img ngx-gallery-center", 3, "ngx-gallery-active", "animation", "ngx-gallery-grab", "transform", "left", "top", "click", "mouseenter", "mouseleave", "mousedown", "touchstart", 4, "ngIf"], [3, "count", "active", "bulletChange", 4, "ngIf"], ["class", "ngx-gallery-preview-text", 3, "innerHTML", "click", 4, "ngIf"], [3, "prevClick", "nextClick", "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"], [3, "closeClick", "icon", "disabled", "titleText"], ["aria-hidden", "true", "download", "", 1, "ngx-gallery-icon", 3, "href"], [3, "closeClick", "icon", "disabled"], [1, "ngx-gallery-preview-img", "ngx-gallery-center", 3, "click", "mouseenter", "mouseleave", "mousedown", "touchstart", "src"], ["controls", "", 1, "ngx-gallery-preview-img", "ngx-gallery-center", 2, "width", "100%", "height", "100%", 3, "click", "mouseenter", "mouseleave", "mousedown", "touchstart"], [3, "src"], [3, "bulletChange", "count", "active"], [1, "ngx-gallery-preview-text", 3, "click", "innerHTML"]], 1364 template: function NgxGalleryPreviewComponent_Template(rf, ctx) { 1365 if (rf & 1) { 1366 \u0275\u0275template(0, NgxGalleryPreviewComponent_ngx_gallery_arrows_0_Template, 1, 4, "ngx-gallery-arrows", 1); 1367 \u0275\u0275elementStart(1, "div", 2)(2, "div", 3); 1368 \u0275\u0275template(3, NgxGalleryPreviewComponent_ngx_gallery_action_3_Template, 1, 3, "ngx-gallery-action", 4)(4, NgxGalleryPreviewComponent_a_4_Template, 2, 4, "a", 5)(5, NgxGalleryPreviewComponent_ngx_gallery_action_5_Template, 1, 2, "ngx-gallery-action", 6)(6, NgxGalleryPreviewComponent_ngx_gallery_action_6_Template, 1, 2, "ngx-gallery-action", 6)(7, NgxGalleryPreviewComponent_ngx_gallery_action_7_Template, 1, 1, "ngx-gallery-action", 7)(8, NgxGalleryPreviewComponent_ngx_gallery_action_8_Template, 1, 1, "ngx-gallery-action", 7)(9, NgxGalleryPreviewComponent_ngx_gallery_action_9_Template, 1, 1, "ngx-gallery-action", 7); 1369 \u0275\u0275elementStart(10, "ngx-gallery-action", 8); 1370 \u0275\u0275listener("closeClick", function NgxGalleryPreviewComponent_Template_ngx_gallery_action_closeClick_10_listener() { 1371 return ctx.close(); 1372 }); 1373 \u0275\u0275elementEnd()()(); 1374 \u0275\u0275elementStart(11, "div", 9); 1375 \u0275\u0275element(12, "i", 10); 1376 \u0275\u0275elementEnd(); 1377 \u0275\u0275elementStart(13, "div", 11); 1378 \u0275\u0275listener("click", function NgxGalleryPreviewComponent_Template_div_click_13_listener() { 1379 return ctx.closeOnClick && ctx.close(); 1380 })("mouseup", function NgxGalleryPreviewComponent_Template_div_mouseup_13_listener($event) { 1381 return ctx.mouseUpHandler($event); 1382 })("mousemove", function NgxGalleryPreviewComponent_Template_div_mousemove_13_listener($event) { 1383 return ctx.mouseMoveHandler($event); 1384 })("touchend", function NgxGalleryPreviewComponent_Template_div_touchend_13_listener($event) { 1385 return ctx.mouseUpHandler($event); 1386 })("touchmove", function NgxGalleryPreviewComponent_Template_div_touchmove_13_listener($event) { 1387 return ctx.mouseMoveHandler($event); 1388 }); 1389 \u0275\u0275elementStart(14, "div", 12); 1390 \u0275\u0275template(15, NgxGalleryPreviewComponent_img_15_Template, 2, 13, "img", 13)(16, NgxGalleryPreviewComponent_video_16_Template, 4, 13, "video", 14)(17, NgxGalleryPreviewComponent_ngx_gallery_bullets_17_Template, 1, 2, "ngx-gallery-bullets", 15); 1391 \u0275\u0275elementEnd(); 1392 \u0275\u0275template(18, NgxGalleryPreviewComponent_div_18_Template, 1, 1, "div", 16); 1393 \u0275\u0275elementEnd(); 1394 } 1395 if (rf & 2) { 1396 \u0275\u0275property("ngIf", ctx.arrows); 1397 \u0275\u0275advance(3); 1398 \u0275\u0275property("ngForOf", ctx.actions); 1399 \u0275\u0275advance(); 1400 \u0275\u0275property("ngIf", ctx.download && ctx.src); 1401 \u0275\u0275advance(); 1402 \u0275\u0275property("ngIf", ctx.zoom); 1403 \u0275\u0275advance(); 1404 \u0275\u0275property("ngIf", ctx.zoom); 1405 \u0275\u0275advance(); 1406 \u0275\u0275property("ngIf", ctx.rotate); 1407 \u0275\u0275advance(); 1408 \u0275\u0275property("ngIf", ctx.rotate); 1409 \u0275\u0275advance(); 1410 \u0275\u0275property("ngIf", ctx.fullscreen); 1411 \u0275\u0275advance(); 1412 \u0275\u0275property("icon", "ngx-gallery-close " + ctx.closeIcon); 1413 \u0275\u0275advance(); 1414 \u0275\u0275classProp("ngx-gallery-active", ctx.showSpinner); 1415 \u0275\u0275advance(); 1416 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-icon ngx-gallery-spinner ", ctx.spinnerIcon)); 1417 \u0275\u0275advance(3); 1418 \u0275\u0275property("ngIf", ctx.src && ctx.type === "image"); 1419 \u0275\u0275advance(); 1420 \u0275\u0275property("ngIf", ctx.src && ctx.type === "video"); 1421 \u0275\u0275advance(); 1422 \u0275\u0275property("ngIf", ctx.bullets); 1423 \u0275\u0275advance(); 1424 \u0275\u0275property("ngIf", ctx.showDescription && ctx.description); 1425 } 1426 }, 1427 dependencies: [NgxGalleryArrowsComponent, NgxGalleryActionComponent, NgxGalleryBulletsComponent, NgIf, NgForOf], 1428 styles: [".ngx-gallery-active[_nghost-%COMP%]{width:100%;height:100%;position:fixed;left:0;top:0;background:rgba(0,0,0,.7);z-index:10000;display:inline-block;font-size:50px!important}[_nghost-%COMP%]{display:none;font-size:50px!important}[_nghost-%COMP%] .ngx-gallery-arrow[_ngcontent-%COMP%]{font-size:50px!important}ngx-gallery-bullets[_ngcontent-%COMP%]{height:5%;align-items:center;padding:0}.ngx-gallery-preview-img[_ngcontent-%COMP%]{opacity:0;max-width:90%;max-height:90%;-webkit-user-select:none;user-select:none;transition:transform .5s}.ngx-gallery-preview-img.animation[_ngcontent-%COMP%]{transition:opacity .5s linear,transform .5s}.ngx-gallery-preview-img.ngx-gallery-active[_ngcontent-%COMP%]{opacity:1}.ngx-gallery-preview-img.ngx-gallery-grab[_ngcontent-%COMP%]{cursor:grab}.ngx-gallery-icon.ngx-gallery-spinner[_ngcontent-%COMP%]{font-size:50px;left:0;display:inline-block}[_nghost-%COMP%] .ngx-gallery-preview-top[_ngcontent-%COMP%]{position:absolute;width:100%;-webkit-user-select:none;user-select:none;font-size:25px}.ngx-gallery-preview-icons[_ngcontent-%COMP%]{float:right}.ngx-gallery-preview-icons[_ngcontent-%COMP%] .ngx-gallery-icon[_ngcontent-%COMP%]{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-preview-icons[_ngcontent-%COMP%] .ngx-gallery-icon.ngx-gallery-icon-disabled[_ngcontent-%COMP%]{cursor:default;opacity:.4}.ngx-spinner-wrapper[_ngcontent-%COMP%]{width:50px;height:50px;display:none}.ngx-spinner-wrapper.ngx-gallery-active[_ngcontent-%COMP%]{display:inline-block}.ngx-gallery-center[_ngcontent-%COMP%]{position:absolute;
1428left:0;right:0;bottom:0;margin:auto;top:0}.ngx-gallery-preview-text[_ngcontent-%COMP%]{width:100%;background:rgba(0,0,0,.7);padding:10px;text-align:center;color:#fff;font-size:16px;flex:0 1 auto;z-index:10}.ngx-gallery-preview-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column}.ngx-gallery-preview-img-wrapper[_ngcontent-%COMP%]{flex:1 1 auto;position:relative}"], 1429 changeDetection: 0 1430}); 1431(() => { 1432 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryPreviewComponent, [{ 1433 type: Component, 1434 args: [{ 1435 selector: "ngx-gallery-preview", 1436 changeDetection: ChangeDetectionStrategy.OnPush, 1437 template: `<ngx-gallery-arrows *ngIf="arrows" (prevClick)="showPrev()" (nextClick)="showNext()" [prevDisabled]="!canShowPrev()" 1438 [nextDisabled]="!canShowNext()" [arrowPrevIcon]="arrowPrevIcon" 1439 [arrowNextIcon]="arrowNextIcon"></ngx-gallery-arrows> 1440<div class="ngx-gallery-preview-top"> 1441 <div class="ngx-gallery-preview-icons"> 1442 <ngx-gallery-action *ngFor="let action of actions" [icon]="action.icon" [disabled]="action.disabled" 1443 [titleText]="action.titleText" (closeClick)="action.onClick($event, index)"></ngx-gallery-action> 1444 <a *ngIf="download && src" [href]="src" class="ngx-gallery-icon" aria-hidden="true" download> 1445 <i class="ngx-gallery-icon-content {{ downloadIcon }}"></i> 1446 </a> 1447 <ngx-gallery-action *ngIf="zoom" [icon]="zoomOutIcon" [disabled]="!canZoomOut()" 1448 (closeClick)="zoomOut()"></ngx-gallery-action> 1449 <ngx-gallery-action *ngIf="zoom" [icon]="zoomInIcon" [disabled]="!canZoomIn()" 1450 (closeClick)="zoomIn()"></ngx-gallery-action> 1451 <ngx-gallery-action *ngIf="rotate" [icon]="rotateLeftIcon" (closeClick)="rotateLeft()"></ngx-gallery-action> 1452 <ngx-gallery-action *ngIf="rotate" [icon]="rotateRightIcon" (closeClick)="rotateRight()"></ngx-gallery-action> 1453 <ngx-gallery-action *ngIf="fullscreen" [icon]="'ngx-gallery-fullscreen ' + fullscreenIcon" 1454 (closeClick)="manageFullscreen()"></ngx-gallery-action> 1455 <ngx-gallery-action [icon]="'ngx-gallery-close ' + closeIcon" (closeClick)="close()"></ngx-gallery-action> 1456 </div> 1457</div> 1458<div class="ngx-spinner-wrapper ngx-gallery-center" [class.ngx-gallery-active]="showSpinner"> 1459 <i class="ngx-gallery-icon ngx-gallery-spinner {{spinnerIcon}}" aria-hidden="true"></i> 1460</div> 1461<div class="ngx-gallery-preview-wrapper" (click)="closeOnClick && close()" (mouseup)="mouseUpHandler($event)" 1462 (mousemove)="mouseMoveHandler($event)" (touchend)="mouseUpHandler($event)" (touchmove)="mouseMoveHandler($event)"> 1463 <div class="ngx-gallery-preview-img-wrapper"> 1464 <img *ngIf="src && type === 'image'" #previewImage class="ngx-gallery-preview-img ngx-gallery-center" [src]="src" 1465 (click)="$event.stopPropagation()" (mouseenter)="imageMouseEnter()" (mouseleave)="imageMouseLeave()" 1466 (mousedown)="mouseDownHandler($event)" (touchstart)="mouseDownHandler($event)" 1467 [class.ngx-gallery-active]="!loading" [class.animation]="animation" [class.ngx-gallery-grab]="canDragOnZoom()" 1468 [style.transform]="getTransform()" [style.left]="positionLeft + 'px'" [style.top]="positionTop + 'px'"/> 1469 <video *ngIf="src && type === 'video'" #previewImage controls style="width: 100%; height: 100%;" 1470 class="ngx-gallery-preview-img ngx-gallery-center" 1471 (click)="$event.stopPropagation()" (mouseenter)="imageMouseEnter()" (mouseleave)="imageMouseLeave()" (mousedown)="mouseDownHandler($event)" (touchstart)="mouseDownHandler($event)" 1472 [class.ngx-gallery-active]="!loading" [class.animation]="animation" [class.ngx-gallery-grab]="canDragOnZoom()" [style.transform]="getTransform()" [style.left]="positionLeft + 'px'" [style.top]="positionTop + 'px'"> 1473 <source [src]="src"> 1474 Your browser does not support the video tag. 1475 </video> 1476 <ngx-gallery-bullets *ngIf="bullets" [count]="images.length" [active]="index" 1477 (bulletChange)="showAtIndex($event)"></ngx-gallery-bullets> 1478 </div> 1479 <div class="ngx-gallery-preview-text" *ngIf="showDescription && description" [innerHTML]="description" 1480 (click)="$event.stopPropagation()"></div> 1481</div> 1482`, 1483 styles: [":host.ngx-gallery-active{width:100%;height:100%;position:fixed;left:0;top:0;background:rgba(0,0,0,.7);z-index:10000;display:inline-block;font-size:50px!important}:host{display:none;font-size:50px!important}:host .ngx-gallery-arrow{font-size:50px!important}ngx-gallery-bullets{height:5%;align-items:center;padding:0}.ngx-gallery-preview-img{opacity:0;max-width:90%;max-height:90%;-webkit-user-select:none;user-select:none;transition:transform .5s}.ngx-gallery-preview-img.animation{transition:opacity .5s linear,transform .5s}.ngx-gallery-preview-img.ngx-gallery-active{opacity:1}.ngx-gallery-preview-img.ngx-gallery-grab{cursor:grab}.ngx-gallery-icon.ngx-gallery-spinner{font-size:50px;left:0;display:inline-block}:host .ngx-gallery-preview-top{position:absolute;width:100%;-webkit-user-select:none;user-select:none;font-size:25px}.ngx-gallery-preview-icons{float:right}.ngx-gallery-preview-icons .ngx-gallery-icon{position:relative;margin-right:10px;margin-top:10px;font-size:25px;cursor:pointer;text-decoration:none}.ngx-gallery-preview-icons .ngx-gallery-icon.ngx-gallery-icon-disabled{cursor:default;opacity:.4}.ngx-spinner-wrapper{width:50px;height:50px;display:none}.ngx-spinner-wrapper.ngx-gallery-active{display:inline-block}.ngx-gallery-center{position:absolute;
1483left:0;right:0;bottom:0;margin:auto;top:0}.ngx-gallery-preview-text{width:100%;background:rgba(0,0,0,.7);padding:10px;text-align:center;color:#fff;font-size:16px;flex:0 1 auto;z-index:10}.ngx-gallery-preview-wrapper{width:100%;height:100%;display:flex;flex-flow:column}.ngx-gallery-preview-img-wrapper{flex:1 1 auto;position:relative}\n"] 1484 }] 1485 }], function() { 1486 return [{ 1487 type: DomSanitizer 1488 }, { 1489 type: ElementRef 1490 }, { 1491 type: NgxGalleryService 1492 }, { 1493 type: Renderer2 1494 }, { 1495 type: ChangeDetectorRef 1496 }]; 1497 }, { 1498 images: [{ 1499 type: Input 1500 }], 1501 descriptions: [{ 1502 type: Input 1503 }], 1504 showDescription: [{ 1505 type: Input 1506 }], 1507 arrows: [{ 1508 type: Input 1509 }], 1510 arrowsAutoHide: [{ 1511 type: Input 1512 }], 1513 swipe: [{ 1514 type: Input 1515 }], 1516 fullscreen: [{ 1517 type: Input 1518 }], 1519 forceFullscreen: [{ 1520 type: Input 1521 }], 1522 closeOnClick: [{ 1523 type: Input 1524 }], 1525 closeOnEsc: [{ 1526 type: Input 1527 }], 1528 keyboardNavigation: [{ 1529 type: Input 1530 }], 1531 arrowPrevIcon: [{ 1532 type: Input 1533 }], 1534 arrowNextIcon: [{ 1535 type: Input 1536 }], 1537 closeIcon: [{ 1538 type: Input 1539 }], 1540 fullscreenIcon: [{ 1541 type: Input 1542 }], 1543 spinnerIcon: [{ 1544 type: Input 1545 }], 1546 autoPlay: [{ 1547 type: Input 1548 }], 1549 autoPlayInterval: [{ 1550 type: Input 1551 }], 1552 autoPlayPauseOnHover: [{ 1553 type: Input 1554 }], 1555 infinityMove: [{ 1556 type: Input 1557 }], 1558 zoom: [{ 1559 type: Input 1560 }], 1561 zoomStep: [{ 1562 type: Input 1563 }], 1564 zoomMax: [{ 1565 type: Input 1566 }], 1567 zoomMin: [{ 1568 type: Input 1569 }], 1570 zoomInIcon: [{ 1571 type: Input 1572 }], 1573 zoomOutIcon: [{ 1574 type: Input 1575 }], 1576 animation: [{ 1577 type: Input 1578 }], 1579 actions: [{ 1580 type: Input 1581 }], 1582 rotate: [{ 1583 type: Input 1584 }], 1585 rotateLeftIcon: [{ 1586 type: Input 1587 }], 1588 rotateRightIcon: [{ 1589 type: Input 1590 }], 1591 download: [{ 1592 type: Input 1593 }], 1594 downloadIcon: [{ 1595 type: Input 1596 }], 1597 bullets: [{ 1598 type: Input 1599 }], 1600 previewOpen: [{ 1601 type: Output 1602 }], 1603 previewClose: [{ 1604 type: Output 1605 }], 1606 activeChange: [{ 1607 type: Output 1608 }], 1609 previewImage: [{ 1610 type: ViewChild, 1611 args: ["previewImage"] 1612 }], 1613 onMouseEnter: [{ 1614 type: HostListener, 1615 args: ["mouseenter"] 1616 }], 1617 onMouseLeave: [{ 1618 type: HostListener, 1619 args: ["mouseleave"] 1620 }] 1621 }); 1622})(); 1623var NgxGalleryAnimation = class { 1624}; 1625NgxGalleryAnimation.Fade = "fade"; 1626NgxGalleryAnimation.Slide = "slide"; 1627NgxGalleryAnimation.Rotate = "rotate"; 1628NgxGalleryAnimation.Zoom = "zoom"; 1629var NgxGalleryImageComponent = class { 1630 constructor(sanitization, changeDetectorRef, elementRef, helperService) { 1631 this.sanitization = sanitization; 1632 this.changeDetectorRef = changeDetectorRef; 1633 this.elementRef = elementRef; 1634 this.helperService = helperService; 1635 this.imageClick = new EventEmitter(); 1636 this.activeChange = new EventEmitter(); 1637 this.animating = new EventEmitter(); 1638 this.canChangeImage = true; 1639 this.isAnimating = false; 1640 this.changeDetectorRef = changeDetectorRef; 1641 this.action = "none"; 1642 } 1643 set selectedIndex(index) { 1644 if (index > this._selectedIndex) { 1645 let action; 1646 if (this.animation === NgxGalleryAnimation.Slide) { 1647 action = "slideRight"; 1648 } else if (this.animation === NgxGalleryAnimation.Fade) { 1649 action = "fade"; 1650 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1651 action = "rotateRight"; 1652 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1653 action = "zoom"; 1654 } 1655 this.setAction(action); 1656 } else if (index < this._selectedIndex) { 1657 let action; 1658 if (this.animation === NgxGalleryAnimation.Slide) { 1659 action = "slideLeft"; 1660 } else if (this.animation === NgxGalleryAnimation.Fade) { 1661 action = "fade"; 1662 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1663 action = "rotateLeft"; 1664 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1665 action = "zoom"; 1666 } 1667 this.setAction(action); 1668 } 1669 this._selectedIndex = index; 1670 } 1671 // @HostBinding('style.display') public display = 'inline-block'; 1672 // @HostBinding('style.background-color') public color = 'lime'; 1673 ngOnInit() { 1674 if (this.arrows && this.arrowsAutoHide) { 1675 this.arrows = false;
1676 } 1677 if (this.autoPlay) { 1678 this.startAutoPlay(); 1679 } 1680 } 1681 ngOnChanges(changes) { 1682 if (changes["swipe"]) { 1683 this.helperService.manageSwipe(this.swipe, this.elementRef, "image", () => this.showNext(), () => this.showPrev()); 1684 } 1685 } 1686 onMouseEnter() { 1687 if (this.arrowsAutoHide && !this.arrows) { 1688 this.arrows = true; 1689 } 1690 if (this.autoPlay && this.autoPlayPauseOnHover) { 1691 this.stopAutoPlay(); 1692 } 1693 } 1694 onMouseLeave() { 1695 if (this.arrowsAutoHide && this.arrows) { 1696 this.arrows = false; 1697 } 1698 if (this.autoPlay && this.autoPlayPauseOnHover) { 1699 this.startAutoPlay(); 1700 } 1701 } 1702 reset(index) { 1703 this._selectedIndex = index; 1704 this.action = "none"; 1705 } 1706 getImages() { 1707 if (!this.images) { 1708 return []; 1709 } 1710 if (this.lazyLoading) { 1711 const indexes = [this._selectedIndex]; 1712 const prevIndex = this._selectedIndex - 1; 1713 if (prevIndex === -1 && this.infinityMove) { 1714 indexes.push(this.images.length - 1); 1715 } else if (prevIndex >= 0) { 1716 indexes.push(prevIndex); 1717 } 1718 const nextIndex = this._selectedIndex + 1; 1719 if (nextIndex === this.images.length && this.infinityMove) { 1720 indexes.push(0); 1721 } else if (nextIndex < this.images.length) { 1722 indexes.push(nextIndex); 1723 } 1724 return this.images.filter((img, i) => indexes.indexOf(i) !== -1); 1725 } else { 1726 return this.images; 1727 } 1728 } 1729 startAutoPlay() { 1730 this.stopAutoPlay(); 1731 this.timer = setInterval(() => { 1732 if (!this.showNext()) { 1733 this._selectedIndex = -1; 1734 this.showNext(); 1735 } 1736 }, this.autoPlayInterval); 1737 } 1738 stopAutoPlay() { 1739 if (this.timer) { 1740 clearInterval(this.timer); 1741 } 1742 } 1743 handleClick(event, index) { 1744 if (this.clickable) { 1745 this.imageClick.emit(index); 1746 event.stopPropagation(); 1747 event.preventDefault(); 1748 } 1749 } 1750 show(index) { 1751 if (this.isAnimating) { 1752 return; 1753 } 1754 if (index > this._selectedIndex) { 1755 let action; 1756 if (this.animation === NgxGalleryAnimation.Slide) { 1757 action = "slideRight"; 1758 } else if (this.animation === NgxGalleryAnimation.Fade) { 1759 action = "fade"; 1760 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1761 action = "rotateRight"; 1762 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1763 action = "zoom"; 1764 } 1765 this.setAction(action); 1766 } else { 1767 let action; 1768 if (this.animation === NgxGalleryAnimation.Slide) { 1769 action = "slideLeft"; 1770 } else if (this.animation === NgxGalleryAnimation.Fade) { 1771 action = "fade"; 1772 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1773 action = "rotateLeft"; 1774 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1775 action = "zoom"; 1776 } 1777 this.setAction(action); 1778 } 1779 this._selectedIndex = index; 1780 this.activeChange.emit(this._selectedIndex); 1781 this.setChangeTimeout(); 1782 } 1783 setAction(action) { 1784 this.action = action; 1785 this.changeDetectorRef.detectChanges(); 1786 } 1787 showNext() { 1788 if (this.isAnimating) { 1789 return false; 1790 } 1791 if (this.canShowNext() && this.canChangeImage) { 1792 let action; 1793 if (this.animation === NgxGalleryAnimation.Slide) { 1794 action = "slideRight"; 1795 } else if (this.animation === NgxGalleryAnimation.Fade) { 1796 action = "fade"; 1797 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1798 action = "rotateRight"; 1799 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1800 action = "zoom"; 1801 } 1802 this.setAction(action); 1803 this._selectedIndex++; 1804 if (this._selectedIndex === this.images.length) { 1805 this._selectedIndex = 0; 1806 } 1807 this.activeChange.emit(this._selectedIndex); 1808 this.setChangeTimeout(); 1809 return true; 1810 } else { 1811 return false; 1812 } 1813 } 1814 showPrev() { 1815 if (this.isAnimating) { 1816 return; 1817 } 1818 if (this.canShowPrev() && this.canChangeImage) { 1819 let action; 1820 if (this.animation === NgxGalleryAnimation.Slide) { 1821 action = "slideLeft"; 1822 } else if (this.animation === NgxGalleryAnimation.Fade) { 1823 action = "fade"; 1824 } else if (this.animation === NgxGalleryAnimation.Rotate) { 1825 action = "rotateLeft"; 1826 } else if (this.animation === NgxGalleryAnimation.Zoom) { 1827 action = "zoom"; 1828 } 1829 this.setAction(action); 1830 this._selectedIndex--; 1831 if (this._selectedIndex < 0) { 1832 this._selectedIndex = this.images.length - 1; 1833 } 1834 this.activeChange.emit(this._selectedIndex); 1835 this.setChangeTimeout(); 1836 } 1837 } 1838 setChangeTimeout() { 1839 this.canChangeImage = false;
1840 let timeout = 1e3; 1841 if (this.animation === NgxGalleryAnimation.Slide || this.animation === NgxGalleryAnimation.Fade) { 1842 timeout = 500; 1843 } 1844 setTimeout(() => { 1845 this.canChangeImage = true; 1846 }, timeout); 1847 } 1848 canShowNext() { 1849 if (this.images) { 1850 return this.infinityMove || this._selectedIndex < this.images.length - 1; 1851 } else { 1852 return false; 1853 } 1854 } 1855 canShowPrev() { 1856 if (this.images) { 1857 return this.infinityMove || this._selectedIndex > 0; 1858 } else { 1859 return false; 1860 } 1861 } 1862 getSafeUrl(image) { 1863 return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image.toString())); 1864 } 1865 getFileType(fileSource) { 1866 return this.helperService.getFileType(fileSource); 1867 } 1868 onStart(event) { 1869 this.isAnimating = true; 1870 this.animating.emit(true); 1871 } 1872 onDone(event) { 1873 this.isAnimating = false; 1874 this.animating.emit(false); 1875 } 1876}; 1877NgxGalleryImageComponent.\u0275fac = function NgxGalleryImageComponent_Factory(__ngFactoryType__) { 1878 return new (__ngFactoryType__ || NgxGalleryImageComponent)(\u0275\u0275directiveInject(DomSanitizer), \u0275\u0275directiveInject(ChangeDetectorRef), \u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(NgxGalleryService)); 1879}; 1880NgxGalleryImageComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 1881 type: NgxGalleryImageComponent, 1882 selectors: [["ngx-gallery-image"]], 1883 hostBindings: function NgxGalleryImageComponent_HostBindings(rf, ctx) { 1884 if (rf & 1) { 1885 \u0275\u0275listener("mouseenter", function NgxGalleryImageComponent_mouseenter_HostBindingHandler() { 1886 return ctx.onMouseEnter(); 1887 })("mouseleave", function NgxGalleryImageComponent_mouseleave_HostBindingHandler() { 1888 return ctx.onMouseLeave(); 1889 }); 1890 } 1891 }, 1892 inputs: { 1893 images: "images", 1894 clickable: "clickable", 1895 selectedIndex: "selectedIndex", 1896 arrows: "arrows", 1897 arrowsAutoHide: "arrowsAutoHide", 1898 swipe: "swipe", 1899 animation: "animation", 1900 size: "size", 1901 arrowPrevIcon: "arrowPrevIcon", 1902 arrowNextIcon: "arrowNextIcon", 1903 autoPlay: "autoPlay", 1904 autoPlayInterval: "autoPlayInterval", 1905 autoPlayPauseOnHover: "autoPlayPauseOnHover", 1906 infinityMove: "infinityMove", 1907 lazyLoading: "lazyLoading", 1908 actions: "actions", 1909 descriptions: "descriptions", 1910 showDescription: "showDescription", 1911 bullets: "bullets" 1912 }, 1913 outputs: { 1914 imageClick: "imageClick", 1915 activeChange: "activeChange", 1916 animating: "animating" 1917 }, 1918 standalone: false, 1919 features: [\u0275\u0275NgOnChangesFeature], 1920 decls: 4, 1921 vars: 7, 1922 consts: [[4, "ngFor", "ngForOf"], [3, "count", "active", "bulletChange", 4, "ngIf"], [3, "class", "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon", "prevClick", "nextClick", 4, "ngIf"], ["class", "ngx-gallery-image", 3, "ngClass", "background-image", "click", 4, "ngIf"], [1, "ngx-gallery-image", 3, "click", "ngClass"], [1, "ngx-gallery-icons-wrapper"], [3, "icon", "disabled", "titleText", "closeClick", 4, "ngFor", "ngForOf"], ["class", "ngx-gallery-image-text", 3, "innerHTML", "click", 4, "ngIf"], [3, "closeClick", "icon", "disabled", "titleText"], [1, "ngx-gallery-image-text", 3, "click", "innerHTML"], ["controls", "", 2, "width", "100%", "height", "100%", "background", "#000"], [3, "src"], [3, "bulletChange", "count", "active"], [3, "prevClick", "nextClick", "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"]], 1923 template: function NgxGalleryImageComponent_Template(rf, ctx) { 1924 if (rf & 1) { 1925 \u0275\u0275elementStart(0, "div"); 1926 \u0275\u0275template(1, NgxGalleryImageComponent_ng_container_1_Template, 3, 2, "ng-container", 0)(2, NgxGalleryImageComponent_ngx_gallery_bullets_2_Template, 1, 2, "ngx-gallery-bullets", 1)(3, NgxGalleryImageComponent_ngx_gallery_arrows_3_Template, 1, 7, "ngx-gallery-arrows", 2); 1927 \u0275\u0275elementEnd(); 1928 } 1929 if (rf & 2) { 1930 \u0275\u0275classMap(\u0275\u0275interpolate2("ngx-gallery-image-wrapper ngx-gallery-animation-", ctx.animation, " ngx-gallery-image-size-", ctx.size)); 1931 \u0275\u0275advance(); 1932 \u0275\u0275property("ngForOf", ctx.getImages()); 1933 \u0275\u0275advance(); 1934 \u0275\u0275property("ngIf", ctx.bullets); 1935 \u0275\u0275advance(); 1936 \u0275\u0275property("ngIf", ctx.arrows); 1937 } 1938 }, 1939 dependencies: [NgxGalleryActionComponent, NgxGalleryBulletsComponent, NgxGalleryArrowsComponent, NgForOf, NgIf, NgClass], 1940 styles: ["[_nghost-%COMP%]{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-image-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;
1940left:0;top:0;overflow:hidden}.ngx-gallery-image[_ngcontent-%COMP%]{background-position:center;background-repeat:no-repeat;height:100%;width:100%;position:absolute;top:0}.ngx-gallery-image-size-cover[_ngcontent-%COMP%] .ngx-gallery-image[_ngcontent-%COMP%]{background-size:cover}.ngx-gallery-image-size-contain[_ngcontent-%COMP%] .ngx-gallery-image[_ngcontent-%COMP%]{background-size:contain}.ngx-gallery-animation-fade[_ngcontent-%COMP%] .ngx-gallery-image[_ngcontent-%COMP%]{left:0;opacity:1;transition:.5s ease-in-out}.ngx-gallery-animation-fade[_ngcontent-%COMP%] .ngx-gallery-image.ngx-gallery-active[_ngcontent-%COMP%]{opacity:1}.ngx-gallery-animation-rotate[_ngcontent-%COMP%] .ngx-gallery-image[_ngcontent-%COMP%]{transition:1s ease;transform:scale(1) rotate(0);left:0;opacity:1}.ngx-gallery-animation-zoom[_ngcontent-%COMP%] .ngx-gallery-image[_ngcontent-%COMP%]{transition:1s ease;transform:scale(1);left:0;opacity:1}.ngx-gallery-image-text[_ngcontent-%COMP%]{width:100%;background:rgba(0,0,0,.7);padding:10px;text-align:center;color:#fff;font-size:16px;position:absolute;bottom:0;z-index:10}"], 1941 data: { 1942 animation: [trigger("animation", [ 1943 // ... 1944 state("slideRight", style({})), 1945 state("slideLeft", style({})), 1946 state("fade", style({})), 1947 state("rotateLeft", style({})), 1948 state("rotateRight", style({})), 1949 state("zoom", style({})), 1950 transition("slideRight => void", [animate("500ms ease-in-out", style({ 1951 transform: "translateX(-100%)" 1952 }))]), 1953 transition("void => slideRight", [style({ 1954 transform: "translateX(100%)" 1955 }), animate("500ms ease-in-out", style({ 1956 transform: "translateX(0)" 1957 }))]), 1958 transition("slideLeft => void", [animate("500ms ease-in-out", style({ 1959 transform: "translateX(100%)" 1960 }))]), 1961 transition("void => slideLeft", [style({ 1962 transform: "translateX(-100%)" 1963 }), animate("500ms ease-in-out", style({ 1964 transform: "translateX(0)" 1965 }))]), 1966 transition("fade => void", [animate("500ms ease-in-out", style({ 1967 opacity: "0" 1968 }))]), 1969 transition("void => fade", [style({ 1970 opacity: "0" 1971 }), animate("500ms ease-in-out", style({ 1972 opacity: "1" 1973 }))]), 1974 transition("rotateLeft => void", [animate("500ms ease-in-out", style({ 1975 transform: "scale(1, 1) rotate(-90deg)", 1976 opacity: "0" 1977 }))]), 1978 transition("void => rotateLeft", [style({ 1979 transform: "scale(1, 1) rotate(-90deg)", 1980 opacity: "0" 1981 }), animate("500ms ease-in-out", style({ 1982 transform: "scale(1, 1) rotate(0deg)", 1983 opacity: "1" 1984 }))]), 1985 transition("rotateRight => void", [animate("500ms ease-in-out", style({ 1986 transform: "scale(1, 1) rotate(90deg)", 1987 opacity: "0" 1988 }))]), 1989 transition("void => rotateRight", [style({ 1990 transform: "scale(1, 1) rotate(90deg)", 1991 opacity: "0" 1992 }), animate("500ms ease-in-out", style({ 1993 transform: "scale(1, 1) rotate(0deg)", 1994 opacity: "1" 1995 }))]), 1996 transition("zoom => void", [animate("500ms ease-in-out", style({ 1997 transform: "scale(2.5,2.5)", 1998 opacity: "0" 1999 }))]), 2000 transition("void => zoom", [style({ 2001 transform: "scale(2.5,2.5)", 2002 opacity: "0" 2003 }), animate("500ms ease-in-out", style({ 2004 transform: "scale(1, 1)", 2005 opacity: "1" 2006 }))]) 2007 ])] 2008 }, 2009 changeDetection: 0 2010}); 2011(() => { 2012 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryImageComponent, [{ 2013 type: Component, 2014 args: [{ 2015 selector: "ngx-gallery-image", 2016 changeDetection: ChangeDetectionStrategy.OnPush, 2017 animations: [trigger("animation", [ 2018 // ... 2019 state("slideRight", style({})), 2020 state("slideLeft", style({})), 2021 state("fade", style({})), 2022 state("rotateLeft", style({})), 2023 state("rotateRight", style({})), 2024 state("zoom", style({})), 2025 transition("slideRight => void", [animate("500ms ease-in-out", style({ 2026 transform: "translateX(-100%)" 2027 }))]), 2028 transition("void => slideRight", [style({ 2029 transform: "translateX(100%)" 2030 }), animate("500ms ease-in-out", style({ 2031 transform: "translateX(0)" 2032 }))]), 2033 transition("slideLeft => void", [animate("500ms ease-in-out", style({ 2034 transform: "translateX(100%)" 2035 }))]), 2036 transition("void => slideLeft", [style({ 2037 transform: "translateX(-100%)" 2038 }), animate("500ms ease-in-out", style({ 2039 transform: "translateX(0)" 2040 }))]), 2041 transition("fade => void", [animate("500ms ease-in-out", style({ 2042 opacity: "0" 2043 }))]), 2044 transition("void => fade", [style({ 2045 opacity: "0" 2046 }), animate("500ms ease-in-out", style({ 2047 opacity: "1" 2048 }))]), 2049 transition("rotateLeft => void", [animate("500ms ease-in-out", style({ 2050 transform: "scale(1, 1) rotate(-90deg)", 2051 opacity: "0" 2052 }))]), 2053 transition("void => rotateLeft", [style({ 2054 transform: "scale(1, 1) rotate(-90deg)", 2055 opacity: "0" 2056 }), animate("500ms ease-in-out", style({ 2057 transform: "scale(1, 1) rotate(0deg)", 2058 opacity: "1" 2059 }))]), 2060 transition("rotateRight => void", [animate("500ms ease-in-out", style({ 2061 transform: "scale(1, 1) rotate(90deg)", 2062 opacity: "0" 2063 }))]), 2064 transition("void => rotateRight", [style({ 2065 transform: "scale(1, 1) rotate(90deg)", 2066 opacity: "0" 2067 }), animate("500ms ease-in-out", style({ 2068 transform: "scale(1, 1) rotate(0deg)", 2069 opacity: "1" 2070 }))]), 2071 transition("zoom => void", [animate("500ms ease-in-out", style({ 2072 transform: "scale(2.5,2.5)", 2073 opacity: "0" 2074 }))]), 2075 transition("void => zoom", [style({ 2076 transform: "scale(2.5,2.5)", 2077 opacity: "0" 2078 }), animate("500ms ease-in-out", style({ 2079 transform: "scale(1, 1)", 2080 opacity: "1" 2081 }))]) 2082 ])], 2083 template: `<div class="ngx-gallery-image-wrapper ngx-gallery-animation-{{animation}} ngx-gallery-image-size-{{size}}"> 2084 <ng-container *ngFor="let image of getImages(); let i = index;"> 2085 2086 <div *ngIf="image.type === 'image' && image.index === _selectedIndex" class="ngx-gallery-image" 2087 [ngClass]="{'ngx-gallery-clickable': clickable }" 2088 [style.background-image]="getSafeUrl(image.src)" 2089 (click)="handleClick($event, image.index)" 2090 [@animation]="action" 2091 (@animation.start)="onStart($event)" 2092 (@animation.done)="onDone($event)"> 2093 <div class="ngx-gallery-icons-wrapper"> 2094 <ngx-gallery-action *ngFor="let action of actions" [icon]="action.icon" [disabled]="action.disabled" 2095 [titleText]="action.titleText" 2096 (closeClick)="action.onClick($event, image.index)"></ngx-gallery-action> 2097 </div> 2098 <div class="ngx-gallery-image-text" *ngIf="showDescription && descriptions[image.index]" 2099 [innerHTML]="descriptions[image.index]" (click)="$event.stopPropagation()"></div> 2100 </div> 2101 2102 <div *ngIf="image.type === 'video' && image.index === _selectedIndex" class="ngx-gallery-image" 2103 [ngClass]="{'ngx-gallery-clickable': clickable }" 2104 [style.background-image]="getSafeUrl(image.src)" 2105 (click)="handleClick($event, image.index)" 2106 [@animation]="action" 2107 (@animation.start)="onStart($event)" 2108 (@animation.done)="onDone($event)"> 2109 <video controls style="width:100%; height:100%; background: #000;"> 2110 <source [src]="image.src"> 2111 Your browser does not support the video tag. 2112 </video> 2113 <div class="ngx-gallery-icons-wrapper"> 2114 <ngx-gallery-action *ngFor="let action of actions" [icon]="action.icon" [disabled]="action.disabled" 2115 [titleText]="action.titleText" 2116 (closeClick)="action.onClick($event, image.index)"></ngx-gallery-action> 2117 </div> 2118 <div class="ngx-gallery-image-text" *ngIf="showDescription && descriptions[image.index]" 2119 [innerHTML]="descriptions[image.index]" (click)="$event.stopPropagation()"></div> 2120 </div> 2121 2122 2123 </ng-container> 2124 <ngx-gallery-bullets *ngIf="bullets" [count]="images.length" [active]="_selectedIndex" 2125 (bulletChange)="show($event)"></ngx-gallery-bullets> 2126 <ngx-gallery-arrows class="ngx-gallery-image-size-{{size}}" *ngIf="arrows" (prevClick)="showPrev()" 2127 (nextClick)="showNext()" [prevDisabled]="!canShowPrev()" [nextDisabled]="!canShowNext()" 2128 [arrowPrevIcon]="arrowPrevIcon" [arrowNextIcon]="arrowNextIcon"></ngx-gallery-arrows> 2129</div> 2130`, 2131 styles: [":host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-image-wrapper{width:100%;height:100%;position:absolute;
2131left:0;top:0;overflow:hidden}.ngx-gallery-image{background-position:center;background-repeat:no-repeat;height:100%;width:100%;position:absolute;top:0}.ngx-gallery-image-size-cover .ngx-gallery-image{background-size:cover}.ngx-gallery-image-size-contain .ngx-gallery-image{background-size:contain}.ngx-gallery-animation-fade .ngx-gallery-image{left:0;opacity:1;transition:.5s ease-in-out}.ngx-gallery-animation-fade .ngx-gallery-image.ngx-gallery-active{opacity:1}.ngx-gallery-animation-rotate .ngx-gallery-image{transition:1s ease;transform:scale(1) rotate(0);left:0;opacity:1}.ngx-gallery-animation-zoom .ngx-gallery-image{transition:1s ease;transform:scale(1);left:0;opacity:1}.ngx-gallery-image-text{width:100%;background:rgba(0,0,0,.7);padding:10px;text-align:center;color:#fff;font-size:16px;position:absolute;bottom:0;z-index:10}\n"] 2132 }] 2133 }], function() { 2134 return [{ 2135 type: DomSanitizer 2136 }, { 2137 type: ChangeDetectorRef 2138 }, { 2139 type: ElementRef 2140 }, { 2141 type: NgxGalleryService 2142 }]; 2143 }, { 2144 images: [{ 2145 type: Input 2146 }], 2147 clickable: [{ 2148 type: Input 2149 }], 2150 selectedIndex: [{ 2151 type: Input 2152 }], 2153 arrows: [{ 2154 type: Input 2155 }], 2156 arrowsAutoHide: [{ 2157 type: Input 2158 }], 2159 swipe: [{ 2160 type: Input 2161 }], 2162 animation: [{ 2163 type: Input 2164 }], 2165 size: [{ 2166 type: Input 2167 }], 2168 arrowPrevIcon: [{ 2169 type: Input 2170 }], 2171 arrowNextIcon: [{ 2172 type: Input 2173 }], 2174 autoPlay: [{ 2175 type: Input 2176 }], 2177 autoPlayInterval: [{ 2178 type: Input 2179 }], 2180 autoPlayPauseOnHover: [{ 2181 type: Input 2182 }], 2183 infinityMove: [{ 2184 type: Input 2185 }], 2186 lazyLoading: [{ 2187 type: Input 2188 }], 2189 actions: [{ 2190 type: Input 2191 }], 2192 descriptions: [{ 2193 type: Input 2194 }], 2195 showDescription: [{ 2196 type: Input 2197 }], 2198 bullets: [{ 2199 type: Input 2200 }], 2201 imageClick: [{ 2202 type: Output 2203 }], 2204 activeChange: [{ 2205 type: Output 2206 }], 2207 animating: [{ 2208 type: Output 2209 }], 2210 onMouseEnter: [{ 2211 type: HostListener, 2212 args: ["mouseenter"] 2213 }], 2214 onMouseLeave: [{ 2215 type: HostListener, 2216 args: ["mouseleave"] 2217 }] 2218 }); 2219})(); 2220var NgxGalleryOrder = class { 2221}; 2222NgxGalleryOrder.Column = 1; 2223NgxGalleryOrder.Row = 2; 2224NgxGalleryOrder.Page = 3; 2225var NgxGalleryThumbnailsComponent = class { 2226 constructor(sanitization, elementRef, helperService) { 2227 this.sanitization = sanitization; 2228 this.elementRef = elementRef; 2229 this.helperService = helperService; 2230 this.minStopIndex = 0; 2231 this.activeChange = new EventEmitter(); 2232 this.index = 0; 2233 } 2234 ngOnChanges(changes) { 2235 if (changes["selectedIndex"]) { 2236 this.validateIndex(); 2237 } 2238 if (changes["swipe"]) { 2239 this.helperService.manageSwipe(this.swipe, this.elementRef, "thumbnails", () => this.moveRight(), () => this.moveLeft()); 2240 } 2241 if (this.images) { 2242 this.remainingCountValue = this.images.length - this.rows * this.columns; 2243 } 2244 } 2245 onMouseEnter() { 2246 this.mouseenter = true; 2247 } 2248 onMouseLeave() { 2249 this.mouseenter = false; 2250 } 2251 reset(index) { 2252 this.selectedIndex = index; 2253 this.setDefaultPosition(); 2254 this.index = 0; 2255 this.validateIndex(); 2256 } 2257 getImages() { 2258 if (!this.images) { 2259 return []; 2260 } 2261 if (this.remainingCount) { 2262 return this.images.slice(0, this.rows * this.columns); 2263 } else if (this.lazyLoading && this.order !== NgxGalleryOrder.Row) { 2264 let stopIndex = 0; 2265 if (this.order === NgxGalleryOrder.Column) { 2266 stopIndex = (this.index + this.columns + this.moveSize) * this.rows; 2267 } else if (this.order === NgxGalleryOrder.Page) { 2268 stopIndex = this.index + this.columns * this.rows * 2; 2269 } 2270 if (stopIndex <= this.minStopIndex) { 2271 stopIndex = this.minStopIndex; 2272 } else { 2273 this.minStopIndex = stopIndex; 2274 } 2275 return this.images.slice(0, stopIndex); 2276 } else { 2277 return this.images; 2278 } 2279 } 2280 handleClick(event, index) { 2281 if (!this.hasLink(index) && !this.isAnimating) { 2282 this.selectedIndex = index; 2283 this.activeChange.emit(index); 2284 } 2285 event.stopPropagation(); 2286 event.preventDefault(); 2287 } 2288 hasLink(index) { 2289 return !!(this.links && this.links.length && this.links[index]); 2290 } 2291 moveRight() { 2292 if (this.canMoveRight()) { 2293 this.index += this.moveSize; 2294 const maxIndex = this.getMaxIndex() - this.columns; 2295 if (this.index > maxIndex) { 2296 this.index = maxIndex; 2297 } 2298 this.setThumbnailsPosition(); 2299 } 2300 } 2301 moveLeft() { 2302 if (this.canMoveLeft()) { 2303 this.index -= this.moveSize; 2304 if (this.index < 0) { 2305 this.index = 0; 2306 } 2307 this.setThumbnailsPosition(); 2308 } 2309 } 2310 canMoveRight() { 2311 return this.index + this.columns < this.getMaxIndex(); 2312 } 2313 canMoveLeft() { 2314 return this.index !== 0; 2315 } 2316 getThumbnailLeft(index) {
2317 let calculatedIndex; 2318 if (this.order === NgxGalleryOrder.Column) { 2319 calculatedIndex = Math.floor(index / this.rows); 2320 } else if (this.order === NgxGalleryOrder.Page) { 2321 calculatedIndex = index % this.columns + Math.floor(index / (this.rows * this.columns)) * this.columns; 2322 } else if (this.order === NgxGalleryOrder.Row && this.remainingCount) { 2323 calculatedIndex = index % this.columns; 2324 } else { 2325 calculatedIndex = index % Math.ceil(this.images.length / this.rows); 2326 } 2327 return this.getThumbnailPosition(calculatedIndex, this.columns); 2328 } 2329 getThumbnailTop(index) { 2330 let calculatedIndex; 2331 if (this.order === NgxGalleryOrder.Column) { 2332 calculatedIndex = index % this.rows; 2333 } else if (this.order === NgxGalleryOrder.Page) { 2334 calculatedIndex = Math.floor(index / this.columns) - Math.floor(index / (this.rows * this.columns)) * this.rows; 2335 } else if (this.order === NgxGalleryOrder.Row && this.remainingCount) { 2336 calculatedIndex = Math.floor(index / this.columns); 2337 } else { 2338 calculatedIndex = Math.floor(index / Math.ceil(this.images.length / this.rows)); 2339 } 2340 return this.getThumbnailPosition(calculatedIndex, this.rows); 2341 } 2342 getThumbnailWidth() { 2343 return this.getThumbnailDimension(this.columns); 2344 } 2345 getThumbnailHeight() { 2346 return this.getThumbnailDimension(this.rows); 2347 } 2348 setThumbnailsPosition() { 2349 this.thumbnailsLeft = -(100 / this.columns * this.index) + "%"; 2350 this.thumbnailsMarginLeft = -((this.margin - (this.columns - 1) * this.margin / this.columns) * this.index) + "px"; 2351 } 2352 setDefaultPosition() { 2353 this.thumbnailsLeft = "0px"; 2354 this.thumbnailsMarginLeft = "0px"; 2355 } 2356 canShowArrows() { 2357 if (this.remainingCount) { 2358 return false; 2359 } else { 2360 return this.arrows && this.images && this.images.length > this.getVisibleCount() && (!this.arrowsAutoHide || this.mouseenter); 2361 } 2362 } 2363 validateIndex() { 2364 if (this.images) { 2365 let newIndex; 2366 if (this.order === NgxGalleryOrder.Column) { 2367 newIndex = Math.floor(this.selectedIndex / this.rows); 2368 } else {
2369 newIndex = this.selectedIndex % Math.ceil(this.images.length / this.rows); 2370 } 2371 if (this.remainingCount) { 2372 newIndex = 0; 2373 } 2374 if (newIndex < this.index || newIndex >= this.index + this.columns) { 2375 const maxIndex = this.getMaxIndex() - this.columns; 2376 this.index = newIndex > maxIndex ? maxIndex : newIndex; 2377 this.setThumbnailsPosition(); 2378 } 2379 } 2380 } 2381 getSafeUrl(image) { 2382 return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image.toString())); 2383 } 2384 getFileType(fileSource) { 2385 return this.helperService.getFileType(fileSource.toString()); 2386 } 2387 getThumbnailPosition(index, count) { 2388 return this.getSafeStyle("calc(" + 100 / count * index + "% + " + (this.margin - (count - 1) * this.margin / count) * index + "px)"); 2389 } 2390 getThumbnailDimension(count) { 2391 if (this.margin !== 0) { 2392 return this.getSafeStyle("calc(" + 100 / count + "% - " + (count - 1) * this.margin / count + "px)"); 2393 } else { 2394 return this.getSafeStyle("calc(" + 100 / count + "% + 1px)"); 2395 } 2396 } 2397 getMaxIndex() { 2398 if (this.order === NgxGalleryOrder.Page) { 2399 let maxIndex = Math.floor(this.images.length / this.getVisibleCount()) * this.columns; 2400 if (this.images.length % this.getVisibleCount() > this.columns) { 2401 maxIndex += this.columns; 2402 } else { 2403 maxIndex += this.images.length % this.getVisibleCount(); 2404 } 2405 return maxIndex; 2406 } else { 2407 return Math.ceil(this.images.length / this.rows); 2408 } 2409 } 2410 getVisibleCount() { 2411 return this.columns * this.rows; 2412 } 2413 getSafeStyle(value) { 2414 return this.sanitization.bypassSecurityTrustStyle(value); 2415 } 2416}; 2417NgxGalleryThumbnailsComponent.\u0275fac = function NgxGalleryThumbnailsComponent_Factory(__ngFactoryType__) { 2418 return new (__ngFactoryType__ || NgxGalleryThumbnailsComponent)(\u0275\u0275directiveInject(DomSanitizer), \u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(NgxGalleryService)); 2419}; 2420NgxGalleryThumbnailsComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 2421 type: NgxGalleryThumbnailsComponent, 2422 selectors: [["ngx-gallery-thumbnails"]], 2423 hostBindings: function NgxGalleryThumbnailsComponent_HostBindings(rf, ctx) { 2424 if (rf & 1) { 2425 \u0275\u0275listener("mouseenter", function NgxGalleryThumbnailsComponent_mouseenter_HostBindingHandler() { 2426 return ctx.onMouseEnter(); 2427 })("mouseleave", function NgxGalleryThumbnailsComponent_mouseleave_HostBindingHandler() { 2428 return ctx.onMouseLeave(); 2429 }); 2430 } 2431 }, 2432 inputs: { 2433 images: "images", 2434 isAnimating: "isAnimating", 2435 links: "links", 2436 labels: "labels", 2437 linkTarget: "linkTarget", 2438 columns: "columns", 2439 rows: "rows", 2440 arrows: "arrows", 2441 arrowsAutoHide: "arrowsAutoHide", 2442 margin: "margin", 2443 selectedIndex: "selectedIndex", 2444 clickable: "clickable", 2445 swipe: "swipe", 2446 size: "size", 2447 arrowPrevIcon: "arrowPrevIcon", 2448 arrowNextIcon: "arrowNextIcon", 2449 moveSize: "moveSize", 2450 order: "order", 2451 remainingCount: "remainingCount", 2452 lazyLoading: "lazyLoading", 2453 actions: "actions" 2454 }, 2455 outputs: { 2456 activeChange: "activeChange" 2457 }, 2458 standalone: false, 2459 features: [\u0275\u0275NgOnChangesFeature], 2460 decls: 4, 2461 vars: 9, 2462 consts: [[1, "ngx-gallery-thumbnails"], ["class", "ngx-gallery-thumbnail", 3, "href", "target", "width", "height", "left", "top", "ngClass", "click", 4, "ngFor", "ngForOf"], [3, "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon", "prevClick", "nextClick", 4, "ngIf"], [1, "ngx-gallery-thumbnail", 3, "click", "href", "target", "ngClass"], ["class", "ngx-gallery-thumbnail", "style", "width: 100%; height: 100%; position:absolute;", 3, "background-image", "ngClass", 4, "ngIf"], ["class", "ngx-gallery-thumbnail-video", 4, "ngIf"], [1, "ngx-gallery-icons-wrapper"], [3, "icon", "disabled", "titleText", "closeClick", 4, "ngFor", "ngForOf"], ["class", "ngx-gallery-remaining-count-overlay", 4, "ngIf"], [1, "ngx-gallery-thumbnail", 2, "width", "100%", "height", "100%", "position", "absolute", 3, "ngClass"], [1, "ngx-gallery-thumbn
2462ail-video"], [1, "ngx-gallery-thumbnail", 2, "width", "100%", "height", "100%", "position", "absolute", "left", "0", "background", "#000", 3, "ngClass"], [3, "src"], [3, "closeClick", "icon", "disabled", "titleText"], [1, "ngx-gallery-remaining-count-overlay"], [1, "ngx-gallery-remaining-count"], [3, "prevClick", "nextClick", "prevDisabled", "nextDisabled", "arrowPrevIcon", "arrowNextIcon"]], 2463 template: function NgxGalleryThumbnailsComponent_Template(rf, ctx) { 2464 if (rf & 1) { 2465 \u0275\u0275elementStart(0, "div")(1, "div", 0); 2466 \u0275\u0275template(2, NgxGalleryThumbnailsComponent_a_2_Template, 6, 19, "a", 1); 2467 \u0275\u0275elementEnd()(); 2468 \u0275\u0275template(3, NgxGalleryThumbnailsComponent_ngx_gallery_arrows_3_Template, 1, 4, "ngx-gallery-arrows", 2); 2469 } 2470 if (rf & 2) { 2471 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-thumbnails-wrapper ngx-gallery-thumbnail-size-", ctx.size)); 2472 \u0275\u0275advance(); 2473 \u0275\u0275styleProp("transform", "translateX(" + ctx.thumbnailsLeft + ")")("margin-left", ctx.thumbnailsMarginLeft); 2474 \u0275\u0275advance(); 2475 \u0275\u0275property("ngForOf", ctx.getImages()); 2476 \u0275\u0275advance(); 2477 \u0275\u0275property("ngIf", ctx.canShowArrows()); 2478 } 2479 }, 2480 dependencies: [NgxGalleryActionComponent, NgxGalleryArrowsComponent, NgForOf, NgClass, NgIf], 2481 styles: ['@charset "UTF-8";[_nghost-%COMP%]{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-thumbnails-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;overflow:hidden}.ngx-gallery-thumbnails[_ngcontent-%COMP%]{height:100%;width:100%;position:absolute;left:0;transform:translate(0);transition:transform .5s ease-in-out;will-change:transform}.ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail[_ngcontent-%COMP%]{position:absolute;height:100%;background-position:center;background-repeat:no-repeat;text-decoration:none;border:1px double black}.ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail[_ngcontent-%COMP%] .ngx-gallery-thumbnail-video[_ngcontent-%COMP%]:after{content:"\\f144";display:block;position:absolute;background:#0000;height:100%;width:100%;left:0;top:calc(50% - 20px);font-size:40px;color:#fff;margin:0;padding:0;font-family:fontawesome;text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}.ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail[_ngcontent-%COMP%] .img[_ngcontent-%COMP%]{background-size:cover;height:100%}.ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail.ngx-gallery-active[_ngcontent-%COMP%]{border:1px double #cc4548}.ngx-gallery-thumbnail-size-cover[_ngcontent-%COMP%] .ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail[_ngcontent-%COMP%]{background-size:cover}.ngx-gallery-thumbnail-size-contain[_ngcontent-%COMP%] .ngx-gallery-thumbnails[_ngcontent-%COMP%] .ngx-gallery-thumbnail[_ngcontent-%COMP%]{background-size:contain}.ngx-gallery-remaining-count-overlay[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#0006}.ngx-gallery-remaining-count[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:30px}'], 2482 changeDetection: 0 2483}); 2484(() => { 2485 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryThumbnailsComponent, [{ 2486 type: Component, 2487 args: [{ 2488 selector: "ngx-gallery-thumbnails", 2489 changeDetection: ChangeDetectionStrategy.OnPush, 2490 template: `<div class="ngx-gallery-thumbnails-wrapper ngx-gallery-thumbnail-size-{{size}}"> 2491 <div class="ngx-gallery-thumbnails" [style.transform]="'translateX(' + thumbnailsLeft + ')'" 2492 [style.marginLeft]="thumbnailsMarginLeft"> 2493 <a [href]="hasLink(i) ? links[i] : '#'" [target]="linkTarget" class="ngx-gallery-thumbnail" 2494 *ngFor="let image of getImages(); let i = index;" 2495 (click)="handleClick($event, i)" [style.width]="getThumbnailWidth()" [style.height]="getThumbnailHeight()" 2496 [style.left]="getThumbnailLeft(i)" [style.top]="getThumbnailTop(i)" 2497 [ngClass]="{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }" 2498 [attr.aria-label]="labels[i]">
2499 <div *ngIf="getFileType(image) === 'image'" [style.background-image]="getSafeUrl(image)" class="ngx-gallery-thumbnail" 2500 [ngClass]="{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }" 2501 style="width: 100%; height: 100%; position:absolute;"></div> 2502 <div *ngIf="getFileType(image) === 'video'" class="ngx-gallery-thumbnail-video"> 2503 <video class="ngx-gallery-thumbnail" [ngClass]="{ 'ngx-gallery-active': i === selectedIndex, 'ngx-gallery-clickable': clickable }" 2504 style="width: 100%; height: 100%; position:absolute; left:0; background:#000;"> 2505 <source [src]="image"> 2506 Your browser does not support the video tag. 2507 </video> 2508 </div> 2509 <div class="ngx-gallery-icons-wrapper"> 2510 <ngx-gallery-action *ngFor="let action of actions" [icon]="action.icon" [disabled]="action.disabled" 2511 [titleText]="action.titleText" (closeClick)="action.onClick($event, i)"></ngx-gallery-action> 2512 </div> 2513 <div class="ngx-gallery-remaining-count-overlay" 2514 *ngIf="remainingCount && remainingCountValue && (i === (rows * columns) - 1)"> 2515 <span class="ngx-gallery-remaining-count">+{{remainingCountValue}}</span> 2516 </div> 2517 </a> 2518 </div> 2519</div> 2520<ngx-gallery-arrows *ngIf="canShowArrows()" (prevClick)="moveLeft()" (nextClick)="moveRight()" 2521 [prevDisabled]="!canMoveLeft()" [nextDisabled]="!canMoveRight()" [arrowPrevIcon]="arrowPrevIcon" 2522 [arrowNextIcon]="arrowNextIcon"></ngx-gallery-arrows> 2523`, 2524 styles: ['@charset "UTF-8";:host{width:100%;display:inline-block;position:relative;font-size:25px}.ngx-gallery-thumbnails-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.ngx-gallery-thumbnails{height:100%;width:100%;position:absolute;left:0;transform:translate(0);transition:transform .5s ease-in-out;will-change:transform}.ngx-gallery-thumbnails .ngx-gallery-thumbnail{position:absolute;height:100%;background-position:center;background-repeat:no-repeat;text-decoration:none;border:1px double black}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .ngx-gallery-thumbnail-video:after{content:"\\f144";display:block;position:absolute;background:#0000;height:100%;width:100%;left:0;top:calc(50% - 20px);font-size:40px;color:#fff;margin:0;padding:0;font-family:fontawesome;text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}.ngx-gallery-thumbnails .ngx-gallery-thumbnail .img{background-size:cover;height:100%}.ngx-gallery-thumbnails .ngx-gallery-thumbnail.ngx-gallery-active{border:1px double #cc4548}.ngx-gallery-thumbnail-size-cover .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:cover}.ngx-gallery-thumbnail-size-contain .ngx-gallery-thumbnails .ngx-gallery-thumbnail{background-size:contain}.ngx-gallery-remaining-count-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#0006}.ngx-gallery-remaining-count{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:30px}\n'] 2525 }] 2526 }], function() { 2527 return [{ 2528 type: DomSanitizer 2529 }, { 2530 type: ElementRef 2531 }, { 2532 type: NgxGalleryService 2533 }]; 2534 }, { 2535 images: [{ 2536 type: Input 2537 }], 2538 isAnimating: [{ 2539 type: Input 2540 }], 2541 links: [{ 2542 type: Input 2543 }], 2544 labels: [{ 2545 type: Input 2546 }], 2547 linkTarget: [{ 2548 type: Input 2549 }], 2550 columns: [{ 2551 type: Input 2552 }], 2553 rows: [{ 2554 type: Input 2555 }], 2556 arrows: [{ 2557 type: Input 2558 }], 2559 arrowsAutoHide: [{ 2560 type: Input 2561 }], 2562 margin: [{ 2563 type: Input 2564 }], 2565 selectedIndex: [{ 2566 type: Input 2567 }], 2568 clickable: [{ 2569 type: Input 2570 }], 2571 swipe: [{ 2572 type: Input 2573 }], 2574 size: [{ 2575 type: Input 2576 }], 2577 arrowPrevIcon: [{ 2578 type: Input 2579 }], 2580 arrowNextIcon: [{ 2581 type: Input 2582 }], 2583 moveSize: [{ 2584 type: Input 2585 }], 2586 order: [{ 2587 type: Input 2588 }], 2589 remainingCount: [{ 2590 type: Input 2591 }], 2592 lazyLoading: [{ 2593 type: Input 2594 }], 2595 actions: [{ 2596 type: Input 2597 }], 2598 activeChange: [{ 2599 type: Output 2600 }], 2601 onMouseEnter: [{ 2602 type: HostListener, 2603 args: ["mouseenter"] 2604 }], 2605 onMouseLeave: [{ 2606 type: HostListener, 2607 args: ["mouseleave"] 2608 }] 2609 }); 2610})(); 2611var NgxGalleryAction = class { 2612 constructor(action) { 2613 this.icon = action.icon; 2614 this.disabled = action.disabled ? action.disabled : false;
2615 this.titleText = action.titleText ? action.titleText : ""; 2616 this.onClick = action.onClick; 2617 } 2618}; 2619var NgxGalleryLayout = class { 2620}; 2621NgxGalleryLayout.ThumbnailsTop = "thumbnails-top"; 2622NgxGalleryLayout.ThumbnailsBottom = "thumbnails-bottom"; 2623var NgxGalleryImageSize = class { 2624}; 2625NgxGalleryImageSize.Cover = "cover"; 2626NgxGalleryImageSize.Contain = "contain"; 2627var NgxGalleryOptions = class { 2628 constructor(obj) { 2629 const preventDefaults = obj.breakpoint === void 0 ? false : true; 2630 function use(source, defaultValue) { 2631 return obj && (source !== void 0 || preventDefaults) ? source : defaultValue; 2632 } 2633 this.breakpoint = use(obj.breakpoint, void 0); 2634 this.width = use(obj.width, "500px"); 2635 this.height = use(obj.height, "400px"); 2636 this.fullWidth = use(obj.fullWidth, false); 2637 this.layout = use(obj.layout, NgxGalleryLayout.ThumbnailsBottom); 2638 this.startIndex = use(obj.startIndex, 0); 2639 this.linkTarget = use(obj.linkTarget, "_blank"); 2640 this.lazyLoading = use(obj.lazyLoading, true); 2641 this.image = use(obj.image, true); 2642 this.imagePercent = use(obj.imagePercent, 75); 2643 this.imageArrows = use(obj.imageArrows, true); 2644 this.imageArrowsAutoHide = use(obj.imageArrowsAutoHide, false); 2645 this.imageSwipe = use(obj.imageSwipe, false); 2646 this.imageAnimation = use(obj.imageAnimation, NgxGalleryAnimation.Fade); 2647 this.imageSize = use(obj.imageSize, NgxGalleryImageSize.Cover); 2648 this.imageAutoPlay = use(obj.imageAutoPlay, false); 2649 this.imageAutoPlayInterval = use(obj.imageAutoPlayInterval, 2e3); 2650 this.imageAutoPlayPauseOnHover = use(obj.imageAutoPlayPauseOnHover, false); 2651 this.imageInfinityMove = use(obj.imageInfinityMove, false); 2652 if (obj && obj.imageActions && obj.imageActions.length) { 2653 obj.imageActions = obj.imageActions.map((action) => new NgxGalleryAction(action)); 2654 } 2655 this.imageActions = use(obj.imageActions, []); 2656 this.imageDescription = use(obj.imageDescription, false); 2657 this.imageBullets = use(obj.imageBullets, false); 2658 this.thumbnails = use(obj.thumbnails, true); 2659 this.thumbnailsColumns = use(obj.thumbnailsColumns, 4); 2660 this.thumbnailsRows = use(obj.thumbnailsRows, 1); 2661 this.thumbnailsPercent = use(obj.thumbnailsPercent, 25); 2662 this.thumbnailsMargin = use(obj.thumbnailsMargin, 10); 2663 this.thumbnailsArrows = use(obj.thumbnailsArrows, true); 2664 this.thumbnailsArrowsAutoHide = use(obj.thumbnailsArrowsAutoHide, false); 2665 this.thumbnailsSwipe = use(obj.thumbnailsSwipe, false); 2666 this.thumbnailsMoveSize = use(obj.thumbnailsMoveSize, 1); 2667 this.thumbnailsOrder = use(obj.thumbnailsOrder, NgxGalleryOrder.Column); 2668 this.thumbnailsRemainingCount = use(obj.thumbnailsRemainingCount, false); 2669 this.thumbnailsAsLinks = use(obj.thumbnailsAsLinks, false); 2670 this.thumbnailsAutoHide = use(obj.thumbnailsAutoHide, false); 2671 this.thumbnailMargin = use(obj.thumbnailMargin, 10); 2672 this.thumbnailSize = use(obj.thumbnailSize, NgxGalleryImageSize.Cover); 2673 if (obj && obj.thumbnailActions && obj.thumbnailActions.length) { 2674 obj.thumbnailActions = obj.thumbnailActions.map((action) => new NgxGalleryAction(action)); 2675 } 2676 this.thumbnailActions = use(obj.thumbnailActions, []); 2677 this.thumbnailClasses = use(obj.thumbnailClasses, []); 2678 this.preview = use(obj.preview, true); 2679 this.previewDescription = use(obj.previewDescription, true); 2680 this.previewArrows = use(obj.previewArrows, true); 2681 this.previewArrowsAutoHide = use(obj.previewArrowsAutoHide, false); 2682 this.previewSwipe = use(obj.previewSwipe, false); 2683 this.previewFullscreen = use(obj.previewFullscreen, false); 2684 this.previewForceFullscreen = use(obj.previewForceFullscreen, false); 2685 this.previewCloseOnClick = use(obj.previewCloseOnClick, false); 2686 this.previewCloseOnEsc = use(obj.previewCloseOnEsc, false); 2687 this.previewKeyboardNavigation = use(obj.previewKeyboardNavigation, false); 2688 this.previewAnimation = use(obj.previewAnimation, true); 2689 this.previewAutoPlay = use(obj.previewAutoPlay, false); 2690 this.previewAutoPlayInterval = use(obj.previewAutoPlayInterval, 2e3); 2691 this.previewAutoPlayPauseOnHover = use(obj.previewAutoPlayPauseOnHover, false); 2692 this.previewInfinityMove = use(obj.previewInfinityMove, false); 2693 this.previewZoom = use(obj.previewZoom, false); 2694 this.previewZoomStep = use(obj.previewZoomStep, 0.1); 2695 this.previewZoomMax = use(obj.previewZoomMax, 2); 2696 this.previewZoomMin = use(obj.previewZoomMin, 0.5); 2697 this.previewRotate = use(obj.previewRotate, false); 2698 this.previewDownload = use(obj.previewDownload, false); 2699 this.previewCustom = use(obj.previewCustom, void 0); 2700 this.previewBullets = use(obj.previewBullets, false); 2701 this.arrowPrevIcon = use(obj.arrowPrevIcon, "fa fa-arrow-circle-left"); 2702 this.arrowNextIcon = use(obj.arrowNextIcon, "fa fa-arrow-circle-right"); 2703 this.closeIcon = use(obj.closeIcon, "fa fa-times-circle"); 2704 this.fullscreenIcon = use(obj.fullscreenIcon, "fa fa-arrows-alt"); 2705 this.spinnerIcon = use(obj.spinnerIcon, "fa fa-spinner fa-pulse fa-3x fa-fw"); 2706 this.zoomInIcon = use(obj.zoomInIcon, "fa fa-search-plus"); 2707 this.zoomOutIcon = use(obj.zoomOutIcon, "fa fa-search-minus"); 2708 this.rotateLeftIcon = use(obj.rotateLeftIcon, "fa fa-undo"); 2709 this.rotateRightIcon = use(obj.rotateRightIcon, "fa fa-repeat"); 2710 this.downloadIcon = use(obj.downloadIcon, "fa fa-arrow-circle-down"); 2711 if (obj && obj.actions && obj.actions.length) { 2712 obj.actions = obj.actions.map((action) => new NgxGalleryAction(action)); 2713 } 2714 this.actions = use(obj.actions, []); 2715 } 2716}; 2717var NgxGalleryOrderedImage = class { 2718 constructor(obj) { 2719 this.src = obj.src; 2720 this.type = obj.type; 2721 this.index = obj.index; 2722 } 2723}; 2724var NgxGalleryComponent = class { 2725 constructor(myElement, helperService) { 2726 this.myElement = myElement; 2727 this.helperService = helperService; 2728 this.options = [{}]; 2729 this.imagesReady = new EventEmitter(); 2730 this.change = new EventEmitter(); 2731 this.previewOpen = new EventEmitter(); 2732 this.previewClose = new EventEmitter(); 2733 this.previewChange = new EventEmitter(); 2734 this.oldImagesLength = 0; 2735 this.selectedIndex = 0; 2736 this.breakpoint = void 0; 2737 this.prevBreakpoint = void 0; 2738 } 2739 ngOnInit() { 2740 this.options = this.options.map((opt) => new NgxGalleryOptions(opt)); 2741 this.sortOptions(); 2742 this.setBreakpoint(); 2743 this.setOptions(); 2744 this.checkFullWidth(); 2745 if (this.currentOptions) { 2746 this.selectedIndex = this.currentOptions.startIndex; 2747 } 2748 } 2749 ngDoCheck() { 2750 if (this.images !== void 0 && this.images.length !== this.oldImagesLength || this.images !== this.oldImages) { 2751 this.oldImagesLength = this.images.length; 2752 this.oldImages = this.images; 2753 this.setOptions(); 2754 this.setImages(); 2755 if (this.images && this.images.length) { 2756 this.imagesReady.emit(); 2757 } 2758 if (this.image) { 2759 this.image.reset(this.currentOptions.startIndex); 2760 } 2761 if (this.currentOptions.thumbnailsAutoHide && this.currentOptions.thumbnails && this.images.length <= 1) { 2762 this.currentOptions.thumbnails = false;
2763 this.currentOptions.imageArrows = false; 2764 } 2765 this.resetThumbnails(); 2766 } 2767 } 2768 ngAfterViewInit() { 2769 this.checkFullWidth(); 2770 } 2771 onResize() { 2772 this.setBreakpoint(); 2773 if (this.prevBreakpoint !== this.breakpoint) { 2774 this.setOptions(); 2775 this.resetThumbnails(); 2776 } 2777 if (this.currentOptions && this.currentOptions.fullWidth) { 2778 if (this.fullWidthTimeout) { 2779 clearTimeout(this.fullWidthTimeout); 2780 } 2781 this.fullWidthTimeout = setTimeout(() => { 2782 this.checkFullWidth(); 2783 }, 200); 2784 } 2785 } 2786 getImageHeight() { 2787 return this.currentOptions && this.currentOptions.thumbnails ? this.currentOptions.imagePercent + "%" : "100%"; 2788 } 2789 getThumbnailsHeight() { 2790 if (this.currentOptions && this.currentOptions.image) { 2791 return "calc(" + this.currentOptions.thumbnailsPercent + "% - " + this.currentOptions.thumbnailsMargin + "px)"; 2792 } else { 2793 return "100%"; 2794 } 2795 } 2796 getThumbnailsMarginTop() { 2797 if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsBottom) { 2798 return this.currentOptions.thumbnailsMargin + "px"; 2799 } else { 2800 return "0px"; 2801 } 2802 } 2803 getThumbnailsMarginBottom() { 2804 if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsTop) { 2805 return this.currentOptions.thumbnailsMargin + "px"; 2806 } else { 2807 return "0px"; 2808 } 2809 } 2810 openPreview(index) { 2811 if (this.currentOptions.previewCustom) { 2812 this.currentOptions.previewCustom(index); 2813 } else { 2814 this.previewEnabled = true; 2815 this.preview.open(index); 2816 } 2817 } 2818 onPreviewOpen() { 2819 this.previewOpen.emit(); 2820 if (this.image && this.image.autoPlay) { 2821 this.image.stopAutoPlay(); 2822 } 2823 } 2824 onPreviewClose() { 2825 this.previewEnabled = false; 2826 this.previewClose.emit(); 2827 if (this.image && this.image.autoPlay) { 2828 this.image.startAutoPlay(); 2829 } 2830 } 2831 selectFromImage(index) { 2832 this.select(index); 2833 } 2834 selectFromThumbnails(index) { 2835 this.select(index); 2836 if (this.currentOptions && this.currentOptions.thumbnails && this.currentOptions.preview && (!this.currentOptions.image || this.currentOptions.thumbnailsRemainingCount)) { 2837 this.openPreview(this.selectedIndex); 2838 } 2839 } 2840 show(index) { 2841 this.select(index); 2842 } 2843 showNext() { 2844 this.image.showNext(); 2845 } 2846 showPrev() { 2847 this.image.showPrev(); 2848 } 2849 canShowNext() { 2850 if (this.images && this.currentOptions) { 2851 return !!(this.currentOptions.imageInfinityMove || this.selectedIndex < this.images.length - 1); 2852 } else { 2853 return false; 2854 } 2855 } 2856 canShowPrev() { 2857 if (this.images && this.currentOptions) { 2858 return !!(this.currentOptions.imageInfinityMove || this.selectedIndex > 0); 2859 } else { 2860 return false; 2861 } 2862 } 2863 previewSelect(index) { 2864 this.previewChange.emit({ 2865 index, 2866 image: this.images[index] 2867 }); 2868 } 2869 moveThumbnailsRight() { 2870 this.thumbnails.moveRight(); 2871 } 2872 moveThumbnailsLeft() { 2873 this.thumbnails.moveLeft(); 2874 } 2875 canMoveThumbnailsRight() { 2876 return this.thumbnails.canMoveRight(); 2877 } 2878 canMoveThumbnailsLeft() { 2879 return this.thumbnails.canMoveLeft(); 2880 } 2881 resetThumbnails() { 2882 if (this.thumbnails) { 2883 this.thumbnails.reset(this.currentOptions.startIndex); 2884 } 2885 } 2886 select(index) { 2887 this.selectedIndex = index; 2888 this.change.emit({ 2889 index, 2890 image: this.images[index] 2891 }); 2892 } 2893 checkFullWidth() { 2894 if (this.currentOptions && this.currentOptions.fullWidth) { 2895 this.width = document.body.clientWidth + "px"; 2896 this.left = "translateX(" + -(document.body.clientWidth - this.myElement.nativeElement.parentNode.innerWidth) / 2 + "px)"; 2897 } 2898 } 2899 setImages() { 2900 this.images.forEach((img) => img.type = this.helperService.getFileType(img.url || img.big || img.medium || img.small || "")); 2901 this.smallImages = this.images.map((img) => img.small); 2902 this.mediumImages = this.images.map((img, i) => new NgxGalleryOrderedImage({ 2903 src: img.medium, 2904 type: img.type, 2905 index: i 2906 })); 2907 this.bigImages = this.images.map((img) =>
2907 img.big); 2908 this.descriptions = this.images.map((img) => img.description); 2909 this.links = this.images.map((img) => img.url); 2910 this.labels = this.images.map((img) => img.label); 2911 } 2912 setBreakpoint() { 2913 this.prevBreakpoint = this.breakpoint; 2914 let breakpoints; 2915 if (typeof window !== "undefined") { 2916 breakpoints = this.options.filter((opt) => opt.breakpoint >= window.innerWidth).map((opt) => opt.breakpoint); 2917 } 2918 if (breakpoints && breakpoints.length) { 2919 this.breakpoint = breakpoints.pop(); 2920 } else { 2921 this.breakpoint = void 0; 2922 } 2923 } 2924 sortOptions() { 2925 this.options = [...this.options.filter((a) => a.breakpoint === void 0), ...this.options.filter((a) => a.breakpoint !== void 0).sort((a, b) => b.breakpoint - a.breakpoint)]; 2926 } 2927 setOptions() { 2928 this.currentOptions = new NgxGalleryOptions({}); 2929 this.options.filter((opt) => opt.breakpoint === void 0 || opt.breakpoint >= this.breakpoint).map((opt) => this.combineOptions(this.currentOptions, opt)); 2930 this.width = this.currentOptions.width; 2931 this.height = this.currentOptions.height; 2932 } 2933 combineOptions(first, second) { 2934 Object.keys(second).map((val) => first[val] = second[val] !== void 0 ? second[val] : first[val]); 2935 } 2936 setAnimating(event) { 2937 this.isAnimating = event; 2938 } 2939}; 2940NgxGalleryComponent.\u0275fac = function NgxGalleryComponent_Factory(__ngFactoryType__) { 2941 return new (__ngFactoryType__ || NgxGalleryComponent)(\u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(NgxGalleryService)); 2942}; 2943NgxGalleryComponent.\u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ 2944 type: NgxGalleryComponent, 2945 selectors: [["ngx-gallery"]], 2946 viewQuery: function NgxGalleryComponent_Query(rf, ctx) { 2947 if (rf & 1) { 2948 \u0275\u0275viewQuery(NgxGalleryPreviewComponent, 5)(NgxGalleryImageComponent, 5)(NgxGalleryThumbnailsComponent, 5); 2949 } 2950 if (rf & 2) { 2951 let _t; 2952 \u0275\u0275queryRefresh(_t = \u0275\u0275loadQuery()) && (ctx.preview = _t.first); 2953 \u0275\u0275queryRefresh(_t = \u0275\u0275loadQuery()) && (ctx.image = _t.first); 2954 \u0275\u0275queryRefresh(_t = \u0275\u0275loadQuery()) && (ctx.thumbnails = _t.first); 2955 } 2956 }, 2957 hostVars: 6, 2958 hostBindings: function NgxGalleryComponent_HostBindings(rf, ctx) { 2959 if (rf & 1) { 2960 \u0275\u0275listener("resize", function NgxGalleryComponent_resize_HostBindingHandler() { 2961 return ctx.onResize(); 2962 }, \u0275\u0275resolveWindow); 2963 } 2964 if (rf & 2) { 2965 \u0275\u0275styleProp("width", ctx.width)("height", ctx.height)("transform", ctx.left); 2966 } 2967 }, 2968 inputs: { 2969 options: "options", 2970 images: "images" 2971 }, 2972 outputs: { 2973 imagesReady: "imagesReady", 2974 change: "change", 2975 previewOpen: "previewOpen", 2976 previewClose: "previewClose", 2977 previewChange: "previewChange" 2978 }, 2979 standalone: false, 2980 features: [\u0275\u0275ProvidersFeature([NgxGalleryService])], 2981 decls: 4, 2982 vars: 41, 2983 consts: [[3, "height", "images", "clickable", "selectedIndex", "arrows", "arrowsAutoHide", "arrowPrevIcon", "arrowNextIcon", "swipe", "animation", "size", "autoPlay", "autoPlayInterval", "autoPlayPauseOnHover", "infinityMove", "lazyLoading", "actions", "descriptions", "showDescription", "bullets", "imageClick", "activeChange", "animating", 4, "ngIf"], [3, "marginTop", "marginBottom", "height", "images", "isAnimating", "links", "labels", "linkTarget", "selectedIndex", "columns", "rows", "margin", "arrows", "arrowsAutoHide", "arrowPrevIcon", "arrowNextIcon", "clickable", "swipe", "size", "moveSize", "order", "remainingCount", "lazyLoading", "actions", "ngClass", "activeChange", 4, "ngIf"], [3, "previewClose", "previewOpen", "activeChange", "images", "descriptions", "showDescription", "arrowPrevIcon", "arrowNextIcon", "closeIcon", "fullscreenIcon", "spinnerIcon", "arrows", "arrowsAutoHide", "swipe", "fullscreen", "forceFullscreen", "closeOnClick", "closeOnEsc", "keyboardNavigation", "animation", "autoPlay", "autoPlayInterval", "autoPlayPauseOnHover", "infinityMove", "zoom", "zoomStep", "zoomMax", "zoomMin", "zoomInIcon", "zoomOutIcon", "actions", "rotate", "rotateLeftIcon", "rotateRightIcon", "download", "downloadIcon", "bullets"], [3, "imageClick", "activeChange", "animating", "images", "clickable", "selectedIndex", "arrows", "arrowsAutoHide", "arrowPrevIcon", "arrowNextIcon", "swipe", "animation", "size", "autoPlay", "autoPlayInterval", "autoPlayPauseOnHover", "infinityMove", "lazyLoading", "actions", "descriptions", "showDescription", "bullets"], [3, "activeChange", "images", "isAnimating", "links", "labels", "linkTarget", "selectedIndex", "columns", "rows", "margin", "arrows", "arrowsAutoHide", "arrowPrevIcon", "arrowNextIcon", "clickable", "swipe", "size", "moveSize", "order", "remainingCount", "lazyLoading", "actions", "ngClass"]], 2984 template: function NgxGalleryComponent_Template(rf, ctx) { 2985 if (rf & 1) { 2986 \u0275\u0275elementStart(0, "div"); 2987 \u0275\u0275template(1, NgxGalleryComponent_ngx_gallery_image_1_Template, 1, 21, "ngx-gallery-image", 0)(2, NgxGalleryComponent_ngx_gallery_thumbnails_2_Template, 1, 29, "ngx-gallery-thumbn
2987ails", 1); 2988 \u0275\u0275elementStart(3, "ngx-gallery-preview", 2); 2989 \u0275\u0275listener("previewClose", function NgxGalleryComponent_Template_ngx_gallery_preview_previewClose_3_listener() { 2990 return ctx.onPreviewClose(); 2991 })("previewOpen", function NgxGalleryComponent_Template_ngx_gallery_preview_previewOpen_3_listener() { 2992 return ctx.onPreviewOpen(); 2993 })("activeChange", function NgxGalleryComponent_Template_ngx_gallery_preview_activeChange_3_listener($event) { 2994 return ctx.previewSelect($event); 2995 }); 2996 \u0275\u0275elementEnd()(); 2997 } 2998 if (rf & 2) { 2999 \u0275\u0275classMap(\u0275\u0275interpolate1("ngx-gallery-layout ", ctx.currentOptions == null ? null : ctx.currentOptions.layout)); 3000 \u0275\u0275advance(); 3001 \u0275\u0275property("ngIf", ctx.currentOptions == null ? null : ctx.currentOptions.image); 3002 \u0275\u0275advance(); 3003 \u0275\u0275property("ngIf", ctx.currentOptions == null ? null : ctx.currentOptions.thumbnails); 3004 \u0275\u0275advance(); 3005 \u0275\u0275classProp("ngx-gallery-active", ctx.previewEnabled); 3006 \u0275\u0275property("images", ctx.bigImages)("descriptions", ctx.descriptions)("showDescription", ctx.currentOptions == null ? null : ctx.currentOptions.previewDescription)("arrowPrevIcon", ctx.currentOptions == null ? null : ctx.currentOptions.arrowPrevIcon)("arrowNextIcon", ctx.currentOptions == null ? null : ctx.currentOptions.arrowNextIcon)("closeIcon", ctx.currentOptions == null ? null : ctx.currentOptions.closeIcon)("fullscreenIcon", ctx.currentOptions == null ? null : ctx.currentOptions.fullscreenIcon)("spinnerIcon", ctx.currentOptions == null ? null : ctx.currentOptions.spinnerIcon)("arrows", ctx.currentOptions == null ? null : ctx.currentOptions.previewArrows)("arrowsAutoHide", ctx.currentOptions == null ? null : ctx.currentOptions.previewArrowsAutoHide)("swipe", ctx.currentOptions == null ? null : ctx.currentOptions.previewSwipe)("fullscreen", ctx.currentOptions == null ? null : ctx.currentOptions.previewFullscreen)("forceFullscreen", ctx.currentOptions == null ? null : ctx.currentOptions.previewForceFullscreen)("closeOnClick", ctx.currentOptions == null ? null : ctx.currentOptions.previewCloseOnClick)("closeOnEsc", ctx.currentOptions == null ? null : ctx.currentOptions.previewCloseOnEsc)("keyboardNavigation", ctx.currentOptions == null ? null : ctx.currentOptions.previewKeyboardNavigation)("animation", ctx.currentOptions == null ? null : ctx.currentOptions.previewAnimation)("autoPlay", ctx.currentOptions == null ? null : ctx.currentOptions.previewAutoPlay)("autoPlayInterval", ctx.currentOptions == null ? null : ctx.currentOptions.previewAutoPlayInterval)("autoPlayPauseOnHover", ctx.currentOptions == null ? null : ctx.currentOptions.previewAutoPlayPauseOnHover)("infinityMove", ctx.currentOptions == null ? null : ctx.currentOptions.previewInfinityMove)("zoom", ctx.currentOptions == null ? null : ctx.currentOptions.previewZoom)("zoomStep", ctx.currentOptions == null ? null : ctx.currentOptions.previewZoomStep)("zoomMax", ctx.currentOptions == null ? null : ctx.currentOptions.previewZoomMax)("zoomMin", ctx.currentOptions == null ? null : ctx.currentOptions.previewZoomMin)("zoomInIcon", ctx.currentOptions == null ? null : ctx.currentOptions.zoomInIcon)("zoomOutIcon", ctx.currentOptions == null ? null : ctx.currentOptions.zoomOutIcon)("actions", ctx.currentOptions == null ? null : ctx.currentOptions.actions)("rotate", ctx.currentOptions == null ? null : ctx.currentOptions.previewRotate)("rotateLeftIcon", ctx.currentOptions == null ? null : ctx.currentOptions.rotateLeftIcon)("rotateRightIcon", ctx.currentOptions == null ? null : ctx.currentOptions.rotateRightIcon)("download", ctx.currentOptions == null ? null : ctx.currentOptions.previewDownload)("downloadIcon", ctx.currentOptions == null ? null : ctx.currentOptions.downloadIcon)("bullets", ctx.currentOptions == null ? null : ctx.currentOptions.previewBullets); 3007 } 3008 }, 3009 dependencies: [NgxGalleryImageComponent, NgxGalleryThumbnailsComponent, NgxGalleryPreviewComponent, NgIf, NgClass], 3010 styles: [":host{display:inline-block}:host>*{float:left}.ngx-gallery-layout{width:100%;height:100%;display:flex;flex-direction:column}.ngx-gallery-layout.thumbnails-top ngx-gallery-image{order:2}
3010.ngx-gallery-layout.thumbnails-top ngx-gallery-thumbnails{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-image{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-thumbnails{order:2}*{box-sizing:border-box}.ngx-gallery-icon{color:#fff;position:absolute;display:inline-block}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}ngx-gallery-preview{font-size:25px}ngx-gallery-preview .ngx-gallery-icon{z-index:2000}.ngx-gallery-clickable{cursor:pointer}.ngx-gallery-icons-wrapper .ngx-gallery-icon{position:relative;margin-right:5px;margin-top:5px;font-size:20px;cursor:pointer}.ngx-gallery-icons-wrapper{float:right}\n"], 3011 encapsulation: 2, 3012 changeDetection: 0 3013}); 3014(() => { 3015 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryComponent, [{ 3016 type: Component, 3017 args: [{ 3018 selector: "ngx-gallery", 3019 encapsulation: ViewEncapsulation.None, 3020 providers: [NgxGalleryService], 3021 changeDetection: ChangeDetectionStrategy.OnPush, 3022 template: '<div class="ngx-gallery-layout {{currentOptions?.layout}}">\n <ngx-gallery-image *ngIf="currentOptions?.image" [style.height]="getImageHeight()" [images]="mediumImages"\n [clickable]="currentOptions?.preview" [selectedIndex]="selectedIndex"\n [arrows]="currentOptions?.imageArrows" [arrowsAutoHide]="currentOptions?.imageArrowsAutoHide"\n [arrowPrevIcon]="currentOptions?.arrowPrevIcon" [arrowNextIcon]="currentOptions?.arrowNextIcon"\n [swipe]="currentOptions?.imageSwipe" [animation]="currentOptions?.imageAnimation"\n [size]="currentOptions?.imageSize" [autoPlay]="currentOptions?.imageAutoPlay"\n [autoPlayInterval]="currentOptions?.imageAutoPlayInterval"\n [autoPlayPauseOnHover]="currentOptions?.imageAutoPlayPauseOnHover"\n [infinityMove]="currentOptions?.imageInfinityMove" [lazyLoading]="currentOptions?.lazyLoading"\n [actions]="currentOptions?.imageActions" [descriptions]="descriptions"\n [showDescription]="currentOptions?.imageDescription" [bullets]="currentOptions?.imageBullets"\n (imageClick)="openPreview($event)" (activeChange)="selectFromImage($event)" (animating)="setAnimating($event)"></ngx-gallery-image>\n\n <ngx-gallery-thumbnails *ngIf="currentOptions?.thumbnails" [style.marginTop]="getThumbnailsMarginTop()"\n [style.marginBottom]="getThumbnailsMarginBottom()" [style.height]="getThumbnailsHeight()"\n [images]="smallImages" [isAnimating]="isAnimating" [links]="currentOptions?.thumbnailsAsLinks ? links : []"\n [labels]="labels" [linkTarget]="currentOptions?.linkTarget" [selectedIndex]="selectedIndex"\n [columns]="currentOptions?.thumbnailsColumns" [rows]="currentOptions?.thumbnailsRows"\n [margin]="currentOptions?.thumbnailMargin" [arrows]="currentOptions?.thumbnailsArrows"\n [arrowsAutoHide]="currentOptions?.thumbnailsArrowsAutoHide"\n [arrowPrevIcon]="currentOptions?.arrowPrevIcon"\n [arrowNextIcon]="currentOptions?.arrowNextIcon"\n [clickable]="currentOptions?.image || currentOptions?.preview"\n [swipe]="currentOptions?.thumbnailsSwipe" [size]="currentOptions?.thumbnailSize"\n [moveSize]="currentOptions?.thumbnailsMoveSize" [order]="currentOptions?.thumbnailsOrder"\n [remainingCount]="currentOptions?.thumbnailsRemainingCount"\n [lazyLoading]="currentOptions?.lazyLoading" [actions]="currentOptions?.thumbnailActions"\n (activeChange)="selectFromThumbnails($event)" [ngClass]="currentOptions?.thumbnailClasses"></ngx-gallery-thumbnails>\n\n <ngx-gallery-preview [images]="bigImages" [descriptions]="descriptions"\n [showDescription]="currentOptions?.previewDescription"\n [arrowPrevIcon]="currentOptions?.arrowPrevIcon" [arrowNextIcon]="currentOptions?.arrowNextIcon"\n [closeIcon]="currentOptions?.closeIcon" [fullscreenIcon]="currentOptions?.fullscreenIcon"\n [spinnerIcon]="currentOptions?.spinnerIcon" [arrows]="currentOptions?.previewArrows"\n [arrowsAutoHide]="currentOptions?.previewArrowsAutoHide" [swipe]="currentOptions?.previewSwipe"\n [fullscreen]="currentOptions?.previewFullscreen"\n [forceFullscreen]="currentOptions?.previewForceFullscreen"\n [closeOnClick]="currentOptions?.previewCloseOnClick"\n [closeOnEsc]="currentOptions?.previewCloseOnEsc"\
3022n [keyboardNavigation]="currentOptions?.previewKeyboardNavigation"\n [animation]="currentOptions?.previewAnimation" [autoPlay]="currentOptions?.previewAutoPlay"\n [autoPlayInterval]="currentOptions?.previewAutoPlayInterval"\n [autoPlayPauseOnHover]="currentOptions?.previewAutoPlayPauseOnHover"\n [infinityMove]="currentOptions?.previewInfinityMove" [zoom]="currentOptions?.previewZoom"\n [zoomStep]="currentOptions?.previewZoomStep" [zoomMax]="currentOptions?.previewZoomMax"\n [zoomMin]="currentOptions?.previewZoomMin" [zoomInIcon]="currentOptions?.zoomInIcon"\n [zoomOutIcon]="currentOptions?.zoomOutIcon" [actions]="currentOptions?.actions"\n [rotate]="currentOptions?.previewRotate" [rotateLeftIcon]="currentOptions?.rotateLeftIcon"\n [rotateRightIcon]="currentOptions?.rotateRightIcon" [download]="currentOptions?.previewDownload"\n [downloadIcon]="currentOptions?.downloadIcon" [bullets]="currentOptions?.previewBullets"\n (previewClose)="onPreviewClose()" (previewOpen)="onPreviewOpen()"\n (activeChange)="previewSelect($event)"\n [class.ngx-gallery-active]="previewEnabled"></ngx-gallery-preview>\n</div>\n', 3023 styles: [":host{display:inline-block}:host>*{float:left}.ngx-gallery-layout{width:100%;height:100%;display:flex;flex-direction:column}.ngx-gallery-layout.thumbnails-top ngx-gallery-image{order:2}.ngx-gallery-layout.thumbnails-top ngx-gallery-thumbnails{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-image{order:1}.ngx-gallery-layout.thumbnails-bottom ngx-gallery-thumbnails{order:2}*{box-sizing:border-box}.ngx-gallery-icon{color:#fff;position:absolute;display:inline-block}.ngx-gallery-icon .ngx-gallery-icon-content{display:block}ngx-gallery-preview{font-size:25px}ngx-gallery-preview .ngx-gallery-icon{z-index:2000}.ngx-gallery-clickable{cursor:pointer}.ngx-gallery-icons-wrapper .ngx-gallery-icon{position:relative;margin-right:5px;margin-top:5px;font-size:20px;cursor:pointer}.ngx-gallery-icons-wrapper{float:right}\n"] 3024 }] 3025 }], function() { 3026 return [{ 3027 type: ElementRef 3028 }, { 3029 type: NgxGalleryService 3030 }]; 3031 }, { 3032 options: [{ 3033 type: Input 3034 }], 3035 images: [{ 3036 type: Input 3037 }], 3038 imagesReady: [{ 3039 type: Output 3040 }], 3041 change: [{ 3042 type: Output 3043 }], 3044 previewOpen: [{ 3045 type: Output 3046 }], 3047 previewClose: [{ 3048 type: Output 3049 }], 3050 previewChange: [{ 3051 type: Output 3052 }], 3053 preview: [{ 3054 type: ViewChild, 3055 args: [NgxGalleryPreviewComponent] 3056 }], 3057 image: [{ 3058 type: ViewChild, 3059 args: [NgxGalleryImageComponent] 3060 }], 3061 thumbnails: [{ 3062 type: ViewChild, 3063 args: [NgxGalleryThumbnailsComponent] 3064 }], 3065 width: [{ 3066 type: HostBinding, 3067 args: ["style.width"] 3068 }], 3069 height: [{ 3070 type: HostBinding, 3071 args: ["style.height"] 3072 }], 3073 left: [{ 3074 type: HostBinding, 3075 args: ["style.transform"] 3076 }], 3077 onResize: [{ 3078 type: HostListener, 3079 args: ["window:resize"] 3080 }] 3081 }); 3082})(); 3083var CustomHammerConfig = class extends HammerGestureConfig { 3084 constructor() { 3085 super(...arguments); 3086 this.overrides = { 3087 pinch: { 3088 enable: false 3089 }, 3090 rotate: { 3091 enable: false 3092 } 3093 }; 3094 } 3095}; 3096CustomHammerConfig.\u0275fac = /* @__PURE__ */ (() => { 3097 let \u0275CustomHammerConfig_BaseFactory; 3098 return function CustomHammerConfig_Factory(__ngFactoryType__) { 3099 return (\u0275CustomHammerConfig_BaseFactory || (\u0275CustomHammerConfig_BaseFactory = \u0275\u0275getInheritedFactory(CustomHammerConfig)))(__ngFactoryType__ || CustomHammerConfig); 3100 }; 3101})(); 3102CustomHammerConfig.\u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ 3103 token: CustomHammerConfig, 3104 factory: CustomHammerConfig.\u0275fac 3105}); 3106(() => { 3107 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CustomHammerConfig, [{ 3108 type: Injectable 3109 }], null, null); 3110})(); 3111var NgxGalleryModule = class { 3112}; 3113NgxGalleryModule.\u0275fac = function NgxGalleryModule_Factory(__ngFactoryType__) { 3114 return new (__ngFactoryType__ || NgxGalleryModule)(); 3115}; 3116NgxGalleryModule.\u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({ 3117 type: NgxGalleryModule, 3118 declarations: [NgxGalleryComponent, NgxGalleryImageComponent, NgxGalleryArrowsComponent, NgxGalleryThumbnailsComponent, NgxGalleryPreviewComponent, NgxGalleryActionComponent, NgxGalleryBulletsComponent], 3119 imports: [CommonModule], 3120 exports: [NgxGalleryComponent] 3121}); 3122NgxGalleryModule.\u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({ 3123 providers: [{ 3124 provide: HAMMER_GESTURE_CONFIG, 3125 useClass: CustomHammerConfig 3126 }], 3127 imports: [[CommonModule]] 3128}); 3129(() => { 3130 (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgxGalleryModule, [{ 3131 type: NgModule, 3132 args: [{ 3133 declarations: [NgxGalleryComponent, NgxGalleryImageComponent, NgxGalleryArrowsComponent, NgxGalleryThumbnailsComponent, NgxGalleryPreviewComponent, NgxGalleryActionComponent, NgxGalleryBulletsComponent], 3134 imports: [CommonModule], 3135 exports: [NgxGalleryComponent], 3136 providers: [{ 3137 provide: HAMMER_GESTURE_CONFIG, 3138 useClass: CustomHammerConfig 3139 }] 3140 }] 3141 }], null, null); 3142})(); 3143 3144export { 3145 NgxGalleryAnimation, 3146 NgxGalleryComponent, 3147 NgxGalleryModule 3148};
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.