diff --git a/CHANGELOG.md b/CHANGELOG.md index a4b89cfa..9ee9a722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,79 @@ # Changelog +## 12.0.0-beta.0 + +> See the [storybook documentation](https://ngx-gallery-next.netlify.app/) + +- feat: Add RTL support, closes [#540](https://github.com/MurhafSousli/ngx-gallery/issues/540). +- All boolean inputs of `` components can be used as string attributes + - e.g. ``, `` and `` sets the option's value to true. + - e.g. `` and `` sets the option's value to false. +- All number inputs of `` components can be used as string attributes + - e.g. `` and `` sets the option's value to 2000 + +**Improved performance** + +- refactor: Replace the scroll event with intersection observer to detect the active item while scrolling. + +**ItemAutoSize, ThumbAutoSize features** + +- enhance: Toggling `itemAutoSize` option is now reactive. +- fix: `[thumbAutosize]` causes random invalid starting thumbnail scroller position when scrolling possible, closes [#521](https://github.com/MurhafSousli/ngx-gallery/issues/521) +- fix: `[ItemAutosize]` in website/safari browsers do not work as expected, closes [#543](https://github.com/MurhafSousli/ngx-gallery/issues/543) + +**AutoHeight feature** + +- enhance: Auto-height feature is not more precise and works well with or without height transition +- fix: Auto-height issue when screen size changes + +**Autoplay feature** + +- fix: `autoplay` resets the timer after navigated. +- fix: `autoplay` only start the timer after the image is loaded. + +**Bullets (previously named 'Dots')** + +- feat: `disableBullets` disable bullets' clicks + +**Custom template** + +- feature: Introduce `galleryImage` directive within `galleryItemDef`, to allow recognizing the img element in your custom item template. + +### Breaking changes + +#### Options renamed: + +**Core** +- `slidingDirection` → `orientation` +- `slidingEase` → `scrollEase` +- `slidingDuration` → `scrollDuration` +- `slidingDisabled` → `disableScroll` +- `mouseSlidingDisabled` → `disableMouseScroll` +- `autoPlay` → `autoplay` + +**Thumbs** +- `thumb` → `thumbs` +- `thumbMode` → `thumbCentralized` +- `thumbMode` → `thumbCentralized` +- `thumbDetached` → `detachThumbs` +- `thumbSlidingDisabled` → `disableThumbMouseScroll` +- `thumbMouseSlidingDisabled` → `disableThumbMouseScroll` + +**Bullets** +- `dots` → `bullets` +- `dotSize` → `bulletSize` +- `dotPosition` → `bulletPosition` + +#### Input removed (no longer exist) + +- `navScrollBehavior` the option is now removed, use `scrollBehavior` instead. + + +*** + ## 11.0.0 -- feat: Add `GalleryThumbDef`, `GalleryImageDef`, `GalleryItemDef`, `GalleryBoxDef` to set custom templates. +- feat: Add `galleryThumbDef`, `galleryImageDef`, `galleryItemDef`, `galleryBoxDef` to set custom templates, closes [#487](https://github.com/MurhafSousli/ngx-gallery/issues/487). - feat: Add `imageTemplate` property to `GalleryConfig`. - feat: Add `args` property in case need to attach extra data with the gallery item. - enhance: Improve overall typings. @@ -290,7 +361,7 @@ export class FeatureModule { } - **feat(core):** Add indeterminate option to the radial progress, in [df682c4](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/df682c4353f3795dd3f45f53dfa488b428fdb99f). - **enhance(core):** Enhance thumbnails loading styles, in [f34f90a](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/f34f90a542aa437fa12b996dc77f6b7dd9fd819c). -- **fix(core):** Expose `[dotSize]`, `[dotsPosition]` and `[counterPosition]` options as inputs, in [946a856](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/946a85618acdc91692183f8f65765bbd137815cc). +- **fix(core):** Expose `[dotSize]`, `[bulletsPosition]` and `[counterPosition]` options as inputs, in [946a856](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/946a85618acdc91692183f8f65765bbd137815cc). - **fix(core):** Add `[loadingMode]` option to gallery images which accepts `determinate` or `indeterminate` , in [e8bdfb2](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/e8bdfb2a28d485e3d89290dda1edb595ae3efecf). - **regression(core):** Fix undisplayed thumb image when a custom thumb template is used, in [34f2cc6](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/34f2cc6f7f5316a929a1efc2ceb6bde8d42d0551). - **enhance(gallerize):** Run gallerize detector outside angular zone, makes opening the lightbox smoother, in [284925d](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/284925dd53a67e6a2a2d0b208a30623783db37bc) and [98901b9](https://github.com/MurhafSousli/ngx-gallery/pull/233/commits/98901b9136b4405a5d549fed08a36ec654279a26). @@ -298,7 +369,7 @@ export class FeatureModule { } ## 4.0.0-beta.0 - **update(core, lightbox, gallerize)**: Update peer dependencies, closes [#228](https://github.com/MurhafSousli/ngx-gallery/issues/228) in [bd8cdd3](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/bd8cdd302c55e285dc32a195e1d5f70b4312ac46). -- **feat(core):** Add `dotsPosition` option, closes [#211](https://github.com/MurhafSousli/ngx-gallery/issues/211) in [263d297](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/263d297ccc27692fc9fd9702f775dcf2b753d5de). +- **feat(core):** Add `bulletsPosition` option, closes [#211](https://github.com/MurhafSousli/ngx-gallery/issues/211) in [263d297](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/263d297ccc27692fc9fd9702f775dcf2b753d5de). - **feat(core):** Add `dotsSize` option, in [e2e58b6](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/e2e58b62e4eb3cbcf5dd6f17417830bfc956f7eb). - **feat(core):** Add `counterPosition` option, closes in [ce7a8ad](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/ce7a8ad62816b3ba344a22e6e459cfdb06ad18ab). - **feat(core):** Use `HttpClient` to load and cache images in `[lazyImage]` directive, in [15c3e88](https://github.com/MurhafSousli/ngx-gallery/pull/231/commits/15c3e88d89434eb4860eabf3959a08ce746298e7). diff --git a/README.md b/README.md index 59cac248..8a758cff 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ ___ -### The documentation is available at the [wiki page](https://github.com/MurhafSousli/ngx-gallery/wiki) 📚 +### Explore ngx-gallery Documentation + +- **For stable version (v11):** Visit our [wiki page](https://github.com/MurhafSousli/ngx-gallery/wiki) 📚. + +- **For the latest features (v12 Beta):** Check out our [storybook documentation](https://ngx-gallery-next.netlify.app/) + +We value your feedback and appreciate your support in testing this beta release! ___ diff --git a/angular.json b/angular.json index 9a314c23..02efefc8 100644 --- a/angular.json +++ b/angular.json @@ -28,6 +28,38 @@ "tsConfig": "projects/ng-gallery/tsconfig.spec.json", "karmaConfig": "projects/ng-gallery/karma.conf.js" } + }, + "storybook": { + "builder": "@storybook/angular:start-storybook", + "options": { + "configDir": "projects/ng-gallery/.storybook", + "browserTarget": "ng-gallery:build", + "styles": ["@angular/cdk/overlay-prebuilt.css"], + "compodoc": true, + "compodocArgs": [ + "-e", + "json", + "-d", + "projects/ng-gallery" + ], + "port": 6006 + } + }, + "build-storybook": { + "builder": "@storybook/angular:build-storybook", + "options": { + "configDir": "projects/ng-gallery/.storybook", + "browserTarget": "ng-gallery:build", + "styles": ["@angular/cdk/overlay-prebuilt.css"], + "compodoc": true, + "compodocArgs": [ + "-e", + "json", + "-d", + "projects/ng-gallery" + ], + "outputDir": "dist/storybook/ng-gallery" + } } } }, @@ -45,7 +77,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/ng-gallery-demo", + "outputPath": "dist/ng-gallery-demo/browser", "index": "projects/ng-gallery-demo/src/index.html", "main": "projects/ng-gallery-demo/src/main.ts", "polyfills": "projects/ng-gallery-demo/src/polyfills.ts", @@ -147,6 +179,69 @@ "devServerTarget": "ng-gallery-demo:serve:production" } } + }, + "server": { + "builder": "@angular-devkit/build-angular:server", + "options": { + "outputPath": "dist/ng-gallery-demo/server", + "main": "projects/ng-gallery-demo/server.ts", + "tsConfig": "projects/ng-gallery-demo/tsconfig.server.json", + "buildOptimizer": false, + "optimization": false, + "sourceMap": true, + "extractLicenses": false, + "vendorChunk": true + }, + "configurations": { + "production": { + "buildOptimizer": true, + "outputHashing": "media", + "fileReplacements": [ + { + "replace": "projects/ng-gallery-demo/src/environments/environment.ts", + "with": "projects/ng-gallery-demo/src/environments/environment.prod.ts" + } + ], + "optimization": true, + "sourceMap": false, + "extractLicenses": true, + "vendorChunk": false + } + }, + "defaultConfiguration": "production" + }, + "serve-ssr": { + "builder": "@nguniversal/builders:ssr-dev-server", + "configurations": { + "development": { + "browserTarget": "ng-gallery-demo:build", + "serverTarget": "ng-gallery-demo:server" + }, + "production": { + "browserTarget": "ng-gallery-demo:build:production", + "serverTarget": "ng-gallery-demo:server:production" + } + }, + "defaultConfiguration": "development" + }, + "prerender": { + "builder": "@nguniversal/builders:prerender", + "options": { + "routes": [ + "/" + ] + }, + "configurations": { + "production": { + "browserTarget": "ng-gallery-demo:build:production", + "serverTarget": "ng-gallery-demo:server:production" + }, + "development": { + "browserTarget": "ng-gallery-demo:build:development", + "serverTarget": "ng-gallery-demo:server:development" + } + }, + "defaultConfiguration": "production" } } } diff --git a/build-storybook.log b/build-storybook.log new file mode 100644 index 00000000..483b4491 --- /dev/null +++ b/build-storybook.log @@ -0,0 +1,807 @@ + +> ng-gallery-project@0.0.0 build-storybook +> ng run ng-gallery:build-storybook --output-dir C:\Users\Murhaf\AppData\Local\Temp\chromatic--28884-PtdM9I0wjZqE + + +                                                                         +                                                                         +                                                                         +                                                                                  +                                                                            +                                                                            +                                                                            +                                                                                  +                                               +                                               +                                               + +1.1.21 + +TypeScript version used by Compodoc : 5.0.2 + +TypeScript version of current project : 5.0.4 + +Node.js version : v20.2.0 + +Operating system : Windows 10 + +[06:13:25] No configuration file found, switching to CLI flags. +[06:13:25] Using tsconfig file : C:\Users\Murhaf\Desktop\Projects\ngx-gallery\projects\ng-gallery\.storybook\tsconfig.json +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/.storybook/preview.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/public-api.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gallery.module.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/Configure.mdx +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/GettingStarted.mdx +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-core.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-core.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-counter.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-counter.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-bullets.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-dots.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-item.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-item.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-nav.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-nav.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-slider.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-slider.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumb.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumbs.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/config.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/constants.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/gallery.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/slider.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/styles.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/services/gallery-ref.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/services/gallery.service.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/active-item-observer.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/index.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/styles/debug.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/gallery.default.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/img-manager.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/img-recognizer.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/resize-observer.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/accessibility.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/accessibility.svg +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/addon-library.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/assets.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/context.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/discord.svg +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/docs.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/figma-plugin.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/github.svg +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/lightbox.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/share.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/styling.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/testing.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/theming.png +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/tutorials.svg +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/assets/youtube.svg +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/gallery-example.component.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/Gallery.stories.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/GalleryDocs.mdx +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.mdx +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/lightbox/lightbox-example.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/lightbox/Lightbox.mdx +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/pixabay/pixabay.service.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/index.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts +[06:13:25] Excluding : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-image.scss +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/items.model.ts +[06:13:25] Including : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/svg-assets.ts +[06:13:25] Searching package.json file +[06:13:25] package.json file found +[06:13:25] Processing package.json dependencies +[06:13:25] Searching README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, TODO.md files +[06:13:25] README.md file found +[06:13:25] CHANGELOG.md file found +[06:13:25] Error during C:\Users\Murhaf\Desktop\Projects\ngx-gallery\CONTRIBUTING read +[06:13:25] Continuing without CONTRIBUTING.md file +[06:13:25] LICENSE.md file found +[06:13:25] Error during C:\Users\Murhaf\Desktop\Projects\ngx-gallery\TODO read +[06:13:25] Continuing without TODO.md file +[06:13:25] Get dependencies data +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/.storybook/preview.ts +[06:13:26] found : preview +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/public-api.ts +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gallery.module.ts +[06:13:26] found : GalleryModule +[06:13:26] : - imports: +[06:13:26] : - GalleryComponent +[06:13:26] : - GalleryItemDef +[06:13:26] : - GalleryImageDef +[06:13:26] : - GalleryThumbDef +[06:13:26] : - GalleryBoxDef +[06:13:26] : - exports: +[06:13:26] : - GalleryComponent +[06:13:26] : - GalleryItemDef +[06:13:26] : - GalleryImageDef +[06:13:26] : - GalleryThumbDef +[06:13:26] : - GalleryBoxDef +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-core.component.ts +[06:13:26] found : GalleryCoreComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryThumbsComponent +[06:13:26] : - GallerySliderComponent +[06:13:26] : - GalleryNavComponent +[06:13:26] : - GalleryBulletsComponent +[06:13:26] : - GalleryCounterComponent +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-counter.component.ts +[06:13:26] found : GalleryCounterComponent +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-bullets.component.ts +[06:13:26] found : GalleryBulletsComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-item.component.ts +[06:13:26] found : GalleryItemComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryImageComponent +[06:13:26] : - GalleryVideoComponent +[06:13:26] : - GalleryIframeComponent +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-nav.component.ts +[06:13:26] found : GalleryNavComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-slider.component.ts +[06:13:26] found : GallerySliderComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryItemComponent +[06:13:26] : - SmoothScroll +[06:13:26] : - HammerSliding +[06:13:26] : - SliderIntersectionObserver +[06:13:26] : - ItemIntersectionObserver +[06:13:26] : - SliderResizeObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts +[06:13:26] found : GalleryThumbComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryImageComponent +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts +[06:13:26] found : GalleryThumbsComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryThumbComponent +[06:13:26] : - SmoothScroll +[06:13:26] : - HammerSliding +[06:13:26] : - ThumbResizeObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/gallery.component.ts +[06:13:26] found : GalleryComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryCoreComponent +[06:13:26] : - AutoplayDirective +[06:13:26] : - providers: +[06:13:26] : - ImgManager +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts +[06:13:26] found : AutoplayDirective +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts +[06:13:26] found : GalleryBoxDef +[06:13:26] found : GalleryStateContext +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts +[06:13:26] found : GalleryImageDef +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts +[06:13:26] found : GalleryItemDef +[06:13:26] found : GalleryItemContext +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts +[06:13:26] found : GalleryThumbDef +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts +[06:13:26] found : Hammer +[06:13:26] found : HammerSliding +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/config.model.ts +[06:13:26] found : GALLERY_CONFIG +[06:13:26] found : GalleryConfig +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/constants.ts +[06:13:26] found : GalleryAction +[06:13:26] found : ImageSize +[06:13:26] found : LoadingStrategy +[06:13:26] found : LoadingAttr +[06:13:26] found : ThumbnailsPosition +[06:13:26] found : bulletsPosition +[06:13:26] found : CounterPosition +[06:13:26] found : SlidingDirection +[06:13:26] found : GalleryItemTypes +[06:13:26] found : ThumbnailsView +[06:13:26] found : GalleryItemType +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/gallery.model.ts +[06:13:26] found : GalleryState +[06:13:26] found : GalleryItem +[06:13:26] found : GalleryError +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/slider.model.ts +[06:13:26] found : SliderState +[06:13:26] found : WorkerState +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/styles.model.ts +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/services/gallery-ref.ts +[06:13:26] found : filterActions +[06:13:26] found : GalleryRef +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/services/gallery.service.ts +[06:13:26] found : Gallery +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/active-item-observer.ts +[06:13:26] found : ActiveItemObserver +[06:13:26] found : createIntersectionObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts +[06:13:26] found : ItemIntersectionObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts +[06:13:26] found : SliderIntersectionObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts +[06:13:26] found : SliderResizeObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts +[06:13:26] found : ThumbResizeObserver +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts +[06:13:26] found : NEWTON_ITERATIONS +[06:13:26] found : NEWTON_MIN_SLOPE +[06:13:26] found : SUBDIVISION_PRECISION +[06:13:26] found : SUBDIVISION_MAX_ITERATIONS +[06:13:26] found : kSplineTableSize +[06:13:26] found : kSampleStepSize +[06:13:26] found : float32ArraySupported +[06:13:26] found : A +[06:13:26] found : B +[06:13:26] found : C +[06:13:26] found : calcBezier +[06:13:26] found : getSlope +[06:13:26] found : binarySubdivide +[06:13:26] found : newtonRaphsonIterate +[06:13:26] found : LinearEasing +[06:13:26] found : bezier +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/index.ts +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts +[06:13:26] found : Hammer +[06:13:26] found : SmoothScroll +[06:13:26] : - providers: +[06:13:26] : - Dir +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +[06:13:26] found : SMOOTH_SCROLL_OPTIONS +[06:13:26] found : SmoothScrollToOptions +[06:13:26] found : SmoothScrollOptions +[06:13:26] found : SmoothScrollStep +[06:13:26] found : BezierEasingOptions +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/gallery.default.ts +[06:13:26] found : defaultState +[06:13:26] found : defaultConfig +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/img-manager.ts +[06:13:26] found : ImageRegistry +[06:13:26] found : ImgManager +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/img-recognizer.ts +[06:13:26] found : ImgRecognizer +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/utils/resize-observer.ts +[06:13:26] found : resizeObservable +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/gallery-example.component.ts +[06:13:26] found : GalleryExampleComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryModule +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/Gallery.stories.ts +[06:13:26] found : meta +[06:13:26] found : Story +[06:13:26] found : All +[06:13:26] found : Thumbnails +[06:13:26] found : Navigation +[06:13:26] found : Dots +[06:13:26] found : Counter +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts +[06:13:26] found : CustomTemplateComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - GalleryModule +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts +[06:13:26] found : meta +[06:13:26] found : Story +[06:13:26] found : All +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/lightbox/lightbox-example.component.ts +[06:13:26] found : LightboxExampleComponent +[06:13:26] : - imports: +[06:13:26] : - CommonModule +[06:13:26] : - LightboxModule +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts +[06:13:26] found : meta +[06:13:26] found : Story +[06:13:26] found : All +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +[06:13:26] found : PixabayModel +[06:13:26] found : Hit +[06:13:26] found : PixabayHDModel +[06:13:26] found : Hit2 +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/pixabay/pixabay.service.ts +[06:13:26] found : Pixabay +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts +[06:13:26] found : SliderAdapter +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/index.ts +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts +[06:13:26] found : Hammer +[06:13:26] found : HorizontalAdapter +[06:13:26] found : VerticalAdapter +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts +[06:13:26] found : GalleryIframeComponent +[06:13:26] : - imports: +[06:13:26] : - NgIf +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts +[06:13:26] found : GalleryImageComponent +[06:13:26] : - imports: +[06:13:26] : - NgSwitch +[06:13:26] : - NgSwitchCase +[06:13:26] : - NgIf +[06:13:26] : - ImgRecognizer +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts +[06:13:26] found : GalleryVideoComponent +[06:13:26] : - imports: +[06:13:26] : - NgFor +[06:13:26] : - NgIf +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/items.model.ts +[06:13:26] found : ImageItem +[06:13:26] found : VideoItem +[06:13:26] found : IframeItem +[06:13:26] found : YoutubeItem +[06:13:26] found : GalleryItemModel +[06:13:26] found : ImageItemData +[06:13:26] found : IframeItemData +[06:13:26] found : YoutubeItemData +[06:13:26] found : VideoItemData +[06:13:26] found : GalleryItemData +[06:13:26] found : ItemState +[06:13:26] parsing : C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/components/templates/svg-assets.ts +[06:13:26] found : imageFailedSvg +[06:13:26] ------------------- +[06:13:26] Project statistics +[06:13:26] - files : 56 +[06:13:26] - module : 1 +[06:13:26] - component : 15 +[06:13:26] - directive : 12 +[06:13:26] - injectable : 3 +[06:13:26] - class : 9 +[06:13:26] - interface : 16 +[06:13:26] ------------------- +[06:13:26] Prepare components +[06:13:26] CustomTemplateComponent has styles, include them +[06:13:26] GalleryComponent has styleUrls, include them +[06:13:26] GalleryCoreComponent has styleUrls, include them +[06:13:26] GalleryCounterComponent has styleUrls, include them +[06:13:26] GalleryBulletsComponent has styleUrls, include them +[06:13:26] GalleryImageComponent has styleUrls, include them +[06:13:26] GalleryItemComponent has styleUrls, include them +[06:13:26] GalleryNavComponent has styleUrls, include them +[06:13:26] GallerySliderComponent has styleUrls, include them +[06:13:26] GalleryThumbComponent has styleUrls, include them +[06:13:26] GalleryThumbsComponent has styleUrls, include them +[06:13:26] Prepare modules +[06:13:26] Prepare directives +[06:13:26] Prepare injectables +[06:13:26] Prepare classes +[06:13:26] Prepare interfaces +[06:13:26] Prepare miscellaneous +[06:13:26] Process documentation coverage report +[06:13:26] Generating documentation in export format json +[06:13:26] Documentation generated in projects/ng-gallery/ in 0.646 seconds +info => Cleaning outputDir: C:\Users\Murhaf\AppData\Local\Temp\chromatic--28884-PtdM9I0wjZqE + +info => Loading presets +info => Building manager.. +info => Manager built (128 ms) +info => Building preview.. +info => Copying static files: C:\Users\Murhaf\Desktop\Projects\ngx-gallery\node_modules\@storybook\manager\static at C:\Users\Murhaf\AppData\Local\Temp\chromatic--28884-PtdM9I0wjZqE\sb-common-assets +info Addon-docs: using MDX2 +info => Using implicit CSS loaders +info => Using angular browser target options from "ng-gallery:build" +info => Using angular project with "tsConfig:C:\Users\Murhaf\Desktop\Projects\ngx-gallery\projects\ng-gallery\.storybook\tsconfig.json" +One or more browsers which are configured in the project's Browserslist configuration will be ignored as ES5 output is not supported by the Angular CLI. +Ignored browsers: kaios 2.5, op_mini all +info => Using default Webpack5 setup + [webpack.Progress] 0% + + [webpack.Progress] 1% setup before run + [webpack.Progress] 1% setup before run NodeEnvironmentPlugin + [webpack.Progress] 1% setup before run + [webpack.Progress] 2% setup run + [webpack.Progress] 2% setup run + [webpack.Progress] 4% setup normal module factory + [webpack.Progress] 4% setup normal module factory CaseSensitivePathsPlugin + [webpack.Progress] 4% setup normal module factory + [webpack.Progress] 5% setup context module factory + [webpack.Progress] 5% setup context module factory + [webpack.Progress] 6% setup before compile + [webpack.Progress] 6% setup before compile angular-compiler + [webpack.Progress] 6% setup before compile ProgressPlugin + [webpack.Progress] 6% setup before compile + [webpack.Progress] 7% setup compile + [webpack.Progress] 7% setup compile ExternalsPlugin + [webpack.Progress] 7% setup compile ExternalsPlugin + [webpack.Progress] 7% setup compile + [webpack.Progress] 8% setup compilation + [webpack.Progress] 8% setup compilation angular-occurrences-plugin + [webpack.Progress] 8% setup compilation angular-compiler + [webpack.Progress] 8% setup compilation mini-css-extract-plugin + [webpack.Progress] 8% setup compilation unplugin-csf + [webpack.Progress] 8% setup compilation storybook-normalize-angular-entry-plugin + [webpack.Progress] 8% setup compilation ArrayPushCallbackChunkFormatPlugin + [webpack.Progress] 8% setup compilation JsonpChunkLoadingPlugin + [webpack.Progress] 8% setup compilation StartupChunkDependenciesPlugin + [webpack.Progress] 8% setup compilation ImportScriptsChunkLoadingPlugin + [webpack.Progress] 8% setup compilation FetchCompileWasmPlugin + [webpack.Progress] 8% setup compilation FetchCompileAsyncWasmPlugin + [webpack.Progress] 8% setup compilation WorkerPlugin + [webpack.Progress] 8% setup compilation SplitChunksPlugin + [webpack.Progress] 8% setup compilation RuntimeChunkPlugin + [webpack.Progress] 8% setup compilation ResolverCachePlugin + [webpack.Progress] 8% setup compilation HtmlWebpackPlugin + [webpack.Progress] 8% setup compilation + [webpack.Progress] 9% setup compilation + [webpack.Progress] 9% setup compilation named-chunks-plugin + [webpack.Progress] 9% setup compilation DedupeModuleResolvePlugin + [webpack.Progress] 9% setup compilation AnyComponentStyleBudgetChecker + [webpack.Progress] 9% setup compilation mini-css-extract-plugin + [webpack.Progress] 9% setup compilation SuppressExtractedTextChunks + [webpack.Progress] 9% setup compilation DefinePlugin + [webpack.Progress] 9% setup compilation ProvidePlugin + [webpack.Progress] 9% setup compilation ProgressPlugin + [webpack.Progress] 9% setup compilation ChunkPrefetchPreloadPlugin + [webpack.Progress] 9% setup compilation SourceMapDevToolPlugin + [webpack.Progress] 9% setup compilation JavascriptModulesPlugin + [webpack.Progress] 9% setup compilation JsonModulesPlugin + [webpack.Progress] 9% setup compilation AssetModulesPlugin + [webpack.Progress] 9% setup compilation DynamicEntryPlugin + [webpack.Progress] 9% setup compilation RuntimePlugin + [webpack.Progress] 9% setup compilation InferAsyncModulesPlugin + [webpack.Progress] 9% setup compilation DataUriPlugin + [webpack.Progress] 9% setup compilation FileUriPlugin + [webpack.Progress] 9% setup compilation CompatibilityPlugin + [webpack.Progress] 9% setup compilation HarmonyModulesPlugin + [webpack.Progress] 9% setup compilation AMDPlugin + [webpack.Progress] 9% setup compilation RequireJsStuffPlugin + [webpack.Progress] 9% setup compilation CommonJsPlugin + [webpack.Progress] 9% setup compilation LoaderPlugin + [webpack.Progress] 9% setup compilation LoaderPlugin + [webpack.Progress] 9% setup compilation NodeStuffPlugin + [webpack.Progress] 9% setup compilation APIPlugin + [webpack.Progress] 9% setup compilation ExportsInfoApiPlugin + [webpack.Progress] 9% setup compilation WebpackIsIncludedPlugin + [webpack.Progress] 9% setup compilation ConstPlugin + [webpack.Progress] 9% setup compilation UseStrictPlugin + [webpack.Progress] 9% setup compilation RequireIncludePlugin + [webpack.Progress] 9% setup compilation RequireEnsurePlugin + [webpack.Progress] 9% setup compilation RequireContextPlugin + [webpack.Progress] 9% setup compilation ImportPlugin + [webpack.Progress] 9% setup compilation ImportMetaContextPlugin + [webpack.Progress] 9% setup compilation SystemPlugin + [webpack.Progress] 9% setup compilation ImportMetaPlugin + [webpack.Progress] 9% setup compilation URLPlugin + [webpack.Progress] 9% setup compilation DefaultStatsFactoryPlugin + [webpack.Progress] 9% setup compilation DefaultStatsPresetPlugin + [webpack.Progress] 9% setup compilation DefaultStatsPrinterPlugin + [webpack.Progress] 9% setup compilation JavascriptMetaInfoPlugin + [webpack.Progress] 9% setup compilation EnsureChunkConditionsPlugin + [webpack.Progress] 9% setup compilation RemoveEmptyChunksPlugin + [webpack.Progress] 9% setup compilation MergeDuplicateChunksPlugin + [webpack.Progress] 9% setup compilation FlagIncludedChunksPlugin + [webpack.Progress] 9% setup compilation SideEffectsFlagPlugin + [webpack.Progress] 9% setup compilation FlagDependencyExportsPlugin + [webpack.Progress] 9% setup compilation FlagDependencyUsagePlugin + [webpack.Progress] 9% setup compilation InnerGraphPlugin + [webpack.Progress] 9% setup compilation MangleExportsPlugin + [webpack.Progress] 9% setup compilation ModuleConcatenationPlugin + [webpack.Progress] 9% setup compilation NoEmitOnErrorsPlugin + [webpack.Progress] 9% setup compilation RealContentHashPlugin + [webpack.Progress] 9% setup compilation WasmFinalizeExportsPlugin + [webpack.Progress] 9% setup compilation NamedModuleIdsPlugin + [webpack.Progress] 9% setup compilation DeterministicChunkIdsPlugin + [webpack.Progress] 9% setup compilation DefinePlugin + [webpack.Progress] 9% setup compilation TerserPlugin + [webpack.Progress] 9% setup compilation TemplatedPathPlugin + [webpack.Progress] 9% setup compilation RecordIdsPlugin + [webpack.Progress] 9% setup compilation WarnCaseSensitiveModulesPlugin + [webpack.Progress] 9% setup compilation IgnoreWarningsPlugin + [webpack.Progress] 9% setup compilation + [webpack.Progress] 10% building + [webpack.Progress] 10% building 0/1 entries 0/0 dependencies 0/0 modules + [webpack.Progress] 10% building import loader ./node_modules/@angular-devkit/build-angular/src/tools/babel/webpack-loader.js + [webpack.Progress] 10% building 0/2 entries 1/2 dependencies 0/1 modules + [webpack.Progress] 10% building 0/2 entries 7/21 dependencies 3/6 modules + [webpack.Progress] 30% building 1/2 entries 8/21 dependencies 4/8 modules + [webpack.Progress] 37% building import loader ./node_modules/@ngtools/webpack/src/ivy/index.js + [webpack.Progress] 37% building 1/2 entries 33/54 dependencies 5/31 modules + [webpack.Progress] 37% building import loader ./node_modules/@storybook/mdx2-csf/loader.js + [webpack.Progress] 37% building 1/2 entries 38/54 dependencies 5/36 modules + [webpack.Progress] 37% building import loader ./node_modules/unplugin/dist/webpack/loaders/load.js + [webpack.Progress] 37% building 1/2 entries 61/115 dependencies 11/42 modules + [webpack.Progress] 37% building 1/2 entries 197/234 dependencies 35/106 modules + [webpack.Progress] 37% building import loader ./node_modules/css-loader/dist/cjs.js + [webpack.Progress] 37% building import loader ./node_modules/postcss-loader/dist/cjs.js + [webpack.Progress] 37% building import loader ./node_modules/@ngtools/webpack/src/loaders/inline-resource.js + [webpack.Progress] 37% building 1/2 entries 256/295 dependencies 58/128 modules + [webpack.Progress] 37% building import loader ./node_modules/resolve-url-loader/index.js + [webpack.Progress] 37% building import loader ./node_modules/sass-loader/dist/cjs.js + [webpack.Progress] 37% building 1/2 entries 348/384 dependencies 74/154 modules + [webpack.Progress] 37% building 1/2 entries 993/1000 dependencies 92/534 modules + [webpack.Progress] 37% building 1/2 entries 1590/1638 dependencies 121/600 modules + [webpack.Progress] 37% building 1/2 entries 2286/2300 dependencies 182/737 modules + [webpack.Progress] 37% building 1/2 entries 2547/2600 dependencies 441/775 modules + [webpack.Progress] 55% building 1/2 entries 3062/3075 dependencies 822/900 modules + [webpack.Progress] 65% building 2/2 entries 3203/3203 dependencies 947/947 modules + [webpack.Progress] 65% building + [webpack.Progress] 69% building finish + [webpack.Progress] 69% building finish + [webpack.Progress] 70% sealing finish module graph + [webpack.Progress] 70% sealing finish module graph angular-compiler + [webpack.Progress] 70% sealing finish module graph ResolverCachePlugin + [webpack.Progress] 70% sealing finish module graph InferAsyncModulesPlugin + [webpack.Progress] 70% sealing finish module graph FlagDependencyExportsPlugin + [webpack.Progress] 70% sealing finish module graph InnerGraphPlugin + [webpack.Progress] 70% sealing finish module graph WasmFinalizeExportsPlugin + [webpack.Progress] 70% sealing finish module graph + [webpack.Progress] 70% sealing plugins + [webpack.Progress] 70% sealing plugins WarnCaseSensitiveModulesPlugin + [webpack.Progress] 70% sealing plugins + [webpack.Progress] 71% sealing dependencies optimization + [webpack.Progress] 71% sealing dependencies optimization SideEffectsFlagPlugin + [webpack.Progress] 71% sealing dependencies optimization FlagDependencyUsagePlugin + [webpack.Progress] 71% sealing dependencies optimization + [webpack.Progress] 71% sealing after dependencies optimization + [webpack.Progress] 71% sealing after dependencies optimization + [webpack.Progress] 72% sealing chunk graph + [webpack.Progress] 72% sealing chunk graph + [webpack.Progress] 73% sealing after chunk graph + [webpack.Progress] 73% sealing after chunk graph + [webpack.Progress] 73% sealing optimizing + [webpack.Progress] 73% sealing optimizing + [webpack.Progress] 74% sealing module optimization + [webpack.Progress] 74% sealing module optimization + [webpack.Progress] 75% sealing after module optimization + [webpack.Progress] 75% sealing after module optimization + [webpack.Progress] 75% sealing chunk optimization + [webpack.Progress] 75% sealing chunk optimization EnsureChunkConditionsPlugin + [webpack.Progress] 75% sealing chunk optimization RemoveEmptyChunksPlugin + [webpack.Progress] 75% sealing chunk optimization MergeDuplicateChunksPlugin + [webpack.Progress] 75% sealing chunk optimization SplitChunksPlugin + [webpack.Progress] 75% sealing chunk optimization RemoveEmptyChunksPlugin + [webpack.Progress] 75% sealing chunk optimization + [webpack.Progress] 76% sealing after chunk optimization + [webpack.Progress] 76% sealing after chunk optimization + [webpack.Progress] 77% sealing module and chunk tree optimization + [webpack.Progress] 77% sealing module and chunk tree optimization PersistentChildCompilerSingletonPlugin + [webpack.Progress] 77% sealing module and chunk tree optimization + [webpack.Progress] 77% sealing after module and chunk tree optimization + [webpack.Progress] 77% sealing after module and chunk tree optimization + [webpack.Progress] 78% sealing chunk modules optimization + [webpack.Progress] 78% sealing chunk modules optimization ModuleConcatenationPlugin + [webpack.Progress] 78% sealing chunk modules optimization + [webpack.Progress] 78% sealing after chunk modules optimization + [webpack.Progress] 78% sealing after chunk modules optimization + [webpack.Progress] 79% sealing module reviving + [webpack.Progress] 79% sealing module reviving RecordIdsPlugin + [webpack.Progress] 79% sealing module reviving + [webpack.Progress] 80% sealing before module ids + [webpack.Progress] 80% sealing before module ids + [webpack.Progress] 80% sealing module ids + [webpack.Progress] 80% sealing module ids NamedModuleIdsPlugin + [webpack.Progress] 80% sealing module ids + [webpack.Progress] 81% sealing module id optimization + [webpack.Progress] 81% sealing module id optimization + [webpack.Progress] 82% sealing module id optimization + [webpack.Progress] 82% sealing module id optimization + [webpack.Progress] 82% sealing chunk reviving + [webpack.Progress] 82% sealing chunk reviving RecordIdsPlugin + [webpack.Progress] 82% sealing chunk reviving + [webpack.Progress] 83% sealing before chunk ids + [webpack.Progress] 83% sealing before chunk ids + [webpack.Progress] 84% sealing chunk ids + [webpack.Progress] 84% sealing chunk ids DeterministicChunkIdsPlugin + [webpack.Progress] 84% sealing chunk ids + [webpack.Progress] 84% sealing chunk id optimization + [webpack.Progress] 84% sealing chunk id optimization FlagIncludedChunksPlugin + [webpack.Progress] 84% sealing chunk id optimization + [webpack.Progress] 85% sealing after chunk id optimization + [webpack.Progress] 85% sealing after chunk id optimization + [webpack.Progress] 86% sealing record modules + [webpack.Progress] 86% sealing record modules RecordIdsPlugin + [webpack.Progress] 86% sealing record modules + [webpack.Progress] 86% sealing record chunks + [webpack.Progress] 86% sealing record chunks RecordIdsPlugin + [webpack.Progress] 86% sealing record chunks + [webpack.Progress] 87% sealing module hashing + [webpack.Progress] 87% sealing module hashing + [webpack.Progress] 87% sealing code generation + [webpack.Progress] 87% sealing code generation + [webpack.Progress] 88% sealing runtime requirements + [webpack.Progress] 88% sealing runtime requirements + [webpack.Progress] 89% sealing hashing + [webpack.Progress] 89% sealing hashing + [webpack.Progress] 89% sealing after hashing + [webpack.Progress] 89% sealing after hashing + [webpack.Progress] 90% sealing record hash + [webpack.Progress] 90% sealing record hash + [webpack.Progress] 91% sealing module assets processing + [webpack.Progress] 91% sealing module assets processing + [webpack.Progress] 91% sealing chunk assets processing + [webpack.Progress] 91% sealing chunk assets processing + [webpack.Progress] 92% sealing asset processing + [webpack.Progress] 92% sealing asset processing PersistentChildCompilerSingletonPlugin + [webpack.Progress] 92% sealing asset processing TerserPlugin + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin main.2f2e4fe5.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin main.2f2e4fe5.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin runtime~main.099e8817.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin runtime~main.099e8817.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-Configure-mdx.4295d53f.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-Configure-mdx.4295d53f.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-GettingStarted-mdx.326d5516.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-GettingStarted-mdx.326d5516.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-basic-GalleryDocs-mdx.ad2559cf.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-basic-GalleryDocs-mdx.ad2559cf.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-custom-templates-CustomTemplates-mdx.b8e7734b.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-custom-templates-CustomTemplates-mdx.b8e7734b.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-lightbox-Lightbox-mdx.50f71ad5.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-lightbox-Lightbox-mdx.50f71ad5.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-basic-Gallery-stories.51d521f0.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-basic-Gallery-stories.51d521f0.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-custom-templates-CustomTemplates-stories.5d2c1f40.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-custom-templates-CustomTemplates-stories.5d2c1f40.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-lightbox-Lightbox-stories.913b5ecd.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin stories-lightbox-Lightbox-stories.913b5ecd.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 924.d6bb3452.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 924.d6bb3452.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 21.b1500a41.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 21.b1500a41.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 90.5c3788eb.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 90.5c3788eb.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 841.cdaecacf.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 841.cdaecacf.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 396.bdf3ceea.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 396.bdf3ceea.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 542.183bc20b.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 542.183bc20b.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 155.50520d59.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 155.50520d59.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 464.ac19979f.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 464.ac19979f.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 428.7431c361.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 428.7431c361.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 615.617880a0.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 615.617880a0.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 221.84d3d9cd.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 221.84d3d9cd.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 29.9879b084.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 29.9879b084.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 96.b9cc46b5.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 96.b9cc46b5.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin resolve sources + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 841.cdaecacf.iframe.bundle.js attach SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 841.cdaecacf.iframe.bundle.js attached SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 615.617880a0.iframe.bundle.js attach SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 615.617880a0.iframe.bundle.js attached SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 29.9879b084.iframe.bundle.js attach SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin 29.9879b084.iframe.bundle.js attached SourceMap + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin resolve sources + [webpack.Progress] 92% sealing asset processing SourceMapDevToolPlugin + [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin + [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin + [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin resolve sources + [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin main.71b3a662.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin main.71b3a662.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin runtime~main.43f1b8ae.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin runtime~main.43f1b8ae.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-basic-Gallery-stories.e97c9669.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-basic-Gallery-stories.e97c9669.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-custom-templates-CustomTemplates-stories.f1bb4deb.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-custom-templates-CustomTemplates-stories.f1bb4deb.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-lightbox-Lightbox-stories.79f83458.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-lightbox-Lightbox-stories.79f83458.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 924.20677aff.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 924.20677aff.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 21.471740d9.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 21.471740d9.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 90.8a4ddb01.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 90.8a4ddb01.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 396.ef294ade.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 396.ef294ade.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 542.1bce3b83.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 542.1bce3b83.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 155.7a0fd931.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 155.7a0fd931.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 464.74d64343.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 464.74d64343.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 221.a2e6c5ab.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 221.a2e6c5ab.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 96.8869b5c8.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 96.8869b5c8.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-Configure-mdx.6b1e4db5.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-Configure-mdx.6b1e4db5.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-GettingStarted-mdx.fa63fb05.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-GettingStarted-mdx.fa63fb05.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-basic-GalleryDocs-mdx.0168c7ea.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-basic-GalleryDocs-mdx.0168c7ea.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-custom-templates-CustomTemplates-mdx.fcf7e6c2.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-custom-templates-CustomTemplates-mdx.fcf7e6c2.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-lightbox-Lightbox-mdx.0ccb302b.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin stories-lightbox-Lightbox-mdx.0ccb302b.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 428.29fd87c4.iframe.bundle.js generate SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin 428.29fd87c4.iframe.bundle.js generated SourceMap + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin resolve sources + [webpack.Progress] 92% sealing asset processing RealContentHashPlugin + [webpack.Progress] 92% sealing asset processing angular-occurrences-plugin + [webpack.Progress] 92% sealing asset processing AnyComponentStyleBudgetChecker + [webpack.Progress] 92% sealing asset processing + [webpack.Progress] 93% sealing after asset optimization + [webpack.Progress] 93% sealing after asset optimization + [webpack.Progress] 93% sealing recording + [webpack.Progress] 93% sealing recording + [webpack.Progress] 94% sealing after seal + [webpack.Progress] 94% sealing after seal + [webpack.Progress] 95% emitting emit + [webpack.Progress] 95% emitting emit + [webpack.Progress] 98% emitting after emit + [webpack.Progress] 98% emitting after emit SizeLimitsPlugin + [webpack.Progress] 98% emitting after emit + [webpack.Progress] 99% done plugins + [webpack.Progress] 99% done plugins CaseSensitivePathsPlugin + [webpack.Progress] 99% done plugins + [webpack.Progress] 99% + + [webpack.Progress] 99% cache store build dependencies + [webpack.Progress] 99% cache store build dependencies + [webpack.Progress] 99% cache begin idle + [webpack.Progress] 99% cache begin idle + [webpack.Progress] 100% + +C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts is part of the TypeScript compilation but it's unused. +Add only entry points to the 'files' or 'include' properties in your tsconfig. +C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/slider.model.ts is part of the TypeScript compilation but it's unused. +Add only entry points to the 'files' or 'include' properties in your tsconfig. +C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/lib/models/styles.model.ts is part of the TypeScript compilation but it's unused. +Add only entry points to the 'files' or 'include' properties in your tsconfig. +C:/Users/Murhaf/Desktop/Projects/ngx-gallery/projects/ng-gallery/src/stories/basic/gallery-example.component.ts is part of the TypeScript compilation but it's unused. +Add only entry points to the 'files' or 'include' properties in your tsconfig. +asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + static/media/addon-library.7a58d2cb.png (456 KiB) + static/media/lightbox.436bc8f2.png (4.71 MiB) + main.71b3a662.iframe.bundle.js (468 KiB) + 841.7266fd30.iframe.bundle.js (583 KiB) + 615.cf78c208.iframe.bundle.js (795 KiB) + 29.d1709051.iframe.bundle.js (2.23 MiB) +entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (2.69 MiB) + runtime~main.43f1b8ae.iframe.bundle.js + 29.d1709051.iframe.bundle.js + main.71b3a662.iframe.bundle.js + + [webpack.Progress] 99% cache shutdown + [webpack.Progress] 99% cache shutdown + [webpack.Progress] 100% + +info => Preview built (23 s) +info => Output directory: C:\Users\Murhaf\AppData\Local\Temp\chromatic--28884-PtdM9I0wjZqE diff --git a/documentation/changelog.html b/documentation/changelog.html new file mode 100644 index 00000000..50ad96c7 --- /dev/null +++ b/documentation/changelog.html @@ -0,0 +1,793 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +

Changelog

+

12.0.0-beta.0

+
    +
  • All boolean inputs of <gallery> components can be set as string attributes
      +
    • e.g. <gallery autoHeight>, <gallery autoHeight="true"> and <gallery [autoHeight]="true"> sets the option's value to true.
    • +
    • e.g. <gallery autoHeight="false"> and <gallery [autoHeight]="false"> sets the option's value to false.
    • +
    +
  • +
  • All number inputs of <gallery> components can be set as string attributes
      +
    • e.g. <gallery playerInterval="2000"> and <gallery [playerInterval]="2000"> sets the option's value to 2000
    • +
    +
  • +
+

Improved performance

+
    +
  • refactor: Replace the scroll event with intersection observer to detect the active item while scrolling.
  • +
+

ItemAutoSize, ThumbAutoSize features

+
    +
  • enhance: Toggling itemAutoSize option is now reactive.
  • +
  • fix: [thumbAutosize] causes random invalid starting thumbnail scroller position when scrolling possible, closes #521
  • +
  • fix: [ItemAutosize] in website/safari browsers do not work as expected, closes #543
  • +
+

AutoHeight feature

+
    +
  • enhance: Auto-height feature is not more precise and works well with or without height transition
  • +
  • fix: Auto-height issue when screen size changes
  • +
+

Autoplay feature

+
    +
  • fix: autoplay resets the timer after navigated.
  • +
  • fix: autoplay only start the timer after the image is loaded.
  • +
+

Custom template

+
    +
  • feature: galleryImage directive has been added, which allows user to set this directive on img element inside their custom templates.
  • +
+

Breaking changes

+
    +
  • autoPlay option has been renamed to autoplay in small letters.
  • +
+

11.0.0

+
    +
  • feat: Add GalleryThumbDef, GalleryImageDef, GalleryItemDef, GalleryBoxDef to set custom templates.
  • +
  • feat: Add imageTemplate property to GalleryConfig.
  • +
  • feat: Add args property in case need to attach extra data with the gallery item.
  • +
  • enhance: Improve overall typings.
  • +
+

Breaking changes

+
    +
  • Usage of setting custom template has been changed! see the wiki page for more info.
  • +
  • The inputs itemTemplate, thumbTemplate and boxTemplate has been removed from the gallery component, however they still exist in GalleryConfig
  • +
+

10.0.0

+
    +
  • feat: Migrate to standalone components.
  • +
+

Breaking Changes

+
    +
  • Both GalleryModule and LightboxModule no longer provide the withConfig() method.
  • +
+

9.0.1

+
    +
  • Remove bezier-easing package from dependencies, closes #525 and #551 in 6c47ecb.
  • +
+

9.0.0

+
    +
  • Upgrade to Angular 16
  • +
+

8.0.4

+
    +
  • fix(core): Fix VideoItem typo, closes #529.
  • +
  • enhance(lightbox): Allow multiple classes for backdropPanel and panelClass config, closes 31368ed and #541.
  • +
+

8.0.3

+
    +
  • fix(core): SSR error, closes 532 in #533.
  • +
+

8.0.2

+
    +
  • feat(core): Add loadingAttr option to img and iframe elements, closes #513 in 093789b.
  • +
  • fix(core): Videos are unplayable if type not specified, closes #515 in 11ba153.
  • +
+

8.0.1

+
    +
  • fix(core): Gallery nav icons are not alignment properly, in d4dca8b.
  • +
  • fox(core): Gallery dots is not horizontally centralized, in f2d6910.
  • +
  • fix(core): Fix lib's angular peerDependencies version to >=15 in 9ea5ea3.
  • +
+

8.0.0

+
    +
  • feat(core): Add isActive to custom gallery template context, in 0b3f8bf.
  • +
  • refactor(core): Fix the iframe error regarding the allow attribute.
  • +
  • refactor(core): Change default navigation icons.
  • +
  • refactor(core): Change default dots size.
  • +
  • refactor(core): Change default counter styles.
  • +
  • regret(core): RemoveitemLoaded output.
  • +
+

8.0.0-beta.5

+
    +
  • regret(core): RemovecontentVisibilityAuto option for version 8.
  • +
  • feat(core): Add itemLoaded output which emits after an item is loaded, for image items it emits after the image is loaded.
  • +
  • feat(core): Add autoHeight option, when set to true, the gallery height will fit the active item height.
  • +
  • feat(core): Add autoItemSize option, when set to true, the item will fit its image aspect ratio.
  • +
  • feat(core): Add autoThumbSize option, when set to true, the thumb will fit its image aspect ratio.
  • +
  • feat(core): Add scrollBehavior option.
  • +
  • feat(core): Add navScrollBehavior option.
  • +
  • feat(core): Add thumbImageSize option.
  • +
  • feat(core): Add more options to the video item.
  • +
  • feat(core): Add configSnapshot to GalleryRef class.
  • +
  • feat(core): Add an optional parameter behavior to all next(behavior?), prev(behavior?), set(index, behavior?) functions, fallbacks to the scrollBehavior config.
  • +
  • refactor(core): Only display custom item template container when itemTemplate is provided.
  • +
+

8.0.0-beta.4

+
    +
  • feat(core): Add contentVisibilityAuto option to set the proper content-visibility and contain-intrinsic-size value on all gallery items/thumbs, in 73b20a9.
  • +
  • feat(core): Use native loading attribute on all img and iframe for native lazy loading.
  • +
  • refactor(core): Fix loop issue when sliding with using the mouse, in 1572bea.
  • +
  • refactor(core): Remove lazy-image directive.
  • +
+

8.0.0-beta.3

+
    +
  • fix(core): Set current index in sliding event does not work if slider size number has fraction, in 58e89fb.
  • +
+

8.0.0-beta.2

+
    +
  • fix(lightbox): close button is not displayed, in 506249b.
  • +
+

8.0.0-beta.1

+
    +
  • feat(core): Use scrolling slider instead of transform method, allows touchpad scroll to slide the gallery as well as native sliding on mobile browser.
  • +
  • feat(core): Add resizeDebounceTime option which is used to update the gallery on window resize event in 34a2723 and d867630.
  • +
  • feat(core): Add slidingEase and slidingDuration to customize sliding ease and duration in 4c1db03.
  • +
  • feat(core): Add thumbDetached to detach thumb slider, closes #289 in 1f47484.
  • +
  • feat(core): Add boxTemplate to the gallery, closes #487 in f46e33a.
  • +
  • feat(core): Add slidingDisabled and thumbSlidingDisabled options to enable/disable sliding on Mobile and Desktop using the touchpad. in 2451581.
  • +
  • feat(core): Add mouseSlidingDisabled and mouseThumbSlidingDisabled options to enable/disable sliding on Desktop using the mouse. in 2451581.
  • +
  • feat(core): Images not shown, when number of images get larger, closes #484 in e819ebe.
  • +
  • fix(core): thumbView="contain" Sliding thumbnails using gestures has an issue, closes #417 in e819ebe.
  • +
  • refactor(core): Remove thumbMode option from the gallery, in 18f71e3
  • +
  • refactor(core): Remove tapClick event and use native click event, in 3d960cc.
  • +
  • refactor(core): Remove ng-content from the gallery, in 63e3b6b.
  • +
  • refactor(core): Remove panSensitivity option, in d1f8d34.
  • +
  • refactor(core): Remove gestures option, in 70cb00c.
  • +
  • refactor(core): Remove reserveGesturesAction option, in 4b07fc7.
  • +
  • refactor(core): Remove zoomOut option, in 19ba2b8.
  • +
+

Breaking changes:

+

HammerJs is only used for sliding using the mouse on desktop only, Sliding on mobile devices is now native scroll.

+
    +
  • gestures option has been deprecated.
  • +
  • thumbMode option has been deprecated, sliding thumbnails is free.
  • +
  • zoomOut has been deprecated.
  • +
  • reserveGesturesAction has been deprecated.
  • +
  • panSensitivity has been deprecated.
  • +
  • Remove ng-content from the gallery, use boxTemplate option to add your custom layer.
  • +
  • The default value for loadingStrategy option has changed to LoadingStrategy.Preload.
  • +
  • Added new dependency bezier-easing.
  • +
+

7.1.2

+
    +
  • fix(core): Fix reserveGestureAction input and its default value in the lightbox, in ba95036.
  • +
  • fix(core): Update gallery sliding position properly on window resize, in f786d0a.
  • +
  • fix(core): Slide bug with touch scroll with gallery thumbnails, related to #465 in eb1e60c in a26d63f.
  • +
+

7.1.1

+
    +
  • feat(core): New option reserveGesturesAction adds the ability to block the scrolling of page when sliding the gallery on mobile browser, closes #477 in c105f21.
  • +
  • fix(core): Slide bug with touch scroll, closes #465 in eb1e60c.
  • +
+

7.1.0

+
    +
  • feat(core): Settings change shouldn't require restart, closes #466 in ee71e52.
  • +
  • fix(core): Unable to drag thumbnails properly, closes 473 in 8635701.
  • +
  • fix(core): Setting gestures to false breaks the gallery, closes #464, #467 and #469 in a374603.
  • +
  • fix(core): Set alt on gallery thumbnails and add role="button" to gallery nav, closes #468 in 57bebca.
  • +
  • fix(lightbox): Close icon in lightbox container being re-rendered all the time due to bug in template, closes #307 in 6bdc7a4.
  • +
  • enhance(core, lightbox): Remove deprecated usage, in 23506eb.
  • +
+

7.0.4

+
    +
  • fix(core): imageSize option when set to contain, in 3ecf94e.
  • +
+

7.0.3

+
    +
  • enhance(core): Use img element instead of div background image to display images, in b6b5120.
  • +
  • feat(core): Add alt property to GalleryImage, in b6b5120.
  • +
+

7.0.2

+
    +
  • fix(core): Should not show sliding effect on initial state, closes #458 in c810039.
  • +
+

7.0.1

+
    +
  • feat(core): Avoid triggering change detection while dragging in 8ed5948.
  • +
  • fix(core): Gallery thumbs vertical slider does not navigate when direction is up, closes #454 in 4eb7d2f.
  • +
+

7.0.0

+
    +
  • Update to Angular 14 in 64d5620.
  • +
+

6.0.1

+
    +
  • fix: Downgrade rxjs peerDependencies to v6 in 35f58fd.
  • +
+

6.0.0

+
    +
  • Update to Angular 13, closes #424 in #420.
  • +
+

5.1.1

+

Adds a new option to the global config as well as an input called thumbView which is expects a value of either default or contain

+
    +
  • feat(core): Thumbnails should always use the available space, closes #340 in ad3e514 and 5523b2e.
  • +
  • feat(core): Add stateSnapshot property to GalleryRef to get an instant snapshot of the gallery state observable.
  • +
  • fix(core): Video item displays the application instead of video, closes #398 in f07c304.
  • +
  • fix(core): Issue with gallery.remove() function, closes #405 in f0fb1c3 and 6e080b4.
  • +
+
+

Special thanks to @NexGenUA for his PR

+
+

5.0.0

+
    +
  • Upgrade to Angular 10.
  • +
  • feat(Lightbox): Add start/exit animation options, closes #346 in 6799a1c.
  • +
  • feat(video item): ability to disable video controls, in f6b48b1.
  • +
  • feat(video item, youtube item): Ability to autoplay, closes #304 in 9caf8bf.
  • +
  • feat(youtube item): Allow url parameters, closes #302 in 3760789.
  • +
  • fix(lightbox): Remove cdk styles import from the library.
  • +
  • fix(video item): Cannot read property 'nativeElement' of undefined, closes #353 in ff10363.
  • +
  • fix(video item): Sanitized urls not working in
  • +
+

5.0.0-beta.1

+
    +
  • Upgrade to Angular 9.
  • +
  • Combine all packages in one package.
  • +
  • Remove import HttpClientModule from GalleryModule.
  • +
+

Breaking changes

+

Before:

+
    +
  • The packages were published on @ngx-gallery/core, @ngx-gallery/lightbox and @ngx-gallery/gallerize.
  • +
+

After:

+
    +
  • All the packages are now combined in ng-gallery (NOTE: it is not ngx-gallery that is a different package).
  • +
  • Import GalleryMlodule from ng-gallery and LightboxModule from ng-gallery/lightbox.
  • +
  • The module GallerizeModule has been removed, the [gallerize] directive can still be used from the LightboxModule.
  • +
+

5.0.0-beta.0

+
    +
  • regret: Remove mode=intermediate option, closes #309 and #297 in b1df18c.
  • +
+

Breaking changes (There could be more breaking changes until version 5 is released which will make it compatible with Angular 9 and ivy)

+
    +
  • The loadingMode option has been removed from the gallery component's input and from the global options.
  • +
+

4.0.3

+
    +
  • fix(core): Fix universal error, closes #262 in fc6c3f7.
  • +
  • fix(core): clean up state subject in <gallery-image> component in 7796b50.
  • +
+

4.0.2-beta.0

+
    +
  • feat(core): Add thumbLoadingIcon and thumbLoadingError to gallery config, in 3f8cdca and f2cae92.
  • +
  • refactor(core): refactor the if/else logic in gallery image template, in f7d6a22.
  • +
+

4.0.1

+
    +
  • fix(core): Encapsulate the cache interceptor to gallery images only, closes #237 in 4616eec.
  • +
+

4.0.0

+
    +
  • feat(gallerize): Scan imageSrc and thumbSrc attributes for image sources, in 4826d52.
  • +
  • enhance(core, lightbox, gallerize): Ability to lazy load the library.
  • +
  • enhance(core, lightbox): Export GALLERY_CONFIG and LIGHTBOX_CONFIG tokens, in 56c704f and 9cab04b.
  • +
  • fix(core, lightbox): Add Optional() on injected config in gallery and lightbox services, closes #234 in 31624f9.
  • +
  • refactor(core, lightbox): Rename forRoot(config?) to withConfig(config), in 8446c1a.
  • +
  • refactor(lightbox): Remove providedIn: 'root' from Lightbox service and provid it locally in its module, in 7ba8dd9.
  • +
+

Breaking Changes

+
    +
  • The function forRoot() has been removed from GalleryModule and LightboxModule.
  • +
  • Use GalleryModule.withConfig({ ... }) to set config that applies on a module and its children (same applies on LightboxModule).
  • +
  • To set global config across the entire app while still lazy load the library, provide the GALLERY_CONFIG token with the config value in the root module (same applies on LightboxModule with LIGHTBOX_CONFIG).
  • +
+
Example: Lazy load the library
+

In this example, will set global config without importing the library in the main bundle

+
    +
  • Provide GALLERY_CONFIG value in the root module
  • +
+
import { GALLERY_CONFIG } from '@ngx-gallery/core';
+
+@NgModule({
+  providers: [
+    {
+      provide: GALLERY_CONFIG,
+      useValue: {
+        dots: true,
+        imageSize: 'cover'
+      }
+    }
+  ]
+})
+export class AppModule { }
    +
  • Import GalleryModule in a feature module
  • +
+
import { GalleryModule } from '@ngx-gallery/core';
+
+@NgModule({
+  imports: [
+    GalleryModule
+  ]
+})
+export class FeatureModule { }

4.0.0-beta.1

+
    +
  • feat(core): Add indeterminate option to the radial progress, in df682c4.
  • +
  • enhance(core): Enhance thumbnails loading styles, in f34f90a.
  • +
  • fix(core): Expose [dotSize], [bulletsPosition] and [counterPosition] options as inputs, in 946a856.
  • +
  • fix(core): Add [loadingMode] option to gallery images which accepts determinate or indeterminate , in e8bdfb2.
  • +
  • regression(core): Fix undisplayed thumb image when a custom thumb template is used, in 34f2cc6.
  • +
  • enhance(gallerize): Run gallerize detector outside angular zone, makes opening the lightbox smoother, in 284925d and 98901b9.
  • +
+

4.0.0-beta.0

+
    +
  • update(core, lightbox, gallerize): Update peer dependencies, closes #228 in bd8cdd3.

    +
  • +
  • feat(core): Add bulletsPosition option, closes #211 in 263d297.

    +
  • +
  • feat(core): Add dotsSize option, in e2e58b6.

    +
  • +
  • feat(core): Add counterPosition option, closes in ce7a8ad.

    +
  • +
  • feat(core): Use HttpClient to load and cache images in [lazyImage] directive, in 15c3e88.

    +
  • +
  • feat(core): Replace icon loader with a new radial progress component to report image loading progress while keeping the svg loading icon as an option, in a1028e8.

    +
  • +
  • feat(core): Add default error template to <gallery-image> in case if loading failed and add loadingError option for custom error template, in cd258f5 and 9dbf6c4.

    +
  • +
  • enhance(core): Enhance gallery dots styles, in de8d22b.

    +
  • +
  • enhance(core): Allow gallery image to use unsafe URLs, closes #218 in da1ace1.

    +
  • +
  • enhance(core): Use animationFrameScheduler for smoother sliding animation, in 38b0aa6.

    +
  • +
  • fix(core): Fix vertical scroll when using the gallery on touch devices, closes #161 in a239c29. (kudos goes to @harm-less)

    +
  • +
  • refactor(core): [lazyImage] directive => (loaded) event no longer emits on error.

    +
  • +
  • feat(lightbox): Set the focus back on the previously focused element when the lightbox is closed, in 266eddb.

    +
  • +
  • feat(lightbox): Add role, ariaLabel, ariaLabelledBy and ariaDescribedBy attributes to the lightbox config LightboxConfig, in a11d20d, 5b550e7.

    +
  • +
  • enhance(lightbox): Import overlay default styles from @angular/cdk/overlay, in 54c5d88.

    +
  • +
  • enhance(lightbox): Improve lightbox styles, in 4a52161.

    +
  • +
  • enhance(lightbox): Update lightbox overlay animation, closes #224 in bec077f.

    +
  • +
  • refactor(lightbox): Use disposeOnNavigation instead of Location service, in 2262164.

    +
  • +
+

3.3.1

+
    +
  • fix(core): Remove duplicate delete execution in the destroyer function, in ae541ca
  • +
  • fix(core): Check galleryRef exists before deleting, in a2b32e2
  • +
  • fix(core): Remove duplicate config set, in 834c001
  • +
  • fix(core): Remove unnecessary PortalModule import from GalleryModule, in 46ef735
  • +
  • refactor(core): Use povidedIn: 'root' for the Gallery service, in 86eeaa7
  • +
  • fix(core, lightbox): Fix peer dependencies, in 236e540.
  • +
+

3.3.0

+
    +
  • refactor(core): Use Map<string, GalleryRef> for instances holder type instead of untyped object in ac08077.
  • +
  • refactor(core): Rename gallery state$ and config$ to state and config in 8de515b and 1e4fd06.
  • +
  • enhance(core): Improve instance destroyer, gallery delete its instance on component destroy in 65f3358.
  • +
+

Breaking Changes

+
    +
  • Gallery can now be destroyed using its instance galleryRef.destroy().
  • +
  • In Gallery service the function destroy() has been removed.
  • +
+

3.2.0

+
    +
  • feature(core): Do not require importing global styles, closes #197 in ea041a5.
  • +
  • feature(core): Set the video type attribute on videos items, closes #199 in 06b3601.
  • +
  • feature(lightbox): Add a lightbox directive, closes #200 in ad2255b.
  • +
  • fix(gallery): fix LazyImage error event, closes #205 in db231aa
  • +
+

Breaking changes

+
    +
  • No need to manually import the styles anymore, they are imported internally with the components.

    +
  • +
  • Adding a video item with multiple url sources

    +

    Before:

    +
  • +
+
galleryRef.addVideo({
+  src: ['MP4_URL', 'OGG_URL'],
+  thumb: '(OPTIONAL)VIDEO_THUMBNAIL_URL',
+  poster: '(OPTIONAL)VIDEO_POSTER_URL'
+});

After:

+
galleryRef.addVideo({
+  src: [
+    { url: 'MP4_URL', type: 'video/mp4' },
+    { url: 'OGG_URL', type: 'video/ogg' }
+  ],
+  thumb: '(OPTIONAL)VIDEO_THUMBNAIL_URL',
+  poster: '(OPTIONAL)VIDEO_POSTER_URL'
+});

3.1.2

+
    +
  • fix(Lightbox): Check if location is defined before subscribing, closes #189 in 169b813.
  • +
+

3.1.1

+
    +
  • refactor(core): Convert imageSize attribute to an input + add it to gallery config, this makes it possible to use it in lightbox mode, closes #183 in 1fc70c4.
  • +
  • refactor(core): Make contain as the default value for imageSize option, in c7b3d39.
  • +
+

3.1.0

+
    +
  • feat(core): Add auto-play option, in e7fc03f.
  • +
  • feat(core): Add support for error handling, closes #154 in 12f6e5e.
  • +
  • refactor(core): Remove opacity transition from gallery-item, in a5b227e.
  • +
  • refactor(core): Use imageSize as an attribute, in 96c5c07.
  • +
  • refactor(core): Rename (player) output to (playingChange), in e209493.
  • +
  • enhance(core): Use default cursor when thumbnails are disabled, in 3582e95.
  • +
  • fix(core): fix vertical sliding direction, in cba5d59.
  • +
  • fix(core): fix thumbClick Output, in a730116.
  • +
+

3.1.0-beta.0

+ +
    +
  • feat(core): Add thumbMode option on thumbnails' slider (free scroll thumbnails), closes #135 in 8c6c99d.
  • +
  • feat(core): Add slide show player option, closes #152 in a331f46.
  • +
  • enhance(core): Ability to Import gallery styles individually #144 in ebb6667.
  • +
  • enhance(core): Run HammerJS gestures outside angular zone 6fabf6c.
  • +
  • enhance(core): Put SCSS and CSS each in its own folder, close #153 in 9783fc3.
  • +
  • enhance(core): Check if loadingSvg is defined before embedding it, close #150 in 5286640.
  • +
  • fix(core): fix wrong (thumbClick) emitter.
  • +
  • fix(core): fix gallery slider width which is set to 0 at the beginning, closes #151 in c26a286.
  • +
  • refactor(core): Set loop option to true by default.
  • +
  • refactor(core): Remove fluid option from gallery config and use it as an attribute instead. fixed in ecf3f88.
  • +
+ +
    +
  • feat(Lightbox): Close the lightbox when the location is changed, closes #108 in 1543374.
  • +
+

Breaking changes:

+ +
    +
  • Fluid option is now used as an attribute, not as an input.
  • +
+

Before:

+
<gallery [fluid]="true"></gallery>

After:

+
<gallery fluid></gallery>
    +
  • Scss and css styles are put each in its own folder
  • +
+

Before:

+
@import '~@ngx-gallery/core/styles/gallery';

After:

+
@import '~@ngx-gallery/core/styles/scss/gallery';
+// or for css
+@import '~@ngx-gallery/core/styles/css/gallery';

3.0.2

+
    +
  • refactor(Lightbox): fix the close button small size on iphone browser.
  • +
  • refactor(Lightbox): use <i> tag instead of <button> tag for the close button.
  • +
  • fix(core): Check if loadingIcon is defined in <gallery-image>, closes #133 and #132 in 24e6e26.
  • +
+

3.0.1

+
    +
  • feat(core): Allow using custom gallery item with custom template, closes #125 in 7e4c302.
  • +
+

3.0.0

+
    +
  • fix(Lightbox): Close the lightbox when the active route is changed #108 in d099abd.
  • +
+

3.0.0-beta.1

+
    +
  • refactor(core): add the loop input to gallery component, closes #98 in 727a4ca.
  • +
+

3.0.0-beta.0

+

Features:

+
    +
  • Support Angular 6 and RxJS 6, closes #91.
  • +
  • feat(core): Add helper functions to add different gallery items on <gallery> and GalleryRef.
  • +
  • feat(core): Add fluid option to gallery for full width size.
  • +
  • feat(core): Add navIcon option to gallery config to set a custom nav icon.
  • +
  • feat(core): AddloadingStrategy option to gallery which accepts one of the following: 'preload', 'lazy' or 'default', closes #87.
  • +
  • feat(core): Add itemClick output which emits when an item is clicked, closes #106.
  • +
  • feat(core): Support custom template inside the default item templates, add itemTemplate and thumbTemplate to gallery options.
  • +
  • feat(core): Multiple video sources support.
  • +
  • feat(core): Pause Video and Youtube items when active item changes.
  • +
  • feat(Gallerize): Add support to detect Gallery component.
  • +
  • feat(Gallerize): Add support to detect DOM background images.
  • +
+

Bug fixes:

+
    +
  • fix(core): Skip re-setting the config from <gallery> input in lightbox mode, closes #104.
  • +
  • fix(core): Fix wrong thumbnail position when [thumbPosition] is changed.
  • +
+

Improvements:

+
    +
  • refactor(core): Improve icon rendering, use svg element instead of background-image to render the nav icon in <gallery-nav>.
  • +
  • refactor(core): Add .g-active-item on current item and .g-active-thumb on current thumbnail.
  • +
  • refactor(core): Add .g-image-loaded class on <gallery-image> to indicates that the image has been loaded.
  • +
  • refactor(core): Replace loading output with loaded, which emits the image path after it loads.
  • +
  • refactor(core): Set an initial height of 500px.
  • +
  • refactor(core): Replace ImageItem VideoItem YoutubeItem and IframeItem constructor parameters with a single data parameter.
  • +
  • refactor(core, Lightbox): Set aria-label on all buttons.
  • +
  • refactor(Gallerize): Remove forClass input and replace it for selector input.
  • +
  • refactor(Gallerize): Remove CommonModule as it is not needed.
  • +
  • refactor(Styles): Add a prefix to all classes used in the plugin.
  • +
  • refactor(Styles): Add a transition for animate the opacity on current item and thumbnail.
  • +
+

Breaking changes:

+ +
    +
  • Before, To Create an image item, we used to pass the src and the thumbnail separate parameters.
  • +
+
const item: GalleryItem = new ImageItem('IMAGE_SRC', 'THUMB_SRC');
    +
  • After, The parameters are replaced with a single data object.
  • +
+
const item: GalleryItem = new ImageItem({ src: 'IMAGE_SRC', thumb: 'THUMB_SRC' });

Gallerize

+
    +
  • Before, Limiting auto-detection to a specific class used to be done as in the following code:
  • +
+
<div class="grid" gallerize forClass="my-img-class">
+  <img class="my-img-class" src="{{item.src}}">
+</div>
    +
  • After, Now forClass input has been replaced with selector input.
  • +
+
<div class="grid" gallerize selector=".my-img-class">
+  <img class="my-img-class" src="{{imgSource1}}">
+  <div class="my-img-class" [style.background]="'url(' + imgSource2 + ')'">
+</div>

2.1.1

+
    +
  • refactor(Lightbox Style): Clean up.
  • +
  • fix(HammerJS): Don't throw an error if hammer is not defined, just fallback to default.
  • +
  • feat(VideoItem): add a 3rd parameter to VideoItem to set custom poster.
  • +
+
const viewItem = new VideoItem(video.src, video.thumb, video.poster);
    +
  • refactor(core): rename thumbSrc to thumb.
  • +
+

Breaking Changes

+

This won't effect the usage, but you might need to update

+

GalleryItem data object has changed the name of the thumbnail source property from thumbSrc to thumb

+

This would only effect your app if you display the thumbnails list of your gallery items

+

Before

+
<div class="grid">
+  <div  class="grid-item"
+        *ngFor="let item of galleryItems$ | async; let i = index"
+        (click)="lightbox.open(i)">
+    <img class="grid-image" [src]="item.data.thumbSrc">
+  </div>
+</div>

After

+
<div class="grid">
+  <div  class="grid-item"
+        *ngFor="let item of galleryItems$ | async; let i = index"
+        (click)="lightbox.open(i)">
+    <img class="grid-image" [src]="item.data.thumb">
+  </div>
+</div>

2.0.4

+
    +
  • feat(GalleryConfig): add loadingIcon to GalleryConfig that accepts inline image.
  • +
+

2.0.3

+
    +
  • fix(Lightbox): Exit animation, closes #73.
  • +
  • fix(Lightbox): close button is clicking behind, closes #54.
  • +
  • refactor(Lightbox): Use the button tag instead of div for close button.
  • +
+

2.0.2

+
    +
  • enhancement(Gallerize): Use MutationObserver instead of ngAfterContentChecked to prevent infinite loop in default change detection strategy, closes #70.
  • +
+

2.0.1

+
    +
  • feat(GallerySlider): Rearrange slider on window resize, closes #67.
  • +
+

2.0.0

+
    +
  • fix(Swiping): Remove ngZone, closes #64.
  • +
+

2.0.0-beta.4

+
    +
  • feat(LightboxConfig): Adds fullscreen option to the lightbox, closes #43.
  • +
+

By default fullscreen is obtained on small screen (mobile) but now you can make it as default for all screens

+
GalleryModule.forRoot()
+LightboxModule.forRoot({
+  panelClass: 'fullscreen'
+})
    +
  • feat(Lightbox): Ability to define lightbox config using lightbox.open() method
  • +
+
openLightbox() {
+  this.lightbox.open(0, 'lightbox', {
+    panelClass: 'fullscreen'
+  });
+}

2.0.0-beta.3

+
    +
  • Prevents native click event bubbling, closes #57
  • +
+

2.0.0-beta

+

Written from scratch

+

1.0.1

+
    +
  • fix double click on thumbnails and bullets, closes #45.
  • +
+

1.0.0

+

Fixes:

+
    +
  • fix(GalleryNav): Hide navigation on panning.
  • +
  • fix(GalleryPlayer): Wait until image is loaded before starting the timer.
  • +
+

Features:

+
    +
  • feat(GalleryPlayer): Add progressbar color option.
  • +
  • feat(GalleryPlayer): Add progressbar thickness option.
  • +
  • feat(GalleryPlayer): Add position option top and bottom.
  • +
  • feat(GalleryActions): Add gallery events
  • +
  • feat(GalleryNav): Add prevClass and nextClass options to customize navigation icons
  • +
  • feat(classNames) Add className option to container, thumbnails, bullets
  • +
+

Performance Improvements:

+
    +
  • refactor(GalleryThumbnail) improve performance
  • +
+

Breaking Changes:

+
    +
  • refactor(GalleryConfig): rename config.thumbnails.space to config.thumbnails.margin
  • +
  • refactor(GalleryBullets): remove vertical positioning right and left
  • +
+

1.0.0-beta.8

+
    +
  • fix(keyboard listener in lightbox) closes #24, #33.
  • +
  • refactor(Gallerize directive) Use MutationObserver instead of DOMSubtreeModified, closes #26.
  • +
  • fix(Universal support), closes #9.
  • +
  • fix Angular 5 warning, closes #21.
  • +
  • Improve gallery lightbox, closes #20.
  • +
  • Improve gallery lightbox slide animation, closes #8.
  • +
  • Use Angular CDK for the gallery lightbox.
  • +
  • refactor(GalleryConfig)
  • +
  • Remove image transition animation option because it was not implemented properly.
  • +
+

0.7.1

+
    +
  • General refactor
  • +
  • fix(GalleryDirective) apply gallerize only once when content changes
  • +
  • decode gallery nav icons and close button from base64 to decrease the size
  • +
+

0.7.0

+
    +
  • feat(LazyLoad) emit only last selected image.
  • +
  • fix(GalleryImage) fade animation is working properly with image load.
  • +
  • refactor(GalleryConfig)
  • +
+

0.6.3

+
    +
  • fix(GalleryModal) close button is hidden on mobile, closes #9
  • +
  • fix umd bundle for systemjs, closes #10
  • +
+

0.6.2

+
    +
  • fix(gestures) remove navigation element on mobile which was blocking gestures events
  • +
  • fix(gestures) enable/disable gestures using config.gestures
  • +
  • refactor(config) interfaces
  • +
+

0.6.0 beta

+
    +
  • Add popup animation for gallery modal
  • +
  • Remove incorrect slide animation
  • +
  • Make gestures optional, closes #2
  • +
  • Remove thumbnail vertical position (right and left) positions, closes #3
  • +
+

0.5.2 beta

+
    +
  • (feat) gestures support
  • +
  • (refactor) gallery config
  • +
+

0.5.0 beta

+
    +
  • Initial release
  • +
+ + + + + + + + + + + + + + + + + + + + +
+
+

results matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ActiveItemObserver.html b/documentation/classes/ActiveItemObserver.html new file mode 100644 index 00000000..e2ee6791 --- /dev/null +++ b/documentation/classes/ActiveItemObserver.html @@ -0,0 +1,320 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +

    +

    File

    +

    +

    + projects/ng-gallery/src/lib/observers/active-item-observer.ts +

    + + + + + + +
    +

    Index

    + + + + + + + + + + + + + + + +
    +
    Methods
    +
    + +
    +
    + + + +
    + +

    + Methods +

    + + + + + + + + + + + + + + + + + + + +
    + + + observe + + +
    +observe(root: HTMLElement, elements: HTMLElement[], rootMargin: string) +
    + +
    + +
    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeOptional
    root + HTMLElement + + No +
    elements + HTMLElement[] + + No +
    rootMargin + string + + No +
    +
    +
    +
    +
    + Returns : Observable<number> + +
    +
    + +
    +
    +
    + + + + + +
    + + +
    +
    import { Observable, Subscriber, mergeMap, filter, map } from 'rxjs';
    +
    +export class ActiveItemObserver {
    +
    +  observe(root: HTMLElement, elements: HTMLElement[], rootMargin: string): Observable<number> {
    +    return createIntersectionObserver(root, elements, rootMargin).pipe(
    +      map((entry: IntersectionObserverEntry) => {
    +        if (entry.isIntersecting) {
    +          entry.target.classList.add('g-item-highlight');
    +          return +entry.target.getAttribute('galleryIndex');
    +        } else {
    +          entry.target.classList.remove('g-item-highlight');
    +          return -1;
    +        }
    +      }),
    +      filter((index: number) => index !== -1)
    +    );
    +  }
    +}
    +
    +function createIntersectionObserver(root: HTMLElement, elements: HTMLElement[], rootMargin: string): Observable<IntersectionObserverEntry> {
    +  return new Observable((observer: Subscriber<IntersectionObserverEntry[]>) => {
    +    const intersectionObserver: IntersectionObserver = new IntersectionObserver(
    +      (entries: IntersectionObserverEntry[]) => observer.next(entries),
    +      {
    +        root,
    +        rootMargin,
    +        threshold: 1
    +      }
    +    );
    +    elements.forEach((element: HTMLElement) => intersectionObserver.observe(element));
    +    return () => {
    +      elements.forEach((element: HTMLElement) => intersectionObserver.unobserve(element));
    +      intersectionObserver.disconnect();
    +    };
    +  }).pipe(
    +    mergeMap((entries: IntersectionObserverEntry[]) => entries)
    +  );
    +}
    +
    +
    +
    +
    + + + + + + + + +
    +
    +

    results matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/GalleryRef.html b/documentation/classes/GalleryRef.html new file mode 100644 index 00000000..8a540ad0 --- /dev/null +++ b/documentation/classes/GalleryRef.html @@ -0,0 +1,2182 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + + +
      +
      +

      +

      File

      +

      +

      + projects/ng-gallery/src/lib/services/gallery-ref.ts +

      + + + + + + +
      +

      Index

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      Properties
      +
      + +
      +
      Methods
      +
      + +
      +
      Accessors
      +
      + +
      +
      + +
      +

      Constructor

      + + + + + + + + + + + + + +
      +constructor(config: GalleryConfig, deleteInstance: () => void) +
      + +
      +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      config + GalleryConfig + + No +
      deleteInstance + function + + No +
      +
      +
      +
      + +
      + +

      + Properties +

      + + + + + + + + + + + + + + + + + +
      + + + Private + Readonly + _config + + +
      + Type : BehaviorSubject<GalleryConfig> + +
      + +
      +

      Stream that emits gallery config

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Private + Readonly + _state + + +
      + Type : BehaviorSubject<GalleryState> + +
      + +
      +

      Stream that emits gallery state

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Readonly + config + + +
      + Type : Observable<GalleryConfig> + +
      + +
      +

      Stream that emits gallery config

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Readonly + error + + +
      + Default value : new Subject<GalleryError>() +
      + +
      +

      Stream that emits on an error occurs

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Readonly + itemClick + + +
      + Default value : new Subject<number>() +
      + +
      +

      Stream that emits on item click

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Readonly + state + + +
      + Type : Observable<GalleryState> + +
      + +
      +

      Stream that emits gallery state

      +
      +
      + + + + + + + + + + + + + + + + + +
      + + + Readonly + thumbClick + + +
      + Default value : new Subject<number>() +
      + +
      +

      Stream that emits on thumbnail click

      +
      +
      +
      + +
      + +

      + Methods +

      + + + + + + + + + + + + + + + + + + + +
      + + + add + + +
      +add(item: GalleryItem, active?: boolean) +
      + +
      +

      Add gallery item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      item + GalleryItem + + No +
      active + boolean + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + addIframe + + +
      +addIframe(data: IframeItemData, active?: boolean) +
      + +
      +

      Add iframe item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      data + IframeItemData + + No +
      active + boolean + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + addImage + + +
      +addImage(data: ImageItemData, active?: boolean) +
      + +
      +

      Add image item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      data + ImageItemData + + No +
      active + boolean + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + addVideo + + +
      +addVideo(data: VideoItemData, active?: boolean) +
      + +
      +

      Add video item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      data + VideoItemData + + No +
      active + boolean + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + addYoutube + + +
      +addYoutube(data: YoutubeItemData, active?: boolean) +
      + +
      +

      Add Youtube item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      data + YoutubeItemData + + No +
      active + boolean + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + destroy + + +
      +destroy() +
      + +
      +

      Destroy gallery

      +
      + +
      + Returns : void + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + load + + +
      +load(items: GalleryItem[]) +
      + +
      +

      Load items and reset the state

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      items + GalleryItem[] + + No +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + next + + +
      +next(behavior: ScrollBehavior, loop: boolean) +
      + +
      +

      Next item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptionalDefault value
      behavior + ScrollBehavior + + No + + this._config.value.scrollBehavior +
      loop + boolean + + No + + true +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + play + + +
      +play(interval?: number) +
      + +
      +

      Start gallery player

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      interval + number + + Yes +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + prev + + +
      +prev(behavior: ScrollBehavior, loop: boolean) +
      + +
      +

      Prev item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptionalDefault value
      behavior + ScrollBehavior + + No + + this._config.value.scrollBehavior +
      loop + boolean + + No + + true +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + remove + + +
      +remove(i: number) +
      + +
      +

      Remove gallery item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      i + number + + No +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + reset + + +
      +reset() +
      + +
      +

      Reset gallery to initial state

      +
      + +
      + Returns : void + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + set + + +
      +set(i: number, behavior: ScrollBehavior) +
      + +
      +

      Set active item

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeOptionalDefault value
      i + number + + No + +
      behavior + ScrollBehavior + + No + + this._config.value.scrollBehavior +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + setConfig + + +
      +setConfig(config: GalleryConfig) +
      + +
      +

      Set gallery config

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      config + GalleryConfig + + No +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + Private + setState + + +
      + + setState(state: GalleryState) +
      + +
      +

      Set gallery state

      +
      + +
      + Parameters : + + + + + + + + + + + + + + + + + + + +
      NameTypeOptional
      state + GalleryState + + No +
      +
      +
      +
      +
      + Returns : void + +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + +
      + + + stop + + +
      +stop() +
      + +
      +

      Stop gallery player

      +
      + +
      + Returns : void + +
      +
      +
      + + + + + +
      +

      + Accessors +

      + + + + + + + + + + + + + + +
      + + stateSnapshot +
      + getstateSnapshot() +
      + +
      + + + + + + + + + + + + + + +
      + + configSnapshot +
      + getconfigSnapshot() +
      + +
      + + + + + + + + + + + + + + + + + +
      + + initialized +
      + getinitialized() +
      + +
      +

      Stream that emits when gallery is initialized/reset

      +
      + +
      + Returns : Observable<GalleryState> + +
      +
      + + + + + + + + + + + + + + + + + +
      + + itemsChanged +
      + getitemsChanged() +
      + +
      +

      Stream that emits when items is changed (items loaded, item added, item removed)

      +
      + +
      + Returns : Observable<GalleryState> + +
      +
      + + + + + + + + + + + + + + + + + +
      + + indexChanged +
      + getindexChanged() +
      + +
      +

      Stream that emits when current item is changed

      +
      + +
      + Returns : Observable<GalleryState> + +
      +
      + + + + + + + + + + + + + + + + + +
      + + playingChanged +
      + getplayingChanged() +
      + +
      +

      Stream that emits when the player should start or stop

      +
      + +
      + Returns : Observable<GalleryState> + +
      +
      +
      +
      + + +
      +
      import { BehaviorSubject, Subject, Observable, filter } from 'rxjs';
      +import { defaultState } from '../utils/gallery.default';
      +import { GalleryError, GalleryItem, GalleryState } from '../models/gallery.model';
      +import { GalleryConfig } from '../models/config.model';
      +import { GalleryAction } from '../models/constants';
      +import {
      +  IframeItem,
      +  IframeItemData,
      +  ImageItem,
      +  ImageItemData,
      +  VideoItem,
      +  VideoItemData,
      +  YoutubeItem,
      +  YoutubeItemData
      +} from '../components/templates/items.model';
      +
      +const filterActions = (actions: string[]) => {
      +  return filter((state: GalleryState) => actions.indexOf(state.action) > -1);
      +};
      +
      +export class GalleryRef {
      +
      +  /** Stream that emits gallery state */
      +  private readonly _state: BehaviorSubject<GalleryState>;
      +
      +  /** Stream that emits gallery config */
      +  private readonly _config: BehaviorSubject<GalleryConfig>;
      +
      +  /** Stream that emits on item click */
      +  readonly itemClick = new Subject<number>();
      +
      +  /** Stream that emits on thumbnail click */
      +  readonly thumbClick = new Subject<number>();
      +
      +  /** Stream that emits on an error occurs */
      +  readonly error = new Subject<GalleryError>();
      +
      +  /** Gallery Events */
      +
      +  /** Stream that emits gallery state */
      +  readonly state: Observable<GalleryState>;
      +
      +  /** Stream that emits gallery config */
      +  readonly config: Observable<GalleryConfig>;
      +
      +  get stateSnapshot(): GalleryState {
      +    return this._state.value;
      +  }
      +
      +  get configSnapshot(): GalleryConfig {
      +    return this._config.value;
      +  }
      +
      +  /** Stream that emits when gallery is initialized/reset */
      +  get initialized(): Observable<GalleryState> {
      +    return this.state.pipe(filterActions([GalleryAction.INITIALIZED]));
      +  }
      +
      +  /** Stream that emits when items is changed (items loaded, item added, item removed) */
      +  get itemsChanged(): Observable<GalleryState> {
      +    return this.state.pipe(filterActions([GalleryAction.ITEMS_CHANGED]));
      +  }
      +
      +  /** Stream that emits when current item is changed */
      +  get indexChanged(): Observable<GalleryState> {
      +    return this.state.pipe(filterActions([GalleryAction.INDEX_CHANGED]));
      +  }
      +
      +  /** Stream that emits when the player should start or stop */
      +  get playingChanged(): Observable<GalleryState> {
      +    return this.state.pipe(filterActions([GalleryAction.PLAY, GalleryAction.STOP]));
      +  }
      +
      +  constructor(config: GalleryConfig, private deleteInstance: () => void) {
      +    this._state = new BehaviorSubject<GalleryState>(defaultState);
      +    this._config = new BehaviorSubject<GalleryConfig>(config);
      +    this.state = this._state.asObservable();
      +    this.config = this._config.asObservable();
      +  }
      +
      +  /**
      +   * Set gallery state
      +   */
      +  private setState(state: GalleryState): void {
      +    this._state.next({ ...this.stateSnapshot, ...state });
      +  }
      +
      +  /**
      +   * Set gallery config
      +   */
      +  setConfig(config: GalleryConfig): void {
      +    this._config.next({ ...this._config.value, ...config });
      +  }
      +
      +  /**
      +   * Add gallery item
      +   */
      +  add(item: GalleryItem, active?: boolean): void {
      +    const items: GalleryItem[] = [...this.stateSnapshot.items, item];
      +    this.setState({
      +      action: GalleryAction.ITEMS_CHANGED,
      +      items,
      +      hasNext: items.length > 1,
      +      currIndex: active ? items.length - 1 : this.stateSnapshot.currIndex
      +    });
      +  }
      +
      +  /**
      +   * Add image item
      +   */
      +  addImage(data: ImageItemData, active?: boolean): void {
      +    this.add(new ImageItem(data), active);
      +  }
      +
      +  /**
      +   * Add video item
      +   */
      +  addVideo(data: VideoItemData, active?: boolean): void {
      +    this.add(new VideoItem(data), active);
      +  }
      +
      +  /**
      +   * Add iframe item
      +   */
      +  addIframe(data: IframeItemData, active?: boolean): void {
      +    this.add(new IframeItem(data), active);
      +  }
      +
      +  /**
      +   * Add Youtube item
      +   */
      +  addYoutube(data: YoutubeItemData, active?: boolean): void {
      +    this.add(new YoutubeItem(data), active);
      +  }
      +
      +  /**
      +   * Remove gallery item
      +   */
      +  remove(i: number): void {
      +    const state: GalleryState = this.stateSnapshot;
      +    const items: GalleryItem[] = [
      +      ...state.items.slice(0, i),
      +      ...state.items.slice(i + 1, state.items.length)
      +    ];
      +    this.setState({
      +      action: GalleryAction.ITEMS_CHANGED,
      +      currIndex: i < 1 ? state.currIndex : i - 1,
      +      items,
      +      hasNext: items.length > 1,
      +      hasPrev: i > 0
      +    });
      +  }
      +
      +  /**
      +   * Load items and reset the state
      +   */
      +  load(items: GalleryItem[]): void {
      +    if (items) {
      +      this.setState({
      +        action: GalleryAction.ITEMS_CHANGED,
      +        items,
      +        hasNext: items.length > 1,
      +        hasPrev: false
      +      });
      +    }
      +  }
      +
      +  /**
      +   * Set active item
      +   */
      +  set(i: number, behavior: ScrollBehavior = this._config.value.scrollBehavior): void {
      +    if (i < 0 || i >= this.stateSnapshot.items.length) {
      +      console.error(`[NgGallery]: Unable to set the active item because the given index (${ i }) is outside the items range!`);
      +      return;
      +    }
      +    if (i !== this.stateSnapshot.currIndex) {
      +      this.setState({
      +        behavior,
      +        action: GalleryAction.INDEX_CHANGED,
      +        currIndex: i,
      +        hasNext: i < this.stateSnapshot.items.length - 1,
      +        hasPrev: i > 0
      +      });
      +    }
      +  }
      +
      +  /**
      +   * Next item
      +   */
      +  next(behavior: ScrollBehavior = this._config.value.scrollBehavior, loop: boolean = true): void {
      +    if (this.stateSnapshot.hasNext) {
      +      this.set(this.stateSnapshot.currIndex + 1, behavior);
      +    } else if (loop && this._config.value.loop) {
      +      this.set(0, behavior);
      +    }
      +  }
      +
      +  /**
      +   * Prev item
      +   */
      +  prev(behavior: ScrollBehavior = this._config.value.scrollBehavior, loop: boolean = true): void {
      +    if (this.stateSnapshot.hasPrev) {
      +      this.set(this.stateSnapshot.currIndex - 1, behavior);
      +    } else if (loop && this._config.value.loop) {
      +      this.set(this.stateSnapshot.items.length - 1, behavior);
      +    }
      +  }
      +
      +  /**
      +   * Start gallery player
      +   */
      +  play(interval?: number): void {
      +    if (interval) {
      +      this.setConfig({ playerInterval: interval });
      +    }
      +    this.setState({ action: GalleryAction.PLAY, isPlaying: true });
      +  }
      +
      +  /**
      +   * Stop gallery player
      +   */
      +  stop(): void {
      +    this.setState({ action: GalleryAction.STOP, isPlaying: false });
      +  }
      +
      +  /**
      +   * Reset gallery to initial state
      +   */
      +  reset(): void {
      +    this.setState(defaultState);
      +  }
      +
      +  /**
      +   * Destroy gallery
      +   */
      +  destroy(): void {
      +    this._state.complete();
      +    this._config.complete();
      +    this.itemClick.complete();
      +    this.thumbClick.complete();
      +    this.deleteInstance();
      +  }
      +
      +}
      +
      +
      +
      + + + + + + + + +
      +
      +

      results matching ""

      +
        +
        +
        +

        No results matching ""

        +
        +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/HorizontalAdapter.html b/documentation/classes/HorizontalAdapter.html new file mode 100644 index 00000000..e26990e4 --- /dev/null +++ b/documentation/classes/HorizontalAdapter.html @@ -0,0 +1,1109 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + + + + + + + + + + + +
        +
        +

        +

        File

        +

        +

        + projects/ng-gallery/src/lib/components/adapters/main-adapters.ts +

        + + + + +

        +

        Implements

        +

        +

        + SliderAdapter +

        + + +
        +

        Index

        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        Properties
        +
        + +
        +
        Methods
        +
        + +
        +
        Accessors
        +
        + +
        +
        + +
        +

        Constructor

        + + + + + + + + + + + + + +
        +constructor(slider: HTMLElement, config: GalleryConfig) +
        + +
        +
        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        slider + HTMLElement + + No +
        config + GalleryConfig + + No +
        +
        +
        +
        + +
        + +

        + Properties +

        + + + + + + + + + + + + + + +
        + + + Public + config + + +
        + Type : GalleryConfig + +
        + +
        + + + + + + + + + + + + + + + + + +
        + + + Readonly + hammerDirection + + +
        + Type : number + +
        + Default value : Hammer?.DIRECTION_HORIZONTAL +
        + +
        + + + + + + + + + + + + + + + + + +
        + + + Readonly + scrollSnapType + + +
        + Type : string + +
        + Default value : 'x mandatory' +
        + +
        + + + + + + + + + + + + + + +
        + + + Public + slider + + +
        + Type : HTMLElement + +
        + +
        +
        + +
        + +

        + Methods +

        + + + + + + + + + + + + + + + + + + + +
        + + + getCentralizerEndSize + + +
        +getCentralizerEndSize() +
        + +
        + +
        + Returns : number + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getCentralizerStartSize + + +
        +getCentralizerStartSize() +
        + +
        + +
        + Returns : number + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getElementRootMargin + + +
        +getElementRootMargin(viewport: HTMLElement, el: HTMLElement) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        viewport + HTMLElement + + No +
        el + HTMLElement + + No +
        +
        +
        +
        +
        + Returns : string + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getHammerValue + + +
        +getHammerValue(value: number, e: any, behavior: ScrollBehavior) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        value + number + + No +
        e + any + + No +
        behavior + ScrollBehavior + + No +
        +
        +
        +
        +
        + Returns : ScrollToOptions + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getHammerVelocity + + +
        +getHammerVelocity(e: any) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        e + any + + No +
        +
        +
        +
        +
        + Returns : number + +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getRootMargin + + +
        +getRootMargin() +
        + +
        + +
        + Returns : string + +
        +
        + + + + + + + + + + + + + + + + + + + +
        + + + getScrollToValue + + +
        +getScrollToValue(el: HTMLElement, behavior: ScrollBehavior) +
        + +
        + +
        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeOptional
        el + HTMLElement + + No +
        behavior + ScrollBehavior + + No +
        +
        +
        +
        +
        + Returns : SmoothScrollToOptions + +
        +
        + +
        +
        +
        + + + + + +
        +

        + Accessors +

        + + + + + + + + + + + + + + +
        + + scrollValue +
        + getscrollValue() +
        + +
        + + + + + + + + + + + + + + +
        + + clientSize +
        + getclientSize() +
        + +
        + + + + + + + + + + + + + + +
        + + isContentLessThanContainer +
        + getisContentLessThanContainer() +
        + +
        +
        +
        + + +
        +
        import { GalleryConfig } from '../../models/config.model';
        +import { SliderAdapter } from './base-adapter';
        +import { SmoothScrollToOptions } from '../../smooth-scroll';
        +
        +declare const Hammer: any;
        +
        +export class HorizontalAdapter implements SliderAdapter {
        +
        +  readonly hammerDirection: number = Hammer?.DIRECTION_HORIZONTAL;
        +
        +  readonly scrollSnapType: string = 'x mandatory';
        +
        +  get scrollValue(): number {
        +    return this.slider.scrollLeft;
        +  }
        +
        +  get clientSize(): number {
        +    return this.slider.clientWidth;
        +  }
        +
        +  get isContentLessThanContainer(): boolean {
        +    return this.clientSize >= this.slider.firstElementChild.clientWidth;
        +  }
        +
        +  constructor(public slider: HTMLElement, public config: GalleryConfig) {
        +  }
        +
        +  getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions {
        +    const position: number = el.offsetLeft - ((this.clientSize - el.clientWidth) / 2);
        +    return {
        +      start: position,
        +      duration: behavior === 'smooth' ? this.config.slidingDuration : 0,
        +      easing: this.config.slidingEase
        +    };
        +  }
        +
        +  getRootMargin(): string {
        +    return `1000px 1px 1000px 1px`;
        +  }
        +
        +  getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {
        +    const rootMargin: number = -1 * ((viewport.clientWidth - el.clientWidth) / 2) + 1;
        +    return `0px ${ rootMargin }px 0px ${ rootMargin }px`;
        +  }
        +
        +  getCentralizerStartSize(): number {
        +    if (this.isContentLessThanContainer) {
        +      const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;
        +      return size / 2;
        +    }
        +    return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientWidth / 2);
        +  }
        +
        +  getCentralizerEndSize(): number {
        +    if (this.isContentLessThanContainer) {
        +      const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;
        +      return size / 2;
        +    }
        +    return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientWidth / 2);
        +  }
        +
        +  getHammerVelocity(e: any): number {
        +    return e.velocityX;
        +  }
        +
        +  getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {
        +    return {
        +      behavior,
        +      left: value - e.deltaX
        +    };
        +  }
        +
        +  // getDraggingProperty(e: MouseEvent): number {
        +  //   return e.clientX;
        +  // }
        +
        +  // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {
        +  //   return {
        +  //     behavior,
        +  //     left: value - delta
        +  //   };
        +  // }
        +}
        +
        +export class VerticalAdapter implements SliderAdapter {
        +
        +  readonly hammerDirection: number = Hammer?.DIRECTION_VERTICAL;
        +
        +  readonly scrollSnapType: string = 'y mandatory';
        +
        +  get scrollValue(): number {
        +    return this.slider.scrollTop;
        +  }
        +
        +  get clientSize(): number {
        +    return this.slider.clientHeight;
        +  }
        +
        +  get isContentLessThanContainer(): boolean {
        +    return this.clientSize >= this.slider.firstElementChild.clientHeight;
        +  }
        +
        +  constructor(public slider: HTMLElement, public config: GalleryConfig) {
        +  }
        +
        +  getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions {
        +    const position: number = el.offsetTop - ((this.clientSize - el.clientHeight) / 2);
        +    return {
        +      top: position,
        +      duration: behavior === 'smooth' ? this.config.slidingDuration : 0,
        +      easing: this.config.slidingEase
        +    };
        +  }
        +
        +  getRootMargin(): string {
        +    return `1px 1000px 1px 1000px`;
        +  }
        +
        +  getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {
        +    const rootMargin: number = -1 * ((viewport.clientHeight - el.clientHeight) / 2) + 1;
        +    return `${ rootMargin }px 0px ${ rootMargin }px 0px`;
        +  }
        +
        +  getCentralizerStartSize(): number {
        +    if (this.isContentLessThanContainer) {
        +      const size = this.clientSize - this.slider.firstElementChild.clientHeight;
        +      return size / 2;
        +    }
        +    return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientHeight / 2);
        +  }
        +
        +  getCentralizerEndSize(): number {
        +    if (this.isContentLessThanContainer) {
        +      const size = this.clientSize - this.slider.firstElementChild.clientHeight;
        +      return size / 2;
        +    }
        +    return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientHeight / 2);
        +  }
        +
        +  getHammerVelocity(e: any): number {
        +    return e.velocityY;
        +  }
        +
        +  getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {
        +    return {
        +      behavior,
        +      top: value - e.deltaY
        +    };
        +  }
        +
        +  // getDraggingProperty(e: MouseEvent): number {
        +  //   return e.clientY;
        +  // }
        +
        +  // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {
        +  //   return {
        +  //     behavior,
        +  //     top: value - delta
        +  //   };
        +  // }
        +}
        +
        +
        +
        + + + + + + + + +
        +
        +

        results matching ""

        +
          +
          +
          +

          No results matching ""

          +
          +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/IframeItem.html b/documentation/classes/IframeItem.html new file mode 100644 index 00000000..acdce5a6 --- /dev/null +++ b/documentation/classes/IframeItem.html @@ -0,0 +1,385 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
          +
          + + +
          +
          + + + + + + + + + + + + + + + + +
          +
          +

          +

          File

          +

          +

          + projects/ng-gallery/src/lib/components/templates/items.model.ts +

          + + + + +

          +

          Implements

          +

          +

          + GalleryItem +

          + + +
          +

          Index

          + + + + + + + + + + + + + + + +
          +
          Properties
          +
          +
            +
          • + Readonly + data +
          • +
          • + Readonly + type +
          • +
          +
          +
          + +
          +

          Constructor

          + + + + + + + + + + + + + +
          +constructor(data: IframeItemData) +
          + +
          +
          + Parameters : + + + + + + + + + + + + + + + + + + +
          NameTypeOptional
          data + IframeItemData + + No +
          +
          +
          +
          + +
          + +

          + Properties +

          + + + + + + + + + + + + + + +
          + + + Readonly + data + + +
          + Type : IframeItemData + +
          + +
          + + + + + + + + + + + + + + +
          + + + Readonly + type + + +
          + Type : GalleryItemType + +
          + +
          +
          + + + + + + + +
          + + +
          +
          import { GalleryItem } from '../../models/gallery.model';
          +import { GalleryItemType, GalleryItemTypes } from '../../models/constants';
          +
          +export class ImageItem implements GalleryItem {
          +  readonly type: GalleryItemType;
          +  readonly data: ImageItemData;
          +
          +  constructor(data: ImageItemData) {
          +    this.data = data;
          +    this.type = GalleryItemTypes.Image;
          +  }
          +}
          +
          +export class VideoItem implements GalleryItem {
          +  readonly type: GalleryItemType;
          +  readonly data: VideoItemData;
          +
          +  constructor(data: VideoItemData) {
          +    this.data = data;
          +    this.type = GalleryItemTypes.Video;
          +  }
          +}
          +
          +export class IframeItem implements GalleryItem {
          +  readonly type: GalleryItemType;
          +  readonly data: IframeItemData;
          +
          +  constructor(data: IframeItemData) {
          +    this.data = data;
          +    this.type = GalleryItemTypes.Iframe;
          +  }
          +}
          +
          +export class YoutubeItem implements GalleryItem {
          +  readonly type: GalleryItemType;
          +  readonly data: YoutubeItemData;
          +
          +  constructor(data: YoutubeItemData) {
          +    this.data = {
          +      ...data,
          +      ...{
          +        src: `https://youtube.com/embed/${ data.src }`,
          +        thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`
          +      }
          +    };
          +    this.type = GalleryItemTypes.Youtube;
          +  }
          +}
          +
          +type GalleryItemModel = {
          +  type?: GalleryItemType;
          +  src?: string | { url: string, type: string }[];
          +  thumb?: string;
          +  args?: any;
          +};
          +
          +export type ImageItemData = GalleryItemModel & {
          +  alt?: string;
          +};
          +
          +export type IframeItemData = GalleryItemModel & {
          +  params?: any;
          +};
          +
          +export type YoutubeItemData = IframeItemData & {
          +  autoplay?: boolean;
          +};
          +
          +export type VideoItemData = GalleryItemModel & {
          +  poster?: string;
          +  loop?: boolean;
          +  // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding
          +  mute?: true;
          +  disablePictureInPicture?: true;
          +  controls?: boolean;
          +  autoplay?: boolean;
          +  preload?: 'none' | 'metadata' | 'auto' | '';
          +  controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
          +  disableRemotePlayback?: boolean;
          +};
          +
          +export type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;
          +
          +export type ItemState = 'success' | 'loading' | 'failed';
          +
          +
          +
          + + + + + + + + +
          +
          +

          results matching ""

          +
            +
            +
            +

            No results matching ""

            +
            +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ImageItem.html b/documentation/classes/ImageItem.html new file mode 100644 index 00000000..14643c34 --- /dev/null +++ b/documentation/classes/ImageItem.html @@ -0,0 +1,385 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
            +
            + + +
            +
            + + + + + + + + + + + + + + + + +
            +
            +

            +

            File

            +

            +

            + projects/ng-gallery/src/lib/components/templates/items.model.ts +

            + + + + +

            +

            Implements

            +

            +

            + GalleryItem +

            + + +
            +

            Index

            + + + + + + + + + + + + + + + +
            +
            Properties
            +
            +
              +
            • + Readonly + data +
            • +
            • + Readonly + type +
            • +
            +
            +
            + +
            +

            Constructor

            + + + + + + + + + + + + + +
            +constructor(data: ImageItemData) +
            + +
            +
            + Parameters : + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            data + ImageItemData + + No +
            +
            +
            +
            + +
            + +

            + Properties +

            + + + + + + + + + + + + + + +
            + + + Readonly + data + + +
            + Type : ImageItemData + +
            + +
            + + + + + + + + + + + + + + +
            + + + Readonly + type + + +
            + Type : GalleryItemType + +
            + +
            +
            + + + + + + + +
            + + +
            +
            import { GalleryItem } from '../../models/gallery.model';
            +import { GalleryItemType, GalleryItemTypes } from '../../models/constants';
            +
            +export class ImageItem implements GalleryItem {
            +  readonly type: GalleryItemType;
            +  readonly data: ImageItemData;
            +
            +  constructor(data: ImageItemData) {
            +    this.data = data;
            +    this.type = GalleryItemTypes.Image;
            +  }
            +}
            +
            +export class VideoItem implements GalleryItem {
            +  readonly type: GalleryItemType;
            +  readonly data: VideoItemData;
            +
            +  constructor(data: VideoItemData) {
            +    this.data = data;
            +    this.type = GalleryItemTypes.Video;
            +  }
            +}
            +
            +export class IframeItem implements GalleryItem {
            +  readonly type: GalleryItemType;
            +  readonly data: IframeItemData;
            +
            +  constructor(data: IframeItemData) {
            +    this.data = data;
            +    this.type = GalleryItemTypes.Iframe;
            +  }
            +}
            +
            +export class YoutubeItem implements GalleryItem {
            +  readonly type: GalleryItemType;
            +  readonly data: YoutubeItemData;
            +
            +  constructor(data: YoutubeItemData) {
            +    this.data = {
            +      ...data,
            +      ...{
            +        src: `https://youtube.com/embed/${ data.src }`,
            +        thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`
            +      }
            +    };
            +    this.type = GalleryItemTypes.Youtube;
            +  }
            +}
            +
            +type GalleryItemModel = {
            +  type?: GalleryItemType;
            +  src?: string | { url: string, type: string }[];
            +  thumb?: string;
            +  args?: any;
            +};
            +
            +export type ImageItemData = GalleryItemModel & {
            +  alt?: string;
            +};
            +
            +export type IframeItemData = GalleryItemModel & {
            +  params?: any;
            +};
            +
            +export type YoutubeItemData = IframeItemData & {
            +  autoplay?: boolean;
            +};
            +
            +export type VideoItemData = GalleryItemModel & {
            +  poster?: string;
            +  loop?: boolean;
            +  // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding
            +  mute?: true;
            +  disablePictureInPicture?: true;
            +  controls?: boolean;
            +  autoplay?: boolean;
            +  preload?: 'none' | 'metadata' | 'auto' | '';
            +  controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
            +  disableRemotePlayback?: boolean;
            +};
            +
            +export type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;
            +
            +export type ItemState = 'success' | 'loading' | 'failed';
            +
            +
            +
            + + + + + + + + +
            +
            +

            results matching ""

            +
              +
              +
              +

              No results matching ""

              +
              +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SliderAdapter.html b/documentation/classes/SliderAdapter.html new file mode 100644 index 00000000..ffc21b13 --- /dev/null +++ b/documentation/classes/SliderAdapter.html @@ -0,0 +1,861 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
              +
              + + +
              +
              + + + + + + + + + + + + + + + + +
              +
              +

              +

              File

              +

              +

              + projects/ng-gallery/src/lib/components/adapters/base-adapter.ts +

              + + + + + + +
              +

              Index

              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              +
              Properties
              +
              + +
              +
              Methods
              +
              + +
              +
              Accessors
              +
              + +
              +
              + + +
              + +

              + Properties +

              + + + + + + + + + + + + + + +
              + + + Readonly + Abstract + hammerDirection + + +
              + Type : number + +
              + +
              + + + + + + + + + + + + + + +
              + + + Readonly + Abstract + scrollSnapType + + +
              + Type : string + +
              + +
              +
              + +
              + +

              + Methods +

              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getCentralizerEndSize + + +
              + + getCentralizerEndSize() +
              + +
              + +
              + Returns : number + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getCentralizerStartSize + + +
              + + getCentralizerStartSize() +
              + +
              + +
              + Returns : number + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getElementRootMargin + + +
              + + getElementRootMargin(viewport: HTMLElement, el: HTMLElement) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              viewport + HTMLElement + + No +
              el + HTMLElement + + No +
              +
              +
              +
              +
              + Returns : string + +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getHammerValue + + +
              + + getHammerValue(value: number, delta: number, behavior: ScrollBehavior) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              value + number + + No +
              delta + number + + No +
              behavior + ScrollBehavior + + No +
              +
              +
              +
              +
              + Returns : ScrollToOptions + +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getHammerVelocity + + +
              + + getHammerVelocity(e) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + +
              NameOptional
              e + No +
              +
              +
              +
              +
              + Returns : number + +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getRootMargin + + +
              + + getRootMargin() +
              + +
              + +
              + Returns : string + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + Abstract + getScrollToValue + + +
              + + getScrollToValue(el: Element, behavior: ScrollBehavior) +
              + +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptional
              el + Element + + No +
              behavior + ScrollBehavior + + No +
              +
              +
              +
              +
              + Returns : ScrollToOptions + +
              +
              + +
              +
              +
              + + + + + +
              +

              + Accessors +

              + + + + + + + + + + + + + + +
              + + scrollValue +
              + getscrollValue() +
              + +
              + + + + + + + + + + + + + + +
              + + clientSize +
              + getclientSize() +
              + +
              + + + + + + + + + + + + + + +
              + + isContentLessThanContainer +
              + getisContentLessThanContainer() +
              + +
              +
              +
              + + +
              +
              export abstract class SliderAdapter {
              +
              +  readonly abstract hammerDirection: number;
              +
              +  readonly abstract scrollSnapType: string;
              +
              +  abstract get scrollValue(): number;
              +
              +  abstract get clientSize(): number;
              +
              +  abstract get isContentLessThanContainer(): boolean;
              +
              +  abstract getScrollToValue(el: Element, behavior: ScrollBehavior): ScrollToOptions;
              +
              +  abstract getCentralizerStartSize(): number;
              +
              +  abstract getCentralizerEndSize(): number;
              +
              +  abstract getRootMargin(): string;
              +
              +  abstract getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string;
              +
              +  abstract getHammerVelocity(e): number;
              +
              +  abstract getHammerValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions;
              +
              +  // abstract getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions;
              +
              +  // abstract getDraggingProperty(e: MouseEvent): number;
              +}
              +
              +
              +
              + + + + + + + + +
              +
              +

              results matching ""

              +
                +
                +
                +

                No results matching ""

                +
                +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/VerticalAdapter.html b/documentation/classes/VerticalAdapter.html new file mode 100644 index 00000000..60684322 --- /dev/null +++ b/documentation/classes/VerticalAdapter.html @@ -0,0 +1,1109 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                +
                + + +
                +
                + + + + + + + + + + + + + + + + +
                +
                +

                +

                File

                +

                +

                + projects/ng-gallery/src/lib/components/adapters/main-adapters.ts +

                + + + + +

                +

                Implements

                +

                +

                + SliderAdapter +

                + + +
                +

                Index

                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                +
                Properties
                +
                + +
                +
                Methods
                +
                + +
                +
                Accessors
                +
                + +
                +
                + +
                +

                Constructor

                + + + + + + + + + + + + + +
                +constructor(slider: HTMLElement, config: GalleryConfig) +
                + +
                +
                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                slider + HTMLElement + + No +
                config + GalleryConfig + + No +
                +
                +
                +
                + +
                + +

                + Properties +

                + + + + + + + + + + + + + + +
                + + + Public + config + + +
                + Type : GalleryConfig + +
                + +
                + + + + + + + + + + + + + + + + + +
                + + + Readonly + hammerDirection + + +
                + Type : number + +
                + Default value : Hammer?.DIRECTION_VERTICAL +
                + +
                + + + + + + + + + + + + + + + + + +
                + + + Readonly + scrollSnapType + + +
                + Type : string + +
                + Default value : 'y mandatory' +
                + +
                + + + + + + + + + + + + + + +
                + + + Public + slider + + +
                + Type : HTMLElement + +
                + +
                +
                + +
                + +

                + Methods +

                + + + + + + + + + + + + + + + + + + + +
                + + + getCentralizerEndSize + + +
                +getCentralizerEndSize() +
                + +
                + +
                + Returns : number + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getCentralizerStartSize + + +
                +getCentralizerStartSize() +
                + +
                + +
                + Returns : number + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getElementRootMargin + + +
                +getElementRootMargin(viewport: HTMLElement, el: HTMLElement) +
                + +
                + +
                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                viewport + HTMLElement + + No +
                el + HTMLElement + + No +
                +
                +
                +
                +
                + Returns : string + +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getHammerValue + + +
                +getHammerValue(value: number, e: any, behavior: ScrollBehavior) +
                + +
                + +
                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                value + number + + No +
                e + any + + No +
                behavior + ScrollBehavior + + No +
                +
                +
                +
                +
                + Returns : ScrollToOptions + +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getHammerVelocity + + +
                +getHammerVelocity(e: any) +
                + +
                + +
                + Parameters : + + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                e + any + + No +
                +
                +
                +
                +
                + Returns : number + +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getRootMargin + + +
                +getRootMargin() +
                + +
                + +
                + Returns : string + +
                +
                + + + + + + + + + + + + + + + + + + + +
                + + + getScrollToValue + + +
                +getScrollToValue(el: HTMLElement, behavior: ScrollBehavior) +
                + +
                + +
                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                NameTypeOptional
                el + HTMLElement + + No +
                behavior + ScrollBehavior + + No +
                +
                +
                +
                +
                + Returns : SmoothScrollToOptions + +
                +
                + +
                +
                +
                + + + + + +
                +

                + Accessors +

                + + + + + + + + + + + + + + +
                + + scrollValue +
                + getscrollValue() +
                + +
                + + + + + + + + + + + + + + +
                + + clientSize +
                + getclientSize() +
                + +
                + + + + + + + + + + + + + + +
                + + isContentLessThanContainer +
                + getisContentLessThanContainer() +
                + +
                +
                +
                + + +
                +
                import { GalleryConfig } from '../../models/config.model';
                +import { SliderAdapter } from './base-adapter';
                +import { SmoothScrollToOptions } from '../../smooth-scroll';
                +
                +declare const Hammer: any;
                +
                +export class HorizontalAdapter implements SliderAdapter {
                +
                +  readonly hammerDirection: number = Hammer?.DIRECTION_HORIZONTAL;
                +
                +  readonly scrollSnapType: string = 'x mandatory';
                +
                +  get scrollValue(): number {
                +    return this.slider.scrollLeft;
                +  }
                +
                +  get clientSize(): number {
                +    return this.slider.clientWidth;
                +  }
                +
                +  get isContentLessThanContainer(): boolean {
                +    return this.clientSize >= this.slider.firstElementChild.clientWidth;
                +  }
                +
                +  constructor(public slider: HTMLElement, public config: GalleryConfig) {
                +  }
                +
                +  getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions {
                +    const position: number = el.offsetLeft - ((this.clientSize - el.clientWidth) / 2);
                +    return {
                +      start: position,
                +      duration: behavior === 'smooth' ? this.config.slidingDuration : 0,
                +      easing: this.config.slidingEase
                +    };
                +  }
                +
                +  getRootMargin(): string {
                +    return `1000px 1px 1000px 1px`;
                +  }
                +
                +  getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {
                +    const rootMargin: number = -1 * ((viewport.clientWidth - el.clientWidth) / 2) + 1;
                +    return `0px ${ rootMargin }px 0px ${ rootMargin }px`;
                +  }
                +
                +  getCentralizerStartSize(): number {
                +    if (this.isContentLessThanContainer) {
                +      const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;
                +      return size / 2;
                +    }
                +    return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientWidth / 2);
                +  }
                +
                +  getCentralizerEndSize(): number {
                +    if (this.isContentLessThanContainer) {
                +      const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;
                +      return size / 2;
                +    }
                +    return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientWidth / 2);
                +  }
                +
                +  getHammerVelocity(e: any): number {
                +    return e.velocityX;
                +  }
                +
                +  getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {
                +    return {
                +      behavior,
                +      left: value - e.deltaX
                +    };
                +  }
                +
                +  // getDraggingProperty(e: MouseEvent): number {
                +  //   return e.clientX;
                +  // }
                +
                +  // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {
                +  //   return {
                +  //     behavior,
                +  //     left: value - delta
                +  //   };
                +  // }
                +}
                +
                +export class VerticalAdapter implements SliderAdapter {
                +
                +  readonly hammerDirection: number = Hammer?.DIRECTION_VERTICAL;
                +
                +  readonly scrollSnapType: string = 'y mandatory';
                +
                +  get scrollValue(): number {
                +    return this.slider.scrollTop;
                +  }
                +
                +  get clientSize(): number {
                +    return this.slider.clientHeight;
                +  }
                +
                +  get isContentLessThanContainer(): boolean {
                +    return this.clientSize >= this.slider.firstElementChild.clientHeight;
                +  }
                +
                +  constructor(public slider: HTMLElement, public config: GalleryConfig) {
                +  }
                +
                +  getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions {
                +    const position: number = el.offsetTop - ((this.clientSize - el.clientHeight) / 2);
                +    return {
                +      top: position,
                +      duration: behavior === 'smooth' ? this.config.slidingDuration : 0,
                +      easing: this.config.slidingEase
                +    };
                +  }
                +
                +  getRootMargin(): string {
                +    return `1px 1000px 1px 1000px`;
                +  }
                +
                +  getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {
                +    const rootMargin: number = -1 * ((viewport.clientHeight - el.clientHeight) / 2) + 1;
                +    return `${ rootMargin }px 0px ${ rootMargin }px 0px`;
                +  }
                +
                +  getCentralizerStartSize(): number {
                +    if (this.isContentLessThanContainer) {
                +      const size = this.clientSize - this.slider.firstElementChild.clientHeight;
                +      return size / 2;
                +    }
                +    return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientHeight / 2);
                +  }
                +
                +  getCentralizerEndSize(): number {
                +    if (this.isContentLessThanContainer) {
                +      const size = this.clientSize - this.slider.firstElementChild.clientHeight;
                +      return size / 2;
                +    }
                +    return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientHeight / 2);
                +  }
                +
                +  getHammerVelocity(e: any): number {
                +    return e.velocityY;
                +  }
                +
                +  getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {
                +    return {
                +      behavior,
                +      top: value - e.deltaY
                +    };
                +  }
                +
                +  // getDraggingProperty(e: MouseEvent): number {
                +  //   return e.clientY;
                +  // }
                +
                +  // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {
                +  //   return {
                +  //     behavior,
                +  //     top: value - delta
                +  //   };
                +  // }
                +}
                +
                +
                +
                + + + + + + + + +
                +
                +

                results matching ""

                +
                  +
                  +
                  +

                  No results matching ""

                  +
                  +
                  +
                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/VideoItem.html b/documentation/classes/VideoItem.html new file mode 100644 index 00000000..aa55a9d9 --- /dev/null +++ b/documentation/classes/VideoItem.html @@ -0,0 +1,385 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                  +
                  + + +
                  +
                  + + + + + + + + + + + + + + + + +
                  +
                  +

                  +

                  File

                  +

                  +

                  + projects/ng-gallery/src/lib/components/templates/items.model.ts +

                  + + + + +

                  +

                  Implements

                  +

                  +

                  + GalleryItem +

                  + + +
                  +

                  Index

                  + + + + + + + + + + + + + + + +
                  +
                  Properties
                  +
                  +
                    +
                  • + Readonly + data +
                  • +
                  • + Readonly + type +
                  • +
                  +
                  +
                  + +
                  +

                  Constructor

                  + + + + + + + + + + + + + +
                  +constructor(data: VideoItemData) +
                  + +
                  +
                  + Parameters : + + + + + + + + + + + + + + + + + + +
                  NameTypeOptional
                  data + VideoItemData + + No +
                  +
                  +
                  +
                  + +
                  + +

                  + Properties +

                  + + + + + + + + + + + + + + +
                  + + + Readonly + data + + +
                  + Type : VideoItemData + +
                  + +
                  + + + + + + + + + + + + + + +
                  + + + Readonly + type + + +
                  + Type : GalleryItemType + +
                  + +
                  +
                  + + + + + + + +
                  + + +
                  +
                  import { GalleryItem } from '../../models/gallery.model';
                  +import { GalleryItemType, GalleryItemTypes } from '../../models/constants';
                  +
                  +export class ImageItem implements GalleryItem {
                  +  readonly type: GalleryItemType;
                  +  readonly data: ImageItemData;
                  +
                  +  constructor(data: ImageItemData) {
                  +    this.data = data;
                  +    this.type = GalleryItemTypes.Image;
                  +  }
                  +}
                  +
                  +export class VideoItem implements GalleryItem {
                  +  readonly type: GalleryItemType;
                  +  readonly data: VideoItemData;
                  +
                  +  constructor(data: VideoItemData) {
                  +    this.data = data;
                  +    this.type = GalleryItemTypes.Video;
                  +  }
                  +}
                  +
                  +export class IframeItem implements GalleryItem {
                  +  readonly type: GalleryItemType;
                  +  readonly data: IframeItemData;
                  +
                  +  constructor(data: IframeItemData) {
                  +    this.data = data;
                  +    this.type = GalleryItemTypes.Iframe;
                  +  }
                  +}
                  +
                  +export class YoutubeItem implements GalleryItem {
                  +  readonly type: GalleryItemType;
                  +  readonly data: YoutubeItemData;
                  +
                  +  constructor(data: YoutubeItemData) {
                  +    this.data = {
                  +      ...data,
                  +      ...{
                  +        src: `https://youtube.com/embed/${ data.src }`,
                  +        thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`
                  +      }
                  +    };
                  +    this.type = GalleryItemTypes.Youtube;
                  +  }
                  +}
                  +
                  +type GalleryItemModel = {
                  +  type?: GalleryItemType;
                  +  src?: string | { url: string, type: string }[];
                  +  thumb?: string;
                  +  args?: any;
                  +};
                  +
                  +export type ImageItemData = GalleryItemModel & {
                  +  alt?: string;
                  +};
                  +
                  +export type IframeItemData = GalleryItemModel & {
                  +  params?: any;
                  +};
                  +
                  +export type YoutubeItemData = IframeItemData & {
                  +  autoplay?: boolean;
                  +};
                  +
                  +export type VideoItemData = GalleryItemModel & {
                  +  poster?: string;
                  +  loop?: boolean;
                  +  // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding
                  +  mute?: true;
                  +  disablePictureInPicture?: true;
                  +  controls?: boolean;
                  +  autoplay?: boolean;
                  +  preload?: 'none' | 'metadata' | 'auto' | '';
                  +  controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
                  +  disableRemotePlayback?: boolean;
                  +};
                  +
                  +export type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;
                  +
                  +export type ItemState = 'success' | 'loading' | 'failed';
                  +
                  +
                  +
                  + + + + + + + + +
                  +
                  +

                  results matching ""

                  +
                    +
                    +
                    +

                    No results matching ""

                    +
                    +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/YoutubeItem.html b/documentation/classes/YoutubeItem.html new file mode 100644 index 00000000..621d9cf5 --- /dev/null +++ b/documentation/classes/YoutubeItem.html @@ -0,0 +1,385 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                    +
                    + + +
                    +
                    + + + + + + + + + + + + + + + + +
                    +
                    +

                    +

                    File

                    +

                    +

                    + projects/ng-gallery/src/lib/components/templates/items.model.ts +

                    + + + + +

                    +

                    Implements

                    +

                    +

                    + GalleryItem +

                    + + +
                    +

                    Index

                    + + + + + + + + + + + + + + + +
                    +
                    Properties
                    +
                    +
                      +
                    • + Readonly + data +
                    • +
                    • + Readonly + type +
                    • +
                    +
                    +
                    + +
                    +

                    Constructor

                    + + + + + + + + + + + + + +
                    +constructor(data: YoutubeItemData) +
                    + +
                    +
                    + Parameters : + + + + + + + + + + + + + + + + + + +
                    NameTypeOptional
                    data + YoutubeItemData + + No +
                    +
                    +
                    +
                    + +
                    + +

                    + Properties +

                    + + + + + + + + + + + + + + +
                    + + + Readonly + data + + +
                    + Type : YoutubeItemData + +
                    + +
                    + + + + + + + + + + + + + + +
                    + + + Readonly + type + + +
                    + Type : GalleryItemType + +
                    + +
                    +
                    + + + + + + + +
                    + + +
                    +
                    import { GalleryItem } from '../../models/gallery.model';
                    +import { GalleryItemType, GalleryItemTypes } from '../../models/constants';
                    +
                    +export class ImageItem implements GalleryItem {
                    +  readonly type: GalleryItemType;
                    +  readonly data: ImageItemData;
                    +
                    +  constructor(data: ImageItemData) {
                    +    this.data = data;
                    +    this.type = GalleryItemTypes.Image;
                    +  }
                    +}
                    +
                    +export class VideoItem implements GalleryItem {
                    +  readonly type: GalleryItemType;
                    +  readonly data: VideoItemData;
                    +
                    +  constructor(data: VideoItemData) {
                    +    this.data = data;
                    +    this.type = GalleryItemTypes.Video;
                    +  }
                    +}
                    +
                    +export class IframeItem implements GalleryItem {
                    +  readonly type: GalleryItemType;
                    +  readonly data: IframeItemData;
                    +
                    +  constructor(data: IframeItemData) {
                    +    this.data = data;
                    +    this.type = GalleryItemTypes.Iframe;
                    +  }
                    +}
                    +
                    +export class YoutubeItem implements GalleryItem {
                    +  readonly type: GalleryItemType;
                    +  readonly data: YoutubeItemData;
                    +
                    +  constructor(data: YoutubeItemData) {
                    +    this.data = {
                    +      ...data,
                    +      ...{
                    +        src: `https://youtube.com/embed/${ data.src }`,
                    +        thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`
                    +      }
                    +    };
                    +    this.type = GalleryItemTypes.Youtube;
                    +  }
                    +}
                    +
                    +type GalleryItemModel = {
                    +  type?: GalleryItemType;
                    +  src?: string | { url: string, type: string }[];
                    +  thumb?: string;
                    +  args?: any;
                    +};
                    +
                    +export type ImageItemData = GalleryItemModel & {
                    +  alt?: string;
                    +};
                    +
                    +export type IframeItemData = GalleryItemModel & {
                    +  params?: any;
                    +};
                    +
                    +export type YoutubeItemData = IframeItemData & {
                    +  autoplay?: boolean;
                    +};
                    +
                    +export type VideoItemData = GalleryItemModel & {
                    +  poster?: string;
                    +  loop?: boolean;
                    +  // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding
                    +  mute?: true;
                    +  disablePictureInPicture?: true;
                    +  controls?: boolean;
                    +  autoplay?: boolean;
                    +  preload?: 'none' | 'metadata' | 'auto' | '';
                    +  controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
                    +  disableRemotePlayback?: boolean;
                    +};
                    +
                    +export type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;
                    +
                    +export type ItemState = 'success' | 'loading' | 'failed';
                    +
                    +
                    +
                    + + + + + + + + +
                    +
                    +

                    results matching ""

                    +
                      +
                      +
                      +

                      No results matching ""

                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CustomTemplateComponent.html b/documentation/components/CustomTemplateComponent.html new file mode 100644 index 00000000..4dc29973 --- /dev/null +++ b/documentation/components/CustomTemplateComponent.html @@ -0,0 +1,469 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                      +
                      + + +
                      +
                      + + + + + + +
                      +

                      +

                      File

                      +

                      +

                      + projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts +

                      + + +

                      +

                      Description

                      +

                      +

                      +

                      This section demonstrate how to extend the image template, like displaying a text over the image item

                      + +

                      + + +
                      +

                      Metadata

                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + +
                      +

                      Index

                      + + + + + + + + + + + +
                      +
                      Properties
                      +
                      + +
                      +
                      + +
                      +

                      Constructor

                      + + + + + + + + + + + + + +
                      + constructor(pixabay: Pixabay) +
                      + +
                      +
                      + Parameters : + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      pixabay + Pixabay + + No +
                      +
                      +
                      +
                      + + +
                      + +

                      + Properties +

                      + + + + + + + + + + + + + + +
                      + + + Readonly + items$ + + +
                      + Type : Observable<GalleryItem[]> + +
                      + +
                      +
                      + +
                      + + +
                      +
                      import {
                      +          Component, ChangeDetectionStrategy } from '@angular/core';
                      +import { CommonModule } from '@angular / common ';
                      +            import { GalleryModule, GalleryItem, } from 'ng-gallery';
                      +import { Observable } from 'rxjs';
                      +import { Pixabay } from '../pixabay/pixabay.service';
                      +
                      +/**
                      + * This section demonstrate how to extend the image template, like displaying a text over the image item
                      + */
                      +@Component({
                      +          selector: 'custom-templates-example',
                      +  template: `
                      +    <gallery *ngIf="items$ | async">
                      +      <ng-container *galleryImageDef="let item">
                      +        <div class="item-text">
                      +          {{ item?.alt }}
                      +        </div>
                      +      </ng-container>
                      +    </gallery>
                      +  `,
                      +  styles: [`
                      +    .item-text {
                      +      position: absolute;
                      +      top: 0;
                      +      left: 0;
                      +      right: 0;
                      +      margin: 3em auto 0;
                      +      width: 100%;
                      +      max-width: 500px;
                      +      padding: 20px 25px;
                      +      text-align: justify;
                      +      letter-spacing: 1px;
                      +      filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));
                      +      background: #ffffffd9;
                      +      color: black;
                      +      border-radius: 8px;
                      +    }
                      +  `],
                      +  changeDetection: ChangeDetectionStrategy.OnPush,
                      +  standalone: true,
                      +  imports: [CommonModule, GalleryModule]
                      +})
                      +export class CustomTemplateComponent {
                      +
                      +          readonly items$: Observable<GalleryItem[]>;
                      +
                      +  constructor(pixabay: Pixabay) {
                      +    this.items$ = pixabay.getHDImages('massages');
                      +  }
                      +}
                      +
                      +
                      + + +
                      +
                      
                      +    .item-text {
                      +              position: absolute;
                      +              top: 0;
                      +              left: 0;
                      +              right: 0;
                      +              margin: 3em auto 0;
                      +              width: 100%;
                      +              max-width: 500px;
                      +              padding: 20px 25px;
                      +              text-align: justify;
                      +              letter-spacing: 1px;
                      +              filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));
                      +              background: #ffffffd9;
                      +              color: black;
                      +              border-radius: 8px;
                      +    }
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + Legend +
                      +
                      +
                      + Html element +
                      +
                      +
                      + Component +
                      +
                      +
                      + Html element with directive +
                      +
                      +
                      + + +
                      + + + + + + + + +
                      +
                      +
                      +

                      results matching ""

                      +
                        +
                        +
                        +

                        No results matching ""

                        +
                        +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryComponent.html b/documentation/components/GalleryComponent.html new file mode 100644 index 00000000..ed410359 --- /dev/null +++ b/documentation/components/GalleryComponent.html @@ -0,0 +1,3717 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                        +
                        + + +
                        +
                        + + + + + + + + +
                        +

                        +

                        File

                        +

                        +

                        + projects/ng-gallery/src/lib/components/gallery.component.ts +

                        + + + + +

                        +

                        Implements

                        +

                        +

                        + OnInit + AfterContentInit + OnChanges + OnDestroy +

                        + + +
                        +

                        Metadata

                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        + +
                        +

                        Index

                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        +
                        Properties
                        +
                        + +
                        +
                        Methods
                        +
                        + +
                        +
                        Inputs
                        +
                        + +
                        +
                        Outputs
                        +
                        + +
                        +
                        + +
                        +

                        Constructor

                        + + + + + + + + + + + + + +
                        +constructor(_gallery: Gallery) +
                        + +
                        +
                        + Parameters : + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        _gallery + Gallery + + No +
                        +
                        +
                        +
                        + +
                        +

                        Inputs

                        + + + + + + + + + + + + + + + +
                        + + counterPosition +
                        + Type : "top" | "bottom" + +
                        + Default value : this._gallery.config.counterPosition +
                        + +
                        + + + + + + + + + + + + + + + + + + +
                        + + destroyRef +
                        + Type : boolean + +
                        + Default value : true +
                        + +
                        +

                        Destroy gallery ref on component destroy event

                        +
                        +
                        + + + + + + + + + + + + + + + +
                        + + bulletsPosition +
                        + Type : "top" | "bottom" + +
                        + Default value : this._gallery.config.bulletsPosition +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + id +
                        + Type : string + +
                        + Default value : 'root' +
                        + +
                        + + + + + + + + + + + + + + + + + + +
                        + + imageSize +
                        + Type : "cover" | "contain" + +
                        + Default value : this._gallery.config.imageSize +
                        + +
                        +

                        Set image size. +Default: contain

                        +
                        +
                        + + + + + + + + + + + + +
                        + + items +
                        + Type : GalleryItem[] + +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + loadingAttr +
                        + Type : "eager" | "lazy" + +
                        + Default value : this._gallery.config.loadingAttr +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + loadingStrategy +
                        + Type : "preload" | "lazy" | "default" + +
                        + Default value : this._gallery.config.loadingStrategy +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + navScrollBehavior +
                        + Type : ScrollBehavior + +
                        + Default value : this._gallery.config.navScrollBehavior +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + scrollBehavior +
                        + Type : ScrollBehavior + +
                        + Default value : this._gallery.config.scrollBehavior +
                        + +
                        + + + + + + + + + + + + + + + + + + +
                        + + skipInitConfig +
                        + Type : boolean + +
                        + Default value : false +
                        + +
                        +

                        Skip initializing the config with components inputs (Lightbox mode)

                        +
                        +
                        + + + + + + + + + + + + + + + +
                        + + slidingDirection +
                        + Type : "horizontal" | "vertical" + +
                        + Default value : this._gallery.config.slidingDirection +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + slidingEase +
                        + Type : BezierEasingOptions + +
                        + Default value : this._gallery.config.slidingEase +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + thumbImageSize +
                        + Type : "cover" | "contain" + +
                        + Default value : this._gallery.config.thumbImageSize +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + thumbPosition +
                        + Type : "top" | "left" | "right" | "bottom" + +
                        + Default value : this._gallery.config.thumbPosition +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + thumbView +
                        + Type : "default" | "contain" + +
                        + Default value : this._gallery.config.thumbView +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.nav +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.dots +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.loop +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.debug +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.thumb +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.counter +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.thumbDetached +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.thumbAutosize +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.itemAutosize +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.autoHeight +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.autoplay +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.disableThumb +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.slidingDisabled +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.thumbSlidingDisabled +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.mouseSlidingDisabled +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : boolean + +
                        + Default value : this._gallery.config.thumbMouseSlidingDisabled +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.dotsSize +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.thumbWidth +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.thumbHeight +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.playerInterval +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.slidingDuration +
                        + +
                        + + + + + + + + + + + + + + + +
                        + + +
                        + Type : number + +
                        + Default value : this._gallery.config.resizeDebounceTime +
                        + +
                        +
                        +
                        +

                        Outputs

                        + + + + + + + + + + + + +
                        + + error +
                        + Type : EventEmitter<GalleryError> + +
                        + +
                        + + + + + + + + + + + + +
                        + + indexChange +
                        + Type : EventEmitter<GalleryState> + +
                        + +
                        + + + + + + + + + + + + +
                        + + itemClick +
                        + Type : EventEmitter<number> + +
                        + +
                        + + + + + + + + + + + + +
                        + + itemsChange +
                        + Type : EventEmitter<GalleryState> + +
                        + +
                        + + + + + + + + + + + + +
                        + + playingChange +
                        + Type : EventEmitter<GalleryState> + +
                        + +
                        + + + + + + + + + + + + +
                        + + thumbClick +
                        + Type : EventEmitter<number> + +
                        + +
                        +
                        + + +
                        + +

                        + Methods +

                        + + + + + + + + + + + + + + + + + + + +
                        + + + add + + +
                        +add(item: GalleryItem, active?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        item + GalleryItem + + No +
                        active + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + addIframe + + +
                        +addIframe(data: IframeItemData, active?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        data + IframeItemData + + No +
                        active + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + addImage + + +
                        +addImage(data: ImageItemData, active?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        data + ImageItemData + + No +
                        active + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + addVideo + + +
                        +addVideo(data: VideoItemData, active?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        data + VideoItemData + + No +
                        active + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + addYoutube + + +
                        +addYoutube(data: YoutubeItemData, active?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        data + YoutubeItemData + + No +
                        active + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + Private + getConfig + + +
                        + + getConfig() +
                        + +
                        + +
                        + Returns : GalleryConfig + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + load + + +
                        +load(items: GalleryItem[]) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        items + GalleryItem[] + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + next + + +
                        +next(behavior?: ScrollBehavior, loop?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        behavior + ScrollBehavior + + Yes +
                        loop + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + ngAfterContentInit + + +
                        +ngAfterContentInit() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + ngOnChanges + + +
                        +ngOnChanges(changes: SimpleChanges) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        changes + SimpleChanges + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + ngOnDestroy + + +
                        +ngOnDestroy() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + ngOnInit + + +
                        +ngOnInit() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + onError + + +
                        +onError(err: GalleryError) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        err + GalleryError + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + onItemClick + + +
                        +onItemClick(i: number) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        i + number + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + onThumbClick + + +
                        +onThumbClick(i: number) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        i + number + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + play + + +
                        +play(interval?: number) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        interval + number + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + prev + + +
                        +prev(behavior?: ScrollBehavior, loop?: boolean) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        behavior + ScrollBehavior + + Yes +
                        loop + boolean + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + remove + + +
                        +remove(i: number) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        i + number + + No +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + reset + + +
                        +reset() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + set + + +
                        +set(i: number, behavior?: ScrollBehavior) +
                        + +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptional
                        i + number + + No +
                        behavior + ScrollBehavior + + Yes +
                        +
                        +
                        +
                        +
                        + Returns : void + +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + +
                        + + + stop + + +
                        +stop() +
                        + +
                        + +
                        + Returns : void + +
                        +
                        +
                        +
                        + +

                        + Properties +

                        + + + + + + + + + + + + + + +
                        + + + Private + _indexChange$ + + +
                        + Type : Subscription + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + Private + _itemChange$ + + +
                        + Type : Subscription + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + Private + _itemClick$ + + +
                        + Type : Subscription + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + Private + _playingChange$ + + +
                        + Type : Subscription + +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + Private + _thumbClick$ + + +
                        + Type : Subscription + +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + galleryBoxDef + + +
                        + Type : GalleryBoxDef + +
                        + Decorators : +
                        + + @ContentChild(GalleryBoxDef)
                        +
                        +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + galleryImageDef + + +
                        + Type : GalleryImageDef + +
                        + Decorators : +
                        + + @ContentChild(GalleryImageDef)
                        +
                        +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + galleryItemDef + + +
                        + Type : GalleryItemDef + +
                        + Decorators : +
                        + + @ContentChild(GalleryItemDef)
                        +
                        +
                        + +
                        + + + + + + + + + + + + + + +
                        + + + galleryRef + + +
                        + Type : GalleryRef + +
                        + +
                        + + + + + + + + + + + + + + + + + +
                        + + + galleryThumbDef + + +
                        + Type : GalleryThumbDef + +
                        + Decorators : +
                        + + @ContentChild(GalleryThumbDef)
                        +
                        +
                        + +
                        +
                        + +
                        + + +
                        +
                        import {
                        +  Component,
                        +  Input,
                        +  Output,
                        +  ContentChild,
                        +  OnInit,
                        +  AfterContentInit,
                        +  OnChanges,
                        +  OnDestroy,
                        +  SimpleChanges,
                        +  EventEmitter,
                        +  booleanAttribute,
                        +  numberAttribute,
                        +  ChangeDetectionStrategy
                        +} from '@angular/core';
                        +import { CommonModule } from '@angular/common';
                        +import { Subscription } from 'rxjs';
                        +import { GalleryCoreComponent } from './gallery-core.component';
                        +import { Gallery } from '../services/gallery.service';
                        +import { GalleryRef } from '../services/gallery-ref';
                        +import { GalleryError, GalleryItem, GalleryState } from '../models/gallery.model';
                        +import { IframeItemData, ImageItemData, VideoItemData, YoutubeItemData } from './templates/items.model';
                        +import { GalleryConfig } from '../models/config.model';
                        +import { BezierEasingOptions } from '../smooth-scroll';
                        +import { GalleryImageDef } from '../directives/gallery-image-def.directive';
                        +import { GalleryThumbDef } from '../directives/gallery-thumb-def.directive';
                        +import { GalleryItemDef } from '../directives/gallery-item-def.directive';
                        +import { GalleryBoxDef } from '../directives/gallery-box-def.directive';
                        +import { ImgManager } from '../utils/img-manager';
                        +import { AutoplayDirective } from '../autoplay/autoplay.directive';
                        +
                        +@Component({
                        +  selector: 'gallery',
                        +  changeDetection: ChangeDetectionStrategy.OnPush,
                        +  styleUrls: ['./gallery.scss'],
                        +  template: `
                        +    <gallery-core autoplay
                        +                  [galleryId]="id"
                        +                  [state]="galleryRef.state | async"
                        +                  [config]="galleryRef.config | async"
                        +                  (itemClick)="onItemClick($event)"
                        +                  (thumbClick)="onThumbClick($event)"
                        +                  (error)="onError($event)"/>
                        +  `,
                        +  standalone: true,
                        +  imports: [CommonModule, GalleryCoreComponent, AutoplayDirective],
                        +  providers: [ImgManager]
                        +})
                        +export class GalleryComponent implements OnInit, AfterContentInit, OnChanges, OnDestroy {
                        +
                        +  galleryRef: GalleryRef;
                        +  @Input() id: string = 'root';
                        +  @Input() items: GalleryItem [];
                        +  @Input({ transform: booleanAttribute }) nav: boolean = this._gallery.config.nav;
                        +  @Input({ transform: booleanAttribute }) dots: boolean = this._gallery.config.dots;
                        +  @Input({ transform: booleanAttribute }) loop: boolean = this._gallery.config.loop;
                        +  @Input({ transform: booleanAttribute }) debug: boolean = this._gallery.config.debug;
                        +  @Input({ transform: booleanAttribute }) thumb: boolean = this._gallery.config.thumb;
                        +  @Input({ transform: booleanAttribute }) counter: boolean = this._gallery.config.counter;
                        +  @Input({ transform: booleanAttribute }) thumbDetached: boolean = this._gallery.config.thumbDetached;
                        +  @Input({ transform: booleanAttribute }) thumbAutosize: boolean = this._gallery.config.thumbAutosize;
                        +  @Input({ transform: booleanAttribute }) itemAutosize: boolean = this._gallery.config.itemAutosize;
                        +  @Input({ transform: booleanAttribute }) autoHeight: boolean = this._gallery.config.autoHeight;
                        +  @Input({ transform: booleanAttribute }) autoplay: boolean = this._gallery.config.autoplay;
                        +  @Input({ transform: booleanAttribute }) disableThumb: boolean = this._gallery.config.disableThumb;
                        +  @Input({ transform: booleanAttribute }) slidingDisabled: boolean = this._gallery.config.slidingDisabled;
                        +  @Input({ transform: booleanAttribute }) thumbSlidingDisabled: boolean = this._gallery.config.thumbSlidingDisabled;
                        +  @Input({ transform: booleanAttribute }) mouseSlidingDisabled: boolean = this._gallery.config.mouseSlidingDisabled;
                        +  @Input({ transform: booleanAttribute }) thumbMouseSlidingDisabled: boolean = this._gallery.config.thumbMouseSlidingDisabled;
                        +  @Input({ transform: numberAttribute }) dotsSize: number = this._gallery.config.dotsSize;
                        +  @Input({ transform: numberAttribute }) thumbWidth: number = this._gallery.config.thumbWidth;
                        +  @Input({ transform: numberAttribute }) thumbHeight: number = this._gallery.config.thumbHeight;
                        +  @Input({ transform: numberAttribute }) playerInterval: number = this._gallery.config.playerInterval;
                        +  @Input({ transform: numberAttribute }) slidingDuration: number = this._gallery.config.slidingDuration;
                        +  @Input({ transform: numberAttribute }) resizeDebounceTime: number = this._gallery.config.resizeDebounceTime;
                        +  @Input() scrollBehavior: ScrollBehavior = this._gallery.config.scrollBehavior;
                        +  @Input() navScrollBehavior: ScrollBehavior = this._gallery.config.navScrollBehavior;
                        +  @Input() slidingEase: BezierEasingOptions = this._gallery.config.slidingEase;
                        +
                        +  /**
                        +   * Set image size.
                        +   * Default: contain
                        +   *
                        +   */
                        +  @Input() imageSize: 'cover' | 'contain' = this._gallery.config.imageSize;
                        +  @Input() thumbImageSize: 'cover' | 'contain' = this._gallery.config.thumbImageSize;
                        +  @Input() bulletsPosition: 'top' | 'bottom' = this._gallery.config.bulletsPosition;
                        +  @Input() counterPosition: 'top' | 'bottom' = this._gallery.config.counterPosition;
                        +  @Input() slidingDirection: 'horizontal' | 'vertical' = this._gallery.config.slidingDirection;
                        +  @Input() loadingAttr: 'eager' | 'lazy' = this._gallery.config.loadingAttr;
                        +  @Input() loadingStrategy: 'preload' | 'lazy' | 'default' = this._gallery.config.loadingStrategy;
                        +  @Input() thumbPosition: 'top' | 'left' | 'right' | 'bottom' = this._gallery.config.thumbPosition;
                        +  @Input() thumbView: 'default' | 'contain' = this._gallery.config.thumbView;
                        +
                        +  // Inputs used by the lightbox
                        +
                        +  /** Destroy gallery ref on component destroy event */
                        +  @Input() destroyRef: boolean = true;
                        +
                        +  /** Skip initializing the config with components inputs (Lightbox mode) */
                        +  @Input() skipInitConfig: boolean = false;
                        +
                        +  @Output() itemClick: EventEmitter<number> = new EventEmitter<number>();
                        +  @Output() thumbClick: EventEmitter<number> = new EventEmitter<number>();
                        +  @Output() playingChange: EventEmitter<GalleryState> = new EventEmitter<GalleryState>();
                        +  @Output() indexChange: EventEmitter<GalleryState> = new EventEmitter<GalleryState>();
                        +  @Output() itemsChange: EventEmitter<GalleryState> = new EventEmitter<GalleryState>();
                        +  @Output() error: EventEmitter<GalleryError> = new EventEmitter<GalleryError>();
                        +
                        +  @ContentChild(GalleryItemDef) galleryItemDef: GalleryItemDef;
                        +  @ContentChild(GalleryImageDef) galleryImageDef: GalleryImageDef;
                        +  @ContentChild(GalleryThumbDef) galleryThumbDef: GalleryThumbDef;
                        +  @ContentChild(GalleryBoxDef) galleryBoxDef: GalleryBoxDef;
                        +
                        +  private _itemClick$: Subscription;
                        +  private _thumbClick$: Subscription;
                        +  private _itemChange$: Subscription;
                        +  private _indexChange$: Subscription;
                        +  private _playingChange$: Subscription;
                        +
                        +  constructor(private _gallery: Gallery) {
                        +  }
                        +
                        +  private getConfig(): GalleryConfig {
                        +    return {
                        +      nav: this.nav,
                        +      dots: this.dots,
                        +      loop: this.loop,
                        +      debug: this.debug,
                        +      thumb: this.thumb,
                        +      counter: this.counter,
                        +      autoplay: this.autoplay,
                        +      dotsSize: this.dotsSize,
                        +      imageSize: this.imageSize,
                        +      thumbImageSize: this.thumbImageSize,
                        +      scrollBehavior: this.scrollBehavior,
                        +      navScrollBehavior: this.navScrollBehavior,
                        +      thumbView: this.thumbView,
                        +      thumbWidth: this.thumbWidth,
                        +      thumbHeight: this.thumbHeight,
                        +      slidingEase: this.slidingEase,
                        +      disableThumb: this.disableThumb,
                        +      bulletsPosition: this.bulletsPosition,
                        +      loadingAttr: this.loadingAttr,
                        +      thumbDetached: this.thumbDetached,
                        +      thumbPosition: this.thumbPosition,
                        +      playerInterval: this.playerInterval,
                        +      counterPosition: this.counterPosition,
                        +      loadingStrategy: this.loadingStrategy,
                        +      slidingDuration: this.slidingDuration,
                        +      slidingDirection: this.slidingDirection,
                        +      resizeDebounceTime: this.resizeDebounceTime,
                        +      slidingDisabled: this.slidingDisabled,
                        +      thumbSlidingDisabled: this.thumbSlidingDisabled,
                        +      mouseSlidingDisabled: this.mouseSlidingDisabled,
                        +      thumbMouseSlidingDisabled: this.thumbMouseSlidingDisabled,
                        +      thumbAutosize: this.thumbAutosize,
                        +      itemAutosize: this.itemAutosize,
                        +      autoHeight: this.autoHeight,
                        +    };
                        +  }
                        +
                        +  ngOnChanges(changes: SimpleChanges): void {
                        +    if (this.galleryRef) {
                        +      this.galleryRef.setConfig(this.getConfig());
                        +
                        +      if (changes.items && changes.items.currentValue !== changes.items.previousValue) {
                        +        this.load(this.items);
                        +      }
                        +    }
                        +  }
                        +
                        +  ngOnInit(): void {
                        +    // Get gallery instance by id
                        +    if (this.skipInitConfig) {
                        +      this.galleryRef = this._gallery.ref(this.id);
                        +    } else {
                        +      this.galleryRef = this._gallery.ref(this.id, this.getConfig());
                        +    }
                        +
                        +    // Load gallery items
                        +    this.load(this.items);
                        +
                        +    // Subscribes to events on demand
                        +    if (this.indexChange.observed) {
                        +      this._indexChange$ = this.galleryRef.indexChanged.subscribe((state: GalleryState) => this.indexChange.emit(state));
                        +    }
                        +    if (this.itemsChange.observed) {
                        +      this._itemChange$ = this.galleryRef.itemsChanged.subscribe((state: GalleryState) => this.itemsChange.emit(state));
                        +    }
                        +    if (this.playingChange.observed) {
                        +      this._playingChange$ = this.galleryRef.playingChanged.subscribe((state: GalleryState) => this.playingChange.emit(state));
                        +    }
                        +  }
                        +
                        +  ngAfterContentInit(): void {
                        +    const templateConfig: GalleryConfig = {};
                        +    if (this.galleryItemDef) {
                        +      templateConfig.itemTemplate = this.galleryItemDef.templateRef;
                        +    }
                        +    if (this.galleryImageDef) {
                        +      templateConfig.imageTemplate = this.galleryImageDef.templateRef;
                        +    }
                        +    if (this.galleryThumbDef) {
                        +      templateConfig.thumbTemplate = this.galleryThumbDef.templateRef;
                        +    }
                        +    if (this.galleryBoxDef) {
                        +      templateConfig.boxTemplate = this.galleryBoxDef.templateRef;
                        +    }
                        +    if (Object.keys(templateConfig).length) {
                        +      this.galleryRef.setConfig(templateConfig);
                        +    }
                        +  }
                        +
                        +  ngOnDestroy(): void {
                        +    this._itemClick$?.unsubscribe();
                        +    this._thumbClick$?.unsubscribe();
                        +    this._itemChange$?.unsubscribe();
                        +    this._indexChange$?.unsubscribe();
                        +    this._playingChange$?.unsubscribe();
                        +    if (this.destroyRef) {
                        +      this.galleryRef?.destroy();
                        +    }
                        +  }
                        +
                        +  onItemClick(i: number): void {
                        +    this.itemClick.emit(i);
                        +    this.galleryRef.itemClick.next(i);
                        +  }
                        +
                        +  onThumbClick(i: number): void {
                        +    this.galleryRef.set(i);
                        +    this.thumbClick.emit(i);
                        +    this.galleryRef.thumbClick.next(i);
                        +  }
                        +
                        +  onError(err: GalleryError): void {
                        +    this.error.emit(err);
                        +    this.galleryRef.error.next(err);
                        +  }
                        +
                        +  load(items: GalleryItem[]): void {
                        +    this.galleryRef.load(items);
                        +  }
                        +
                        +  add(item: GalleryItem, active?: boolean): void {
                        +    this.galleryRef.add(item, active);
                        +  }
                        +
                        +  addImage(data: ImageItemData, active?: boolean): void {
                        +    this.galleryRef.addImage(data, active);
                        +  }
                        +
                        +  addVideo(data: VideoItemData, active?: boolean): void {
                        +    this.galleryRef.addVideo(data, active);
                        +  }
                        +
                        +  addIframe(data: IframeItemData, active?: boolean): void {
                        +    this.galleryRef.addIframe(data, active);
                        +  }
                        +
                        +  addYoutube(data: YoutubeItemData, active?: boolean): void {
                        +    this.galleryRef.addYoutube(data, active);
                        +  }
                        +
                        +  remove(i: number): void {
                        +    this.galleryRef.remove(i);
                        +  }
                        +
                        +  next(behavior?: ScrollBehavior, loop?: boolean): void {
                        +    this.galleryRef.next(behavior, loop);
                        +  }
                        +
                        +  prev(behavior?: ScrollBehavior, loop?: boolean): void {
                        +    this.galleryRef.prev(behavior, loop);
                        +  }
                        +
                        +  set(i: number, behavior?: ScrollBehavior): void {
                        +    this.galleryRef.set(i, behavior);
                        +  }
                        +
                        +  reset(): void {
                        +    this.galleryRef.reset();
                        +  }
                        +
                        +  play(interval?: number): void {
                        +    this.galleryRef.play(interval);
                        +  }
                        +
                        +  stop(): void {
                        +    this.galleryRef.stop();
                        +  }
                        +}
                        +
                        +
                        + + +
                        +

                        + ./gallery.scss +

                        +
                        :host {
                        +  position: relative;
                        +  overflow: hidden;
                        +  z-index: 1;
                        +  display: flex;
                        +  justify-content: center;
                        +  align-items: center;
                        +  background-color: black;
                        +
                        +  --g-height-transition: height 468ms cubic-bezier(0.42, 0, 0.58, 1);
                        +  --g-nav-drop-shadow: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
                        +  --g-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
                        +  --g-font-color: #000;
                        +  --g-overlay-color: #fff;
                        +  --g-gutter-size: 1px;
                        +
                        +  &[gallerize] {
                        +    --g-item-cursor: pointer;
                        +  }
                        +}
                        +
                        +
                        + +
                        +
                        +
                        +
                        + Legend +
                        +
                        +
                        Html element +
                        +
                        +
                        Component +
                        +
                        +
                        Html element with directive +
                        +
                        +
                        + + +
                        + + + + + + + + + + + + + + + + + + + + + + +
                        +
                        +

                        results matching ""

                        +
                          +
                          +
                          +

                          No results matching ""

                          +
                          +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryCoreComponent.html b/documentation/components/GalleryCoreComponent.html new file mode 100644 index 00000000..7b1c9622 --- /dev/null +++ b/documentation/components/GalleryCoreComponent.html @@ -0,0 +1,2015 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                          +
                          + + +
                          +
                          + + + + + + + + +
                          +

                          +

                          File

                          +

                          +

                          + projects/ng-gallery/src/lib/components/gallery-core.component.ts +

                          + + + + +

                          +

                          Implements

                          +

                          +

                          + OnChanges +

                          + + +
                          +

                          Metadata

                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                          + +
                          +

                          Index

                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                          +
                          Methods
                          +
                          + +
                          +
                          Inputs
                          +
                          + +
                          +
                          Outputs
                          +
                          + +
                          +
                          HostBindings
                          +
                          + +
                          +
                          Accessors
                          +
                          + +
                          +
                          + +
                          +

                          Constructor

                          + + + + + + + + + + + + + +
                          +constructor(el: ElementRef) +
                          + +
                          +
                          + Parameters : + + + + + + + + + + + + + + + + + + +
                          NameTypeOptional
                          el + ElementRef<HTMLElement> + + No +
                          +
                          +
                          +
                          + +
                          +

                          Inputs

                          + + + + + + + + + + + + +
                          + + config +
                          + Type : GalleryConfig + +
                          + +
                          + + + + + + + + + + + + +
                          + + galleryId +
                          + Type : string + +
                          + +
                          + + + + + + + + + + + + +
                          + + state +
                          + Type : GalleryState + +
                          + +
                          +
                          +
                          +

                          Outputs

                          + + + + + + + + + + + + +
                          + + error +
                          + Type : EventEmitter<GalleryError> + +
                          + +
                          + + + + + + + + + + + + +
                          + + itemClick +
                          + Type : EventEmitter<number> + +
                          + +
                          + + + + + + + + + + + + +
                          + + thumbClick +
                          + Type : EventEmitter<number> + +
                          + +
                          +
                          +
                          +

                          HostBindings

                          + + + + + + + + + + + + + + + + +
                          + + + attr.autoHeight + + +
                          + Type : boolean + +
                          + +
                          +

                          Set gallery slider autoHeight style

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.counterPosition + + +
                          + Type : "top" | "bottom" + +
                          + +
                          +

                          Set gallery counter position

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.debug + + +
                          + Type : boolean + +
                          + +
                          +

                          Set debug style

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.disableThumb + + +
                          + Type : boolean + +
                          + +
                          +

                          Disable thumbnails clicks

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.bulletsPosition + + +
                          + Type : "top" | "bottom" + +
                          + +
                          +

                          Set gallery dots position

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.imageSize + + +
                          + Type : "cover" | "contain" + +
                          + +
                          +

                          Set gallery image size

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.itemAutosize + + +
                          + Type : boolean + +
                          + +
                          +

                          Set gallery slider itemAutosize style

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.slidingDirection + + +
                          + Type : "horizontal" | "vertical" + +
                          + +
                          +

                          Set sliding direction

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.slidingDisabled + + +
                          + Type : boolean + +
                          + +
                          +

                          Set gallery counter position

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.thumbAutosize + + +
                          + Type : boolean + +
                          + +
                          +

                          Set gallery slider thumbAutosize style

                          +
                          +
                          + + + + + + + + + + + + + + +
                          + + + attr.thumbImageSize + + +
                          + Type : "contain" | "cover" + +
                          + +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.thumbPosition + + +
                          + Type : "top" | "left" | "right" | "bottom" + +
                          + +
                          +

                          Set thumbnails position

                          +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + + attr.thumbSlidingDisabled + + +
                          + Type : boolean + +
                          + +
                          +

                          Set gallery counter position

                          +
                          +
                          +
                          + + +
                          + +

                          + Methods +

                          + + + + + + + + + + + + + + + + + + + +
                          + + + ngOnChanges + + +
                          +ngOnChanges(changes: SimpleChanges) +
                          + +
                          + +
                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                          NameTypeOptional
                          changes + SimpleChanges + + No +
                          +
                          +
                          +
                          +
                          + Returns : void + +
                          +
                          + +
                          +
                          +
                          + +
                          +

                          + Accessors +

                          + + + + + + + + + + + + + + + + + +
                          + + thumbPosition +
                          + getthumbPosition() +
                          + +
                          +

                          Set thumbnails position

                          +
                          + +
                          + Returns : "top" | "left" | "right" | "bottom" + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + slidingDirection +
                          + getslidingDirection() +
                          + +
                          +

                          Set sliding direction

                          +
                          + +
                          + Returns : "horizontal" | "vertical" + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + disableThumb +
                          + getdisableThumb() +
                          + +
                          +

                          Disable thumbnails clicks

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + imageSize +
                          + getimageSize() +
                          + +
                          +

                          Set gallery image size

                          +
                          + +
                          + Returns : "cover" | "contain" + +
                          +
                          + + + + + + + + + + + + + + +
                          + + thumbImageSize +
                          + getthumbImageSize() +
                          + +
                          + + + + + + + + + + + + + + + + + +
                          + + bulletsPosition +
                          + getbulletsPosition() +
                          + +
                          +

                          Set gallery dots position

                          +
                          + +
                          + Returns : "top" | "bottom" + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + counterPosition +
                          + getcounterPosition() +
                          + +
                          +

                          Set gallery counter position

                          +
                          + +
                          + Returns : "top" | "bottom" + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + slidingDisabled +
                          + getslidingDisabled() +
                          + +
                          +

                          Set gallery counter position

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + thumbSlidingDisabled +
                          + getthumbSlidingDisabled() +
                          + +
                          +

                          Set gallery counter position

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + itemAutosize +
                          + getitemAutosize() +
                          + +
                          +

                          Set gallery slider itemAutosize style

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + autoHeight +
                          + getautoHeight() +
                          + +
                          +

                          Set gallery slider autoHeight style

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + thumbAutosize +
                          + getthumbAutosize() +
                          + +
                          +

                          Set gallery slider thumbAutosize style

                          +
                          + +
                          + Returns : boolean + +
                          +
                          + + + + + + + + + + + + + + + + + +
                          + + debug +
                          + getdebug() +
                          + +
                          +

                          Set debug style

                          +
                          + +
                          + Returns : boolean + +
                          +
                          +
                          +
                          + + +
                          +
                          import {
                          +  Component,
                          +  Input,
                          +  Output,
                          +  HostBinding,
                          +  EventEmitter,
                          +  OnChanges,
                          +  SimpleChanges,
                          +  ElementRef,
                          +  ChangeDetectionStrategy
                          +} from '@angular/core';
                          +import { CommonModule } from '@angular/common';
                          +import { coerceCssPixelValue } from '@angular/cdk/coercion';
                          +import { GalleryCounterComponent } from './gallery-counter.component';
                          +import { GalleryBulletsComponent } from './gallery-dots.component';
                          +import { GalleryNavComponent } from './gallery-nav.component';
                          +import { GallerySliderComponent } from './gallery-slider.component';
                          +import { GalleryThumbsComponent } from './gallery-thumbs.component';
                          +import { GalleryError, GalleryState } from '../models/gallery.model';
                          +import { GalleryConfig } from '../models/config.model';
                          +
                          +@Component({
                          +  selector: 'gallery-core',
                          +  changeDetection: ChangeDetectionStrategy.OnPush,
                          +  styleUrls: ['./gallery-core.scss', '../styles/debug.scss'],
                          +  template: `
                          +    <gallery-thumbs *ngIf="config.thumb"
                          +                    [state]="state"
                          +                    [config]="config"
                          +                    [galleryId]="galleryId"
                          +                    (thumbClick)="thumbClick.emit($event)"
                          +                    (error)="error.emit($event)">
                          +    </gallery-thumbs>
                          +
                          +    <div class="g-box">
                          +      <gallery-slider [class.g-debug]="config.debug"
                          +                      [state]="state"
                          +                      [config]="config"
                          +                      [galleryId]="galleryId"
                          +                      (itemClick)="itemClick.emit($event)"
                          +                      (error)="error.emit($event)">
                          +
                          +        <gallery-nav *ngIf="config.nav && state.items.length > 1"
                          +                     [state]="state"
                          +                     [config]="config"
                          +                     [galleryId]="galleryId">
                          +        </gallery-nav>
                          +
                          +      </gallery-slider>
                          +
                          +      <gallery-dots *ngIf="config.dots"
                          +                    [state]="state"
                          +                    [config]="config"
                          +                    [galleryId]="galleryId">
                          +      </gallery-dots>
                          +
                          +      <gallery-counter *ngIf="config.counter"
                          +                       [state]="state">
                          +      </gallery-counter>
                          +
                          +      <div class="g-box-template">
                          +        <ng-container *ngTemplateOutlet="config.boxTemplate; context: { state: state, config: config }"></ng-container>
                          +      </div>
                          +    </div>
                          +  `,
                          +  standalone: true,
                          +  imports: [CommonModule, GalleryThumbsComponent, GallerySliderComponent, GalleryNavComponent, GalleryBulletsComponent, GalleryCounterComponent]
                          +})
                          +export class GalleryCoreComponent implements OnChanges {
                          +
                          +  @Input() galleryId: string;
                          +  @Input() state: GalleryState;
                          +  @Input() config: GalleryConfig;
                          +  @Output() itemClick: EventEmitter<number> = new EventEmitter<number>();
                          +  @Output() thumbClick: EventEmitter<number> = new EventEmitter<number>();
                          +  @Output() error: EventEmitter<GalleryError> = new EventEmitter<GalleryError>();
                          +
                          +  /** Set thumbnails position */
                          +  @HostBinding('attr.thumbPosition') get thumbPosition(): 'top' | 'left' | 'right' | 'bottom' {
                          +    return this.config.thumbPosition;
                          +  }
                          +
                          +  /** Set sliding direction */
                          +  @HostBinding('attr.slidingDirection') get slidingDirection(): 'horizontal' | 'vertical' {
                          +    return this.config.slidingDirection;
                          +  }
                          +
                          +  /** Disable thumbnails clicks */
                          +  @HostBinding('attr.disableThumb') get disableThumb(): boolean {
                          +    return this.config.disableThumb;
                          +  }
                          +
                          +  /** Set gallery image size */
                          +  @HostBinding('attr.imageSize') get imageSize(): 'cover' | 'contain' {
                          +    return this.config.imageSize;
                          +  }
                          +
                          +  @HostBinding('attr.thumbImageSize') get thumbImageSize(): 'contain' | 'cover' {
                          +    return this.config.thumbImageSize;
                          +  }
                          +
                          +  /** Set gallery dots position */
                          +  @HostBinding('attr.bulletsPosition') get bulletsPosition(): 'top' | 'bottom' {
                          +    return this.config.bulletsPosition;
                          +  }
                          +
                          +  /** Set gallery counter position */
                          +  @HostBinding('attr.counterPosition') get counterPosition(): 'top' | 'bottom' {
                          +    return this.config.counterPosition;
                          +  }
                          +
                          +  /** Set gallery counter position */
                          +  @HostBinding('attr.slidingDisabled') get slidingDisabled(): boolean {
                          +    return this.config.slidingDisabled;
                          +  }
                          +
                          +  /** Set gallery counter position */
                          +  @HostBinding('attr.thumbSlidingDisabled') get thumbSlidingDisabled(): boolean {
                          +    return this.config.thumbSlidingDisabled;
                          +  }
                          +
                          +  /** Set gallery slider itemAutosize style  */
                          +  @HostBinding('attr.itemAutosize') get itemAutosize(): boolean {
                          +    return this.config.itemAutosize;
                          +  }
                          +
                          +  /** Set gallery slider autoHeight style  */
                          +  @HostBinding('attr.autoHeight') get autoHeight(): boolean {
                          +    return this.config.autoHeight;
                          +  }
                          +
                          +  /** Set gallery slider thumbAutosize style  */
                          +  @HostBinding('attr.thumbAutosize') get thumbAutosize(): boolean {
                          +    return this.config.thumbAutosize;
                          +  }
                          +
                          +  /** Set debug style  */
                          +  @HostBinding('attr.debug') get debug(): boolean {
                          +    return this.config.debug;
                          +  }
                          +
                          +  constructor(private el: ElementRef<HTMLElement>) {
                          +  }
                          +
                          +  ngOnChanges(changes: SimpleChanges): void {
                          +    if (changes.config) {
                          +      if (changes.config.currentValue?.thumbWidth !== changes.config.previousValue?.thumbWidth) {
                          +        this.el.nativeElement.style.setProperty('--g-thumb-width', coerceCssPixelValue(changes.config.currentValue.thumbWidth));
                          +      }
                          +      if (changes.config.currentValue?.thumbHeight !== changes.config.previousValue?.thumbHeight) {
                          +        this.el.nativeElement.style.setProperty('--g-thumb-height', coerceCssPixelValue(changes.config.currentValue.thumbHeight));
                          +      }
                          +    }
                          +  }
                          +}
                          +
                          +
                          + + +
                          +

                          + ./gallery-core.scss +

                          +
                          :host {
                          +  position: relative;
                          +  overflow: hidden;
                          +  display: flex;
                          +  gap: var(--g-gutter-size);
                          +  width: 100%;
                          +  height: 500px;
                          +  min-height: 100%;
                          +  max-height: 100%;
                          +
                          +  &[thumbPosition='top'] {
                          +    flex-direction: column;
                          +  }
                          +
                          +  &[thumbPosition='left'] {
                          +    flex-direction: row;
                          +  }
                          +
                          +  &[thumbPosition='right'] {
                          +    flex-direction: row-reverse;
                          +  }
                          +
                          +  &[thumbPosition='bottom'] {
                          +    flex-direction: column-reverse;
                          +  }
                          +
                          +  // Gallery auto-height variables
                          +  &[autoHeight='true'][itemAutoSize='false'][slidingDirection='horizontal'] {
                          +    &[thumbPosition='top'], &[thumbPosition='bottom'] {
                          +      // if auto-height, use fit-content
                          +      height: fit-content;
                          +      --g-item-height: auto !important;
                          +      --g-item-max-height: auto;
                          +    }
                          +  }
                          +
                          +  // Gallery image variables
                          +  --image-object-fit: unset;
                          +
                          +  &[imageSize='contain'] gallery-slider,
                          +  &[thumbImageSize='contain'] gallery-thumbs {
                          +    --image-object-fit: contain;
                          +  }
                          +
                          +  &[imageSize='cover'] gallery-slider,
                          +  &[thumbImageSize='cover'] gallery-thumbs {
                          +    --image-object-fit: cover;
                          +  }
                          +
                          +  // Gallery thumbs variables
                          +  --slider-thumb-height: unset;
                          +  --slider-thumb-width: unset;
                          +  --thumb-slider-left: unset;
                          +  --thumb-slider-overflow: unset;
                          +  --thumb-slider-flex-direction: unset;
                          +  --g-thumb-width: unset;
                          +  --g-thumb-height: unset;
                          +
                          +  &[thumbPosition='top'],
                          +  &[thumbPosition='bottom'] {
                          +    --thumb-slider-top: 0;
                          +    --thumb-slider-overflow: auto hidden;
                          +    --thumb-slider-flex-direction: row;
                          +    --g-thumb-height: 100%;
                          +
                          +    &[thumbAutosize="true"] {
                          +      --g-thumb-width: auto !important;
                          +    }
                          +  }
                          +
                          +  &[thumbPosition='left'],
                          +  &[thumbPosition='right'] {
                          +    --thumb-slider-left: 0;
                          +    --thumb-slider-overflow: hidden auto;
                          +    --thumb-slider-flex-direction: column;
                          +    --g-thumb-width: 100%;
                          +
                          +    &[thumbAutosize="true"] {
                          +      --g-thumb-height: auto !important;
                          +    }
                          +  }
                          +
                          +  --g-thumb-cursor: pointer;
                          +
                          +  &[disableThumb='true'] {
                          +    --g-thumb-cursor: default;
                          +  }
                          +
                          +  &[thumbSlidingDisabled='true'] {
                          +    --thumb-slider-overflow: hidden !important;
                          +  }
                          +
                          +  // Gallery slider variables
                          +  --slider-scroll-snap-type: unset;
                          +  --slider-overflow: unset;
                          +  --slider-flex-direction: unset;
                          +  --slider-width: unset;
                          +  --slider-height: unset;
                          +  --slider-content-width: unset;
                          +  --slider-content-height: unset;
                          +
                          +  &[slidingDirection='horizontal'] {
                          +    --slider-overflow: auto hidden;
                          +    --slider-scroll-snap-type: x mandatory;
                          +    --slider-flex-direction: row;
                          +    --slider-content-height: 100%;
                          +  }
                          +
                          +  &[slidingDirection='vertical'] {
                          +    --slider-overflow: hidden auto;
                          +    --slider-scroll-snap-type: y mandatory;
                          +    --slider-flex-direction: column;
                          +    --slider-content-width: 100%;
                          +  }
                          +
                          +  &[slidingDisabled='true'] {
                          +    --slider-overflow: hidden !important;
                          +  }
                          +
                          +  // Gallery items variables
                          +  --g-item-width: unset;
                          +  --g-item-height: unset;
                          +  --g-item-max-height: var(--slider-height);
                          +
                          +  &[slidingDirection='horizontal'] {
                          +    --g-item-width: var(--slider-width);
                          +    --g-item-height: 100%;
                          +
                          +    &[itemAutoSize='true'] {
                          +      --g-item-width: auto;
                          +    }
                          +  }
                          +
                          +  &[slidingDirection='vertical'] {
                          +    --g-item-width: 100%;
                          +    --g-item-height: var(--slider-height);
                          +
                          +    &[itemAutoSize='true'] {
                          +      --g-item-height: auto;
                          +    }
                          +  }
                          +
                          +  // Gallery dots variables
                          +  --dots-top: unset;
                          +  --dots-bottom: unset;
                          +
                          +  &[bulletsPosition='top'] {
                          +    --dots-top: 15px;
                          +  }
                          +
                          +  &[bulletsPosition='bottom'] {
                          +    --dots-bottom: 15px;
                          +  }
                          +
                          +  // Gallery position variables
                          +  --counter-top: unset;
                          +  --counter-bottom: unset;
                          +  --counter-border-radius: unset;
                          +
                          +  &[counterPosition='top'] {
                          +    --counter-top: 0;
                          +    --counter-border-radius: 0 0 4px 4px;
                          +  }
                          +
                          +  &[counterPosition='bottom'] {
                          +    --counter-bottom: 0;
                          +    --counter-border-radius: 4px 4px 0 0;
                          +  }
                          +}
                          +
                          +.g-box {
                          +  overflow: hidden;
                          +  position: relative;
                          +  display: flex;
                          +  flex-direction: column;
                          +  order: 1;
                          +  flex: 1;
                          +}
                          +
                          +.g-box-template {
                          +  position: absolute;
                          +  z-index: 10;
                          +}
                          +
                          +

                          + ../styles/debug.scss +

                          +
                          :host[debug='true'] {
                          +  ::ng-deep {
                          +    .g-sliding, .g-resizing, .g-scrolling {
                          +      gallery-item.g-item-highlight {
                          +        visibility: hidden;
                          +      }
                          +    }
                          +  }
                          +
                          +  ::ng-deep {
                          +    gallery-slider {
                          +      &:after, &:before {
                          +        position: absolute;
                          +        content: '';
                          +        z-index: 12;
                          +      }
                          +
                          +      &:before {
                          +        width: 100%;
                          +        height: 0;
                          +        border-top: 1px dashed lime;
                          +      }
                          +
                          +      &:after {
                          +        height: 100%;
                          +        width: 0;
                          +        border-left: 1px dashed lime;
                          +      }
                          +
                          +      gallery-item {
                          +        outline: 1px solid darkorange;
                          +
                          +        &.g-item-highlight {
                          +          &:after {
                          +            content: '';
                          +            position: absolute;
                          +            width: 100%;
                          +            height: 100%;
                          +            border: 3px solid lime;
                          +            box-sizing: border-box;
                          +            z-index: 10;
                          +          }
                          +        }
                          +      }
                          +    }
                          +
                          +    .g-sliding {
                          +      .g-slider-sliding {
                          +        display: block;
                          +      }
                          +    }
                          +
                          +    .g-scrolling {
                          +      .g-slider-scrolling {
                          +        display: block;
                          +      }
                          +    }
                          +
                          +    .g-resizing {
                          +      .g-slider-resizing {
                          +        display: block;
                          +      }
                          +    }
                          +
                          +    .g-slider-debug {
                          +      position: absolute;
                          +      top: 0;
                          +      left: 0;
                          +      display: flex;
                          +      gap: 5px;
                          +      padding: 10px;
                          +
                          +      .g-slider-resizing {
                          +        background: rgba(245, 76, 40);
                          +      }
                          +
                          +      .g-slider-scrolling {
                          +        background: rgb(255, 133, 36);
                          +      }
                          +
                          +      .g-slider-sliding {
                          +        background: rgb(31, 108, 185);
                          +      }
                          +
                          +      div, &:before {
                          +        display: none;
                          +        color: white;
                          +        font-family: monospace;
                          +        z-index: 12;
                          +        padding: 2px 6px;
                          +        border-radius: 3px;
                          +      }
                          +    }
                          +  }
                          +
                          +  &[itemAutoSize='false'] {
                          +    ::ng-deep {
                          +      .g-slider-debug {
                          +        &:before {
                          +          content: var(--intersection-margin);
                          +          background: rgba(236, 236, 236, 0.84);
                          +          color: #363636;
                          +          display: block;
                          +        }
                          +      }
                          +    }
                          +  }
                          +
                          +  &[itemAutoSize='true'] {
                          +    ::ng-deep {
                          +      gallery-item {
                          +        &:before {
                          +          position: absolute;
                          +          margin: 10px;
                          +          content: var(--item-intersection-margin);
                          +          background: rgba(236, 236, 236, 0.84);
                          +          color: #363636;
                          +          display: block;
                          +          width: 270px;
                          +          font-family: monospace;
                          +          z-index: 12;
                          +          padding: 2px 6px;
                          +          border-radius: 3px;
                          +        }
                          +      }
                          +    }
                          +  }
                          +}
                          +
                          +
                          + +
                          +
                          +
                          +
                          + Legend +
                          +
                          +
                          Html element +
                          +
                          +
                          Component +
                          +
                          +
                          Html element with directive +
                          +
                          +
                          + + +
                          + + + + + + + + + + + + + + + + + + + + + + +
                          +
                          +

                          results matching ""

                          +
                            +
                            +
                            +

                            No results matching ""

                            +
                            +
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryCounterComponent.html b/documentation/components/GalleryCounterComponent.html new file mode 100644 index 00000000..11a58a59 --- /dev/null +++ b/documentation/components/GalleryCounterComponent.html @@ -0,0 +1,336 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                            +
                            + + +
                            +
                            + + + + + + + + +
                            +

                            +

                            File

                            +

                            +

                            + projects/ng-gallery/src/lib/components/gallery-counter.component.ts +

                            + + + + + + +
                            +

                            Metadata

                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            +

                            Index

                            + + + + + + + + + + + + + + + +
                            +
                            Inputs
                            +
                            + +
                            +
                            + + +
                            +

                            Inputs

                            + + + + + + + + + + + + +
                            + + state +
                            + Type : GalleryState + +
                            + +
                            +
                            + + + + + +
                            + + +
                            +
                            import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
                            +import { GalleryState } from '../models/gallery.model';
                            +
                            +@Component({
                            +  selector: 'gallery-counter',
                            +  changeDetection: ChangeDetectionStrategy.OnPush,
                            +  styleUrls: ['./gallery-counter.scss'],
                            +  template: `
                            +    <div class="g-counter">{{ (state.currIndex + 1) + ' / ' + state.items.length }}</div>
                            +  `,
                            +  standalone: true
                            +})
                            +export class GalleryCounterComponent {
                            +  @Input() state: GalleryState;
                            +}
                            +
                            +
                            + + +
                            +

                            + ./gallery-counter.scss +

                            +
                            .g-counter {
                            +  font-weight: bold;
                            +  user-select: none;
                            +  opacity: 0.6;
                            +  transition: opacity linear 150ms;
                            +  z-index: 50;
                            +  position: absolute;
                            +  left: 50%;
                            +  transform: translateX(-50%) perspective(1px);
                            +  font-size: 12px;
                            +  padding: 4px 10px;
                            +  color: var(--g-font-color);
                            +  background-color: var(--g-overlay-color);
                            +  box-shadow: var(--g-box-shadow);
                            +
                            +  top: var(--counter-top);
                            +  bottom: var(--counter-bottom);
                            +  border-radius: var(--counter-border-radius);
                            +
                            +  &:hover {
                            +    opacity: 0.8;
                            +  }
                            +}
                            +
                            +
                            + +
                            +
                            +
                            +
                            + Legend +
                            +
                            +
                            Html element +
                            +
                            +
                            Component +
                            +
                            +
                            Html element with directive +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            +
                            +

                            results matching ""

                            +
                              +
                              +
                              +

                              No results matching ""

                              +
                              +
                              +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryDotsComponent.html b/documentation/components/GalleryDotsComponent.html new file mode 100644 index 00000000..3a3cb702 --- /dev/null +++ b/documentation/components/GalleryDotsComponent.html @@ -0,0 +1,520 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                              +
                              + + +
                              +
                              + + + + + + + + +
                              +

                              +

                              File

                              +

                              +

                              + projects/ng-gallery/src/lib/components/gallery-bullets.component.ts +

                              + + + + + + +
                              +

                              Metadata

                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + +
                              +

                              Index

                              + + + + + + + + + + + + + + + + + + + + + +
                              +
                              Properties
                              +
                              + +
                              +
                              Inputs
                              +
                              + +
                              +
                              + +
                              +

                              Constructor

                              + + + + + + + + + + + + + +
                              +constructor(gallery: Gallery) +
                              + +
                              +
                              + Parameters : + + + + + + + + + + + + + + + + + + +
                              NameTypeOptional
                              gallery + Gallery + + No +
                              +
                              +
                              +
                              + +
                              +

                              Inputs

                              + + + + + + + + + + + + +
                              + + config +
                              + Type : GalleryConfig + +
                              + +
                              + + + + + + + + + + + + +
                              + + galleryId +
                              + Type : string + +
                              + +
                              + + + + + + + + + + + + +
                              + + state +
                              + Type : GalleryState + +
                              + +
                              +
                              + + + + +
                              + +

                              + Properties +

                              + + + + + + + + + + + + + + +
                              + + + Public + gallery + + +
                              + Type : Gallery + +
                              + +
                              +
                              + +
                              + + +
                              +
                              import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
                              +import { CommonModule } from '@angular/common';
                              +import { Gallery } from '../services/gallery.service';
                              +import { GalleryState } from '../models/gallery.model';
                              +import { GalleryConfig } from '../models/config.model';
                              +
                              +@Component({
                              +  selector: 'gallery-dots',
                              +  changeDetection: ChangeDetectionStrategy.OnPush,
                              +  styleUrls: ['./gallery-dots.scss'],
                              +  template: `
                              +    <div class="g-dot"
                              +         *ngFor="let item of state.items; let i = index"
                              +         [class.g-dot-active]="i === state.currIndex"
                              +         [style.width.px]="config?.dotsSize"
                              +         [style.height.px]="config?.dotsSize"
                              +         (click)="gallery.ref(this.galleryId).set(i)">
                              +      <div class="g-dot-inner"></div>
                              +    </div>
                              +  `,
                              +  standalone: true,
                              +  imports: [CommonModule]
                              +})
                              +export class GalleryBulletsComponent {
                              +  @Input() galleryId: string;
                              +  @Input() state: GalleryState;
                              +  @Input() config: GalleryConfig;
                              +
                              +  constructor(public gallery: Gallery) {
                              +  }
                              +}
                              +
                              +
                              + + +
                              +

                              + ./gallery-dots.scss +

                              +
                              :host {
                              +  position: absolute;
                              +  left: 50%;
                              +  z-index: 99;
                              +  transform: translateX(-50%);
                              +  display: flex;
                              +  gap: 6px;
                              +  top: var(--dots-top);
                              +  bottom: var(--dots-bottom);
                              +}
                              +
                              +:host,
                              +.g-dot,
                              +.g-dot-inner {
                              +  display: flex;
                              +  justify-content: center;
                              +  align-items: center;
                              +}
                              +
                              +.g-dot {
                              +  cursor: pointer;
                              +  z-index: 20;
                              +
                              +  &:hover .g-dot-inner {
                              +    opacity: 1;
                              +  }
                              +}
                              +
                              +.g-dot-active .g-dot-inner {
                              +  opacity: 1;
                              +}
                              +
                              +.g-dot-inner {
                              +  background-color: var(--g-overlay-color);
                              +  opacity: 0.4;
                              +  width: 100%;
                              +  height: 100%;
                              +  border-radius: 50%;
                              +  transition: opacity linear 150ms;
                              +}
                              +
                              +
                              + +
                              +
                              +
                              +
                              + Legend +
                              +
                              +
                              Html element +
                              +
                              +
                              Component +
                              +
                              +
                              Html element with directive +
                              +
                              +
                              + + +
                              + + + + + + + + + + + + + + + + + + + + + + +
                              +
                              +

                              results matching ""

                              +
                                +
                                +
                                +

                                No results matching ""

                                +
                                +
                                +
                                + +
                                +
                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryExampleComponent.html b/documentation/components/GalleryExampleComponent.html new file mode 100644 index 00000000..60a7a05f --- /dev/null +++ b/documentation/components/GalleryExampleComponent.html @@ -0,0 +1,1432 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                +
                                + + +
                                +
                                + + + + + + + + +
                                +

                                +

                                File

                                +

                                +

                                + projects/ng-gallery/src/stories/basic/gallery-example.component.ts +

                                + + +

                                +

                                Description

                                +

                                +

                                +

                                It should be possible to write a description here

                                + +

                                + + + + +
                                +

                                Metadata

                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                + +
                                +

                                Index

                                + + + + + + + + + + + + + + + + + + + + + +
                                +
                                Properties
                                +
                                + +
                                +
                                Inputs
                                +
                                + +
                                +
                                + +
                                +

                                Constructor

                                + + + + + + + + + + + + + +
                                +constructor(pixabay: Pixabay) +
                                + +
                                +
                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                NameTypeOptional
                                pixabay + Pixabay + + No +
                                +
                                +
                                +
                                + +
                                +

                                Inputs

                                + + + + + + + + + + + + + + + +
                                + + autoHeight +
                                + Type : boolean + +
                                + +
                                +

                                This is a test

                                +
                                +
                                + + + + + + + + + + + + +
                                + + autoplay +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + counter +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + counterPosition +
                                + Type : "top" | "bottom" + +
                                + Default value : CounterPosition.Top +
                                + +
                                + + + + + + + + + + + + +
                                + + debug +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + disableThumb +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + dots +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + bulletsPosition +
                                + Type : "top" | "bottom" + +
                                + Default value : bulletsPosition.Bottom +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + dotsSize +
                                + Type : number + +
                                + Default value : 6 +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + imageSize +
                                + Type : "cover" | "contain" + +
                                + Default value : ImageSize.Contain +
                                + +
                                + + + + + + + + + + + + +
                                + + itemAutosize +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + loadingAttr +
                                + Type : "eager" | "lazy" + +
                                + Default value : LoadingAttr.Lazy +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + loadingStrategy +
                                + Type : "preload" | "lazy" | "default" + +
                                + Default value : LoadingStrategy.Default +
                                + +
                                + + + + + + + + + + + + +
                                + + loop +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + mouseSlidingDisabled +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + nav +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + navScrollBehavior +
                                + Type : "smooth" | "auto" + +
                                + Default value : 'smooth' +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + playerInterval +
                                + Type : number + +
                                + Default value : 3000 +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + resizeDebounceTime +
                                + Type : number + +
                                + Default value : 0 +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + scrollBehavior +
                                + Type : "smooth" | "auto" + +
                                + Default value : 'smooth' +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + slidingDirection +
                                + Type : "horizontal" | "vertical" + +
                                + Default value : SlidingDirection.Horizontal +
                                + +
                                + + + + + + + + + + + + +
                                + + slidingDisabled +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + slidingDuration +
                                + Type : number + +
                                + Default value : 468 +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + slidingEase +
                                + Type : BezierEasingOptions + +
                                + Default value : { + x1: 0.42, + y1: 0, + x2: 0.58, + y2: 1 + } +
                                + +
                                + + + + + + + + + + + + +
                                + + thumb +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + thumbAutosize +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + +
                                + + thumbDetached +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + thumbHeight +
                                + Type : number + +
                                + Default value : 90 +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + thumbImageSize +
                                + Type : "cover" | "contain" + +
                                + Default value : ImageSize.Cover +
                                + +
                                + + + + + + + + + + + + +
                                + + thumbMouseSlidingDisabled +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + thumbPosition +
                                + Type : "top" | "left" | "right" | "bottom" + +
                                + Default value : ThumbnailsPosition.Bottom +
                                + +
                                + + + + + + + + + + + + +
                                + + thumbSlidingDisabled +
                                + Type : boolean + +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + thumbView +
                                + Type : "default" | "contain" + +
                                + Default value : ThumbnailsView.Default +
                                + +
                                + + + + + + + + + + + + + + + +
                                + + thumbWidth +
                                + Type : number + +
                                + Default value : 120 +
                                + +
                                +
                                + + + + +
                                + +

                                + Properties +

                                + + + + + + + + + + + + + + +
                                + + + Readonly + items$ + + +
                                + Type : Observable<GalleryItem[]> + +
                                + +
                                +
                                + +
                                + + +
                                +
                                import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
                                +import { CommonModule } from '@angular/common';
                                +import {
                                +  GalleryModule,
                                +  GalleryItem,
                                +  LoadingAttr,
                                +  ImageSize,
                                +  ThumbnailsPosition,
                                +  LoadingStrategy,
                                +  SlidingDirection,
                                +  CounterPosition,
                                +  bulletsPosition,
                                +  ThumbnailsView
                                +} from 'ng-gallery';
                                +import { Observable } from 'rxjs';
                                +import { Pixabay } from '../pixabay/pixabay.service';
                                +import { BezierEasingOptions } from '../../lib/smooth-scroll';
                                +
                                +/**
                                + * It should be possible to write a description here
                                + */
                                +@Component({
                                +  selector: 'gallery-example',
                                +  template: `
                                +    <gallery [items]="items$ | async"
                                +             [imageSize]="imageSize"
                                +             [thumbImageSize]="thumbImageSize"
                                +             [bulletsPosition]="bulletsPosition"
                                +             [counterPosition]="counterPosition"
                                +             [slidingDirection]="slidingDirection"
                                +             [loadingAttr]="loadingAttr"
                                +             [loadingStrategy]="loadingStrategy"
                                +             [thumbPosition]="thumbPosition"
                                +             [thumbView]="thumbView"
                                +             [scrollBehavior]="scrollBehavior"
                                +             [navScrollBehavior]="navScrollBehavior"
                                +             [dotsSize]="dotsSize"
                                +             [thumbWidth]="thumbWidth"
                                +             [thumbHeight]="thumbHeight"
                                +             [playerInterval]="playerInterval"
                                +             [slidingDuration]="slidingDuration"
                                +             [resizeDebounceTime]="resizeDebounceTime"
                                +             [nav]="nav"
                                +             [dots]="dots"
                                +             [loop]="loop"
                                +             [debug]="debug"
                                +             [thumb]="thumb"
                                +             [counter]="counter"
                                +             [autoplay]="autoplay"
                                +             [autoHeight]="autoHeight"
                                +             [itemAutosize]="itemAutosize"
                                +             [disableThumb]="disableThumb"
                                +             [thumbDetached]="thumbDetached"
                                +             [thumbAutosize]="thumbAutosize"
                                +             [slidingDisabled]="slidingDisabled"
                                +             [thumbSlidingDisabled]="thumbSlidingDisabled"
                                +             [mouseSlidingDisabled]="mouseSlidingDisabled"
                                +             [thumbMouseSlidingDisabled]="thumbMouseSlidingDisabled"
                                +    />
                                +  `,
                                +  changeDetection: ChangeDetectionStrategy.OnPush,
                                +  standalone: true,
                                +  imports: [CommonModule, GalleryModule]
                                +})
                                +export class GalleryExampleComponent {
                                +
                                +  readonly items$: Observable<GalleryItem[]>;
                                +
                                +  @Input() nav: boolean;
                                +  @Input() dots: boolean;
                                +  @Input() loop: boolean;
                                +  @Input() debug: boolean;
                                +  @Input() thumb: boolean;
                                +  @Input() counter: boolean;
                                +  @Input() thumbDetached: boolean;
                                +  @Input() thumbAutosize: boolean;
                                +  @Input() itemAutosize: boolean;
                                +
                                +  /** This is a test */
                                +  @Input() autoHeight: boolean;
                                +
                                +  @Input() autoplay: boolean;
                                +
                                +  @Input() disableThumb: boolean;
                                +
                                +  @Input() slidingDisabled: boolean;
                                +  @Input() thumbSlidingDisabled: boolean;
                                +  @Input() mouseSlidingDisabled: boolean;
                                +  @Input() thumbMouseSlidingDisabled: boolean;
                                +  @Input() dotsSize: number = 6;
                                +  @Input() thumbWidth: number = 120;
                                +  @Input() thumbHeight: number = 90;
                                +  @Input() playerInterval: number = 3000;
                                +  @Input() slidingDuration: number = 468;
                                +  @Input() resizeDebounceTime: number = 0;
                                +  @Input() scrollBehavior: 'smooth' | 'auto' = 'smooth';
                                +  @Input() navScrollBehavior: 'smooth' | 'auto' = 'smooth';
                                +  @Input() slidingEase: BezierEasingOptions = {
                                +    x1: 0.42,
                                +    y1: 0,
                                +    x2: 0.58,
                                +    y2: 1
                                +  };
                                +  @Input() imageSize: 'cover' | 'contain' = ImageSize.Contain;
                                +  @Input() thumbImageSize: 'cover' | 'contain' = ImageSize.Cover;
                                +  @Input() bulletsPosition: 'top' | 'bottom' = bulletsPosition.Bottom;
                                +  @Input() counterPosition: 'top' | 'bottom' = CounterPosition.Top;
                                +  @Input() slidingDirection: 'horizontal' | 'vertical' = SlidingDirection.Horizontal;
                                +  @Input() loadingAttr: 'eager' | 'lazy' = LoadingAttr.Lazy;
                                +  @Input() loadingStrategy: 'preload' | 'lazy' | 'default' = LoadingStrategy.Default;
                                +  @Input() thumbPosition: 'top' | 'left' | 'right' | 'bottom' = ThumbnailsPosition.Bottom;
                                +  @Input() thumbView: 'default' | 'contain' = ThumbnailsView.Default;
                                +
                                +  constructor(pixabay: Pixabay) {
                                +    this.items$ = pixabay.getHDImages('vegetables');
                                +  }
                                +}
                                +
                                +
                                + + + +
                                +
                                +
                                +
                                + Legend +
                                +
                                +
                                Html element +
                                +
                                +
                                Component +
                                +
                                +
                                Html element with directive +
                                +
                                +
                                + + +
                                + + + + + + + + + + + + + + + + + + + + + + +
                                +
                                +

                                results matching ""

                                +
                                  +
                                  +
                                  +

                                  No results matching ""

                                  +
                                  +
                                  +
                                  + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryIframeComponent.html b/documentation/components/GalleryIframeComponent.html new file mode 100644 index 00000000..ea80259d --- /dev/null +++ b/documentation/components/GalleryIframeComponent.html @@ -0,0 +1,733 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                  +
                                  + + +
                                  +
                                  + + + + + + + + +
                                  +

                                  +

                                  File

                                  +

                                  +

                                  + projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts +

                                  + + + + + + +
                                  +

                                  Metadata

                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  + +
                                  +

                                  Index

                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  Properties
                                  +
                                  + +
                                  +
                                  Inputs
                                  +
                                  + +
                                  +
                                  Accessors
                                  +
                                  + +
                                  +
                                  + +
                                  +

                                  Constructor

                                  + + + + + + + + + + + + + +
                                  +constructor(_sanitizer: DomSanitizer) +
                                  + +
                                  +
                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                  NameTypeOptional
                                  _sanitizer + DomSanitizer + + No +
                                  +
                                  +
                                  +
                                  + +
                                  +

                                  Inputs

                                  + + + + + + + + + + + + +
                                  + + autoplay +
                                  + Type : boolean + +
                                  + +
                                  + + + + + + + + + + + + +
                                  + + loadingAttr +
                                  + Type : "eager" | "lazy" + +
                                  + +
                                  + + + + + + + + + + + + +
                                  + + pause +
                                  + Type : boolean + +
                                  + +
                                  + + + + + + + + + + + + +
                                  + + src +
                                  + Type : string + +
                                  + +
                                  +
                                  + + + + +
                                  + +

                                  + Properties +

                                  + + + + + + + + + + + + + + + + + +
                                  + + + iframe + + +
                                  + Type : ElementRef + +
                                  + Decorators : +
                                  + + @ViewChild('iframe')
                                  +
                                  +
                                  + +
                                  + + + + + + + + + + + + + + +
                                  + + + iframeSrc + + +
                                  + Type : SafeResourceUrl + +
                                  + +
                                  + + + + + + + + + + + + + + +
                                  + + + videoSrc + + +
                                  + Type : string + +
                                  + +
                                  +
                                  + +
                                  +

                                  + Accessors +

                                  + + + + + + + + + + + + + + + + + +
                                  + + src +
                                  + setsrc(src: string) +
                                  + +
                                  + +
                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                  NameTypeOptional
                                  src + string + + No +
                                  +
                                  +
                                  +
                                  +
                                  + Returns : void + +
                                  +
                                  + + + + + + + + + + + + + + + + + +
                                  + + pauseVideo +
                                  + setpauseVideo(shouldPause: boolean) +
                                  + +
                                  + +
                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                  NameTypeOptional
                                  shouldPause + boolean + + No +
                                  +
                                  +
                                  +
                                  +
                                  + Returns : void + +
                                  +
                                  +
                                  +
                                  + + +
                                  +
                                  import { Component, Input, ViewChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';
                                  +import { NgIf } from '@angular/common';
                                  +import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
                                  +
                                  +@Component({
                                  +  selector: 'gallery-iframe',
                                  +  changeDetection: ChangeDetectionStrategy.OnPush,
                                  +  template: `
                                  +    <iframe *ngIf="autoplay; else default"
                                  +            #iframe
                                  +            [attr.loading]="loadingAttr"
                                  +            allowfullscreen
                                  +            allow
                                  +            style="border:none"
                                  +            [src]="iframeSrc">
                                  +    </iframe>
                                  +    <ng-template #default>
                                  +      <iframe #iframe
                                  +              [attr.loading]="loadingAttr"
                                  +              allowfullscreen
                                  +              style="border:none"
                                  +              [src]="iframeSrc">
                                  +      </iframe>
                                  +    </ng-template>
                                  +  `,
                                  +  standalone: true,
                                  +  imports: [NgIf]
                                  +})
                                  +export class GalleryIframeComponent {
                                  +
                                  +  iframeSrc: SafeResourceUrl;
                                  +  videoSrc: string;
                                  +
                                  +  @Input('src') set src(src: string) {
                                  +    this.videoSrc = src;
                                  +    this.iframeSrc = this._sanitizer.bypassSecurityTrustResourceUrl(src);
                                  +  }
                                  +
                                  +  @Input('pause') set pauseVideo(shouldPause: boolean) {
                                  +    if (this.iframe?.nativeElement) {
                                  +      if (shouldPause) {
                                  +        const iframe: HTMLIFrameElement = this.iframe.nativeElement;
                                  +        iframe.src = null;
                                  +
                                  +        if (!this.autoplay && this.videoSrc) {
                                  +          this.iframeSrc = this._sanitizer.bypassSecurityTrustResourceUrl(this.videoSrc);
                                  +        }
                                  +      }
                                  +    }
                                  +  }
                                  +
                                  +  @Input() autoplay: boolean;
                                  +
                                  +  @Input() loadingAttr: 'eager' | 'lazy';
                                  +
                                  +  @ViewChild('iframe') iframe: ElementRef;
                                  +
                                  +  constructor(private _sanitizer: DomSanitizer) {
                                  +  }
                                  +}
                                  +
                                  +
                                  + + + +
                                  +
                                  +
                                  +
                                  + Legend +
                                  +
                                  +
                                  Html element +
                                  +
                                  +
                                  Component +
                                  +
                                  +
                                  Html element with directive +
                                  +
                                  +
                                  + + +
                                  + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  +

                                  results matching ""

                                  +
                                    +
                                    +
                                    +

                                    No results matching ""

                                    +
                                    +
                                    +
                                    + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryImageComponent.html b/documentation/components/GalleryImageComponent.html new file mode 100644 index 00000000..b8017d2c --- /dev/null +++ b/documentation/components/GalleryImageComponent.html @@ -0,0 +1,1203 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                    +
                                    + + +
                                    +
                                    + + + + + + + + +
                                    +

                                    +

                                    File

                                    +

                                    +

                                    + projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts +

                                    + + + + +

                                    +

                                    Implements

                                    +

                                    +

                                    + OnInit +

                                    + + +
                                    +

                                    Metadata

                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                    + +
                                    +

                                    Index

                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                    +
                                    Properties
                                    +
                                    + +
                                    +
                                    Methods
                                    +
                                    + +
                                    +
                                    Inputs
                                    +
                                    + +
                                    +
                                    Outputs
                                    +
                                    + +
                                    +
                                    HostBindings
                                    +
                                    + +
                                    +
                                    Accessors
                                    +
                                    + +
                                    +
                                    + +
                                    +

                                    Constructor

                                    + + + + + + + + + + + + + +
                                    +constructor(_sanitizer: DomSanitizer) +
                                    + +
                                    +
                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                    NameTypeOptional
                                    _sanitizer + DomSanitizer + + No +
                                    +
                                    +
                                    +
                                    + +
                                    +

                                    Inputs

                                    + + + + + + + + + + + + + + + +
                                    + + alt +
                                    + Type : string + +
                                    + +
                                    +

                                    Image alt

                                    +
                                    +
                                    + + + + + + + + + + + + + + + +
                                    + + errorIcon +
                                    + Type : string + +
                                    + Default value : imageFailedSvg +
                                    + +
                                    + + + + + + + + + + + + +
                                    + + index +
                                    + Type : number + +
                                    + +
                                    + + + + + + + + + + + + + + + +
                                    + + isThumbnail +
                                    + Type : boolean + +
                                    + +
                                    +

                                    Is thumbnail

                                    +
                                    +
                                    + + + + + + + + + + + + + + + +
                                    + + loadingAttr +
                                    + Type : "eager" | "lazy" + +
                                    + +
                                    +

                                    Image loading attribute

                                    +
                                    +
                                    + + + + + + + + + + + + + + + +
                                    + + loadingError +
                                    + Type : string + +
                                    + +
                                    +

                                    Custom error template

                                    +
                                    +
                                    + + + + + + + + + + + + + + + +
                                    + + loadingIcon +
                                    + Type : string + +
                                    + +
                                    +

                                    Custom loader template

                                    +
                                    +
                                    + + + + + + + + + + + + + + + +
                                    + + src +
                                    + Type : string + +
                                    + +
                                    +

                                    Image source URL

                                    +
                                    +
                                    +
                                    +
                                    +

                                    Outputs

                                    + + + + + + + + + + + + + + + +
                                    + + error +
                                    + Type : EventEmitter<ErrorEvent> + +
                                    + +
                                    +

                                    Stream that emits when an error occurs

                                    +
                                    +
                                    +
                                    +
                                    +

                                    HostBindings

                                    + + + + + + + + + + + + + +
                                    + + + attr.imageState + + +
                                    + Type : string + +
                                    + +
                                    +
                                    + + +
                                    + +

                                    + Methods +

                                    + + + + + + + + + + + + + + + + + + + +
                                    + + + ngOnInit + + +
                                    +ngOnInit() +
                                    + +
                                    + +
                                    + Returns : void + +
                                    +
                                    +
                                    +
                                    + +

                                    + Properties +

                                    + + + + + + + + + + + + + + +
                                    + + + errorSvg + + +
                                    + Type : SafeHtml + +
                                    + +
                                    + + + + + + + + + + + + + + + + + +
                                    + + + errorTemplate + + +
                                    + Type : SafeHtml + +
                                    + +
                                    +

                                    Custom error safe template

                                    +
                                    +
                                    + + + + + + + + + + + + + + + + + +
                                    + + + loaderTemplate + + +
                                    + Type : SafeHtml + +
                                    + +
                                    +

                                    Custom loader safe template

                                    +
                                    +
                                    + + + + + + + + + + + + + + + + + +
                                    + + + state + + +
                                    + Type : ItemState + +
                                    + Default value : 'loading' +
                                    + +
                                    +
                                    + +
                                    +

                                    + Accessors +

                                    + + + + + + + + + + + + + + +
                                    + + imageState +
                                    + getimageState() +
                                    + +
                                    +
                                    +
                                    + + +
                                    +
                                    import {
                                    +  Component,
                                    +  Input,
                                    +  Output,
                                    +  HostBinding,
                                    +  EventEmitter,
                                    +  OnInit,
                                    +  ChangeDetectionStrategy
                                    +} from '@angular/core';
                                    +import { NgSwitch, NgSwitchCase, NgIf } from '@angular/common';
                                    +import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
                                    +import { animate, style, transition, trigger } from '@angular/animations';
                                    +import { imageFailedSvg } from './svg-assets';
                                    +import { ImgRecognizer } from '../../utils/img-recognizer';
                                    +import { ItemState } from './items.model';
                                    +
                                    +@Component({
                                    +  selector: 'gallery-image',
                                    +  changeDetection: ChangeDetectionStrategy.OnPush,
                                    +  styleUrls: ['./gallery-image.scss'],
                                    +  animations: [
                                    +    trigger('fadeIn', [
                                    +      transition('* => success', [
                                    +        style({ opacity: 0 }),
                                    +        animate('300ms ease-in', style({ opacity: 1 }))
                                    +      ])
                                    +    ])
                                    +  ],
                                    +  template: `
                                    +    <ng-container [ngSwitch]="state">
                                    +
                                    +      <ng-container *ngIf="isThumbnail; else main">
                                    +        <img [@fadeIn]="state"
                                    +             [src]="src"
                                    +             [attr.alt]="alt"
                                    +             [attr.loading]="loadingAttr"
                                    +             [style.visibility]="state === 'success' ? 'visible' : 'hidden'"
                                    +             class="g-image-item"
                                    +             (load)="state = 'success'"
                                    +             (error)="state = 'failed'; error.emit($event)"/>
                                    +      </ng-container>
                                    +      <ng-template #main>
                                    +        <img [galleryImage]="index"
                                    +             [@fadeIn]="state"
                                    +             [src]="src"
                                    +             [attr.alt]="alt"
                                    +             [attr.loading]="loadingAttr"
                                    +             [style.visibility]="state === 'success' ? 'visible' : 'hidden'"
                                    +             class="g-image-item"
                                    +             (load)="state = 'success'"
                                    +             (error)="state = 'failed'; error.emit($event)"/>
                                    +      </ng-template>
                                    +
                                    +      <div *ngSwitchCase="'failed'"
                                    +           class="g-image-error-message">
                                    +        <div *ngIf="errorTemplate; else defaultError"
                                    +             [innerHTML]="errorTemplate"></div>
                                    +        <ng-template #defaultError>
                                    +          <ng-container *ngIf="isThumbnail; else isLarge">
                                    +            <h4>
                                    +              <div class="gallery-thumb-error" [innerHTML]="errorSvg"></div>
                                    +            </h4>
                                    +          </ng-container>
                                    +          <ng-template #isLarge>
                                    +            <h2>
                                    +              <div class="gallery-image-error" [innerHTML]="errorSvg"></div>
                                    +            </h2>
                                    +            <p>Unable to load the image!</p>
                                    +          </ng-template>
                                    +        </ng-template>
                                    +      </div>
                                    +
                                    +      <ng-container *ngSwitchCase="'loading'">
                                    +        <div *ngIf="loaderTemplate; else defaultLoader"
                                    +             class="g-loading"
                                    +             [innerHTML]="loaderTemplate">
                                    +        </div>
                                    +        <ng-template #defaultLoader>
                                    +          <div *ngIf="isThumbnail" class="g-thumb-loading"></div>
                                    +        </ng-template>
                                    +      </ng-container>
                                    +    </ng-container>
                                    +  `,
                                    +  standalone: true,
                                    +  imports: [NgSwitch, NgSwitchCase, NgIf, ImgRecognizer]
                                    +})
                                    +
                                    +export class GalleryImageComponent implements OnInit {
                                    +
                                    +  state: ItemState = 'loading';
                                    +
                                    +  /** Is thumbnail */
                                    +  @Input() isThumbnail: boolean;
                                    +
                                    +  @Input() index: number;
                                    +
                                    +  /** Image loading attribute */
                                    +  @Input() loadingAttr: 'eager' | 'lazy';
                                    +
                                    +  /** Image alt */
                                    +  @Input() alt: string;
                                    +
                                    +  /** Image source URL */
                                    +  @Input() src: string;
                                    +
                                    +  /** Custom loader template */
                                    +  @Input() loadingIcon: string;
                                    +  /** Custom loader safe template */
                                    +  loaderTemplate: SafeHtml;
                                    +
                                    +  /** Custom error template */
                                    +  @Input() loadingError: string;
                                    +  /** Custom error safe template */
                                    +  errorTemplate: SafeHtml;
                                    +
                                    +  @Input() errorIcon: string = imageFailedSvg;
                                    +  errorSvg: SafeHtml;
                                    +
                                    +  /** Stream that emits when an error occurs */
                                    +  @Output() error: EventEmitter<ErrorEvent> = new EventEmitter<ErrorEvent>();
                                    +
                                    +  @HostBinding('attr.imageState') get imageState(): string {
                                    +    return this.state;
                                    +  }
                                    +
                                    +  constructor(private _sanitizer: DomSanitizer) {
                                    +  }
                                    +
                                    +  ngOnInit() {
                                    +    if (this.loadingIcon) {
                                    +      this.loaderTemplate = this._sanitizer.bypassSecurityTrustHtml(this.loadingIcon);
                                    +    }
                                    +    if (this.loadingError) {
                                    +      this.errorTemplate = this._sanitizer.bypassSecurityTrustHtml(this.loadingError);
                                    +    }
                                    +    if (this.errorIcon) {
                                    +      this.errorSvg = this._sanitizer.bypassSecurityTrustHtml(this.errorIcon);
                                    +    }
                                    +  }
                                    +}
                                    +
                                    +
                                    + + +
                                    +

                                    + ./gallery-image.scss +

                                    +
                                    :host {
                                    +  display: flex;
                                    +  width: 100%;
                                    +  height: 100%;
                                    +  max-height: 100%;
                                    +  max-width: 100%;
                                    +  transition: opacity 300ms cubic-bezier(0.5, 0, 0.5, 1);
                                    +  opacity: var(--g-thumb-opacity);
                                    +
                                    +  &[imageState='success'] {
                                    +    align-self: center;
                                    +  }
                                    +
                                    +  ::ng-deep {
                                    +    svg {
                                    +      width: 100%;
                                    +      height: 100%;
                                    +    }
                                    +  }
                                    +}
                                    +
                                    +.gallery-image-error {
                                    +  width: 100px;
                                    +  height: 100px;
                                    +}
                                    +
                                    +.gallery-thumb-error {
                                    +  width: 40px;
                                    +  height: 40px;
                                    +}
                                    +
                                    +img.g-image-item {
                                    +  object-fit: var(--image-object-fit);
                                    +  width: 100%;
                                    +  height: 100%;
                                    +  pointer-events: none;
                                    +  max-height: 100%;
                                    +  max-width: 100%;
                                    +}
                                    +
                                    +.g-image-error-message {
                                    +  position: absolute;
                                    +  z-index: 10;
                                    +  left: 0;
                                    +  top: 0;
                                    +  right: 0;
                                    +  bottom: 0;
                                    +  color: white;
                                    +  display: flex;
                                    +  align-items: center;
                                    +  justify-content: center;
                                    +  flex-direction: column;
                                    +}
                                    +
                                    +h2, h4 {
                                    +  color: coral;
                                    +  margin: 0;
                                    +}
                                    +
                                    +h2 {
                                    +  font-size: 3.5em;
                                    +  margin-bottom: 0.3em;
                                    +}
                                    +
                                    +h4 {
                                    +  font-size: 1.6em;
                                    +}
                                    +
                                    +.g-loading {
                                    +  position: absolute;
                                    +  transform: translate3d(-50%, -50%, 0);
                                    +  left: 50%;
                                    +  top: 50%;
                                    +  width: 80px;
                                    +  height: 80px;
                                    +}
                                    +
                                    +// Thumbnail loading
                                    +
                                    +$loading-color: #fff !default;
                                    +$placeholder-ng: #262626 !default;
                                    +
                                    +.g-active-thumb {
                                    +  .g-thumb-loading {
                                    +    background-color: #464646;
                                    +  }
                                    +}
                                    +
                                    +.g-thumb-loading {
                                    +  position: relative;
                                    +  overflow: hidden;
                                    +  width: 100%;
                                    +  height: 100%;
                                    +  background-color: $placeholder-ng;
                                    +
                                    +  &::before {
                                    +    content: "";
                                    +    position: absolute;
                                    +    top: 0;
                                    +    right: 0;
                                    +    bottom: 0;
                                    +    left: 50%;
                                    +    z-index: 1;
                                    +    width: 500%;
                                    +    margin-left: -250%;
                                    +    animation: phAnimation .8s linear infinite;
                                    +    background: linear-gradient(to right, rgba($loading-color, 0) 46%, rgba($loading-color, .35) 50%, rgba($loading-color, 0) 54%) 50% 50%;
                                    +  }
                                    +}
                                    +
                                    +@keyframes phAnimation {
                                    +  0% {
                                    +    transform: translate3d(-30%, 0, 0);
                                    +  }
                                    +  100% {
                                    +    transform: translate3d(30%, 0, 0);
                                    +  }
                                    +}
                                    +
                                    +
                                    + +
                                    +
                                    +
                                    +
                                    + Legend +
                                    +
                                    +
                                    Html element +
                                    +
                                    +
                                    Component +
                                    +
                                    +
                                    Html element with directive +
                                    +
                                    +
                                    + + +
                                    + + + + + + + + + + + + + + + + + + + + + + +
                                    +
                                    +

                                    results matching ""

                                    +
                                      +
                                      +
                                      +

                                      No results matching ""

                                      +
                                      +
                                      +
                                      + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryItemComponent.html b/documentation/components/GalleryItemComponent.html new file mode 100644 index 00000000..e704b185 --- /dev/null +++ b/documentation/components/GalleryItemComponent.html @@ -0,0 +1,1414 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                      +
                                      + + +
                                      +
                                      + + + + + + + + +
                                      +

                                      +

                                      File

                                      +

                                      +

                                      + projects/ng-gallery/src/lib/components/gallery-item.component.ts +

                                      + + + + +

                                      +

                                      Implements

                                      +

                                      +

                                      + AfterViewInit +

                                      + + +
                                      +

                                      Metadata

                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      + +
                                      +

                                      Index

                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      +
                                      Properties
                                      +
                                      + +
                                      +
                                      Methods
                                      +
                                      + +
                                      +
                                      Inputs
                                      +
                                      + +
                                      +
                                      Outputs
                                      +
                                      + +
                                      +
                                      HostBindings
                                      +
                                      + +
                                      +
                                      Accessors
                                      +
                                      + +
                                      +
                                      + +
                                      +

                                      Constructor

                                      + + + + + + + + + + + + + +
                                      +constructor(el: ElementRef) +
                                      + +
                                      +
                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                      NameTypeOptional
                                      el + ElementRef + + No +
                                      +
                                      +
                                      +
                                      + +
                                      +

                                      Inputs

                                      + + + + + + + + + + + + + + + +
                                      + + config +
                                      + Type : GalleryConfig + +
                                      + +
                                      +

                                      Gallery config

                                      +
                                      +
                                      + + + + + + + + + + + + + + + +
                                      + + count +
                                      + Type : number + +
                                      + +
                                      +

                                      The number of total items

                                      +
                                      +
                                      + + + + + + + + + + + + + + + +
                                      + + currIndex +
                                      + Type : number + +
                                      + +
                                      +

                                      Gallery current index

                                      +
                                      +
                                      + + + + + + + + + + + + + + + +
                                      + + data +
                                      + Type : GalleryItemData + +
                                      + +
                                      +

                                      Item's data, this object contains the data required to display the content (e.g. src path)

                                      +
                                      +
                                      + + + + + + + + + + + + + + + +
                                      + + index +
                                      + Type : number + +
                                      + +
                                      +

                                      Item's index in the gallery

                                      +
                                      +
                                      + + + + + + + + + + + + + + + +
                                      + + type +
                                      + Type : GalleryItemType + +
                                      + +
                                      +

                                      Item's type 'image', 'video', 'youtube', 'iframe'

                                      +
                                      +
                                      +
                                      +
                                      +

                                      Outputs

                                      + + + + + + + + + + + + + + + +
                                      + + error +
                                      + Type : EventEmitter<ErrorEvent> + +
                                      + +
                                      +

                                      Stream that emits when an error occurs

                                      +
                                      +
                                      +
                                      +
                                      +

                                      HostBindings

                                      + + + + + + + + + + + + + +
                                      + + + attr.galleryIndex + + +
                                      + Type : number + +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + + attr.itemState + + +
                                      + Type : ItemState + +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + + class.g-active-item + + +
                                      + Type : boolean + +
                                      + +
                                      +
                                      + + +
                                      + +

                                      + Methods +

                                      + + + + + + + + + + + + + + + + + + + +
                                      + + + ngAfterViewInit + + +
                                      +ngAfterViewInit() +
                                      + +
                                      + +
                                      + Returns : void + +
                                      +
                                      +
                                      +
                                      + +

                                      + Properties +

                                      + + + + + + + + + + + + + + + + + +
                                      + + + isItemContainImage + + +
                                      + Type : boolean + +
                                      + +
                                      +

                                      A flag that indicates if the item is type of image, it can be a custom template by the user, +The img recognizer directive will set it to true

                                      +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + +
                                      + + + Readonly + state$ + + +
                                      + Type : BehaviorSubject<ItemState> + +
                                      + Default value : new BehaviorSubject<ItemState>('loading') +
                                      + +
                                      +

                                      A stream that indicates that the height was emitted after the image is loaded, used only for gallery image types

                                      +
                                      +
                                      + + + + + + + + + + + + + + +
                                      + + + Readonly + Types + + +
                                      + Default value : GalleryItemTypes +
                                      + +
                                      +
                                      + +
                                      +

                                      + Accessors +

                                      + + + + + + + + + + + + + + +
                                      + + isActive +
                                      + getisActive() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + isIndexAttr +
                                      + getisIndexAttr() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + itemState +
                                      + getitemState() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + imageContext +
                                      + getimageContext() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + itemContext +
                                      + getitemContext() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + nativeElement +
                                      + getnativeElement() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + isAutoPlay +
                                      + getisAutoPlay() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + youtubeSrc +
                                      + getyoutubeSrc() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + load +
                                      + getload() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + imageData +
                                      + getimageData() +
                                      + +
                                      + + + + + + + + + + + + + + +
                                      + + videoData +
                                      + getvideoData() +
                                      + +
                                      +
                                      +
                                      + + +
                                      +
                                      import {
                                      +  Component,
                                      +  HostBinding,
                                      +  Input,
                                      +  Output,
                                      +  EventEmitter,
                                      +  ElementRef,
                                      +  AfterViewInit,
                                      +  ChangeDetectionStrategy
                                      +} from '@angular/core';
                                      +import { CommonModule } from '@angular/common';
                                      +import { BehaviorSubject } from 'rxjs';
                                      +import { GalleryItemContext } from '../directives/gallery-item-def.directive';
                                      +import { GalleryIframeComponent } from './templates/gallery-iframe.component';
                                      +import { GalleryVideoComponent } from './templates/gallery-video.component';
                                      +import { GalleryImageComponent } from './templates/gallery-image.component';
                                      +import { GalleryConfig } from '../models/config.model';
                                      +import { GalleryItemType, GalleryItemTypes, LoadingStrategy } from '../models/constants';
                                      +import { GalleryItemData, ImageItemData, ItemState, VideoItemData, YoutubeItemData } from './templates/items.model';
                                      +
                                      +@Component({
                                      +  selector: 'gallery-item',
                                      +  changeDetection: ChangeDetectionStrategy.OnPush,
                                      +  styleUrls: ['./gallery-item.scss'],
                                      +  template: `
                                      +    <ng-container *ngIf="load" [ngSwitch]="type">
                                      +      <ng-container *ngSwitchCase="Types.Image">
                                      +        <gallery-image [src]="imageData.src"
                                      +                       [alt]="imageData.alt"
                                      +                       [index]="index"
                                      +                       [loadingAttr]="config.loadingAttr"
                                      +                       [loadingIcon]="config.loadingIcon"
                                      +                       [loadingError]="config.loadingError"
                                      +                       (error)="error.emit($event)"></gallery-image>
                                      +
                                      +        <div *ngIf="config.imageTemplate" class="g-template g-item-template">
                                      +          <ng-container *ngTemplateOutlet="config.imageTemplate; context: imageContext"></ng-container>
                                      +        </div>
                                      +      </ng-container>
                                      +
                                      +      <gallery-video *ngSwitchCase="Types.Video"
                                      +                     [src]="videoData.src"
                                      +                     [mute]="videoData.mute"
                                      +                     [poster]="videoData.poster"
                                      +                     [controls]="videoData.controls"
                                      +                     [controlsList]="videoData.controlsList"
                                      +                     [disablePictureInPicture]="videoData.disablePictureInPicture"
                                      +                     [play]="isAutoPlay"
                                      +                     [pause]="currIndex !== index"
                                      +                     (error)="error.emit($event)"></gallery-video>
                                      +
                                      +      <gallery-iframe *ngSwitchCase="Types.Youtube"
                                      +                      [src]="youtubeSrc"
                                      +                      [autoplay]="isAutoPlay"
                                      +                      [loadingAttr]="config.loadingAttr"
                                      +                      [pause]="currIndex !== index"></gallery-iframe>
                                      +
                                      +      <gallery-iframe *ngSwitchCase="Types.Iframe"
                                      +                      [src]="data.src"
                                      +                      [loadingAttr]="config.loadingAttr"></gallery-iframe>
                                      +
                                      +      <ng-container *ngSwitchDefault>
                                      +        <div *ngIf="config.itemTemplate" class="g-template g-item-template">
                                      +          <ng-container *ngTemplateOutlet="config.itemTemplate; context: itemContext"></ng-container>
                                      +        </div>
                                      +      </ng-container>
                                      +    </ng-container>
                                      +  `,
                                      +  standalone: true,
                                      +  imports: [CommonModule, GalleryImageComponent, GalleryVideoComponent, GalleryIframeComponent]
                                      +})
                                      +export class GalleryItemComponent implements AfterViewInit {
                                      +
                                      +  readonly Types = GalleryItemTypes;
                                      +
                                      +  /** A stream that indicates that the height was emitted after the image is loaded, used only for gallery image types */
                                      +  readonly state$: BehaviorSubject<ItemState> = new BehaviorSubject<ItemState>('loading');
                                      +
                                      +  /** A flag that indicates if the item is type of image, it can be a custom template by the user,
                                      +   * The img recognizer directive will set it to true*/
                                      +  isItemContainImage: boolean;
                                      +
                                      +  /** Gallery config */
                                      +  @Input() config: GalleryConfig;
                                      +
                                      +  /** Item's index in the gallery */
                                      +  @Input() index: number;
                                      +
                                      +  /** The number of total items */
                                      +  @Input() count: number;
                                      +
                                      +  /** Gallery current index */
                                      +  @Input() currIndex: number;
                                      +
                                      +  /** Item's type 'image', 'video', 'youtube', 'iframe' */
                                      +  @Input() type: GalleryItemType;
                                      +
                                      +  /** Item's data, this object contains the data required to display the content (e.g. src path) */
                                      +  @Input() data: GalleryItemData;
                                      +
                                      +  /** Stream that emits when an error occurs */
                                      +  @Output() error: EventEmitter<ErrorEvent> = new EventEmitter<ErrorEvent>();
                                      +
                                      +  @HostBinding('class.g-active-item') get isActive(): boolean {
                                      +    return this.index === this.currIndex;
                                      +  }
                                      +
                                      +  @HostBinding('attr.galleryIndex') get isIndexAttr(): number {
                                      +    return this.index;
                                      +  }
                                      +
                                      +  @HostBinding('attr.itemState') get itemState(): ItemState {
                                      +    return this.state$.value;
                                      +  }
                                      +
                                      +  get imageContext(): GalleryItemContext<ImageItemData> {
                                      +    return {
                                      +      $implicit: this.imageData,
                                      +      index: this.index,
                                      +      type: this.type,
                                      +      active: this.isActive,
                                      +      count: this.count,
                                      +      first: this.index === 0,
                                      +      last: this.index === this.count - 1
                                      +    };
                                      +  }
                                      +
                                      +  get itemContext(): GalleryItemContext<GalleryItemData> {
                                      +    return {
                                      +      $implicit: this.data,
                                      +      index: this.index,
                                      +      type: this.type,
                                      +      active: this.isActive,
                                      +      count: this.count,
                                      +      first: this.index === 0,
                                      +      last: this.index === this.count - 1
                                      +    };
                                      +  }
                                      +
                                      +  get nativeElement(): HTMLElement {
                                      +    return this.el.nativeElement;
                                      +  }
                                      +
                                      +  get isAutoPlay(): boolean {
                                      +    if (this.isActive) {
                                      +      if (this.type === GalleryItemTypes.Video || this.type === GalleryItemTypes.Youtube) {
                                      +        return this.videoData.autoplay;
                                      +      }
                                      +    }
                                      +  }
                                      +
                                      +  get youtubeSrc(): string {
                                      +    let autoplay: 1 | 0 = 0;
                                      +    if (this.isActive && this.type === GalleryItemTypes.Youtube && (this.data as YoutubeItemData).autoplay) {
                                      +      autoplay = 1;
                                      +    }
                                      +    const url: URL = new URL(this.data.src as string);
                                      +    url.search = new URLSearchParams({
                                      +      wmode: 'transparent',
                                      +      ...(this.data as YoutubeItemData).params,
                                      +      autoplay
                                      +    }).toString();
                                      +    return url.href;
                                      +  }
                                      +
                                      +  get load(): boolean {
                                      +    switch (this.config.loadingStrategy) {
                                      +      case LoadingStrategy.Preload:
                                      +        return true;
                                      +      case LoadingStrategy.Lazy:
                                      +        return this.currIndex === this.index;
                                      +      default:
                                      +        return this.currIndex === this.index || this.currIndex === this.index - 1 || this.currIndex === this.index + 1;
                                      +    }
                                      +  }
                                      +
                                      +  get imageData(): ImageItemData {
                                      +    return this.data;
                                      +  }
                                      +
                                      +  get videoData(): VideoItemData {
                                      +    return this.data;
                                      +  }
                                      +
                                      +  constructor(private el: ElementRef) {
                                      +  }
                                      +
                                      +  ngAfterViewInit(): void {
                                      +    // If item does not contain an image, then set the state to DONE
                                      +    if (!this.isItemContainImage) {
                                      +      this.state$.next('success');
                                      +    }
                                      +  }
                                      +}
                                      +
                                      +
                                      +
                                      + + +
                                      +

                                      + ./gallery-item.scss +

                                      +
                                      :host {
                                      +  cursor: var(--g-item-cursor);
                                      +  height: var(--g-item-height);
                                      +  width: var(--g-item-width);
                                      +  max-height: var(--g-item-max-height);
                                      +  max-width: var(--slider-width);
                                      +  z-index: 10;
                                      +  position: relative;
                                      +  overflow: hidden;
                                      +  display: flex;
                                      +  flex-direction: column;
                                      +  flex: 0 0 auto;
                                      +  scroll-snap-align: center;
                                      +
                                      +  // Disable highlighting the elements on mouse move or click
                                      +  user-select: none;
                                      +  -webkit-user-drag: none;
                                      +  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
                                      +
                                      +  // In itemAutoSize is true, item size will be zero until it is loaded, fallback to the slider size
                                      +  &[itemState='loading'] {
                                      +    width: var(--slider-width);
                                      +    height: var(--slider-height);
                                      +  }
                                      +
                                      +  > * {
                                      +    height: 100%;
                                      +  }
                                      +
                                      +  ::ng-deep {
                                      +    video, iframe {
                                      +      width: 100%;
                                      +      height: 100%;
                                      +    }
                                      +  }
                                      +}
                                      +
                                      +gallery-image {
                                      +  width: var(--g-item-width);
                                      +  height: var(--g-item-height);
                                      +}
                                      +
                                      +.g-template {
                                      +  position: absolute;
                                      +  z-index: 10;
                                      +  left: 0;
                                      +  top: 0;
                                      +  right: 0;
                                      +  bottom: 0;
                                      +  color: white;
                                      +  display: flex;
                                      +  align-items: center;
                                      +  justify-content: center;
                                      +  flex-direction: column;
                                      +}
                                      +
                                      +
                                      + +
                                      +
                                      +
                                      +
                                      + Legend +
                                      +
                                      +
                                      Html element +
                                      +
                                      +
                                      Component +
                                      +
                                      +
                                      Html element with directive +
                                      +
                                      +
                                      + + +
                                      + + + + + + + + + + + + + + + + + + + + + + +
                                      +
                                      +

                                      results matching ""

                                      +
                                        +
                                        +
                                        +

                                        No results matching ""

                                        +
                                        +
                                        +
                                        + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryNavComponent.html b/documentation/components/GalleryNavComponent.html new file mode 100644 index 00000000..71435d68 --- /dev/null +++ b/documentation/components/GalleryNavComponent.html @@ -0,0 +1,652 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                        +
                                        + + +
                                        +
                                        + + + + + + + + +
                                        +

                                        +

                                        File

                                        +

                                        +

                                        + projects/ng-gallery/src/lib/components/gallery-nav.component.ts +

                                        + + + + +

                                        +

                                        Implements

                                        +

                                        +

                                        + OnInit +

                                        + + +
                                        +

                                        Metadata

                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                        + +
                                        +

                                        Index

                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                        +
                                        Properties
                                        +
                                        + +
                                        +
                                        Methods
                                        +
                                        + +
                                        +
                                        Inputs
                                        +
                                        + +
                                        +
                                        + +
                                        +

                                        Constructor

                                        + + + + + + + + + + + + + +
                                        +constructor(gallery: Gallery, _sanitizer: DomSanitizer) +
                                        + +
                                        +
                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                        NameTypeOptional
                                        gallery + Gallery + + No +
                                        _sanitizer + DomSanitizer + + No +
                                        +
                                        +
                                        +
                                        + +
                                        +

                                        Inputs

                                        + + + + + + + + + + + + +
                                        + + config +
                                        + Type : GalleryConfig + +
                                        + +
                                        + + + + + + + + + + + + +
                                        + + galleryId +
                                        + Type : string + +
                                        + +
                                        + + + + + + + + + + + + +
                                        + + state +
                                        + Type : GalleryState + +
                                        + +
                                        +
                                        + + + +
                                        + +

                                        + Methods +

                                        + + + + + + + + + + + + + + + + + + + +
                                        + + + ngOnInit + + +
                                        +ngOnInit() +
                                        + +
                                        + +
                                        + Returns : void + +
                                        +
                                        +
                                        +
                                        + +

                                        + Properties +

                                        + + + + + + + + + + + + + + +
                                        + + + Public + gallery + + +
                                        + Type : Gallery + +
                                        + +
                                        + + + + + + + + + + + + + + +
                                        + + + navIcon + + +
                                        + Type : SafeHtml + +
                                        + +
                                        +
                                        + +
                                        + + +
                                        +
                                        import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core';
                                        +import { CommonModule } from '@angular/common';
                                        +import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
                                        +import { Gallery } from '../services/gallery.service';
                                        +import { GalleryState } from '../models/gallery.model';
                                        +import { GalleryConfig } from '../models/config.model';
                                        +
                                        +@Component({
                                        +  selector: 'gallery-nav',
                                        +  changeDetection: ChangeDetectionStrategy.OnPush,
                                        +  styleUrls: ['./gallery-nav.scss'],
                                        +  template: `
                                        +    <i *ngIf="config.loop || state.hasPrev"
                                        +       class="g-nav-prev"
                                        +       aria-label="Previous"
                                        +       role="button"
                                        +       (click)="gallery.ref(this.galleryId).prev(config.navScrollBehavior)"
                                        +       [innerHtml]="navIcon"></i>
                                        +
                                        +    <i *ngIf="config.loop || state.hasNext"
                                        +       class="g-nav-next"
                                        +       aria-label="Next"
                                        +       role="button"
                                        +       (click)="gallery.ref(this.galleryId).next(config.navScrollBehavior)"
                                        +       [innerHtml]="navIcon"></i>
                                        +  `,
                                        +  standalone: true,
                                        +  imports: [CommonModule]
                                        +})
                                        +export class GalleryNavComponent implements OnInit {
                                        +
                                        +  navIcon: SafeHtml;
                                        +  @Input() galleryId: string;
                                        +  @Input() state: GalleryState;
                                        +  @Input() config: GalleryConfig;
                                        +
                                        +  constructor(public gallery: Gallery, private _sanitizer: DomSanitizer) {
                                        +  }
                                        +
                                        +  ngOnInit() {
                                        +    this.navIcon = this._sanitizer.bypassSecurityTrustHtml(this.config.navIcon);
                                        +  }
                                        +}
                                        +
                                        +
                                        + + +
                                        +

                                        + ./gallery-nav.scss +

                                        +
                                        .g-nav-next,
                                        +.g-nav-prev {
                                        +  position: absolute;
                                        +  top: 50%;
                                        +  display: flex;
                                        +  padding: 16px 8px;
                                        +  cursor: pointer;
                                        +  z-index: 999;
                                        +  opacity: 0.6;
                                        +  transition: opacity linear 150ms, right linear 150ms, left linear 150ms;
                                        +
                                        +  &:hover {
                                        +    opacity: 1;
                                        +  }
                                        +
                                        +  ::ng-deep {
                                        +    svg {
                                        +      filter: var(--g-nav-drop-shadow);
                                        +      width: 28px;
                                        +      height: 28px;
                                        +      fill: #fff;
                                        +    }
                                        +  }
                                        +}
                                        +
                                        +.g-nav-next {
                                        +  right: 0.5em;
                                        +  transform: translateY(-50%) perspective(1px);
                                        +
                                        +  &:hover {
                                        +    right: 0.4em;
                                        +  }
                                        +}
                                        +
                                        +.g-nav-prev {
                                        +  left: 0.5em;
                                        +  transform: translateY(-50%) perspective(1px) scale(-1, -1); //invert icon horizontally
                                        +
                                        +  &:hover {
                                        +    left: 0.4em;
                                        +  }
                                        +}
                                        +
                                        +@media only screen and (max-width: 480px) {
                                        +  .g-nav-next {
                                        +    right: 0.2em;
                                        +  }
                                        +
                                        +  .g-nav-prev {
                                        +    left: 0.2em;
                                        +  }
                                        +}
                                        +
                                        +
                                        + +
                                        +
                                        +
                                        +
                                        + Legend +
                                        +
                                        +
                                        Html element +
                                        +
                                        +
                                        Component +
                                        +
                                        +
                                        Html element with directive +
                                        +
                                        +
                                        + + +
                                        + + + + + + + + + + + + + + + + + + + + + + +
                                        +
                                        +

                                        results matching ""

                                        +
                                          +
                                          +
                                          +

                                          No results matching ""

                                          +
                                          +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GallerySliderComponent.html b/documentation/components/GallerySliderComponent.html new file mode 100644 index 00000000..6ff009dc --- /dev/null +++ b/documentation/components/GallerySliderComponent.html @@ -0,0 +1,1494 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                          +
                                          + + +
                                          +
                                          + + + + + + + + +
                                          +

                                          +

                                          File

                                          +

                                          +

                                          + projects/ng-gallery/src/lib/components/gallery-slider.component.ts +

                                          + + + + +

                                          +

                                          Implements

                                          +

                                          +

                                          + AfterViewInit + OnChanges +

                                          + + +
                                          +

                                          Metadata

                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          + +
                                          +

                                          Index

                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          Properties
                                          +
                                          + +
                                          +
                                          Methods
                                          +
                                          + +
                                          +
                                          Inputs
                                          +
                                          + +
                                          +
                                          Outputs
                                          +
                                          + +
                                          +
                                          Accessors
                                          +
                                          + +
                                          +
                                          + +
                                          +

                                          Constructor

                                          + + + + + + + + + + + + + +
                                          +constructor(_gallery: Gallery) +
                                          + +
                                          +
                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          _gallery + Gallery + + No +
                                          +
                                          +
                                          +
                                          + +
                                          +

                                          Inputs

                                          + + + + + + + + + + + + + + + +
                                          + + config +
                                          + Type : GalleryConfig + +
                                          + +
                                          +

                                          Gallery config

                                          +
                                          +
                                          + + + + + + + + + + + + + + + +
                                          + + galleryId +
                                          + Type : string + +
                                          + +
                                          +

                                          Gallery ID

                                          +
                                          +
                                          + + + + + + + + + + + + + + + +
                                          + + state +
                                          + Type : GalleryState + +
                                          + +
                                          +

                                          Gallery state

                                          +
                                          +
                                          +
                                          +
                                          +

                                          Outputs

                                          + + + + + + + + + + + + + + + +
                                          + + error +
                                          + Type : EventEmitter<GalleryError> + +
                                          + +
                                          +

                                          Stream that emits when an error occurs

                                          +
                                          +
                                          + + + + + + + + + + + + + + + +
                                          + + itemClick +
                                          + Type : EventEmitter<number> + +
                                          + +
                                          +

                                          Stream that emits when item is clicked

                                          +
                                          +
                                          +
                                          + + +
                                          + +

                                          + Methods +

                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + ngAfterViewInit + + +
                                          +ngAfterViewInit() +
                                          + +
                                          + +
                                          + Returns : void + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + ngOnChanges + + +
                                          +ngOnChanges(changes: SimpleChanges) +
                                          + +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          changes + SimpleChanges + + No +
                                          +
                                          +
                                          +
                                          +
                                          + Returns : void + +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + onActiveIndexChange + + +
                                          +onActiveIndexChange(index: number) +
                                          + +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          index + number + + No +
                                          +
                                          +
                                          +
                                          +
                                          + Returns : void + +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + Private + scrollToIndex + + +
                                          + + scrollToIndex(index: number, behavior: ScrollBehavior) +
                                          + +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          index + number + + No +
                                          behavior + ScrollBehavior + + No +
                                          +
                                          +
                                          +
                                          +
                                          + Returns : void + +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + trackByFn + + +
                                          +trackByFn(index: number, item: any) +
                                          + +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          index + number + + No +
                                          item + any + + No +
                                          +
                                          +
                                          +
                                          +
                                          + Returns : any + +
                                          +
                                          + +
                                          +
                                          +
                                          +
                                          + +

                                          + Properties +

                                          + + + + + + + + + + + + + + + + + +
                                          + + + adapter + + +
                                          + Type : SliderAdapter + +
                                          + +
                                          +

                                          Slider adapter

                                          +
                                          +
                                          + + + + + + + + + + + + + + +
                                          + + + isResizing + + +
                                          + Type : boolean + +
                                          + +
                                          + + + + + + + + + + + + + + +
                                          + + + isScrolling + + +
                                          + Type : boolean + +
                                          + +
                                          + + + + + + + + + + + + + + +
                                          + + + isSliding + + +
                                          + Type : boolean + +
                                          + +
                                          + + + + + + + + + + + + + + + + + + + + +
                                          + + + items + + +
                                          + Type : QueryList<GalleryItemComponent> + +
                                          + Default value : new QueryList<GalleryItemComponent>() +
                                          + Decorators : +
                                          + + @ViewChildren(GalleryItemComponent)
                                          +
                                          +
                                          + +
                                          + + + + + + + + + + + + + + + + + +
                                          + + + items$ + + +
                                          + Type : Observable<GalleryItemComponent[]> + +
                                          + +
                                          +

                                          Stream that emits the item components once they're initialized

                                          +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + +
                                          + + + Readonly + position$ + + +
                                          + Type : Subject<SmoothScrollToOptions> + +
                                          + Default value : new Subject<SmoothScrollToOptions>() +
                                          + +
                                          +

                                          Stream that emits the slider position

                                          +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + +
                                          + + + sliderEl + + +
                                          + Type : ElementRef<HTMLElement> + +
                                          + Decorators : +
                                          + + @ViewChild('slider', {static: true})
                                          +
                                          +
                                          + +
                                          +

                                          Slider ElementRef

                                          +
                                          +
                                          +
                                          + +
                                          +

                                          + Accessors +

                                          + + + + + + + + + + + + + + +
                                          + + slider +
                                          + getslider() +
                                          + +
                                          +
                                          +
                                          + + +
                                          +
                                          import {
                                          +  Component,
                                          +  Input,
                                          +  Output,
                                          +  ViewChild,
                                          +  ViewChildren,
                                          +  EventEmitter,
                                          +  AfterViewInit,
                                          +  OnChanges,
                                          +  SimpleChanges,
                                          +  ElementRef,
                                          +  QueryList,
                                          +  ChangeDetectionStrategy
                                          +} from '@angular/core';
                                          +import { CommonModule } from '@angular/common';
                                          +import { Observable, Subject, map, startWith } from 'rxjs';
                                          +import { Gallery } from '../services/gallery.service';
                                          +import { GalleryState, GalleryError } from '../models/gallery.model';
                                          +import { GalleryConfig } from '../models/config.model';
                                          +import { SlidingDirection } from '../models/constants';
                                          +import { SliderAdapter, HorizontalAdapter, VerticalAdapter } from './adapters';
                                          +import { SmoothScroll, SmoothScrollToOptions } from '../smooth-scroll';
                                          +import { HammerSliding } from '../gestures/hammer-sliding.directive';
                                          +import { SliderIntersectionObserver } from '../observers/slider-intersection-observer.directive';
                                          +import { ItemIntersectionObserver } from '../observers/item-intersection-observer.directive';
                                          +import { GalleryItemComponent } from './gallery-item.component';
                                          +import { SliderResizeObserver } from '../observers/slider-resize-observer.directive';
                                          +
                                          +@Component({
                                          +  selector: 'gallery-slider',
                                          +  changeDetection: ChangeDetectionStrategy.OnPush,
                                          +  styleUrls: ['./gallery-slider.scss'],
                                          +  template: `
                                          +    <div #slider
                                          +         class="g-slider"
                                          +         [attr.centralised]="config.itemAutosize"
                                          +         [smoothScroll]="position$ | async"
                                          +         [smoothScrollInterruptOnMousemove]="!config.mouseSlidingDisabled"
                                          +         sliderIntersectionObserver
                                          +         [sliderIntersectionObserverDisabled]="isScrolling || isSliding || isResizing"
                                          +         hammerSliding
                                          +         [adapter]="adapter"
                                          +         [items]="items$ | async"
                                          +         [config]="config"
                                          +         [state]="state"
                                          +         [galleryId]="galleryId"
                                          +         (isScrollingChange)="isScrolling = $event"
                                          +         (isSlidingChange)="isSliding = $event"
                                          +         (activeIndexChange)="onActiveIndexChange($event)"
                                          +         (isResizingChange)="isResizing = $event"
                                          +         sliderResizeObserver>
                                          +      <div class="g-slider-content">
                                          +        <gallery-item *ngFor="let item of state.items; trackBy: trackByFn index as i"
                                          +                      [attr.galleryId]="galleryId"
                                          +                      [type]="item.type"
                                          +                      [config]="config"
                                          +                      [data]="item.data"
                                          +                      [currIndex]="state.currIndex"
                                          +                      [index]="i"
                                          +                      [count]="state.items.length"
                                          +                      itemIntersectionObserver
                                          +                      [itemIntersectionObserverDisabled]="isScrolling || isSliding || isResizing"
                                          +                      [adapter]="adapter"
                                          +                      (activeIndexChange)="onActiveIndexChange($event)"
                                          +                      (click)="itemClick.emit(i)"
                                          +                      (error)="error.emit({ itemIndex: i, error: $event })"/>
                                          +      </div>
                                          +
                                          +      <div *ngIf="config.debug" class="g-slider-debug">
                                          +        <div class="g-slider-resizing">RESIZING</div>
                                          +        <div class="g-slider-scrolling">SCROLLING</div>
                                          +        <div class="g-slider-sliding">SLIDING</div>
                                          +      </div>
                                          +    </div>
                                          +    <ng-content></ng-content>
                                          +  `,
                                          +  standalone: true,
                                          +  imports: [CommonModule, GalleryItemComponent, SmoothScroll, HammerSliding, SliderIntersectionObserver, ItemIntersectionObserver, SliderResizeObserver]
                                          +})
                                          +export class GallerySliderComponent implements AfterViewInit, OnChanges {
                                          +
                                          +  /** Stream that emits the slider position */
                                          +  readonly position$: Subject<SmoothScrollToOptions> = new Subject<SmoothScrollToOptions>();
                                          +
                                          +  /** Slider adapter */
                                          +  adapter: SliderAdapter;
                                          +
                                          +  /** Stream that emits the item components once they're initialized */
                                          +  items$: Observable<GalleryItemComponent[]>;
                                          +
                                          +  isScrolling: boolean;
                                          +
                                          +  isSliding: boolean;
                                          +
                                          +  isResizing: boolean;
                                          +
                                          +  /** Gallery ID */
                                          +  @Input() galleryId: string;
                                          +
                                          +  /** Gallery state */
                                          +  @Input() state: GalleryState;
                                          +
                                          +  /** Gallery config */
                                          +  @Input() config: GalleryConfig;
                                          +
                                          +  /** Stream that emits when item is clicked */
                                          +  @Output() itemClick: EventEmitter<number> = new EventEmitter<number>();
                                          +
                                          +  /** Stream that emits when an error occurs */
                                          +  @Output() error: EventEmitter<GalleryError> = new EventEmitter<GalleryError>();
                                          +
                                          +  /** Slider ElementRef */
                                          +  @ViewChild('slider', { static: true }) sliderEl: ElementRef<HTMLElement>;
                                          +
                                          +  @ViewChildren(GalleryItemComponent) items: QueryList<GalleryItemComponent> = new QueryList<GalleryItemComponent>();
                                          +
                                          +  get slider(): HTMLElement {
                                          +    return this.sliderEl.nativeElement;
                                          +  }
                                          +
                                          +  constructor(private _gallery: Gallery) {
                                          +  }
                                          +
                                          +  ngOnChanges(changes: SimpleChanges): void {
                                          +    if (changes.config) {
                                          +      if (changes.config.currentValue?.slidingDirection !== changes.config.previousValue?.slidingDirection) {
                                          +        switch (this.config.slidingDirection) {
                                          +          case SlidingDirection.Horizontal:
                                          +            this.adapter = new HorizontalAdapter(this.slider, this.config);
                                          +            break;
                                          +          case SlidingDirection.Vertical:
                                          +            this.adapter = new VerticalAdapter(this.slider, this.config);
                                          +            break;
                                          +        }
                                          +      }
                                          +      if (!changes.config.firstChange) {
                                          +        // Keep the correct sliding position when direction changes
                                          +        requestAnimationFrame(() => {
                                          +          this.scrollToIndex(this.state.currIndex, 'auto');
                                          +        });
                                          +      }
                                          +    }
                                          +
                                          +    // Scroll to current index
                                          +    if (changes.state) {
                                          +      if(changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) {
                                          +        requestAnimationFrame(() => {
                                          +          this.scrollToIndex(this.state.currIndex, changes.state.firstChange ? 'auto' : this.state.behavior);
                                          +        });
                                          +      }
                                          +    }
                                          +  }
                                          +
                                          +  ngAfterViewInit(): void {
                                          +    this.items.notifyOnChanges();
                                          +    this.items$ = this.items.changes.pipe(
                                          +      // In some cases, items is not notified at first, need to force start the stream
                                          +      startWith(null),
                                          +      map(() => this.items.toArray())
                                          +    );
                                          +  }
                                          +
                                          +  trackByFn(index: number, item: any) {
                                          +    return item.type;
                                          +  }
                                          +
                                          +  onActiveIndexChange(index: number): void {
                                          +    if (index === -1) {
                                          +      // Reset active index position
                                          +      this.scrollToIndex(this.state.currIndex, 'smooth');
                                          +    } else {
                                          +      this._gallery.ref(this.galleryId).set(index, 'smooth');
                                          +    }
                                          +  }
                                          +
                                          +  private scrollToIndex(index: number, behavior: ScrollBehavior): void {
                                          +    const el: HTMLElement = this.items.get(index)?.nativeElement;
                                          +    if (el) {
                                          +      console.log('🟢 Scroll to', index)
                                          +      const pos: SmoothScrollToOptions = this.adapter.getScrollToValue(el, behavior || this.config.scrollBehavior);
                                          +      this.position$.next(pos);
                                          +    }
                                          +  }
                                          +}
                                          +
                                          +
                                          + + +
                                          +

                                          + ./gallery-slider.scss +

                                          +
                                          :host {
                                          +  position: relative;
                                          +  display: flex;
                                          +  align-items: center;
                                          +  justify-content: center;
                                          +  overflow: hidden;
                                          +  order: 1;
                                          +  flex: 1;
                                          +}
                                          +
                                          +.g-slider {
                                          +  display: flex;
                                          +  align-items: center;
                                          +  transition: var(--g-height-transition);
                                          +  min-height: 100%;
                                          +  min-width: 100%;
                                          +  max-height: 100%;
                                          +  max-width: 100%;
                                          +  height: var(--slider-height, 100%);
                                          +  width: var(--slider-width, 100%);
                                          +
                                          +  overflow: var(--slider-overflow);
                                          +  scroll-snap-type: var(--slider-scroll-snap-type);
                                          +  flex-direction: var(--slider-flex-direction);
                                          +
                                          +  scrollbar-width: none;
                                          +
                                          +  &::-webkit-scrollbar {
                                          +    display: none;
                                          +  }
                                          +
                                          +  &.g-sliding, &.g-scrolling {
                                          +    // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse
                                          +    .g-slider-content {
                                          +      pointer-events: none;
                                          +    }
                                          +  }
                                          +
                                          +  &[centralised="true"] {
                                          +    &:before, &:after {
                                          +      content: '';
                                          +    }
                                          +
                                          +    &:before {
                                          +      flex: 0 0 var(--slider-centralize-start-size);
                                          +    }
                                          +
                                          +    &:after {
                                          +      flex: 0 0 var(--slider-centralize-end-size);
                                          +    }
                                          +  }
                                          +}
                                          +
                                          +.g-slider-content {
                                          +  flex: 0 0 auto;
                                          +  display: flex;
                                          +  align-items: center;
                                          +  gap: 1px;
                                          +  width: var(--slider-content-width, unset);
                                          +  height: var(--slider-content-height, unset);
                                          +  flex-direction: var(--slider-flex-direction);
                                          +}
                                          +
                                          +
                                          + +
                                          +
                                          +
                                          +
                                          + Legend +
                                          +
                                          +
                                          Html element +
                                          +
                                          +
                                          Component +
                                          +
                                          +
                                          Html element with directive +
                                          +
                                          +
                                          + + +
                                          + + + + + + + + + + + + + + + + + + + + + + +
                                          +
                                          +

                                          results matching ""

                                          +
                                            +
                                            +
                                            +

                                            No results matching ""

                                            +
                                            +
                                            +
                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryThumbComponent.html b/documentation/components/GalleryThumbComponent.html new file mode 100644 index 00000000..7243fad0 --- /dev/null +++ b/documentation/components/GalleryThumbComponent.html @@ -0,0 +1,851 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                            +
                                            + + +
                                            +
                                            + + + + + + + + +
                                            +

                                            +

                                            File

                                            +

                                            +

                                            + projects/ng-gallery/src/lib/components/gallery-thumb.component.ts +

                                            + + + + + + +
                                            +

                                            Metadata

                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            + +
                                            +

                                            Index

                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            +
                                            Inputs
                                            +
                                            + +
                                            +
                                            Outputs
                                            +
                                            + +
                                            +
                                            HostBindings
                                            +
                                            + +
                                            +
                                            Accessors
                                            +
                                            + +
                                            +
                                            + +
                                            +

                                            Constructor

                                            + + + + + + + + + + + + + +
                                            +constructor(el: ElementRef) +
                                            + +
                                            +
                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptional
                                            el + ElementRef<HTMLElement> + + No +
                                            +
                                            +
                                            +
                                            + +
                                            +

                                            Inputs

                                            + + + + + + + + + + + + +
                                            + + config +
                                            + Type : GalleryConfig + +
                                            + +
                                            + + + + + + + + + + + + + + + +
                                            + + count +
                                            + Type : number + +
                                            + +
                                            +

                                            The number of total items

                                            +
                                            +
                                            + + + + + + + + + + + + + + + +
                                            + + currIndex +
                                            + Type : number + +
                                            + +
                                            +

                                            Gallery current index

                                            +
                                            +
                                            + + + + + + + + + + + + + + + +
                                            + + data +
                                            + Type : ImageItemData + +
                                            + +
                                            +

                                            Item's data, this object contains the data required to display the content (e.g. src path)

                                            +
                                            +
                                            + + + + + + + + + + + + + + + +
                                            + + index +
                                            + Type : number + +
                                            + +
                                            +

                                            Item's index in the gallery

                                            +
                                            +
                                            + + + + + + + + + + + + + + + +
                                            + + type +
                                            + Type : GalleryItemType + +
                                            + +
                                            +

                                            Item's type 'image', 'video', 'youtube', 'iframe'

                                            +
                                            +
                                            +
                                            +
                                            +

                                            Outputs

                                            + + + + + + + + + + + + +
                                            + + error +
                                            + Type : EventEmitter<ErrorEvent> + +
                                            + +
                                            +
                                            +
                                            +

                                            HostBindings

                                            + + + + + + + + + + + + + +
                                            + + + attr.galleryIndex + + +
                                            + Type : number + +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + + class.g-active-thumb + + +
                                            + Type : boolean + +
                                            + +
                                            +
                                            + + + + +
                                            +

                                            + Accessors +

                                            + + + + + + + + + + + + + + +
                                            + + isActive +
                                            + getisActive() +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + isIndexAttr +
                                            + getisIndexAttr() +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + imageContext +
                                            + getimageContext() +
                                            + +
                                            + + + + + + + + + + + + + + +
                                            + + nativeElement +
                                            + getnativeElement() +
                                            + +
                                            +
                                            +
                                            + + +
                                            +
                                            import {
                                            +  Component,
                                            +  Input,
                                            +  Output,
                                            +  HostBinding,
                                            +  EventEmitter,
                                            +  ElementRef,
                                            +  ChangeDetectionStrategy
                                            +} from '@angular/core';
                                            +import { CommonModule } from '@angular/common';
                                            +import { GalleryItemContext } from '../directives/gallery-item-def.directive';
                                            +import { GalleryImageComponent } from './templates/gallery-image.component';
                                            +import { ImageItemData } from './templates/items.model';
                                            +import { GalleryConfig } from '../models/config.model';
                                            +import { GalleryItemType } from '../models/constants';
                                            +
                                            +@Component({
                                            +  selector: 'gallery-thumb',
                                            +  changeDetection: ChangeDetectionStrategy.OnPush,
                                            +  styleUrls: ['./gallery-thumb.scss'],
                                            +  template: `
                                            +    <gallery-image [src]="data.thumb"
                                            +                   [alt]="data.alt + '-thumbnail'"
                                            +                   [isThumbnail]="true"
                                            +                   [loadingIcon]="config.thumbLoadingIcon"
                                            +                   [loadingError]="config.thumbLoadingError"
                                            +                   (error)="error.emit($event)"></gallery-image>
                                            +
                                            +    <div *ngIf="config.thumbTemplate" class="g-template g-thumb-template">
                                            +      <ng-container *ngTemplateOutlet="config.thumbTemplate; context: imageContext"></ng-container>
                                            +    </div>
                                            +  `,
                                            +  standalone: true,
                                            +  imports: [CommonModule, GalleryImageComponent]
                                            +})
                                            +export class GalleryThumbComponent {
                                            +
                                            +  @Input() config: GalleryConfig;
                                            +
                                            +  /** Item's index in the gallery */
                                            +  @Input() index: number;
                                            +
                                            +  /** The number of total items */
                                            +  @Input() count: number;
                                            +
                                            +  /** Gallery current index */
                                            +  @Input() currIndex: number;
                                            +
                                            +  /** Item's type 'image', 'video', 'youtube', 'iframe' */
                                            +  @Input() type: GalleryItemType;
                                            +
                                            +  /** Item's data, this object contains the data required to display the content (e.g. src path) */
                                            +  @Input() data: ImageItemData;
                                            +
                                            +  @Output() error: EventEmitter<ErrorEvent> = new EventEmitter<ErrorEvent>();
                                            +
                                            +  @HostBinding('class.g-active-thumb') get isActive() {
                                            +    return this.index === this.currIndex;
                                            +  }
                                            +
                                            +  @HostBinding('attr.galleryIndex') get isIndexAttr(): number {
                                            +    return this.index;
                                            +  }
                                            +
                                            +  get imageContext(): GalleryItemContext<ImageItemData> {
                                            +    return {
                                            +      $implicit: this.data,
                                            +      index: this.index,
                                            +      type: this.type,
                                            +      active: this.isActive,
                                            +      count: this.count,
                                            +      first: this.index === 0,
                                            +      last: this.index === this.count - 1
                                            +    }
                                            +  }
                                            +
                                            +  get nativeElement(): HTMLElement {
                                            +    return this.el.nativeElement;
                                            +  }
                                            +
                                            +  constructor(private el: ElementRef<HTMLElement>) {
                                            +  }
                                            +}
                                            +
                                            +
                                            + + +
                                            +

                                            + ./gallery-thumb.scss +

                                            +
                                            :host {
                                            +  cursor: var(--g-thumb-cursor);
                                            +  height: var(--g-thumb-height);
                                            +  width: var(--g-thumb-width);
                                            +  max-height: var(--g-thumb-height);
                                            +  max-width: var(--g-thumb-width);
                                            +  align-self: center;
                                            +  background: black;
                                            +  position: relative;
                                            +  display: flex;
                                            +  overflow: hidden;
                                            +  flex-direction: column;
                                            +  flex: 0 0 auto;
                                            +  scroll-snap-align: center;
                                            +  // Disable highlighting the elements on mouse move or click
                                            +  user-select: none;
                                            +  -webkit-user-drag: none;
                                            +  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
                                            +
                                            +  --g-thumb-opacity: 0.5;
                                            +
                                            +  &.g-active-thumb {
                                            +    --g-thumb-opacity: 1;
                                            +  }
                                            +}
                                            +
                                            +.g-template {
                                            +  position: absolute;
                                            +  z-index: 10;
                                            +  left: 0;
                                            +  top: 0;
                                            +  right: 0;
                                            +  bottom: 0;
                                            +  color: white;
                                            +  display: flex;
                                            +  align-items: center;
                                            +  justify-content: center;
                                            +  flex-direction: column;
                                            +}
                                            +
                                            +
                                            + +
                                            +
                                            +
                                            +
                                            + Legend +
                                            +
                                            +
                                            Html element +
                                            +
                                            +
                                            Component +
                                            +
                                            +
                                            Html element with directive +
                                            +
                                            +
                                            + + +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            +
                                            +

                                            results matching ""

                                            +
                                              +
                                              +
                                              +

                                              No results matching ""

                                              +
                                              +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryThumbsComponent.html b/documentation/components/GalleryThumbsComponent.html new file mode 100644 index 00000000..c67ec37c --- /dev/null +++ b/documentation/components/GalleryThumbsComponent.html @@ -0,0 +1,1350 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                              +
                                              + + +
                                              +
                                              + + + + + + + + +
                                              +

                                              +

                                              File

                                              +

                                              +

                                              + projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts +

                                              + + + + +

                                              +

                                              Implements

                                              +

                                              +

                                              + AfterViewInit + OnChanges +

                                              + + +
                                              +

                                              Metadata

                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              + +
                                              +

                                              Index

                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              +
                                              Properties
                                              +
                                              + +
                                              +
                                              Methods
                                              +
                                              + +
                                              +
                                              Inputs
                                              +
                                              + +
                                              +
                                              Outputs
                                              +
                                              + +
                                              +
                                              Accessors
                                              +
                                              + +
                                              +
                                              + + +
                                              +

                                              Inputs

                                              + + + + + + + + + + + + + + + +
                                              + + config +
                                              + Type : GalleryConfig + +
                                              + +
                                              +

                                              Gallery config

                                              +
                                              +
                                              + + + + + + + + + + + + + + + +
                                              + + galleryId +
                                              + Type : string + +
                                              + +
                                              +

                                              Gallery ID

                                              +
                                              +
                                              + + + + + + + + + + + + + + + +
                                              + + state +
                                              + Type : GalleryState + +
                                              + +
                                              +

                                              Gallery state

                                              +
                                              +
                                              +
                                              +
                                              +

                                              Outputs

                                              + + + + + + + + + + + + + + + +
                                              + + error +
                                              + Type : EventEmitter<GalleryError> + +
                                              + +
                                              +

                                              Stream that emits when an error occurs

                                              +
                                              +
                                              + + + + + + + + + + + + + + + +
                                              + + thumbClick +
                                              + Type : EventEmitter<number> + +
                                              + +
                                              +

                                              Stream that emits when thumb is clicked

                                              +
                                              +
                                              +
                                              + + +
                                              + +

                                              + Methods +

                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + ngAfterViewInit + + +
                                              +ngAfterViewInit() +
                                              + +
                                              + +
                                              + Returns : void + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + ngOnChanges + + +
                                              +ngOnChanges(changes: SimpleChanges) +
                                              + +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              changes + SimpleChanges + + No +
                                              +
                                              +
                                              +
                                              +
                                              + Returns : void + +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + onActiveIndexChange + + +
                                              +onActiveIndexChange(index: number) +
                                              + +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              index + number + + No +
                                              +
                                              +
                                              +
                                              +
                                              + Returns : void + +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + scrollToIndex + + +
                                              +scrollToIndex(value: number, behavior: ScrollBehavior) +
                                              + +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              value + number + + No +
                                              behavior + ScrollBehavior + + No +
                                              +
                                              +
                                              +
                                              +
                                              + Returns : void + +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + +
                                              + + + trackByFn + + +
                                              +trackByFn(index: number, item: any) +
                                              + +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              index + number + + No +
                                              item + any + + No +
                                              +
                                              +
                                              +
                                              +
                                              + Returns : any + +
                                              +
                                              + +
                                              +
                                              +
                                              +
                                              + +

                                              + Properties +

                                              + + + + + + + + + + + + + + + + + +
                                              + + + adapter + + +
                                              + Type : SliderAdapter + +
                                              + +
                                              +

                                              Slider adapter

                                              +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + +
                                              + + + items + + +
                                              + Type : QueryList<GalleryThumbComponent> + +
                                              + Default value : new QueryList<GalleryThumbComponent>() +
                                              + Decorators : +
                                              + + @ViewChildren(GalleryThumbComponent)
                                              +
                                              +
                                              + +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + items$ + + +
                                              + Type : Observable<GalleryThumbComponent[]> + +
                                              + +
                                              +

                                              Stream that emits the thumb components once they're initialized

                                              +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + +
                                              + + + Readonly + position$ + + +
                                              + Type : Subject<SmoothScrollToOptions> + +
                                              + Default value : new Subject<SmoothScrollToOptions>() +
                                              + +
                                              +

                                              Stream that emits the slider position

                                              +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + +
                                              + + + sliderEl + + +
                                              + Type : ElementRef + +
                                              + Decorators : +
                                              + + @ViewChild('slider', {static: true})
                                              +
                                              +
                                              + +
                                              +

                                              Slider ElementRef

                                              +
                                              +
                                              + + + + + + + + + + + + + + + + + +
                                              + + + Readonly + thumbnailsView + + +
                                              + Default value : ThumbnailsView +
                                              + +
                                              +

                                              Thumbnails view enum

                                              +
                                              +
                                              +
                                              + +
                                              +

                                              + Accessors +

                                              + + + + + + + + + + + + + + +
                                              + + slider +
                                              + getslider() +
                                              + +
                                              +
                                              +
                                              + + +
                                              +
                                              import {
                                              +  Component,
                                              +  Input,
                                              +  Output,
                                              +  ViewChild,
                                              +  ViewChildren,
                                              +  EventEmitter,
                                              +  AfterViewInit,
                                              +  OnChanges,
                                              +  QueryList,
                                              +  SimpleChanges,
                                              +  ElementRef,
                                              +  ChangeDetectionStrategy
                                              +} from '@angular/core';
                                              +import { CommonModule } from '@angular/common';
                                              +import { Observable, Subject, map, startWith } from 'rxjs';
                                              +import { GalleryConfig } from '../models/config.model';
                                              +import { GalleryState, GalleryError } from '../models/gallery.model';
                                              +import { ThumbnailsPosition, ThumbnailsView } from '../models/constants';
                                              +import { VerticalAdapter, HorizontalAdapter, SliderAdapter } from './adapters';
                                              +import { SmoothScroll, SmoothScrollToOptions } from '../smooth-scroll';
                                              +import { GalleryThumbComponent } from './gallery-thumb.component';
                                              +import { HammerSliding } from '../gestures/hammer-sliding.directive';
                                              +import { ThumbResizeObserver } from '../observers/thumb-resize-observer.directive';
                                              +
                                              +@Component({
                                              +  selector: 'gallery-thumbs',
                                              +  changeDetection: ChangeDetectionStrategy.OnPush,
                                              +  styleUrls: ['./gallery-thumbs.scss'],
                                              +  template: `
                                              +    <div #slider
                                              +         class="g-slider"
                                              +         [smoothScroll]="position$ | async"
                                              +         [smoothScrollInterruptOnMousemove]="!config.thumbMouseSlidingDisabled"
                                              +         [attr.centralised]="config.thumbView === thumbnailsView.Contain || adapter.isContentLessThanContainer"
                                              +         hammerSliding
                                              +         [galleryId]="galleryId"
                                              +         [items]="items$ | async"
                                              +         [state]="state"
                                              +         [config]="config"
                                              +         [adapter]="adapter"
                                              +         (thumbResizeObserver)="scrollToIndex(state.currIndex, 'auto')"
                                              +         (activeIndexChange)="onActiveIndexChange($event)">
                                              +      <div class="g-slider-content">
                                              +        <gallery-thumb *ngFor="let item of state.items; trackBy: trackByFn; index as i"
                                              +                       [attr.galleryId]="galleryId"
                                              +                       [type]="item.type"
                                              +                       [config]="config"
                                              +                       [data]="item.data"
                                              +                       [currIndex]="state.currIndex"
                                              +                       [index]="i"
                                              +                       [count]="state.items.length"
                                              +                       (click)="config.disableThumb ? null : thumbClick.emit(i)"
                                              +                       (error)="error.emit({ itemIndex: i, error: $event })"/>
                                              +      </div>
                                              +    </div>
                                              +  `,
                                              +  standalone: true,
                                              +  imports: [CommonModule, GalleryThumbComponent, SmoothScroll, HammerSliding, ThumbResizeObserver]
                                              +})
                                              +export class GalleryThumbsComponent implements AfterViewInit, OnChanges {
                                              +
                                              +  /** Stream that emits the slider position */
                                              +  readonly position$: Subject<SmoothScrollToOptions> = new Subject<SmoothScrollToOptions>();
                                              +
                                              +  /** Thumbnails view enum */
                                              +  readonly thumbnailsView = ThumbnailsView;
                                              +
                                              +  /** Slider adapter */
                                              +  adapter: SliderAdapter;
                                              +
                                              +  /** Stream that emits the thumb components once they're initialized */
                                              +  items$: Observable<GalleryThumbComponent[]>;
                                              +
                                              +  /** Gallery ID */
                                              +  @Input() galleryId: string;
                                              +
                                              +  /** Gallery state */
                                              +  @Input() state: GalleryState;
                                              +
                                              +  /** Gallery config */
                                              +  @Input() config: GalleryConfig;
                                              +
                                              +  /** Stream that emits when thumb is clicked */
                                              +  @Output() thumbClick: EventEmitter<number> = new EventEmitter<number>();
                                              +
                                              +  /** Stream that emits when an error occurs */
                                              +  @Output() error: EventEmitter<GalleryError> = new EventEmitter<GalleryError>();
                                              +
                                              +  /** Slider ElementRef */
                                              +  @ViewChild('slider', { static: true }) sliderEl: ElementRef;
                                              +
                                              +  @ViewChildren(GalleryThumbComponent) items: QueryList<GalleryThumbComponent> = new QueryList<GalleryThumbComponent>();
                                              +
                                              +  get slider(): HTMLElement {
                                              +    return this.sliderEl.nativeElement;
                                              +  }
                                              +
                                              +  ngOnChanges(changes: SimpleChanges): void {
                                              +    if (changes.config) {
                                              +      // Sets sliding direction
                                              +      if (changes.config.currentValue?.thumbPosition !== changes.config.previousValue?.thumbPosition) {
                                              +        switch (this.config.thumbPosition) {
                                              +          case ThumbnailsPosition.Right:
                                              +          case ThumbnailsPosition.Left:
                                              +            this.adapter = new VerticalAdapter(this.slider, this.config);
                                              +            break;
                                              +          case ThumbnailsPosition.Top:
                                              +          case ThumbnailsPosition.Bottom:
                                              +            this.adapter = new HorizontalAdapter(this.slider, this.config);
                                              +            break;
                                              +        }
                                              +
                                              +        if (!changes.config.firstChange) {
                                              +          // Keep the correct sliding position when direction changes
                                              +          requestAnimationFrame(() => {
                                              +            this.scrollToIndex(this.state.currIndex, 'auto');
                                              +          });
                                              +        }
                                              +      }
                                              +    }
                                              +
                                              +    if (changes.state && (changes.state.firstChange || !this.config.thumbDetached)) {
                                              +      if (changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) {
                                              +        // Scroll slide to item when current index changes.
                                              +        requestAnimationFrame(() => {
                                              +          this.scrollToIndex(this.state.currIndex, changes.state?.firstChange ? 'auto' : 'smooth');
                                              +        });
                                              +      }
                                              +    }
                                              +  }
                                              +
                                              +  ngAfterViewInit(): void {
                                              +    this.items.notifyOnChanges();
                                              +    this.items$ = this.items.changes.pipe(
                                              +      // In some cases, items is not notified at first, need to force start the stream
                                              +      startWith(null),
                                              +      map(() => this.items.toArray())
                                              +    );
                                              +  }
                                              +
                                              +  trackByFn(index: number, item: any) {
                                              +    return item.type;
                                              +  }
                                              +
                                              +  onActiveIndexChange(index: number): void {
                                              +    if (index === -1) {
                                              +      // Reset active index position
                                              +      this.scrollToIndex(this.state.currIndex, 'smooth');
                                              +    } else {
                                              +      this.scrollToIndex(index, 'smooth');
                                              +    }
                                              +  }
                                              +
                                              +  scrollToIndex(value: number, behavior: ScrollBehavior): void {
                                              +    const el: HTMLElement = this.items.get(value)?.nativeElement;
                                              +    if (el) {
                                              +      const pos: SmoothScrollToOptions = this.adapter.getScrollToValue(el, behavior);
                                              +      this.position$.next(pos);
                                              +    }
                                              +  }
                                              +}
                                              +
                                              +
                                              + + +
                                              +

                                              + ./gallery-thumbs.scss +

                                              +
                                              :host {
                                              +  max-height: 100%;
                                              +  max-width: 100%;
                                              +  display: block;
                                              +  z-index: 100;
                                              +}
                                              +
                                              +.g-slider {
                                              +  display: flex;
                                              +  align-items: center;
                                              +  transition: var(--g-height-transition);
                                              +  max-height: 100%;
                                              +  min-width: 100%;
                                              +  height: var(--thumb-slider-height);
                                              +  width: var(--thumb-slider-width);
                                              +
                                              +  top: var(--thumb-slider-top);
                                              +  left: var(--thumb-slider-left);
                                              +  overflow: var(--thumb-slider-overflow);
                                              +  scroll-snap-type: var(--slider-scroll-snap-type);
                                              +  flex-direction: var(--thumb-slider-flex-direction);
                                              +
                                              +  scrollbar-width: none;
                                              +
                                              +  &::-webkit-scrollbar {
                                              +    display: none;
                                              +  }
                                              +
                                              +  // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse
                                              +  &.g-sliding {
                                              +    // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse
                                              +    .g-slider-content {
                                              +      pointer-events: none;
                                              +    }
                                              +  }
                                              +
                                              +  &[centralised="true"] {
                                              +    &:before, &:after {
                                              +      content: '';
                                              +    }
                                              +
                                              +    &:before {
                                              +      flex: 0 0 var(--thumb-centralize-start-size);
                                              +    }
                                              +
                                              +    &:after {
                                              +      flex: 0 0 var(--thumb-centralize-end-size);
                                              +    }
                                              +  }
                                              +}
                                              +
                                              +.g-slider-content {
                                              +  flex: 0 0 auto;
                                              +  display: flex;
                                              +  flex-direction: var(--thumb-slider-flex-direction);
                                              +  align-items: center;
                                              +  gap: 1px;
                                              +}
                                              +
                                              +
                                              + +
                                              +
                                              +
                                              +
                                              + Legend +
                                              +
                                              +
                                              Html element +
                                              +
                                              +
                                              Component +
                                              +
                                              +
                                              Html element with directive +
                                              +
                                              +
                                              + + +
                                              + + + + + + + + + + + + + + + + + + + + + + +
                                              +
                                              +

                                              results matching ""

                                              +
                                                +
                                                +
                                                +

                                                No results matching ""

                                                +
                                                +
                                                +
                                                + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GalleryVideoComponent.html b/documentation/components/GalleryVideoComponent.html new file mode 100644 index 00000000..6e7ef525 --- /dev/null +++ b/documentation/components/GalleryVideoComponent.html @@ -0,0 +1,917 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                +
                                                + + +
                                                +
                                                + + + + + + + + +
                                                +

                                                +

                                                File

                                                +

                                                +

                                                + projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts +

                                                + + + + +

                                                +

                                                Implements

                                                +

                                                +

                                                + OnInit +

                                                + + +
                                                +

                                                Metadata

                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                + +
                                                +

                                                Index

                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                +
                                                Properties
                                                +
                                                + +
                                                +
                                                Methods
                                                +
                                                + +
                                                +
                                                Inputs
                                                +
                                                + +
                                                +
                                                Outputs
                                                +
                                                + +
                                                +
                                                Accessors
                                                +
                                                + +
                                                +
                                                + + +
                                                +

                                                Inputs

                                                + + + + + + + + + + + + +
                                                + + controls +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + controlsList +
                                                + Type : "nodownload" | "nofullscreen" | "noremoteplayback" + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + disablePictureInPicture +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + disableRemotePlayback +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + loop +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + mute +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + pause +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + play +
                                                + Type : boolean + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + poster +
                                                + Type : string + +
                                                + +
                                                + + + + + + + + + + + + +
                                                + + src +
                                                + Type : string | literal type[] + +
                                                + +
                                                +
                                                +
                                                +

                                                Outputs

                                                + + + + + + + + + + + + + + + +
                                                + + error +
                                                + Type : EventEmitter + +
                                                + +
                                                +

                                                Stream that emits when an error occurs

                                                +
                                                +
                                                +
                                                + + +
                                                + +

                                                + Methods +

                                                + + + + + + + + + + + + + + + + + + + +
                                                + + + ngOnInit + + +
                                                +ngOnInit() +
                                                + +
                                                + +
                                                + Returns : void + +
                                                +
                                                +
                                                +
                                                + +

                                                + Properties +

                                                + + + + + + + + + + + + + + + + + +
                                                + + + video + + +
                                                + Type : ElementRef + +
                                                + Decorators : +
                                                + + @ViewChild('video', {static: true})
                                                +
                                                +
                                                + +
                                                + + + + + + + + + + + + + + +
                                                + + + videoSources + + +
                                                + Type : literal type[] + +
                                                + +
                                                +
                                                + +
                                                +

                                                + Accessors +

                                                + + + + + + + + + + + + + + + + + +
                                                + + pauseVideo +
                                                + setpauseVideo(shouldPause: boolean) +
                                                + +
                                                + +
                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                NameTypeOptional
                                                shouldPause + boolean + + No +
                                                +
                                                +
                                                +
                                                +
                                                + Returns : void + +
                                                +
                                                + + + + + + + + + + + + + + + + + +
                                                + + playVideo +
                                                + setplayVideo(shouldPlay: boolean) +
                                                + +
                                                + +
                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                NameTypeOptional
                                                shouldPlay + boolean + + No +
                                                +
                                                +
                                                +
                                                +
                                                + Returns : void + +
                                                +
                                                +
                                                +
                                                + + +
                                                +
                                                import { Component, Input, Output, EventEmitter, OnInit, ViewChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';
                                                +import { NgFor, NgIf } from '@angular/common';
                                                +
                                                +@Component({
                                                +  selector: 'gallery-video',
                                                +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                +  template: `
                                                +    <video #video
                                                +           [attr.mute]="mute"
                                                +           [attr.controlsList]="controlsList"
                                                +           [attr.disablePictureInPicture]="disablePictureInPicture"
                                                +           [disableRemotePlayback]="disableRemotePlayback"
                                                +           [controls]="controls"
                                                +           [loop]="loop"
                                                +           [poster]="poster"
                                                +           (error)="error.emit($event)">
                                                +      <ng-container *ngFor="let src of videoSources">
                                                +        <source *ngIf="src?.type; else noType" [src]="src?.url" [type]="src.type"/>
                                                +        <ng-template #noType>
                                                +          <source [src]="src?.url"/>
                                                +        </ng-template>
                                                +      </ng-container>
                                                +    </video>
                                                +  `,
                                                +  standalone: true,
                                                +  imports: [NgFor, NgIf]
                                                +})
                                                +export class GalleryVideoComponent implements OnInit {
                                                +
                                                +  videoSources: { url: string, type?: string }[];
                                                +
                                                +  @Input() src: string | { url: string, type?: string }[];
                                                +  @Input() poster: string;
                                                +  @Input() mute: boolean;
                                                +  @Input() loop: boolean;
                                                +  @Input() controls: boolean;
                                                +  @Input() controlsList: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
                                                +  @Input() disableRemotePlayback: boolean;
                                                +  @Input() disablePictureInPicture: boolean;
                                                +
                                                +  @Input('pause') set pauseVideo(shouldPause: boolean) {
                                                +    if (this.video.nativeElement) {
                                                +      const video: HTMLVideoElement = this.video.nativeElement;
                                                +      if (shouldPause && !video.paused) {
                                                +        video.pause();
                                                +      }
                                                +    }
                                                +  }
                                                +
                                                +  @Input('play') set playVideo(shouldPlay: boolean) {
                                                +    if (this.video.nativeElement) {
                                                +      const video: HTMLVideoElement = this.video.nativeElement;
                                                +      if (shouldPlay) {
                                                +        video.play();
                                                +      }
                                                +    }
                                                +  }
                                                +
                                                +  /** Stream that emits when an error occurs */
                                                +  @Output() error = new EventEmitter<ErrorEvent>();
                                                +
                                                +  @ViewChild('video', { static: true }) video: ElementRef;
                                                +
                                                +  ngOnInit() {
                                                +    if (this.src instanceof Array) {
                                                +      // If video has multiple sources
                                                +      this.videoSources = [...this.src];
                                                +    } else {
                                                +      this.videoSources = [{ url: this.src }];
                                                +    }
                                                +  }
                                                +}
                                                +
                                                +
                                                + + + +
                                                +
                                                +
                                                +
                                                + Legend +
                                                +
                                                +
                                                Html element +
                                                +
                                                +
                                                Component +
                                                +
                                                +
                                                Html element with directive +
                                                +
                                                +
                                                + + +
                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                +
                                                +

                                                results matching ""

                                                +
                                                  +
                                                  +
                                                  +

                                                  No results matching ""

                                                  +
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/LightboxComponent.html b/documentation/components/LightboxComponent.html new file mode 100644 index 00000000..7fe2681e --- /dev/null +++ b/documentation/components/LightboxComponent.html @@ -0,0 +1,1223 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                  +
                                                  + + +
                                                  +
                                                  + + + + + + + + +
                                                  +

                                                  +

                                                  File

                                                  +

                                                  +

                                                  + projects/ng-gallery/lightbox/src/lightbox.component.ts +

                                                  + + + + + + +
                                                  +

                                                  Metadata

                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                  + +
                                                  +

                                                  Index

                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                  +
                                                  Properties
                                                  +
                                                  + +
                                                  +
                                                  Methods
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +

                                                  Constructor

                                                  + + + + + + + + + + + + + +
                                                  +constructor(_document: any, _focusTrapFactory: ConfigurableFocusTrapFactory, _elementRef: ElementRef) +
                                                  + +
                                                  +
                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                  NameTypeOptional
                                                  _document + any + + No +
                                                  _focusTrapFactory + ConfigurableFocusTrapFactory + + No +
                                                  _elementRef + ElementRef + + No +
                                                  +
                                                  +
                                                  +
                                                  + + + + + +
                                                  + +

                                                  + Methods +

                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + Private + _restoreFocus + + +
                                                  + + _restoreFocus() +
                                                  + +
                                                  +

                                                  Restores focus to the element that was focused before the lightbox opened.

                                                  +
                                                  + +
                                                  + Returns : void + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + Private + _savePreviouslyFocusedElement + + +
                                                  + + _savePreviouslyFocusedElement() +
                                                  + +
                                                  +

                                                  Saves a reference to the element that was focused before the lightbox was opened.

                                                  +
                                                  + +
                                                  + Returns : void + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + Private + _trapFocus + + +
                                                  + + _trapFocus() +
                                                  + +
                                                  +

                                                  Moves the focus inside the focus trap.

                                                  +
                                                  + +
                                                  + Returns : void + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + onAnimationDone + + +
                                                  +onAnimationDone(event: AnimationEvent) +
                                                  + +
                                                  +

                                                  Callback, invoked whenever an animation on the host completes.

                                                  +
                                                  + +
                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                  NameTypeOptional
                                                  event + AnimationEvent + + No +
                                                  +
                                                  +
                                                  +
                                                  +
                                                  + Returns : void + +
                                                  +
                                                  + +
                                                  +
                                                  +
                                                  +
                                                  + +

                                                  + Properties +

                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + Private + _elementFocusedBeforeDialogWasOpened + + +
                                                  + Type : HTMLElement + +
                                                  + +
                                                  +

                                                  Element that was focused before the lightbox was opened. Save this to restore upon close.

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + Private + _focusTrap + + +
                                                  + Type : ConfigurableFocusTrap + +
                                                  + +
                                                  +

                                                  The class that traps and manages focus within the lightbox.

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + ariaDescribedBy + + +
                                                  + Type : string + +
                                                  + +
                                                  +

                                                  ID of the element that describes the lightbox.

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + ariaLabel + + +
                                                  + Type : string + +
                                                  + +
                                                  +

                                                  Aria label to assign to the lightbox element

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + ariaLabelledBy + + +
                                                  + Type : string + +
                                                  + +
                                                  +

                                                  ID of the element that should be considered as the lightbox's label.

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + closeIcon + + +
                                                  + Type : SafeHtml + +
                                                  + +
                                                  +

                                                  Close button svg data

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + exitAnimationTime + + +
                                                  + Type : number + +
                                                  + +
                                                  +

                                                  The lightbox exit animation time in ms

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + id + + +
                                                  + Type : string + +
                                                  + +
                                                  +

                                                  Gallery ref id

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + overlayRef + + +
                                                  + Type : OverlayRef + +
                                                  + +
                                                  +

                                                  Overlay ref to close the lightbox

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + role + + +
                                                  + Type : string + +
                                                  + +
                                                  +

                                                  The ARIA role of the lightbox element.

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + +
                                                  + + + startAnimationTime + + +
                                                  + Type : number + +
                                                  + +
                                                  +

                                                  The lightbox start animation time in ms

                                                  +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + +
                                                  + + + state + + +
                                                  + Type : "void" | "enter" | "exit" + +
                                                  + Default value : 'enter' +
                                                  + +
                                                  +

                                                  State of the lightbox animation.

                                                  +
                                                  +
                                                  +
                                                  + +
                                                  + + +
                                                  +
                                                  import { Component, Optional, Inject, ElementRef, ChangeDetectionStrategy } from '@angular/core';
                                                  +import { SafeHtml } from '@angular/platform-browser';
                                                  +import { DOCUMENT } from '@angular/common';
                                                  +import { AnimationEvent } from '@angular/animations';
                                                  +import { OverlayRef } from '@angular/cdk/overlay';
                                                  +import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
                                                  +import { GalleryComponent } from 'ng-gallery';
                                                  +import { lightboxAnimation } from './lightbox.animation';
                                                  +
                                                  +@Component({
                                                  +  selector: 'lightbox',
                                                  +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                  +  animations: [lightboxAnimation],
                                                  +  styleUrls: ['./lightbox.component.scss'],
                                                  +  template: `
                                                  +    <i class="g-btn-close" aria-label="Close" [innerHTML]="closeIcon" (click)="overlayRef.detach()"></i>
                                                  +    <gallery [id]="id" [destroyRef]="false" [skipInitConfig]="true"></gallery>
                                                  +  `,
                                                  +  host: {
                                                  +    'tabindex': '-1',
                                                  +    'aria-modal': 'true',
                                                  +    '[attr.id]': '"lightbox-" + id',
                                                  +    '[attr.role]': 'role',
                                                  +    '[attr.aria-labelledby]': 'ariaLabel ? null : ariaLabelledBy',
                                                  +    '[attr.aria-label]': 'ariaLabel',
                                                  +    '[attr.aria-describedby]': 'ariaDescribedBy || null',
                                                  +    '[@lightbox]': '{ value: state, params: { startAnimationTime: startAnimationTime, exitAnimationTime: exitAnimationTime } }',
                                                  +    '(@lightbox.done)': 'onAnimationDone($event)',
                                                  +  },
                                                  +  standalone: true,
                                                  +  imports: [GalleryComponent]
                                                  +})
                                                  +export class LightboxComponent {
                                                  +
                                                  +  /** Gallery ref id */
                                                  +  id: string;
                                                  +
                                                  +  /** Overlay ref to close the lightbox */
                                                  +  overlayRef: OverlayRef;
                                                  +
                                                  +  /** Close button svg data */
                                                  +  closeIcon: SafeHtml;
                                                  +
                                                  +  /** State of the lightbox animation. */
                                                  +  state: 'void' | 'enter' | 'exit' = 'enter';
                                                  +
                                                  +  /** The ARIA role of the lightbox element. */
                                                  +  role: string;
                                                  +
                                                  +  /** Aria label to assign to the lightbox element */
                                                  +  ariaLabel: string;
                                                  +
                                                  +  /** ID of the element that should be considered as the lightbox's label. */
                                                  +  ariaLabelledBy: string;
                                                  +
                                                  +  /** ID of the element that describes the lightbox. */
                                                  +  ariaDescribedBy: string;
                                                  +
                                                  +  /** The lightbox start animation time in ms */
                                                  +  startAnimationTime: number;
                                                  +
                                                  +  /** The lightbox exit animation time in ms */
                                                  +  exitAnimationTime: number;
                                                  +
                                                  +  /** The class that traps and manages focus within the lightbox. */
                                                  +  private _focusTrap: ConfigurableFocusTrap;
                                                  +
                                                  +  /** Element that was focused before the lightbox was opened. Save this to restore upon close. */
                                                  +  private _elementFocusedBeforeDialogWasOpened: HTMLElement;
                                                  +
                                                  +  constructor(@Optional() @Inject(DOCUMENT) private _document: any,
                                                  +              private _focusTrapFactory: ConfigurableFocusTrapFactory,
                                                  +              private _elementRef: ElementRef) {
                                                  +    this._savePreviouslyFocusedElement();
                                                  +  }
                                                  +
                                                  +  /** Callback, invoked whenever an animation on the host completes. */
                                                  +  onAnimationDone(event: AnimationEvent) {
                                                  +    if (event.toState === 'enter') {
                                                  +      this._trapFocus();
                                                  +    } else {
                                                  +      this.overlayRef.dispose();
                                                  +      this._restoreFocus();
                                                  +    }
                                                  +  }
                                                  +
                                                  +  /** Moves the focus inside the focus trap. */
                                                  +  private _trapFocus() {
                                                  +    if (!this._focusTrap) {
                                                  +      this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
                                                  +    }
                                                  +    // If were to attempt to focus immediately, then the content of the lightbox would not yet be
                                                  +    // ready in instances where change detection has to run first. To deal with this, we simply
                                                  +    // wait for the microtask queue to be empty.
                                                  +    this._focusTrap.focusInitialElementWhenReady();
                                                  +  }
                                                  +
                                                  +  /** Saves a reference to the element that was focused before the lightbox was opened. */
                                                  +  private _savePreviouslyFocusedElement() {
                                                  +    if (this._document) {
                                                  +      this._elementFocusedBeforeDialogWasOpened = this._document.activeElement as HTMLElement;
                                                  +
                                                  +      // Note that there is no focus method when rendering on the server.
                                                  +      if (this._elementRef.nativeElement.focus) {
                                                  +        // Move focus onto the lightbox immediately in order to prevent the user from accidentally
                                                  +        // opening multiple dialogs at the same time. Needs to be async, because the element
                                                  +        // may not be focusable immediately.
                                                  +        Promise.resolve().then(() => this._elementRef.nativeElement.focus());
                                                  +      }
                                                  +    }
                                                  +  }
                                                  +
                                                  +  /** Restores focus to the element that was focused before the lightbox opened. */
                                                  +  private _restoreFocus() {
                                                  +    const toFocus = this._elementFocusedBeforeDialogWasOpened;
                                                  +
                                                  +    // We need the extra check, because IE can set the `activeElement` to null in some cases.
                                                  +    if (toFocus && typeof toFocus.focus === 'function') {
                                                  +      toFocus.focus();
                                                  +    }
                                                  +
                                                  +    if (this._focusTrap) {
                                                  +      this._focusTrap.destroy();
                                                  +    }
                                                  +  }
                                                  +}
                                                  +
                                                  +
                                                  + + +
                                                  +

                                                  + ./lightbox.component.scss +

                                                  +
                                                  @mixin fullscreen() {
                                                  +  width: 100%;
                                                  +  ::ng-deep {
                                                  +    lightbox {
                                                  +      max-width: unset;
                                                  +      max-height: unset;
                                                  +      position: fixed;
                                                  +      top: 0;
                                                  +      left: 0;
                                                  +      bottom: 0;
                                                  +      right: 0;
                                                  +      height: 100%;
                                                  +      width: 100%;
                                                  +      border-radius: 0;
                                                  +    }
                                                  +  }
                                                  +}
                                                  +
                                                  +::ng-deep {
                                                  +  lightbox {
                                                  +    position: relative;
                                                  +    display: block;
                                                  +    width: 1100px;
                                                  +    height: 800px;
                                                  +    max-width: 94vw;
                                                  +    max-height: 90vh;
                                                  +    border-radius: 4px;
                                                  +    overflow: hidden;
                                                  +    box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
                                                  +
                                                  +    &:focus {
                                                  +      outline: none;
                                                  +    }
                                                  +
                                                  +    gallery {
                                                  +      height: 100%;
                                                  +      width: 100%;
                                                  +      overflow: hidden;
                                                  +      margin: 0;
                                                  +
                                                  +      gallery-core {
                                                  +        height: 100% !important;
                                                  +      }
                                                  +    }
                                                  +  }
                                                  +
                                                  +  .g-backdrop {
                                                  +    background-color: rgba(0, 0, 0, .32);
                                                  +  }
                                                  +
                                                  +  .fullscreen {
                                                  +    @include fullscreen();
                                                  +  }
                                                  +
                                                  +  .g-overlay {
                                                  +    margin: auto;
                                                  +
                                                  +    @media only screen and (max-width: 480px) {
                                                  +      @include fullscreen();
                                                  +    }
                                                  +  }
                                                  +
                                                  +  .g-btn-close {
                                                  +    position: absolute;
                                                  +    right: 0.9em;
                                                  +    top: 0.9em;
                                                  +    z-index: 60;
                                                  +    cursor: pointer;
                                                  +    width: 20px;
                                                  +    height: 20px;
                                                  +    @media only screen and (max-width: 480px) {
                                                  +      right: 0.7em;
                                                  +      top: 0.7em;
                                                  +    }
                                                  +
                                                  +    svg {
                                                  +      width: 100%;
                                                  +      height: 100%;
                                                  +      opacity: 0.6;
                                                  +      transition: opacity linear 150ms;
                                                  +      filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));
                                                  +
                                                  +      &:hover {
                                                  +        opacity: 1;
                                                  +      }
                                                  +    }
                                                  +  }
                                                  +}
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  +
                                                  +
                                                  + Legend +
                                                  +
                                                  +
                                                  Html element +
                                                  +
                                                  +
                                                  Component +
                                                  +
                                                  +
                                                  Html element with directive +
                                                  +
                                                  +
                                                  + + +
                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                  +
                                                  +

                                                  results matching ""

                                                  +
                                                    +
                                                    +
                                                    +

                                                    No results matching ""

                                                    +
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/LightboxExampleComponent.html b/documentation/components/LightboxExampleComponent.html new file mode 100644 index 00000000..d104c7bf --- /dev/null +++ b/documentation/components/LightboxExampleComponent.html @@ -0,0 +1,378 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                    +
                                                    + + +
                                                    +
                                                    + + + + + + + + +
                                                    +

                                                    +

                                                    File

                                                    +

                                                    +

                                                    + projects/ng-gallery/src/stories/lightbox/lightbox-example.component.ts +

                                                    + + +

                                                    +

                                                    Description

                                                    +

                                                    +

                                                    +

                                                    This section demonstrate how to extend the image template, like displaying a text over the image item

                                                    + +

                                                    + + + + +
                                                    +

                                                    Metadata

                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                    + +
                                                    +

                                                    Index

                                                    + + + + + + + + + + + + + + + +
                                                    +
                                                    Properties
                                                    +
                                                    + +
                                                    +
                                                    + +
                                                    +

                                                    Constructor

                                                    + + + + + + + + + + + + + +
                                                    +constructor(pixabay: Pixabay) +
                                                    + +
                                                    +
                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                    NameTypeOptional
                                                    pixabay + Pixabay + + No +
                                                    +
                                                    +
                                                    +
                                                    + + + + + + +
                                                    + +

                                                    + Properties +

                                                    + + + + + + + + + + + + + + +
                                                    + + + Readonly + items$ + + +
                                                    + Type : Observable<GalleryItem[]> + +
                                                    + +
                                                    +
                                                    + +
                                                    + + +
                                                    +
                                                    import { Component, ChangeDetectionStrategy } from '@angular/core';
                                                    +import { CommonModule } from '@angular/common';
                                                    +import { GalleryItem, } from 'ng-gallery';
                                                    +import { LightboxModule } from 'ng-gallery/lightbox';
                                                    +import { Observable } from 'rxjs';
                                                    +import { Pixabay } from '../pixabay/pixabay.service';
                                                    +
                                                    +/**
                                                    + * This section demonstrate how to extend the image template, like displaying a text over the image item
                                                    + */
                                                    +@Component({
                                                    +  selector: 'lightbox-example',
                                                    +  template: `
                                                    +
                                                    +  `,
                                                    +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                    +  standalone: true,
                                                    +  imports: [CommonModule, LightboxModule]
                                                    +})
                                                    +export class LightboxExampleComponent {
                                                    +
                                                    +  readonly items$: Observable<GalleryItem[]>;
                                                    +
                                                    +  constructor(pixabay: Pixabay) {
                                                    +    this.items$ = pixabay.getHDImages('massages');
                                                    +  }
                                                    +}
                                                    +
                                                    +
                                                    + + + +
                                                    +
                                                    +
                                                    +
                                                    + Legend +
                                                    +
                                                    +
                                                    Html element +
                                                    +
                                                    +
                                                    Component +
                                                    +
                                                    +
                                                    Html element with directive +
                                                    +
                                                    +
                                                    + + +
                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                    +
                                                    +

                                                    results matching ""

                                                    +
                                                      +
                                                      +
                                                      +

                                                      No results matching ""

                                                      +
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/coverage.html b/documentation/coverage.html new file mode 100644 index 00000000..b631d608 --- /dev/null +++ b/documentation/coverage.html @@ -0,0 +1,1360 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                      +
                                                      + + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + +
                                                      + +
                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      FileTypeIdentifierStatements
                                                      + + projects/ng-gallery/.storybook/main.ts + variableconfig + 0 % + (0/1) +
                                                      + + projects/ng-gallery/.storybook/preview.ts + variablepreview + 0 % + (0/1) +
                                                      + + projects/ng-gallery/lightbox/src/gallerize.directive.ts + directiveGallerizeDirective + 64 % + (9/14) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.animation.ts + variablelightboxAnimation + 0 % + (0/1) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.component.ts + componentLightboxComponent + 88 % + (16/18) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.default.ts + variabledefaultConfig + 0 % + (0/1) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.directive.ts + directiveLightboxDirective + 0 % + (0/7) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.model.ts + interfaceLightboxConfig + 0 % + (0/12) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.model.ts + variableLIGHTBOX_CONFIG + 0 % + (0/1) +
                                                      + + projects/ng-gallery/lightbox/src/lightbox.service.ts + injectableLightbox + 77 % + (7/9) +
                                                      + + projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts + directiveAutoplayDirective + 0 % + (0/11) +
                                                      + + projects/ng-gallery/src/lib/components/adapters/base-adapter.ts + classSliderAdapter + 0 % + (0/10) +
                                                      + + projects/ng-gallery/src/lib/components/adapters/main-adapters.ts + classHorizontalAdapter + 0 % + (0/13) +
                                                      + + projects/ng-gallery/src/lib/components/adapters/main-adapters.ts + classVerticalAdapter + 0 % + (0/13) +
                                                      + + projects/ng-gallery/src/lib/components/adapters/main-adapters.ts + variableHammer + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-core.component.ts + componentGalleryCoreComponent + 54 % + (12/22) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-counter.component.ts + componentGalleryCounterComponent + 0 % + (0/2) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-bullets.component.ts + componentGalleryBulletsComponent + 0 % + (0/6) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-item.component.ts + componentGalleryItemComponent + 56 % + (9/16) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-nav.component.ts + componentGalleryNavComponent + 0 % + (0/8) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-slider.component.ts + componentGallerySliderComponent + 45 % + (9/20) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-thumb.component.ts + componentGalleryThumbComponent + 45 % + (5/11) +
                                                      + + projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts + componentGalleryThumbsComponent + 58 % + (10/17) +
                                                      + + projects/ng-gallery/src/lib/components/gallery.component.ts + componentGalleryComponent + 3 % + (3/77) +
                                                      + + projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts + componentGalleryIframeComponent + 0 % + (0/9) +
                                                      + + projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts + componentGalleryImageComponent + 52 % + (9/17) +
                                                      + + projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts + componentGalleryVideoComponent + 6 % + (1/15) +
                                                      + + projects/ng-gallery/src/lib/components/templates/items.model.ts + classIframeItem + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/components/templates/items.model.ts + classImageItem + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/components/templates/items.model.ts + classVideoItem + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/components/templates/items.model.ts + classYoutubeItem + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/components/templates/svg-assets.ts + variableimageFailedSvg + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts + directiveGalleryBoxDef + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts + interfaceGalleryStateContext + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts + directiveGalleryImageDef + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts + directiveGalleryItemDef + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts + interfaceGalleryItemContext + 87 % + (7/8) +
                                                      + + projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts + directiveGalleryThumbDef + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts + directiveHammerSliding + 6 % + (1/16) +
                                                      + + projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts + variableHammer + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/models/config.model.ts + interfaceGalleryConfig + 0 % + (0/44) +
                                                      + + projects/ng-gallery/src/lib/models/config.model.ts + variableGALLERY_CONFIG + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/models/gallery.model.ts + interfaceGalleryError + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/models/gallery.model.ts + interfaceGalleryItem + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/models/gallery.model.ts + interfaceGalleryState + 0 % + (0/8) +
                                                      + + projects/ng-gallery/src/lib/models/slider.model.ts + interfaceSliderState + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/models/slider.model.ts + interfaceWorkerState + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/observers/active-item-observer.ts + classActiveItemObserver + 0 % + (0/2) +
                                                      + + projects/ng-gallery/src/lib/observers/active-item-observer.ts + functioncreateIntersectionObserver + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts + directiveItemIntersectionObserver + 0 % + (0/12) +
                                                      + + projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts + directiveSliderIntersectionObserver + 0 % + (0/13) +
                                                      + + projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts + directiveSliderResizeObserver + 0 % + (0/21) +
                                                      + + projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts + directiveThumbResizeObserver + 0 % + (0/10) +
                                                      + + projects/ng-gallery/src/lib/services/gallery-ref.ts + classGalleryRef + 92 % + (23/25) +
                                                      + + projects/ng-gallery/src/lib/services/gallery-ref.ts + variablefilterActions + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/services/gallery.service.ts + injectableGallery + 77 % + (7/9) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionA + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionB + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionbezier + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionbinarySubdivide + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionC + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functioncalcBezier + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functiongetSlope + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionLinearEasing + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + functionnewtonRaphsonIterate + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variablefloat32ArraySupported + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variablekSampleStepSize + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variablekSplineTableSize + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variableNEWTON_ITERATIONS + 100 % + (1/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variableNEWTON_MIN_SLOPE + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variableSUBDIVISION_MAX_ITERATIONS + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts + variableSUBDIVISION_PRECISION + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts + directiveSmoothScroll + 27 % + (6/22) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts + variableHammer + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts + interfaceBezierEasingOptions + 0 % + (0/5) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts + interfaceSmoothScrollOptions + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts + interfaceSmoothScrollStep + 0 % + (0/11) +
                                                      + + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts + variableSMOOTH_SCROLL_OPTIONS + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/utils/gallery.default.ts + variabledefaultConfig + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/lib/utils/gallery.default.ts + variabledefaultState + 100 % + (1/1) +
                                                      + + projects/ng-gallery/src/lib/utils/img-manager.ts + injectableImgManager + 0 % + (0/6) +
                                                      + + projects/ng-gallery/src/lib/utils/img-manager.ts + interfaceImageRegistry + 0 % + (0/3) +
                                                      + + projects/ng-gallery/src/lib/utils/img-recognizer.ts + directiveImgRecognizer + 0 % + (0/9) +
                                                      + + projects/ng-gallery/src/lib/utils/resize-observer.ts + functionresizeObservable + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variableAll + 100 % + (1/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variableCounter + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variableDots + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variablemeta + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variableNavigation + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/Gallery.stories.ts + variableThumbnails + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/basic/gallery-example.component.ts + componentGalleryExampleComponent + 5 % + (2/37) +
                                                      + + projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts + variableAll + 100 % + (1/1) +
                                                      + + projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts + variablemeta + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts + componentCustomTemplateComponent + 33 % + (1/3) +
                                                      + + projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts + variableAll + 100 % + (1/1) +
                                                      + + projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts + variablemeta + 0 % + (0/1) +
                                                      + + projects/ng-gallery/src/stories/lightbox/lightbox-example.component.ts + componentLightboxExampleComponent + 33 % + (1/3) +
                                                      + + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts + interfaceHit + 0 % + (0/22) +
                                                      + + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts + interfaceHit2 + 0 % + (0/18) +
                                                      + + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts + interfacePixabayHDModel + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts + interfacePixabayModel + 0 % + (0/4) +
                                                      + + projects/ng-gallery/src/stories/pixabay/pixabay.service.ts + injectablePixabay + 0 % + (0/4) +
                                                      + + + + + +
                                                      +
                                                      +

                                                      results matching ""

                                                      +
                                                        +
                                                        +
                                                        +

                                                        No results matching ""

                                                        +
                                                        +
                                                        +
                                                        + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/dependencies.html b/documentation/dependencies.html new file mode 100644 index 00000000..b033dfe1 --- /dev/null +++ b/documentation/dependencies.html @@ -0,0 +1,169 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                        +
                                                        + + +
                                                        +
                                                        + + + + + + + + + + + + + + + + +
                                                          +
                                                        • + @angular/animations : ^16.2.7
                                                        • +
                                                        • + @angular/cdk : ^16.2.6
                                                        • +
                                                        • + @angular/common : ^16.2.7
                                                        • +
                                                        • + @angular/compiler : ^16.2.7
                                                        • +
                                                        • + @angular/core : ^16.2.7
                                                        • +
                                                        • + @angular/flex-layout : ^15.0.0-beta.42
                                                        • +
                                                        • + @angular/forms : ^16.2.7
                                                        • +
                                                        • + @angular/material : ^16.2.6
                                                        • +
                                                        • + @angular/platform-browser : ^16.2.7
                                                        • +
                                                        • + @angular/platform-browser-dynamic : ^16.2.7
                                                        • +
                                                        • + @angular/platform-server : ^16.2.7
                                                        • +
                                                        • + @angular/router : ^16.2.7
                                                        • +
                                                        • + @fortawesome/angular-fontawesome : ^0.13.0
                                                        • +
                                                        • + @fortawesome/fontawesome-svg-core : ^6.4.0
                                                        • +
                                                        • + @fortawesome/free-brands-svg-icons : ^6.4.0
                                                        • +
                                                        • + @fortawesome/free-solid-svg-icons : ^6.4.0
                                                        • +
                                                        • + @nguniversal/express-engine : ^16.2.0
                                                        • +
                                                        • + express : ^4.15.2
                                                        • +
                                                        • + hammerjs : ^2.0.8
                                                        • +
                                                        • + highlight.js : ^11.8.0
                                                        • +
                                                        • + ngx-highlightjs : ^9.0.0
                                                        • +
                                                        • + ngx-progressbar : ^11.0.0
                                                        • +
                                                        • + ngx-scrollbar : ^12.0.0
                                                        • +
                                                        • + rxjs : ~7.5.6
                                                        • +
                                                        • + tslib : ^2.3.0
                                                        • +
                                                        • + zone.js : ~0.13.0
                                                        • +
                                                        + + + + + + +
                                                        +
                                                        +

                                                        results matching ""

                                                        +
                                                          +
                                                          +
                                                          +

                                                          No results matching ""

                                                          +
                                                          +
                                                          +
                                                          + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/AutoplayDirective.html b/documentation/directives/AutoplayDirective.html new file mode 100644 index 00000000..254370e1 --- /dev/null +++ b/documentation/directives/AutoplayDirective.html @@ -0,0 +1,675 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                          +
                                                          + + +
                                                          +
                                                          + + + + + + + + + + + +
                                                          +
                                                          +

                                                          +

                                                          File

                                                          +

                                                          +

                                                          + projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts +

                                                          + + + +

                                                          +

                                                          Implements

                                                          +

                                                          +

                                                          + OnInit + OnChanges + OnDestroy +

                                                          + + +
                                                          +

                                                          Metadata

                                                          + + + + + + + + + + +
                                                          + +
                                                          +

                                                          Index

                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          Properties
                                                          +
                                                          + +
                                                          +
                                                          Methods
                                                          +
                                                          + +
                                                          +
                                                          Inputs
                                                          +
                                                          + +
                                                          +
                                                          + +
                                                          +

                                                          Constructor

                                                          + + + + + + + + + + + + + +
                                                          +constructor(_gallery: Gallery, _imgManager: ImgManager) +
                                                          + +
                                                          +
                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          NameTypeOptional
                                                          _gallery + Gallery + + No +
                                                          _imgManager + ImgManager + + No +
                                                          +
                                                          +
                                                          +
                                                          + +
                                                          +

                                                          Inputs

                                                          + + + + + + + + + + + + +
                                                          + + config +
                                                          + Type : GalleryConfig + +
                                                          + +
                                                          + + + + + + + + + + + + +
                                                          + + galleryId +
                                                          + Type : string + +
                                                          + +
                                                          +
                                                          + + + +
                                                          + +

                                                          + Methods +

                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + Private + _subscribe + + +
                                                          + + _subscribe() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + Private + _unsubscribe + + +
                                                          + + _unsubscribe() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + ngOnChanges + + +
                                                          +ngOnChanges() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + ngOnDestroy + + +
                                                          +ngOnDestroy() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + ngOnInit + + +
                                                          +ngOnInit() +
                                                          + +
                                                          + +
                                                          + Returns : void + +
                                                          +
                                                          +
                                                          +
                                                          + +

                                                          + Properties +

                                                          + + + + + + + + + + + + + + +
                                                          + + + Private + _currentSubscription + + +
                                                          + Type : Subscription + +
                                                          + +
                                                          + + + + + + + + + + + + + + +
                                                          + + + Private + _galleryRef + + +
                                                          + Type : GalleryRef + +
                                                          + +
                                                          +
                                                          + + +
                                                          + + +
                                                          +
                                                          import { Directive, Input, OnInit, OnChanges, OnDestroy } from '@angular/core';
                                                          +import { Subscription, delay, of, switchMap, tap, EMPTY } from 'rxjs';
                                                          +import { ImgManager } from '../utils/img-manager';
                                                          +import { Gallery } from '../services/gallery.service';
                                                          +import { GalleryRef } from '../services/gallery-ref';
                                                          +import { GalleryState } from '../models/gallery.model';
                                                          +import { GalleryConfig } from '../models/config.model';
                                                          +
                                                          +@Directive({
                                                          +  selector: 'gallery-core[autoplay]',
                                                          +  standalone: true
                                                          +})
                                                          +export class AutoplayDirective implements OnInit, OnChanges, OnDestroy {
                                                          +
                                                          +  private _currentSubscription: Subscription;
                                                          +
                                                          +  private _galleryRef: GalleryRef;
                                                          +
                                                          +  @Input() config: GalleryConfig;
                                                          +
                                                          +  @Input() galleryId: string;
                                                          +
                                                          +  constructor(private _gallery: Gallery, private _imgManager: ImgManager) {
                                                          +  }
                                                          +
                                                          +  ngOnInit(): void {
                                                          +    this._galleryRef = this._gallery.ref(this.galleryId);
                                                          +    this._subscribe();
                                                          +  }
                                                          +
                                                          +  ngOnChanges(): void {
                                                          +    if (this._galleryRef) {
                                                          +      this.config.autoplay ? this._galleryRef.play() : this._galleryRef.stop();
                                                          +    }
                                                          +  }
                                                          +
                                                          +  ngOnDestroy(): void {
                                                          +    this._unsubscribe();
                                                          +  }
                                                          +
                                                          +
                                                          +  private _subscribe(): void {
                                                          +    this._unsubscribe();
                                                          +
                                                          +    this._currentSubscription = this._galleryRef.playingChanged.pipe(
                                                          +      switchMap((state: GalleryState) => {
                                                          +        if(state.isPlaying) {
                                                          +          return this._imgManager.getActiveItem(this._galleryRef.state).pipe(
                                                          +            switchMap(() => of({}).pipe(
                                                          +              delay(this.config.playerInterval),
                                                          +              tap(() => this._galleryRef.next(this.config.scrollBehavior))
                                                          +            ))
                                                          +          );
                                                          +        }
                                                          +        return EMPTY;
                                                          +      })
                                                          +    ).subscribe();
                                                          +  }
                                                          +
                                                          +  private _unsubscribe(): void {
                                                          +    this._currentSubscription?.unsubscribe();
                                                          +  }
                                                          +}
                                                          +
                                                          +
                                                          + +
                                                          + + + + + + + + + + + + + +
                                                          +
                                                          +

                                                          results matching ""

                                                          +
                                                            +
                                                            +
                                                            +

                                                            No results matching ""

                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/GallerizeDirective.html b/documentation/directives/GallerizeDirective.html new file mode 100644 index 00000000..7dc8d9ca --- /dev/null +++ b/documentation/directives/GallerizeDirective.html @@ -0,0 +1,1030 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                            +
                                                            + + +
                                                            +
                                                            + + + + + + + + + + + +
                                                            +
                                                            +

                                                            +

                                                            File

                                                            +

                                                            +

                                                            + projects/ng-gallery/lightbox/src/gallerize.directive.ts +

                                                            + + + +

                                                            +

                                                            Implements

                                                            +

                                                            +

                                                            + OnInit + OnDestroy +

                                                            + + +
                                                            +

                                                            Metadata

                                                            + + + + + + + + + + +
                                                            + +
                                                            +

                                                            Index

                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                            +
                                                            Properties
                                                            +
                                                            + +
                                                            +
                                                            Methods
                                                            +
                                                            + +
                                                            +
                                                            Inputs
                                                            +
                                                            + +
                                                            +
                                                            + +
                                                            +

                                                            Constructor

                                                            + + + + + + + + + + + + + +
                                                            +constructor(_zone: NgZone, _el: ElementRef, _gallery: Gallery, _lightbox: Lightbox, _document: any, _galleryCmp: GalleryComponent) +
                                                            + +
                                                            +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            _zone + NgZone + + No +
                                                            _el + ElementRef + + No +
                                                            _gallery + Gallery + + No +
                                                            _lightbox + Lightbox + + No +
                                                            _document + any + + No +
                                                            _galleryCmp + GalleryComponent + + No +
                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +

                                                            Inputs

                                                            + + + + + + + + + + + + + + + +
                                                            + + gallerize +
                                                            + Type : string + +
                                                            + +
                                                            +

                                                            If set, it will become the gallery id

                                                            +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + +
                                                            + + selector +
                                                            + Type : string + +
                                                            + Default value : 'img' +
                                                            + +
                                                            +

                                                            The selector used to query images elements

                                                            +
                                                            +
                                                            +
                                                            + + + +
                                                            + +

                                                            + Methods +

                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + Private + detectorMode + + +
                                                            + + detectorMode(galleryRef: GalleryRef) +
                                                            + +
                                                            +

                                                            Detector mode: means gallerize directive is used on a normal HTMLElement + Detects images and adds a click event to each image, so it opens in the lightbox

                                                            +
                                                            + +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            galleryRef + GalleryRef + + No +
                                                            +
                                                            +
                                                            +
                                                            +
                                                            + Returns : void + +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + Private + galleryMode + + +
                                                            + + galleryMode(galleryRef: GalleryRef) +
                                                            + +
                                                            +

                                                            Gallery mode: means gallerize directive is used on <gallery> component +Adds a click event to each gallery item so it opens in lightbox

                                                            +
                                                            + +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            galleryRef + GalleryRef + + No +
                                                            +
                                                            +
                                                            +
                                                            +
                                                            + Returns : void + +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + ngOnDestroy + + +
                                                            +ngOnDestroy() +
                                                            + +
                                                            + +
                                                            + Returns : void + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + ngOnInit + + +
                                                            +ngOnInit() +
                                                            + +
                                                            + +
                                                            + Returns : void + +
                                                            +
                                                            +
                                                            +
                                                            + +

                                                            + Properties +

                                                            + + + + + + + + + + + + + + + + + +
                                                            + + + Private + _detector$ + + +
                                                            + Type : Subject<void> + +
                                                            + +
                                                            +

                                                            Stream that emits when image is discover

                                                            +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + +
                                                            + + + Private + _galleryId + + +
                                                            + Type : string + +
                                                            + Default value : 'lightbox' +
                                                            + +
                                                            +

                                                            Default gallery id

                                                            +
                                                            +
                                                            + + + + + + + + + + + + + + +
                                                            + + + Private + _itemChange$ + + +
                                                            + Type : Subscription + +
                                                            + +
                                                            + + + + + + + + + + + + + + + + + +
                                                            + + + Private + _itemClick$ + + +
                                                            + Type : Subscription + +
                                                            + +
                                                            +

                                                            Gallery events (if used on a gallery component)

                                                            +
                                                            +
                                                            + + + + + + + + + + + + + + + + + +
                                                            + + + Private + Readonly + _mode + + +
                                                            + Type : GallerizeMode + +
                                                            + +
                                                            +

                                                            Gallerize mode

                                                            +
                                                            +
                                                            + + + + + + + + + + + + + + + + + +
                                                            + + + Private + _observer$ + + +
                                                            + Type : MutationObserver + +
                                                            + +
                                                            +

                                                            Stream that emits to fire the detection stream the image elements has changed

                                                            +
                                                            +
                                                            +
                                                            + + +
                                                            + + +
                                                            +
                                                            import {
                                                            +  Directive,
                                                            +  Input,
                                                            +  OnInit,
                                                            +  OnDestroy,
                                                            +  Inject,
                                                            +  Optional,
                                                            +  Self,
                                                            +  Host,
                                                            +  NgZone,
                                                            +  ElementRef,
                                                            +} from '@angular/core';
                                                            +import { DOCUMENT } from '@angular/common';
                                                            +import { Gallery, GalleryRef, ImageItem, GalleryComponent, GalleryState, GalleryItem } from 'ng-gallery';
                                                            +import { Subject, Subscription, from, tap, map, switchMap, finalize, debounceTime, EMPTY } from 'rxjs';
                                                            +
                                                            +import { Lightbox } from './lightbox.service';
                                                            +
                                                            +/**
                                                            + * This directive has 2 modes:
                                                            + * 1 - If host element is a HTMLElement, it detects the images and hooks their clicks to lightbox
                                                            + * 2 - If host element is a GalleryComponent, it hooks the images click to the lightbox
                                                            + */
                                                            +
                                                            +const enum GallerizeMode {
                                                            +  Detector = 'detector',
                                                            +  Gallery = 'gallery'
                                                            +}
                                                            +
                                                            +@Directive({
                                                            +  selector: '[gallerize]',
                                                            +  standalone: true
                                                            +})
                                                            +export class GallerizeDirective implements OnInit, OnDestroy {
                                                            +
                                                            +  /** Default gallery id */
                                                            +  private _galleryId: string = 'lightbox';
                                                            +
                                                            +  /** Gallerize mode */
                                                            +  private readonly _mode: GallerizeMode;
                                                            +
                                                            +  /** If host element is a HTMLElement, will use the following variables: */
                                                            +
                                                            +  /** Stream that emits to fire the detection stream the image elements has changed */
                                                            +  private _observer$: MutationObserver;
                                                            +
                                                            +  /** Stream that emits when image is discover */
                                                            +  private _detector$: Subject<void>;
                                                            +
                                                            +  /** If host element is a GalleryComponent, will use the following variables: */
                                                            +
                                                            +  /** Gallery events (if used on a gallery component) */
                                                            +  private _itemClick$: Subscription;
                                                            +  private _itemChange$: Subscription;
                                                            +
                                                            +  // ======================================================
                                                            +
                                                            +  /** If set, it will become the gallery id */
                                                            +  @Input() gallerize: string;
                                                            +
                                                            +  /** The selector used to query images elements */
                                                            +  @Input() selector: string = 'img';
                                                            +
                                                            +  constructor(private _zone: NgZone,
                                                            +              private _el: ElementRef,
                                                            +              private _gallery: Gallery,
                                                            +              private _lightbox: Lightbox,
                                                            +              @Inject(DOCUMENT) private _document: any,
                                                            +              @Host() @Self() @Optional() private _galleryCmp: GalleryComponent) {
                                                            +
                                                            +    // Set gallerize mode
                                                            +    this._mode = _galleryCmp ? GallerizeMode.Gallery : GallerizeMode.Detector;
                                                            +  }
                                                            +
                                                            +  ngOnInit(): void {
                                                            +    this._zone.runOutsideAngular(() => {
                                                            +      this._galleryId = this.gallerize || this._galleryId;
                                                            +      const ref: GalleryRef = this._gallery.ref(this._galleryId);
                                                            +
                                                            +      switch (this._mode) {
                                                            +        case GallerizeMode.Detector:
                                                            +          this.detectorMode(ref);
                                                            +          break;
                                                            +        case GallerizeMode.Gallery:
                                                            +          this.galleryMode(ref);
                                                            +      }
                                                            +    });
                                                            +  }
                                                            +
                                                            +  ngOnDestroy(): void {
                                                            +    switch (this._mode) {
                                                            +      case GallerizeMode.Detector:
                                                            +        this._detector$.complete();
                                                            +        this._observer$.disconnect();
                                                            +        break;
                                                            +      case GallerizeMode.Gallery:
                                                            +        this._itemClick$.unsubscribe();
                                                            +        this._itemChange$.unsubscribe();
                                                            +    }
                                                            +  }
                                                            +
                                                            +  /** Gallery mode: means `gallerize` directive is used on `<gallery>` component
                                                            +   * Adds a click event to each gallery item so it opens in lightbox */
                                                            +  private galleryMode(galleryRef: GalleryRef): void {
                                                            +    // Clone its items to the new gallery instance
                                                            +    this._itemClick$ = this._galleryCmp.galleryRef.itemClick.subscribe((i: number) => this._lightbox.open(i, this._galleryId));
                                                            +    this._itemChange$ = this._galleryCmp.galleryRef.itemsChanged.subscribe((state: GalleryState) => galleryRef.load(state.items));
                                                            +  }
                                                            +
                                                            +  /** Detector mode: means `gallerize` directive is used on a normal HTMLElement
                                                            +   *  Detects images and adds a click event to each image, so it opens in the lightbox */
                                                            +  private detectorMode(galleryRef: GalleryRef): void {
                                                            +    this._detector$ = new Subject();
                                                            +    // Query image elements
                                                            +    this._detector$.pipe(
                                                            +      debounceTime(300),
                                                            +      switchMap(() => {
                                                            +
                                                            +        /** get all img elements from content */
                                                            +        const imageElements = this._el.nativeElement.querySelectorAll(this.selector);
                                                            +
                                                            +        if (imageElements && imageElements.length) {
                                                            +
                                                            +          const images: GalleryItem[] = [];
                                                            +
                                                            +          return from(imageElements).pipe(
                                                            +            map((el: HTMLElement, i: number) => {
                                                            +              // Add click event to the image
                                                            +              el.style.cursor = 'pointer';
                                                            +              el.addEventListener('click', () => {
                                                            +                this._zone.run(() => this._lightbox.open(i, this._galleryId));
                                                            +              });
                                                            +
                                                            +              if (el instanceof HTMLImageElement) {
                                                            +                // If element is type of img use the src property
                                                            +                return {
                                                            +                  src: el.getAttribute('imageSrc') || el.src,
                                                            +                  thumb: el.getAttribute('thumbSrc') || el.src
                                                            +                };
                                                            +              } else {
                                                            +                // Otherwise, use element background-image url
                                                            +                const elStyle = this._document.defaultView.getComputedStyle(el, null);
                                                            +                const background = elStyle.backgroundImage.slice(4, -1).replace(/"/g, '');
                                                            +                return {
                                                            +                  src: el.getAttribute('imageSrc') || background,
                                                            +                  thumb: el.getAttribute('thumbSrc') || background
                                                            +                };
                                                            +              }
                                                            +            }),
                                                            +            tap((data: any) => images.push(new ImageItem(data))),
                                                            +            finalize(() => galleryRef.load(images))
                                                            +          );
                                                            +        } else {
                                                            +          return EMPTY;
                                                            +        }
                                                            +      })
                                                            +    ).subscribe();
                                                            +
                                                            +    // Observe content changes
                                                            +    this._observer$ = new MutationObserver(() => this._detector$.next());
                                                            +    this._observer$.observe(this._el.nativeElement, { childList: true, subtree: true });
                                                            +  }
                                                            +}
                                                            +
                                                            +
                                                            + +
                                                            + + + + + + + + + + + + + +
                                                            +
                                                            +

                                                            results matching ""

                                                            +
                                                              +
                                                              +
                                                              +

                                                              No results matching ""

                                                              +
                                                              +
                                                              +
                                                              + +
                                                              +
                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/GalleryBoxDef.html b/documentation/directives/GalleryBoxDef.html new file mode 100644 index 00000000..ea80b91d --- /dev/null +++ b/documentation/directives/GalleryBoxDef.html @@ -0,0 +1,408 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                              +
                                                              + + +
                                                              +
                                                              + + + + + + + + + + + +
                                                              +
                                                              +

                                                              +

                                                              File

                                                              +

                                                              +

                                                              + projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts +

                                                              + + + + + +
                                                              +

                                                              Metadata

                                                              + + + + + + + + + + +
                                                              + +
                                                              +

                                                              Index

                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                              +
                                                              Properties
                                                              +
                                                              + +
                                                              +
                                                              Methods
                                                              +
                                                              + +
                                                              +
                                                              + +
                                                              +

                                                              Constructor

                                                              + + + + + + + + + + + + + +
                                                              +constructor(templateRef: TemplateRef<GalleryStateContext>) +
                                                              + +
                                                              +
                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                              NameTypeOptional
                                                              templateRef + TemplateRef<GalleryStateContext> + + No +
                                                              +
                                                              +
                                                              +
                                                              + + + + + +
                                                              + +

                                                              + Methods +

                                                              + + + + + + + + + + + + + + + + + + + +
                                                              + + + Static + ngTemplateContextGuard + + +
                                                              + + ngTemplateContextGuard(directive: GalleryBoxDef, context) +
                                                              + +
                                                              + +
                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                              NameTypeOptional
                                                              directive + GalleryBoxDef + + No +
                                                              context + + No +
                                                              +
                                                              +
                                                              +
                                                              +
                                                              + Returns : GalleryStateContext + +
                                                              +
                                                              + +
                                                              +
                                                              +
                                                              +
                                                              + +

                                                              + Properties +

                                                              + + + + + + + + + + + + + + +
                                                              + + + Public + templateRef + + +
                                                              + Type : TemplateRef<GalleryStateContext> + +
                                                              + +
                                                              +
                                                              + + +
                                                              + + +
                                                              +
                                                              import { Directive, TemplateRef } from '@angular/core';
                                                              +import { GalleryState } from '../models/gallery.model';
                                                              +import { GalleryConfig } from '../models/config.model';
                                                              +
                                                              +
                                                              +@Directive({
                                                              +  standalone: true,
                                                              +  selector: '[galleryBoxDef]'
                                                              +})
                                                              +export class GalleryBoxDef {
                                                              +
                                                              +  constructor(public templateRef: TemplateRef<GalleryStateContext>) {
                                                              +  }
                                                              +
                                                              +  // Make sure the template checker knows the type of the context with which the
                                                              +  // template of this directive will be rendered
                                                              +  static ngTemplateContextGuard(
                                                              +    directive: GalleryBoxDef,
                                                              +    context: unknown
                                                              +  ): context is GalleryStateContext {
                                                              +    return true;
                                                              +  }
                                                              +}
                                                              +
                                                              +export interface GalleryStateContext {
                                                              +  state?: GalleryState;
                                                              +  config?: GalleryConfig;
                                                              +}
                                                              +
                                                              +
                                                              + +
                                                              + + + + + + + + + + + + + +
                                                              +
                                                              +

                                                              results matching ""

                                                              +
                                                                +
                                                                +
                                                                +

                                                                No results matching ""

                                                                +
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/GalleryImageDef.html b/documentation/directives/GalleryImageDef.html new file mode 100644 index 00000000..4b8aff48 --- /dev/null +++ b/documentation/directives/GalleryImageDef.html @@ -0,0 +1,402 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                +
                                                                + + +
                                                                +
                                                                + + + + + + + + + + + +
                                                                +
                                                                +

                                                                +

                                                                File

                                                                +

                                                                +

                                                                + projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts +

                                                                + + + + + +
                                                                +

                                                                Metadata

                                                                + + + + + + + + + + +
                                                                + +
                                                                +

                                                                Index

                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                +
                                                                Properties
                                                                +
                                                                + +
                                                                +
                                                                Methods
                                                                +
                                                                + +
                                                                +
                                                                + +
                                                                +

                                                                Constructor

                                                                + + + + + + + + + + + + + +
                                                                +constructor(templateRef: TemplateRef<GalleryItemContext<ImageItemData>>) +
                                                                + +
                                                                +
                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                NameTypeOptional
                                                                templateRef + TemplateRef<GalleryItemContext<ImageItemData>> + + No +
                                                                +
                                                                +
                                                                +
                                                                + + + + + +
                                                                + +

                                                                + Methods +

                                                                + + + + + + + + + + + + + + + + + + + +
                                                                + + + Static + ngTemplateContextGuard + + +
                                                                + + ngTemplateContextGuard(directive: GalleryImageDef, context) +
                                                                + +
                                                                + +
                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                NameTypeOptional
                                                                directive + GalleryImageDef + + No +
                                                                context + + No +
                                                                +
                                                                +
                                                                +
                                                                + +
                                                                + +
                                                                +
                                                                +
                                                                +
                                                                + +

                                                                + Properties +

                                                                + + + + + + + + + + + + + + +
                                                                + + + Public + templateRef + + +
                                                                + Type : TemplateRef<GalleryItemContext<ImageItemData>> + +
                                                                + +
                                                                +
                                                                + + +
                                                                + + +
                                                                +
                                                                import { Directive, TemplateRef } from '@angular/core';
                                                                +import { ImageItemData } from '../components/templates/items.model';
                                                                +import { GalleryItemContext } from './gallery-item-def.directive';
                                                                +
                                                                +@Directive({
                                                                +  standalone: true,
                                                                +  selector: '[galleryImageDef]'
                                                                +})
                                                                +export class GalleryImageDef {
                                                                +
                                                                +  constructor(public templateRef: TemplateRef<GalleryItemContext<ImageItemData>>) {
                                                                +  }
                                                                +
                                                                +  // Make sure the template checker knows the type of the context with which the
                                                                +  // template of this directive will be rendered
                                                                +  static ngTemplateContextGuard(
                                                                +    directive: GalleryImageDef,
                                                                +    context: unknown
                                                                +  ): context is GalleryItemContext<ImageItemData> {
                                                                +    return true;
                                                                +  }
                                                                +}
                                                                +
                                                                +
                                                                + +
                                                                + + + + + + + + + + + + + +
                                                                +
                                                                +

                                                                results matching ""

                                                                +
                                                                  +
                                                                  +
                                                                  +

                                                                  No results matching ""

                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/GalleryItemDef.html b/documentation/directives/GalleryItemDef.html new file mode 100644 index 00000000..63efc0a6 --- /dev/null +++ b/documentation/directives/GalleryItemDef.html @@ -0,0 +1,424 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                  +
                                                                  + + +
                                                                  +
                                                                  + + + + + + + + + + + +
                                                                  +
                                                                  +

                                                                  +

                                                                  File

                                                                  +

                                                                  +

                                                                  + projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts +

                                                                  + + + + + +
                                                                  +

                                                                  Metadata

                                                                  + + + + + + + + + + +
                                                                  + +
                                                                  +

                                                                  Index

                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                  +
                                                                  Properties
                                                                  +
                                                                  + +
                                                                  +
                                                                  Methods
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +

                                                                  Constructor

                                                                  + + + + + + + + + + + + + +
                                                                  +constructor(templateRef: TemplateRef<GalleryItemContext<GalleryItemDef>>) +
                                                                  + +
                                                                  +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptional
                                                                  templateRef + TemplateRef<GalleryItemContext<GalleryItemDef>> + + No +
                                                                  +
                                                                  +
                                                                  +
                                                                  + + + + + +
                                                                  + +

                                                                  + Methods +

                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Static + ngTemplateContextGuard + + +
                                                                  + + ngTemplateContextGuard(directive: GalleryItemDef, context) +
                                                                  + +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptional
                                                                  directive + GalleryItemDef + + No +
                                                                  context + + No +
                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  + +
                                                                  +
                                                                  +
                                                                  +
                                                                  + +

                                                                  + Properties +

                                                                  + + + + + + + + + + + + + + +
                                                                  + + + Public + templateRef + + +
                                                                  + Type : TemplateRef<GalleryItemContext<GalleryItemDef>> + +
                                                                  + +
                                                                  +
                                                                  + + +
                                                                  + + +
                                                                  +
                                                                  import { Directive, TemplateRef } from '@angular/core';
                                                                  +import { GalleryItemData } from '../components/templates/items.model';
                                                                  +import { GalleryItemType } from '../models/constants';
                                                                  +
                                                                  +@Directive({
                                                                  +  standalone: true,
                                                                  +  selector: '[galleryItemDef]'
                                                                  +})
                                                                  +export class GalleryItemDef {
                                                                  +  constructor(public templateRef: TemplateRef<GalleryItemContext<GalleryItemDef>>) {
                                                                  +  }
                                                                  +
                                                                  +  // Make sure the template checker knows the type of the context with which the
                                                                  +  // template of this directive will be rendered
                                                                  +  static ngTemplateContextGuard(
                                                                  +    directive: GalleryItemDef,
                                                                  +    context: unknown
                                                                  +  ): context is GalleryItemContext<GalleryItemData> {
                                                                  +    return true;
                                                                  +  }
                                                                  +}
                                                                  +
                                                                  +export interface GalleryItemContext<T> {
                                                                  +  /** Data for the row that this cell is located within. */
                                                                  +  $implicit?: T;
                                                                  +
                                                                  +  /** Index of the item. */
                                                                  +  index?: number;
                                                                  +
                                                                  +  /** The type of the item. */
                                                                  +  type?: GalleryItemType;
                                                                  +
                                                                  +  /** True if this item is the active one. */
                                                                  +  active?: boolean;
                                                                  +
                                                                  +  /** The number of total items. */
                                                                  +  count?: number;
                                                                  +
                                                                  +  /** True if this item is first. */
                                                                  +  first?: boolean;
                                                                  +
                                                                  +  /** True if this item is last. */
                                                                  +  last?: boolean;
                                                                  +}
                                                                  +
                                                                  +
                                                                  + +
                                                                  + + + + + + + + + + + + + +
                                                                  +
                                                                  +

                                                                  results matching ""

                                                                  +
                                                                    +
                                                                    +
                                                                    +

                                                                    No results matching ""

                                                                    +
                                                                    +
                                                                    +
                                                                    + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/GalleryThumbDef.html b/documentation/directives/GalleryThumbDef.html new file mode 100644 index 00000000..05dfd17e --- /dev/null +++ b/documentation/directives/GalleryThumbDef.html @@ -0,0 +1,401 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    + + + + + + + + + + + +
                                                                    +
                                                                    +

                                                                    +

                                                                    File

                                                                    +

                                                                    +

                                                                    + projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts +

                                                                    + + + + + +
                                                                    +

                                                                    Metadata

                                                                    + + + + + + + + + + +
                                                                    + +
                                                                    +

                                                                    Index

                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                    +
                                                                    Properties
                                                                    +
                                                                    + +
                                                                    +
                                                                    Methods
                                                                    +
                                                                    + +
                                                                    +
                                                                    + +
                                                                    +

                                                                    Constructor

                                                                    + + + + + + + + + + + + + +
                                                                    +constructor(templateRef: TemplateRef<GalleryItemContext<ImageItemData>>) +
                                                                    + +
                                                                    +
                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                    NameTypeOptional
                                                                    templateRef + TemplateRef<GalleryItemContext<ImageItemData>> + + No +
                                                                    +
                                                                    +
                                                                    +
                                                                    + + + + + +
                                                                    + +

                                                                    + Methods +

                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                    + + + Static + ngTemplateContextGuard + + +
                                                                    + + ngTemplateContextGuard(directive: GalleryThumbDef, context) +
                                                                    + +
                                                                    + +
                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                    NameTypeOptional
                                                                    directive + GalleryThumbDef + + No +
                                                                    context + + No +
                                                                    +
                                                                    +
                                                                    +
                                                                    + +
                                                                    + +
                                                                    +
                                                                    +
                                                                    +
                                                                    + +

                                                                    + Properties +

                                                                    + + + + + + + + + + + + + + +
                                                                    + + + Public + templateRef + + +
                                                                    + Type : TemplateRef<GalleryItemContext<ImageItemData>> + +
                                                                    + +
                                                                    +
                                                                    + + +
                                                                    + + +
                                                                    +
                                                                    import { Directive, TemplateRef } from '@angular/core';
                                                                    +import { ImageItemData } from '../components/templates/items.model';
                                                                    +import { GalleryItemContext } from './gallery-item-def.directive';
                                                                    +
                                                                    +@Directive({
                                                                    +  standalone: true,
                                                                    +  selector: '[galleryThumbDef]'
                                                                    +})
                                                                    +export class GalleryThumbDef {
                                                                    +
                                                                    +  constructor(public templateRef: TemplateRef<GalleryItemContext<ImageItemData>>) {
                                                                    +  }
                                                                    +  // Make sure the template checker knows the type of the context with which the
                                                                    +  // template of this directive will be rendered
                                                                    +  static ngTemplateContextGuard(
                                                                    +    directive: GalleryThumbDef,
                                                                    +    context: unknown
                                                                    +  ): context is GalleryItemContext<ImageItemData> {
                                                                    +    return true;
                                                                    +  }
                                                                    +}
                                                                    +
                                                                    +
                                                                    + +
                                                                    + + + + + + + + + + + + + +
                                                                    +
                                                                    +

                                                                    results matching ""

                                                                    +
                                                                      +
                                                                      +
                                                                      +

                                                                      No results matching ""

                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/HammerSliding.html b/documentation/directives/HammerSliding.html new file mode 100644 index 00000000..d8280b20 --- /dev/null +++ b/documentation/directives/HammerSliding.html @@ -0,0 +1,1031 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                      +
                                                                      + + +
                                                                      +
                                                                      + + + + + + + + + + + +
                                                                      +
                                                                      +

                                                                      +

                                                                      File

                                                                      +

                                                                      +

                                                                      + projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts +

                                                                      + + + +

                                                                      +

                                                                      Implements

                                                                      +

                                                                      +

                                                                      + OnChanges + OnDestroy +

                                                                      + + +
                                                                      +

                                                                      Metadata

                                                                      + + + + + + + + + + +
                                                                      + +
                                                                      +

                                                                      Index

                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                      +
                                                                      Properties
                                                                      +
                                                                      + +
                                                                      +
                                                                      Methods
                                                                      +
                                                                      + +
                                                                      +
                                                                      Inputs
                                                                      +
                                                                      + +
                                                                      +
                                                                      Outputs
                                                                      +
                                                                      + +
                                                                      +
                                                                      Accessors
                                                                      +
                                                                      + +
                                                                      +
                                                                      + +
                                                                      +

                                                                      Constructor

                                                                      + + + + + + + + + + + + + +
                                                                      +constructor(_document: Document, _el: ElementRef, _platform: Platform, _zone: NgZone) +
                                                                      + +
                                                                      +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      _document + Document + + No +
                                                                      _el + ElementRef<HTMLElement> + + No +
                                                                      _platform + Platform + + No +
                                                                      _zone + NgZone + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +

                                                                      Inputs

                                                                      + + + + + + + + + + + + +
                                                                      + + adapter +
                                                                      + Type : SliderAdapter + +
                                                                      + +
                                                                      + + + + + + + + + + + + +
                                                                      + + config +
                                                                      + Type : GalleryConfig + +
                                                                      + +
                                                                      + + + + + + + + + + + + +
                                                                      + + galleryId +
                                                                      + Type : string + +
                                                                      + +
                                                                      + + + + + + + + + + + + +
                                                                      + + items +
                                                                      + Type : GalleryItemComponent[] | GalleryThumbComponent[] + +
                                                                      + +
                                                                      + + + + + + + + + + + + +
                                                                      + + state +
                                                                      + Type : GalleryState + +
                                                                      + +
                                                                      +
                                                                      +
                                                                      +

                                                                      Outputs

                                                                      + + + + + + + + + + + + +
                                                                      + + activeIndexChange +
                                                                      + Type : EventEmitter<number> + +
                                                                      + +
                                                                      + + + + + + + + + + + + +
                                                                      + + isSlidingChange +
                                                                      + Type : EventEmitter<boolean> + +
                                                                      + +
                                                                      +
                                                                      + + +
                                                                      + +

                                                                      + Methods +

                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + Private + _subscribe + + +
                                                                      + + _subscribe() +
                                                                      + +
                                                                      + +
                                                                      + Returns : void + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + Private + _unsubscribe + + +
                                                                      + + _unsubscribe() +
                                                                      + +
                                                                      + +
                                                                      + Returns : void + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + Private + getElementFromViewportCenter + + +
                                                                      + + getElementFromViewportCenter() +
                                                                      + +
                                                                      + +
                                                                      + Returns : Element + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + Private + getIndexOnMouseUp + + +
                                                                      + + getIndexOnMouseUp(e: any) +
                                                                      + +
                                                                      + +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      e + any + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + Returns : number + +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + ngOnChanges + + +
                                                                      +ngOnChanges(changes: SimpleChanges) +
                                                                      + +
                                                                      + +
                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                      NameTypeOptional
                                                                      changes + SimpleChanges + + No +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + Returns : void + +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                      + + + ngOnDestroy + + +
                                                                      +ngOnDestroy() +
                                                                      + +
                                                                      + +
                                                                      + Returns : void + +
                                                                      +
                                                                      +
                                                                      +
                                                                      + +

                                                                      + Properties +

                                                                      + + + + + + + + + + + + + + + + + +
                                                                      + + + Private + _hammer + + +
                                                                      + Type : any + +
                                                                      + +
                                                                      +

                                                                      HammerJS instance

                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +

                                                                      + Accessors +

                                                                      + + + + + + + + + + + + + + +
                                                                      + + _viewport +
                                                                      + get_viewport() +
                                                                      + +
                                                                      +
                                                                      + +
                                                                      + + +
                                                                      +
                                                                      import { Directive, Inject, Input, Output, OnChanges, OnDestroy, SimpleChanges, NgZone, ElementRef, EventEmitter } from '@angular/core';
                                                                      +import { DOCUMENT } from '@angular/common';
                                                                      +import { Platform } from '@angular/cdk/platform';
                                                                      +import { SliderAdapter } from '../components/adapters';
                                                                      +import { GalleryConfig } from '../models/config.model';
                                                                      +import { GalleryState } from '../models/gallery.model';
                                                                      +import { GalleryItemComponent } from '../components/gallery-item.component';
                                                                      +import { GalleryThumbComponent } from '../components/gallery-thumb.component';
                                                                      +
                                                                      +declare const Hammer: any;
                                                                      +
                                                                      +@Directive({
                                                                      +  selector: '[hammerSliding]',
                                                                      +  standalone: true
                                                                      +})
                                                                      +export class HammerSliding implements OnChanges, OnDestroy {
                                                                      +
                                                                      +  /** HammerJS instance */
                                                                      +  private _hammer: any;
                                                                      +
                                                                      +  get _viewport(): HTMLElement {
                                                                      +    return this._el.nativeElement;
                                                                      +  }
                                                                      +
                                                                      +  @Input() galleryId: string;
                                                                      +
                                                                      +  @Input() items: GalleryItemComponent[] | GalleryThumbComponent[];
                                                                      +
                                                                      +  @Input() adapter: SliderAdapter;
                                                                      +
                                                                      +  @Input() state: GalleryState;
                                                                      +
                                                                      +  @Input() config: GalleryConfig;
                                                                      +
                                                                      +  @Output() activeIndexChange: EventEmitter<number> = new EventEmitter<number>();
                                                                      +
                                                                      +  @Output() isSlidingChange: EventEmitter<boolean> = new EventEmitter<boolean>();
                                                                      +
                                                                      +  constructor(@Inject(DOCUMENT) private _document: Document,
                                                                      +              private _el: ElementRef<HTMLElement>,
                                                                      +              private _platform: Platform,
                                                                      +              private _zone: NgZone) {
                                                                      +  }
                                                                      +
                                                                      +
                                                                      +  ngOnChanges(changes: SimpleChanges): void {
                                                                      +    if (changes.config && changes.config.currentValue?.mouseSlidingDisabled !== changes.config.previousValue?.mouseSlidingDisabled) {
                                                                      +      changes.config.currentValue.mouseSlidingDisabled ? this._unsubscribe() : this._subscribe();
                                                                      +    }
                                                                      +    if (!changes.adapter?.firstChange && changes.adapter?.currentValue !== changes.adapter?.previousValue) {
                                                                      +      this._subscribe();
                                                                      +    }
                                                                      +  }
                                                                      +
                                                                      +  ngOnDestroy(): void {
                                                                      +    this._unsubscribe();
                                                                      +  }
                                                                      +
                                                                      +  private _subscribe(): void {
                                                                      +    this._unsubscribe();
                                                                      +
                                                                      +    if (!this._platform.ANDROID && !this._platform.IOS && typeof Hammer !== 'undefined') {
                                                                      +      this._zone.runOutsideAngular(() => {
                                                                      +
                                                                      +        const direction: number = this.adapter.hammerDirection;
                                                                      +        this._hammer = new Hammer(this._el.nativeElement, { inputClass: Hammer.MouseInput });
                                                                      +        this._hammer.get('pan').set({ direction });
                                                                      +
                                                                      +        let offset: number;
                                                                      +
                                                                      +        // Set panOffset for sliding on pan start event
                                                                      +        this._hammer.on('panstart', () => {
                                                                      +          this._zone.run(() => {
                                                                      +            this.isSlidingChange.emit(true);
                                                                      +          });
                                                                      +
                                                                      +          offset = this.adapter.scrollValue;
                                                                      +          this._viewport.classList.add('g-sliding');
                                                                      +          this._viewport.style.setProperty('--slider-scroll-snap-type', 'none');
                                                                      +        });
                                                                      +
                                                                      +        this._hammer.on('panmove', (e: any) => this._viewport.scrollTo(this.adapter.getHammerValue(offset, e, 'auto')));
                                                                      +
                                                                      +        this._hammer.on('panend', (e: any) => {
                                                                      +          this._document.onselectstart = null;
                                                                      +          this._viewport.classList.remove('g-sliding');
                                                                      +          const index: number = this.getIndexOnMouseUp(e);
                                                                      +
                                                                      +          this._zone.run(() => {
                                                                      +            this.isSlidingChange.emit(false);
                                                                      +            this.activeIndexChange.emit(index);
                                                                      +          });
                                                                      +        });
                                                                      +      });
                                                                      +    }
                                                                      +  }
                                                                      +
                                                                      +  private _unsubscribe(): void {
                                                                      +    this._hammer?.destroy();
                                                                      +  }
                                                                      +
                                                                      +  private getIndexOnMouseUp(e: any): number {
                                                                      +    // Check if scrolled item is great enough to navigate
                                                                      +    const currElement: Element = this.items[this.state.currIndex].nativeElement;
                                                                      +
                                                                      +    // Find the gallery item element in the center elements
                                                                      +    const elementAtCenter: Element = this.getElementFromViewportCenter();
                                                                      +
                                                                      +    // Check if center item can be taken from element using
                                                                      +    if (elementAtCenter && elementAtCenter !== currElement) {
                                                                      +      return +elementAtCenter.getAttribute('galleryIndex');
                                                                      +    }
                                                                      +
                                                                      +    const velocity: number = this.adapter.getHammerVelocity(e);
                                                                      +    // Check if velocity is great enough to navigate
                                                                      +    if (Math.abs(velocity) > 0.3) {
                                                                      +      return velocity > 0 ? this.state.currIndex - 1 : this.state.currIndex + 1;
                                                                      +    }
                                                                      +
                                                                      +    // Reset position to the current index
                                                                      +    return -1;
                                                                      +  }
                                                                      +
                                                                      +  private getElementFromViewportCenter(): Element {
                                                                      +    // Get slider position relative to the document
                                                                      +    const sliderRect: DOMRect = this._viewport.getBoundingClientRect();
                                                                      +    // Try look for the center item using `elementsFromPoint` function
                                                                      +    const centerElements: Element[] = this._document.elementsFromPoint(
                                                                      +      sliderRect.x + (sliderRect.width / 2),
                                                                      +      sliderRect.y + (sliderRect.height / 2)
                                                                      +    );
                                                                      +    // Find the gallery item element in the center elements
                                                                      +    return centerElements.find((element: Element) => {
                                                                      +      return element.getAttribute('galleryId') === this.galleryId;
                                                                      +    });
                                                                      +  }
                                                                      +}
                                                                      +
                                                                      +
                                                                      + +
                                                                      + + + + + + + + + + + + + +
                                                                      +
                                                                      +

                                                                      results matching ""

                                                                      +
                                                                        +
                                                                        +
                                                                        +

                                                                        No results matching ""

                                                                        +
                                                                        +
                                                                        +
                                                                        + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ImgRecognizer.html b/documentation/directives/ImgRecognizer.html new file mode 100644 index 00000000..d8bb51a4 --- /dev/null +++ b/documentation/directives/ImgRecognizer.html @@ -0,0 +1,608 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                        +
                                                                        + + +
                                                                        +
                                                                        + + + + + + + + + + + +
                                                                        +
                                                                        +

                                                                        +

                                                                        File

                                                                        +

                                                                        +

                                                                        + projects/ng-gallery/src/lib/utils/img-recognizer.ts +

                                                                        + + + +

                                                                        +

                                                                        Implements

                                                                        +

                                                                        +

                                                                        + OnInit + OnDestroy +

                                                                        + + +
                                                                        +

                                                                        Metadata

                                                                        + + + + + + + + + + +
                                                                        + +
                                                                        +

                                                                        Index

                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                        +
                                                                        Methods
                                                                        +
                                                                        + +
                                                                        +
                                                                        Inputs
                                                                        +
                                                                        + +
                                                                        +
                                                                        HostListeners
                                                                        +
                                                                        + +
                                                                        +
                                                                        + +
                                                                        +

                                                                        Constructor

                                                                        + + + + + + + + + + + + + +
                                                                        +constructor(el: ElementRef, manager: ImgManager, item: GalleryItemComponent) +
                                                                        + +
                                                                        +
                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                        NameTypeOptional
                                                                        el + ElementRef<HTMLImageElement> + + No +
                                                                        manager + ImgManager + + No +
                                                                        item + GalleryItemComponent + + No +
                                                                        +
                                                                        +
                                                                        +
                                                                        + +
                                                                        +

                                                                        Inputs

                                                                        + + + + + + + + + + + + +
                                                                        + + galleryImage +
                                                                        + Type : number + +
                                                                        + +
                                                                        +
                                                                        + + +
                                                                        +

                                                                        HostListeners

                                                                        + + + + + + + + + + + + + + + +
                                                                        + + + + error + + + +
                                                                        + Arguments : '$event' +
                                                                        + +
                                                                        + + + + + + + + + + + + + + + + +
                                                                        + + + + load + + + +
                                                                        + Arguments : '$event' +
                                                                        + +
                                                                        +
                                                                        +
                                                                        + +

                                                                        + Methods +

                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                        + + + ngOnDestroy + + +
                                                                        +ngOnDestroy() +
                                                                        + +
                                                                        + +
                                                                        + Returns : void + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                        + + + ngOnInit + + +
                                                                        +ngOnInit() +
                                                                        + +
                                                                        + +
                                                                        + Returns : void + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                        + + + onError + + +
                                                                        +onError() +
                                                                        + Decorators : +
                                                                        + @HostListener('error', ['$event'])
                                                                        +
                                                                        + +
                                                                        + +
                                                                        + Returns : void + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                        + + + onLoad + + +
                                                                        +onLoad() +
                                                                        + Decorators : +
                                                                        + @HostListener('load', ['$event'])
                                                                        +
                                                                        + +
                                                                        + +
                                                                        + Returns : void + +
                                                                        +
                                                                        +
                                                                        + + +
                                                                        + + +
                                                                        +
                                                                        import { Directive, Input, HostListener, OnInit, OnDestroy, ElementRef } from '@angular/core';
                                                                        +import { ImgManager } from './img-manager';
                                                                        +import { GalleryItemComponent } from '../components/gallery-item.component';
                                                                        +
                                                                        +@Directive({
                                                                        +  selector: 'img[galleryImage]',
                                                                        +  standalone: true
                                                                        +})
                                                                        +export class ImgRecognizer implements OnInit, OnDestroy {
                                                                        +
                                                                        +  @Input('galleryImage') index: number;
                                                                        +
                                                                        +  @HostListener('load', ['$event'])
                                                                        +  onLoad() {
                                                                        +    this.item.state$.next('success');
                                                                        +  }
                                                                        +
                                                                        +  @HostListener('error', ['$event'])
                                                                        +  onError() {
                                                                        +    this.item.state$.next('failed');
                                                                        +  }
                                                                        +
                                                                        +  constructor(private el: ElementRef<HTMLImageElement>, private manager: ImgManager, private item: GalleryItemComponent) {
                                                                        +    if (item) {
                                                                        +      // Mark the gallery-item component as an image item
                                                                        +      item.isItemContainImage = true;
                                                                        +    } else {
                                                                        +      throw new Error('[NgGallery]: galleryImage directive should be only used inside gallery item templates!')
                                                                        +    }
                                                                        +  }
                                                                        +
                                                                        +  ngOnInit(): void {
                                                                        +    this.manager.addItem(this.index, {
                                                                        +      state: this.item.state$.asObservable(),
                                                                        +      target: this.el.nativeElement
                                                                        +    });
                                                                        +  }
                                                                        +
                                                                        +  ngOnDestroy(): void {
                                                                        +    this.manager.deleteItem(this.index);
                                                                        +  }
                                                                        +}
                                                                        +
                                                                        +
                                                                        + +
                                                                        + + + + + + + + + + + + + +
                                                                        +
                                                                        +

                                                                        results matching ""

                                                                        +
                                                                          +
                                                                          +
                                                                          +

                                                                          No results matching ""

                                                                          +
                                                                          +
                                                                          +
                                                                          + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ItemIntersectionObserver.html b/documentation/directives/ItemIntersectionObserver.html new file mode 100644 index 00000000..8c3fca97 --- /dev/null +++ b/documentation/directives/ItemIntersectionObserver.html @@ -0,0 +1,755 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                          +
                                                                          + + +
                                                                          +
                                                                          + + + + + + + + + + + +
                                                                          +
                                                                          +

                                                                          +

                                                                          File

                                                                          +

                                                                          +

                                                                          + projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts +

                                                                          + + + +

                                                                          +

                                                                          Implements

                                                                          +

                                                                          +

                                                                          + OnChanges + OnDestroy +

                                                                          + + +
                                                                          +

                                                                          Metadata

                                                                          + + + + + + + + + + +
                                                                          + +
                                                                          +

                                                                          Index

                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                          +
                                                                          Properties
                                                                          +
                                                                          + +
                                                                          +
                                                                          Methods
                                                                          +
                                                                          + +
                                                                          +
                                                                          Inputs
                                                                          +
                                                                          + +
                                                                          +
                                                                          Outputs
                                                                          +
                                                                          + +
                                                                          +
                                                                          Accessors
                                                                          +
                                                                          + +
                                                                          +
                                                                          + +
                                                                          +

                                                                          Constructor

                                                                          + + + + + + + + + + + + + +
                                                                          +constructor(_zone: NgZone, _item: GalleryItemComponent) +
                                                                          + +
                                                                          +
                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                          NameTypeOptional
                                                                          _zone + NgZone + + No +
                                                                          _item + GalleryItemComponent + + No +
                                                                          +
                                                                          +
                                                                          +
                                                                          + +
                                                                          +

                                                                          Inputs

                                                                          + + + + + + + + + + + + +
                                                                          + + adapter +
                                                                          + Type : SliderAdapter + +
                                                                          + +
                                                                          + + + + + + + + + + + + +
                                                                          + + config +
                                                                          + Type : GalleryConfig + +
                                                                          + +
                                                                          + + + + + + + + + + + + +
                                                                          + + itemIntersectionObserverDisabled +
                                                                          + Type : boolean + +
                                                                          + +
                                                                          +
                                                                          +
                                                                          +

                                                                          Outputs

                                                                          + + + + + + + + + + + + +
                                                                          + + activeIndexChange +
                                                                          + Type : EventEmitter<number> + +
                                                                          + +
                                                                          +
                                                                          + + +
                                                                          + +

                                                                          + Methods +

                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                          + + + Private + _subscribe + + +
                                                                          + + _subscribe() +
                                                                          + +
                                                                          + +
                                                                          + Returns : void + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                          + + + Private + _unsubscribe + + +
                                                                          + + _unsubscribe() +
                                                                          + +
                                                                          + +
                                                                          + Returns : void + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                          + + + ngOnChanges + + +
                                                                          +ngOnChanges() +
                                                                          + +
                                                                          + +
                                                                          + Returns : void + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                          + + + ngOnDestroy + + +
                                                                          +ngOnDestroy() +
                                                                          + +
                                                                          + +
                                                                          + Returns : void + +
                                                                          +
                                                                          +
                                                                          +
                                                                          + +

                                                                          + Properties +

                                                                          + + + + + + + + + + + + + + +
                                                                          + + + Private + _currentSubscription + + +
                                                                          + Type : Subscription + +
                                                                          + +
                                                                          + + + + + + + + + + + + + + + + + +
                                                                          + + + Private + _sensor + + +
                                                                          + Type : ActiveItemObserver + +
                                                                          + Default value : new ActiveItemObserver() +
                                                                          + +
                                                                          +
                                                                          + +
                                                                          +

                                                                          + Accessors +

                                                                          + + + + + + + + + + + + + + +
                                                                          + + _viewport +
                                                                          + get_viewport() +
                                                                          + +
                                                                          +
                                                                          + +
                                                                          + + +
                                                                          +
                                                                          import { Directive, Input, Output, OnChanges, OnDestroy, NgZone, EventEmitter } from '@angular/core';
                                                                          +import { Subscription, combineLatest, filter, switchMap } from 'rxjs';
                                                                          +import { GalleryConfig } from '../models/config.model';
                                                                          +import { ActiveItemObserver } from './active-item-observer';
                                                                          +import { resizeObservable } from '../utils/resize-observer';
                                                                          +import { SliderAdapter } from '../components/adapters';
                                                                          +import { GalleryItemComponent } from '../components/gallery-item.component';
                                                                          +import { ItemState } from '../components/templates/items.model';
                                                                          +
                                                                          +@Directive({
                                                                          +  selector: '[itemIntersectionObserver]',
                                                                          +  standalone: true
                                                                          +})
                                                                          +export class ItemIntersectionObserver implements OnChanges, OnDestroy {
                                                                          +
                                                                          +  private _currentSubscription: Subscription;
                                                                          +
                                                                          +  private _sensor: ActiveItemObserver = new ActiveItemObserver();
                                                                          +
                                                                          +  private get _viewport(): HTMLElement {
                                                                          +    return this._item.nativeElement.parentElement.parentElement;
                                                                          +  }
                                                                          +
                                                                          +  @Input() adapter: SliderAdapter;
                                                                          +
                                                                          +  @Input() config: GalleryConfig;
                                                                          +
                                                                          +  @Input('itemIntersectionObserverDisabled') disabled: boolean;
                                                                          +
                                                                          +  @Output() activeIndexChange: EventEmitter<number> = new EventEmitter<number>();
                                                                          +
                                                                          +  constructor(private _zone: NgZone, private _item: GalleryItemComponent) {
                                                                          +  }
                                                                          +
                                                                          +  ngOnChanges(): void {
                                                                          +    (this.config.itemAutosize && !this.disabled) ? this._subscribe() : this._unsubscribe();
                                                                          +  }
                                                                          +
                                                                          +  ngOnDestroy(): void {
                                                                          +    this._unsubscribe();
                                                                          +  }
                                                                          +
                                                                          +  private _subscribe(): void {
                                                                          +    this._unsubscribe();
                                                                          +
                                                                          +    if (!!this.adapter) {
                                                                          +      this._zone.runOutsideAngular(() => {
                                                                          +        this._currentSubscription = combineLatest([
                                                                          +          resizeObservable(this._viewport),
                                                                          +          resizeObservable(this._item.nativeElement)
                                                                          +        ]).pipe(
                                                                          +          switchMap(() => this._item.state$),
                                                                          +          filter((state: ItemState) => state !== 'loading'),
                                                                          +          switchMap(() => {
                                                                          +            const rootMargin: string = this.adapter.getElementRootMargin(this._viewport, this._item.nativeElement);
                                                                          +            if (this.config.debug) {
                                                                          +              this._item.nativeElement.style.setProperty('--item-intersection-margin', `"VIEWPORT(${ this._viewport.clientWidth }x${ this._viewport.clientHeight }) ITEM(${ this._item.nativeElement.clientWidth }x${ this._item.nativeElement.clientHeight }) INTERSECTION(${ rootMargin })"`);
                                                                          +            }
                                                                          +
                                                                          +            return this._sensor.observe(
                                                                          +              this._viewport,
                                                                          +              [this._item.nativeElement],
                                                                          +              rootMargin
                                                                          +            );
                                                                          +          }
                                                                          +          )
                                                                          +        ).subscribe((index: number) => {
                                                                          +          this._zone.run(() => this.activeIndexChange.emit(index));
                                                                          +        });
                                                                          +      });
                                                                          +    }
                                                                          +  }
                                                                          +
                                                                          +  private _unsubscribe(): void {
                                                                          +    this._currentSubscription?.unsubscribe();
                                                                          +  }
                                                                          +}
                                                                          +
                                                                          +
                                                                          + +
                                                                          + + + + + + + + + + + + + +
                                                                          +
                                                                          +

                                                                          results matching ""

                                                                          +
                                                                            +
                                                                            +
                                                                            +

                                                                            No results matching ""

                                                                            +
                                                                            +
                                                                            +
                                                                            + +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/LightboxDirective.html b/documentation/directives/LightboxDirective.html new file mode 100644 index 00000000..61c959d7 --- /dev/null +++ b/documentation/directives/LightboxDirective.html @@ -0,0 +1,508 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                            +
                                                                            + + +
                                                                            +
                                                                            + + + + + + + + + + + +
                                                                            +
                                                                            +

                                                                            +

                                                                            File

                                                                            +

                                                                            +

                                                                            + projects/ng-gallery/lightbox/src/lightbox.directive.ts +

                                                                            + + + +

                                                                            +

                                                                            Implements

                                                                            +

                                                                            +

                                                                            + OnInit + OnDestroy +

                                                                            + + +
                                                                            +

                                                                            Metadata

                                                                            + + + + + + + + + + +
                                                                            + +
                                                                            +

                                                                            Index

                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                            +
                                                                            Properties
                                                                            +
                                                                            + +
                                                                            +
                                                                            Methods
                                                                            +
                                                                            + +
                                                                            +
                                                                            Inputs
                                                                            +
                                                                            + +
                                                                            +
                                                                            + +
                                                                            +

                                                                            Constructor

                                                                            + + + + + + + + + + + + + +
                                                                            +constructor(_lightbox: Lightbox, _el: ElementRef, _renderer: Renderer2) +
                                                                            + +
                                                                            +
                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                            NameTypeOptional
                                                                            _lightbox + Lightbox + + No +
                                                                            _el + ElementRef + + No +
                                                                            _renderer + Renderer2 + + No +
                                                                            +
                                                                            +
                                                                            +
                                                                            + +
                                                                            +

                                                                            Inputs

                                                                            + + + + + + + + + + + + + + + +
                                                                            + + gallery +
                                                                            + Type : string + +
                                                                            + Default value : 'root' +
                                                                            + +
                                                                            + + + + + + + + + + + + + + + +
                                                                            + + lightbox +
                                                                            + Type : number + +
                                                                            + Default value : 0 +
                                                                            + +
                                                                            +
                                                                            + + + +
                                                                            + +

                                                                            + Methods +

                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                            + + + ngOnDestroy + + +
                                                                            +ngOnDestroy() +
                                                                            + +
                                                                            + +
                                                                            + Returns : void + +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                            + + + ngOnInit + + +
                                                                            +ngOnInit() +
                                                                            + +
                                                                            + +
                                                                            + Returns : void + +
                                                                            +
                                                                            +
                                                                            +
                                                                            + +

                                                                            + Properties +

                                                                            + + + + + + + + + + + + + + + + + +
                                                                            + + + clickEvent + + +
                                                                            + Type : SubscriptionLike + +
                                                                            + Default value : Subscription.EMPTY +
                                                                            + +
                                                                            +
                                                                            + + +
                                                                            + + +
                                                                            +
                                                                            import { Directive, Input, ElementRef, OnInit, OnDestroy, Renderer2 } from '@angular/core';
                                                                            +import { fromEvent, tap, SubscriptionLike, Subscription } from 'rxjs';
                                                                            +import { Lightbox } from './lightbox.service';
                                                                            +
                                                                            +@Directive({
                                                                            +  selector: '[lightbox]',
                                                                            +  standalone: true
                                                                            +})
                                                                            +export class LightboxDirective implements OnInit, OnDestroy {
                                                                            +
                                                                            +  clickEvent: SubscriptionLike = Subscription.EMPTY;
                                                                            +
                                                                            +  @Input('lightbox') index = 0;
                                                                            +  @Input('gallery') id = 'root';
                                                                            +
                                                                            +  constructor(private _lightbox: Lightbox, private _el: ElementRef, private _renderer: Renderer2) {
                                                                            +  }
                                                                            +
                                                                            +  ngOnInit() {
                                                                            +    this._renderer.setStyle(this._el.nativeElement, 'cursor', 'pointer');
                                                                            +    this.clickEvent = fromEvent(this._el.nativeElement, 'click').pipe(
                                                                            +      tap(() => this._lightbox.open(this.index, this.id))
                                                                            +    ).subscribe();
                                                                            +  }
                                                                            +
                                                                            +  ngOnDestroy() {
                                                                            +    this.clickEvent.unsubscribe();
                                                                            +  }
                                                                            +}
                                                                            +
                                                                            +
                                                                            + +
                                                                            + + + + + + + + + + + + + +
                                                                            +
                                                                            +

                                                                            results matching ""

                                                                            +
                                                                              +
                                                                              +
                                                                              +

                                                                              No results matching ""

                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/SliderIntersectionObserver.html b/documentation/directives/SliderIntersectionObserver.html new file mode 100644 index 00000000..f7331230 --- /dev/null +++ b/documentation/directives/SliderIntersectionObserver.html @@ -0,0 +1,770 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                              +
                                                                              + + +
                                                                              +
                                                                              + + + + + + + + + + + +
                                                                              +
                                                                              +

                                                                              +

                                                                              File

                                                                              +

                                                                              +

                                                                              + projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts +

                                                                              + + + +

                                                                              +

                                                                              Implements

                                                                              +

                                                                              +

                                                                              + OnChanges + OnDestroy +

                                                                              + + +
                                                                              +

                                                                              Metadata

                                                                              + + + + + + + + + + +
                                                                              + +
                                                                              +

                                                                              Index

                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                              +
                                                                              Properties
                                                                              +
                                                                              + +
                                                                              +
                                                                              Methods
                                                                              +
                                                                              + +
                                                                              +
                                                                              Inputs
                                                                              +
                                                                              + +
                                                                              +
                                                                              Outputs
                                                                              +
                                                                              + +
                                                                              +
                                                                              Accessors
                                                                              +
                                                                              + +
                                                                              +
                                                                              + +
                                                                              +

                                                                              Constructor

                                                                              + + + + + + + + + + + + + +
                                                                              +constructor(_zone: NgZone, _el: ElementRef) +
                                                                              + +
                                                                              +
                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                              NameTypeOptional
                                                                              _zone + NgZone + + No +
                                                                              _el + ElementRef<HTMLElement> + + No +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +

                                                                              Inputs

                                                                              + + + + + + + + + + + + +
                                                                              + + adapter +
                                                                              + Type : SliderAdapter + +
                                                                              + +
                                                                              + + + + + + + + + + + + +
                                                                              + + config +
                                                                              + Type : GalleryConfig + +
                                                                              + +
                                                                              + + + + + + + + + + + + +
                                                                              + + items +
                                                                              + Type : GalleryItemComponent[] + +
                                                                              + +
                                                                              + + + + + + + + + + + + +
                                                                              + + sliderIntersectionObserverDisabled +
                                                                              + Type : boolean + +
                                                                              + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Outputs

                                                                              + + + + + + + + + + + + +
                                                                              + + activeIndexChange +
                                                                              + Type : EventEmitter<number> + +
                                                                              + +
                                                                              +
                                                                              + + +
                                                                              + +

                                                                              + Methods +

                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                              + + + Private + _subscribe + + +
                                                                              + + _subscribe() +
                                                                              + +
                                                                              + +
                                                                              + Returns : void + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                              + + + Private + _unsubscribe + + +
                                                                              + + _unsubscribe() +
                                                                              + +
                                                                              + +
                                                                              + Returns : void + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                              + + + ngOnChanges + + +
                                                                              +ngOnChanges() +
                                                                              + +
                                                                              + +
                                                                              + Returns : void + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                              + + + ngOnDestroy + + +
                                                                              +ngOnDestroy() +
                                                                              + +
                                                                              + +
                                                                              + Returns : void + +
                                                                              +
                                                                              +
                                                                              +
                                                                              + +

                                                                              + Properties +

                                                                              + + + + + + + + + + + + + + +
                                                                              + + + Private + _currentSubscription + + +
                                                                              + Type : Subscription + +
                                                                              + +
                                                                              + + + + + + + + + + + + + + + + + +
                                                                              + + + Private + _sensor + + +
                                                                              + Type : ActiveItemObserver + +
                                                                              + Default value : new ActiveItemObserver() +
                                                                              + +
                                                                              +
                                                                              + +
                                                                              +

                                                                              + Accessors +

                                                                              + + + + + + + + + + + + + + +
                                                                              + + _viewport +
                                                                              + get_viewport() +
                                                                              + +
                                                                              +
                                                                              + +
                                                                              + + +
                                                                              +
                                                                              import { Directive, Input, Output, OnChanges, OnDestroy, NgZone, ElementRef, EventEmitter } from '@angular/core';
                                                                              +import { skip, Subscription } from 'rxjs';
                                                                              +import { GalleryConfig } from '../models/config.model';
                                                                              +import { ActiveItemObserver } from './active-item-observer';
                                                                              +import { SliderAdapter } from '../components/adapters';
                                                                              +import { GalleryItemComponent } from '../components/gallery-item.component';
                                                                              +
                                                                              +@Directive({
                                                                              +  selector: '[sliderIntersectionObserver]',
                                                                              +  standalone: true
                                                                              +})
                                                                              +export class SliderIntersectionObserver implements OnChanges, OnDestroy {
                                                                              +
                                                                              +  private _currentSubscription: Subscription;
                                                                              +
                                                                              +  private _sensor: ActiveItemObserver = new ActiveItemObserver();
                                                                              +
                                                                              +  private get _viewport(): HTMLElement {
                                                                              +    return this._el.nativeElement;
                                                                              +  }
                                                                              +
                                                                              +  @Input() adapter: SliderAdapter;
                                                                              +
                                                                              +  @Input() items: GalleryItemComponent[];
                                                                              +
                                                                              +  @Input() config: GalleryConfig;
                                                                              +
                                                                              +  @Input('sliderIntersectionObserverDisabled') disabled: boolean;
                                                                              +
                                                                              +  @Output() activeIndexChange: EventEmitter<number> = new EventEmitter<number>();
                                                                              +
                                                                              +  constructor(private _zone: NgZone, private _el: ElementRef<HTMLElement>) {
                                                                              +  }
                                                                              +
                                                                              +  ngOnChanges(): void {
                                                                              +    (this.config.itemAutosize || this.disabled) ? this._unsubscribe() : this._subscribe();
                                                                              +  }
                                                                              +
                                                                              +  ngOnDestroy(): void {
                                                                              +    this._unsubscribe();
                                                                              +  }
                                                                              +
                                                                              +  private _subscribe(): void {
                                                                              +    this._unsubscribe();
                                                                              +
                                                                              +    if (!!this.adapter && !!this.items?.length) {
                                                                              +      const rootMargin: string = this.adapter.getRootMargin();
                                                                              +      if (this.config.debug) {
                                                                              +        this._viewport.style.setProperty('--intersection-margin', `"INTERSECTION(${ rootMargin })"`);
                                                                              +      }
                                                                              +
                                                                              +      this._zone.runOutsideAngular(() => {
                                                                              +        this._currentSubscription = this._sensor.observe(
                                                                              +          this._viewport,
                                                                              +          this.items.map((item: GalleryItemComponent) => item.nativeElement),
                                                                              +          rootMargin
                                                                              +        ).subscribe((index: number) => {
                                                                              +          console.log('⛩️', index)
                                                                              +          this._zone.run(() => this.activeIndexChange.emit(index));
                                                                              +        });
                                                                              +      });
                                                                              +    }
                                                                              +  }
                                                                              +
                                                                              +  private _unsubscribe(): void {
                                                                              +    this._currentSubscription?.unsubscribe();
                                                                              +  }
                                                                              +}
                                                                              +
                                                                              +
                                                                              + +
                                                                              + + + + + + + + + + + + + +
                                                                              +
                                                                              +

                                                                              results matching ""

                                                                              +
                                                                                +
                                                                                +
                                                                                +

                                                                                No results matching ""

                                                                                +
                                                                                +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/SliderResizeObserver.html b/documentation/directives/SliderResizeObserver.html new file mode 100644 index 00000000..4a7aeede --- /dev/null +++ b/documentation/directives/SliderResizeObserver.html @@ -0,0 +1,1383 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                +
                                                                                + + +
                                                                                +
                                                                                + + + + + + + + + + + +
                                                                                +
                                                                                +

                                                                                +

                                                                                File

                                                                                +

                                                                                +

                                                                                + projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts +

                                                                                + + + +

                                                                                +

                                                                                Implements

                                                                                +

                                                                                +

                                                                                + AfterViewChecked + OnChanges + OnInit + OnDestroy +

                                                                                + + +
                                                                                +

                                                                                Metadata

                                                                                + + + + + + + + + + +
                                                                                + +
                                                                                +

                                                                                Index

                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                +
                                                                                Properties
                                                                                +
                                                                                + +
                                                                                +
                                                                                Methods
                                                                                +
                                                                                + +
                                                                                +
                                                                                Inputs
                                                                                +
                                                                                + +
                                                                                +
                                                                                Outputs
                                                                                +
                                                                                + +
                                                                                +
                                                                                Accessors
                                                                                +
                                                                                + +
                                                                                +
                                                                                + +
                                                                                +

                                                                                Constructor

                                                                                + + + + + + + + + + + + + +
                                                                                +constructor(_el: ElementRef, _zone: NgZone, _gallery: Gallery, _imgManager: ImgManager) +
                                                                                + +
                                                                                +
                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                NameTypeOptional
                                                                                _el + ElementRef<HTMLElement> + + No +
                                                                                _zone + NgZone + + No +
                                                                                _gallery + Gallery + + No +
                                                                                _imgManager + ImgManager + + No +
                                                                                +
                                                                                +
                                                                                +
                                                                                + +
                                                                                +

                                                                                Inputs

                                                                                + + + + + + + + + + + + +
                                                                                + + adapter +
                                                                                + Type : SliderAdapter + +
                                                                                + +
                                                                                + + + + + + + + + + + + +
                                                                                + + config +
                                                                                + Type : GalleryConfig + +
                                                                                + +
                                                                                + + + + + + + + + + + + +
                                                                                + + galleryId +
                                                                                + Type : string + +
                                                                                + +
                                                                                +
                                                                                +
                                                                                +

                                                                                Outputs

                                                                                + + + + + + + + + + + + +
                                                                                + + isResizingChange +
                                                                                + Type : EventEmitter<boolean> + +
                                                                                + +
                                                                                +
                                                                                + + +
                                                                                + +

                                                                                + Methods +

                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + _subscribeAutoHeight + + +
                                                                                + + _subscribeAutoHeight() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + _unsubscribeAutoHeight + + +
                                                                                + + _unsubscribeAutoHeight() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + ngAfterViewChecked + + +
                                                                                +ngAfterViewChecked() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + ngOnChanges + + +
                                                                                +ngOnChanges() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + ngOnDestroy + + +
                                                                                +ngOnDestroy() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + ngOnInit + + +
                                                                                +ngOnInit() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + resetResizingState + + +
                                                                                + + resetResizingState(undefined: literal type) +
                                                                                + +
                                                                                + +
                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                NameTypeOptionalDefault value
                                                                                + literal type + + No + + {} +
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                + Returns : void + +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + setResizingState + + +
                                                                                + + setResizingState(undefined: literal type) +
                                                                                + +
                                                                                + +
                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                NameTypeOptionalDefault value
                                                                                + literal type + + No + + {} +
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                + Returns : void + +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + updateCentralizeCSSVariables + + +
                                                                                + + updateCentralizeCSSVariables() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                + + + Private + updateSliderSize + + +
                                                                                + + updateSliderSize() +
                                                                                + +
                                                                                + +
                                                                                + Returns : void + +
                                                                                +
                                                                                +
                                                                                +
                                                                                + +

                                                                                + Properties +

                                                                                + + + + + + + + + + + + + + +
                                                                                + + + Private + _afterHeightChanged$ + + +
                                                                                + Type : Observable<any> + +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + + Private + _autoHeightSubscription + + +
                                                                                + Type : Subscription + +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + + Private + _resizeObserver + + +
                                                                                + Type : ResizeObserver + +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + + Private + _resizeSubscription + + +
                                                                                + Type : Subscription + +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + + Private + _shouldSkip + + +
                                                                                + Type : boolean + +
                                                                                + +
                                                                                +
                                                                                + +
                                                                                +

                                                                                + Accessors +

                                                                                + + + + + + + + + + + + + + +
                                                                                + + _viewport +
                                                                                + get_viewport() +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + _galleryCore +
                                                                                + get_galleryCore() +
                                                                                + +
                                                                                + + + + + + + + + + + + + + +
                                                                                + + _isAutoHeight +
                                                                                + get_isAutoHeight() +
                                                                                + +
                                                                                +
                                                                                + +
                                                                                + + +
                                                                                +
                                                                                import {
                                                                                +  Directive,
                                                                                +  Input,
                                                                                +  Output,
                                                                                +  NgZone,
                                                                                +  ElementRef,
                                                                                +  AfterViewChecked,
                                                                                +  OnInit,
                                                                                +  OnChanges,
                                                                                +  OnDestroy,
                                                                                +  EventEmitter
                                                                                +} from '@angular/core';
                                                                                +import {
                                                                                +  Observable,
                                                                                +  Subscription,
                                                                                +  of,
                                                                                +  tap,
                                                                                +  take,
                                                                                +  filter,
                                                                                +  fromEvent,
                                                                                +  switchMap,
                                                                                +  debounceTime,
                                                                                +  firstValueFrom,
                                                                                +  distinctUntilChanged,
                                                                                +  EMPTY,
                                                                                +  animationFrameScheduler
                                                                                +} from 'rxjs';
                                                                                +import { ImgManager } from '../utils/img-manager';
                                                                                +import { resizeObservable } from '../utils/resize-observer';
                                                                                +import { SliderAdapter } from '../components/adapters';
                                                                                +import { Gallery } from '../services/gallery.service';
                                                                                +import { GalleryRef } from '../services/gallery-ref';
                                                                                +import { GalleryConfig } from '../models/config.model';
                                                                                +import { GalleryState } from 'ng-gallery';
                                                                                +
                                                                                +@Directive({
                                                                                +  selector: '[sliderResizeObserver]',
                                                                                +  standalone: true
                                                                                +})
                                                                                +export class SliderResizeObserver implements AfterViewChecked, OnChanges, OnInit, OnDestroy {
                                                                                +
                                                                                +  private _resizeObserver: ResizeObserver;
                                                                                +
                                                                                +  private _autoHeightSubscription: Subscription;
                                                                                +
                                                                                +  private _resizeSubscription: Subscription;
                                                                                +
                                                                                +  private _shouldSkip: boolean;
                                                                                +
                                                                                +  // Stream that emits after the transition to the new height is completed
                                                                                +  private _afterHeightChanged$: Observable<any>;
                                                                                +
                                                                                +  private get _viewport(): HTMLElement {
                                                                                +    return this._el.nativeElement;
                                                                                +  }
                                                                                +
                                                                                +  private get _galleryCore(): HTMLElement {
                                                                                +    return this._el.nativeElement.parentElement.parentElement.parentElement;
                                                                                +  }
                                                                                +
                                                                                +  private get _isAutoHeight(): boolean {
                                                                                +    return this.config.autoHeight &&
                                                                                +      !this.config.itemAutosize &&
                                                                                +      this.config.slidingDirection === 'horizontal' &&
                                                                                +      (this.config.thumbPosition === 'top' || this.config.thumbPosition === 'bottom');
                                                                                +  }
                                                                                +
                                                                                +  @Input() galleryId: string;
                                                                                +
                                                                                +  @Input() adapter: SliderAdapter;
                                                                                +
                                                                                +  @Input() config: GalleryConfig;
                                                                                +
                                                                                +  @Output() isResizingChange: EventEmitter<boolean> = new EventEmitter<boolean>();
                                                                                +
                                                                                +  constructor(private _el: ElementRef<HTMLElement>,
                                                                                +              private _zone: NgZone,
                                                                                +              private _gallery: Gallery,
                                                                                +              private _imgManager: ImgManager) {
                                                                                +  }
                                                                                +
                                                                                +  ngOnInit(): void {
                                                                                +    const galleryRef: GalleryRef = this._gallery.ref(this.galleryId);
                                                                                +
                                                                                +    // Check if height has transition for the auto-height feature
                                                                                +    const transitionDuration: string = getComputedStyle(this._viewport).getPropertyValue('transition-duration');
                                                                                +    if (parseFloat(transitionDuration) === 0) {
                                                                                +      this._afterHeightChanged$ = of(null);
                                                                                +    } else {
                                                                                +      this._afterHeightChanged$ = fromEvent(this._viewport, 'transitionend');
                                                                                +    }
                                                                                +
                                                                                +    this._zone.runOutsideAngular(() => {
                                                                                +
                                                                                +      // Detect if the size of the slider has changed detecting current index on scroll
                                                                                +      this._resizeSubscription = resizeObservable(this._viewport, (observer: ResizeObserver) => this._resizeObserver = observer).pipe(
                                                                                +        // Check if resize should skip due to re-observing the slider
                                                                                +        filter(() => !this._shouldSkip || !(this._shouldSkip = false)),
                                                                                +        // Immediately set visibility to hidden to avoid changing the active item caused by appearance of other items when size is expanded
                                                                                +        tap(() => this.setResizingState()),
                                                                                +        debounceTime(this.config.resizeDebounceTime, animationFrameScheduler),
                                                                                +        tap(async (entry: ResizeObserverEntry) => {
                                                                                +          // Update CSS variables with the proper values
                                                                                +          this.updateSliderSize();
                                                                                +
                                                                                +          if (this._isAutoHeight) {
                                                                                +            const img: HTMLImageElement = await firstValueFrom(this._imgManager.getActiveItem(galleryRef.state));
                                                                                +            // If img height is identical to the viewport height then skip
                                                                                +            if (img.height === this._viewport.clientHeight) {
                                                                                +              this.resetResizingState();
                                                                                +            } else {
                                                                                +              // Unobserve the slider while the height is being changed
                                                                                +              this.setResizingState({ unobserve: true });
                                                                                +              // Change the height
                                                                                +              this._galleryCore.style.setProperty('--slider-height', `${ img.height }px`);
                                                                                +              // Wait until height transition ends
                                                                                +              await firstValueFrom(this._afterHeightChanged$);
                                                                                +              this.resetResizingState({
                                                                                +                // Mark to skip first emit after re-observing the slider if height content rect height and client height are identical
                                                                                +                shouldSkip: entry.contentRect.height === this._viewport.clientHeight,
                                                                                +                observe: true
                                                                                +              });
                                                                                +            }
                                                                                +          } else {
                                                                                +            requestAnimationFrame(() => this.resetResizingState({ shouldSkip: true }));
                                                                                +          }
                                                                                +        })
                                                                                +      ).subscribe();
                                                                                +    });
                                                                                +  }
                                                                                +
                                                                                +  ngOnChanges(): void {
                                                                                +    this._isAutoHeight ? this._subscribeAutoHeight() : this._unsubscribeAutoHeight();
                                                                                +  }
                                                                                +
                                                                                +  ngOnDestroy(): void {
                                                                                +    this._resizeSubscription?.unsubscribe();
                                                                                +    this._unsubscribeAutoHeight();
                                                                                +  }
                                                                                +
                                                                                +  ngAfterViewChecked(): void {
                                                                                +    this.updateSliderSize();
                                                                                +  }
                                                                                +
                                                                                +  private updateSliderSize(): void {
                                                                                +    // Update slider width and height CSS variables
                                                                                +    this._galleryCore.style.setProperty('--slider-width', `${ this._viewport.clientWidth }px`);
                                                                                +
                                                                                +    // Only update height if auto-height is false, because when it's true, another function will take care of it
                                                                                +    if (!this.config.autoHeight) {
                                                                                +      this._galleryCore.style.setProperty('--slider-height', `${ this._viewport.clientHeight }px`);
                                                                                +    }
                                                                                +
                                                                                +    this.updateCentralizeCSSVariables();
                                                                                +  }
                                                                                +
                                                                                +  private updateCentralizeCSSVariables(): void {
                                                                                +    if (this.config.itemAutosize) {
                                                                                +      this._galleryCore.style.setProperty('--slider-centralize-start-size', `${ this.adapter.getCentralizerStartSize() }px`);
                                                                                +      this._galleryCore.style.setProperty('--slider-centralize-end-size', `${ this.adapter.getCentralizerEndSize() }px`);
                                                                                +    }
                                                                                +  }
                                                                                +
                                                                                +  private _subscribeAutoHeight(): void {
                                                                                +    this._unsubscribeAutoHeight();
                                                                                +
                                                                                +    this._shouldSkip = false;
                                                                                +    this._zone.runOutsideAngular(() => {
                                                                                +
                                                                                +      const galleryRef: GalleryRef = this._gallery.ref(this.galleryId);
                                                                                +
                                                                                +      // TODO: Why is galleryRef.state emits when screen size changes?
                                                                                +      const state: Observable<GalleryState> = galleryRef.state.pipe(distinctUntilChanged((a: GalleryState, b: GalleryState) => a.currIndex === b.currIndex))
                                                                                +      this._autoHeightSubscription = this._imgManager.getActiveItem(state).pipe(
                                                                                +        switchMap((img: HTMLImageElement) => {
                                                                                +          this.setResizingState({ unobserve: true });
                                                                                +          this._galleryCore.style.setProperty('--slider-height', `${ img.clientHeight }px`);
                                                                                +
                                                                                +          // Check if the new item height is equal to the current height, there will be no transition,
                                                                                +          // So reset resizing state
                                                                                +          if (img.height === this._viewport.clientHeight) {
                                                                                +            this.resetResizingState({ shouldSkip: true, observe: true });
                                                                                +            return EMPTY;
                                                                                +          }
                                                                                +          return this._afterHeightChanged$.pipe(
                                                                                +            tap(() => this.resetResizingState({ shouldSkip: true, observe: true })),
                                                                                +            take(1)
                                                                                +          );
                                                                                +        })
                                                                                +      ).subscribe();
                                                                                +    });
                                                                                +  }
                                                                                +
                                                                                +  private _unsubscribeAutoHeight(): void {
                                                                                +    this._autoHeightSubscription?.unsubscribe();
                                                                                +  }
                                                                                +
                                                                                +  private setResizingState({ unobserve }: { unobserve?: boolean } = {}): void {
                                                                                +    this._zone.run(() => {
                                                                                +      this.isResizingChange.emit(true);
                                                                                +    })
                                                                                +    this._viewport.classList.add('g-resizing');
                                                                                +    if (unobserve) {
                                                                                +      // Unobserve the slider while the height is being changed
                                                                                +      this._resizeObserver.unobserve(this._viewport);
                                                                                +    }
                                                                                +  }
                                                                                +
                                                                                +  private resetResizingState({ shouldSkip, observe }: { shouldSkip?: boolean, observe?: boolean } = {}): void {
                                                                                +    this._zone.run(() => {
                                                                                +      this.isResizingChange.emit(false);
                                                                                +    })
                                                                                +    this._viewport.classList.remove('g-resizing');
                                                                                +    this._shouldSkip = shouldSkip;
                                                                                +    if (observe) {
                                                                                +      this._resizeObserver.observe(this._viewport);
                                                                                +    }
                                                                                +  }
                                                                                +}
                                                                                +
                                                                                +
                                                                                + +
                                                                                + + + + + + + + + + + + + +
                                                                                +
                                                                                +

                                                                                results matching ""

                                                                                +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  No results matching ""

                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/SmoothScroll.html b/documentation/directives/SmoothScroll.html new file mode 100644 index 00000000..2f45bc44 --- /dev/null +++ b/documentation/directives/SmoothScroll.html @@ -0,0 +1,1675 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                  +
                                                                                  + + +
                                                                                  +
                                                                                  + + + + + + + + + + + +
                                                                                  +
                                                                                  +

                                                                                  +

                                                                                  File

                                                                                  +

                                                                                  +

                                                                                  + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts +

                                                                                  + + + +

                                                                                  +

                                                                                  Implements

                                                                                  +

                                                                                  +

                                                                                  + OnDestroy +

                                                                                  + + +
                                                                                  +

                                                                                  Metadata

                                                                                  + + + + + + + + + + + + + + +
                                                                                  + +
                                                                                  +

                                                                                  Index

                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                  +
                                                                                  Properties
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  Methods
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  Inputs
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  Outputs
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  Accessors
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + +
                                                                                  +

                                                                                  Constructor

                                                                                  + + + + + + + + + + + + + +
                                                                                  +constructor(_document: Document, customDefaultOptions: SmoothScrollToOptions, _zone: NgZone, _dir: Dir, _el: ElementRef) +
                                                                                  + +
                                                                                  +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  _document + Document + + No +
                                                                                  customDefaultOptions + SmoothScrollToOptions + + No +
                                                                                  _zone + NgZone + + No +
                                                                                  _dir + Dir + + No +
                                                                                  _el + ElementRef<HTMLElement> + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  +

                                                                                  Inputs

                                                                                  + + + + + + + + + + + + +
                                                                                  + + adapter +
                                                                                  + Type : SliderAdapter + +
                                                                                  + +
                                                                                  + + + + + + + + + +
                                                                                  + + smoothScroll +
                                                                                  + +
                                                                                  + + + + + + + + + + + + +
                                                                                  + + smoothScrollInterruptOnMousemove +
                                                                                  + Type : boolean + +
                                                                                  + +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  Outputs

                                                                                  + + + + + + + + + + + + +
                                                                                  + + isScrollingChange +
                                                                                  + Type : EventEmitter<boolean> + +
                                                                                  + +
                                                                                  +
                                                                                  + + +
                                                                                  + +

                                                                                  + Methods +

                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _applyScrollToOptions + + +
                                                                                  + + _applyScrollToOptions(options: SmoothScrollToOptions) +
                                                                                  + +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  options + SmoothScrollToOptions + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _interrupted + + +
                                                                                  + + _interrupted() +
                                                                                  + +
                                                                                  +

                                                                                  Terminates an ongoing smooth scroll

                                                                                  +
                                                                                  + +
                                                                                  + Returns : Observable<Event | void> + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _isFinished + + +
                                                                                  + + _isFinished(context: SmoothScrollStep) +
                                                                                  + +
                                                                                  +

                                                                                  Checks if smooth scroll has reached, cleans up the smooth scroll stream and resolves its promise

                                                                                  +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  context + SmoothScrollStep + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + Returns : boolean + +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _scrollElement + + +
                                                                                  + + _scrollElement(x: number, y: number) +
                                                                                  + +
                                                                                  +

                                                                                  changes scroll position inside an element

                                                                                  +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  x + number + + No +
                                                                                  y + number + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _step + + +
                                                                                  + + _step(context: SmoothScrollStep) +
                                                                                  + +
                                                                                  +

                                                                                  A function called recursively that, given a context, steps through scrolling

                                                                                  +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  context + SmoothScrollStep + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + ngOnDestroy + + +
                                                                                  +ngOnDestroy() +
                                                                                  + +
                                                                                  + +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + ngOnInit + + +
                                                                                  +ngOnInit() +
                                                                                  + +
                                                                                  + +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + resetElement + + +
                                                                                  + + resetElement() +
                                                                                  + +
                                                                                  + +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                  + + + scrollTo + + +
                                                                                  +scrollTo(customOptions: SmoothScrollToOptions) +
                                                                                  + +
                                                                                  +

                                                                                  Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo +method, since browsers are not consistent about what scrollLeft means in RTL. For this method +left and right always refer to the left and right side of the scrolling container irrespective +of the layout direction. start and end refer to left and right in an LTR context and vice-versa +in an RTL context.

                                                                                  +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptionalDescription
                                                                                  customOptions + SmoothScrollToOptions + + No + +

                                                                                  specified the offsets to scroll to.

                                                                                  + +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +

                                                                                  + Properties +

                                                                                  + + + + + + + + + + + + + + +
                                                                                  + + + Private + Readonly + _defaultOptions + + +
                                                                                  + Type : SmoothScrollToOptions + +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + +
                                                                                  + + + Private + Readonly + _el + + +
                                                                                  + Type : HTMLElement + +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + Readonly + _finished + + +
                                                                                  + Type : Subject<void> + +
                                                                                  + Default value : new Subject<void>() +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + _hammer + + +
                                                                                  + Type : any + +
                                                                                  + +
                                                                                  +

                                                                                  HammerJS instance

                                                                                  +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + +
                                                                                  + + + Private + _isInterruptedByMouse + + +
                                                                                  + Type : boolean + +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  + + + Private + Readonly + _scrollController + + +
                                                                                  + Type : Subject<SmoothScrollStep> + +
                                                                                  + Default value : new Subject<SmoothScrollStep>() +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + +
                                                                                  + + + Private + _subscription + + +
                                                                                  + Type : Subscription + +
                                                                                  + +
                                                                                  +
                                                                                  + +
                                                                                  +

                                                                                  + Accessors +

                                                                                  + + + + + + + + + + + + + + +
                                                                                  + + _w +
                                                                                  + get_w() +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  + + _now +
                                                                                  + get_now() +
                                                                                  + +
                                                                                  +

                                                                                  Timing method

                                                                                  +
                                                                                  + +
                                                                                  + Returns : number + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  + + smoothScroll +
                                                                                  + setsmoothScroll(value: SmoothScrollToOptions) +
                                                                                  + +
                                                                                  + +
                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                  NameTypeOptional
                                                                                  value + SmoothScrollToOptions + + No +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + Returns : void + +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  + + +
                                                                                  +
                                                                                  import {
                                                                                  +  Directive,
                                                                                  +  Inject,
                                                                                  +  Input,
                                                                                  +  Output,
                                                                                  +  Optional,
                                                                                  +  NgZone,
                                                                                  +  OnDestroy,
                                                                                  +  ElementRef,
                                                                                  +  EventEmitter
                                                                                  +} from '@angular/core';
                                                                                  +import { SMOOTH_SCROLL_OPTIONS, SmoothScrollStep, SmoothScrollToOptions } from './index';
                                                                                  +import { DOCUMENT } from '@angular/common';
                                                                                  +import { Dir } from '@angular/cdk/bidi';
                                                                                  +import { _Bottom, _Left, _Right, _Top, _Without } from '@angular/cdk/scrolling';
                                                                                  +import { getRtlScrollAxisType, RtlScrollAxisType } from '@angular/cdk/platform';
                                                                                  +import {
                                                                                  +  Observable,
                                                                                  +  Subject,
                                                                                  +  Subscriber,
                                                                                  +  Subscription,
                                                                                  +  of,
                                                                                  +  take,
                                                                                  +  merge,
                                                                                  +  expand,
                                                                                  +  fromEvent,
                                                                                  +  switchMap,
                                                                                  +  takeUntil,
                                                                                  +  takeWhile,
                                                                                  +  finalize
                                                                                  +} from 'rxjs';
                                                                                  +import BezierEasing from './bezier-easing';
                                                                                  +import { SliderAdapter } from '../components/adapters';
                                                                                  +
                                                                                  +declare const Hammer: any;
                                                                                  +
                                                                                  +@Directive({
                                                                                  +  selector: '[smoothScroll]',
                                                                                  +  standalone: true,
                                                                                  +  providers: [Dir]
                                                                                  +})
                                                                                  +export class SmoothScroll implements OnDestroy {
                                                                                  +
                                                                                  +  /** HammerJS instance */
                                                                                  +  private _hammer: any;
                                                                                  +
                                                                                  +  // Default options
                                                                                  +  private readonly _defaultOptions: SmoothScrollToOptions;
                                                                                  +
                                                                                  +  private readonly _scrollController: Subject<SmoothScrollStep> = new Subject<SmoothScrollStep>();
                                                                                  +
                                                                                  +  private readonly _finished: Subject<void> = new Subject<void>();
                                                                                  +
                                                                                  +  private readonly _el: HTMLElement;
                                                                                  +
                                                                                  +  private _isInterruptedByMouse: boolean;
                                                                                  +
                                                                                  +  private _subscription: Subscription;
                                                                                  +
                                                                                  +  private get _w(): Window {
                                                                                  +    return this._document.defaultView;
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * Timing method
                                                                                  +   */
                                                                                  +  private get _now(): () => number {
                                                                                  +    return this._w.performance?.now?.bind(this._w.performance) || Date.now;
                                                                                  +  }
                                                                                  +
                                                                                  +  @Input()
                                                                                  +  set smoothScroll(value: SmoothScrollToOptions) {
                                                                                  +    if (value) {
                                                                                  +      this._zone.runOutsideAngular(() => {
                                                                                  +        this.scrollTo(value);
                                                                                  +      });
                                                                                  +    }
                                                                                  +  }
                                                                                  +
                                                                                  +  @Input() adapter: SliderAdapter;
                                                                                  +
                                                                                  +  @Input('smoothScrollInterruptOnMousemove') interruptOnMousemove: boolean;
                                                                                  +
                                                                                  +  @Output() isScrollingChange: EventEmitter<boolean> = new EventEmitter<boolean>();
                                                                                  +
                                                                                  +  constructor(@Inject(DOCUMENT) private _document: Document,
                                                                                  +              @Optional() @Inject(SMOOTH_SCROLL_OPTIONS) customDefaultOptions: SmoothScrollToOptions,
                                                                                  +              private _zone: NgZone,
                                                                                  +              private _dir: Dir,
                                                                                  +              _el: ElementRef<HTMLElement>) {
                                                                                  +    this._el = _el.nativeElement;
                                                                                  +    this._defaultOptions = {
                                                                                  +      duration: 468,
                                                                                  +      easing: {
                                                                                  +        x1: 0.42,
                                                                                  +        y1: 0,
                                                                                  +        x2: 0.58,
                                                                                  +        y2: 1
                                                                                  +      },
                                                                                  +      ...customDefaultOptions,
                                                                                  +    };
                                                                                  +  }
                                                                                  +
                                                                                  +  ngOnInit(): void {
                                                                                  +    this._subscription = this._scrollController.pipe(
                                                                                  +      switchMap((context: SmoothScrollStep) => {
                                                                                  +        this._zone.run(() => {
                                                                                  +          this.isScrollingChange.emit(true);
                                                                                  +        });
                                                                                  +
                                                                                  +        this._el.classList.add('g-scrolling');
                                                                                  +        this._el.style.setProperty('--slider-scroll-snap-type', 'none');
                                                                                  +
                                                                                  +        // Scroll each step recursively
                                                                                  +        return of(null).pipe(
                                                                                  +          expand(() => this._step(context).pipe(
                                                                                  +            takeWhile((currContext: SmoothScrollStep) => this._isFinished(currContext)),
                                                                                  +            takeUntil(this._finished)
                                                                                  +          )),
                                                                                  +          finalize(() => this.resetElement()),
                                                                                  +          takeUntil(this._interrupted()),
                                                                                  +        );
                                                                                  +      })
                                                                                  +    ).subscribe();
                                                                                  +  }
                                                                                  +
                                                                                  +  ngOnDestroy(): void {
                                                                                  +    this._subscription?.unsubscribe();
                                                                                  +    this._scrollController.complete();
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * changes scroll position inside an element
                                                                                  +   */
                                                                                  +  private _scrollElement(x: number, y: number): void {
                                                                                  +    this._el.scrollLeft = x;
                                                                                  +    this._el.scrollTop = y;
                                                                                  +  }
                                                                                  +
                                                                                  +  private resetElement(): void {
                                                                                  +    this._zone.run(() => {
                                                                                  +      this.isScrollingChange.emit(false);
                                                                                  +    });
                                                                                  +
                                                                                  +    this._el.classList.remove('g-scrolling');
                                                                                  +    if (!this._isInterruptedByMouse) {
                                                                                  +      this._el.style.setProperty('--slider-scroll-snap-type', this.adapter.scrollSnapType);
                                                                                  +    }
                                                                                  +    this._isInterruptedByMouse = false;
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * Checks if smooth scroll has reached, cleans up the smooth scroll stream and resolves its promise
                                                                                  +   */
                                                                                  +  private _isFinished(context: SmoothScrollStep): boolean {
                                                                                  +    if (context.currentX !== context.x || context.currentY !== context.y) {
                                                                                  +      return true;
                                                                                  +    }
                                                                                  +    this._finished.next();
                                                                                  +    return false;
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * Terminates an ongoing smooth scroll
                                                                                  +   */
                                                                                  +  private _interrupted(): Observable<Event | void> {
                                                                                  +    let interrupt$: Observable<Event | void>;
                                                                                  +    if (this.interruptOnMousemove && typeof Hammer !== 'undefined') {
                                                                                  +      this._hammer = new Hammer(this._el, { inputClass: Hammer.MouseInput });
                                                                                  +      this._hammer.get('pan').set({ direction: this.adapter.hammerDirection });
                                                                                  +
                                                                                  +      // For gallery thumb slider, dragging thumbnails should cancel the ongoing scroll
                                                                                  +      interrupt$ = merge(
                                                                                  +        new Observable<void>((subscriber: Subscriber<void>) => {
                                                                                  +          this._hammer.on('panstart', () => {
                                                                                  +            this._isInterruptedByMouse = true;
                                                                                  +            subscriber.next();
                                                                                  +            subscriber.complete();
                                                                                  +          });
                                                                                  +          return () => {
                                                                                  +            this._hammer.destroy();
                                                                                  +          }
                                                                                  +        }),
                                                                                  +        fromEvent(this._el, 'wheel', { passive: true, capture: true }),
                                                                                  +        fromEvent(this._el, 'touchmove', { passive: true, capture: true }),
                                                                                  +      )
                                                                                  +    } else {
                                                                                  +      interrupt$ = merge(
                                                                                  +        fromEvent(this._el, 'wheel', { passive: true, capture: true }),
                                                                                  +        fromEvent(this._el, 'touchmove', { passive: true, capture: true }),
                                                                                  +      )
                                                                                  +    }
                                                                                  +    return interrupt$.pipe(take(1));
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * A function called recursively that, given a context, steps through scrolling
                                                                                  +   */
                                                                                  +  private _step(context: SmoothScrollStep): Observable<SmoothScrollStep> {
                                                                                  +    return new Observable((subscriber: Subscriber<SmoothScrollStep>) => {
                                                                                  +      let elapsed: number = (this._now() - context.startTime) / context.duration;
                                                                                  +
                                                                                  +      // avoid elapsed times higher than one
                                                                                  +      elapsed = elapsed > 1 ? 1 : elapsed;
                                                                                  +
                                                                                  +      // apply easing to elapsed time
                                                                                  +      const value: number = context.easing(elapsed);
                                                                                  +
                                                                                  +      context.currentX = context.startX + (context.x - context.startX) * value;
                                                                                  +      context.currentY = context.startY + (context.y - context.startY) * value;
                                                                                  +
                                                                                  +      this._scrollElement(context.currentX, context.currentY);
                                                                                  +      // Proceed to the step
                                                                                  +      requestAnimationFrame(() => {
                                                                                  +        subscriber.next(context);
                                                                                  +        subscriber.complete();
                                                                                  +      });
                                                                                  +    });
                                                                                  +  }
                                                                                  +
                                                                                  +  private _applyScrollToOptions(options: SmoothScrollToOptions): void {
                                                                                  +    if (!options.duration) {
                                                                                  +      this._scrollElement(options.left, options.top);
                                                                                  +    }
                                                                                  +
                                                                                  +    const context: SmoothScrollStep = {
                                                                                  +      scrollable: this._el,
                                                                                  +      startTime: this._now(),
                                                                                  +      startX: this._el.scrollLeft,
                                                                                  +      startY: this._el.scrollTop,
                                                                                  +      x: options.left == null ? this._el.scrollLeft : ~~options.left,
                                                                                  +      y: options.top == null ? this._el.scrollTop : ~~options.top,
                                                                                  +      duration: options.duration,
                                                                                  +      easing: BezierEasing(options.easing.x1, options.easing.y1, options.easing.x2, options.easing.y2)
                                                                                  +    };
                                                                                  +
                                                                                  +    this._scrollController.next(context);
                                                                                  +  }
                                                                                  +
                                                                                  +  /**
                                                                                  +   * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo
                                                                                  +   * method, since browsers are not consistent about what scrollLeft means in RTL. For this method
                                                                                  +   * left and right always refer to the left and right side of the scrolling container irrespective
                                                                                  +   * of the layout direction. start and end refer to left and right in an LTR context and vice-versa
                                                                                  +   * in an RTL context.
                                                                                  +   * @param customOptions specified the offsets to scroll to.
                                                                                  +   */
                                                                                  +  scrollTo(customOptions: SmoothScrollToOptions): void {
                                                                                  +    const isRtl: boolean = this._dir.value === 'rtl';
                                                                                  +    const rtlScrollAxisType: RtlScrollAxisType = getRtlScrollAxisType();
                                                                                  +
                                                                                  +    const options: SmoothScrollToOptions = {
                                                                                  +      ...(this._defaultOptions as _Without<_Bottom & _Top>),
                                                                                  +      ...customOptions,
                                                                                  +      ...({
                                                                                  +        // Rewrite start & end offsets as right or left offsets.
                                                                                  +        left: customOptions.left == null ? (isRtl ? customOptions.end : customOptions.start) : customOptions.left,
                                                                                  +        right: customOptions.right == null ? (isRtl ? customOptions.start : customOptions.end) : customOptions.right
                                                                                  +      } as _Without<_Bottom & _Top>)
                                                                                  +    };
                                                                                  +
                                                                                  +    // Rewrite the bottom offset as a top offset.
                                                                                  +    if (options.bottom != null) {
                                                                                  +      (options as _Without<_Bottom> & _Top).top = this._el.scrollHeight - this._el.clientHeight - options.bottom;
                                                                                  +    }
                                                                                  +
                                                                                  +    // Rewrite the right offset as a left offset.
                                                                                  +    if (isRtl && rtlScrollAxisType !== RtlScrollAxisType.NORMAL) {
                                                                                  +      if (options.left != null) {
                                                                                  +        (options as _Without<_Left> & _Right).right = this._el.scrollWidth - this._el.clientWidth - options.left;
                                                                                  +      }
                                                                                  +
                                                                                  +      if (rtlScrollAxisType === RtlScrollAxisType.INVERTED) {
                                                                                  +        options.left = options.right;
                                                                                  +      } else if (rtlScrollAxisType === RtlScrollAxisType.NEGATED) {
                                                                                  +        options.left = options.right ? -options.right : options.right;
                                                                                  +      }
                                                                                  +    } else {
                                                                                  +      if (options.right != null) {
                                                                                  +        (options as _Without<_Right> & _Left).left = this._el.scrollWidth - this._el.clientWidth - options.right;
                                                                                  +      }
                                                                                  +    }
                                                                                  +    return this._applyScrollToOptions(options);
                                                                                  +  }
                                                                                  +}
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  + + + + + + + + + + + + + +
                                                                                  +
                                                                                  +

                                                                                  results matching ""

                                                                                  +
                                                                                    +
                                                                                    +
                                                                                    +

                                                                                    No results matching ""

                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ThumbResizeObserver.html b/documentation/directives/ThumbResizeObserver.html new file mode 100644 index 00000000..74d3564a --- /dev/null +++ b/documentation/directives/ThumbResizeObserver.html @@ -0,0 +1,713 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                    +
                                                                                    + + +
                                                                                    +
                                                                                    + + + + + + + + + + + +
                                                                                    +
                                                                                    +

                                                                                    +

                                                                                    File

                                                                                    +

                                                                                    +

                                                                                    + projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts +

                                                                                    + + + +

                                                                                    +

                                                                                    Implements

                                                                                    +

                                                                                    +

                                                                                    + OnChanges + OnInit + OnDestroy +

                                                                                    + + +
                                                                                    +

                                                                                    Metadata

                                                                                    + + + + + + + + + + +
                                                                                    + +
                                                                                    +

                                                                                    Index

                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                    +
                                                                                    Properties
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    Methods
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    Inputs
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    Outputs
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    Accessors
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +

                                                                                    Constructor

                                                                                    + + + + + + + + + + + + + +
                                                                                    +constructor(_el: ElementRef, _zone: NgZone) +
                                                                                    + +
                                                                                    +
                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                    NameTypeOptional
                                                                                    _el + ElementRef<HTMLElement> + + No +
                                                                                    _zone + NgZone + + No +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +

                                                                                    Inputs

                                                                                    + + + + + + + + + + + + +
                                                                                    + + adapter +
                                                                                    + Type : SliderAdapter + +
                                                                                    + +
                                                                                    + + + + + + + + + + + + +
                                                                                    + + config +
                                                                                    + Type : GalleryConfig + +
                                                                                    + +
                                                                                    +
                                                                                    +
                                                                                    +

                                                                                    Outputs

                                                                                    + + + + + + + + + + + + +
                                                                                    + + thumbResizeObserver +
                                                                                    + Type : EventEmitter<void> + +
                                                                                    + +
                                                                                    +
                                                                                    + + +
                                                                                    + +

                                                                                    + Methods +

                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                    + + + ngOnChanges + + +
                                                                                    +ngOnChanges(changes: SimpleChanges) +
                                                                                    + +
                                                                                    + +
                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                    NameTypeOptional
                                                                                    changes + SimpleChanges + + No +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + Returns : void + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                    + + + ngOnDestroy + + +
                                                                                    +ngOnDestroy() +
                                                                                    + +
                                                                                    + +
                                                                                    + Returns : void + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                    + + + ngOnInit + + +
                                                                                    +ngOnInit() +
                                                                                    + +
                                                                                    + +
                                                                                    + Returns : void + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                    + + + Private + updateSliderSize + + +
                                                                                    + + updateSliderSize() +
                                                                                    + +
                                                                                    + +
                                                                                    + Returns : void + +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +

                                                                                    + Properties +

                                                                                    + + + + + + + + + + + + + + +
                                                                                    + + + Private + _resizeSubscription + + +
                                                                                    + Type : Subscription + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +

                                                                                    + Accessors +

                                                                                    + + + + + + + + + + + + + + +
                                                                                    + + _viewport +
                                                                                    + get_viewport() +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    + + +
                                                                                    +
                                                                                    import {
                                                                                    +  Directive,
                                                                                    +  Input,
                                                                                    +  Output,
                                                                                    +  OnInit,
                                                                                    +  OnChanges,
                                                                                    +  OnDestroy,
                                                                                    +  NgZone,
                                                                                    +  ElementRef,
                                                                                    +  SimpleChanges,
                                                                                    +  EventEmitter
                                                                                    +} from '@angular/core';
                                                                                    +import { Subscription, tap, auditTime, animationFrameScheduler, debounceTime } from 'rxjs';
                                                                                    +import { resizeObservable } from '../utils/resize-observer';
                                                                                    +import { GalleryConfig } from '../models/config.model';
                                                                                    +import { SliderAdapter } from '../components/adapters';
                                                                                    +
                                                                                    +@Directive({
                                                                                    +  selector: '[thumbResizeObserver]',
                                                                                    +  standalone: true
                                                                                    +})
                                                                                    +export class ThumbResizeObserver implements OnChanges, OnInit, OnDestroy {
                                                                                    +
                                                                                    +  private _resizeSubscription: Subscription;
                                                                                    +
                                                                                    +  private get _viewport(): HTMLElement {
                                                                                    +    return this._el.nativeElement;
                                                                                    +  }
                                                                                    +
                                                                                    +  @Input() config: GalleryConfig;
                                                                                    +
                                                                                    +  @Input() adapter: SliderAdapter;
                                                                                    +
                                                                                    +  @Output('thumbResizeObserver') resized: EventEmitter<void> = new EventEmitter();
                                                                                    +
                                                                                    +  constructor(private _el: ElementRef<HTMLElement>, private _zone: NgZone) {
                                                                                    +  }
                                                                                    +
                                                                                    +  ngOnInit(): void {
                                                                                    +    this._zone.runOutsideAngular(() => {
                                                                                    +      this._resizeSubscription = resizeObservable(this._viewport).pipe(
                                                                                    +        debounceTime(this.config.resizeDebounceTime, animationFrameScheduler),
                                                                                    +        tap(() => {
                                                                                    +          this.updateSliderSize();
                                                                                    +          this.resized.emit();
                                                                                    +        })
                                                                                    +      ).subscribe();
                                                                                    +    });
                                                                                    +  }
                                                                                    +
                                                                                    +  ngOnChanges(changes: SimpleChanges): void {
                                                                                    +    if (!changes.config.firstChange) {
                                                                                    +      this.updateSliderSize();
                                                                                    +    }
                                                                                    +  }
                                                                                    +
                                                                                    +  ngOnDestroy(): void {
                                                                                    +    this._resizeSubscription?.unsubscribe();
                                                                                    +  }
                                                                                    +
                                                                                    +  private updateSliderSize(): void {
                                                                                    +    this._viewport.style.setProperty('--thumb-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px');
                                                                                    +    this._viewport.style.setProperty('--thumb-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px');
                                                                                    +  }
                                                                                    +}
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    + + + + + + + + + + + + + +
                                                                                    +
                                                                                    +

                                                                                    results matching ""

                                                                                    +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      No results matching ""

                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/ionicons.eot b/documentation/fonts/ionicons.eot new file mode 100644 index 00000000..4b1fd0f4 Binary files /dev/null and b/documentation/fonts/ionicons.eot differ diff --git a/documentation/fonts/ionicons.svg b/documentation/fonts/ionicons.svg new file mode 100644 index 00000000..ba35c41f --- /dev/null +++ b/documentation/fonts/ionicons.svg @@ -0,0 +1,2090 @@ + + + + + +Created by FontForge 20160407 at Thu Jun 14 08:50:34 2018 + By Adam Bradley +Copyright (c) 2018, Adam Bradley + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/ionicons.ttf b/documentation/fonts/ionicons.ttf new file mode 100644 index 00000000..67bd8420 Binary files /dev/null and b/documentation/fonts/ionicons.ttf differ diff --git a/documentation/fonts/ionicons.woff b/documentation/fonts/ionicons.woff new file mode 100644 index 00000000..ec1c1f87 Binary files /dev/null and b/documentation/fonts/ionicons.woff differ diff --git a/documentation/fonts/ionicons.woff2 b/documentation/fonts/ionicons.woff2 new file mode 100644 index 00000000..4233951c Binary files /dev/null and b/documentation/fonts/ionicons.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-300.eot b/documentation/fonts/roboto-v15-latin-300.eot new file mode 100644 index 00000000..826acfda Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.eot differ diff --git a/documentation/fonts/roboto-v15-latin-300.svg b/documentation/fonts/roboto-v15-latin-300.svg new file mode 100644 index 00000000..52b28327 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-300.svg @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-300.ttf b/documentation/fonts/roboto-v15-latin-300.ttf new file mode 100644 index 00000000..66bc5ab8 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-300.woff b/documentation/fonts/roboto-v15-latin-300.woff new file mode 100644 index 00000000..7e6c479f Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.woff differ diff --git a/documentation/fonts/roboto-v15-latin-300.woff2 b/documentation/fonts/roboto-v15-latin-300.woff2 new file mode 100644 index 00000000..c34c1280 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-700.eot b/documentation/fonts/roboto-v15-latin-700.eot new file mode 100644 index 00000000..f89cad7b Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.eot differ diff --git a/documentation/fonts/roboto-v15-latin-700.svg b/documentation/fonts/roboto-v15-latin-700.svg new file mode 100644 index 00000000..fc8d42f9 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-700.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-700.ttf b/documentation/fonts/roboto-v15-latin-700.ttf new file mode 100644 index 00000000..19090afb Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-700.woff b/documentation/fonts/roboto-v15-latin-700.woff new file mode 100644 index 00000000..bf737c1c Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.woff differ diff --git a/documentation/fonts/roboto-v15-latin-700.woff2 b/documentation/fonts/roboto-v15-latin-700.woff2 new file mode 100644 index 00000000..11cde5d0 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-italic.eot b/documentation/fonts/roboto-v15-latin-italic.eot new file mode 100644 index 00000000..f2d020a8 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.eot differ diff --git a/documentation/fonts/roboto-v15-latin-italic.svg b/documentation/fonts/roboto-v15-latin-italic.svg new file mode 100644 index 00000000..738b8295 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-italic.svg @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-italic.ttf b/documentation/fonts/roboto-v15-latin-italic.ttf new file mode 100644 index 00000000..b0dd4a1e Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-italic.woff b/documentation/fonts/roboto-v15-latin-italic.woff new file mode 100644 index 00000000..a2b77048 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.woff differ diff --git a/documentation/fonts/roboto-v15-latin-italic.woff2 b/documentation/fonts/roboto-v15-latin-italic.woff2 new file mode 100644 index 00000000..1bb77f9d Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-regular.eot b/documentation/fonts/roboto-v15-latin-regular.eot new file mode 100644 index 00000000..d26bc8f5 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.eot differ diff --git a/documentation/fonts/roboto-v15-latin-regular.svg b/documentation/fonts/roboto-v15-latin-regular.svg new file mode 100644 index 00000000..ed55c105 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-regular.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-regular.ttf b/documentation/fonts/roboto-v15-latin-regular.ttf new file mode 100644 index 00000000..7b25f3ce Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-regular.woff b/documentation/fonts/roboto-v15-latin-regular.woff new file mode 100644 index 00000000..941dfa4b Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.woff differ diff --git a/documentation/fonts/roboto-v15-latin-regular.woff2 b/documentation/fonts/roboto-v15-latin-regular.woff2 new file mode 100644 index 00000000..120796bb Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.woff2 differ diff --git a/documentation/graph/dependencies.svg b/documentation/graph/dependencies.svg new file mode 100644 index 00000000..317932d5 --- /dev/null +++ b/documentation/graph/dependencies.svg @@ -0,0 +1,236 @@ + + + + + + +dependencies + +dependencies + +cluster_GalleryModule + + + +cluster_GalleryModule_imports + + + +cluster_GalleryModule_exports + + + +cluster_LightboxModule + + + +cluster_LightboxModule_imports + + + +cluster_LightboxModule_exports + + + + +GalleryBoxDef + +GalleryBoxDef + + + +GalleryModule + +GalleryModule + + + +GalleryBoxDef->GalleryModule + + + + + +GalleryComponent + +GalleryComponent + + + +GalleryComponent->GalleryModule + + + + + +GalleryImageDef + +GalleryImageDef + + + +GalleryImageDef->GalleryModule + + + + + +GalleryItemDef + +GalleryItemDef + + + +GalleryItemDef->GalleryModule + + + + + +GalleryThumbDef + +GalleryThumbDef + + + +GalleryThumbDef->GalleryModule + + + + + +GalleryBoxDef + +GalleryBoxDef + + + +GalleryModule->GalleryBoxDef + + + + + +GalleryComponent + +GalleryComponent + + + +GalleryModule->GalleryComponent + + + + + +GalleryImageDef + +GalleryImageDef + + + +GalleryModule->GalleryImageDef + + + + + +GalleryItemDef + +GalleryItemDef + + + +GalleryModule->GalleryItemDef + + + + + +GalleryThumbDef + +GalleryThumbDef + + + +GalleryModule->GalleryThumbDef + + + + + +LightboxModule + +LightboxModule + + + +GalleryModule->LightboxModule + + + + + +GallerizeDirective + +GallerizeDirective + + + +GallerizeDirective->LightboxModule + + + + + +LightboxDirective + +LightboxDirective + + + +LightboxDirective->LightboxModule + + + + + +GallerizeDirective + +GallerizeDirective + + + +LightboxModule->GallerizeDirective + + + + + +GalleryModule + +GalleryModule + + + +LightboxModule->GalleryModule + + + + + +LightboxDirective + +LightboxDirective + + + +LightboxModule->LightboxDirective + + + + + diff --git a/documentation/images/compodoc-vectorise-inverted.png b/documentation/images/compodoc-vectorise-inverted.png new file mode 100644 index 00000000..e95ccfb0 Binary files /dev/null and b/documentation/images/compodoc-vectorise-inverted.png differ diff --git a/documentation/images/compodoc-vectorise-inverted.svg b/documentation/images/compodoc-vectorise-inverted.svg new file mode 100644 index 00000000..d1479a56 --- /dev/null +++ b/documentation/images/compodoc-vectorise-inverted.svg @@ -0,0 +1,201 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/compodoc-vectorise.png b/documentation/images/compodoc-vectorise.png new file mode 100644 index 00000000..81374035 Binary files /dev/null and b/documentation/images/compodoc-vectorise.png differ diff --git a/documentation/images/compodoc-vectorise.svg b/documentation/images/compodoc-vectorise.svg new file mode 100644 index 00000000..5e21f1e3 --- /dev/null +++ b/documentation/images/compodoc-vectorise.svg @@ -0,0 +1,201 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/coverage-badge-documentation.svg b/documentation/images/coverage-badge-documentation.svg new file mode 100644 index 00000000..94eca357 --- /dev/null +++ b/documentation/images/coverage-badge-documentation.svg @@ -0,0 +1,9 @@ + + + + + + documentation + 13% + + diff --git a/documentation/images/favicon.ico b/documentation/images/favicon.ico new file mode 100644 index 00000000..4144ee46 Binary files /dev/null and b/documentation/images/favicon.ico differ diff --git a/documentation/index.html b/documentation/index.html new file mode 100644 index 00000000..2d68e81e --- /dev/null +++ b/documentation/index.html @@ -0,0 +1,139 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      + +

                                                                                      + +

                                                                                      +

                                                                                      Angular Gallery

                                                                                      + +

                                                                                      Simplifies the process of creating beautiful image galleries for the web and mobile devices.

                                                                                      + + +

                                                                                      npm +npm +npm +tests +npm +npm

                                                                                      +
                                                                                      +

                                                                                      The documentation is available at the wiki page 📚

                                                                                      +
                                                                                      +

                                                                                      Support

                                                                                      +

                                                                                      npm

                                                                                      +

                                                                                      Issues

                                                                                      +

                                                                                      If you identify any errors in this module, or have an idea for an improvement, please open an issue.

                                                                                      +

                                                                                      Author

                                                                                      +

                                                                                      Murhaf Sousli

                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                      +
                                                                                      +

                                                                                      results matching ""

                                                                                      +
                                                                                        +
                                                                                        +
                                                                                        +

                                                                                        No results matching ""

                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/Gallery.html b/documentation/injectables/Gallery.html new file mode 100644 index 00000000..6d0b8d4e --- /dev/null +++ b/documentation/injectables/Gallery.html @@ -0,0 +1,717 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                        +
                                                                                        + + +
                                                                                        +
                                                                                        + + + + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        +

                                                                                        File

                                                                                        +

                                                                                        +

                                                                                        + projects/ng-gallery/src/lib/services/gallery.service.ts +

                                                                                        + + + + + +
                                                                                        +

                                                                                        Index

                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        Properties
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        Methods
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        +

                                                                                        Constructor

                                                                                        + + + + + + + + + + + + + +
                                                                                        +constructor(config: GalleryConfig) +
                                                                                        + +
                                                                                        +
                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                        NameTypeOptional
                                                                                        config + GalleryConfig + + No +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        + +

                                                                                        + Methods +

                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                        + + + debugConsole + + +
                                                                                        +debugConsole(...data: any[]) +
                                                                                        + +
                                                                                        +

                                                                                        Logger for debugging

                                                                                        +
                                                                                        + +
                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                        NameTypeOptional
                                                                                        data + any[] + + No +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + Returns : void + +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                        + + + Private + deleteInstance + + +
                                                                                        + + deleteInstance(id: string) +
                                                                                        + +
                                                                                        +

                                                                                        A destroyer function for each gallery instance

                                                                                        +
                                                                                        + +
                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                        NameTypeOptional
                                                                                        id + string + + No +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + Returns : () => void + +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                        + + + destroyAll + + +
                                                                                        +destroyAll() +
                                                                                        + +
                                                                                        +

                                                                                        Destroy all gallery instances

                                                                                        +
                                                                                        + +
                                                                                        + Returns : void + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                        + + + ref + + +
                                                                                        +ref(id: string, config?: GalleryConfig) +
                                                                                        + +
                                                                                        +

                                                                                        Get or create gallery by ID

                                                                                        +
                                                                                        + +
                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                        NameTypeOptionalDefault value
                                                                                        id + string + + No + + 'root' +
                                                                                        config + GalleryConfig + + Yes + +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + Returns : GalleryRef + +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                        + + + resetAll + + +
                                                                                        +resetAll() +
                                                                                        + +
                                                                                        +

                                                                                        Reset all gallery instances

                                                                                        +
                                                                                        + +
                                                                                        + Returns : void + +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +

                                                                                        + Properties +

                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                        + + + Private + Readonly + _instances + + +
                                                                                        + Default value : new Map<string, GalleryRef>() +
                                                                                        + +
                                                                                        +

                                                                                        Store gallery instances

                                                                                        +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                        + + + config + + +
                                                                                        + Type : GalleryConfig + +
                                                                                        + +
                                                                                        +

                                                                                        Global config

                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        + + +
                                                                                        +
                                                                                        import { Inject, Injectable, Optional } from '@angular/core';
                                                                                        +
                                                                                        +import { GalleryRef } from './gallery-ref';
                                                                                        +import { GalleryConfig, GALLERY_CONFIG } from '../models/config.model';
                                                                                        +import { defaultConfig } from '../utils/gallery.default';
                                                                                        +
                                                                                        +@Injectable({
                                                                                        +  providedIn: 'root'
                                                                                        +})
                                                                                        +export class Gallery {
                                                                                        +
                                                                                        +  /** Store gallery instances */
                                                                                        +  private readonly _instances = new Map<string, GalleryRef>();
                                                                                        +
                                                                                        +  /** Global config */
                                                                                        +  config: GalleryConfig;
                                                                                        +
                                                                                        +  constructor(@Optional() @Inject(GALLERY_CONFIG) config: GalleryConfig) {
                                                                                        +    this.config = config ? { ...defaultConfig, ...config } : defaultConfig;
                                                                                        +  }
                                                                                        +
                                                                                        +  /**
                                                                                        +   * Get or create gallery by ID
                                                                                        +   * @param id
                                                                                        +   * @param config
                                                                                        +   */
                                                                                        +  ref(id = 'root', config?: GalleryConfig): GalleryRef {
                                                                                        +    if (this._instances.has(id)) {
                                                                                        +      const galleryRef = this._instances.get(id);
                                                                                        +      if (config) {
                                                                                        +        galleryRef.setConfig({ ...this.config, ...config });
                                                                                        +      }
                                                                                        +      return galleryRef;
                                                                                        +    } else {
                                                                                        +      return this._instances.set(id, new GalleryRef({ ...this.config, ...config }, this.deleteInstance(id))).get(id);
                                                                                        +    }
                                                                                        +  }
                                                                                        +
                                                                                        +  /**
                                                                                        +   * Destroy all gallery instances
                                                                                        +   */
                                                                                        +  destroyAll() {
                                                                                        +    this._instances.forEach((ref: GalleryRef) => ref.destroy());
                                                                                        +  }
                                                                                        +
                                                                                        +  /**
                                                                                        +   * Reset all gallery instances
                                                                                        +   */
                                                                                        +  resetAll() {
                                                                                        +    this._instances.forEach((ref: GalleryRef) => ref.reset());
                                                                                        +  }
                                                                                        +
                                                                                        +  /**
                                                                                        +   * Logger for debugging
                                                                                        +   */
                                                                                        +  debugConsole(...data: any[]): void {
                                                                                        +    if (this.config.debug) {
                                                                                        +      console.log(...data)
                                                                                        +    }
                                                                                        +  }
                                                                                        +
                                                                                        +  /**
                                                                                        +   * A destroyer function for each gallery instance
                                                                                        +   */
                                                                                        +  private deleteInstance(id: string) {
                                                                                        +    return () => {
                                                                                        +      if (this._instances.has(id)) {
                                                                                        +        this._instances.delete(id);
                                                                                        +      }
                                                                                        +    };
                                                                                        +  }
                                                                                        +
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        + + + + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        results matching ""

                                                                                        +
                                                                                          +
                                                                                          +
                                                                                          +

                                                                                          No results matching ""

                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ImgManager.html b/documentation/injectables/ImgManager.html new file mode 100644 index 00000000..bafd2e74 --- /dev/null +++ b/documentation/injectables/ImgManager.html @@ -0,0 +1,546 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                          +
                                                                                          + + +
                                                                                          +
                                                                                          + + + + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          +

                                                                                          File

                                                                                          +

                                                                                          +

                                                                                          + projects/ng-gallery/src/lib/utils/img-manager.ts +

                                                                                          + + + + + +
                                                                                          +

                                                                                          Index

                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          Properties
                                                                                          +
                                                                                          +
                                                                                            +
                                                                                          • + Private + Readonly + images +
                                                                                          • +
                                                                                          • + Private + Readonly + trigger$ +
                                                                                          • +
                                                                                          +
                                                                                          +
                                                                                          Methods
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + +
                                                                                          + +

                                                                                          + Methods +

                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + addItem + + +
                                                                                          +addItem(index: number, payload: ImageRegistry) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          index + number + + No +
                                                                                          payload + ImageRegistry + + No +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + Returns : void + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + deleteItem + + +
                                                                                          +deleteItem(index: number) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          index + number + + No +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + Returns : void + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + getActiveItem + + +
                                                                                          +getActiveItem(state$: Observable<GalleryState>) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          state$ + Observable<GalleryState> + + No +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + Returns : Observable<HTMLImageElement> + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + +

                                                                                          + Properties +

                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + Private + Readonly + images + + +
                                                                                          + Type : Map<number | ImageRegistry> + +
                                                                                          + Default value : new Map<number, ImageRegistry>() +
                                                                                          + +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + Private + Readonly + trigger$ + + +
                                                                                          + Type : BehaviorSubject<void> + +
                                                                                          + Default value : new BehaviorSubject<void>(null) +
                                                                                          + +
                                                                                          +
                                                                                          + +
                                                                                          + + +
                                                                                          +
                                                                                          import { Injectable } from '@angular/core';
                                                                                          +import { Observable, BehaviorSubject, filter, map, switchMap, EMPTY } from 'rxjs';
                                                                                          +import { GalleryState } from '../models/gallery.model';
                                                                                          +import { ItemState } from '../components/templates/items.model';
                                                                                          +
                                                                                          +interface ImageRegistry {
                                                                                          +  state: Observable<ItemState>;
                                                                                          +  target: HTMLImageElement;
                                                                                          +}
                                                                                          +
                                                                                          +@Injectable()
                                                                                          +export class ImgManager {
                                                                                          +
                                                                                          +  private readonly trigger$: BehaviorSubject<void> = new BehaviorSubject<void>(null);
                                                                                          +
                                                                                          +  private readonly images: Map<number, ImageRegistry> = new Map<number, ImageRegistry>();
                                                                                          +
                                                                                          +  getActiveItem(state$: Observable<GalleryState>): Observable<HTMLImageElement> {
                                                                                          +    return this.trigger$.pipe(
                                                                                          +      switchMap(() => state$.pipe(
                                                                                          +        switchMap((state: GalleryState) => {
                                                                                          +          const img: ImageRegistry = this.images.get(state.currIndex);
                                                                                          +          if (img) {
                                                                                          +            return img.state.pipe(
                                                                                          +              filter((state: ItemState) => state !== 'loading'),
                                                                                          +              map(() => img.target)
                                                                                          +            )
                                                                                          +          }
                                                                                          +          return EMPTY;
                                                                                          +        })
                                                                                          +      ))
                                                                                          +    );
                                                                                          +  }
                                                                                          +
                                                                                          +  addItem(index: number, payload: ImageRegistry): void {
                                                                                          +    this.images.set(index, payload);
                                                                                          +    this.trigger$.next();
                                                                                          +  }
                                                                                          +
                                                                                          +  deleteItem(index: number): void {
                                                                                          +    if (this.images.has(index)) {
                                                                                          +      this.images.delete(index);
                                                                                          +      this.trigger$.next();
                                                                                          +    }
                                                                                          +  }
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          + + + + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          results matching ""

                                                                                          +
                                                                                            +
                                                                                            +
                                                                                            +

                                                                                            No results matching ""

                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/Lightbox.html b/documentation/injectables/Lightbox.html new file mode 100644 index 00000000..e8607d46 --- /dev/null +++ b/documentation/injectables/Lightbox.html @@ -0,0 +1,786 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            + + + + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            +

                                                                                            File

                                                                                            +

                                                                                            +

                                                                                            + projects/ng-gallery/lightbox/src/lightbox.service.ts +

                                                                                            + + + + + +
                                                                                            +

                                                                                            Index

                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            Properties
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            Methods
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +

                                                                                            Constructor

                                                                                            + + + + + + + + + + + + + +
                                                                                            +constructor(config: LightboxConfig, _gallery: Gallery, _overlay: Overlay, _sanitizer: DomSanitizer) +
                                                                                            + +
                                                                                            +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptional
                                                                                            config + LightboxConfig + + No +
                                                                                            _gallery + Gallery + + No +
                                                                                            _overlay + Overlay + + No +
                                                                                            _sanitizer + DomSanitizer + + No +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + +

                                                                                            + Methods +

                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + close + + +
                                                                                            +close() +
                                                                                            + +
                                                                                            +

                                                                                            Close Lightbox Overlay

                                                                                            +
                                                                                            + +
                                                                                            + Returns : void + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + open + + +
                                                                                            +open(i: number, id: string, config?: LightboxConfig) +
                                                                                            + +
                                                                                            +

                                                                                            Open Lightbox Overlay

                                                                                            +
                                                                                            + +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptionalDefault valueDescription
                                                                                            i + number + + No + + 0 + +
                                                                                              +
                                                                                            • Current Index
                                                                                            • +
                                                                                            + +
                                                                                            id + string + + No + + 'lightbox' + +
                                                                                              +
                                                                                            • Gallery ID
                                                                                            • +
                                                                                            + +
                                                                                            config + LightboxConfig + + Yes + + +
                                                                                              +
                                                                                            • Lightbox Config
                                                                                            • +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + Returns : void + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + setConfig + + +
                                                                                            +setConfig(config: LightboxConfig) +
                                                                                            + +
                                                                                            +

                                                                                            Set Lightbox Config

                                                                                            +
                                                                                            + +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptionalDescription
                                                                                            config + LightboxConfig + + No + +
                                                                                              +
                                                                                            • LightboxConfig
                                                                                            • +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + Returns : void + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +

                                                                                            + Properties +

                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                            + + + Private + _config + + +
                                                                                            + Type : LightboxConfig + +
                                                                                            + +
                                                                                            +

                                                                                            Global config

                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                            + + + Private + _overlayRef + + +
                                                                                            + Type : OverlayRef + +
                                                                                            + +
                                                                                            +

                                                                                            Gallery overlay ref

                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                            + + + closed + + +
                                                                                            + Default value : new Subject<string>() +
                                                                                            + +
                                                                                            +

                                                                                            Stream that emits when lightbox is closed

                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                            + + + opened + + +
                                                                                            + Default value : new Subject<string>() +
                                                                                            + +
                                                                                            +

                                                                                            Stream that emits when lightbox is opened

                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + + +
                                                                                            +
                                                                                            import { ComponentRef, Inject, Injectable, Optional } from '@angular/core';
                                                                                            +import { DomSanitizer } from '@angular/platform-browser';
                                                                                            +import { ComponentPortal } from '@angular/cdk/portal';
                                                                                            +import { Overlay, OverlayRef, OverlayConfig } from '@angular/cdk/overlay';
                                                                                            +import { LEFT_ARROW, RIGHT_ARROW, ESCAPE } from '@angular/cdk/keycodes';
                                                                                            +import { Gallery } from 'ng-gallery';
                                                                                            +import { Subject } from 'rxjs';
                                                                                            +
                                                                                            +import { LightboxConfig, LIGHTBOX_CONFIG } from './lightbox.model';
                                                                                            +import { defaultConfig } from './lightbox.default';
                                                                                            +import { LightboxComponent } from './lightbox.component';
                                                                                            +
                                                                                            +@Injectable({
                                                                                            +  providedIn: 'root'
                                                                                            +})
                                                                                            +export class Lightbox {
                                                                                            +
                                                                                            +  /** Gallery overlay ref */
                                                                                            +  private _overlayRef: OverlayRef;
                                                                                            +
                                                                                            +  /** Global config */
                                                                                            +  private _config: LightboxConfig;
                                                                                            +
                                                                                            +  /** Stream that emits when lightbox is opened */
                                                                                            +  opened = new Subject<string>();
                                                                                            +
                                                                                            +  /** Stream that emits when lightbox is closed */
                                                                                            +  closed = new Subject<string>();
                                                                                            +
                                                                                            +  constructor(@Optional() @Inject(LIGHTBOX_CONFIG) config: LightboxConfig, private _gallery: Gallery, private _overlay: Overlay, private _sanitizer: DomSanitizer) {
                                                                                            +    this._config = config ? { ...defaultConfig, ...config } : defaultConfig;
                                                                                            +  }
                                                                                            +
                                                                                            +  /**
                                                                                            +   * Set Lightbox Config
                                                                                            +   * @param config - LightboxConfig
                                                                                            +   */
                                                                                            +  setConfig(config: LightboxConfig) {
                                                                                            +    this._config = { ...this._config, ...config };
                                                                                            +  }
                                                                                            +
                                                                                            +  /**
                                                                                            +   * Open Lightbox Overlay
                                                                                            +   * @param i - Current Index
                                                                                            +   * @param id - Gallery ID
                                                                                            +   * @param config - Lightbox Config
                                                                                            +   */
                                                                                            +  open(i = 0, id = 'lightbox', config?: LightboxConfig) {
                                                                                            +
                                                                                            +    const _config: LightboxConfig = config ? { ...this._config, ...config } : this._config;
                                                                                            +
                                                                                            +    const overlayConfig: OverlayConfig = {
                                                                                            +      backdropClass: _config.backdropClass,
                                                                                            +      panelClass: _config.panelClass,
                                                                                            +      hasBackdrop: _config.hasBackdrop,
                                                                                            +      positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),
                                                                                            +      scrollStrategy: this._overlay.scrollStrategies.block(),
                                                                                            +      disposeOnNavigation: true
                                                                                            +    };
                                                                                            +
                                                                                            +    const galleryRef = this._gallery.ref(id);
                                                                                            +    galleryRef.set(i);
                                                                                            +
                                                                                            +    this._overlayRef = this._overlay.create(overlayConfig);
                                                                                            +
                                                                                            +    // overlay opened event
                                                                                            +    this._overlayRef.attachments().subscribe(() => this.opened.next(id));
                                                                                            +
                                                                                            +    // overlay closed event
                                                                                            +    this._overlayRef.detachments().subscribe(() => this.closed.next(id));
                                                                                            +
                                                                                            +    // Attach gallery to the overlay
                                                                                            +    const galleryPortal = new ComponentPortal(LightboxComponent);
                                                                                            +    const lightboxRef: ComponentRef<LightboxComponent> = this._overlayRef.attach(galleryPortal);
                                                                                            +
                                                                                            +    lightboxRef.instance.id = id;
                                                                                            +    lightboxRef.instance.overlayRef = this._overlayRef;
                                                                                            +    lightboxRef.instance.closeIcon = this._sanitizer.bypassSecurityTrustHtml(this._config.closeIcon);
                                                                                            +    lightboxRef.instance.role = this._config.role;
                                                                                            +    lightboxRef.instance.ariaLabel = this._config.ariaLabel;
                                                                                            +    lightboxRef.instance.ariaLabelledBy = this._config.ariaLabelledBy;
                                                                                            +    lightboxRef.instance.ariaDescribedBy = this._config.ariaDescribedBy;
                                                                                            +    lightboxRef.instance.startAnimationTime = this._config.startAnimationTime;
                                                                                            +    lightboxRef.instance.exitAnimationTime = this._config.exitAnimationTime;
                                                                                            +
                                                                                            +    if (_config.hasBackdrop) {
                                                                                            +      this._overlayRef.backdropClick().subscribe(() => this.close());
                                                                                            +    }
                                                                                            +
                                                                                            +    // Add keyboard shortcuts
                                                                                            +    if (_config.keyboardShortcuts) {
                                                                                            +      this._overlayRef.keydownEvents().subscribe((event: any) => {
                                                                                            +        switch (event.keyCode) {
                                                                                            +          case LEFT_ARROW:
                                                                                            +            galleryRef.prev();
                                                                                            +            break;
                                                                                            +          case RIGHT_ARROW:
                                                                                            +            galleryRef.next();
                                                                                            +            break;
                                                                                            +          case ESCAPE:
                                                                                            +            this.close();
                                                                                            +        }
                                                                                            +      });
                                                                                            +    }
                                                                                            +  }
                                                                                            +
                                                                                            +  /**
                                                                                            +   * Close Lightbox Overlay
                                                                                            +   */
                                                                                            +  close() {
                                                                                            +    if (this._overlayRef.hasAttached()) {
                                                                                            +      this._overlayRef.detach();
                                                                                            +    }
                                                                                            +  }
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + + + + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            results matching ""

                                                                                            +
                                                                                              +
                                                                                              +
                                                                                              +

                                                                                              No results matching ""

                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/Pixabay.html b/documentation/injectables/Pixabay.html new file mode 100644 index 00000000..46f3a92f --- /dev/null +++ b/documentation/injectables/Pixabay.html @@ -0,0 +1,382 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                              +
                                                                                              + + +
                                                                                              +
                                                                                              + + + + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              +

                                                                                              File

                                                                                              +

                                                                                              +

                                                                                              + projects/ng-gallery/src/stories/pixabay/pixabay.service.ts +

                                                                                              + + + + + +
                                                                                              +

                                                                                              Index

                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              Properties
                                                                                              +
                                                                                              +
                                                                                                +
                                                                                              • + Private + Readonly + API_KEY +
                                                                                              • +
                                                                                              +
                                                                                              +
                                                                                              Methods
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +

                                                                                              Constructor

                                                                                              + + + + + + + + + + + + + +
                                                                                              +constructor(_http: HttpClient) +
                                                                                              + +
                                                                                              +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              _http + HttpClient + + No +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              + +

                                                                                              + Methods +

                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + getHDImages + + +
                                                                                              +getHDImages(key: string) +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              key + string + + No +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + Returns : Observable<GalleryItem[]> + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +

                                                                                              + Properties +

                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                              + + + Private + Readonly + API_KEY + + +
                                                                                              + Type : string + +
                                                                                              + Default value : '560162-704dd2880c027f22c62ab7941' +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              + + +
                                                                                              +
                                                                                              import { Injectable } from '@angular/core';
                                                                                              +import { HttpClient } from '@angular/common/http';
                                                                                              +import { Observable, shareReplay, map } from 'rxjs';
                                                                                              +
                                                                                              +import { ImageItem, GalleryItem } from 'ng-gallery';
                                                                                              +
                                                                                              +import { Hit2, PixabayHDModel } from './pixabay.model';
                                                                                              +
                                                                                              +@Injectable({
                                                                                              +  providedIn: 'root'
                                                                                              +})
                                                                                              +export class Pixabay {
                                                                                              +
                                                                                              +  private readonly API_KEY: string = '560162-704dd2880c027f22c62ab7941';
                                                                                              +
                                                                                              +  constructor(private _http: HttpClient) {
                                                                                              +  }
                                                                                              +
                                                                                              +  getHDImages(key: string): Observable<GalleryItem[]> {
                                                                                              +    const URL = `https://pixabay.com/api/?key=${ this.API_KEY }&q=${ encodeURIComponent(key) }&response_group=high_resolution&editors_choice=true&per_page=18&image_type=photo`;
                                                                                              +    return this._http.get(URL).pipe(
                                                                                              +      map((res: PixabayHDModel) => {
                                                                                              +        return res.hits.map((item: Hit2, i: number) => new ImageItem({ src: item.largeImageURL, thumb: item.previewURL, alt: `photo-${ i }` }));
                                                                                              +      }),
                                                                                              +      shareReplay(1)
                                                                                              +    );
                                                                                              +  }
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              + + + + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              results matching ""

                                                                                              +
                                                                                                +
                                                                                                +
                                                                                                +

                                                                                                No results matching ""

                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/BezierEasingOptions.html b/documentation/interfaces/BezierEasingOptions.html new file mode 100644 index 00000000..5af1a696 --- /dev/null +++ b/documentation/interfaces/BezierEasingOptions.html @@ -0,0 +1,357 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                +
                                                                                                +

                                                                                                +

                                                                                                File

                                                                                                +

                                                                                                +

                                                                                                + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +

                                                                                                + + + + +
                                                                                                +

                                                                                                Index

                                                                                                + + + + + + + + + +
                                                                                                +
                                                                                                Properties
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + + +
                                                                                                +

                                                                                                Properties

                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                + + x1 + + + + +
                                                                                                + x1: number + +
                                                                                                + Type : number + +
                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                + + x2 + + + + +
                                                                                                + x2: number + +
                                                                                                + Type : number + +
                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                + + y1 + + + + +
                                                                                                + y1: number + +
                                                                                                + Type : number + +
                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                + + y2 + + + + +
                                                                                                + y2: number + +
                                                                                                + Type : number + +
                                                                                                +
                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                import { InjectionToken } from '@angular/core';
                                                                                                +import { _XAxis, _YAxis } from '@angular/cdk/scrolling';
                                                                                                +
                                                                                                +export const SMOOTH_SCROLL_OPTIONS: InjectionToken<SmoothScrollOptions> = new InjectionToken<SmoothScrollOptions>('SMOOTH_SCROLL_OPTIONS');
                                                                                                +
                                                                                                +export type SmoothScrollToOptions = _XAxis & _YAxis & SmoothScrollOptions;
                                                                                                +
                                                                                                +export interface SmoothScrollOptions {
                                                                                                +  duration?: number;
                                                                                                +  easing?: BezierEasingOptions;
                                                                                                +}
                                                                                                +
                                                                                                +export interface SmoothScrollStep {
                                                                                                +  scrollable: HTMLElement;
                                                                                                +  startTime: number;
                                                                                                +  startX: number;
                                                                                                +  startY: number;
                                                                                                +  x: number;
                                                                                                +  y: number;
                                                                                                +  duration: number;
                                                                                                +  easing: (k: number) => number;
                                                                                                +  currentX?: number;
                                                                                                +  currentY?: number;
                                                                                                +}
                                                                                                +
                                                                                                +export interface BezierEasingOptions {
                                                                                                +  x1: number;
                                                                                                +  y1: number;
                                                                                                +  x2: number;
                                                                                                +  y2: number;
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + + + + + + + +
                                                                                                +
                                                                                                +

                                                                                                results matching ""

                                                                                                +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  No results matching ""

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryConfig.html b/documentation/interfaces/GalleryConfig.html new file mode 100644 index 00000000..be6ae556 --- /dev/null +++ b/documentation/interfaces/GalleryConfig.html @@ -0,0 +1,2155 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  +

                                                                                                  File

                                                                                                  +

                                                                                                  +

                                                                                                  + projects/ng-gallery/src/lib/models/config.model.ts +

                                                                                                  + + + + +
                                                                                                  +

                                                                                                  Index

                                                                                                  + + + + + + + + + +
                                                                                                  +
                                                                                                  Properties
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + +
                                                                                                  +

                                                                                                  Properties

                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + autoHeight + + + + +
                                                                                                  + autoHeight: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + autoplay + + + + +
                                                                                                  + autoplay: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + boxTemplate + + + + +
                                                                                                  + boxTemplate: TemplateRef<any> + +
                                                                                                  + Type : TemplateRef<any> + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + counter + + + + +
                                                                                                  + counter: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + counterPosition + + + + +
                                                                                                  + counterPosition: "top" | "bottom" + +
                                                                                                  + Type : "top" | "bottom" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + debug + + + + +
                                                                                                  + debug: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + disableThumb + + + + +
                                                                                                  + disableThumb: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + dots + + + + +
                                                                                                  + dots: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + bulletsPosition + + + + +
                                                                                                  + bulletsPosition: "top" | "bottom" + +
                                                                                                  + Type : "top" | "bottom" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + dotsSize + + + + +
                                                                                                  + dotsSize: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + imageSize + + + + +
                                                                                                  + imageSize: "cover" | "contain" + +
                                                                                                  + Type : "cover" | "contain" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + imageTemplate + + + + +
                                                                                                  + imageTemplate: TemplateRef<any> + +
                                                                                                  + Type : TemplateRef<any> + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + itemAutosize + + + + +
                                                                                                  + itemAutosize: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + itemTemplate + + + + +
                                                                                                  + itemTemplate: TemplateRef<any> + +
                                                                                                  + Type : TemplateRef<any> + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + loadingAttr + + + + +
                                                                                                  + loadingAttr: "eager" | "lazy" + +
                                                                                                  + Type : "eager" | "lazy" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + loadingError + + + + +
                                                                                                  + loadingError: string + +
                                                                                                  + Type : string + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + loadingIcon + + + + +
                                                                                                  + loadingIcon: string + +
                                                                                                  + Type : string + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + loadingStrategy + + + + +
                                                                                                  + loadingStrategy: "preload" | "lazy" | "default" + +
                                                                                                  + Type : "preload" | "lazy" | "default" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + loop + + + + +
                                                                                                  + loop: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + mouseSlidingDisabled + + + + +
                                                                                                  + mouseSlidingDisabled: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + nav + + + + +
                                                                                                  + nav: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + navIcon + + + + +
                                                                                                  + navIcon: string + +
                                                                                                  + Type : string + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + navScrollBehavior + + + + +
                                                                                                  + navScrollBehavior: ScrollBehavior + +
                                                                                                  + Type : ScrollBehavior + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + playerInterval + + + + +
                                                                                                  + playerInterval: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + resizeDebounceTime + + + + +
                                                                                                  + resizeDebounceTime: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + scrollBehavior + + + + +
                                                                                                  + scrollBehavior: ScrollBehavior + +
                                                                                                  + Type : ScrollBehavior + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + slidingDirection + + + + +
                                                                                                  + slidingDirection: "horizontal" | "vertical" + +
                                                                                                  + Type : "horizontal" | "vertical" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + slidingDisabled + + + + +
                                                                                                  + slidingDisabled: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + slidingDuration + + + + +
                                                                                                  + slidingDuration: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + slidingEase + + + + +
                                                                                                  + slidingEase: BezierEasingOptions + +
                                                                                                  + Type : BezierEasingOptions + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumb + + + + +
                                                                                                  + thumb: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbAutosize + + + + +
                                                                                                  + thumbAutosize: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbDetached + + + + +
                                                                                                  + thumbDetached: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbHeight + + + + +
                                                                                                  + thumbHeight: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbImageSize + + + + +
                                                                                                  + thumbImageSize: "cover" | "contain" + +
                                                                                                  + Type : "cover" | "contain" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbLoadingError + + + + +
                                                                                                  + thumbLoadingError: string + +
                                                                                                  + Type : string + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbLoadingIcon + + + + +
                                                                                                  + thumbLoadingIcon: string + +
                                                                                                  + Type : string + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbMouseSlidingDisabled + + + + +
                                                                                                  + thumbMouseSlidingDisabled: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbPosition + + + + +
                                                                                                  + thumbPosition: "top" | "left" | "right" | "bottom" + +
                                                                                                  + Type : "top" | "left" | "right" | "bottom" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbSlidingDisabled + + + + +
                                                                                                  + thumbSlidingDisabled: boolean + +
                                                                                                  + Type : boolean + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbTemplate + + + + +
                                                                                                  + thumbTemplate: TemplateRef<any> + +
                                                                                                  + Type : TemplateRef<any> + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbView + + + + +
                                                                                                  + thumbView: "default" | "contain" + +
                                                                                                  + Type : "default" | "contain" + +
                                                                                                  + Optional +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + thumbWidth + + + + +
                                                                                                  + thumbWidth: number + +
                                                                                                  + Type : number + +
                                                                                                  + Optional +
                                                                                                  +
                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  import { InjectionToken, TemplateRef } from '@angular/core';
                                                                                                  +import { BezierEasingOptions } from '../smooth-scroll';
                                                                                                  +
                                                                                                  +export const GALLERY_CONFIG = new InjectionToken<GalleryConfig>('GALLERY_CONFIG');
                                                                                                  +
                                                                                                  +export interface GalleryConfig {
                                                                                                  +  scrollBehavior?: ScrollBehavior;
                                                                                                  +  navScrollBehavior?: ScrollBehavior;
                                                                                                  +  nav?: boolean;
                                                                                                  +  dots?: boolean;
                                                                                                  +  loop?: boolean;
                                                                                                  +  thumb?: boolean;
                                                                                                  +  navIcon?: string;
                                                                                                  +  counter?: boolean;
                                                                                                  +  dotsSize?: number;
                                                                                                  +  autoplay?: boolean;
                                                                                                  +  thumbWidth?: number;
                                                                                                  +  thumbHeight?: number;
                                                                                                  +  loadingIcon?: string;
                                                                                                  +  loadingError?: string;
                                                                                                  +  thumbLoadingIcon?: string;
                                                                                                  +  thumbLoadingError?: string;
                                                                                                  +  disableThumb?: boolean;
                                                                                                  +  slidingDuration?: number;
                                                                                                  +  slidingEase?: BezierEasingOptions;
                                                                                                  +  slidingDisabled?: boolean;
                                                                                                  +  thumbSlidingDisabled?: boolean;
                                                                                                  +  mouseSlidingDisabled?: boolean;
                                                                                                  +  thumbMouseSlidingDisabled?: boolean;
                                                                                                  +  resizeDebounceTime?: number;
                                                                                                  +  playerInterval?: number;
                                                                                                  +  boxTemplate?: TemplateRef<any>;
                                                                                                  +  itemTemplate?: TemplateRef<any>;
                                                                                                  +  imageTemplate?: TemplateRef<any>;
                                                                                                  +  thumbTemplate?: TemplateRef<any>;
                                                                                                  +  thumbDetached?: boolean;
                                                                                                  +  imageSize?: 'cover' | 'contain';
                                                                                                  +  thumbImageSize?: 'cover' | 'contain';
                                                                                                  +  bulletsPosition?: 'top' | 'bottom';
                                                                                                  +  counterPosition?: 'top' | 'bottom';
                                                                                                  +  slidingDirection?: 'horizontal' | 'vertical';
                                                                                                  +  loadingStrategy?: 'preload' | 'lazy' | 'default';
                                                                                                  +  loadingAttr?: 'eager' | 'lazy';
                                                                                                  +  thumbPosition?: 'top' | 'left' | 'right' | 'bottom';
                                                                                                  +  thumbView?: 'default' | 'contain';
                                                                                                  +  thumbAutosize?: boolean;
                                                                                                  +  itemAutosize?: boolean;
                                                                                                  +  autoHeight?: boolean;
                                                                                                  +  debug?: boolean;
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  results matching ""

                                                                                                  +
                                                                                                    +
                                                                                                    +
                                                                                                    +

                                                                                                    No results matching ""

                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryError.html b/documentation/interfaces/GalleryError.html new file mode 100644 index 00000000..d99dc908 --- /dev/null +++ b/documentation/interfaces/GalleryError.html @@ -0,0 +1,270 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    +

                                                                                                    File

                                                                                                    +

                                                                                                    +

                                                                                                    + projects/ng-gallery/src/lib/models/gallery.model.ts +

                                                                                                    + + + + +
                                                                                                    +

                                                                                                    Index

                                                                                                    + + + + + + + + + +
                                                                                                    +
                                                                                                    Properties
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + +
                                                                                                    +

                                                                                                    Properties

                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                    + + error + + + + +
                                                                                                    + error: ErrorEvent + +
                                                                                                    + Type : ErrorEvent + +
                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                    + + itemIndex + + + + +
                                                                                                    + itemIndex: number + +
                                                                                                    + Type : number + +
                                                                                                    +
                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    import { GalleryAction, GalleryItemType } from './constants';
                                                                                                    +import { GalleryItemData } from '../components/templates/items.model';
                                                                                                    +
                                                                                                    +export interface GalleryState {
                                                                                                    +  action?: GalleryAction;
                                                                                                    +  items?: GalleryItem[];
                                                                                                    +  behavior?: ScrollBehavior;
                                                                                                    +  currIndex?: number;
                                                                                                    +  hasNext?: boolean;
                                                                                                    +  hasPrev?: boolean;
                                                                                                    +  isPlaying?: boolean;
                                                                                                    +}
                                                                                                    +
                                                                                                    +export interface GalleryItem {
                                                                                                    +  data?: GalleryItemData;
                                                                                                    +  type?: GalleryItemType;
                                                                                                    +}
                                                                                                    +
                                                                                                    +export interface GalleryError {
                                                                                                    +  itemIndex: number;
                                                                                                    +  error: ErrorEvent;
                                                                                                    +}
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    results matching ""

                                                                                                    +
                                                                                                      +
                                                                                                      +
                                                                                                      +

                                                                                                      No results matching ""

                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryItem.html b/documentation/interfaces/GalleryItem.html new file mode 100644 index 00000000..80ee2fc7 --- /dev/null +++ b/documentation/interfaces/GalleryItem.html @@ -0,0 +1,282 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      +

                                                                                                      File

                                                                                                      +

                                                                                                      +

                                                                                                      + projects/ng-gallery/src/lib/models/gallery.model.ts +

                                                                                                      + + + + +
                                                                                                      +

                                                                                                      Index

                                                                                                      + + + + + + + + + +
                                                                                                      +
                                                                                                      Properties
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + +
                                                                                                      +

                                                                                                      Properties

                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + data + + + + +
                                                                                                      + data: GalleryItemData + +
                                                                                                      + Type : GalleryItemData + +
                                                                                                      + Optional +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + type + + + + +
                                                                                                      + type: GalleryItemType + +
                                                                                                      + Type : GalleryItemType + +
                                                                                                      + Optional +
                                                                                                      +
                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      import { GalleryAction, GalleryItemType } from './constants';
                                                                                                      +import { GalleryItemData } from '../components/templates/items.model';
                                                                                                      +
                                                                                                      +export interface GalleryState {
                                                                                                      +  action?: GalleryAction;
                                                                                                      +  items?: GalleryItem[];
                                                                                                      +  behavior?: ScrollBehavior;
                                                                                                      +  currIndex?: number;
                                                                                                      +  hasNext?: boolean;
                                                                                                      +  hasPrev?: boolean;
                                                                                                      +  isPlaying?: boolean;
                                                                                                      +}
                                                                                                      +
                                                                                                      +export interface GalleryItem {
                                                                                                      +  data?: GalleryItemData;
                                                                                                      +  type?: GalleryItemType;
                                                                                                      +}
                                                                                                      +
                                                                                                      +export interface GalleryError {
                                                                                                      +  itemIndex: number;
                                                                                                      +  error: ErrorEvent;
                                                                                                      +}
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      results matching ""

                                                                                                      +
                                                                                                        +
                                                                                                        +
                                                                                                        +

                                                                                                        No results matching ""

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryItemContext.html b/documentation/interfaces/GalleryItemContext.html new file mode 100644 index 00000000..796fdd5b --- /dev/null +++ b/documentation/interfaces/GalleryItemContext.html @@ -0,0 +1,571 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        +

                                                                                                        File

                                                                                                        +

                                                                                                        +

                                                                                                        + projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts +

                                                                                                        + + + + +
                                                                                                        +

                                                                                                        Index

                                                                                                        + + + + + + + + + +
                                                                                                        +
                                                                                                        Properties
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + +
                                                                                                        +

                                                                                                        Properties

                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + $implicit + + + + +
                                                                                                        + $implicit: T + +
                                                                                                        + Type : T + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        Data for the row that this cell is located within.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + active + + + + +
                                                                                                        + active: boolean + +
                                                                                                        + Type : boolean + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        True if this item is the active one.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + count + + + + +
                                                                                                        + count: number + +
                                                                                                        + Type : number + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        The number of total items.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + first + + + + +
                                                                                                        + first: boolean + +
                                                                                                        + Type : boolean + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        True if this item is first.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + index + + + + +
                                                                                                        + index: number + +
                                                                                                        + Type : number + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        Index of the item.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + last + + + + +
                                                                                                        + last: boolean + +
                                                                                                        + Type : boolean + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        True if this item is last.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + type + + + + +
                                                                                                        + type: GalleryItemType + +
                                                                                                        + Type : GalleryItemType + +
                                                                                                        + Optional +
                                                                                                        +

                                                                                                        The type of the item.

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        import { Directive, TemplateRef } from '@angular/core';
                                                                                                        +import { GalleryItemData } from '../components/templates/items.model';
                                                                                                        +import { GalleryItemType } from '../models/constants';
                                                                                                        +
                                                                                                        +@Directive({
                                                                                                        +  standalone: true,
                                                                                                        +  selector: '[galleryItemDef]'
                                                                                                        +})
                                                                                                        +export class GalleryItemDef {
                                                                                                        +  constructor(public templateRef: TemplateRef<GalleryItemContext<GalleryItemDef>>) {
                                                                                                        +  }
                                                                                                        +
                                                                                                        +  // Make sure the template checker knows the type of the context with which the
                                                                                                        +  // template of this directive will be rendered
                                                                                                        +  static ngTemplateContextGuard(
                                                                                                        +    directive: GalleryItemDef,
                                                                                                        +    context: unknown
                                                                                                        +  ): context is GalleryItemContext<GalleryItemData> {
                                                                                                        +    return true;
                                                                                                        +  }
                                                                                                        +}
                                                                                                        +
                                                                                                        +export interface GalleryItemContext<T> {
                                                                                                        +  /** Data for the row that this cell is located within. */
                                                                                                        +  $implicit?: T;
                                                                                                        +
                                                                                                        +  /** Index of the item. */
                                                                                                        +  index?: number;
                                                                                                        +
                                                                                                        +  /** The type of the item. */
                                                                                                        +  type?: GalleryItemType;
                                                                                                        +
                                                                                                        +  /** True if this item is the active one. */
                                                                                                        +  active?: boolean;
                                                                                                        +
                                                                                                        +  /** The number of total items. */
                                                                                                        +  count?: number;
                                                                                                        +
                                                                                                        +  /** True if this item is first. */
                                                                                                        +  first?: boolean;
                                                                                                        +
                                                                                                        +  /** True if this item is last. */
                                                                                                        +  last?: boolean;
                                                                                                        +}
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        results matching ""

                                                                                                        +
                                                                                                          +
                                                                                                          +
                                                                                                          +

                                                                                                          No results matching ""

                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryState.html b/documentation/interfaces/GalleryState.html new file mode 100644 index 00000000..29c7bdd5 --- /dev/null +++ b/documentation/interfaces/GalleryState.html @@ -0,0 +1,507 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                          +
                                                                                                          + + +
                                                                                                          +
                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                          +
                                                                                                          +

                                                                                                          +

                                                                                                          File

                                                                                                          +

                                                                                                          +

                                                                                                          + projects/ng-gallery/src/lib/models/gallery.model.ts +

                                                                                                          + + + + +
                                                                                                          +

                                                                                                          Index

                                                                                                          + + + + + + + + + +
                                                                                                          +
                                                                                                          Properties
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + +
                                                                                                          +

                                                                                                          Properties

                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + action + + + + +
                                                                                                          + action: GalleryAction + +
                                                                                                          + Type : GalleryAction + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + behavior + + + + +
                                                                                                          + behavior: ScrollBehavior + +
                                                                                                          + Type : ScrollBehavior + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + currIndex + + + + +
                                                                                                          + currIndex: number + +
                                                                                                          + Type : number + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + hasNext + + + + +
                                                                                                          + hasNext: boolean + +
                                                                                                          + Type : boolean + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + hasPrev + + + + +
                                                                                                          + hasPrev: boolean + +
                                                                                                          + Type : boolean + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + isPlaying + + + + +
                                                                                                          + isPlaying: boolean + +
                                                                                                          + Type : boolean + +
                                                                                                          + Optional +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + items + + + + +
                                                                                                          + items: GalleryItem[] + +
                                                                                                          + Type : GalleryItem[] + +
                                                                                                          + Optional +
                                                                                                          +
                                                                                                          +
                                                                                                          + + +
                                                                                                          +
                                                                                                          import { GalleryAction, GalleryItemType } from './constants';
                                                                                                          +import { GalleryItemData } from '../components/templates/items.model';
                                                                                                          +
                                                                                                          +export interface GalleryState {
                                                                                                          +  action?: GalleryAction;
                                                                                                          +  items?: GalleryItem[];
                                                                                                          +  behavior?: ScrollBehavior;
                                                                                                          +  currIndex?: number;
                                                                                                          +  hasNext?: boolean;
                                                                                                          +  hasPrev?: boolean;
                                                                                                          +  isPlaying?: boolean;
                                                                                                          +}
                                                                                                          +
                                                                                                          +export interface GalleryItem {
                                                                                                          +  data?: GalleryItemData;
                                                                                                          +  type?: GalleryItemType;
                                                                                                          +}
                                                                                                          +
                                                                                                          +export interface GalleryError {
                                                                                                          +  itemIndex: number;
                                                                                                          +  error: ErrorEvent;
                                                                                                          +}
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + + + + + + + +
                                                                                                          +
                                                                                                          +

                                                                                                          results matching ""

                                                                                                          +
                                                                                                            +
                                                                                                            +
                                                                                                            +

                                                                                                            No results matching ""

                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GalleryStateContext.html b/documentation/interfaces/GalleryStateContext.html new file mode 100644 index 00000000..4a669adc --- /dev/null +++ b/documentation/interfaces/GalleryStateContext.html @@ -0,0 +1,288 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                            +
                                                                                                            + + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                            +
                                                                                                            +

                                                                                                            +

                                                                                                            File

                                                                                                            +

                                                                                                            +

                                                                                                            + projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts +

                                                                                                            + + + + +
                                                                                                            +

                                                                                                            Index

                                                                                                            + + + + + + + + + +
                                                                                                            +
                                                                                                            Properties
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + +
                                                                                                            +

                                                                                                            Properties

                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + config + + + + +
                                                                                                            + config: GalleryConfig + +
                                                                                                            + Type : GalleryConfig + +
                                                                                                            + Optional +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + state + + + + +
                                                                                                            + state: GalleryState + +
                                                                                                            + Type : GalleryState + +
                                                                                                            + Optional +
                                                                                                            +
                                                                                                            +
                                                                                                            + + +
                                                                                                            +
                                                                                                            import { Directive, TemplateRef } from '@angular/core';
                                                                                                            +import { GalleryState } from '../models/gallery.model';
                                                                                                            +import { GalleryConfig } from '../models/config.model';
                                                                                                            +
                                                                                                            +
                                                                                                            +@Directive({
                                                                                                            +  standalone: true,
                                                                                                            +  selector: '[galleryBoxDef]'
                                                                                                            +})
                                                                                                            +export class GalleryBoxDef {
                                                                                                            +
                                                                                                            +  constructor(public templateRef: TemplateRef<GalleryStateContext>) {
                                                                                                            +  }
                                                                                                            +
                                                                                                            +  // Make sure the template checker knows the type of the context with which the
                                                                                                            +  // template of this directive will be rendered
                                                                                                            +  static ngTemplateContextGuard(
                                                                                                            +    directive: GalleryBoxDef,
                                                                                                            +    context: unknown
                                                                                                            +  ): context is GalleryStateContext {
                                                                                                            +    return true;
                                                                                                            +  }
                                                                                                            +}
                                                                                                            +
                                                                                                            +export interface GalleryStateContext {
                                                                                                            +  state?: GalleryState;
                                                                                                            +  config?: GalleryConfig;
                                                                                                            +}
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + + + + + + + +
                                                                                                            +
                                                                                                            +

                                                                                                            results matching ""

                                                                                                            +
                                                                                                              +
                                                                                                              +
                                                                                                              +

                                                                                                              No results matching ""

                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Hit.html b/documentation/interfaces/Hit.html new file mode 100644 index 00000000..ad5d1eee --- /dev/null +++ b/documentation/interfaces/Hit.html @@ -0,0 +1,1043 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                              +
                                                                                                              + + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                              +
                                                                                                              +

                                                                                                              +

                                                                                                              File

                                                                                                              +

                                                                                                              +

                                                                                                              + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +

                                                                                                              + + + + +
                                                                                                              +

                                                                                                              Index

                                                                                                              + + + + + + + + + +
                                                                                                              +
                                                                                                              Properties
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + +
                                                                                                              +

                                                                                                              Properties

                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + comments + + + + +
                                                                                                              + comments: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + downloads + + + + +
                                                                                                              + downloads: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + favorites + + + + +
                                                                                                              + favorites: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + id + + + + +
                                                                                                              + id: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + imageHeight + + + + +
                                                                                                              + imageHeight: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + imageSize + + + + +
                                                                                                              + imageSize: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + imageWidth + + + + +
                                                                                                              + imageWidth: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + likes + + + + +
                                                                                                              + likes: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + pageURL + + + + +
                                                                                                              + pageURL: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + previewHeight + + + + +
                                                                                                              + previewHeight: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + previewURL + + + + +
                                                                                                              + previewURL: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + previewWidth + + + + +
                                                                                                              + previewWidth: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + tags + + + + +
                                                                                                              + tags: string[] + +
                                                                                                              + Type : string[] + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + type + + + + +
                                                                                                              + type: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + user + + + + +
                                                                                                              + user: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + user_id + + + + +
                                                                                                              + user_id: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + userImageURL + + + + +
                                                                                                              + userImageURL: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + views + + + + +
                                                                                                              + views: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + webformatHeight + + + + +
                                                                                                              + webformatHeight: number + +
                                                                                                              + Type : number + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + webformatURL + + + + +
                                                                                                              + webformatURL: string + +
                                                                                                              + Type : string + +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + webformatWidth + + + + +
                                                                                                              + webformatWidth: number + +
                                                                                                              + Type : number + +
                                                                                                              +
                                                                                                              +
                                                                                                              + + +
                                                                                                              +
                                                                                                              export interface PixabayModel {
                                                                                                              +  total: number;
                                                                                                              +  totalHits: number;
                                                                                                              +  hits: Hit[];
                                                                                                              +}
                                                                                                              +
                                                                                                              +export interface Hit {
                                                                                                              +  id: number;
                                                                                                              +  pageURL: string;
                                                                                                              +  type: string;
                                                                                                              +  tags: string[];
                                                                                                              +  previewURL: string;
                                                                                                              +  previewWidth: number;
                                                                                                              +  previewHeight: number;
                                                                                                              +  webformatURL: string;
                                                                                                              +  webformatWidth: number;
                                                                                                              +  webformatHeight: number;
                                                                                                              +  imageWidth: number;
                                                                                                              +  imageHeight: number;
                                                                                                              +  imageSize: number;
                                                                                                              +  views: number;
                                                                                                              +  downloads: number;
                                                                                                              +  favorites: number;
                                                                                                              +  likes: number;
                                                                                                              +  comments: number;
                                                                                                              +  user_id: number;
                                                                                                              +  user: string;
                                                                                                              +  userImageURL: string;
                                                                                                              +}
                                                                                                              +export interface PixabayHDModel {
                                                                                                              +  total: number;
                                                                                                              +  totalHits: number;
                                                                                                              +  hits: Hit2[];
                                                                                                              +}
                                                                                                              +
                                                                                                              +export interface Hit2 {
                                                                                                              +  id_hash: string;
                                                                                                              +  type: string;
                                                                                                              +  previewURL: string;
                                                                                                              +  previewWidth: number;
                                                                                                              +  previewHeight: number;
                                                                                                              +  webformatURL: string;
                                                                                                              +  webformatWidth: number;
                                                                                                              +  webformatHeight: number;
                                                                                                              +  largeImageURL: string;
                                                                                                              +  fullHDURL: string;
                                                                                                              +  imageWidth: number;
                                                                                                              +  imageHeight: number;
                                                                                                              +  imageSize: number;
                                                                                                              +  imageURL: string;
                                                                                                              +  user_id: number;
                                                                                                              +  user: string;
                                                                                                              +  userImageURL: string;
                                                                                                              +}
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + + + + + + + +
                                                                                                              +
                                                                                                              +

                                                                                                              results matching ""

                                                                                                              +
                                                                                                                +
                                                                                                                +
                                                                                                                +

                                                                                                                No results matching ""

                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Hit2.html b/documentation/interfaces/Hit2.html new file mode 100644 index 00000000..c227cdfd --- /dev/null +++ b/documentation/interfaces/Hit2.html @@ -0,0 +1,887 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                +
                                                                                                                + + +
                                                                                                                +
                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                +
                                                                                                                +

                                                                                                                +

                                                                                                                File

                                                                                                                +

                                                                                                                +

                                                                                                                + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +

                                                                                                                + + + + +
                                                                                                                +

                                                                                                                Index

                                                                                                                + + + + + + + + + +
                                                                                                                +
                                                                                                                Properties
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + +
                                                                                                                +

                                                                                                                Properties

                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + fullHDURL + + + + +
                                                                                                                + fullHDURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + id_hash + + + + +
                                                                                                                + id_hash: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + imageHeight + + + + +
                                                                                                                + imageHeight: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + imageSize + + + + +
                                                                                                                + imageSize: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + imageURL + + + + +
                                                                                                                + imageURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + imageWidth + + + + +
                                                                                                                + imageWidth: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + largeImageURL + + + + +
                                                                                                                + largeImageURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + previewHeight + + + + +
                                                                                                                + previewHeight: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + previewURL + + + + +
                                                                                                                + previewURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + previewWidth + + + + +
                                                                                                                + previewWidth: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + type + + + + +
                                                                                                                + type: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + user + + + + +
                                                                                                                + user: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + user_id + + + + +
                                                                                                                + user_id: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + userImageURL + + + + +
                                                                                                                + userImageURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + webformatHeight + + + + +
                                                                                                                + webformatHeight: number + +
                                                                                                                + Type : number + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + webformatURL + + + + +
                                                                                                                + webformatURL: string + +
                                                                                                                + Type : string + +
                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + webformatWidth + + + + +
                                                                                                                + webformatWidth: number + +
                                                                                                                + Type : number + +
                                                                                                                +
                                                                                                                +
                                                                                                                + + +
                                                                                                                +
                                                                                                                export interface PixabayModel {
                                                                                                                +  total: number;
                                                                                                                +  totalHits: number;
                                                                                                                +  hits: Hit[];
                                                                                                                +}
                                                                                                                +
                                                                                                                +export interface Hit {
                                                                                                                +  id: number;
                                                                                                                +  pageURL: string;
                                                                                                                +  type: string;
                                                                                                                +  tags: string[];
                                                                                                                +  previewURL: string;
                                                                                                                +  previewWidth: number;
                                                                                                                +  previewHeight: number;
                                                                                                                +  webformatURL: string;
                                                                                                                +  webformatWidth: number;
                                                                                                                +  webformatHeight: number;
                                                                                                                +  imageWidth: number;
                                                                                                                +  imageHeight: number;
                                                                                                                +  imageSize: number;
                                                                                                                +  views: number;
                                                                                                                +  downloads: number;
                                                                                                                +  favorites: number;
                                                                                                                +  likes: number;
                                                                                                                +  comments: number;
                                                                                                                +  user_id: number;
                                                                                                                +  user: string;
                                                                                                                +  userImageURL: string;
                                                                                                                +}
                                                                                                                +export interface PixabayHDModel {
                                                                                                                +  total: number;
                                                                                                                +  totalHits: number;
                                                                                                                +  hits: Hit2[];
                                                                                                                +}
                                                                                                                +
                                                                                                                +export interface Hit2 {
                                                                                                                +  id_hash: string;
                                                                                                                +  type: string;
                                                                                                                +  previewURL: string;
                                                                                                                +  previewWidth: number;
                                                                                                                +  previewHeight: number;
                                                                                                                +  webformatURL: string;
                                                                                                                +  webformatWidth: number;
                                                                                                                +  webformatHeight: number;
                                                                                                                +  largeImageURL: string;
                                                                                                                +  fullHDURL: string;
                                                                                                                +  imageWidth: number;
                                                                                                                +  imageHeight: number;
                                                                                                                +  imageSize: number;
                                                                                                                +  imageURL: string;
                                                                                                                +  user_id: number;
                                                                                                                +  user: string;
                                                                                                                +  userImageURL: string;
                                                                                                                +}
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                + + + + + + + +
                                                                                                                +
                                                                                                                +

                                                                                                                results matching ""

                                                                                                                +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  No results matching ""

                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ImageRegistry.html b/documentation/interfaces/ImageRegistry.html new file mode 100644 index 00000000..c30330a3 --- /dev/null +++ b/documentation/interfaces/ImageRegistry.html @@ -0,0 +1,294 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                  +
                                                                                                                  + + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  +

                                                                                                                  File

                                                                                                                  +

                                                                                                                  +

                                                                                                                  + projects/ng-gallery/src/lib/utils/img-manager.ts +

                                                                                                                  + + + + +
                                                                                                                  +

                                                                                                                  Index

                                                                                                                  + + + + + + + + + +
                                                                                                                  +
                                                                                                                  Properties
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + +
                                                                                                                  +

                                                                                                                  Properties

                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + state + + + + +
                                                                                                                  + state: Observable<ItemState> + +
                                                                                                                  + Type : Observable<ItemState> + +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + target + + + + +
                                                                                                                  + target: HTMLImageElement + +
                                                                                                                  + Type : HTMLImageElement + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + + +
                                                                                                                  +
                                                                                                                  import { Injectable } from '@angular/core';
                                                                                                                  +import { Observable, BehaviorSubject, filter, map, switchMap, EMPTY } from 'rxjs';
                                                                                                                  +import { GalleryState } from '../models/gallery.model';
                                                                                                                  +import { ItemState } from '../components/templates/items.model';
                                                                                                                  +
                                                                                                                  +interface ImageRegistry {
                                                                                                                  +  state: Observable<ItemState>;
                                                                                                                  +  target: HTMLImageElement;
                                                                                                                  +}
                                                                                                                  +
                                                                                                                  +@Injectable()
                                                                                                                  +export class ImgManager {
                                                                                                                  +
                                                                                                                  +  private readonly trigger$: BehaviorSubject<void> = new BehaviorSubject<void>(null);
                                                                                                                  +
                                                                                                                  +  private readonly images: Map<number, ImageRegistry> = new Map<number, ImageRegistry>();
                                                                                                                  +
                                                                                                                  +  getActiveItem(state$: Observable<GalleryState>): Observable<HTMLImageElement> {
                                                                                                                  +    return this.trigger$.pipe(
                                                                                                                  +      switchMap(() => state$.pipe(
                                                                                                                  +        switchMap((state: GalleryState) => {
                                                                                                                  +          const img: ImageRegistry = this.images.get(state.currIndex);
                                                                                                                  +          if (img) {
                                                                                                                  +            return img.state.pipe(
                                                                                                                  +              filter((state: ItemState) => state !== 'loading'),
                                                                                                                  +              map(() => img.target)
                                                                                                                  +            )
                                                                                                                  +          }
                                                                                                                  +          return EMPTY;
                                                                                                                  +        })
                                                                                                                  +      ))
                                                                                                                  +    );
                                                                                                                  +  }
                                                                                                                  +
                                                                                                                  +  addItem(index: number, payload: ImageRegistry): void {
                                                                                                                  +    this.images.set(index, payload);
                                                                                                                  +    this.trigger$.next();
                                                                                                                  +  }
                                                                                                                  +
                                                                                                                  +  deleteItem(index: number): void {
                                                                                                                  +    if (this.images.has(index)) {
                                                                                                                  +      this.images.delete(index);
                                                                                                                  +      this.trigger$.next();
                                                                                                                  +    }
                                                                                                                  +  }
                                                                                                                  +}
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + + + + + + + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  results matching ""

                                                                                                                  +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    No results matching ""

                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/LightboxConfig.html b/documentation/interfaces/LightboxConfig.html new file mode 100644 index 00000000..bd218332 --- /dev/null +++ b/documentation/interfaces/LightboxConfig.html @@ -0,0 +1,682 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                    +
                                                                                                                    + + +
                                                                                                                    +
                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    +

                                                                                                                    File

                                                                                                                    +

                                                                                                                    +

                                                                                                                    + projects/ng-gallery/lightbox/src/lightbox.model.ts +

                                                                                                                    + + + + +
                                                                                                                    +

                                                                                                                    Index

                                                                                                                    + + + + + + + + + +
                                                                                                                    +
                                                                                                                    Properties
                                                                                                                    +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + + + +
                                                                                                                    +

                                                                                                                    Properties

                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + ariaDescribedBy + + + + +
                                                                                                                    + ariaDescribedBy: string + +
                                                                                                                    + Type : string + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + ariaLabel + + + + +
                                                                                                                    + ariaLabel: string + +
                                                                                                                    + Type : string + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + ariaLabelledBy + + + + +
                                                                                                                    + ariaLabelledBy: string + +
                                                                                                                    + Type : string + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + backdropClass + + + + +
                                                                                                                    + backdropClass: string | string[] + +
                                                                                                                    + Type : string | string[] + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + closeIcon + + + + +
                                                                                                                    + closeIcon: string + +
                                                                                                                    + Type : string + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + exitAnimationTime + + + + +
                                                                                                                    + exitAnimationTime: number + +
                                                                                                                    + Type : number + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + hasBackdrop + + + + +
                                                                                                                    + hasBackdrop: boolean + +
                                                                                                                    + Type : boolean + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + keyboardShortcuts + + + + +
                                                                                                                    + keyboardShortcuts: boolean + +
                                                                                                                    + Type : boolean + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + panelClass + + + + +
                                                                                                                    + panelClass: string | string[] + +
                                                                                                                    + Type : string | string[] + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + role + + + + +
                                                                                                                    + role: string + +
                                                                                                                    + Type : string + +
                                                                                                                    + Optional +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    + + startAnimationTime + + + + +
                                                                                                                    + startAnimationTime: number + +
                                                                                                                    + Type : number + +
                                                                                                                    + Optional +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + +
                                                                                                                    +
                                                                                                                    import { InjectionToken } from '@angular/core';
                                                                                                                    +
                                                                                                                    +export const LIGHTBOX_CONFIG = new InjectionToken<LightboxConfig>('LIGHTBOX_CONFIG');
                                                                                                                    +
                                                                                                                    +export interface LightboxConfig {
                                                                                                                    +  backdropClass?: string | string[];
                                                                                                                    +  panelClass?: string | string[];
                                                                                                                    +  hasBackdrop?: boolean;
                                                                                                                    +  keyboardShortcuts?: boolean;
                                                                                                                    +  closeIcon?: string;
                                                                                                                    +  role?: string;
                                                                                                                    +  ariaLabelledBy?: string;
                                                                                                                    +  ariaLabel?: string;
                                                                                                                    +  ariaDescribedBy?: string;
                                                                                                                    +  startAnimationTime?: number;
                                                                                                                    +  exitAnimationTime?: number;
                                                                                                                    +}
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + + + + + + +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    results matching ""

                                                                                                                    +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      No results matching ""

                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PixabayHDModel.html b/documentation/interfaces/PixabayHDModel.html new file mode 100644 index 00000000..6a41d884 --- /dev/null +++ b/documentation/interfaces/PixabayHDModel.html @@ -0,0 +1,341 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                      +
                                                                                                                      + + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      +

                                                                                                                      File

                                                                                                                      +

                                                                                                                      +

                                                                                                                      + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +

                                                                                                                      + + + + +
                                                                                                                      +

                                                                                                                      Index

                                                                                                                      + + + + + + + + + +
                                                                                                                      +
                                                                                                                      Properties
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + + + +
                                                                                                                      +

                                                                                                                      Properties

                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + hits + + + + +
                                                                                                                      + hits: Hit2[] + +
                                                                                                                      + Type : Hit2[] + +
                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + total + + + + +
                                                                                                                      + total: number + +
                                                                                                                      + Type : number + +
                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + totalHits + + + + +
                                                                                                                      + totalHits: number + +
                                                                                                                      + Type : number + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + +
                                                                                                                      +
                                                                                                                      export interface PixabayModel {
                                                                                                                      +  total: number;
                                                                                                                      +  totalHits: number;
                                                                                                                      +  hits: Hit[];
                                                                                                                      +}
                                                                                                                      +
                                                                                                                      +export interface Hit {
                                                                                                                      +  id: number;
                                                                                                                      +  pageURL: string;
                                                                                                                      +  type: string;
                                                                                                                      +  tags: string[];
                                                                                                                      +  previewURL: string;
                                                                                                                      +  previewWidth: number;
                                                                                                                      +  previewHeight: number;
                                                                                                                      +  webformatURL: string;
                                                                                                                      +  webformatWidth: number;
                                                                                                                      +  webformatHeight: number;
                                                                                                                      +  imageWidth: number;
                                                                                                                      +  imageHeight: number;
                                                                                                                      +  imageSize: number;
                                                                                                                      +  views: number;
                                                                                                                      +  downloads: number;
                                                                                                                      +  favorites: number;
                                                                                                                      +  likes: number;
                                                                                                                      +  comments: number;
                                                                                                                      +  user_id: number;
                                                                                                                      +  user: string;
                                                                                                                      +  userImageURL: string;
                                                                                                                      +}
                                                                                                                      +export interface PixabayHDModel {
                                                                                                                      +  total: number;
                                                                                                                      +  totalHits: number;
                                                                                                                      +  hits: Hit2[];
                                                                                                                      +}
                                                                                                                      +
                                                                                                                      +export interface Hit2 {
                                                                                                                      +  id_hash: string;
                                                                                                                      +  type: string;
                                                                                                                      +  previewURL: string;
                                                                                                                      +  previewWidth: number;
                                                                                                                      +  previewHeight: number;
                                                                                                                      +  webformatURL: string;
                                                                                                                      +  webformatWidth: number;
                                                                                                                      +  webformatHeight: number;
                                                                                                                      +  largeImageURL: string;
                                                                                                                      +  fullHDURL: string;
                                                                                                                      +  imageWidth: number;
                                                                                                                      +  imageHeight: number;
                                                                                                                      +  imageSize: number;
                                                                                                                      +  imageURL: string;
                                                                                                                      +  user_id: number;
                                                                                                                      +  user: string;
                                                                                                                      +  userImageURL: string;
                                                                                                                      +}
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + + + + + + +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      results matching ""

                                                                                                                      +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        No results matching ""

                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PixabayModel.html b/documentation/interfaces/PixabayModel.html new file mode 100644 index 00000000..afca5f8d --- /dev/null +++ b/documentation/interfaces/PixabayModel.html @@ -0,0 +1,341 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        +
                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        +

                                                                                                                        File

                                                                                                                        +

                                                                                                                        +

                                                                                                                        + projects/ng-gallery/src/stories/pixabay/pixabay.model.ts +

                                                                                                                        + + + + +
                                                                                                                        +

                                                                                                                        Index

                                                                                                                        + + + + + + + + + +
                                                                                                                        +
                                                                                                                        Properties
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + + +
                                                                                                                        +

                                                                                                                        Properties

                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                        + + hits + + + + +
                                                                                                                        + hits: Hit[] + +
                                                                                                                        + Type : Hit[] + +
                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                        + + total + + + + +
                                                                                                                        + total: number + +
                                                                                                                        + Type : number + +
                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                        + + totalHits + + + + +
                                                                                                                        + totalHits: number + +
                                                                                                                        + Type : number + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        +
                                                                                                                        export interface PixabayModel {
                                                                                                                        +  total: number;
                                                                                                                        +  totalHits: number;
                                                                                                                        +  hits: Hit[];
                                                                                                                        +}
                                                                                                                        +
                                                                                                                        +export interface Hit {
                                                                                                                        +  id: number;
                                                                                                                        +  pageURL: string;
                                                                                                                        +  type: string;
                                                                                                                        +  tags: string[];
                                                                                                                        +  previewURL: string;
                                                                                                                        +  previewWidth: number;
                                                                                                                        +  previewHeight: number;
                                                                                                                        +  webformatURL: string;
                                                                                                                        +  webformatWidth: number;
                                                                                                                        +  webformatHeight: number;
                                                                                                                        +  imageWidth: number;
                                                                                                                        +  imageHeight: number;
                                                                                                                        +  imageSize: number;
                                                                                                                        +  views: number;
                                                                                                                        +  downloads: number;
                                                                                                                        +  favorites: number;
                                                                                                                        +  likes: number;
                                                                                                                        +  comments: number;
                                                                                                                        +  user_id: number;
                                                                                                                        +  user: string;
                                                                                                                        +  userImageURL: string;
                                                                                                                        +}
                                                                                                                        +export interface PixabayHDModel {
                                                                                                                        +  total: number;
                                                                                                                        +  totalHits: number;
                                                                                                                        +  hits: Hit2[];
                                                                                                                        +}
                                                                                                                        +
                                                                                                                        +export interface Hit2 {
                                                                                                                        +  id_hash: string;
                                                                                                                        +  type: string;
                                                                                                                        +  previewURL: string;
                                                                                                                        +  previewWidth: number;
                                                                                                                        +  previewHeight: number;
                                                                                                                        +  webformatURL: string;
                                                                                                                        +  webformatWidth: number;
                                                                                                                        +  webformatHeight: number;
                                                                                                                        +  largeImageURL: string;
                                                                                                                        +  fullHDURL: string;
                                                                                                                        +  imageWidth: number;
                                                                                                                        +  imageHeight: number;
                                                                                                                        +  imageSize: number;
                                                                                                                        +  imageURL: string;
                                                                                                                        +  user_id: number;
                                                                                                                        +  user: string;
                                                                                                                        +  userImageURL: string;
                                                                                                                        +}
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + + + + + + +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        results matching ""

                                                                                                                        +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          No results matching ""

                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SliderState.html b/documentation/interfaces/SliderState.html new file mode 100644 index 00000000..0fa0d33b --- /dev/null +++ b/documentation/interfaces/SliderState.html @@ -0,0 +1,257 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          +

                                                                                                                          File

                                                                                                                          +

                                                                                                                          +

                                                                                                                          + projects/ng-gallery/src/lib/models/slider.model.ts +

                                                                                                                          + + + + +
                                                                                                                          +

                                                                                                                          Index

                                                                                                                          + + + + + + + + + +
                                                                                                                          +
                                                                                                                          Properties
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + +
                                                                                                                          +

                                                                                                                          Properties

                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + instant + + + + +
                                                                                                                          + instant: boolean + +
                                                                                                                          + Type : boolean + +
                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + style + + + + +
                                                                                                                          + style: any + +
                                                                                                                          + Type : any + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          +
                                                                                                                          export interface SliderState {
                                                                                                                          +  style: any;
                                                                                                                          +  instant: boolean;
                                                                                                                          +}
                                                                                                                          +
                                                                                                                          +export interface WorkerState {
                                                                                                                          +  value: number;
                                                                                                                          +  instant: boolean;
                                                                                                                          +}
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + + + +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          results matching ""

                                                                                                                          +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            No results matching ""

                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SmoothScrollOptions.html b/documentation/interfaces/SmoothScrollOptions.html new file mode 100644 index 00000000..fbb8a2bd --- /dev/null +++ b/documentation/interfaces/SmoothScrollOptions.html @@ -0,0 +1,291 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                            +
                                                                                                                            + + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            +

                                                                                                                            File

                                                                                                                            +

                                                                                                                            +

                                                                                                                            + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +

                                                                                                                            + + + + +
                                                                                                                            +

                                                                                                                            Index

                                                                                                                            + + + + + + + + + +
                                                                                                                            +
                                                                                                                            Properties
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + +
                                                                                                                            +

                                                                                                                            Properties

                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                            + + duration + + + + +
                                                                                                                            + duration: number + +
                                                                                                                            + Type : number + +
                                                                                                                            + Optional +
                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                            + + easing + + + + +
                                                                                                                            + easing: BezierEasingOptions + +
                                                                                                                            + Type : BezierEasingOptions + +
                                                                                                                            + Optional +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + +
                                                                                                                            +
                                                                                                                            import { InjectionToken } from '@angular/core';
                                                                                                                            +import { _XAxis, _YAxis } from '@angular/cdk/scrolling';
                                                                                                                            +
                                                                                                                            +export const SMOOTH_SCROLL_OPTIONS: InjectionToken<SmoothScrollOptions> = new InjectionToken<SmoothScrollOptions>('SMOOTH_SCROLL_OPTIONS');
                                                                                                                            +
                                                                                                                            +export type SmoothScrollToOptions = _XAxis & _YAxis & SmoothScrollOptions;
                                                                                                                            +
                                                                                                                            +export interface SmoothScrollOptions {
                                                                                                                            +  duration?: number;
                                                                                                                            +  easing?: BezierEasingOptions;
                                                                                                                            +}
                                                                                                                            +
                                                                                                                            +export interface SmoothScrollStep {
                                                                                                                            +  scrollable: HTMLElement;
                                                                                                                            +  startTime: number;
                                                                                                                            +  startX: number;
                                                                                                                            +  startY: number;
                                                                                                                            +  x: number;
                                                                                                                            +  y: number;
                                                                                                                            +  duration: number;
                                                                                                                            +  easing: (k: number) => number;
                                                                                                                            +  currentX?: number;
                                                                                                                            +  currentY?: number;
                                                                                                                            +}
                                                                                                                            +
                                                                                                                            +export interface BezierEasingOptions {
                                                                                                                            +  x1: number;
                                                                                                                            +  y1: number;
                                                                                                                            +  x2: number;
                                                                                                                            +  y2: number;
                                                                                                                            +}
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + + + + + + +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            results matching ""

                                                                                                                            +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              No results matching ""

                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SmoothScrollStep.html b/documentation/interfaces/SmoothScrollStep.html new file mode 100644 index 00000000..cfd9e792 --- /dev/null +++ b/documentation/interfaces/SmoothScrollStep.html @@ -0,0 +1,603 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                              +
                                                                                                                              + + +
                                                                                                                              +
                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              +

                                                                                                                              File

                                                                                                                              +

                                                                                                                              +

                                                                                                                              + projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +

                                                                                                                              + + + + +
                                                                                                                              +

                                                                                                                              Index

                                                                                                                              + + + + + + + + + +
                                                                                                                              +
                                                                                                                              Properties
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + + +
                                                                                                                              +

                                                                                                                              Properties

                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + currentX + + + + +
                                                                                                                              + currentX: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + Optional +
                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + currentY + + + + +
                                                                                                                              + currentY: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + Optional +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + duration + + + + +
                                                                                                                              + duration: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + easing + + + + +
                                                                                                                              + easing: function + +
                                                                                                                              + Type : function + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + scrollable + + + + +
                                                                                                                              + scrollable: HTMLElement + +
                                                                                                                              + Type : HTMLElement + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + startTime + + + + +
                                                                                                                              + startTime: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + startX + + + + +
                                                                                                                              + startX: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + startY + + + + +
                                                                                                                              + startY: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + x + + + + +
                                                                                                                              + x: number + +
                                                                                                                              + Type : number + +
                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                              + + y + + + + +
                                                                                                                              + y: number + +
                                                                                                                              + Type : number + +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + + +
                                                                                                                              +
                                                                                                                              import { InjectionToken } from '@angular/core';
                                                                                                                              +import { _XAxis, _YAxis } from '@angular/cdk/scrolling';
                                                                                                                              +
                                                                                                                              +export const SMOOTH_SCROLL_OPTIONS: InjectionToken<SmoothScrollOptions> = new InjectionToken<SmoothScrollOptions>('SMOOTH_SCROLL_OPTIONS');
                                                                                                                              +
                                                                                                                              +export type SmoothScrollToOptions = _XAxis & _YAxis & SmoothScrollOptions;
                                                                                                                              +
                                                                                                                              +export interface SmoothScrollOptions {
                                                                                                                              +  duration?: number;
                                                                                                                              +  easing?: BezierEasingOptions;
                                                                                                                              +}
                                                                                                                              +
                                                                                                                              +export interface SmoothScrollStep {
                                                                                                                              +  scrollable: HTMLElement;
                                                                                                                              +  startTime: number;
                                                                                                                              +  startX: number;
                                                                                                                              +  startY: number;
                                                                                                                              +  x: number;
                                                                                                                              +  y: number;
                                                                                                                              +  duration: number;
                                                                                                                              +  easing: (k: number) => number;
                                                                                                                              +  currentX?: number;
                                                                                                                              +  currentY?: number;
                                                                                                                              +}
                                                                                                                              +
                                                                                                                              +export interface BezierEasingOptions {
                                                                                                                              +  x1: number;
                                                                                                                              +  y1: number;
                                                                                                                              +  x2: number;
                                                                                                                              +  y2: number;
                                                                                                                              +}
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + + + + + + + +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              results matching ""

                                                                                                                              +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                No results matching ""

                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/WorkerState.html b/documentation/interfaces/WorkerState.html new file mode 100644 index 00000000..f62bae5b --- /dev/null +++ b/documentation/interfaces/WorkerState.html @@ -0,0 +1,257 @@ + + + + + + ng-gallery-project documentation + + + + + + + + + + + + + +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                +
                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                +

                                                                                                                                File

                                                                                                                                +

                                                                                                                                +

                                                                                                                                + projects/ng-gallery/src/lib/models/slider.model.ts +

                                                                                                                                + + + + +
                                                                                                                                +

                                                                                                                                Index

                                                                                                                                + + + + + + + + + +
                                                                                                                                +
                                                                                                                                Properties
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + + + +
                                                                                                                                +

                                                                                                                                Properties

                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                + + instant + + + + +
                                                                                                                                + instant: boolean + +
                                                                                                                                + Type : boolean + +
                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                + + value + + + + +
                                                                                                                                + value: number + +
                                                                                                                                + Type : number + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                +
                                                                                                                                export interface SliderState {
                                                                                                                                +  style: any;
                                                                                                                                +  instant: boolean;
                                                                                                                                +}
                                                                                                                                +
                                                                                                                                +export interface WorkerState {
                                                                                                                                +  value: number;
                                                                                                                                +  instant: boolean;
                                                                                                                                +}
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + + + + + + +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                results matching ""

                                                                                                                                +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  No results matching ""

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/js/compodoc.js b/documentation/js/compodoc.js new file mode 100644 index 00000000..8cc41d33 --- /dev/null +++ b/documentation/js/compodoc.js @@ -0,0 +1,14 @@ +var compodoc = { + EVENTS: { + READY: 'compodoc.ready', + SEARCH_READY: 'compodoc.search.ready' + } +}; + +Object.assign( compodoc, EventDispatcher.prototype ); + +document.addEventListener('DOMContentLoaded', function() { + compodoc.dispatchEvent({ + type: compodoc.EVENTS.READY + }); +}); diff --git a/documentation/js/lazy-load-graphs.js b/documentation/js/lazy-load-graphs.js new file mode 100644 index 00000000..2ef47cab --- /dev/null +++ b/documentation/js/lazy-load-graphs.js @@ -0,0 +1,44 @@ +document.addEventListener('DOMContentLoaded', function() { + var lazyGraphs = [].slice.call(document.querySelectorAll('[lazy]')); + var active = false; + + var lazyLoad = function() { + if (active === false) { + active = true; + + setTimeout(function() { + lazyGraphs.forEach(function(lazyGraph) { + if ( + lazyGraph.getBoundingClientRect().top <= window.innerHeight && + lazyGraph.getBoundingClientRect().bottom >= 0 && + getComputedStyle(lazyGraph).display !== 'none' + ) { + lazyGraph.data = lazyGraph.getAttribute('lazy'); + lazyGraph.removeAttribute('lazy'); + + lazyGraphs = lazyGraphs.filter(function(image) { return image !== lazyGraph}); + + if (lazyGraphs.length === 0) { + document.removeEventListener('scroll', lazyLoad); + window.removeEventListener('resize', lazyLoad); + window.removeEventListener('orientationchange', lazyLoad); + } + } + }); + + active = false; + }, 200); + } + }; + + // initial load + lazyLoad(); + + var container = document.querySelector('.container-fluid.modules'); + if (container) { + container.addEventListener('scroll', lazyLoad); + window.addEventListener('resize', lazyLoad); + window.addEventListener('orientationchange', lazyLoad); + } + +}); diff --git a/documentation/js/libs/EventDispatcher.js b/documentation/js/libs/EventDispatcher.js new file mode 100644 index 00000000..f112877d --- /dev/null +++ b/documentation/js/libs/EventDispatcher.js @@ -0,0 +1,5 @@ +/** + * @author mrdoob / http://mrdoob.com/ + */ + +var EventDispatcher=function(){};Object.assign(EventDispatcher.prototype,{addEventListener:function(i,t){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[i]&&(e[i]=[]),-1===e[i].indexOf(t)&&e[i].push(t)},hasEventListener:function(i,t){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[i]&&-1!==e[i].indexOf(t)},removeEventListener:function(i,t){if(void 0!==this._listeners){var e=this._listeners[i];if(void 0!==e){var s=e.indexOf(t);-1!==s&&e.splice(s,1)}}},dispatchEvent:function(i){if(void 0!==this._listeners){var t=this._listeners[i.type];if(void 0!==t){i.target=this;var e=[],s=0,n=t.length;for(s=0;s1?t[t.length-1]:void 0:t[0]},this.getActiveContent=function(){var t=this.getActiveTab().getElementsByTagName("A")[0].getAttribute("href").replace("#","");return t&&document.getElementById("c-"+t)},this.tab.addEventListener("click",this.handle,!1)},d=document.querySelectorAll("[data-toggle='tab'], [data-toggle='pill']"),u=0,h=d.length;u0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])}); \ No newline at end of file diff --git a/documentation/js/libs/custom-elements-es5-adapter.js b/documentation/js/libs/custom-elements-es5-adapter.js new file mode 100644 index 00000000..3a694b8f --- /dev/null +++ b/documentation/js/libs/custom-elements-es5-adapter.js @@ -0,0 +1,15 @@ +/** +@license @nocompile +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +(function () { + 'use strict'; + + (function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))return;const a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)},HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})(); + +}()); diff --git a/documentation/js/libs/custom-elements.min.js b/documentation/js/libs/custom-elements.min.js new file mode 100644 index 00000000..9b64a23c --- /dev/null +++ b/documentation/js/libs/custom-elements.min.js @@ -0,0 +1,38 @@ +(function(){ + 'use strict';var h=new function(){};var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function m(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(b);return!a&&b}function n(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))} + function p(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null} + function t(b,a,c){c=c?c:new Set;for(var d=b;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;a(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)t(d,a,c);d=p(b,e);continue}else if("template"===f){d=p(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,a,c)}d=d.firstChild?d.firstChild:p(b,d)}}function u(b,a,c){b[a]=c};function v(){this.a=new Map;this.s=new Map;this.f=[];this.b=!1}function ba(b,a,c){b.a.set(a,c);b.s.set(c.constructor,c)}function w(b,a){b.b=!0;b.f.push(a)}function x(b,a){b.b&&t(a,function(a){return y(b,a)})}function y(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var c=0;ct?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===ho||n[0]===po?po+n:n}function s(n){return(n+="")[0]===po?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function d(){var n=0;for(var t in this._)++n;return n}function v(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function x(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function M(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=go.length;e=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var c=ko.get(n);return c&&(n=c,l=B),a?t?i:r:t?_:u}function $(n,t){return function(e){var r=to.event;to.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{to.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Eo,i="click"+r,u=to.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==No&&(No=!("onselectstart"in e)&&M(e.style,"userSelect")),No){var o=n(e).style,a=o[No];o[No]="none"}return function(n){if(u.on(r,null),No&&(o[No]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ao<0){var u=t(n);if(u.scrollX||u.scrollY){var o=(r=to.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Ao=!(o.f||o.e),r.remove()}}return Ao?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return to.event.changedTouches[0].identifier}function K(n){return n>0?1:n<0?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:n<-1?Lo:Math.acos(n)}function tn(n){return n>1?Ro:n<-1?-Ro:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):bn(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?u+(o-u)*n/60:n<180?o:n<240?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=to.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Do)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=dn(i)*Zo,r=dn(r)*Vo,u=dn(u)*Xo,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Po,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function dn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):bn(""+n,mn,cn):new mn(n,t,e)}function xn(n){return new mn(n>>16,n>>8&255,255&n)}function Mn(n){return xn(n)+""}function _n(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bn(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=Wo.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t0&&l<1?0:r),new ln(r,i,l)}function Sn(n,t,e){var r=vn((.4124564*(n=kn(n))+.3575761*(t=kn(t))+.1804375*(e=kn(e)))/Zo),i=vn((.2126729*n+.7151522*t+.072175*e)/Vo);return hn(116*i-16,500*(r-i),200*(i-vn((.0193339*n+.119192*t+.9503041*e)/Xo)))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&t<300||304===t){try{n=e.call(u,l)}catch(n){return void o.error.call(u,n)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=to.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=to.event;to.event=n;try{o.progress.call(u,l)}finally{to.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(ro(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},to.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i={c:n,t:e+t,n:null};return Go?Go.n=i:Jo=i,Go=i,Ko||(Qo=clearTimeout(Qo),Ko=1,na(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(Qo),Qo=setTimeout(Tn,t)),Ko=0):(Ko=1,na(Tn))}function Rn(){for(var n=Date.now(),t=Jo;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=Jo,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Un(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ea.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,d="",v="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,v="%",p="f";break;case"p":g=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(d="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(d=i[0],v=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=ra.get(p)||Fn;var x=c&&s;return function(n){var e=v;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===a?"":a;if(g<0){var l=to.formatPrefix(n,h);n=l.scale(n),e=l.symbol+v}else n*=g;var M,_,b=(n=p(n,h)).lastIndexOf(".");if(b<0){var w=m?n.lastIndexOf("e"):-1;w<0?(M=n,_=""):(M=n.substring(0,w),_=n.substring(w))}else M=n.substring(0,b),_=t+n.substring(b+1);!c&&s&&(M=u(M,1/0));var S=d.length+M.length+_.length+(x?0:i.length),k=S"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(x?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e1)for(;o=c)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=C[o in aa?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){M.lastIndex=0;var r=M.exec(t.slice(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=x.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,d=n.days,v=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{var t=new(ua=Hn);return t._=n,r(t)}finally{ua=Date}}var r=t(n);return e.parse=function(n){try{ua=Hn;var t=r.parse(n);return t&&t._}finally{ua=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var x=to.map(),M=Vn(d),_=Xn(d),b=Vn(v),w=Xn(v),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){x.set(n.toLowerCase(),t)});var A={a:function(n){return v[n.getDay()]},A:function(n){return d[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ia.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ia.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ia.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3)}function nt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=so(t)/60|0,i=so(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){ca.lastIndex=0;var r=ca.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);da.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;va.point=function(o,a){va.point=n,r=(t=o)*Do,i=Math.cos(a=(e=a)*Do/2+Lo/4),u=Math.sin(a)},va.lineEnd=function(){n(t,e)}}function vt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function xt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function _t(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function bt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return so(n[0]-t[0])=0;--a)i.point((s=f[a])[0],s[1]);else r(p.x,p.p.x,-1,i);p=p.p}f=(p=p.o).z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(_||(u.polygonStart(),_=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,d,v=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=to.merge(p);var n=Ot(y,g);p.length?(_||(u.polygonStart(),_=!0),Lt(p,jt,n,e,u)):n&&(_||(u.polygonStart(),_=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),_&&(u.polygonEnd(),_=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},x=Pt(),M=t(x),_=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:_,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function jt(n,t){return((n=n.x)[0]<0?n[1]-Ro-Co:Ro-n[1])-((t=t.x)[0]<0?t[1]-Ro-Co:Ro-t[1])}function Ut(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Lo:-Lo,l=so(u-e);so(l-Lo)0?Ro:-Ro),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Lo&&(so(e-i)Co?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Ro,r.point(-Lo,i),r.point(0,i),r.point(Lo,i),r.point(Lo,0),r.point(Lo,-i),r.point(0,-i),r.point(-Lo,-i),r.point(-Lo,0),r.point(-Lo,i);else if(so(n[0]-t[0])>Co){var u=n[0]=0?1:-1,w=b*_,S=w>Lo,k=g*x;if(da.add(Math.atan2(k*b*Math.sin(w),d*M+k*Math.cos(w))),u+=S?_+b*qo:_,S^h>=e^y>=e){var N=mt(vt(s),vt(n));_t(N);var E=mt(i,N);_t(E);var A=(S^_>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^_>=0?1:-1)}if(!v++)break;h=y,g=x,d=M,s=n}}return(u<-Co||uu}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],d=t(s,h),v=o?d?0:i(s,h):d?i(s+(s<0?Lo:-Lo),h):0;if(!e&&(c=l=d)&&n.lineStart(),d!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Co,g[1]+=Co,d=t(g[0],g[1]))),d!==l)f=0,d?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^d){var y;v&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!d||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=d,u=v},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=[1,0,0],i=mt(vt(n),vt(t)),o=yt(i,i),a=i[0],l=o-a*a;if(!l)return!e&&n;var c=u*o/l,f=-u*a/l,s=mt(r,i),h=Mt(r,c);xt(h,Mt(i,f));var p=s,g=yt(h,p),d=yt(p,p),v=g*g-d*(yt(h,h)-1);if(!(v<0)){var y=Math.sqrt(v),m=Mt(p,(-g-y)/d);if(xt(m,h),m=bt(m),!e)return m;var x,M=n[0],_=t[0],b=n[1],w=t[1];_0^m[1]<(so(m[0]-M)Lo^(M<=m[0]&&m[0]<=_)){var E=Mt(p,(-g+y)/d);return xt(E,h),[m,bt(E)]}}}function i(t,e){var r=o?n:Lo-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=so(u)>Co;return Rt(t,e,de(n,6*Do),o?[0,-n]:[-Lo,n-Lo])}function It(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=0,s=1,h=a.x-l,p=a.y-c;if(u=n-l,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=e-l,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0)){if(u/=p,p<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=r-c,p||!(u<0)){if(u/=p,p<0){if(u>s)return;u>f&&(f=u)}else if(p>0){if(u0&&(i.a={x:l+f*h,y:c+f*p}),s<1&&(i.b={x:l+s*h,y:c+s*p}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return so(r[0]-n)0?0:3:so(r[0]-e)0?2:1:so(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=v.length,r=n[1],i=0;ir&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0)do{c.point(0===f||3===f?n:e,f>1?r:t)}while((f=(f+l+4)%4)!==s);else c.point(a[0],a[1])}function f(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,v&&v.push(y=[]),S=!0,w=!1,_=b=NaN}function p(){d&&(g(m,x),M&&w&&E.rejoin(),d.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){var e=f(n=Math.max(-za,Math.min(za,n)),t=Math.max(-za,Math.min(za,t)));if(v&&y.push([n,t]),S)m=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var d,v,y,m,x,M,_,b,w,S,k,N=a,E=Pt(),A=It(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,d=[],v=[],k=!0},polygonEnd:function(){a=N,d=to.merge(d);var t=l([n,r]),e=k&&t,i=d.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(d,u,t,c,a),a.polygonEnd()),d=v=y=null}};return C}}function Vt(n){var t=0,e=Lo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Lo/180,e=n[1]*Lo/180):[t/Lo*180,e/Lo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){qa+=i*n-r*t,r=n,i=t}var t,e,r,i;ja.point=function(u,o){ja.point=n,t=r=u,e=i=o},ja.lineEnd=function(){n(t,e)}}function Bt(n,t){nDa&&(Da=n),tPa&&(Pa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){xa+=n,Ma+=t,++_a}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);ba+=o*(t+n)/2,wa+=o*(e+r)/2,Sa+=o,Gt(t=n,e=r)}var t,e;Fa.point=function(r,i){Fa.point=n,Gt(t=r,e=i)}}function Qt(){Fa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);ba+=o*(r+n)/2,wa+=o*(i+t)/2,Sa+=o,ka+=(o=i*n-r*t)*(r+n),Na+=o*(i+t),Ea+=3*o,Gt(r=n,i=t)}var t,e,r,i;Fa.point=function(u,o){Fa.point=n,Gt(t=r=u,e=i=o)},Fa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,qo)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:_};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=NaN,S.point=u,t.lineStart()}function u(e,r){var u=vt([e,r]),o=n(e,r);i(x,M,m,_,b,w,x=o[0],M=o[1],m=e,_=u[0],b=u[1],w=u[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function l(){r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=x,g=M,d=_,v=b,y=w,S.point=u}function f(){i(x,M,m,_,b,w,p,g,s,d,v,y,a,t),S.lineEnd=o,o()}var s,h,p,g,d,v,y,m,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,d,v,y){var m=f-t,x=s-e,M=m*m+x*x;if(M>4*u&&v--){var _=a+p,b=l+g,w=c+d,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),N=so(so(w)-1)u||so((m*z+x*L)/M-.5)>.3||a*p+l*g+c*d0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Po,e*Po])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Do,n[1]*Do),[n[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*Po,n[1]*Po]}function r(){a=Ct(o=se(y,x,M),u);var n=u(d,v);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,d=0,v=0,y=0,x=0,M=0,_=Ca,b=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(_(o,s(b(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(_=null==n?(w=n,Ca):Yt((w=+n)*Do),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,b=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(d=n[0]%360*Do,v=n[1]%360*Do,r()):[d*Po,v*Po]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Do,x=n[1]%360*Do,M=n.length>2?n[2]%360*Do:0,r()):[y*Po,x*Po,M*Po]},to.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Do,e*Do)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Lo?n-qo:n<-Lo?n+qo:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Lo?t-qo:t<-Lo?t+qo:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function de(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=ve(e,i),u=ve(e,u),(o>0?iu)&&(i+=o*qo)):(i=n+o*qo,u=n-.5*l);for(var c,f=i;o>0?f>u:f0?t<-Ro+Co&&(t=-Ro+Co):t>Ro-Co&&(t=Ro-Co);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Lo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Ro]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return so(i)1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function je(n){var t=Qa.pop()||new Pe;return t.site=n,t}function Ue(n){Be(n),Ja.remove(n),Qa.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];Ue(n);for(var l=u;l.circle&&so(e-l.circle.x)Co)a=a.L;else{if(!((i=u-Ye(a,o))>Co)){r>-Co?(t=a.P,e=a):i>-Co?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=je(n);if(Ja.insert(t,l),t||e){if(t===e)return Be(t),e=je(t.site),Ja.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(e){Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,d=g.x-f,v=g.y-s,y=2*(h*v-p*d),m=h*h+p*p,x=d*d+v*v,M={x:(v*m-p*x)/y+f,y:(h*x-d*m)/y+s};nr(e.edge,c,g,M),l.edge=Ke(c,n,null,M),e.edge=Ke(n,g,null,M),$e(t),$e(e)}else l.edge=Ke(t.site,l.site)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site).x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ye(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ie(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],d=Wa,v=d.length;v--;)if((u=d[v])&&u.prepare())for(l=(a=u.edges).length,o=0;oCo||so(i-e)>Co)&&(a.splice(o,0,new tr(Qe(u.site,f,so(r-s)Co?{x:s,y:so(t-s)Co?{x:so(e-g)Co?{x:h,y:so(t-h)Co?{x:so(e-p)=-zo)){var h=l*l+c*c,p=f*f+v*v,g=(v*h-c*p)/s,d=(l*p-f*h)/s,v=d+a,y=nl.pop()||new Xe;y.arc=n,y.site=i,y.x=g+o,y.y=v+Math.sqrt(g*g+d*d),y.cy=v,n.circle=y;for(var m=null,x=Ka._;x;)if(y.y=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:v,y:l};e={x:v,y:c}}else{if(u){if(u.y1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||h=_)<<1|t>=M,w=b+4;bu&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:vr(e,r)})),u=rl.lastIndex;return u=0&&!(e=to.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function br(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function wr(n){return n*n}function Sr(n){return n*n*n}function kr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function Nr(n){return function(t){return Math.pow(t,n)}}function Er(n){return 1-Math.cos(n*Ro)}function Ar(n){return Math.pow(2,10*(n-1))}function Cr(n){return 1-Math.sqrt(1-n*n)}function zr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/qo*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*qo/t)}}function Lr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tr(n,t){n=to.hcl(n),t=to.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Rr(n,t){n=to.hsl(n),t=to.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=to.lab(n),t=to.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fr(t),i=Ur(t,e),u=Fr(Hr(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Or(e)+"rotate(",null,")")-2,x:vr(n,t)})):t&&e.push(Or(e)+"rotate("+t+")")}function Zr(n,t,e,r){n!==t?r.push({i:e.push(Or(e)+"skewX(",null,")")-2,x:vr(n,t)}):t&&e.push(Or(e)+"skewX("+t+")")}function Vr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Or(e)+"scale(",null,",",null,")");r.push({i:i-4,x:vr(n[0],t[0])},{i:i-2,x:vr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Or(e)+"scale("+t+")")}function Xr(n,t){var e=[],r=[];return n=to.transform(n),t=to.transform(t),Yr(n.translate,t.translate,e,r),Ir(n.rotate,t.rotate,e,r),Zr(n.skew,t.skew,e,r),Vr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function ui(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oi&&(r=e,i=t);return r}function vi(n){return n.reduce(yi,0)}function yi(n,t){return n+t[1]}function mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function Mi(n){return[to.min(n),to.max(n)]}function _i(n,t){return n.value-t.value}function bi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function wi(n,t){n._pack_next=t,t._pack_prev=n}function Si(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function ki(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-1/0,h=1/0,p=-1/0;if(e.forEach(Ni),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(Ci(r,i,u=e[2]),t(u),bi(r,u),r._pack_prev=u,bi(u,i),i=r._pack_next,o=3;o2?Yi:Fi,l=r?Br:$r;return o=i(n,t,l,e),a=i(t,n,l,mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Pr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return $i(n,t)},u.tickFormat=function(t,e){return Bi(n,t,e)},u.nice=function(t){return Vi(n,t),i()},u.copy=function(){return Ii(n,t,e,r)},i()}function Zi(n,t){return to.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2])),Hi(n,Oi(Xi(n,t)[2])),n}function Xi(n,t){null==t&&(t=10);var e=ji(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function $i(n,t){return to.range.apply(to,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var i=ea.exec(e);if(i.shift(),"s"===i[8]){var u=to.formatPrefix(Math.max(so(r[0]),so(r[1])));return i[7]||(i[7]="."+Wi(u.scale(r[2]))),i[8]="f",e=to.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+Ji(i[8],r)),e=i.join("")}else e=",."+Wi(r[2])+"f";return to.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in dl?Math.abs(e-Wi(Math.max(so(t[0]),so(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Hi(r.map(i),e?Math:yl);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=ji(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;c0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return vl;arguments.length<2?e=vl:"function"!=typeof e&&(e=to.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return o*t0?a[e-1]:n[0],e0?0:1}function hu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,d=(s+p)/2,v=h-f,y=p-s,m=v*v+y*y,x=e-r,M=f*p-h*s,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-M*M)),b=(M*y-v*_)/m,w=(-M*v-y*_)/m,S=(M*y+v*_)/m,k=(-M*v+y*_)/m,N=b-g,E=w-d,A=S-g,C=k-d;return N*N+E*E>A*A+C*C&&(b=S,w=k),[[b-l,w-c],[b*e/x,w*e/x]]}function pu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function du(n){return n.join("L")+"Z"}function vu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function yu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r);for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Tu(n){return n.length<3?gu(n):n[0]+bu(n,qu(n))}function Ru(n){for(var t,e,r,i=-1,u=n.length;++i0;)p[--a].call(n,o);if(u>=1)return d.event&&d.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),d=g[r];d||(l=i.time,f=qn(u,0,l),d=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function Bu(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wu(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Ju(n){return n.toISOString()}function Gu(n,t,e){function r(t){return n(t)}function i(n,e){var r=(n[1]-n[0])/e,i=to.bisect(Yl,r);return i==Yl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[r/Yl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ku(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ku(+t+1);return t}}:n))},r.ticks=function(n,t){var e=ji(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],Ku(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Gu(n.copy(),t,e)},Zi(r,n)}function Ku(n){return new Date(n)}function Qu(n){return JSON.parse(n.responseText)}function no(n){var t=io.createRange();return t.selectNode(io.body),t.createContextualFragment(n.responseText)}var to={version:"3.5.17"},eo=[].slice,ro=function(n){return eo.call(n)},io=this.document;if(io)try{ro(io.documentElement.childNodes)[0].nodeType}catch(n){ro=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),io)try{io.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var uo=this.Element.prototype,oo=uo.setAttribute,ao=uo.setAttributeNS,lo=this.CSSStyleDeclaration.prototype,co=lo.setProperty;uo.setAttribute=function(n,t){oo.call(this,n,t+"")},uo.setAttributeNS=function(n,t,e){ao.call(this,n,t,e+"")},lo.setProperty=function(n,t,e){co.call(this,n,t+"",e)}}to.ascending=e,to.descending=function(n,t){return tn?1:t>=n?0:NaN},to.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},to.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},to.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),i=r){e=i=r;break}for(;++ur&&(e=r),i1)return l/(f-1)},to.deviation=function(){var n=to.variance.apply(this,arguments);return n?Math.sqrt(n):n};var fo=u(e);to.bisectLeft=fo.left,to.bisect=to.bisectRight=fo.right,to.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},to.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},to.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},to.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t=0;)for(t=(r=n[i]).length;--t>=0;)e[--o]=r[t];return e};var so=Math.abs;to.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=a(so(e)),o=-1;if(n*=u,t*=u,(e*=u)<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,d=u[a++],v=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(to.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},to.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;e=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},to.event=null,to.requote=function(n){return n.replace(vo,"\\$&")};var vo=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,yo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},mo=function(n,t){return t.querySelector(n)},xo=function(n,t){return t.querySelectorAll(n)},Mo=function(n,t){var e=n.matches||n[M(n,"matchesSelector")];return(Mo=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(mo=function(n,t){return Sizzle(n,t)[0]||null},xo=Sizzle,Mo=Sizzle.matchesSelector),to.selection=function(){return to.select(io.documentElement)};var _o=to.selection.prototype=[];_o.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),wo.hasOwnProperty(e)?{space:wo[e],local:n}:n}},_o.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=to.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_o.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},_o.sort=function(n){n=Y.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){_&&_.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-k.y)/k.k}).map(b.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),v=null)}function s(){function n(){a=1,u(to.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=to.select(t(i)).on(q,n).on(T,r),h=e(to.mouse(i)),p=W(i);ql.call(i),l(o)}function h(){function n(){var n=to.touches(g);return p=k.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=e(n))}),n}function t(){var t=to.event.target;to.select(t).on(M,r).on(_,a),b.push(t);for(var e=to.event.changedTouches,i=0,u=e.length;i1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=to.touches(g);ql.call(g);for(var a=0,l=o.length;a=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ra=to.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=to.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ia=to.time={},ua=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){oa.setUTCDate.apply(this._,arguments)},setDay:function(){oa.setUTCDay.apply(this._,arguments)},setFullYear:function(){oa.setUTCFullYear.apply(this._,arguments)},setHours:function(){oa.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){oa.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){oa.setUTCMinutes.apply(this._,arguments)},setMonth:function(){oa.setUTCMonth.apply(this._,arguments)},setSeconds:function(){oa.setUTCSeconds.apply(this._,arguments)},setTime:function(){oa.setTime.apply(this._,arguments)}};var oa=Date.prototype;ia.year=On(function(n){return(n=ia.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ia.years=ia.year.range,ia.years.utc=ia.year.utc.range,ia.day=On(function(n){var t=new ua(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ia.days=ia.day.range,ia.days.utc=ia.day.utc.range,ia.dayOfYear=function(n){var t=ia.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ia[n]=On(function(n){return(n=ia.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ia.year(n).getDay();return Math.floor((ia.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ia[n+"s"]=e.range,ia[n+"s"].utc=e.utc.range,ia[n+"OfYear"]=function(n){var e=ia.year(n).getDay();return Math.floor((ia.dayOfYear(n)+(e+t)%7)/7)}}),ia.week=ia.sunday,ia.weeks=ia.sunday.range,ia.weeks.utc=ia.sunday.utc.range,ia.weekOfYear=ia.sundayOfYear;var aa={"-":"",_:" ",0:"0"},la=/^\s*\d+/,ca=/^%/;to.locale=function(n){return{numberFormat:Un(n),timeFormat:In(n)}};var fa=to.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});to.format=fa.numberFormat,to.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,sa),st(sa.s,this.s,this),this.s?this.t+=sa.t:this.s=sa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var sa=new ft;to.geo.stream=function(n,t){n&&ha.hasOwnProperty(n.type)?ha[n.type](n,t):ht(n,t)};var ha={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rp&&(p=t)}function t(t,e){var r=vt([t*Do,e*Do]);if(y){var i=mt(y,r),u=mt([i[1],-i[0],0],i);_t(u),u=bt(u);var o=t-g,l=o>0?1:-1,c=u[0]*Po*l,d=so(o)>180;if(d^(l*gp&&(p=v);else if(c=(c+360)%360-180,d^(l*gp&&(p=e);d?ta(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(th&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){_.point=t}function r(){M[0]=f,M[1]=h,_.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=so(r)>180?r+(r>0?360:-360):r}else d=n,v=e;va.point(n,e),t(n,e)}function u(){va.lineStart()}function o(){i(d,v),va.lineEnd(),so(m)>Co&&(f=-(h=180)),M[0]=f,M[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nCo?p=90:m<-Co&&(s=-90),M[0]=f,M[1]=h}};return function(n){p=h=-(f=s=1/0),x=[],to.geo.stream(n,_);var t=x.length;if(t){x.sort(l);for(var e=1,r=[g=x[0]];ea(g[0],g[1])&&(g[1]=u[1]),a(u[0],g[1])>a(g[0],g[1])&&(g[0]=u[0])):r.push(g=u);for(var i,u,o=-1/0,e=0,g=r[t=r.length-1];e<=t;g=u,++e)u=r[e],(i=a(g[1],u[0]))>o&&(o=i,f=u[0],h=g[1])}return x=M=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),to.geo.centroid=function(n){ya=ma=xa=Ma=_a=ba=wa=Sa=ka=Na=Ea=0,to.geo.stream(n,Aa);var t=ka,e=Na,r=Ea,i=t*t+e*e+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?o:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Co,s+.12*c+Co],[f-.214*c-Co,s+.234*c-Co]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Co,s+.166*c+Co],[f-.115*c-Co,s+.234*c-Co]]).stream(l).point,n},n.scale(1070)};var La,qa,Ta,Ra,Da,Pa,ja={point:_,lineStart:_,lineEnd:_,polygonStart:function(){qa=0,ja.lineStart=$t},polygonEnd:function(){ja.lineStart=ja.lineEnd=ja.point=_,La+=so(qa/2)}},Ua={point:Bt,lineStart:_,lineEnd:_,polygonStart:_,polygonEnd:_},Fa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Fa.lineStart=ne},polygonEnd:function(){Fa.point=Gt,Fa.lineStart=Kt,Fa.lineEnd=Qt}};to.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),to.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return La=0,to.geo.stream(n,i(ja)),La},n.centroid=function(n){return xa=Ma=_a=ba=wa=Sa=ka=Na=Ea=0,to.geo.stream(n,i(Fa)),Ea?[ka/Ea,Na/Ea]:Sa?[ba/Sa,wa/Sa]:_a?[xa/_a,Ma/_a]:[NaN,NaN]},n.bounds=function(n){return Da=Pa=-(Ta=Ra=1/0),to.geo.stream(n,i(Ua)),[[Ta,Ra],[Da,Pa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(to.geo.albersUsa()).context(null)},to.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},to.geo.projection=oe,to.geo.projectionMutator=ae,(to.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,to.geo.rotation=function(n){function t(t){return t=n(t[0]*Do,t[1]*Do),t[0]*=Po,t[1]*=Po,t}return n=se(n[0]%360*Do,n[1]*Do,n.length>2?n[2]*Do:0),t.invert=function(t){return t=n.invert(t[0]*Do,t[1]*Do),t[0]*=Po,t[1]*=Po,t},t},fe.invert=ce,to.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Do,-n[1]*Do,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Po,n[1]*=Po}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=de((t=+r)*Do,i*Do),n):t},n.precision=function(r){return arguments.length?(e=de(t*Do,(i=+r)*Do),n):i},n.angle(90)},to.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Do,i=n[1]*Do,u=t[1]*Do,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},to.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return to.range(Math.ceil(u/v)*v,i,v).map(h).concat(to.range(Math.ceil(c/y)*y,l,y).map(p)).concat(to.range(Math.ceil(r/g)*g,e,g).filter(function(n){return so(n%v)>Co}).map(f)).concat(to.range(Math.ceil(a/d)*d,o,d).filter(function(n){return so(n%y)>Co}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,d=g,v=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(v=+t[0],y=+t[1],n):[v,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],d=+t[1],n):[g,d]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Co],[180,90-Co]]).minorExtent([[-180,-80-Co],[180,80+Co]])},to.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=xe,i=Me;return n.distance=function(){return to.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},to.geo.interpolate=function(n,t){return _e(n[0]*Do,n[1]*Do,t[0]*Do,t[1]*Do)},to.geo.length=function(n){return Ha=0,to.geo.stream(n,Oa),Ha};var Ha,Oa={sphere:_,point:_,lineStart:be,lineEnd:_,polygonStart:_,polygonEnd:_},Ya=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(to.geo.azimuthalEqualArea=function(){return oe(Ya)}).raw=Ya;var Ia=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(to.geo.azimuthalEquidistant=function(){return oe(Ia)}).raw=Ia,(to.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(to.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var Za=we(function(n){return 1/n},Math.atan);(to.geo.gnomonic=function(){return oe(Za)}).raw=Za,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ro]},(to.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var Va=we(function(){return 1},Math.asin);(to.geo.orthographic=function(){return oe(Va)}).raw=Va;var Xa=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(to.geo.stereographic=function(){return oe(Xa)}).raw=Xa,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ro]},(to.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,to.geom={},to.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;t=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[]).point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Co)*Co,y:Math.round(o(n,t)/Co)*Co,i:t}})}var r=Ce,i=ze,u=r,o=i,a=tl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u=e.site,o=e.edges.sort(Ve),a=-1,l=o.length,c=o[l-1].edge,f=c.l===u?c.r:c.l;++a=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,d,v,y,m,x=En(a),M=En(l);if(null!=t)d=t,v=e,y=r,m=i;else if(y=m=-(d=v=1/0),s=[],h=[],g=n.length,o)for(p=0;py&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;py&&(y=_),b>m&&(m=b),s.push(_),h.push(b)}var w=y-d,S=m-v;w>S?m=v+w:y=d+S;var k={leaf:!0,nodes:[],point:null,x:null,y:null};if(k.add=function(n){u(k,n,+x(n,++p),+M(n,p),d,v,y,m)},k.visit=function(n){hr(n,k,d,v,y,m)},k.find=function(n){return pr(k,n[0],n[1],d,v,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=ul.get(e)||il,r=ol.get(r)||m,Mr(r(e.apply(null,eo.call(arguments,1))))},to.interpolateHcl=Tr,to.interpolateHsl=Rr,to.interpolateLab=Dr,to.interpolateRound=Pr,to.transform=function(n){var t=io.createElementNS(to.ns.prefix.svg,"g");return(to.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:al)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var al={a:1,b:0,c:0,d:1,e:0,f:0};to.interpolateTransform=Xr,to.layout={},to.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;l=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return ui(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=li,e=oi,r=ai;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ii(t,function(n){n.children&&(n.value=0)}),ui(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},to.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++ca&&(a=r),o.push(r)}for(e=0;e0)for(u=-1;++u=f[0]&&a<=f[1]&&((o=l[to.bisect(s,a,1,p)-1]).y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=Mi,i=mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},to.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ui(a,function(n){n.r=+f(n.value)}),ui(a,ki),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;ui(a,function(n){n.r+=s}),ui(a,ki),ui(a,function(n){n.r-=s})}return Ai(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=to.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ri(n,e)},to.layout.tree=function(){function n(n,r){var u=M.call(this,n,r),o=t(u[0]);return N=o,e(o,0),i(o),g(o,0),m(o),u}function t(n){var e={t:n,prelim:0,mod:0,shift:0,change:0,msel:0,mser:0};if(n.x=0,n.y=0,w)e.x_size=1,e.y_size=1;else if("object"==typeof S)e.x_size=S[0],e.y_size=S[1];else{var r=S(n);e.x_size=r[0],e.y_size=r[1]}k&&(n.x_size=e.x_size,n.y_size=e.y_size);for(var i=[],u=n.children?n.children.length:0,o=0;oe.lowY&&(e=e.nxt);var p=i+r.prelim-(o+u.prelim);null!=_?p+=_(r.t,u.t)*N.x_size:null!=b&&(p+=r.x_size/2+u.x_size/2+b(r.t,u.t)),p>0?(o+=p,a(n,t,e.index,p)):1===t&&0===o&&0===r.num_children&&u.num_children>1&&p<0&&(o+=p,a(n,t,e.index,p));var g=f(r),d=f(u);g<=d&&null!=(r=c(r))&&(i+=r.mod),g>=d&&null!=(u=l(u))&&(o+=u.mod)}null==r&&null!=u?s(n,t,u,o):null!=r&&null==u&&h(n,t,r,i)}function a(n,t,e,r){n.children[t].mod+=r,n.children[t].msel+=r,n.children[t].mser+=r,d(n,t,e,r)}function l(n){return 0==n.num_children?n.tl:n.children[0]}function c(n){return 0==n.num_children?n.tr:n.children[n.num_children-1]}function f(n){return n.t.y+n.y_size}function s(n,t,e,r){var i=n.children[0].el;i.tl=e;var u=r-e.mod-n.children[0].msel;i.mod+=u,i.prelim-=u,n.children[0].el=n.children[t].el,n.children[0].msel=n.children[t].msel}function h(n,t,e,r){var i=n.children[t].er;i.tr=e;var u=r-e.mod-n.children[t].mser;i.mod+=u,i.prelim-=u,n.children[t].er=n.children[t-1].er,n.children[t].mser=n.children[t-1].mser}function p(n){n.prelim=(n.children[0].prelim+n.children[0].mod-n.children[0].x_size/2+n.children[n.num_children-1].mod+n.children[n.num_children-1].prelim+n.children[n.num_children-1].x_size/2)/2}function g(n,t){t+=n.mod,n.t.x=n.prelim+t,v(n);for(var e=0;e=e.lowY;)e=e.nxt;return{lowY:n,index:t,nxt:e}}function m(n){if(null!=w){for(var t,e=n,r=n,i=n,u=[n];t=u.pop();)(f=t.t).xr.t.x&&(r=t),f.depth>i.t.depth&&(i=t),t.children&&(u=u.concat(t.children));var o=null==_?.5:_(e.t,r.t)/2,a=o-e.t.x,l=w[0]/(r.t.x+o+a),c=w[1]/(i.t.depth>0?i.t.depth:1);for(u=[n];t=u.pop();){var f=t.t;f.x=(f.x+a)*l,f.y=f.depth*c,k&&(f.x_size*=l,f.y_size*=c),t.children&&(u=u.concat(t.children))}}else x(n,-n.t.x)}function x(n,t){n.t.x+=t;for(var e=0;e0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,d))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,d,c,!1),d=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,d,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oi&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++u1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=to.random.normal.apply(to,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=to.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;es?0:1;if(c=To)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,d,v,y,m,x,M,_,b,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(v=u===bl?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(v/c*Math.sin(y))),n&&(N=tn(v/n*Math.sin(y)))),c){m=c*Math.cos(f+E),x=c*Math.sin(f+E),M=c*Math.cos(s-E),_=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Lo?0:1;if(E&&su(m,x,M,_)===p^C){var z=(f+s)/2;m=c*Math.cos(z),x=c*Math.sin(z),M=_=null}}else m=x=0;if(n){b=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Lo?0:1;if(N&&su(b,w,S,k)===1-p^L){var q=(f+s)/2;b=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else b=w=0;if(h>Co&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){d=nLo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=xe,o=Me,a=Pu,l=lu,c=cu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},to.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=xe,e=Me,r=ju;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},to.svg.diagonal.radial=function(){var n=to.svg.diagonal(),t=ju,e=n.projection;return n.projection=function(n){return arguments.length?e(Uu(t=n)):t},n},to.svg.symbol=function(){function n(n,r){return(El.get(t.call(this,n,r))||Ou)(e.call(this,n,r))}var t=Hu,e=Fu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var El=to.map({circle:Ou,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Cl)),e=t*Cl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Al),e=t*Al/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Al),e=t*Al/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});to.svg.symbolTypes=El.keys();var Al=Math.sqrt(3),Cl=Math.tan(30*Do);_o.transition=function(n){for(var t,e,r=zl||++Rl,i=Xu(n),u=[],o=Ll||{time:Date.now(),ease:kr,delay:0,duration:250},a=-1,l=this.length;++arect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==to.event.keyCode&&(C||(x=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function d(){32==to.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function v(){var n=to.mouse(_),t=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(to.event.altKey?(x||(x=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]1)for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return u.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(t={onlyLeaves:!1,circularReference:"leaf",search:"dfsPreOrder",iterateOverObject:!0,skipIteration:function(){return!1}},void 0!==o.onlyLeaves&&(t.onlyLeaves=o.onlyLeaves),void 0!==o.circularReference&&(t.circularReference=o.circularReference),void 0!==o.iterateOverObject&&(t.iterateOverObject=o.iterateOverObject),void 0!==o.skipIteration&&(t.skipIteration=o.skipIteration),void 0===o.search){i.next=9;break}if(o.search in s){i.next=8;break}throw new Error("The search algorithm "+o.search+" is incorrect.");case 8:t.search=o.search;case 9:return r=new l.default(e,t),n=(0,d.default)(t.circularReference),i.delegateYield(s[t.search](r,t.onlyLeaves,n),"t0",12);case 12:case"end":return i.stop()}},_[0],this)}Object.defineProperty(r,"__esModule",{value:!0});var a=e("babel-runtime/regenerator"),u=o(a);r.default=i;var c=e("./search"),s=n(c),f=e("./root-node"),l=o(f),p=e("./seen"),d=o(p),_=[i].map(u.default.mark)},{"./root-node":5,"./search":6,"./seen":7,"babel-runtime/regenerator":115}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t;return l.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=l.default.keys(e);case 1:if((r.t1=r.t0()).done){r.next=7;break}return t=r.t1.value,r.next=5,[t,e[t]];case 5:r.next=1;break;case 7:case"end":return r.stop()}},p[0],this)}function i(e){var t;return l.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:t=0;case 1:if(!(tf;)if(u=c[f++],u!=u)return!0}else for(;s>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}}},{"./_to-index":88,"./_to-iobject":90,"./_to-length":91}],39:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),i="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),o))?r:i?n(t):"Object"==(u=n(t))&&"function"==typeof t.callee?"Arguments":u}},{"./_cof":40,"./_wks":97}],40:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],41:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],42:[function(e,t,r){"use strict";var n=e("./_object-dp"),o=e("./_property-desc");t.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},{"./_object-dp":70,"./_property-desc":81}],43:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":35}],44:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],45:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":50}],46:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,i=n(o)&&n(o.createElement);t.exports=function(e){return i?o.createElement(e):{}}},{"./_global":51,"./_is-object":59}],47:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],48:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var a,u=r(e),c=i.f,s=0;u.length>s;)c.call(e,a=u[s++])&&t.push(a);return t}},{"./_object-gops":75,"./_object-keys":78,"./_object-pie":79}],49:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_ctx"),a=e("./_hide"),u="prototype",c=function(e,t,r){var s,f,l,p=e&c.F,d=e&c.G,_=e&c.S,b=e&c.P,h=e&c.B,y=e&c.W,v=d?o:o[t]||(o[t]={}),m=v[u],g=d?n:_?n[t]:(n[t]||{})[u];d&&(r=t);for(s in r)f=!p&&g&&void 0!==g[s],f&&s in v||(l=f?g[s]:r[s],v[s]=d&&"function"!=typeof g[s]?r[s]:h&&f?i(l,n):y&&g[s]==l?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[u]=e[u],t}(l):b&&"function"==typeof l?i(Function.call,l):l,b&&((v.virtual||(v.virtual={}))[s]=l,e&c.R&&m&&!m[s]&&a(m,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},{"./_core":41,"./_ctx":43,"./_global":51,"./_hide":53}],50:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],51:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],52:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],53:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":45,"./_object-dp":70,"./_property-desc":81}],54:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":51}],55:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":45,"./_dom-create":46,"./_fails":50}],56:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":40}],57:[function(e,t,r){var n=e("./_iterators"),o=e("./_wks")("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},{"./_iterators":65,"./_wks":97}],58:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":40}],59:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],60:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},{"./_an-object":37}],61:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),i=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},{"./_hide":53,"./_object-create":69,"./_property-desc":81,"./_set-to-string-tag":84,"./_wks":97}],62:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),i=e("./_redefine"),a=e("./_hide"),u=e("./_has"),c=e("./_iterators"),s=e("./_iter-create"),f=e("./_set-to-string-tag"),l=e("./_object-gpo"),p=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),_="@@iterator",b="keys",h="values",y=function(){return this};t.exports=function(e,t,r,v,m,g,j){s(r,t,v);var w,x,k,O=function(e){if(!d&&e in M)return M[e];switch(e){case b:return function(){return new r(this,e)};case h:return function(){return new r(this,e)}}return function(){return new r(this,e)}},E=t+" Iterator",S=m==h,L=!1,M=e.prototype,A=M[p]||M[_]||m&&M[m],P=A||O(m),T=m?S?O("entries"):P:void 0,F="Array"==t?M.entries||A:A;if(F&&(k=l(F.call(new e)),k!==Object.prototype&&(f(k,E,!0),n||u(k,p)||a(k,p,y))),S&&A&&A.name!==h&&(L=!0,P=function(){return A.call(this)}),n&&!j||!d&&!L&&M[p]||a(M,p,P),c[t]=P,c[E]=y,m)if(w={values:S?P:O(h),keys:g?P:O(b),entries:T},j)for(x in w)x in M||i(M,x,w[x]);else o(o.P+o.F*(d||L),t,w);return w}},{"./_export":49,"./_has":52,"./_hide":53,"./_iter-create":61,"./_iterators":65,"./_library":67,"./_object-gpo":76,"./_redefine":82,"./_set-to-string-tag":84,"./_wks":97}],63:[function(e,t,r){var n=e("./_wks")("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},{"./_wks":97}],64:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],65:[function(e,t,r){t.exports={}},{}],66:[function(e,t,r){var n=e("./_object-keys"),o=e("./_to-iobject");t.exports=function(e,t){for(var r,i=o(e),a=n(i),u=a.length,c=0;u>c;)if(i[r=a[c++]]===t)return r}},{"./_object-keys":78,"./_to-iobject":90}],67:[function(e,t,r){t.exports=!0},{}],68:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),i=e("./_has"),a=e("./_object-dp").f,u=0,c=Object.isExtensible||function(){return!0},s=!e("./_fails")(function(){return c(Object.preventExtensions({}))}),f=function(e){a(e,n,{value:{i:"O"+ ++u,w:{}}})},l=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[n].i},p=function(e,t){if(!i(e,n)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[n].w},d=function(e){return s&&_.NEED&&c(e)&&!i(e,n)&&f(e),e},_=t.exports={KEY:n,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},{"./_fails":50,"./_has":52,"./_is-object":59,"./_object-dp":70,"./_uid":94}],69:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),i=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),u=function(){},c="prototype",s=function(){var t,r=e("./_dom-create")("iframe"),n=i.length,o="<",a=">";for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),s=t.F;n--;)delete s[c][i[n]];return s()};t.exports=Object.create||function(e,t){var r;return null!==e?(u[c]=n(e),r=new u,u[c]=null,r[a]=e):r=s(),void 0===t?r:o(r,t)}},{"./_an-object":37,"./_dom-create":46,"./_enum-bug-keys":47,"./_html":54,"./_object-dps":71,"./_shared-key":85}],70:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),i=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":37,"./_descriptors":45,"./_ie8-dom-define":55,"./_to-primitive":93}],71:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),i=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),u=a.length,c=0;u>c;)n.f(e,r=a[c++],t[r]);return e}},{"./_an-object":37,"./_descriptors":45,"./_object-dp":70,"./_object-keys":78}],72:[function(e,t,r){ +var n=e("./_object-pie"),o=e("./_property-desc"),i=e("./_to-iobject"),a=e("./_to-primitive"),u=e("./_has"),c=e("./_ie8-dom-define"),s=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?s:function(e,t){if(e=i(e),t=a(t,!0),c)try{return s(e,t)}catch(e){}if(u(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":45,"./_has":52,"./_ie8-dom-define":55,"./_object-pie":79,"./_property-desc":81,"./_to-iobject":90,"./_to-primitive":93}],73:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(n(e))}},{"./_object-gopn":74,"./_to-iobject":90}],74:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":47,"./_object-keys-internal":77}],75:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],76:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),i=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":52,"./_shared-key":85,"./_to-object":92}],77:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),i=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,u=o(e),c=0,s=[];for(r in u)r!=a&&n(u,r)&&s.push(r);for(;t.length>c;)n(u,r=t[c++])&&(~i(s,r)||s.push(r));return s}},{"./_array-includes":38,"./_has":52,"./_shared-key":85,"./_to-iobject":90}],78:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":47,"./_object-keys-internal":77}],79:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],80:[function(e,t,r){var n=e("./_export"),o=e("./_core"),i=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",a)}},{"./_core":41,"./_export":49,"./_fails":50}],81:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],82:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":53}],83:[function(e,t,r){var n=e("./_is-object"),o=e("./_an-object"),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return i(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:i}},{"./_an-object":37,"./_ctx":43,"./_is-object":59,"./_object-gopd":72}],84:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),i=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},{"./_has":52,"./_object-dp":70,"./_wks":97}],85:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":86,"./_uid":94}],86:[function(e,t,r){var n=e("./_global"),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":51}],87:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var i,a,u=String(o(t)),c=n(r),s=u.length;return c<0||c>=s?e?"":void 0:(i=u.charCodeAt(c),i<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?e?u.charAt(c):i:e?u.slice(c,c+2):(i-55296<<10)+(a-56320)+65536)}}},{"./_defined":44,"./_to-integer":89}],88:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,i=Math.min;t.exports=function(e,t){return e=n(e),e<0?o(e+t,0):i(e,t)}},{"./_to-integer":89}],89:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],90:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":44,"./_iobject":56}],91:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":89}],92:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":44}],93:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":59}],94:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],95:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_library"),a=e("./_wks-ext"),u=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},{"./_core":41,"./_global":51,"./_library":67,"./_object-dp":70,"./_wks-ext":96}],96:[function(e,t,r){r.f=e("./_wks")},{"./_wks":97}],97:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),i=e("./_global").Symbol,a="function"==typeof i,u=t.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))};u.store=n},{"./_global":51,"./_shared":86,"./_uid":94}],98:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},{"./_classof":39,"./_core":41,"./_iterators":65,"./_wks":97}],99:[function(e,t,r){var n=e("./_an-object"),o=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":37,"./_core":41,"./core.get-iterator-method":98}],100:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},{"./_classof":39,"./_core":41,"./_iterators":65,"./_wks":97}],101:[function(e,t,r){"use strict";var n=e("./_ctx"),o=e("./_export"),i=e("./_to-object"),a=e("./_iter-call"),u=e("./_is-array-iter"),c=e("./_to-length"),s=e("./_create-property"),f=e("./core.get-iterator-method");o(o.S+o.F*!e("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,l,p=i(e),d="function"==typeof this?this:Array,_=arguments.length,b=_>1?arguments[1]:void 0,h=void 0!==b,y=0,v=f(p);if(h&&(b=n(b,_>2?arguments[2]:void 0,2)),void 0==v||d==Array&&u(v))for(t=c(p.length),r=new d(t);t>y;y++)s(r,y,h?b(p[y],y):p[y]);else for(l=v.call(p),r=new d;!(o=l.next()).done;y++)s(r,y,h?a(l,b,[o.value,y],!0):o.value);return r.length=y,r}})},{"./_create-property":42,"./_ctx":43,"./_export":49,"./_is-array-iter":57,"./_iter-call":60,"./_iter-detect":63,"./_to-length":91,"./_to-object":92,"./core.get-iterator-method":98}],102:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),i=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,r):"values"==t?o(0,e[r]):o(0,[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":36,"./_iter-define":62,"./_iter-step":64,"./_iterators":65,"./_to-iobject":90}],103:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":49,"./_object-create":69}],104:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":45,"./_export":49,"./_object-dp":70}],105:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",function(){return function(e){return o(n(e))}})},{"./_object-gpo":76,"./_object-sap":80,"./_to-object":92}],106:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":49,"./_set-proto":83}],107:[function(e,t,r){},{}],108:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":62,"./_string-at":87}],109:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),i=e("./_descriptors"),a=e("./_export"),u=e("./_redefine"),c=e("./_meta").KEY,s=e("./_fails"),f=e("./_shared"),l=e("./_set-to-string-tag"),p=e("./_uid"),d=e("./_wks"),_=e("./_wks-ext"),b=e("./_wks-define"),h=e("./_keyof"),y=e("./_enum-keys"),v=e("./_is-array"),m=e("./_an-object"),g=e("./_to-iobject"),j=e("./_to-primitive"),w=e("./_property-desc"),x=e("./_object-create"),k=e("./_object-gopn-ext"),O=e("./_object-gopd"),E=e("./_object-dp"),S=e("./_object-keys"),L=O.f,M=E.f,A=k.f,P=n.Symbol,T=n.JSON,F=T&&T.stringify,I="prototype",C=d("_hidden"),N=d("toPrimitive"),R={}.propertyIsEnumerable,G=f("symbol-registry"),D=f("symbols"),U=f("op-symbols"),Y=Object[I],W="function"==typeof P,B=n.QObject,q=!B||!B[I]||!B[I].findChild,J=i&&s(function(){return 7!=x(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=L(Y,t);n&&delete Y[t],M(e,t,r),n&&e!==Y&&M(Y,t,n)}:M,K=function(e){var t=D[e]=x(P[I]);return t._k=e,t},z=W&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},Q=function(e,t,r){return e===Y&&Q(U,t,r),m(e),t=j(t,!0),m(r),o(D,t)?(r.enumerable?(o(e,C)&&e[C][t]&&(e[C][t]=!1),r=x(r,{enumerable:w(0,!1)})):(o(e,C)||M(e,C,w(1,{})),e[C][t]=!0),J(e,t,r)):M(e,t,r)},H=function(e,t){m(e);for(var r,n=y(t=g(t)),o=0,i=n.length;i>o;)Q(e,r=n[o++],t[r]);return e},V=function(e,t){return void 0===t?x(e):H(x(e),t)},X=function(e){var t=R.call(this,e=j(e,!0));return!(this===Y&&o(D,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(D,e)||o(this,C)&&this[C][e])||t)},Z=function(e,t){if(e=g(e),t=j(t,!0),e!==Y||!o(D,t)||o(U,t)){var r=L(e,t);return!r||!o(D,t)||o(e,C)&&e[C][t]||(r.enumerable=!0),r}},$=function(e){for(var t,r=A(g(e)),n=[],i=0;r.length>i;)o(D,t=r[i++])||t==C||t==c||n.push(t);return n},ee=function(e){for(var t,r=e===Y,n=A(r?U:g(e)),i=[],a=0;n.length>a;)!o(D,t=n[a++])||r&&!o(Y,t)||i.push(D[t]);return i};W||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(r){this===Y&&t.call(U,r),o(this,C)&&o(this[C],e)&&(this[C][e]=!1),J(this,e,w(1,r))};return i&&q&&J(Y,e,{configurable:!0,set:t}),K(e)},u(P[I],"toString",function(){return this._k}),O.f=Z,E.f=Q,e("./_object-gopn").f=k.f=$,e("./_object-pie").f=X,e("./_object-gops").f=ee,i&&!e("./_library")&&u(Y,"propertyIsEnumerable",X,!0),_.f=function(e){return K(d(e))}),a(a.G+a.W+a.F*!W,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)d(te[re++]);for(var te=S(d.store),re=0;te.length>re;)b(te[re++]);a(a.S+a.F*!W,"Symbol",{for:function(e){return o(G,e+="")?G[e]:G[e]=P(e)},keyFor:function(e){if(z(e))return h(G,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!W,"Object",{create:V,defineProperty:Q,defineProperties:H,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:ee}),T&&a(a.S+a.F*(!W||s(function(){var e=P();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);return t=n[1],"function"==typeof t&&(r=t),!r&&v(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,F.apply(T,n)}}}),P[I][N]||e("./_hide")(P[I],N,P[I].valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},{"./_an-object":37,"./_descriptors":45,"./_enum-keys":48,"./_export":49,"./_fails":50,"./_global":51,"./_has":52,"./_hide":53,"./_is-array":58,"./_keyof":66,"./_library":67,"./_meta":68,"./_object-create":69,"./_object-dp":70,"./_object-gopd":72,"./_object-gopn":74,"./_object-gopn-ext":73,"./_object-gops":75,"./_object-keys":78,"./_object-pie":79,"./_property-desc":81,"./_redefine":82,"./_set-to-string-tag":84,"./_shared":86,"./_to-iobject":90,"./_to-primitive":93,"./_uid":94,"./_wks":97,"./_wks-define":95,"./_wks-ext":96}],110:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":95}],111:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":95}],112:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),i=e("./_iterators"),a=e("./_wks")("toStringTag"),u=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var s=u[c],f=n[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},{"./_global":51,"./_hide":53,"./_iterators":65,"./_wks":97,"./es6.array.iterator":102}],113:[function(e,t,r){(function(r){var n="object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this,o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":114}],114:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),u=new _(n||[]);return a._invoke=f(e,r,u),a}function o(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function a(){}function u(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(t){function r(e,n,i,a){var u=o(t[e],t,n);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&m.call(s,"__await")?Promise.resolve(s.__await).then(function(e){r("next",e,i,a)},function(e){r("throw",e,i,a)}):Promise.resolve(s).then(function(e){c.value=e,i(c)},a)}a(u.arg)}function n(e,t){function n(){return new Promise(function(n,o){r(e,t,n,o)})}return i=i?i.then(n,n):n()}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var i;this._invoke=n}function f(e,t,r){var n=O;return function(i,a){if(n===S)throw new Error("Generator is already running");if(n===L){if("throw"===i)throw a;return h()}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=l(u,r);if(c){if(c===M)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===O)throw n=L,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=S;var s=o(e,t,r);if("normal"===s.type){if(n=r.done?L:E,s.arg===M)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=L,r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=e.iterator[t.method];if(r===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return M;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return M}var n=o(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,M;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,M):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,M)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function b(e){if(e){var t=e[j];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=m.call(o,"catchLoc"),u=m.call(o,"finallyLoc");if(a&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&m.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),d(r),M}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;d(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:b(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=y),M}}}("object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1}],115:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":113}]},{},[2])(2)}); diff --git a/documentation/js/libs/es6-shim.min.js b/documentation/js/libs/es6-shim.min.js new file mode 100644 index 00000000..1c2d15c0 --- /dev/null +++ b/documentation/js/libs/es6-shim.min.js @@ -0,0 +1,11 @@ +/*! + * https://github.com/paulmillr/es6-shim + * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com) + * and contributors, MIT License + * es6-shim: v0.35.1 + * see https://github.com/paulmillr/es6-shim/blob/0.35.1/LICENSE + * Details and documentation: + * https://github.com/paulmillr/es6-shim/ + */ +(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){"use strict";var e=Function.call.bind(Function.apply);var t=Function.call.bind(Function.call);var r=Array.isArray;var n=Object.keys;var o=function notThunker(t){return function notThunk(){return!e(t,this,arguments)}};var i=function(e){try{e();return false}catch(t){return true}};var a=function valueOrFalseIfThrows(e){try{return e()}catch(t){return false}};var u=o(i);var f=function(){return!i(function(){Object.defineProperty({},"x",{get:function(){}})})};var s=!!Object.defineProperty&&f();var c=function foo(){}.name==="foo";var l=Function.call.bind(Array.prototype.forEach);var p=Function.call.bind(Array.prototype.reduce);var v=Function.call.bind(Array.prototype.filter);var y=Function.call.bind(Array.prototype.some);var h=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t,r){l(n(t),function(n){var o=t[n];h(e,n,o,!!r)})};var g=Function.call.bind(Object.prototype.toString);var d=typeof/abc/==="function"?function IsCallableSlow(e){return typeof e==="function"&&g(e)==="[object Function]"}:function IsCallableFast(e){return typeof e==="function"};var O={getter:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}Object.defineProperty(e,t,{configurable:true,enumerable:false,get:r})},proxy:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,{configurable:n.configurable,enumerable:n.enumerable,get:function getKey(){return e[t]},set:function setKey(r){e[t]=r}})},redefine:function(e,t,r){if(s){var n=Object.getOwnPropertyDescriptor(e,t);n.value=r;Object.defineProperty(e,t,n)}else{e[t]=r}},defineByDescriptor:function(e,t,r){if(s){Object.defineProperty(e,t,r)}else if("value"in r){e[t]=r.value}},preserveToString:function(e,t){if(t&&d(t.toString)){h(e,"toString",t.toString.bind(t),true)}}};var m=Object.create||function(e,t){var r=function Prototype(){};r.prototype=e;var o=new r;if(typeof t!=="undefined"){n(t).forEach(function(e){O.defineByDescriptor(o,e,t[e])})}return o};var w=function(e,t){if(!Object.setPrototypeOf){return false}return a(function(){var r=function Subclass(t){var r=new e(t);Object.setPrototypeOf(r,Subclass.prototype);return r};Object.setPrototypeOf(r,e);r.prototype=m(e.prototype,{constructor:{value:r}});return t(r)})};var j=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var S=j();var T=S.isFinite;var I=Function.call.bind(String.prototype.indexOf);var E=Function.apply.bind(Array.prototype.indexOf);var P=Function.call.bind(Array.prototype.concat);var C=Function.call.bind(String.prototype.slice);var M=Function.call.bind(Array.prototype.push);var x=Function.apply.bind(Array.prototype.push);var N=Function.call.bind(Array.prototype.shift);var A=Math.max;var R=Math.min;var _=Math.floor;var k=Math.abs;var F=Math.exp;var L=Math.log;var D=Math.sqrt;var z=Function.call.bind(Object.prototype.hasOwnProperty);var q;var W=function(){};var G=S.Symbol||{};var H=G.species||"@@species";var V=Number.isNaN||function isNaN(e){return e!==e};var B=Number.isFinite||function isFinite(e){return typeof e==="number"&&T(e)};var $=d(Math.sign)?Math.sign:function sign(e){var t=Number(e);if(t===0){return t}if(V(t)){return t}return t<0?-1:1};var U=function isArguments(e){return g(e)==="[object Arguments]"};var J=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var X=U(arguments)?U:J;var K={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var Z=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);O.preserveToString(e[t],n)};var Y=typeof G==="function"&&typeof G["for"]==="function"&&K.symbol(G());var Q=K.symbol(G.iterator)?G.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){Q="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ee=S.Reflect;var te=String;var re={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!re.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(e==null){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"},ToObject:function(e,t){return Object(re.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return re.IsCallable(e)},ToInt32:function(e){return re.ToNumber(e)>>0},ToUint32:function(e){return re.ToNumber(e)>>>0},ToNumber:function(e){if(g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=re.ToNumber(e);if(V(t)){return 0}if(t===0||!B(t)){return t}return(t>0?1:-1)*_(k(t))},ToLength:function(e){var t=re.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return V(e)&&V(t)},SameValueZero:function(e,t){return e===t||V(e)&&V(t)},IsIterable:function(e){return re.TypeIsObject(e)&&(typeof e[Q]!=="undefined"||X(e))},GetIterator:function(e){if(X(e)){return new q(e,"value")}var t=re.GetMethod(e,Q);if(!re.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=re.Call(t,e);if(!re.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=re.ToObject(e)[t];if(r===void 0||r===null){return void 0}if(!re.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=re.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=re.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!re.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!re.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=re.IteratorNext(e);var r=re.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ee.construct){return ee.construct(e,t,o)}var i=o.prototype;if(!re.TypeIsObject(i)){i=Object.prototype}var a=m(i);var u=re.Call(e,a,t);return re.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!re.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[H];if(n===void 0||n===null){return t}if(!re.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=re.ToString(e);var i="<"+t;if(r!==""){var a=re.ToString(n);var u=a.replace(/"/g,""");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+""},IsRegExp:function IsRegExp(e){if(!re.TypeIsObject(e)){return false}var t=e[G.match];if(typeof t!=="undefined"){return!!t}return K.regex(e)},ToString:function ToString(e){return te(e)}};if(s&&Y){var ne=function defineWellKnownSymbol(e){if(K.symbol(G[e])){return G[e]}var t=G["for"]("Symbol."+e);Object.defineProperty(G,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!K.symbol(G.search)){var oe=ne("search");var ie=String.prototype.search;h(RegExp.prototype,oe,function search(e){return re.Call(ie,e,[this])});var ae=function search(e){var t=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var r=re.GetMethod(e,oe);if(typeof r!=="undefined"){return re.Call(r,e,[t])}}return re.Call(ie,t,[re.ToString(e)])};Z(String.prototype,"search",ae)}if(!K.symbol(G.replace)){var ue=ne("replace");var fe=String.prototype.replace;h(RegExp.prototype,ue,function replace(e,t){return re.Call(fe,e,[this,t])});var se=function replace(e,t){var r=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var n=re.GetMethod(e,ue);if(typeof n!=="undefined"){return re.Call(n,e,[r,t])}}return re.Call(fe,r,[re.ToString(e),t])};Z(String.prototype,"replace",se)}if(!K.symbol(G.split)){var ce=ne("split");var le=String.prototype.split;h(RegExp.prototype,ce,function split(e,t){return re.Call(le,e,[this,t])});var pe=function split(e,t){var r=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var n=re.GetMethod(e,ce);if(typeof n!=="undefined"){return re.Call(n,e,[r,t])}}return re.Call(le,r,[re.ToString(e),t])};Z(String.prototype,"split",pe)}var ve=K.symbol(G.match);var ye=ve&&function(){var e={};e[G.match]=function(){return 42};return"a".match(e)!==42}();if(!ve||ye){var he=ne("match");var be=String.prototype.match;h(RegExp.prototype,he,function match(e){return re.Call(be,e,[this])});var ge=function match(e){var t=re.RequireObjectCoercible(this);if(e!==null&&typeof e!=="undefined"){var r=re.GetMethod(e,he);if(typeof r!=="undefined"){return re.Call(r,e,[t])}}return re.Call(be,t,[re.ToString(e)])};Z(String.prototype,"match",ge)}}var de=function wrapConstructor(e,t,r){O.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in W||r[n]){return}O.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in W||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;O.redefine(e.prototype,"constructor",t)};var Oe=function(){return this};var me=function(e){if(s&&!z(e,H)){O.getter(e,H,Oe)}};var we=function(e,t){var r=t||function iterator(){return this};h(e,Q,r);if(!e[Q]&&K.symbol(Q)){e[Q]=r}};var je=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Se=function createDataPropertyOrThrow(e,t,r){je(e,t,r);if(!re.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var Te=function(e,t,r,n){if(!re.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!re.TypeIsObject(o)){o=r}var i=m(o);for(var a in n){if(z(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Ie=String.fromCodePoint;Z(String,"fromCodePoint",function fromCodePoint(e){return re.Call(Ie,this,arguments)})}var Ee={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return t.join("")},raw:function raw(e){var t=re.ToObject(e,"bad callSite");var r=re.ToObject(t.raw,"bad raw value");var n=r.length;var o=re.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a=o){break}f=a+1=Ce){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return Pe(t,r)},startsWith:function startsWith(e){var t=re.ToString(re.RequireObjectCoercible(this));if(re.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=re.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=A(re.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=re.ToString(re.RequireObjectCoercible(this));if(re.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=re.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:re.ToInteger(o);var a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(re.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=re.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=re.ToString(re.RequireObjectCoercible(this));var r=re.ToInteger(e);var n=t.length;if(r>=0&&r56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){Z(String.prototype,"includes",Me.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var xe=i(function(){"/a/".startsWith(/a/)});var Ne=a(function(){return"abc".startsWith("a",Infinity)===false});if(!xe||!Ne){Z(String.prototype,"startsWith",Me.startsWith);Z(String.prototype,"endsWith",Me.endsWith)}}if(Y){var Ae=a(function(){var e=/a/;e[G.match]=false;return"/a/".startsWith(e)});if(!Ae){Z(String.prototype,"startsWith",Me.startsWith)}var Re=a(function(){var e=/a/;e[G.match]=false;return"/a/".endsWith(e)});if(!Re){Z(String.prototype,"endsWith",Me.endsWith)}var _e=a(function(){var e=/a/;e[G.match]=false;return"/a/".includes(e)});if(!_e){Z(String.prototype,"includes",Me.includes)}}b(String.prototype,Me);var ke=[" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Fe=new RegExp("(^["+ke+"]+)|(["+ke+"]+$)","g");var Le=function trim(){return re.ToString(re.RequireObjectCoercible(this)).replace(Fe,"")};var De=["\x85","\u200b","\ufffe"].join("");var ze=new RegExp("["+De+"]","g");var qe=/^[\-+]0x[0-9a-f]+$/i;var We=De.trim().length!==De.length;h(String.prototype,"trim",Le,We);var Ge=function(e){return{value:e,done:arguments.length===0}};var He=function(e){re.RequireObjectCoercible(e);this._s=re.ToString(e);this._i=0};He.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ge()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ge(e.substr(t,o))};we(He.prototype);we(String.prototype,function(){return new He(this)});var Ve={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!re.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(X(e)||re.GetMethod(e,Q))!=="undefined";var u,f,s;if(a){f=re.IsConstructor(r)?Object(new r):[];var c=re.GetIterator(e);var l,p;s=0;while(true){l=re.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){re.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=re.ToObject(e);u=re.ToLength(y.length);f=re.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s2){f=arguments[2]}var s=typeof f==="undefined"?n:re.ToInteger(f);var c=s<0?A(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=re.ToObject(this);var o=re.ToLength(n.length);t=re.ToInteger(typeof t==="undefined"?0:t);r=re.ToInteger(typeof r==="undefined"?o:r);var i=t<0?A(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u1?arguments[1]:null;for(var i=0,a;i1?arguments[1]:null;for(var i=0;i1&&typeof arguments[1]!=="undefined"){return re.Call(Ze,this,arguments)}else{return t(Ze,this,e)}})}var Ye=-(Math.pow(2,32)-1);var Qe=function(e,r){var n={length:Ye};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!Qe(Array.prototype.forEach)){var et=Array.prototype.forEach;Z(Array.prototype,"forEach",function forEach(e){return re.Call(et,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.map)){var tt=Array.prototype.map;Z(Array.prototype,"map",function map(e){return re.Call(tt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.filter)){var rt=Array.prototype.filter;Z(Array.prototype,"filter",function filter(e){return re.Call(rt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.some)){var nt=Array.prototype.some;Z(Array.prototype,"some",function some(e){return re.Call(nt,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.every)){var ot=Array.prototype.every;Z(Array.prototype,"every",function every(e){return re.Call(ot,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.reduce)){var it=Array.prototype.reduce;Z(Array.prototype,"reduce",function reduce(e){return re.Call(it,this.length>=0?this:[],arguments)},true)}if(!Qe(Array.prototype.reduceRight,true)){var at=Array.prototype.reduceRight;Z(Array.prototype,"reduceRight",function reduceRight(e){return re.Call(at,this.length>=0?this:[],arguments)},true)}var ut=Number("0o10")!==8;var ft=Number("0b10")!==2;var st=y(De,function(e){return Number(e+0+e)===0});if(ut||ft||st){var ct=Number;var lt=/^0b[01]+$/i;var pt=/^0o[0-7]+$/i;var vt=lt.test.bind(lt);var yt=pt.test.bind(pt);var ht=function(e){var t;if(typeof e.valueOf==="function"){t=e.valueOf();if(K.primitive(t)){return t}}if(typeof e.toString==="function"){t=e.toString();if(K.primitive(t)){return t}}throw new TypeError("No default value")};var bt=ze.test.bind(ze);var gt=qe.test.bind(qe);var dt=function(){var e=function Number(t){var r;if(arguments.length>0){r=K.primitive(t)?t:ht(t,"number")}else{r=0}if(typeof r==="string"){r=re.Call(Le,r);if(vt(r)){r=parseInt(C(r,2),2)}else if(yt(r)){r=parseInt(C(r,2),8)}else if(bt(r)||gt(r)){r=NaN}}var n=this;var o=a(function(){ct.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new ct(r)}return ct(r)};return e}();de(ct,dt,{});b(dt,{NaN:ct.NaN,MAX_VALUE:ct.MAX_VALUE,MIN_VALUE:ct.MIN_VALUE,NEGATIVE_INFINITY:ct.NEGATIVE_INFINITY,POSITIVE_INFINITY:ct.POSITIVE_INFINITY});Number=dt;O.redefine(S,"Number",dt)}var Ot=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Ot,MIN_SAFE_INTEGER:-Ot,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:B,isInteger:function isInteger(e){return B(e)&&re.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:V});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if(![,1].find(function(e,t){return t===0})){Z(Array.prototype,"find",$e.find)}if([,1].findIndex(function(e,t){return t===0})!==0){Z(Array.prototype,"findIndex",$e.findIndex)}var mt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var wt=function ensureEnumerable(e,t){if(s&&mt(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var jt=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o1){return NaN}if(t===-1){return-Infinity}if(t===1){return Infinity}if(t===0){return t}return.5*L((1+t)/(1-t))},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=F(L(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=re.ToUint32(t);if(r===0){return 32}return Or?re.Call(Or,r):31-_(L(r+.5)*gr)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(V(t)){return NaN}if(!T(t)){return Infinity}if(t<0){t=-t}if(t>21){return F(t)/2}return(F(t)+F(-t))/2},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(k(t)>.5){return F(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o0?i/n*(i/n):i}}return n===Infinity?Infinity:n*D(r)},log2:function log2(e){return L(e)*gr},log10:function log10(e){return L(e)*dr},log1p:function log1p(e){var t=Number(e);if(t<-1||V(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(L(1+t)/(1+t-1))},sign:$,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}if(k(t)<1){return(Math.expm1(t)-Math.expm1(-t))/2}return(F(t-1)-F(-t-1))*br/2},tanh:function tanh(e){var t=Number(e);if(V(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(F(t)+F(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=re.ToUint32(e);var n=re.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||V(t)){return t}var r=$(t);var n=k(t);if(nyr||V(i)){return r*Infinity}return r*i}};b(Math,mr);h(Math,"log1p",mr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",mr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));h(Math,"tanh",mr.tanh,Math.tanh(-2e-17)!==-2e-17);h(Math,"acosh",mr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"cbrt",mr.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8);h(Math,"sinh",mr.sinh,Math.sinh(-2e-17)!==-2e-17);var wr=Math.expm1(10);h(Math,"expm1",mr.expm1,wr>22025.465794806718||wr<22025.465794806718);var jr=Math.round;var Sr=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var Tr=lr+1;var Ir=2*lr-1;var Er=[Tr,Ir].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=_(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Sr||!Er);O.preserveToString(Math.round,jr);var Pr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=mr.imul;O.preserveToString(Math.imul,Pr)}if(Math.imul.length!==2){Z(Math,"imul",function imul(e,t){return re.Call(Pr,Math,arguments); +})}var Cr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}re.IsPromise=function(e){if(!re.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!re.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(re.IsCallable(t.resolve)&&re.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&re.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=re.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(re.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=re.IsCallable(e)?e:a;var d=re.IsCallable(t)?t:u;var O=n._promise;var m;if(O.state===f){if(O.reactionLength===0){O.fulfillReactionHandler0=g;O.rejectReactionHandler0=d;O.reactionCapability0=i}else{var w=3*(O.reactionLength-1);O[w+l]=g;O[w+p]=d;O[w+v]=i}O.reactionLength+=1}else if(O.state===s){m=O.result;h(g,i,m)}else if(O.state===c){m=O.result;h(d,i,m)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Cr==="function"){b(S,{Promise:Cr});var Mr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var xr=!i(function(){S.Promise.reject(42).then(null,5).then(null,W)});var Nr=i(function(){S.Promise.call(3,W)});var Ar=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Rr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var _r=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};_r.prototype=Promise.prototype;_r.all=Promise.all;var kr=a(function(){return!!_r.all([1,2])});if(!Mr||!xr||!Nr||Ar||!Rr||kr){Promise=Cr;Z(S,"Promise",Cr)}if(Promise.all.length!==1){var Fr=Promise.all;Z(Promise,"all",function all(e){return re.Call(Fr,this,arguments)})}if(Promise.race.length!==1){var Lr=Promise.race;Z(Promise,"race",function race(e){return re.Call(Lr,this,arguments)})}if(Promise.resolve.length!==1){var Dr=Promise.resolve;Z(Promise,"resolve",function resolve(e){return re.Call(Dr,this,arguments)})}if(Promise.reject.length!==1){var zr=Promise.reject;Z(Promise,"reject",function reject(e){return re.Call(zr,this,arguments)})}wt(Promise,"all");wt(Promise,"race");wt(Promise,"resolve");wt(Promise,"reject");me(Promise)}var qr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Wr=qr(["z","a","bb"]);var Gr=qr(["z",1,"a","3",2]);if(s){var Hr=function fastkey(e){if(!Wr){return null}if(typeof e==="undefined"||e===null){return"^"+re.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Gr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Vr=function emptyObject(){return Object.create?Object.create(null):{}};var Br=function addIterableToMap(e,n,o){if(r(o)||K.string(o)){l(o,function(e){if(!re.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.set;if(!re.IsCallable(a)){throw new TypeError("bad map")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!re.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){re.IteratorClose(i,true);throw s}}}}};var $r=function addIterableToSet(e,n,o){if(r(o)||K.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(o!==null&&typeof o!=="undefined"){a=n.add;if(!re.IsCallable(a)){throw new TypeError("bad set")}i=re.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=re.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){re.IteratorClose(i,true);throw s}}}}};var Ur={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!re.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+re.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={next:function next(){var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ge()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ge(n)}}this.i=void 0;return Ge()}};we(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Te(this,Map,a,{_es6map:true,_head:null,_storage:Vr(),_size:0});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){Br(Map,e,arguments[0])}return e};a=u.prototype;O.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t=Hr(e);if(t!==null){var r=this._storage[t];if(r){return r.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Hr(e);if(t!==null){return typeof this._storage[t]!=="undefined"}var r=this._head;var n=r;while((n=n.next)!==r){if(re.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Hr(e);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}while((i=i.next)!==n){if(re.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(re.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Hr(t);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}while((n=n.next)!==r){if(re.SameValueZero(n.key,t)){n.key=n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._size=0;this._storage=Vr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});we(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!re.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+re.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Te(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Vr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){$r(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=e["[[SetData]]"]=new Ur.Map;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};O.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Hr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Hr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Hr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Vr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return this["[[SetData]]"].values()},entries:function entries(){r(this,"entries");u(this);return this["[[SetData]]"].entries()},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);we(i.prototype,i.prototype.values);return i}()};if(S.Map||S.Set){var Jr=a(function(){return new Map([[1,2]]).get(1)===2});if(!Jr){var Xr=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new Xr;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=m(Xr.prototype);h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,Xr)}var Kr=new Map;var Zr=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var Yr=Kr.set(1,2)===Kr;if(!Zr||!Yr){var Qr=Map.prototype.set;Z(Map.prototype,"set",function set(e,r){t(Qr,this,e===0?0:e,r);return this})}if(!Zr){var en=Map.prototype.get;var tn=Map.prototype.has;b(Map.prototype,{get:function get(e){return t(en,this,e===0?0:e)},has:function has(e){return t(tn,this,e===0?0:e)}},true);O.preserveToString(Map.prototype.get,en);O.preserveToString(Map.prototype.has,tn)}var rn=new Set;var nn=function(e){e["delete"](0);e.add(-0);return!e.has(0)}(rn);var on=rn.add(1)===rn;if(!nn||!on){var an=Set.prototype.add;Set.prototype.add=function add(e){t(an,this,e===0?0:e);return this};O.preserveToString(Set.prototype.add,an)}if(!nn){var un=Set.prototype.has;Set.prototype.has=function has(e){return t(un,this,e===0?0:e)};O.preserveToString(Set.prototype.has,un);var fn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(fn,this,e===0?0:e)};O.preserveToString(Set.prototype["delete"],fn)}var sn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var cn=Object.setPrototypeOf&&!sn;var ln=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||cn||!ln){var pn=S.Map;S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new pn;if(arguments.length>0){Br(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=pn.prototype;h(S.Map.prototype,"constructor",S.Map,true);O.preserveToString(S.Map,pn)}var vn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var yn=Object.setPrototypeOf&&!vn;var hn=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||yn||!hn){var bn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new bn;if(arguments.length>0){$r(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=bn.prototype;h(S.Set.prototype,"constructor",S.Set,true);O.preserveToString(S.Set,bn)}var gn=new S.Map;var dn=!a(function(){return gn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||gn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof gn.keys().next!=="function"||dn||!sn){b(S,{Map:Ur.Map,Set:Ur.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}we(Object.getPrototypeOf((new S.Map).keys()));we(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var On=S.Set.prototype.has;Z(S.Set.prototype,"has",function has(e){return t(On,this,e)})}}b(S,Ur);me(S.Map);me(S.Set)}var mn=function throwUnlessTargetIsObject(e){if(!re.TypeIsObject(e)){throw new TypeError("target must be an object")}};var wn={apply:function apply(){return re.Call(re.Call,null,arguments)},construct:function construct(e,t){if(!re.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!re.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return re.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){mn(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){mn(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(wn,{ownKeys:function ownKeys(e){mn(e);var t=Object.getOwnPropertyNames(e);if(re.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var jn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(wn,{isExtensible:function isExtensible(e){mn(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){mn(e);return jn(function(){Object.preventExtensions(e)})}})}if(s){var Sn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Sn(o,t,r)}if("value"in n){return n.value}if(n.get){return re.Call(n.get,r)}return void 0};var Tn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Tn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!re.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ee.defineProperty(o,r,{value:n})}else{return ee.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(wn,{defineProperty:function defineProperty(e,t,r){mn(e);return jn(function(){Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){mn(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){mn(e);var r=arguments.length>2?arguments[2]:e;return Sn(e,t,r)},set:function set(e,t,r){mn(e);var n=arguments.length>3?arguments[3]:e;return Tn(e,t,r,n)}})}if(Object.getPrototypeOf){var In=Object.getPrototypeOf;wn.getPrototypeOf=function getPrototypeOf(e){mn(e);return In(e)}}if(Object.setPrototypeOf&&wn.getPrototypeOf){var En=function(e,t){var r=t;while(r){if(e===r){return true}r=wn.getPrototypeOf(r)}return false};Object.assign(wn,{setPrototypeOf:function setPrototypeOf(e,t){mn(e);if(t!==null&&!re.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ee.getPrototypeOf(e)){return true}if(ee.isExtensible&&!ee.isExtensible(e)){return false}if(En(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var Pn=function(e,t){if(!re.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){Z(S.Reflect,e,t)}}};Object.keys(wn).forEach(function(e){Pn(e,wn[e])});var Cn=S.Reflect.getPrototypeOf;if(c&&Cn&&Cn.name!=="getPrototypeOf"){Z(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Cn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){Z(S.Reflect,"setPrototypeOf",wn.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){Z(S.Reflect,"defineProperty",wn.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){Z(S.Reflect,"construct",wn.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var Mn=Date.prototype.toString;var xn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return re.Call(Mn,this)};Z(Date.prototype,"toString",xn)}var Nn={anchor:function anchor(e){return re.CreateHTML(this,"a","name",e)},big:function big(){return re.CreateHTML(this,"big","","")},blink:function blink(){return re.CreateHTML(this,"blink","","")},bold:function bold(){return re.CreateHTML(this,"b","","")},fixed:function fixed(){return re.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return re.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return re.CreateHTML(this,"font","size",e)},italics:function italics(){return re.CreateHTML(this,"i","","")},link:function link(e){return re.CreateHTML(this,"a","href",e)},small:function small(){return re.CreateHTML(this,"small","","")},strike:function strike(){return re.CreateHTML(this,"strike","","")},sub:function sub(){return re.CreateHTML(this,"sub","","")},sup:function sub(){return re.CreateHTML(this,"sup","","")}};l(Object.keys(Nn),function(e){var r=String.prototype[e];var n=false;if(re.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){Z(String.prototype,e,Nn[e])}});var An=function(){if(!Y){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e(G())!=="undefined"){return true}if(e([G()])!=="[null]"){return true}var t={a:G()};t[G()]=true;if(e(t)!=="{}"){return true}return false}();var Rn=a(function(){if(!Y){return true}return JSON.stringify(Object(G()))==="{}"&&JSON.stringify([Object(G())])==="[{}]"});if(An||!Rn){var _n=JSON.stringify;Z(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=re.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(K.symbol(n)){return St({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return _n.apply(this,o)})}return S}); \ No newline at end of file diff --git a/documentation/js/libs/htmlparser.js b/documentation/js/libs/htmlparser.js new file mode 100644 index 00000000..522b39ca --- /dev/null +++ b/documentation/js/libs/htmlparser.js @@ -0,0 +1,23 @@ +/*********************************************** +Copyright 2010 - 2012 Chris Winberry . All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +***********************************************/ +/* v2.0.0 */ + +!function(){function t(t,e){var a=function(){};a.prototype=e.prototype,t.super_=e,t.prototype=new a,t.prototype.constructor=t}function e(t,e){this._options=e||{},this._validateBuilder(t);this._builder=t,this.reset()}function a(t,e){this.reset(),this._options=e||{},void 0===this._options.ignoreWhitespace&&(this._options.ignoreWhitespace=!1),void 0===this._options.includeLocation&&(this._options.includeLocation=!1),void 0===this._options.verbose&&(this._options.verbose=!0),void 0===this._options.enforceEmptyTags&&(this._options.enforceEmptyTags=!0),void 0===this._options.caseSensitiveTags&&(this._options.caseSensitiveTags=!1),void 0===this._options.caseSensitiveAttr&&(this._options.caseSensitiveAttr=!1),"function"==typeof t&&(this._callback=t)}function n(t){n.super_.call(this,t,{ignoreWhitespace:!0,verbose:!1,enforceEmptyTags:!1,caseSensitiveTags:!0})}var i;if("undefined"!=typeof module&&void 0!==module.exports)i=module.exports;else{if(i={},this.Tautologistics||(this.Tautologistics={}),this.Tautologistics.NodeHtmlParser)return;this.Tautologistics.NodeHtmlParser=i}var s={Text:"text",Tag:"tag",Attr:"attr",CData:"cdata",Doctype:"doctype",Comment:"comment"};"undefined"!=typeof module&&void 0!==module.exports&&(t(e,require("stream")),e.prototype.writable=!0,e.prototype.write=function(t){t instanceof Buffer&&(t=t.toString()),this.parseChunk(t)},e.prototype.end=function(t){arguments.length&&this.write(t),this.writable=!1,this.done()},e.prototype.destroy=function(){this.writable=!1}),e.prototype.reset=function(){this._state={mode:s.Text,pos:0,data:null,pendingText:null,pendingWrite:null,lastTag:null,isScript:!1,needData:!1,output:[],done:!1},this._builder.reset()},e.prototype.parseChunk=function(t){for(this._state.needData=!1,this._state.data=null!==this._state.data?this._state.data.substr(this.pos)+t:t;this._state.pos\/]+)(\s*)\??(>?)/g,e.prototype._parseTag=function(){var t=this._state;e.re_parseTag.lastIndex=t.pos;var a=e.re_parseTag.exec(t.data);if(a){if(!a[1]&&"!--"===a[2].substr(0,3))return t.mode=s.Comment,void(t.pos+=3);if(!a[1]&&"![CDATA["===a[2].substr(0,8))return t.mode=s.CData,void(t.pos+=8);if(!a[1]&&"!DOCTYPE"===a[2].substr(0,8))return t.mode=s.Doctype,void(t.pos+=8);if(!t.done&&t.pos+a[0].length===t.data.length)return void(t.needData=!0);var n;">"===a[4]?(t.mode=s.Text,n=a[0].substr(0,a[0].length-1)):(t.mode=s.Attr,n=a[0]),t.pos+=a[0].length;var i={type:s.Tag,name:a[1]+a[2],raw:n};t.mode===s.Attr&&(t.lastTag=i),"script"===i.name.toLowerCase()?t.isScript=!0:"/script"===i.name.toLowerCase()&&(t.isScript=!1),t.mode===s.Attr?this._writePending(i):this._write(i)}else t.needData=!0},e.re_parseAttr_findName=/\s*([^=<>\s'"\/]+)\s*/g,e.prototype._parseAttr_findName=function(){e.re_parseAttr_findName.lastIndex=this._state.pos;var t=e.re_parseAttr_findName.exec(this._state.data);return t?this._state.pos+t[0].length!==e.re_parseAttr_findName.lastIndex?null:{match:t[0],name:t[1]}:null},e.re_parseAttr_findValue=/\s*=\s*(?:'([^']*)'|"([^"]*)"|([^'"\s\/>]+))\s*/g,e.re_parseAttr_findValue_last=/\s*=\s*['"]?(.*)$/g,e.prototype._parseAttr_findValue=function(){var t=this._state;e.re_parseAttr_findValue.lastIndex=t.pos;var a=e.re_parseAttr_findValue.exec(t.data);return a?t.pos+a[0].length!==e.re_parseAttr_findValue.lastIndex?null:{match:a[0],value:a[1]||a[2]||a[3]}:t.done?(e.re_parseAttr_findValue_last.lastIndex=t.pos,a=e.re_parseAttr_findValue_last.exec(t.data),a?{match:a[0],value:""!==a[1]?a[1]:null}:null):null},e.re_parseAttr_splitValue=/\s*=\s*['"]?/g,e.re_parseAttr_selfClose=/(\s*\/\s*)(>?)/g,e.prototype._parseAttr=function(){var t=this._state,a=this._parseAttr_findName(t);if(a&&"?"!==a.name){if(!t.done&&t.pos+a.match.length===t.data.length)return t.needData=!0,null;t.pos+=a.match.length;var n=this._parseAttr_findValue(t);t.data.indexOf(" ",t.pos);if(n){if(!t.done&&t.pos+n.match.length===t.data.length)return t.needData=!0,void(t.pos-=a.match.length);t.pos+=n.match.length}else if(t.data.indexOf(" ",t.pos-1))n={match:"",value:a.name};else{if(e.re_parseAttr_splitValue.lastIndex=t.pos,e.re_parseAttr_splitValue.exec(t.data))return t.needData=!0,void(t.pos-=a.match.length);n={match:"",value:null}}t.lastTag.raw+=a.match+n.match,this._writePending({type:s.Attr,name:a.name,data:n.value})}else{e.re_parseAttr_selfClose.lastIndex=t.pos;var i=e.re_parseAttr_selfClose.exec(t.data);if(i&&i.index===t.pos){if(!t.done&&!i[2]&&t.pos+i[0].length===t.data.length)return void(t.needData=!0);t.lastTag.raw+=i[1],this._write({type:s.Tag,name:"/"+t.lastTag.name,raw:null}),t.pos+=i[1].length}var r=t.data.indexOf(">",t.pos);if(r<0){if(t.done)return t.lastTag.raw+=t.data.substr(t.pos),void(t.pos=t.data.length);t.needData=!0}else t.pos=r+1,t.mode=s.Text}},e.re_parseCData_findEnding=/\]{1,2}$/,e.prototype._parseCData=function(){var t=this._state,a=t.data.indexOf("]]>",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0){if(e.re_parseCData_findEnding.lastIndex=t.pos,e.re_parseCData_findEnding.exec(t.data))return void(t.needData=!0);t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0}else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.CData,data:n}),t.mode=s.Text,t.pos=a+3}},e.prototype._parseDoctype=function(){var t=this._state,a=t.data.indexOf(">",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0)e.re_parseCData_findEnding.lastIndex=t.pos,t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0;else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.Doctype,data:n}),t.mode=s.Text,t.pos=a+1}},e.re_parseComment_findEnding=/\-{1,2}$/,e.prototype._parseComment=function(){var t=this._state,a=t.data.indexOf("--\x3e",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0){if(e.re_parseComment_findEnding.lastIndex=t.pos,e.re_parseComment_findEnding.exec(t.data))return void(t.needData=!0);t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0}else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.Comment,data:n}),t.mode=s.Text,t.pos=a+3}},a._emptyTags={area:1,base:1,basefont:1,br:1,col:1,frame:1,hr:1,img:1,input:1,isindex:1,link:1,meta:1,param:1,embed:1,"?xml":1},a.reWhitespace=/^\s*$/,a.prototype.dom=null,a.prototype.reset=function(){this.dom=[],this._done=!1,this._tagStack=[],this._lastTag=null,this._tagStack.last=function(){return this.length?this[this.length-1]:null},this._line=1,this._col=1},a.prototype.done=function(){this._done=!0,this.handleCallback(null)},a.prototype.error=function(t){this.handleCallback(t)},a.prototype.handleCallback=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},a.prototype.isEmptyTag=function(t){var e=t.name.toLowerCase();return"?"==e.charAt(0)||("/"==e.charAt(0)&&(e=e.substring(1)),this._options.enforceEmptyTags&&!!a._emptyTags[e])},a.prototype._getLocation=function(){return{line:this._line,col:this._col}},a.prototype._updateLocation=function(t){var e=t.type===s.Tag?t.raw:t.data;if(null!==e){var a=e.split("\n");this._line+=a.length-1,a.length>1&&(this._col=1),this._col+=a[a.length-1].length,t.type===s.Tag?this._col+=2:t.type===s.Comment?this._col+=7:t.type===s.CData&&(this._col+=12)}},a.prototype._copyElement=function(t){var e={type:t.type};if(this._options.verbose&&void 0!==t.raw&&(e.raw=t.raw),void 0!==t.name)switch(t.type){case s.Tag:e.name=this._options.caseSensitiveTags?t.name:t.name.toLowerCase();break;case s.Attr:e.name=this._options.caseSensitiveAttr?t.name:t.name.toLowerCase();break;default:e.name=this._options.caseSensitiveTags?t.name:t.name.toLowerCase()}return void 0!==t.data&&(e.data=t.data),t.location&&(e.location={line:t.location.line,col:t.location.col}),e},a.prototype.write=function(t){if(this._done&&this.handleCallback(new Error("Writing to the builder after done() called is not allowed without a reset()")),this._options.includeLocation&&t.type!==s.Attr&&(t.location=this._getLocation(),this._updateLocation(t)),t.type!==s.Text||!this._options.ignoreWhitespace||!a.reWhitespace.test(t.data)){var e,n;if(this._tagStack.last())if(t.type===s.Tag)if("/"==t.name.charAt(0)){var i=this._options.caseSensitiveTags?t.name.substring(1):t.name.substring(1).toLowerCase();if(!this.isEmptyTag(t)){for(var r=this._tagStack.length-1;r>-1&&this._tagStack[r--].name!=i;);if(r>-1||this._tagStack[0].name==i)for(;r=0&&s.length>=n)return s;if(a&&e.children)i=e.children;else{if(!(e instanceof Array))return s;i=e}for(var d=0;d=0&&s.length>=n));d++);return s},getElementById:function(t,e,a){var n=r.getElements({id:t},e,a,1);return n.length?n[0]:null},getElementsByTagName:function(t,e,a,n){return r.getElements({tag_name:t},e,a,n)},getElementsByTagType:function(t,e,a,n){return r.getElements({tag_type:t},e,a,n)}};i.Parser=e,i.HtmlBuilder=a,i.RssBuilder=n,i.ElementType=s,i.DomUtils=r}(); diff --git a/documentation/js/libs/innersvg.js b/documentation/js/libs/innersvg.js new file mode 100644 index 00000000..b1099deb --- /dev/null +++ b/documentation/js/libs/innersvg.js @@ -0,0 +1,9 @@ +/** + * innerHTML property for SVGElement + * Copyright(c) 2010, Jeff Schiller + * + * Licensed under the Apache License, Version 2 + * + * Minor modifications by Chris Price to only polyfill when required. + */ +!function(e){if(e&&!("innerHTML"in e.prototype)){var t=function(e,r){var i=e.nodeType;if(3==i)r.push(e.textContent.replace(/&/,"&").replace(/",">"));else if(1==i){if(r.push("<",e.tagName),e.hasAttributes())for(var n=e.attributes,s=0,o=n.length;s");for(var h=e.childNodes,s=0,o=h.length;s")}else r.push("/>")}else{if(8!=i)throw"Error serializing XML. Unhandled node of type: "+i;r.push("\x3c!--",e.nodeValue,"--\x3e")}};Object.defineProperty(e.prototype,"innerHTML",{get:function(){for(var e=[],r=this.firstChild;r;)t(r,e),r=r.nextSibling;return e.join("")},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser;t.async=!1,sXML=""+e+"";for(var r=t.parseFromString(sXML,"text/xml").documentElement.firstChild;r;)this.appendChild(this.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(e){throw new Error("Error parsing XML string")}}})}}((0,eval)("this").SVGElement); \ No newline at end of file diff --git a/documentation/js/libs/lit-html.js b/documentation/js/libs/lit-html.js new file mode 100644 index 00000000..743deea1 --- /dev/null +++ b/documentation/js/libs/lit-html.js @@ -0,0 +1 @@ +"use strict";function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var n=e;for(;n!==s;){var _e=n.nextSibling;t.insertBefore(n,i),n=_e}},o=function o(t,e){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=e;for(;i!==s;){var _e2=i.nextSibling;t.removeChild(i),i=_e2}},r={},a={},l="{{lit-".concat(String(Math.random()).slice(2),"}}"),h="\x3c!--".concat(l,"--\x3e"),d=new RegExp("".concat(l,"|").concat(h)),c="$lit$";var u=function u(t,e){var _this=this;_classCallCheck(this,u);this.parts=[],this.element=e;var s=-1,i=0;var n=[],o=function o(e){var r=e.content,a=document.createTreeWalker(r,133,null,!1);var h=0;for(;a.nextNode();){s++;var _e3=a.currentNode;if(1===_e3.nodeType){if(_e3.hasAttributes()){var _n=_e3.attributes;var _o=0;for(var _t=0;_t<_n.length;_t++){_n[_t].value.indexOf(l)>=0&&_o++}for(;_o-- >0;){var _n2=t.strings[i],_o2=g.exec(_n2)[2],_r=_o2.toLowerCase()+c,_a=_e3.getAttribute(_r).split(d);_this.parts.push({type:"attribute",index:s,name:_o2,strings:_a}),_e3.removeAttribute(_r),i+=_a.length-1}}"TEMPLATE"===_e3.tagName&&o(_e3)}else if(3===_e3.nodeType){var _t2=_e3.data;if(_t2.indexOf(l)>=0){var _o3=_e3.parentNode,_r2=_t2.split(d),_a2=_r2.length-1;for(var _t3=0;_t3<_a2;_t3++){_o3.insertBefore(""===_r2[_t3]?m():document.createTextNode(_r2[_t3]),_e3),_this.parts.push({type:"node",index:++s})}""===_r2[_a2]?(_o3.insertBefore(m(),_e3),n.push(_e3)):_e3.data=_r2[_a2],i+=_a2}}else if(8===_e3.nodeType)if(_e3.data===l){var _t4=_e3.parentNode;null!==_e3.previousSibling&&s!==h||(s++,_t4.insertBefore(m(),_e3)),h=s,_this.parts.push({type:"node",index:s}),null===_e3.nextSibling?_e3.data="":(n.push(_e3),s--),i++}else{var _t5=-1;for(;-1!==(_t5=_e3.data.indexOf(l,_t5+1));){_this.parts.push({type:"node",index:-1})}}}};o(e);for(var _i=0;_i=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var v=function(){function v(t,e,s){_classCallCheck(this,v);this._parts=[],this.template=t,this.processor=e,this.options=s}_createClass(v,[{key:"update",value:function update(t){var e=0;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=this._parts[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _s=_step.value;void 0!==_s&&_s.setValue(t[e]),e++}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=this._parts[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var _t7=_step2.value;void 0!==_t7&&_t7.commit()}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return!=null){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}}},{key:"_clone",value:function _clone(){var _this2=this;var t=i?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;var s=0,n=0;var o=function o(t){var i=document.createTreeWalker(t,133,null,!1);var r=i.nextNode();for(;s".concat(_get(_getPrototypeOf(x.prototype),"getHTML",this).call(this),"")}},{key:"getTemplateElement",value:function getTemplateElement(){var t=_get(_getPrototypeOf(x.prototype),"getTemplateElement",this).call(this),e=t.content,s=e.firstChild;return e.removeChild(s),n(e,s.firstChild),t}}]);return x}(f);var _=function _(t){return null===t||!("object"==_typeof(t)||"function"==typeof t)};var y=function(){function y(t,e,s){_classCallCheck(this,y);this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(var _t11=0;_t110&&arguments[0]!==undefined?arguments[0]:this.startNode;o(this.startNode.parentNode,t.nextSibling,this.endNode)}}]);return V}();var b=function(){function b(t,e,s){_classCallCheck(this,b);if(this.value=void 0,this._pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}_createClass(b,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t15=this._pendingValue;this._pendingValue=r,_t15(this)}if(this._pendingValue===r)return;var t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=r}}]);return b}();var w=function(_y){_inherits(w,_y);function w(t,e,s){var _this3;_classCallCheck(this,w);_this3=_possibleConstructorReturn(this,_getPrototypeOf(w).call(this,t,e,s)),_this3.single=2===s.length&&""===s[0]&&""===s[1];return _this3}_createClass(w,[{key:"_createPart",value:function _createPart(){return new T(this)}},{key:"_getValue",value:function _getValue(){return this.single?this.parts[0].value:_get(_getPrototypeOf(w.prototype),"_getValue",this).call(this)}},{key:"commit",value:function commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]);return w}(y);var T=function(_N){_inherits(T,_N);function T(){_classCallCheck(this,T);return _possibleConstructorReturn(this,_getPrototypeOf(T).apply(this,arguments))}return T}(N);var E=!1;try{var _t16={get capture(){return E=!0,!1}};window.addEventListener("test",_t16,_t16),window.removeEventListener("test",_t16,_t16)}catch(t){}var A=function(){function A(t,e,s){var _this4=this;_classCallCheck(this,A);this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this._boundHandleEvent=function(t){return _this4.handleEvent(t)}}_createClass(A,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t17=this._pendingValue;this._pendingValue=r,_t17(this)}if(this._pendingValue===r)return;var t=this._pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),n&&(this._options=P(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=r}},{key:"handleEvent",value:function handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}]);return A}();var P=function P(t){return t&&(E?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)};var S=function(){function S(){_classCallCheck(this,S)}_createClass(S,[{key:"handleAttributeExpressions",value:function handleAttributeExpressions(t,e,s,i){var n=e[0];if("."===n){return new w(t,e.slice(1),s).parts}return"@"===n?[new A(t,e.slice(1),i.eventContext)]:"?"===n?[new b(t,e.slice(1),s)]:new y(t,e,s).parts}},{key:"handleTextExpression",value:function handleTextExpression(t){return new V(t)}}]);return S}();var C=new S;function M(t){var e=L.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},L.set(t.type,e));var s=e.stringsArray.get(t.strings);if(void 0!==s)return s;var i=t.strings.join(l);return void 0===(s=e.keyString.get(i))&&(s=new u(t,t.getTemplateElement()),e.keyString.set(i,s)),e.stringsArray.set(t.strings,s),s}var L=new Map,k=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");t.html=function(t){for(var _len=arguments.length,e=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){e[_key-1]=arguments[_key]}return new f(t,e,"html",C)},t.svg=function(t){for(var _len2=arguments.length,e=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){e[_key2-1]=arguments[_key2]}return new x(t,e,"svg",C)},t.DefaultTemplateProcessor=S,t.defaultTemplateProcessor=C,t.directive=function(t){return function(){var i=t.apply(void 0,arguments);return e.set(i,!0),i}},t.isDirective=s,t.removeNodes=o,t.reparentNodes=n,t.noChange=r,t.nothing=a,t.AttributeCommitter=y,t.AttributePart=N,t.BooleanAttributePart=b,t.EventPart=A,t.isPrimitive=_,t.NodePart=V,t.PropertyCommitter=w,t.PropertyPart=T,t.parts=k,t.render=function(t,e,s){var i=k.get(e);void 0===i&&(o(e,e.firstChild),k.set(e,i=new V(Object.assign({templateFactory:M},s))),i.appendInto(e)),i.setValue(t),i.commit()},t.templateCaches=L,t.templateFactory=M,t.TemplateInstance=v,t.SVGTemplateResult=x,t.TemplateResult=f,t.createMarker=m,t.isTemplatePartActive=p,t.Template=u,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/documentation/js/libs/prism.js b/documentation/js/libs/prism.js new file mode 100644 index 00000000..bb9d7ebb --- /dev/null +++ b/documentation/js/libs/prism.js @@ -0,0 +1,46 @@ +/* PrismJS 1.23.0 +https://prismjs.com/download.html?#themes=prism&languages=markup+css+clike+javascript+apacheconf+aspnet+bash+c+csharp+cpp+coffeescript+dart+docker+elm+git+go+graphql+handlebars+haskell+http+ignore+java+json+kotlin+less+markdown+markup-templating+nginx+php+powershell+ruby+rust+sass+scss+sql+swift+typescript+wasm+yaml&plugins=line-highlight+line-numbers+toolbar+copy-to-clipboard */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; +Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/i,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/i,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/i,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:Prism.languages.csharp||{}}}); +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); +!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism); +!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"class-name":[s,{pattern:RegExp(t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); +!function(e){var r="(?:[ \t]+(?![ \t])(?:)?|)".replace(//g,function(){return"\\\\[\r\n](?:\\s|\\\\[\r\n]|#.*(?!.))*(?![\\s#]|\\\\[\r\n])"}),n="\"(?:[^\"\\\\\r\n]|\\\\(?:\r\n|[^]))*\"|'(?:[^'\\\\\r\n]|\\\\(?:\r\n|[^]))*'",t="--[\\w-]+=(?:|(?![\"'])(?:[^\\s\\\\]|\\\\.)+)".replace(//g,function(){return n}),o={pattern:RegExp(n),greedy:!0},i={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(e,n){return e=e.replace(//g,function(){return t}).replace(//g,function(){return r}),RegExp(e,n)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a("(^(?:ONBUILD)?\\w+)(?:)*","i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a("(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\\b","i"),lookbehind:!0,greedy:!0},{pattern:a("(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\\\]+)AS","i"),lookbehind:!0,greedy:!0},{pattern:a("(^ONBUILD)\\w+","i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:i,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:i},e.languages.dockerfile=e.languages.docker}(Prism); +Prism.languages.elm={comment:/--.*|{-[\s\S]*?-}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; +Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}; +Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete Prism.languages.go["class-name"]; +Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; +!function(h){function v(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(h.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,o){if(a.language===r){var c=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var n,t=c.length;-1!==a.code.indexOf(n=v(r,t));)++t;return c[t]=e,n}),a.grammar=h.languages.markup}}},tokenizePlaceholders:{value:function(p,k){if(p.language===k&&p.tokenStack){p.grammar=h.languages[k];var m=0,d=Object.keys(p.tokenStack);!function e(n){for(var t=0;t=d.length);t++){var a=n[t];if("string"==typeof a||a.content&&"string"==typeof a.content){var r=d[m],o=p.tokenStack[r],c="string"==typeof a?a:a.content,i=v(k,r),u=c.indexOf(i);if(-1@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")})}(Prism); +Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|{-[\s\S]*?-})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|qualified|as|hiding)\b/}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[-!#$%*+=?&@|~:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,hvariable:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*\b/,constant:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; +!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); +!function(n){n.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},n.languages.gitignore=n.languages.ignore,n.languages.hgignore=n.languages.ignore,n.languages.npmignore=n.languages.ignore}(Prism); +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",a={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])"),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism); +Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; +!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],e.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/("""|''')[\s\S]*?\1/,alias:"string"}}),e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var n=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:e.languages.kotlin}},{pattern:/\$\w+/,alias:"variable"}];e.languages.kotlin.string.inside=e.languages.kotlin["raw-string"].inside={interpolation:n},e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism); +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}); +!function(u){function n(n){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";u.languages.markdown=u.languages.extend("markup",{}),u.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:u.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:u.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:u.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(u.languages.markdown[e].inside.content.inside[n]=u.languages.markdown[n])})}),u.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\b\w+(?=\s*\()/,property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); +!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); +!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,function(){return a});a=a.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,a=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:a}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:a,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|with|show|hide)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; +Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[^(])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|some|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},keyword:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism); +Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; +!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|(?:[\r\n]\\s*)?#))".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return e});return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return t})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
                                                                                                                                   ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^( \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(b(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(y)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return e.classList.contains(t)}function y(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(y)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows");if(t){var i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=t(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1 + * Licensed under the New BSD License. + * https://github.com/stackp/promisejs + */ +(function(a){function b(){this._callbacks=[];}b.prototype.then=function(a,c){var d;if(this._isdone)d=a.apply(c,this.result);else{d=new b();this._callbacks.push(function(){var b=a.apply(c,arguments);if(b&&typeof b.then==='function')b.then(d.done,d);});}return d;};b.prototype.done=function(){this.result=arguments;this._isdone=true;for(var a=0;a=300)&&j.status!==304);h.done(a,j.responseText,j);}};j.send(k);return h;}function h(a){return function(b,c,d){return g(a,b,c,d);};}var i={Promise:b,join:c,chain:d,ajax:g,get:h('GET'),post:h('POST'),put:h('PUT'),del:h('DELETE'),ENOXHR:1,ETIMEOUT:2,ajaxTimeout:0};if(typeof define==='function'&&define.amd)define(function(){return i;});else a.promise=i;})(this); \ No newline at end of file diff --git a/documentation/js/libs/svg-pan-zoom.min.js b/documentation/js/libs/svg-pan-zoom.min.js new file mode 100644 index 00000000..807f0e44 --- /dev/null +++ b/documentation/js/libs/svg-pan-zoom.min.js @@ -0,0 +1,3 @@ +// svg-pan-zoom v3.6.0 +// https://github.com/ariutta/svg-pan-zoom +!function t(e,o,n){function i(r,a){if(!o[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var h=o[r]={exports:{}};e[r][0].call(h.exports,function(t){var o=e[r][1][t];return i(o?o:t)},h,h.exports,t,e,o,n)}return o[r].exports}for(var s="function"==typeof require&&require,r=0;r=0;n--)this.eventListeners.hasOwnProperty(o[n])&&delete this.eventListeners[o[n]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!this.options.preventMouseEventsDefault&&h);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},l.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var t=this;this.wheelListener=function(e){return t.handleMouseWheel(e)};var e=!this.options.preventMouseEventsDefault;n.on(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!0}},l.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var t=!this.options.preventMouseEventsDefault;n.off(this.options.eventsListenerElement||this.svg,this.wheelListener,t),this.options.mouseWheelZoomEnabled=!1}},l.prototype.handleMouseWheel=function(t){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1);var e=t.deltaY||1,o=Date.now()-this.lastMouseWheelEventTime,n=3+Math.max(0,30-o);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in t&&0===t.deltaMode&&t.wheelDelta&&(e=0===t.deltaY?0:Math.abs(t.wheelDelta)/t.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/n;var i=this.svg.getScreenCTM().inverse(),s=r.getEventPoint(t,this.svg).matrixTransform(i),a=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(a,s)}},l.prototype.zoomAtPoint=function(t,e,o){var n=this.viewport.getOriginalState();o?(t=Math.max(this.options.minZoom*n.zoom,Math.min(this.options.maxZoom*n.zoom,t)),t/=this.getZoom()):this.getZoom()*tthis.options.maxZoom*n.zoom&&(t=this.options.maxZoom*n.zoom/this.getZoom());var i=this.viewport.getCTM(),s=e.matrixTransform(i.inverse()),r=this.svg.createSVGMatrix().translate(s.x,s.y).scale(t).translate(-s.x,-s.y),a=i.multiply(r);a.a!==i.a&&this.viewport.setCTM(a)},l.prototype.zoom=function(t,e){this.zoomAtPoint(t,r.getSvgCenterPoint(this.svg,this.width,this.height),e)},l.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)},l.prototype.publicZoomAtPoint=function(t,e,o){if(o&&(t=this.computeFromRelativeZoom(t)),"SVGPoint"!==s.getType(e)){if(!("x"in e&&"y"in e))throw new Error("Given point is invalid");e=r.createSVGPoint(this.svg,e.x,e.y)}this.zoomAtPoint(t,e,o)},l.prototype.getZoom=function(){return this.viewport.getZoom()},l.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},l.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom},l.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)},l.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},l.prototype.reset=function(){this.resetZoom(),this.resetPan()},l.prototype.handleDblClick=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled){var e=t.target.getAttribute("class")||"";if(e.indexOf("svg-pan-zoom-control")>-1)return!1}var o;o=t.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=r.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(o,n)},l.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),s.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&s.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=r.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))},l.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var e=r.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),o=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(o)}},l.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&(this.state="none")},l.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)},l.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)},l.prototype.center=function(){var t=this.viewport.getViewBox(),e=.5*(this.width-(t.width+2*t.x)*this.getZoom()),o=.5*(this.height-(t.height+2*t.y)*this.getZoom());this.getPublicInstance().pan({x:e,y:o})},l.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},l.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)},l.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)},l.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}},l.prototype.resize=function(){var t=r.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},l.prototype.destroy=function(){var t=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var e in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],!this.options.preventMouseEventsDefault&&h);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(e){return e.svg!==t.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},l.prototype.getPublicInstance=function(){var t=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return t.options.panEnabled=!0,t.pi},disablePan:function(){return t.options.panEnabled=!1,t.pi},isPanEnabled:function(){return!!t.options.panEnabled},pan:function(e){return t.pan(e),t.pi},panBy:function(e){return t.panBy(e),t.pi},getPan:function(){return t.getPan()},setBeforePan:function(e){return t.options.beforePan=null===e?null:s.proxy(e,t.publicInstance),t.pi},setOnPan:function(e){return t.options.onPan=null===e?null:s.proxy(e,t.publicInstance),t.pi},enableZoom:function(){return t.options.zoomEnabled=!0,t.pi},disableZoom:function(){return t.options.zoomEnabled=!1,t.pi},isZoomEnabled:function(){return!!t.options.zoomEnabled},enableControlIcons:function(){return t.options.controlIconsEnabled||(t.options.controlIconsEnabled=!0,i.enable(t)),t.pi},disableControlIcons:function(){return t.options.controlIconsEnabled&&(t.options.controlIconsEnabled=!1,i.disable(t)),t.pi},isControlIconsEnabled:function(){return!!t.options.controlIconsEnabled},enableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!0,t.pi},disableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!1,t.pi},isDblClickZoomEnabled:function(){return!!t.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return t.enableMouseWheelZoom(),t.pi},disableMouseWheelZoom:function(){return t.disableMouseWheelZoom(),t.pi},isMouseWheelZoomEnabled:function(){return!!t.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return t.options.zoomScaleSensitivity=e,t.pi},setMinZoom:function(e){return t.options.minZoom=e,t.pi},setMaxZoom:function(e){return t.options.maxZoom=e,t.pi},setBeforeZoom:function(e){return t.options.beforeZoom=null===e?null:s.proxy(e,t.publicInstance),t.pi},setOnZoom:function(e){return t.options.onZoom=null===e?null:s.proxy(e,t.publicInstance),t.pi},zoom:function(e){return t.publicZoom(e,!0),t.pi},zoomBy:function(e){return t.publicZoom(e,!1),t.pi},zoomAtPoint:function(e,o){return t.publicZoomAtPoint(e,o,!0),t.pi},zoomAtPointBy:function(e,o){return t.publicZoomAtPoint(e,o,!1),t.pi},zoomIn:function(){return this.zoomBy(1+t.options.zoomScaleSensitivity),t.pi},zoomOut:function(){return this.zoomBy(1/(1+t.options.zoomScaleSensitivity)),t.pi},getZoom:function(){return t.getRelativeZoom()},setOnUpdatedCTM:function(e){return t.options.onUpdatedCTM=null===e?null:s.proxy(e,t.publicInstance),t.pi},resetZoom:function(){return t.resetZoom(),t.pi},resetPan:function(){return t.resetPan(),t.pi},reset:function(){return t.reset(),t.pi},fit:function(){return t.fit(),t.pi},contain:function(){return t.contain(),t.pi},center:function(){return t.center(),t.pi},updateBBox:function(){return t.updateBBox(),t.pi},resize:function(){return t.resize(),t.pi},getSizes:function(){return{width:t.width,height:t.height,realZoom:t.getZoom(),viewBox:t.viewport.getViewBox()}},destroy:function(){return t.destroy(),t.pi}}),this.publicInstance};var c=[],p=function(t,e){var o=s.getSvg(t);if(null===o)return null;for(var n=c.length-1;n>=0;n--)if(c[n].svg===o)return c[n].instance.getPublicInstance();return c.push({svg:o,instance:new l(o,e)}),c[c.length-1].instance.getPublicInstance()};e.exports=p},{"./control-icons":2,"./shadow-viewport":3,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(t,e,o){var n=t("./utilities"),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var o=null;if(o=n.isElement(e)?e:t.querySelector(e),!o){var i=Array.prototype.slice.call(t.childNodes||t.children).filter(function(t){return"defs"!==t.nodeName&&"#text"!==t.nodeName});1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(o=i[0])}if(!o){var s="viewport-"+(new Date).toISOString().replace(/\D/g,"");o=document.createElementNS(this.svgNS,"g"),o.setAttribute("id",s);var r=t.childNodes||t.children;if(r&&r.length>0)for(var a=r.length;a>0;a--)"defs"!==r[r.length-a].nodeName&&o.appendChild(r[r.length-a]);t.appendChild(o)}var l=[];return o.getAttribute("class")&&(l=o.getAttribute("class").split(" ")),~l.indexOf("svg-pan-zoom_viewport")||(l.push("svg-pan-zoom_viewport"),o.setAttribute("class",l.join(" "))),o},setupSvgAttributes:function(t){if(t.setAttribute("xmlns",this.svgNS),t.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),t.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==t.parentNode){var e=t.getAttribute("style")||"";e.toLowerCase().indexOf("overflow")===-1&&t.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:n.throttle(function(){for(var t=document.querySelectorAll("defs"),e=t.length,o=0;oe?(clearTimeout(a),a=null,l=h,s=t.apply(n,i),a||(n=i=null)):a||o.trailing===!1||(a=setTimeout(u,c)),s}},createRequestAnimationFrame:function(t){var e=null;return"auto"!==t&&t<60&&t>1&&(e=Math.floor(1e3/t)),null===e?window.requestAnimationFrame||n(33):n(e)}}},{}]},{},[1]); \ No newline at end of file diff --git a/documentation/js/libs/tablesort.min.js b/documentation/js/libs/tablesort.min.js new file mode 100644 index 00000000..09de2aed --- /dev/null +++ b/documentation/js/libs/tablesort.min.js @@ -0,0 +1,6 @@ +/*! + * tablesort v5.1.0 (2018-09-14) + * http://tristen.ca/tablesort/demo/ + * Copyright (c) 2018 ; Licensed MIT +*/ +!function(){function a(b,c){if(!(this instanceof a))return new a(b,c);if(!b||"TABLE"!==b.tagName)throw new Error("Element must be a table");this.init(b,c||{})}var b=[],c=function(a){var b;return window.CustomEvent&&"function"==typeof window.CustomEvent?b=new CustomEvent(a):(b=document.createEvent("CustomEvent"),b.initCustomEvent(a,!1,!1,void 0)),b},d=function(a){return a.getAttribute("data-sort")||a.textContent||a.innerText||""},e=function(a,b){return a=a.trim().toLowerCase(),b=b.trim().toLowerCase(),a===b?0:a0)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e0&&l.push(k),m++;if(!l)return}for(m=0;m2&&void 0!==arguments[2]&&arguments[2];for(var s in t)void 0!==i[s]&&(null===i[s]||"object"!==(0,c.default)(i[s])?n(t,i,s,o):"object"===(0,c.default)(t[s])&&e.fillIfDefined(t[s],i[s],o))},e.extend=function(t,e){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var r=0;r3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var r in o)if(o.hasOwnProperty(r)&&-1===t.indexOf(r))if(o[r]&&o[r].constructor===Object)void 0===i[r]&&(i[r]={}),i[r].constructor===Object?e.deepExtend(i[r],o[r]):n(i,o,r,s);else if(Array.isArray(o[r])){i[r]=[];for(var a=0;a2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r in i)if(i.hasOwnProperty(r)||!0===o)if(i[r]&&i[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r].constructor===Object?e.deepExtend(t[r],i[r],o):n(t,i,r,s);else if(Array.isArray(i[r])){t[r]=[];for(var a=0;a=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){var o;return-1!=t.indexOf("rgba")?t:-1!=t.indexOf("rgb")?(o=t.substr(t.indexOf("(")+1).replace(")","").split(","),"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"):(o=e.hexToRGB(t),null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")")},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(!0===e.isString(t)){if(!0===e.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(!0===e.isValidHex(t)){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t;return{h:60*((t==o?3:i==o?1:5)-s/(n-o))/360,s:(n-o)/n,v:n}};var v={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return(0,l.default)(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=v.split(t.style.cssText),n=v.split(i),s=e.extend(o,n);t.style.cssText=v.join(s)},e.removeCssText=function(t,e){var i=v.split(t.style.cssText),o=v.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=v.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},e.isValidRGB=function(t){return t=t.replace(" ",""),/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t)},e.isValidRGBA=function(t){return t=t.replace(" ",""),/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t)},e.selectiveBridgeObject=function(t,i){if(null!==i&&"object"===(void 0===i?"undefined":(0,c.default)(i))){for(var o=(0,h.default)(i),n=0;n0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=function(t){return null!==t&&void 0!==t},s=function(t){return null!==t&&"object"===(void 0===t?"undefined":(0,c.default)(t))};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!s(o))throw new Error("Parameter globalOptions must be an object");var r=e[i],a=s(o)&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(o),d=a?o[i]:void 0,l=d?d.enabled:void 0;if(void 0!==r){if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!n(d))return;t[i]=(0,h.default)(d)}if(s(r)){var u=!0;void 0!==r.enabled?u=r.enabled:void 0!==l&&(u=d.enabled),function(t,e,i){s(t[i])||(t[i]={});var o=e[i],n=t[i];for(var r in o)o.hasOwnProperty(r)&&(n[r]=o[r])}(t,e,i),t[i].enabled=u}}},e.binarySearchCustom=function(t,e,i,o){for(var n=0,s=0,r=t.length-1;s<=r&&n<1e4;){var a=Math.floor((s+r)/2),h=t[a],d=void 0===o?h[i]:h[i][o],l=e(d);if(0==l)return a;-1==l?s=a+1:r=a-1,n++}return-1},e.binarySearchValue=function(t,e,i,o,n){var s,r,a,h,d=0,l=0,u=t.length-1;for(n=void 0!=n?n:function(t,e){return t==e?0:t0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?l=h+1:u=h-1,d++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o},e.topMost=function(t,e){var i=void 0;Array.isArray(e)||(e=[e]);var o=!0,n=!1,s=void 0;try{for(var a,h=(0,r.default)(t);!(o=(a=h.next()).done);o=!0){var d=a.value;if(d){i=d[e[0]];for(var l=1;ln?1:or)&&(s=h,r=d)}return s},n.prototype.min=function(t){var e,i,o=this._data,n=(0,l.default)(o),s=null,r=null;for(e=0,i=n.length;e0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){n<0&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.printStyle=void 0;var n=i(19),s=o(n),r=i(6),a=o(r),h=i(8),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=!1,v=void 0,g="background: #FFeeee; color: #dd0000",y=function(){function t(){(0,u.default)(this,t)}return(0,p.default)(t,null,[{key:"validate",value:function(e,i,o){m=!1,v=i;var n=i;return void 0!==o&&(n=i[o]),t.parse(e,n,[]),m}},{key:"parse",value:function(e,i,o){for(var n in e)e.hasOwnProperty(n)&&t.check(n,e,i,o)}},{key:"check",value:function(e,i,o,n){if(void 0===o[e]&&void 0===o.__any__)return void t.getSuggestion(e,o,n);var s=e,r=!0;void 0===o[e]&&void 0!==o.__any__&&(s="__any__",r="object"===t.getType(i[e]));var a=o[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,o,s,a,n)}},{key:"checkFields",value:function(e,i,o,n,s,r){var a=function(i){console.log("%c"+i+t.printLocation(r,e),g)},h=t.getType(i[e]),l=s[h];void 0!==l?"array"===t.getType(l)&&-1===l.indexOf(i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),m=!0):"object"===h&&"__any__"!==n&&(r=f.copyAndExtendArray(r,e),t.parse(i[e],o[n],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print((0,d.default)(s))+". Received ["+h+'] "'+i[e]+'"'),m=!0)}},{key:"getType",value:function(t){var e=void 0===t?"undefined":(0,a.default)(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,i,o){var n=t.findInOptions(e,i,o,!1),s=t.findInOptions(e,v,[],!0),r=void 0 +;r=void 0!==n.indexMatch?" in "+t.printLocation(n.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e):". Did you mean one of these: "+t.print((0,d.default)(i))+t.printLocation(o,e),console.log('%cUnknown option detected: "'+e+'"'+r,g),m=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[],h=e.toLowerCase(),d=void 0;for(var l in i){var u=void 0;if(void 0!==i[l].__type__&&!0===n){var c=t.findInOptions(e,i[l],f.copyAndExtendArray(o,l));s>c.distance&&(r=c.closestMatch,a=c.path,s=c.distance,d=c.indexMatch)}else-1!==l.toLowerCase().indexOf(h)&&(d=l),u=t.levenshteinDistance(e,l),s>u&&(r=l,a=f.copyArray(o),s=u)}return{closestMatch:r,path:a,distance:s,indexMatch:d}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",o="\n\n"+i+"options = {\n",n=0;n0&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){this.enableShadow(t,e),t.fill(),this.disableShadow(t,e),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,i,o,n){void 0!==i&&this.resize(i,o,n),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(t,e,i,o,n){this._updateBoundingBox(t,e,i,o,n)}},{key:"getDimensionsFromLabel",value:function(t,e,i){this.textSize=this.labelModule.getTextSize(t,e,i);var o=this.textSize.width,n=this.textSize.height;return 0===o&&(o=14,n=14),{width:o,height:n}}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,i)){this.labelModule.getTextSize(t,e,i);var n=2*o.size;this.width=n,this.height=n,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,i,o,n,s,r,a){if(this.resize(t,s,r,a),this.left=o-this.width/2,this.top=n-this.height/2,this.initContextForDraw(t,a),t[e](o,n,a.size),this.performFill(t,a),void 0!==this.options.label){this.labelModule.calculateLabelSize(t,s,r,o,n,"hanging");var h=n+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(t,o,h,s,r,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(m.default);e.default=v},function(t,e,i){var o=i(78),n=i(51);t.exports=function(t){return o(n(t))}},function(t,e,i){var o=i(20),n=i(39);t.exports=i(21)?function(t,e,i){return o.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var o=i(32);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){t.exports={default:i(138),__esModule:!0}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var n=i(188),s=o(n),r=i(77),a=o(r);e.default=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,h=(0,a.default)(t);!(o=(r=h.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&h.return&&h.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if((0,s.default)(Object(e)))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e){t.exports={}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var o=i(84),n=i(58);t.exports=Object.keys||function(t){return o(t,n)}},function(t,e,i){function o(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}o.subtract=function(t,e){var i=new o;return i.x=t.x-e.x,i.y=t.y-e.y,i.z=t.z-e.z,i},o.add=function(t,e){var i=new o;return i.x=t.x+e.x,i.y=t.y+e.y,i.z=t.z+e.z,i},o.avg=function(t,e){return new o((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},o.crossProduct=function(t,e){var i=new o;return i.x=t.y*e.z-t.z*e.y,i.y=t.z*e.x-t.x*e.z,i.z=t.x*e.y-t.y*e.x,i},o.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,void 0!==(s="function"==typeof o?o.apply(e,n):o)&&(t.exports=s)}(0,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;n=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;d=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(o=0;o=r&&nt.range.end){var h={start:t.range.start,end:i};return i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,h,i),n=t.range.conversion(o,r),(i.valueOf()-n.offset)*n.scale}return i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,i),n=t.range.conversion(o,r),(i.valueOf()-n.offset)*n.scale},e.toTime=function(t,i,o){if(0==t.body.hiddenDates.length){var n=t.range.conversion(o);return new Date(i/n.scale+n.offset)}var s=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-s,a=r*i/o,h=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a);return new Date(h+a+t.range.start)},e.getHiddenDurationBetween=function(t,e,i){for(var o=0,n=0;n=e&&r=e&&r<=i&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?o<0?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&t0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=(0,h.default)(this.data)}for(var i=0;ithis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},o.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=o},function(t,e){function i(t){if(t)return o(t)}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;n=.4*v}if(this.options.showMinorLabels&&m){var k=this._repaintMinorText(c,y,t,b);k.style.width=_+"px"}f&&this.options.showMajorLabels?(c>0&&(void 0==w&&(w=c),k=this._repaintMajorText(c,s.getLabelMajor(),t,b)),g=this._repaintMajorLine(c,_,t,b)):m?g=this._repaintMinorLine(c,_,t,b):g&&(g.style.width=parseInt(g.style.width)+_+"px")}if(1e3!==x||u||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines."),u=!0),this.options.showMajorLabels){var S=this.body.util.toTime(0),D=s.getLabelMajor(S),M=D.length*(this.props.majorCharWidth||10)+10;(void 0==w||Mt.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"updateGroupOptions",value:function(t,e,i){if(void 0!==i){var o=t.group;if(void 0!==e&&void 0!==e.group&&o!==e.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof o||"string"==typeof o&&""!=o){var n=i.get(o);h.selectiveNotDeepExtend(["font"],t,n),t.color=h.parseColor(t.color)}}}},{key:"parseOptions",value:function(e,i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments[4],r=["color","fixed","shadow"];if(h.selectiveNotDeepExtend(r,e,i,o),t.checkMass(i),h.mergeOptions(e,i,"shadow",n),void 0!==i.color&&null!==i.color){var a=h.parseColor(i.color);h.fillIfDefined(e.color,a)}else!0===o&&null===i.color&&(e.color=h.bridgeObject(n.color));void 0!==i.fixed&&null!==i.fixed&&("boolean"==typeof i.fixed?(e.fixed.x=i.fixed,e.fixed.y=i.fixed):(void 0!==i.fixed.x&&"boolean"==typeof i.fixed.x&&(e.fixed.x=i.fixed.x),void 0!==i.fixed.y&&"boolean"==typeof i.fixed.y&&(e.fixed.y=i.fixed.y))),!0===o&&null===i.font&&(e.font=h.bridgeObject(n.font)),t.updateGroupOptions(e,i,s),void 0!==i.scaling&&h.mergeOptions(e.scaling,i.scaling,"label",n.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var i="";void 0!==e&&(i=" in node id: "+e),console.log("%cNegative or zero mass disallowed"+i+", setting mass to 1.",C),t.mass=1}}}]),t}();e.default=O},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(6),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(2),u=function(){function t(){(0,a.default)(this,t)}return(0,d.default)(t,null,[{key:"choosify",value:function(t,e){var i=["node","edge","label"],o=!0,n=l.topMost(e,"chosen");if("boolean"==typeof n)o=n;else if("object"===(void 0===n?"undefined":(0,s.default)(n))){if(-1===i.indexOf(t))throw new Error("choosify: subOption '"+t+"' should be one of '"+i.join("', '")+"'");var r=l.topMost(e,["chosen",t]);"boolean"!=typeof r&&"function"!=typeof r||(o=r)}return o}},{key:"pointInRect",value:function(t,e,i){if(t.width<=0||t.height<=0)return!1;if(void 0!==i){var o={x:e.x-i.x,y:e.y-i.y};if(0!==i.angle){var n=-i.angle;e={x:Math.cos(n)*o.x-Math.sin(n)*o.y,y:Math.sin(n)*o.x+Math.cos(n)*o.y}}else e=o}var s=t.x+t.width,r=t.y+t.width;return t.lefte.x&&t.tope.y}},{key:"isValidLabel",value:function(t){return"string"==typeof t&&""!==t}}]),t}();e.default=u},function(t,e,i){i(125);for(var o=i(18),n=i(26),s=i(31),r=i(13)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;hdocument.F=Object<\/script>"),t.close(),h=t.F;o--;)delete h.prototype[s[o]];return h()};t.exports=Object.create||function(t,e){var i;return null!==t?(a.prototype=o(t),i=new a,a.prototype=null,i[r]=t):i=h(),void 0===e?i:n(i,e)}},function(t,e){var i=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:i)(t)}},function(t,e,i){var o=i(57)("keys"),n=i(40);t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e,i){var o=i(18),n=o["__core-js_shared__"]||(o["__core-js_shared__"]={});t.exports=function(t){return n[t]||(n[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var o=i(20).f,n=i(22),s=i(13)("toStringTag");t.exports=function(t,e,i){t&&!n(t=i?t:t.prototype,s)&&o(t,s,{configurable:!0,value:e})}},function(t,e,i){var o=i(135)(!0);i(79)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=o(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){e.f=i(13)},function(t,e,i){var o=i(18),n=i(7),s=i(52),r=i(61),a=i(20).f;t.exports=function(t){var e=n.Symbol||(n.Symbol=s?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:r.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=p().hours(0).minutes(0).seconds(0).milliseconds(0),o=i.clone().add(-3,"days").valueOf(),n=i.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=o,this.end=n):(this.start=e.start||o,this.end=e.end||n),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:p,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=c.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.body.dom.rollingModeBtn.addEventListener("click",this.startRolling.bind(this)),this.setOptions(e)}function s(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}var r=i(8),a=o(r),h=i(19),d=o(h),l=i(6),u=o(l),c=i(2),p=i(9),f=i(16),m=i(36);n.prototype=new f,n.prototype.setOptions=function(t){if(t){var e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","rtl","showCurrentTime","rollingMode","horizontalScroll"];c.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},n.prototype.startRolling=function(){function t(){e.stopRolling(),e.rolling=!0;var i=e.end-e.start,o=c.convert(new Date,"Date").valueOf(),n=o-i*e.options.rollingMode.offset,s=o+i*(1-e.options.rollingMode.offset),r={animation:!1};e.setRange(n,s,r),i=1/e.conversion(e.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),e.body.dom.rollingModeBtn.style.visibility="hidden",e.currentTimeTimer=setTimeout(t,i)}var e=this;t()},n.prototype.stopRolling=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")},n.prototype.setRange=function(t,e,i,o,n){i||(i={}),!0!==i.byUser&&(i.byUser=!1);var s=this,r=void 0!=t?c.convert(t,"Date").valueOf():null,h=void 0!=e?c.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){var l=this.start,p=this.end,f="object"===(0,u.default)(i.animation)&&"duration"in i.animation?i.animation.duration:500,v="object"===(0,u.default)(i.animation)&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",g=c.easingFunctions[v];if(!g)throw new Error("Unknown easing function "+(0,d.default)(v)+". Choose from: "+(0,a.default)(c.easingFunctions).join(", "));var y=(new Date).valueOf(),b=!1;return function t(){if(!s.props.touch.dragging){var e=(new Date).valueOf(),a=e-y,d=g(a/f),u=a>f,c=u||null===r?r:l+(r-l)*d,v=u||null===h?h:p+(h-p)*d;_=s._applyRange(c,v),m.updateHiddenDates(s.options.moment,s.body,s.options.hiddenDates),b=b||_;var w={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(n&&n(d,_,u),_&&s.body.emitter.emit("rangechange",w),u){if(b&&(s.body.emitter.emit("rangechanged",w),o))return o()}else s.animationTimer=setTimeout(t,20)}}()}var _=this._applyRange(r,h);if(m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),_){var w={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",w),clearTimeout(s.timeoutID),s.timeoutID=setTimeout(function(){s.body.emitter.emit("rangechanged",w)},200),o)return o()}},n.prototype.getMillisecondsPerPixel=function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache},n.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},n.prototype._applyRange=function(t,e){var i,o=null!=t?c.convert(t,"Date").valueOf():this.start,n=null!=e?c.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?c.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?c.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(ns&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=r&&o=this.start-.5&&n<=this.end?(o=this.start,n=this.end):(i=a-(n-o),o-=i/2,n+=i/2)}}if(null!==this.options.zoomMax){var h=parseFloat(this.options.zoomMax);h<0&&(h=0),n-o>h&&(this.end-this.start===h&&othis.end?(o=this.start,n=this.end):(i=n-o-h,o+=i/2,n-=i/2))}var d=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,d},n.prototype.getRange=function(){return{start:this.start,end:this.end}},n.prototype.conversion=function(t,e){return n.conversion(this.start,this.end,t,e)},n.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},n.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},n.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;s(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start;o-=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);var n,r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;n=this.options.rtl?i/r*o:-i/r*o;var a=this.props.touch.start+n,h=this.props.touch.end+n,d=m.snapAwayFromHidden(this.body.hiddenDates,a,this.previousDelta-i,!0),l=m.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0);if(d!=a||l!=h)return this.deltaDifference+=i,this.props.touch.start=d,this.props.touch.end=l,void this._onDrag(t);this.previousDelta=i,this._applyRange(a,h);var u=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:u,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}},n.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))},n.prototype._onMouseWheel=function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i;i=e<0?1-e/5:1/(1+e/5);var o;if(this.rolling)o=this.start+(this.end-this.start)*this.options.rollingMode.offset;else{var n=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(n)}this.zoom(i,o,e,t),t.preventDefault()}},n.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0,c.preventDefault(t)},n.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){c.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var h=m.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),d=m.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&d==a||(this.props.touch.start=h,this.props.touch.end=d,this.scaleOffset=1-t.scale,r=h,a=d);var l={animation:!1,byUser:!0,event:t};this.setRange(r,a,l),this.startToFront=!1,this.endToFront=!0}},n.prototype._isInsideRange=function(t){var e,i=t.center?t.center.x:t.clientX;e=this.options.rtl?i-c.getAbsoluteLeft(this.body.dom.centerContainer):c.getAbsoluteRight(this.body.dom.centerContainer)-i;var o=this.body.util.toTime(e);return o>=this.start&&o<=this.end},n.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(s(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},n.prototype.getPointer=function(t,e){return this.options.rtl?{x:c.getAbsoluteRight(e)-t.x,y:t.y-c.getAbsoluteTop(e)}:{x:t.x-c.getAbsoluteLeft(e),y:t.y-c.getAbsoluteTop(e)}},n.prototype.zoom=function(t,e,i,o){null==e&&(e=(this.start+this.end)/2);var n=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),s=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),r=n-s,a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0) +;var d=m.snapAwayFromHidden(this.body.hiddenDates,a,i,!0),l=m.snapAwayFromHidden(this.body.hiddenDates,h,-i,!0);d==a&&l==h||(a=d,h=l);var u={animation:!1,byUser:!0,event:o};this.setRange(a,h,u),this.startToFront=!1,this.endToFront=!0},n.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},n.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i,s={animation:!1,byUser:!0,event:null};this.setRange(o,n,s)},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(){}var s=i(19),r=o(s),a=i(6),h=o(a),d=i(44),l=i(10),u=i(37),c=i(2),p=i(45),f=i(97),m=i(36),v=i(46);d(n.prototype),n.prototype._create=function(t){function e(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),this.options.zoomKey&&!t[this.options.zoomKey])if(t.preventDefault(),this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){var o=this.props.scrollTop,n=o+i;this.isActive()&&(this._setScrollTop(n),this._redraw(),this.emit("scroll",t))}else if(this.options.horizontalScroll){var s=Math.abs(e)>=Math.abs(i)?e:i,r=s/120*(this.range.end-this.range.start)/20,a=this.range.start+r,h=this.range.end+r,d={animation:!1,byUser:!0,event:t};this.range.setRange(a,h,d)}}function i(t){if(s.options.verticalScroll&&(t.preventDefault(),s.isActive())){var e=-t.target.scrollTop;s._setScrollTop(e),s._redraw(),s.emit("scrollSide",t)}}function o(t){if(t.preventDefault&&t.preventDefault(),!(!t.target.className.indexOf("vis")>-1||a))return t.dataTransfer.dropEffect="move",a=!0,!1}function n(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return a=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?s.itemSet._onAddItem(t):s.itemSet._onDropObjectOnItem(t),s.emit("drop",s.getEventProperties(t)),!1}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",function(){!0===this.initialDrawDone&&this._redraw()}.bind(this)),this.on("rangechanged",function(){this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));var s=this;this._origRedraw=this._redraw.bind(this),this._redraw=c.throttle(this._origRedraw),this.on("_change",function(t){s.itemSet&&s.itemSet.initialItemSetDrawn&&t&&1==t.queue?s._redraw():s._origRedraw()}),this.hammer=new l(this.dom.root);var r=this.hammer.get("pinch").set({enable:!0});u.disablePreventDefaultVertically(r),this.hammer.get("pan").set({threshold:5,direction:l.DIRECTION_HORIZONTAL}),this.listeners={},["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(t){var e=function(e){s.isActive()&&s.emit(t,e)};s.hammer.on(t,e),s.listeners[t]=e}),u.onTouch(this.hammer,function(t){s.emit("touch",t)}.bind(this)),u.onRelease(this.hammer,function(t){s.emit("release",t)}.bind(this)),this.dom.centerContainer.addEventListener?(this.dom.centerContainer.addEventListener("mousewheel",e.bind(this),!1),this.dom.centerContainer.addEventListener("DOMMouseScroll",e.bind(this),!1)):this.dom.centerContainer.attachEvent("onmousewheel",e.bind(this)),this.dom.left.parentNode.addEventListener("scroll",i.bind(this)),this.dom.right.parentNode.addEventListener("scroll",i.bind(this));var a=!1;if(this.dom.center.addEventListener("dragover",o.bind(this),!1),this.dom.center.addEventListener("drop",n.bind(this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},n.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","zoomKey","horizontalScroll","verticalScroll"];if(c.selectiveExtend(e,this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!==(0,h.default)(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===(0,h.default)(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new p(this.body);i.setOptions=function(t){var e=t?c.extend({},t):{};e.orientation="top",p.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&m.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new f(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var n=c.deepExtend({},this.options);this.components.forEach(function(t){c.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._redraw()},n.prototype.isActive=function(){return!this.activator||this.activator.active},n.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},n.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+(0,r.default)(e));i.length>0&&i[0].setCustomTime(t)},n.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,r.default)(t));return e[0].getCustomTime()},n.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+(0,r.default)(e));if(i.length>0)return i[0].setCustomTitle(t)},n.prototype.getEventProperties=function(t){return{event:t}},n.prototype.addCustomTime=function(t,e){var i=void 0!==t?c.convert(t,"Date").valueOf():new Date;if(this.customTimes.some(function(t){return t.options.id===e}))throw new Error("A custom time with id "+(0,r.default)(e)+" already exists");var o=new v(this.body,c.extend({},this.options,{time:i,id:e}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e},n.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,r.default)(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},n.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},n.prototype.fit=function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var o=i.max-i.min,n=new Date(i.min.valueOf()-.01*o),s=new Date(i.max.valueOf()+.01*o),r=!t||void 0===t.animation||t.animation;this.range.setRange(n,s,{animation:r},e)}},n.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},n.prototype.setWindow=function(t,e,i,o){"function"==typeof arguments[2]&&(o=arguments[2],i={});var n,s;1==arguments.length?(s=arguments[0],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],o=arguments[1],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n},o)):(n=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:n},o))},n.prototype.moveTo=function(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.range.end-this.range.start,n=c.convert(t,"Date").valueOf(),s=n-o/2,r=n+o/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)},n.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},n.prototype.zoomIn=function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=r/(1+t),h=(r-a)/2,d=n+h,l=s-h;this.setWindow(d,l,e,i)}},n.prototype.zoomOut=function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=n-r*t/2,h=s+r*t/2;this.setWindow(a,h,e,i)}},n.prototype.redraw=function(){this._redraw()},n.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(c.addClassName(o.root,"vis-top"),c.removeClassName(o.root,"vis-bottom")):(c.removeClassName(o.root,"vis-top"),c.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=c.option.asSize(e.maxHeight,""),o.root.style.minHeight=c.option.asSize(e.minHeight,""),o.root.style.width=c.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top,i.borderRootHeight=o.root.offsetHeight-o.root.clientHeight,i.borderRootWidth=o.root.offsetWidth-o.root.clientWidth,0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(i.borderRootWidth=i.borderRootHeight),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var n=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+n+i.bottom.height+i.borderRootHeight+i.border.top+i.border.bottom;o.root.style.height=c.option.asSize(e.height,s+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-i.borderRootHeight;var r=i.root.height-i.top.height-i.bottom.height-i.borderRootHeight;i.centerContainer.height=r,i.leftContainer.height=r,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-i.borderRootWidth,this.initialDrawDone||(i.scrollbarWidth=c.getScrollBarWidth()),e.verticalScroll?e.rtl?(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth+i.scrollbarWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth+i.scrollbarWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right),this._setDOM();var a=this._updateScrollTop();"top"!=e.orientation.item&&(a+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),o.center.style.top=a+"px";var h=0==i.scrollTop?"hidden":"",d=i.scrollTop==i.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=h,o.shadowBottom.style.visibility=d,o.shadowTopLeft.style.visibility=h,o.shadowBottomLeft.style.visibility=d,o.shadowTopRight.style.visibility=h,o.shadowBottomRight.style.visibility=d,e.verticalScroll&&(o.rightContainer.className="vis-panel vis-right vis-vertical-scroll",o.leftContainer.className="vis-panel vis-left vis-vertical-scroll",o.shadowTopRight.style.visibility="hidden",o.shadowBottomRight.style.visibility="hidden",o.shadowTopLeft.style.visibility="hidden",o.shadowBottomLeft.style.visibility="hidden",o.left.style.top="0px",o.right.style.top="0px"),(!e.verticalScroll||i.center.heighti.centerContainer.height;this.hammer.get("pan").set({direction:u?l.DIRECTION_ALL:l.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});if(t){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}},n.prototype._setDOM=function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width-t.borderRootWidth;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height=t.background.height+"px",e.backgroundVertical.style.height=t.background.height+"px",e.backgroundHorizontal.style.height=t.centerContainer.height+"px",e.centerContainer.style.height=t.centerContainer.height+"px",e.leftContainer.style.height=t.leftContainer.height+"px",e.rightContainer.style.height=t.rightContainer.height+"px",e.background.style.width=t.background.width+"px",e.backgroundVertical.style.width=t.centerContainer.width+"px",e.backgroundHorizontal.style.width=t.background.width+"px",e.centerContainer.style.width=t.center.width+"px",e.top.style.width=t.top.width+"px",e.bottom.style.width=t.bottom.width+"px",e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=t.left.width+t.border.left+"px",e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=t.top.height+"px",e.centerContainer.style.left=t.left.width+"px",e.centerContainer.style.top=t.top.height+"px",e.leftContainer.style.left="0",e.leftContainer.style.top=t.top.height+"px",e.rightContainer.style.left=t.left.width+t.center.width+"px",e.rightContainer.style.top=t.top.height+"px",e.top.style.left=t.left.width+"px",e.top.style.top="0",e.bottom.style.left=t.left.width+"px",e.bottom.style.top=t.top.height+t.centerContainer.height+"px",e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"},n.prototype.repaint=function(){throw new Error("Function repaint is deprecated. Use redraw instead.")},n.prototype.setCurrentTime=function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)},n.prototype.getCurrentTime=function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()},n.prototype._toTime=function(t){return m.toTime(this,t,this.props.center.width)},n.prototype._toGlobalTime=function(t){return m.toTime(this,t,this.props.root.width)},n.prototype._toScreen=function(t){return m.toScreen(this,t,this.props.center.width)},n.prototype._toGlobalScreen=function(t){return m.toScreen(this,t,this.props.root.width)},n.prototype._initAutoResize=function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()},n.prototype._startAutoResize=function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1!=t.options.autoResize)return void t._stopAutoResize();t.dom.root&&(t.dom.root.offsetWidth==t.props.lastWidth&&t.dom.root.offsetHeight==t.props.lastHeight||(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight,t.props.scrollbarWidth=c.getScrollBarWidth(),t.body.emitter.emit("_change")))},c.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)},n.prototype._stopAutoResize=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(c.removeEventListener(window,"resize",this._onResize),this._onResize=null)},n.prototype._onTouch=function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop},n.prototype._onPinch=function(t){this.touch.allowDragging=!1},n.prototype._onDrag=function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),o=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),o!=i&&this.emit("verticalDrag")}},n.prototype._setScrollTop=function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop},n.prototype._updateScrollTop=function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){31104e9>t&&(this.scale="year",this.step=1e3),15552e9>t&&(this.scale="year",this.step=500),31104e8>t&&(this.scale="year",this.step=100),15552e8>t&&(this.scale="year",this.step=50),31104e7>t&&(this.scale="year",this.step=10),15552e7>t&&(this.scale="year",this.step=5),31104e6>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),2592e6>t&&(this.scale="month",this.step=1),432e6>t&&(this.scale="day",this.step=5),1728e5>t&&(this.scale="day",this.step=2),864e5>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),36e5>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),6e4>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),1e3>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("week"==e)o.weekday()>2?(o.weekday(0),o.add(1,"week")):o.weekday(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":case"week":return 1==t.date();case"month":return 0==t.month();case"year":default:return!1}},o.prototype.getLabelMinor=function(t){if(void 0==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(this.isMajor()&&0!==t.weekday())return"";default:return e&&e.length>0?this.moment(t).format(e):""}},o.prototype.getLabelMajor=function(t){if(void 0==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/a%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(n().add(1,"day"),"day")?" vis-tomorrow":t.isSame(n().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}var n=this.moment,s=this.moment(this.current),r=s.locale?s.locale("en"):s.lang("en"),a=this.step,h=[];switch(this.scale){case"millisecond":h.push(e(r)),h.push(t(r.milliseconds()));break;case"second":h.push(e(r)),h.push(t(r.seconds()));break;case"minute":h.push(e(r)),h.push(t(r.minutes()));break;case"hour":h.push("vis-h"+r.hours()+(4==this.step?"-h"+(r.hours()+4):"")),h.push(e(r)),h.push(t(r.hours()));break;case"weekday":h.push("vis-"+r.format("dddd").toLowerCase()),h.push(e(r)),h.push(i(r)),h.push(t(r.date()));break;case"day":h.push("vis-day"+r.date()),h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(e(r)),h.push(o(r)),h.push(this.step<=2?e(r):""),h.push(this.step<=2?"vis-"+r.format("dddd").toLowerCase():""), +h.push(t(r.date()-1));break;case"week":h.push("vis-week"+r.format("w")),h.push(i(r)),h.push(t(r.week()));break;case"month":h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(o(r)),h.push(t(r.month()));break;case"year":h.push("vis-year"+r.year()),h.push(function(t){return t.isSame(new Date,"year")?" vis-current-year":""}(r)),h.push(t(r.year()))}return h.filter(String).join(" ")},t.exports=o},function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:r,locales:a,locale:"en"},this.options=n.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var n=i(2),s=i(16),r=i(9),a=i(98);o.prototype=new s,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},o.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},o.prototype.setOptions=function(t){t&&n.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},o.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=this.options.moment((new Date).valueOf()+this.offset),i=this.body.util.toScreen(e),o=this.options.locales[this.options.locale];o||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),o=this.options.locales.en);var n=o.current+" "+o.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");n=n.charAt(0).toUpperCase()+n.substring(1),this.options.rtl?this.bar.style.right=i+"px":this.bar.style.left=i+"px",this.bar.title=n}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},o.prototype.start=function(){function t(){e.stop();var i=e.body.range.conversion(e.body.domProps.center.width).scale,o=1/i/10;o<30&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.doInnerStack=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.stackDirty=!0,e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(var o in e.subgroupStack)this.subgroupStack[o]=e.subgroupStack[o],this.doInnerStack=this.doInnerStack||e.subgroupStack[o];this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var n=this;this.itemSet.body.emitter.on("checkRangedItems",function(){n.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(8),s=function(t){return t&&t.__esModule?t:{default:t}}(n),r=i(2),a=i(100);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e,i;if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=void 0!==e&&null!==e?e:this.groupId||"";if(this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?r.removeClassName(this.dom.inner,"vis-hidden"):r.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups){this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),r.addClassName(this.dom.label,"vis-nesting-group");var o=this.itemSet.options.rtl?"collapsed-rtl":"collapsed";this.showNested?(r.removeClassName(this.dom.label,o),r.addClassName(this.dom.label,"expanded")):(r.removeClassName(this.dom.label,"expanded"),r.addClassName(this.dom.label,o))}else this.nestedGroups&&(this.nestedGroups=null,o=this.itemSet.options.rtl?"collapsed-rtl":"collapsed",r.removeClassName(this.dom.label,o),r.removeClassName(this.dom.label,"expanded"),r.removeClassName(this.dom.label,"vis-nesting-group"));t&&t.nestedInGroup&&(r.addClassName(this.dom.label,"vis-nested-group"),this.itemSet.options&&this.itemSet.options.rtl?this.dom.inner.style.paddingRight="30px":this.dom.inner.style.paddingLeft="30px");var n=t&&t.className||null;n!=this.className&&(this.className&&(r.removeClassName(this.dom.label,this.className),r.removeClassName(this.dom.foreground,this.className),r.removeClassName(this.dom.background,this.className),r.removeClassName(this.dom.axis,this.className)),r.addClassName(this.dom.label,n),r.addClassName(this.dom.foreground,n),r.addClassName(this.dom.background,n),r.addClassName(this.dom.axis,n),this.className=n),this.style&&(r.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(r.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype._didMarkerHeightChange=function(){var t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;var e={},i=0;r.forEach(this.items,function(t,o){if(t.dirty=!0,t.displayed){e[o]=t.redraw(!0),i=e[o].length}});if(i>0)for(var o=0;o0)for(var u=0;u0){var e=this;this.resetSubgroups(),r.forEach(this.visibleItems,function(i){void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=!0)})}},o.prototype._isGroupVisible=function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,n=i[0].top+i[0].height;if(r.forEach(i,function(t){o=Math.min(o,t.top),n=Math.max(n,t.top+t.height)}),o>t.axis){var s=o-t.axis;n-=s,r.forEach(i,function(t){t.top-=s})}e=n+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype._addToSubgroup=function(t,e){e=e||t.data.subgroup,void 0!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)},o.prototype._updateSubgroupsSizes=function(){var t=this;if(t.subgroups)for(var e in t.subgroups){var i=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start,o=t.subgroups[e].items[0].data.start,n=i-1;t.subgroups[e].items.forEach(function(t){new Date(t.data.start)new Date(n)&&(n=e)}),t.subgroups[e].start=o,t.subgroups[e].end=new Date(n-1)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t,e=[];if("string"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});e.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push(this.subgroups[t].items[0].data);e.sort(this.subgroupOrderer)}if(e.length>0)for(var i=0;i=0&&(i.items.splice(o,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}},o.prototype.removeFromDataSet=function(t){this.itemSet.removeItem(t.id)},o.prototype.order=function(){for(var t=r.toArray(this.items),e=[],i=[],o=0;o0)for(var l=0;lh}),1==this.checkRangedItems)for(this.checkRangedItems=!1,l=0;lh})}var p={},f=0;for(l=0;l0)for(var v=0;v=0&&(r=e[s],!n(r));s--)void 0===o[r.id]&&(o[r.id]=!0,i.push(r));for(s=t+1;st.start},o.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["timeline-item"]=this,this.dirty=!0)},o.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0},o.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}},o.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}},o.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1},o.prototype._repaintDomAdditionals=function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.redraw=function(t){var e,i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];if(t)return i;var o;return i.forEach(function(t){o=t()}),o},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end),r=void 0===this.data.align?this.options.align:this.data.align;!1===this.data.limitSize||void 0!==t&&!0!==t||(n<-o&&(n=-o),s>2*o&&(s=2*o));var a=Math.max(s-n+.5,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=a+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=a,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=a+"px",r){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(a-i,0)+"px":this.dom.content.style.left=Math.max(a-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((a-i)/2,0)+"px":this.dom.content.style.left=Math.max((a-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:n<0?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(6),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(2),p=i(179).default,f=function(){function t(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;(0,d.default)(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},c.extend(this.options,this.defaultOptions),this.configureOptions=o,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new p(n),this.wrapper=void 0}return(0,u.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===(void 0===t?"undefined":(0,a.default)(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),!1===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,i=0,o=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,o=!1,"function"==typeof e?(o=e(n,[]),o=o||this._handleObject(this.configureOptions[n],[n],!0)):!0!==e&&-1===e.indexOf(n)||(o=!0),!1!==o&&(this.allowCreation=!0,i>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);if(!0===this.options.showButton){var s=document.createElement("div");s.className="vis-configuration vis-config-button",s.innerHTML="generate options",s.onclick=function(){t._printOptions()},s.onmouseover=function(){s.className="vis-configuration vis-config-button hover"},s.onmouseout=function(){s.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(s)}this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?i-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,o.innerHTML=!0===i?""+t+":":t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;ss&&1!==s&&(a.max=Math.ceil(1.2*e),d=a.max,h="range increased"),a.value=e}else a.value=o;var l=document.createElement("input");l.className="vis-configuration vis-config-rangeinput",l.value=a.value;var u=this;a.onchange=function(){l.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){l.value=this.value};var c=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,c,a,l);""!==h&&this.popupHistory[p]!==d&&(this.popupHistory[p]=d,this._setupPopup(h,p))}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in t)if(t.hasOwnProperty(r)){o=!0;var a=t[r],h=c.copyAndExtendArray(e,r);if("function"==typeof n&&!1===(o=n(r,e))&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i),!1!==o){s=!0;var d=this._getValue(h);if(a instanceof Array)this._handleArray(a,d,h);else if("string"==typeof a)this._makeTextInput(a,d,h);else if("boolean"==typeof a)this._makeCheckbox(a,d,h);else if(a instanceof Object){var l=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==r&&(l=!1),!0===l)if(void 0!==a.enabled){var u=c.copyAndExtendArray(h,"enabled"),p=this._getValue(u);if(!0===p){var f=this._makeLabel(r,h,!0);this._makeItem(h,f),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,p,h)}else{var m=this._makeLabel(r,h,!0);this._makeItem(h,m),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="true"===t||t,t="false"!==t&&t;for(var n=0;nvar options = "+(0,s.default)(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;ethis.imageObj.height?i=this.imageObj.width/this.imageObj.height:o=this.imageObj.height/this.imageObj.width),t=2*this.options.size*i,e=2*this.options.size*o}else t=this.imageObj.width,e=this.imageObj.height;this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,i,o){this.initContextForDraw(t,o),t.circle(e,i,o.size),this.performFill(t,o)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t,e);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(t,i,this.left,this.top,this.width,this.height),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,i,o,n){var s,r=0;if(void 0!==this.height){r=.5*this.height;var a=this.labelModule.getTextSize(t,o,n);a.lineCount>=1&&(r+=a.height/2)}s=i+r,this.options.label&&(this.labelOffset=r),this.labelModule.draw(t,e,s,o,n,"hanging")}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(6),a=o(r),h=i(29),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(117).default,v=i(48).default,g=i(215).default,y=i(217).default,b=i(218).default,_=i(219).default,w=function(){function t(e,i,o,n){if((0,u.default)(this,t),void 0===i)throw new Error("No body provided");this.options=f.bridgeObject(o),this.globalOptions=o,this.defaultOptions=n,this.body=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new m(this.body,this.options,!0),this.setOptions(e)}return(0,p.default)(t,[{key:"setOptions",value:function(e){if(e){t.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=parseFloat(e.value));var i=[e,this.options,this.defaultOptions];this.chooser=v.choosify("edge",i),this.updateLabelModule(e);var o=this.updateEdgeType();return this._setInteractionWidths(),this.connect(),void 0===e.hidden&&void 0===e.physics||(o=!0),o}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,i=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,o=this.options.color.inherit,n={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,arrowStrikethrough:this.options.arrowStrikethrough,color:o?void 0:this.options.color.color,inheritsColor:o,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var s=this.options.selectionWidth;"function"==typeof s?n.width=s(n.width):"number"==typeof s&&(n.width+=s),n.width=Math.max(n.width,.3/this.body.view.scale),n.color=this.options.color.highlight,n.shadow=this.options.shadow.enabled}else if(this.hover){var r=this.options.hoverWidth;"function"==typeof r?n.width=r(n.width):"number"==typeof r&&(n.width+=r),n.width=Math.max(n.width,.3/this.body.view.scale),n.color=this.options.color.hover,n.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(n,this.options.id,this.selected,this.hover),void 0!==n.color&&(n.inheritsColor=!1),!1===n.shadow&&(n.shadowColor===this.options.shadow.color&&n.shadowSize===this.options.shadow.size&&n.shadowX===this.options.shadow.x&&n.shadowY===this.options.shadow.y||(n.shadow=!0)));else n.shadow=this.options.shadow.enabled,n.width=Math.max(n.width,.3/this.body.view.scale);return n}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,i=!0;return void 0!==this.edgeType&&((this.edgeType instanceof y&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof g&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof b&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof _&&!1===t.type.enabled)&&(i=!1),!0===i&&(e=this.cleanup())),!0===i?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new y(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new g(this.options,this.body,this.labelModule):this.edgeType=new b(this.options,this.body,this.labelModule):this.edgeType=new _(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var o=this.options.scaling.customScalingFunction(t,e,i,this.options.value),n=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+o*s}this.options.width=this.options.scaling.min+o*n}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var i=this.edgeType.getViaNode(),o={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(o.from=this.edgeType.getArrowData(t,"from",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=o.from.core)),e.toArrow&&(o.to=this.edgeType.getArrowData(t,"to",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=o.to.core)),e.middleArrow&&(o.middle=this.edgeType.getArrowData(t,"middle",i,this.selected,this.hover,e)),this.edgeType.drawLine(t,e,this.selected,this.hover,i),this.drawArrows(t,o,e),this.drawLabel(t,i)}}},{key:"drawArrows",value:function(t,e,i){i.fromArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.from),i.middleArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.middle),i.toArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.to)}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var i=this.from,o=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),i.id!=o.id){this.labelModule.pointToSelf=!1;var n=this.edgeType.getPoint(.5,e);t.save();var s=this._getRotation(t);0!=s.angle&&(t.translate(s.x,s.y),t.rotate(s.angle)),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var r,a,h=this.options.selfReferenceSize;i.shape.width>i.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),n=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var i=this._getRotation();v.pointInRect(this.labelModule.getSize(),t,i)&&e.push({edgeId:this.id,labelId:0})}var o={left:t.x,top:t.y};return this.isOverlappingWith(o)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,i=this.from.y,o=this.to.x,n=this.to.y,s=t.left,r=t.top;return this.edgeType.getDistanceToEdge(e,i,o,n,s,r)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,i.x,i.y);var o={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return o;if("horizontal"===this.options.font.align)return o;var n=this.from.y-this.to.y,s=this.from.x-this.to.x,r=Math.atan2(n,s);return(r<-1&&s<0||r>0&&s<0)&&(r+=Math.PI),o.angle=r,o}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=["arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width","font","chosen","widthConstraint"];if(f.selectiveDeepExtend(r,t,e,i),v.isValidLabel(e.label)?t.label=e.label:t.label=void 0,f.mergeOptions(t,e,"smooth",o),f.mergeOptions(t,e,"shadow",o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===i&&null===e.dashes&&(t.dashes=(0,d.default)(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),f.mergeOptions(t.scaling,e.scaling,"label",o.scaling)):!0===i&&null===e.scaling&&(t.scaling=(0,d.default)(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var h=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=h.indexOf("to"),t.arrows.middle.enabled=-1!=h.indexOf("middle"),t.arrows.from.enabled=-1!=h.indexOf("from")}else{if("object"!==(0,a.default)(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+(0,s.default)(e.arrows));f.mergeOptions(t.arrows,e.arrows,"to",o.arrows),f.mergeOptions(t.arrows,e.arrows,"middle",o.arrows),f.mergeOptions(t.arrows,e.arrows,"from",o.arrows)}else!0===i&&null===e.arrows&&(t.arrows=(0,d.default)(o.arrows));if(void 0!==e.color&&null!==e.color){var l=e.color,u=t.color;if(n)f.deepExtend(u,o.color,!1,i);else for(var c in u)u.hasOwnProperty(c)&&delete u[c];if(f.isString(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,void 0===l.opacity&&(u.opacity=1);else{var p=!1;void 0!==l.color&&(u.color=l.color,p=!0),void 0!==l.highlight&&(u.highlight=l.highlight,p=!0),void 0!==l.hover&&(u.hover=l.hover,p=!0),void 0!==l.inherit&&(u.inherit=l.inherit),void 0!==l.opacity&&(u.opacity=Math.min(1,Math.max(0,l.opacity))),!0===p?u.inherit=!1:void 0===u.inherit&&(u.inherit="from")}}else!0===i&&null===e.color&&(t.color=f.bridgeObject(o.color));!0===i&&null===e.font&&(t.font=f.bridgeObject(o.font))}}]),t}();e.default=w},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(118),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_findBorderPositionBezier",value:function(t,e){var i,o,n,s,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),h=0,d=0,l=1,u=this.to,c=!1;for(t.id===this.from.id&&(u=this.from,c=!0);d<=l&&h<10;){var p=.5*(d+l);if(i=this.getPoint(p,a),o=Math.atan2(u.y-i.y,u.x-i.x),n=u.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-u.x,2)+Math.pow(i.y-u.y,2)),r=n-s,Math.abs(r)<.2)break;r<0?!1===c?d=p:l=p:!1===c?l=p:d=p,h++}return i.t=p,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;d<10;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,u,c,n,s),a=h1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),nh;)o(a,i=e[h++])&&(~s(d,i)||d.push(i));return d}},function(t,e,i){var o=i(22),n=i(41),s=i(56)("IE_PROTO"),r=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=n(t),o(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?r:null}},function(t,e,i){var o=i(50),n=i(13)("toStringTag"),s="Arguments"==o(function(){return arguments}()),r=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=r(e=Object(t),n))?i:s?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,i){var o=i(17),n=i(7),s=i(28);t.exports=function(t,e){var i=(n.Object||{})[t]||Object[t],r={};r[t]=e(i),o(o.S+o.F*s(function(){i(1)}),"Object",r)}},function(t,e,i){var o=i(84),n=i(58).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,n)}},function(t,e,i){var o=i(42),n=i(39),s=i(25),r=i(53),a=i(22),h=i(81),d=Object.getOwnPropertyDescriptor;e.f=i(21)?d:function(t,e){if(t=s(t),e=r(e,!0),h)try{return d(t,e)}catch(t){}if(a(t,e))return n(!o.f.call(t,e),t[e])}},function(t,e,i){t.exports={default:i(162),__esModule:!0}},function(t,e,i){function o(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=o},function(t,e,i){function o(t,e){if(void 0===t)throw new Error("No container element defined");if(this.container=t,this.visible=!e||void 0==e.visible||e.visible,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=function(t){i.prev(t)},this.frame.play.onclick=function(t){i.togglePlay(t)},this.frame.next.onclick=function(t){i.next(t)}}this.onChangeCallback=void 0,this.values=[],this.index=void 0,this.playTimeout=void 0,this.playInterval=1e3,this.playLoop=!0}var n=i(2);o.prototype.prev=function(){var t=this.getIndex();t>0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(tthis.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10;return t/(this.values.length-1)*e+3},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e,i){function o(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}o.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.prototype.setRange=function(t,e,i,o){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(i))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t||0,this._end=e||0,this.setStep(i,o)},o.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),!0===this.prettyStep?this._step=o.calculatePrettyStep(t):this._step=t)},o.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),s<=0&&(s=1),s},o.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},o.prototype.getStep=function(){return this._step},o.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()this._end},t.exports=o},function(t,e,i){function o(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function n(t){return void 0===t||""===t||"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function s(t,e){return void 0===t||""===t?e:t+n(e)}function r(t,e,i,o){for(var n,r,a=0;ar&&(t=o(t)*r),i(e)>r&&(e=o(e)*r),this.cameraOffset.x=t,this.cameraOffset.y=e,this.calculateCameraOrientation()},o.prototype.getOffset=function(){return this.cameraOffset},o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.setOffset(this.cameraOffset.x,this.cameraOffset.y),this.calculateCameraOrientation())}, +o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal;var t=this.cameraRotation.x,e=this.cameraRotation.z,i=this.cameraOffset.x,o=this.cameraOffset.y,n=Math.sin,s=Math.cos;this.cameraLocation.x=this.cameraLocation.x+i*s(e)+o*-n(e)*s(t),this.cameraLocation.y=this.cameraLocation.y+i*n(e)+o*s(e)*s(t),this.cameraLocation.z=this.cameraLocation.z+o*n(t)},t.exports=o},function(t,e,i){function o(t,e,i){this.dataGroup=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=t.getDistinctValues(this.column),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(12);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){if(void 0!==this.index)return this.values[this.index]},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.dataGroup.getDataSet(),{filter:function(t){return t[i.column]==i.value}}).get();e=this.dataGroup._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0){var n=i.groupsData.getDataSet();n.get().forEach(function(t){if(t.nestedGroups){0!=t.showNested&&(t.showNested=!0);var e=[];t.nestedGroups.forEach(function(i){var o=n.get(i);o&&(o.nestedInGroup=t.id,0==t.showNested&&(o.visible=!1),e=e.concat(o))}),n.update(e,o)}})}},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.touchParams={},this.groupTouchParams={},this._create(),this.setOptions(e)}var s=i(29),r=o(s),a=i(6),h=o(a),d=i(10),l=i(2),u=i(11),c=i(12),p=i(66),f=i(16),m=i(68),v=i(69),g=i(101),y=i(102),b=i(70),_=i(103),w=i(104).default,x="__ungrouped__",k="__background__";n.prototype=new f,n.types={background:_,box:g,range:b,point:y},n.prototype._create=function(){var t=document.createElement("div");t.className="vis-itemset",t["timeline-itemset"]=this,this.dom.frame=t;var e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;var i=document.createElement("div");i.className="vis-foreground",t.appendChild(i),this.dom.foreground=i;var o=document.createElement("div");o.className="vis-axis",this.dom.axis=o;var n=document.createElement("div");n.className="vis-labelset",this.dom.labelSet=n,this._updateUngrouped();var s=new v(k,null,this);s.show(),this.groups[k]=s,this.hammer=new d(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(t){t.isFirst&&this._onTouch(t)}.bind(this)),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:d.DIRECTION_HORIZONTAL}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new d(this.body.dom.rightContainer):this.groupHammer=new d(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:d.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()},n.prototype.setOptions=function(t){if(t){var e=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","multiselectPerGroup","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime"];l.selectiveExtend(e,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"===(0,h.default)(t.itemsAlwaysDraggable)&&(l.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"===(0,h.default)(t.orientation)&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"===(0,h.default)(t.margin)&&(l.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"===(0,h.default)(t.margin.item)&&l.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"===(0,h.default)(t.editable)&&l.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"===(0,h.default)(t.groupEditable)&&l.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach(function(e){var i=t[e];if(i){if(!(i instanceof Function))throw new Error("option "+e+" must be a function "+e+"(item, callback)");this.options[e]=i}}.bind(this)),this.markDirty()}},n.prototype.markDirty=function(t){this.groupIds=[],t&&t.refreshItems&&l.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()})},n.prototype.destroy=function(){this.hide(),this.setItems(null),this.setGroups(null),this.hammer=null,this.body=null,this.conversion=null},n.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)},n.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))},n.prototype.setSelection=function(t){var e,i,o,n;for(void 0==t&&(t=[]),Array.isArray(t)||(t=[t]),e=0,i=this.selection.length;et&&o.push(h.id):h.lefte&&o.push(h.id)}return o},n.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;i0){for(var w={},x=0;x<_;x++)l.forEach(b,function(t,e){w[e]=t[x]()});l.forEach(this.groups,function(t,e){if(e!==k){var i=w[e];s=i||s,g+=t.height}}),g=Math.max(g,y)}return g=Math.max(g,y),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.initialItemSetDrawn=!0,s=this._isResized()||s},n.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[x]||null},n.prototype._updateUngrouped=function(){var t,e,i=this.groups[x];if(this.groupsData){if(i){i.hide(),delete this.groups[x];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){i=new m(null,null,this),this.groups[x]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},n.prototype.getLabelSet=function(){return this.dom.labelSet},n.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(l.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;l.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},n.prototype.getItems=function(){return this.itemsData},n.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(l.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.groupsData;this.groupsData instanceof c&&(o=this.groupsData.getDataSet()),o.get().forEach(function(t){t.nestedGroups&&t.nestedGroups.forEach(function(e){var i=o.get(e);i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),o.update(i)})});var n=this.id;l.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,n)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},n.prototype.getGroups=function(){return this.groupsData},n.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},n.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},n.prototype._getGroupId=function(t){return"background"==this._getType(t)&&void 0==t.group?k:this.groupsData?t.group:x},n.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,o=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=o?e._getType(o):null,a=n.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,o):(i=s.selected,e._removeItem(s),s=null)),!s&&o){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(o,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.body.emitter.emit("_change",{queue:!0})},n.prototype._onAdd=n.prototype._onUpdate,n.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))},n.prototype._order=function(){l.forEach(this.groups,function(t){t.order()})},n.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},n.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==x||t==k)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=(0,r.default)(e.options);l.extend(n,{height:null}),o=new m(t,i,e),e.groups[t]=o;for(var s in e.items)if(e.items.hasOwnProperty(s)){var a=e.items[s];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},n.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},n.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);var e=!l.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},n.prototype._orderNestedGroups=function(t){var e=[];return t.forEach(function(t){var i=this.groupsData.get(t);if(i.nestedInGroup||e.push(t),i.nestedGroups){var o=this.groupsData.get({filter:function(e){return e.nestedInGroup==t},order:this.options.groupOrder}),n=o.map(function(t){return t.id});e=e.concat(n)}},this),e},n.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)},n.prototype._updateItem=function(t,e){t.setData(e);var i=this._getGroupId(t.data),o=this.groups[i];o?o&&o.data&&o.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1},n.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},n.prototype._constructByEndArray=function(t){for(var e=[],i=0;in)return}}if(i&&i!=this.groupTouchParams.group){var a=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&a&&(this.options.groupOrderSwap(h,a,e),e.update(h),e.update(a));var d=e.getIds({order:this.options.groupOrder});if(!l.equalArray(d,this.groupTouchParams.originalOrder))for(var u=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(u.length,d.length),m=0,v=0,g=0;m=f)break;if(d[m+v]==p)v=1;else if(u[m+g]==p)g=1;else{var y=d.indexOf(u[m+g]),b=e.get(d[m+v]),_=e.get(u[m+g]);this.options.groupOrderSwap(b,_,e),e.update(b),e.update(_);var w=d[m+v];d[m+v]=u[m+g],d[y]=w,m++}}}}},n.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=l.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!l.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,r=Math.min(s.length,n.length),a=0;a=r)break;var h=n.indexOf(s[a]),d=o.get(n[a]),u=o.get(s[a]);e.options.groupOrderSwap(d,u,o),o.update(d),o.update(u);var c=n[a];n[a]=s[a],n[h]=c,a++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},n.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},n.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);if(e){if(e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new w(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var o=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-l.getAbsoluteLeft(o)+o.offsetLeft,t.clientY-l.getAbsoluteTop(o)+o.offsetTop),this.popup.show()}else null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},n.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);if(e){e!==this.itemFromRelatedTarget(t)&&(null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}},n.prototype._onMouseMove=function(t){if(this.itemFromTarget(t)&&this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden){var e=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-l.getAbsoluteLeft(e)+e.offsetLeft,t.clientY-l.getAbsoluteTop(e)+e.offsetTop),this.popup.show()}},n.prototype._onMouseWheel=function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)},n.prototype._onUpdateItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,function(t){t&&e.itemsData.getDataSet().update(t)})}}},n.prototype._onDropObjectOnItem=function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)},n.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e,i,o=this,n=this.options.snap||null;this.options.rtl?(e=l.getAbsoluteRight(this.dom.frame),i=e-t.center.x):(e=l.getAbsoluteLeft(this.dom.frame),i=t.center.x-e);var s,r,a=this.body.util.toTime(i),h=this.body.util.getScale(),d=this.body.util.getStep();"drop"==t.type?(r=JSON.parse(t.dataTransfer.getData("text")),r.content=r.content?r.content:"new item",r.start=r.start?r.start:n?n(a,h,d):a,r.type=r.type||"box",r[this.itemsData._fieldId]=r.id||l.randomUUID(),"range"!=r.type||r.end||(s=this.body.util.toTime(i+this.props.width/5),r.end=n?n(s,h,d):s)):(r={start:n?n(a,h,d):a,content:"new item"},r[this.itemsData._fieldId]=l.randomUUID(),"range"===this.options.type&&(s=this.body.util.toTime(i+this.props.width/5),r.end=n?n(s,h,d):s));var u=this.groupFromTarget(t);u&&(r.group=u.groupId),r=this._cloneItemData(r),this.options.onAdd(r,function(e){e&&(o.itemsData.getDataSet().add(e),"drop"==t.type&&o.setSelection([e.id]))})}},n.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){ +var i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1)&&this.options.multiselect){var o=this.itemsData.get(e.id).group,s=void 0;this.options.multiselectPerGroup&&i.length>0&&(s=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=s&&s!=o||i.push(e.id);var r=n._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||s==o){i=[];for(var a in this.items)if(this.items.hasOwnProperty(a)){var h=this.items[a],d=h.data.start,l=void 0!==h.data.end?h.data.end:d;!(d>=r.min&&l<=r.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(h.id).group||h instanceof _||i.push(h.id)}}}else{var u=i.indexOf(e.id);-1==u?i.push(e.id):i.splice(u,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},n._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},n.prototype.itemFromElement=function(t){for(var e=t;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},n.prototype.itemFromTarget=function(t){return this.itemFromElement(t.target)},n.prototype.itemFromRelatedTarget=function(t){return this.itemFromElement(t.relatedTarget)},n.prototype.groupFromTarget=function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var o=0;oa&&ea)return s}else if(0===o&&es&&(s=r.top+r.height)}while(a)}}o.height=s-o.top+.5*i.item.vertical},e.nostack=function(t,i,o,n){for(var s=0;so[r].index&&e.collisionByTimes(o[n],o[r])){s=o[r];break}null!=s&&(o[n].top=s.top+s.height)}while(s)}for(var a=0;ao[h].index&&(o[r].top+=o[h].height);for(var d=t[r],l=0;le.right&&t.top-i.vertical+.001e.top:t.left-i.horizontal+.001e.left&&t.top-i.vertical+.001e.top},e.collisionByTimes=function(t,e){return t.start<=e.start&&t.end>=e.start&&t.tope.top||e.start<=t.start&&e.end>=t.start&&e.topt.top}},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=i,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(38);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=this.options.align,i=this.width*t.getMillisecondsPerPixel();return"right"==e?this.data.start.getTime()>t.start&&this.data.start.getTime()-it.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-i/2t.start&&this.data.startt.start},o.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)},o.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0},o.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}},o.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}},o.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1},o.prototype._repaintDomAdditionals=function(){},o.prototype.redraw=function(t){var e,i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];if(t)return i;var o;return i.forEach(function(t){o=t()}),o},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e,i=this.options.orientation.item;if(void 0!==this.data.subgroup){var o=this.data.subgroup;this.dom.box.style.height=this.parent.subgroups[o].height+"px",this.dom.box.style.top="top"==i?this.parent.top+this.parent.subgroups[o].top+"px":this.parent.top+this.parent.height-this.parent.subgroups[o].top-this.parent.subgroups[o].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof s?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=e+"px"},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(e,i){(0,s.default)(this,t),this.container=e,this.overflowMethod=i||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return(0,a.default)(t,[{key:"setPosition",value:function(t,e){this.x=parseInt(t),this.y=parseInt(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,o=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod){var a=!1,h=!0;this.y-en-this.padding&&(a=!0),s=a?this.x-i:this.x,r=h?this.y-e:this.y}else r=this.y-e,r+e+this.padding>o&&(r=o-e-this.padding),rn&&(s=n-i-this.padding),s0){var r={};for(this._getRelevantData(s,r,o,n),this._applySampling(s,r),e=0;e0)switch(t.options.style){case"line":d.hasOwnProperty(s[e])||(d[s[e]]=m.calcPath(r[s[e]],t)),m.draw(d[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||v.draw(r[s[e]],t,this.framework)}}}return a.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,t[a].y=0==o?t[a].orginalY+r.y:t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,s,a,h;if(t.length>0)for(s=0;s0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;l0){for(s=0;s0&&(n=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(o):h=h.concat(o):i[t[s]]=n.getYRange(o,t[s]));f.getStackedYRange(a,i,t,"__barStackLeft","left"),f.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=di?i:h,l=l=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),!0===t.master&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var r=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(r=this.props.titleCharHeight);var h=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-h&&!0===this.options.visible?(this.width=this.maxLabelSize+h,this.options.width=this.width+"px",a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+h),this.options.width=this.width+"px",a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var s=a.getDOMElement("div",this.DOMelements.labels,this.dom.frame);s.className=o,s.innerHTML=e,"left"===i?(s.style.left="-"+this.options.labelOffsetX+"px",s.style.textAlign="right"):(s.style.right="-"+this.options.labelOffsetX+"px",s.style.textAlign="left"),s.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){var h=this,d=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>h.magnitudefactor*h.minorSteps[h.minorStepIdx]*.5?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}o.prototype.setCharHeight=function(t){this.majorCharHeight=t},o.prototype.setHeight=function(t){this.containerHeight=t},o.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;i<0&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(!0===n)break}},o.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0},o.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},o.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},o.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},o.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},o.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&ue.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];r.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),r.mergeOptions(this.options,t,"interpolation"),r.mergeOptions(this.options,t,"drawPoints"),r.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==(0,s.default)(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":h.drawIcon(this,o,n,t,e,i);break;case"points":case"point":d.drawIcon(this,o,n,t,e,i);break;case"bar":a.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=t0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){return 1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o,n=e;if(i)for(o=t.length-2;o>0;o--)n+=t[o][0]+","+t[o][1]+" ";else for(o=1;o0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={screen_x:(-b*o.screen_x+c*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+c*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;i");this.dom.textArea.innerHTML=r,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=(0,s.default)(this.groups);t.sort(function(t,e){return t=0;i--){var a=s[i];a.nodes||(a.nodes=[]),-1===a.nodes.indexOf(n)&&a.nodes.push(n)}e.attr&&(n.attr=h(n.attr,e.attr))}function u(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=h({},t.edge);e.attr=h(i,e.attr)}}function c(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=h({},t.edge)),s.attr=h(s.attr||{},n),s}function p(){for(F=I.NULL,L="";" "===z||"\t"===z||"\n"===z||"\r"===z;)s();do{var t=!1;if("#"===z){for(var e=A-1;" "===R.charAt(e)||"\t"===R.charAt(e);)e--;if("\n"===R.charAt(e)||""===R.charAt(e)){for(;""!=z&&"\n"!=z;)s();t=!0}}if("/"===z&&"/"===r()){for(;""!=z&&"\n"!=z;)s();t=!0}if("/"===z&&"*"===r()){for(;""!=z;){if("*"===z&&"/"===r()){s(),s();break}s()}t=!0}for(;" "===z||"\t"===z||"\n"===z||"\r"===z;)s()}while(t);if(""===z)return void(F=I.DELIMITER);var i=z+r();if(N[i])return F=I.DELIMITER,L=i,s(),void s();if(N[z])return F=I.DELIMITER,L=z,void s();if(a(z)||"-"===z){for(L+=z,s();a(z);)L+=z,s();return"false"===L?L=!1:"true"===L?L=!0:isNaN(Number(L))||(L=Number(L)),void(F=I.IDENTIFIER)}if('"'===z){for(s();""!=z&&('"'!=z||'"'===z&&'"'===r());)'"'===z?(L+=z,s()):"\\"===z&&"n"===r()?(L+="\n",s()):L+=z,s();if('"'!=z)throw x('End of string " expected');return s(),void(F=I.IDENTIFIER)}for(F=I.UNKNOWN;""!=z;)L+=z,s();throw new SyntaxError('Syntax error in part "'+k(L,30)+'"')}function f(){var t={};if(n(),p(),"strict"===L&&(t.strict=!0,p()),"graph"!==L&&"digraph"!==L||(t.type=L,p()),F===I.IDENTIFIER&&(t.id=L,p()),"{"!=L)throw x("Angle bracket { expected");if(p(),m(t),"}"!=L)throw x("Angle bracket } expected");if(p(),""!==L)throw x("End of file expected");return p(),delete t.node,delete t.edge,delete t.graph,t}function m(t){for(;""!==L&&"}"!=L;)v(t),";"===L&&p()}function v(t){var e=g(t);if(e)return void _(t,e);if(!y(t)){if(F!=I.IDENTIFIER)throw x("Identifier expected");var i=L;if(p(),"="===L){if(p(),F!=I.IDENTIFIER)throw x("Identifier expected");t[i]=L,p()}else b(t,i)}}function g(t){var e=null;if("subgraph"===L&&(e={},e.type="subgraph",p(),F===I.IDENTIFIER&&(e.id=L,p())),"{"===L){if(p(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,m(e),"}"!=L)throw x("Angle bracket } expected");p(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function y(t){return"node"===L?(p(),t.node=w(),"node"):"edge"===L?(p(),t.edge=w(),"edge"):"graph"===L?(p(),t.graph=w(),"graph"):null}function b(t,e){var i={id:e},o=w();o&&(i.attr=o),l(t,i),_(t,e)}function _(t,e){for(;"->"===L||"--"===L;){var i,o=L;p();var n=g(t);if(n)i=n;else{if(F!=I.IDENTIFIER)throw x("Identifier or subgraph expected");i=L,l(t,{id:i}),p()}u(t,c(t,e,i,o,w())),e=i}}function w(){for(var t=null,e={dashed:!0,solid:!1,dotted:[1,5]};"["===L;){for(p(),t={};""!==L&&"]"!=L;){if(F!=I.IDENTIFIER)throw x("Attribute name expected");var i=L;if(p(),"="!=L)throw x("Equal sign = expected");if(p(),F!=I.IDENTIFIER)throw x("Attribute value expected");var o=L;"style"===i&&(o=e[o]),d(t,i,o),p(),","==L&&p()}if("]"!=L)throw x("Bracket ] expected");p()}return t}function x(t){return new SyntaxError(t+', got "'+k(L,30)+'" (char '+A+")")}function k(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function S(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function D(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},R="",A=0,z="",L="",F=I.NULL,B=/[a-zA-Z_0-9.:#]/;e.parseDOT=o,e.DOTToGraph=C},function(t,e,i){function o(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;a2&&void 0!==arguments[2]&&arguments[2];(0,d.default)(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(i),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=o}return(0,u.default)(t,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),p.isValidLabel(t.label)?this.labelDirty=!0:t.label="",void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===(0,a.default)(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(e){var i=this;if(c.forEach(m,function(t){i.fontOptions[t]={}}),t.parseFontString(this.fontOptions,e))return void(this.fontOptions.vadjust=0);c.forEach(e,function(t,e){void 0!==t&&null!==t&&"object"!==(void 0===t?"undefined":(0,a.default)(t))&&(i.fontOptions[e]=t)})}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=c.topMost(t,"widthConstraint");if("number"==typeof i)e.maxWdt=Number(i),e.minWdt=Number(i);else if("object"===(void 0===i?"undefined":(0,a.default)(i))){var o=c.topMost(t,["widthConstraint","maximum"]);"number"==typeof o&&(e.maxWdt=Number(o));var n=c.topMost(t,["widthConstraint","minimum"]);"number"==typeof n&&(e.minWdt=Number(n))}var s=c.topMost(t,"heightConstraint");if("number"==typeof s)e.minHgt=Number(s);else if("object"===(void 0===s?"undefined":(0,a.default)(s))){var r=c.topMost(t,["heightConstraint","minimum"]);"number"==typeof r&&(e.minHgt=Number(r));var h=c.topMost(t,["heightConstraint","valign"]);"string"==typeof h&&("top"!==h&&"bottom"!==h||(e.valign=h))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),c.deepExtend(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=p.choosify("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var i=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(t,e){for(var i=0;i5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var r=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&r=this.elementOptions.scaling.label.maxVisible&&(r=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,o,n,e,i,s),this._drawBackground(t),this._drawText(t,e,this.size.yLine,s,r))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",n=arguments[4],r=this._setAlignment(t,e,i,o),a=(0,s.default)(r,2);e=a[0],i=a[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var h=0;h0&&(t.lineWidth=c.strokeWidth,t.strokeStyle=v,t.lineJoin="round"),t.fillStyle=m,c.strokeWidth>0&&t.strokeText(c.text,e+l,i+c.vadjust),t.fillText(c.text,e+l,i+c.vadjust),l+=c.width}i+=d.height}}}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf){e=0,i=0;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=4):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t,e,i){var o=t||"#000000",n=i||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));o=c.overrideOpacity(o,s),n=c.overrideOpacity(n,s)}return[o,n]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var i=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=i,e=.5*-this.size.height;break;case"top":t=i,e=-(this.size.height+2);break;case"bottom":t=i,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,i),this.size.left=o-.5*this.size.width,this.size.top=n-.5*this.size.height,this.size.yLine=n+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===s&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,i,o){var n=function(t,e,i){return"normal"===e?"mod"===i?"":t[i]:void 0!==t[e][i]?t[e][i]:t[i]},s={color:n(this.fontOptions,o,"color"),size:n(this.fontOptions,o,"size"),face:n(this.fontOptions,o,"face"),mod:n(this.fontOptions,o,"mod"),vadjust:n(this.fontOptions,o,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||i)&&("normal"===o&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?s.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(s,this.elementOptions.id,e,i));var r="";return void 0!==s.mod&&""!==s.mod&&(r+=s.mod+" "),r+=s.size+"px "+s.face,t.font=r.replace(/"/g,""),s.font=t.font,s.height=s.size,s}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,i,o){return new f(t,this,e,i).process(o)}},{key:"_processLabel",value:function(t,e,i){if(!1!==this.labelDirty||this.differentState(e,i)){var o=this._processLabelText(t,e,i,this.elementOptions.label);this.fontOptions.minWdt>0&&o.width0&&o.heighto.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=0,d=this.options.selfReferenceSize,l=void 0,u=void 0,c=void 0,p=void 0,f=void 0,m=.5*(s+r);s<=r&&h<10&&(m=.5*(s+r),l=this._pointOnCircle(o,n,d,m),u=Math.atan2(t.y-l.y,t.x-l.x),c=t.distanceToBorder(e,u),p=Math.sqrt(Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2)),f=c-p,!(Math.abs(f)<.05));)f>0?a>0?s=m:r=m:a>0?r=m:s=m,h++;return l.t=m,l}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this.body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i,o){if(!1!==e.inheritsColor){if("both"===e.inheritsColor&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,r=void 0;return s=this.from.options.color.highlight.border,r=this.to.options.color.highlight.border,!1===this.from.selected&&!1===this.to.selected?(s=l.overrideOpacity(this.from.options.color.border,e.opacity),r=l.overrideOpacity(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?r=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,r),n}return"to"===e.inheritsColor?l.overrideOpacity(this.to.options.color.border,e.opacity):l.overrideOpacity(this.from.options.color.border,e.opacity)}return l.overrideOpacity(e.color,e.opacity)}},{key:"_circle", +value:function(t,e,i,o,n){this.enableShadow(t,e),t.beginPath(),t.arc(i,o,n,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,i,o,n,r,a,h){var d=0;if(this.from!=this.to)d=this._getDistanceToEdge(t,e,i,o,n,r,a);else{var l=this._getCircleData(void 0),u=(0,s.default)(l,3),c=u[0],p=u[1],f=u[2],m=c-n,v=p-r;d=Math.abs(Math.sqrt(m*m+v*v)-f)}return d}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:d<0&&(d=0);var l=t+d*r,u=e+d*a,c=l-n,p=u-s;return Math.sqrt(c*c+p*p)}},{key:"getArrowData",value:function(t,e,i,o,n,r){var a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=r.width;if("from"===e?(d=this.from,l=this.to,u=.1,c=r.fromArrowScale,p=r.fromArrowType):"to"===e?(d=this.to,l=this.from,u=-.1,c=r.toArrowScale,p=r.toArrowType):(d=this.to,l=this.from,c=r.middleArrowScale,p=r.middleArrowType),d!=l)if("middle"!==e)if(!0===this.options.smooth.enabled){h=this.findBorderPosition(d,t,{via:i});var m=this.getPoint(Math.max(0,Math.min(1,h.t+u)),i);a=Math.atan2(h.y-m.y,h.x-m.x)}else a=Math.atan2(d.y-l.y,d.x-l.x),h=this.findBorderPosition(d,t);else a=Math.atan2(d.y-l.y,d.x-l.x),h=this.getPoint(.5,i);else{var v=this._getCircleData(t),g=(0,s.default)(v,3),y=g[0],b=g[1],_=g[2];"from"===e?(h=this.findBorderPosition(this.from,t,{x:y,y:b,low:.25,high:.6,direction:-1}),a=-2*h.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(h=this.findBorderPosition(this.from,t,{x:y,y:b,low:.6,high:1,direction:1}),a=-2*h.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(h=this._pointOnCircle(y,b,_,.175),a=3.9269908169872414)}"middle"===e&&c<0&&(f*=-1);var w=15*c+3*f;return{point:h,core:{x:h.x-.9*w*Math.cos(a),y:h.y-.9*w*Math.sin(a)},angle:a,length:w,type:p}}},{key:"drawArrowHead",value:function(t,e,i,o,n){t.strokeStyle=this.getColor(t,e,i,o),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,u.draw(t,n),this.enableShadow(t,e),t.fill(),this.disableShadow(t,e)}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(4),a=o(r),h=i(5),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=function(){function t(){(0,u.default)(this,t)}return(0,p.default)(t,null,[{key:"transform",value:function(t,e){t instanceof Array||(t=[t]);for(var i=e.point.x,o=e.point.y,n=e.angle,s=e.length,r=0;r0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;s0&&this._getForceContributions(n.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&o.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;h0&&(lr&&(r=l),ua&&(a=u))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var p=Math.max(1e-5,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;y0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.centerOfMass,o=t.mass+e.options.mass,n=1/o;i.x=i.x*t.mass+e.x*e.options.mass,i.x*=n,i.y=i.y*t.mass+e.y*e.options.mass,i.y*=n,t.mass=o;var s=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?o.maxY>e.y?"NW":"SW":o.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,n)}},{key:"_placeInRegion",value:function(t,e,i){var o=t.children[i];switch(o.childrenCount){case 0:o.children.data=e,o.childrenCount=1,this._updateBranchMass(o,e);break;case 1:o.children.data.x===e.x&&o.children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(o),this._placeInTree(o,e));break;case 4:this._placeInTree(o,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e.default=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(e,i,o){(0,s.default)(this,t),this.body=e,this.physicsBody=i,this.setOptions(o)}return(0,a.default)(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t=void 0,e=void 0,i=void 0,o=void 0,n=this.body.nodes,s=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,a=0;a=t.length?(this._t=void 0,n(1)):"keys"==e?n(0,i):"values"==e?n(0,t[i]):n(0,[i,t[i]])},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var o=i(54),n=i(39),s=i(59),r={};i(26)(r,i(13)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=o(r,{next:n(1,i)}),s(t,e+" Iterator")}},function(t,e,i){var o=i(20),n=i(27),s=i(33);t.exports=i(21)?Object.defineProperties:function(t,e){n(t);for(var i,r=s(e),a=r.length,h=0;a>h;)o.f(t,i=r[h++],e[i]);return t}},function(t,e,i){var o=i(25),n=i(132),s=i(133);t.exports=function(t){return function(e,i,r){var a,h=o(e),d=n(h.length),l=s(r,d);if(t&&i!=i){for(;d>l;)if((a=h[l++])!=a)return!0}else for(;d>l;l++)if((t||l in h)&&h[l]===i)return t||l||0;return!t&&-1}}},function(t,e,i){var o=i(55),n=Math.min;t.exports=function(t){return t>0?n(o(t),9007199254740991):0}},function(t,e,i){var o=i(55),n=Math.max,s=Math.min;t.exports=function(t,e){return t=o(t),t<0?n(t+e,0):s(t,e)}},function(t,e,i){var o=i(18).document;t.exports=o&&o.documentElement},function(t,e,i){var o=i(55),n=i(51);t.exports=function(t){return function(e,i){var s,r,a=String(n(e)),h=o(i),d=a.length;return h<0||h>=d?t?"":void 0:(s=a.charCodeAt(h),s<55296||s>56319||h+1===d||(r=a.charCodeAt(h+1))<56320||r>57343?t?a.charAt(h):s:t?a.slice(h,h+2):r-56320+(s-55296<<10)+65536)}}},function(t,e,i){var o=i(27),n=i(137);t.exports=i(7).getIterator=function(t){var e=n(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return o(e.call(t))}},function(t,e,i){var o=i(86),n=i(13)("iterator"),s=i(31);t.exports=i(7).getIteratorMethod=function(t){if(void 0!=t)return t[n]||t["@@iterator"]||s[o(t)]}},function(t,e,i){i(139);var o=i(7).Object;t.exports=function(t,e){return o.create(t,e)}},function(t,e,i){var o=i(17);o(o.S,"Object",{create:i(54)})},function(t,e,i){i(141),t.exports=i(7).Object.keys},function(t,e,i){var o=i(41),n=i(33);i(87)("keys",function(){return function(t){return n(o(t))}})},function(t,e,i){t.exports={default:i(143),__esModule:!0}},function(t,e,i){i(60),i(49),t.exports=i(61).f("iterator")},function(t,e,i){t.exports={default:i(145),__esModule:!0}},function(t,e,i){i(146),i(151),i(152),i(153),t.exports=i(7).Symbol},function(t,e,i){var o=i(18),n=i(22),s=i(21),r=i(17),a=i(83),h=i(147).KEY,d=i(28),l=i(57),u=i(59),c=i(40),p=i(13),f=i(61),m=i(62),v=i(148),g=i(149),y=i(27),b=i(25),_=i(53),w=i(39),x=i(54),k=i(150),S=i(89),D=i(20),M=i(33),C=S.f,O=D.f,E=k.f,T=o.Symbol,P=o.JSON,I=P&&P.stringify,N=p("_hidden"),R=p("toPrimitive"),A={}.propertyIsEnumerable,z=l("symbol-registry"),L=l("symbols"),F=l("op-symbols"),B=Object.prototype,j="function"==typeof T,H=o.QObject,W=!H||!H.prototype||!H.prototype.findChild,Y=s&&d(function(){return 7!=x(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(t,e,i){var o=C(B,e);o&&delete B[e],O(t,e,i),o&&t!==B&&O(B,e,o)}:O,G=function(t){var e=L[t]=x(T.prototype);return e._k=t,e},V=j&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},U=function(t,e,i){return t===B&&U(F,e,i),y(t),e=_(e,!0),y(i),n(L,e)?(i.enumerable?(n(t,N)&&t[N][e]&&(t[N][e]=!1),i=x(i,{enumerable:w(0,!1)})):(n(t,N)||O(t,N,w(1,{})),t[N][e]=!0),Y(t,e,i)):O(t,e,i)},q=function(t,e){y(t);for(var i,o=v(e=b(e)),n=0,s=o.length;s>n;)U(t,i=o[n++],e[i]);return t},X=function(t,e){return void 0===e?x(t):q(x(t),e)},Z=function(t){var e=A.call(this,t=_(t,!0));return!(this===B&&n(L,t)&&!n(F,t))&&(!(e||!n(this,t)||!n(L,t)||n(this,N)&&this[N][t])||e)},K=function(t,e){if(t=b(t),e=_(e,!0),t!==B||!n(L,e)||n(F,e)){var i=C(t,e);return!i||!n(L,e)||n(t,N)&&t[N][e]||(i.enumerable=!0),i}},J=function(t){for(var e,i=E(b(t)),o=[],s=0;i.length>s;)n(L,e=i[s++])||e==N||e==h||o.push(e);return o},$=function(t){for(var e,i=t===B,o=E(i?F:b(t)),s=[],r=0;o.length>r;)!n(L,e=o[r++])||i&&!n(B,e)||s.push(L[e]);return s};j||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=c(arguments.length>0?arguments[0]:void 0),e=function(i){this===B&&e.call(F,i),n(this,N)&&n(this[N],t)&&(this[N][t]=!1),Y(this,t,w(1,i))};return s&&W&&Y(B,t,{configurable:!0,set:e}),G(t)},a(T.prototype,"toString",function(){return this._k}),S.f=K,D.f=U,i(88).f=k.f=J,i(42).f=Z,i(63).f=$,s&&!i(52)&&a(B,"propertyIsEnumerable",Z,!0),f.f=function(t){return G(p(t))}),r(r.G+r.W+r.F*!j,{Symbol:T});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=M(p.store),it=0;et.length>it;)m(et[it++]);r(r.S+r.F*!j,"Symbol",{for:function(t){return n(z,t+="")?z[t]:z[t]=T(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in z)if(z[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),r(r.S+r.F*!j,"Object",{create:X,defineProperty:U,defineProperties:q,getOwnPropertyDescriptor:K,getOwnPropertyNames:J,getOwnPropertySymbols:$}),P&&r(r.S+r.F*(!j||d(function(){var t=T();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!V(t)){for(var e,i,o=[t],n=1;arguments.length>n;)o.push(arguments[n++]);return e=o[1],"function"==typeof e&&(i=e),!i&&g(e)||(e=function(t,e){if(i&&(e=i.call(this,t,e)),!V(e))return e}),o[1]=e,I.apply(P,o)}}}),T.prototype[R]||i(26)(T.prototype,R,T.prototype.valueOf),u(T,"Symbol"),u(Math,"Math",!0),u(o.JSON,"JSON",!0)},function(t,e,i){var o=i(40)("meta"),n=i(32),s=i(22),r=i(20).f,a=0,h=Object.isExtensible||function(){return!0},d=!i(28)(function(){return h(Object.preventExtensions({}))}),l=function(t){r(t,o,{value:{i:"O"+ ++a,w:{}}})},u=function(t,e){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,o)){if(!h(t))return"F";if(!e)return"E";l(t)}return t[o].i},c=function(t,e){if(!s(t,o)){if(!h(t))return!0;if(!e)return!1;l(t)}return t[o].w},p=function(t){return d&&f.NEED&&h(t)&&!s(t,o)&&l(t),t},f=t.exports={KEY:o,NEED:!1,fastKey:u,getWeak:c,onFreeze:p}},function(t,e,i){var o=i(33),n=i(63),s=i(42);t.exports=function(t){var e=o(t),i=n.f;if(i)for(var r,a=i(t),h=s.f,d=0;a.length>d;)h.call(t,r=a[d++])&&e.push(r);return e}},function(t,e,i){var o=i(50);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,i){var o=i(25),n=i(88).f,s={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return n(t)}catch(t){return r.slice()}};t.exports.f=function(t){return r&&"[object Window]"==s.call(t)?a(t):n(o(t))}},function(t,e){},function(t,e,i){i(62)("asyncIterator")},function(t,e,i){i(62)("observable")},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(0,function(){function e(){return Co.apply(null,arguments)}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}function s(t){return void 0===t}function r(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function h(t,e){var i,o=[];for(i=0;i0)for(i=0;i0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)}function A(t,e){var i=t.toLowerCase();Lo[i]=Lo[i+"s"]=Lo[e]=t}function z(t){return"string"==typeof t?Lo[t]||Lo[t.toLowerCase()]:void 0}function L(t){var e,i,o={};for(i in t)d(t,i)&&(e=z(i))&&(o[e]=t[i]);return o}function F(t,e){Fo[t]=e}function B(t){var e=[];for(var i in t)e.push({unit:i,priority:Fo[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function j(t,e,i){var o=""+Math.abs(t),n=e-o.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function H(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(Wo[t]=n),e&&(Wo[e[0]]=function(){return j(n.apply(this,arguments),e[1],e[2])}),i&&(Wo[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function W(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Y(t){var e,i,o=t.match(Bo);for(e=0,i=o.length;e=0&&jo.test(t);)t=t.replace(jo,i),jo.lastIndex=0,o-=1;return t}function U(t,e,i){an[t]=D(e)?e:function(t,o){return t&&i?i:e}}function q(t,e){return d(an,t)?an[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return Z(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function Z(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),r(e)&&(o=function(t,i){i[e]=_(t)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function _t(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function wt(t,e,i){var o=7+e-i;return-(7+_t(t,0,o).getUTCDay()-e)%7+o-1}function xt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=wt(t,o,n),d=1+7*(e-1)+a+h;return d<=0?(s=t-1,r=Q(s)+d):d>Q(t)?(s=t+1,r=d-Q(t)):(s=t,r=d),{year:s,dayOfYear:r}}function kt(t,e,i){var o,n,s=wt(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?(n=t.year()-1,o=r+St(n,e,i)):r>St(t.year(),e,i)?(o=r-St(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function St(t,e,i){var o=wt(t,e,i),n=wt(t+1,e,i);return(Q(t)-o+n)/7}function Dt(t){return kt(t,this._week.dow,this._week.doy).week}function Mt(){return this._week.dow}function Ct(){return this._week.doy}function Ot(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Et(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Tt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Pt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function It(t,e){return t?i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone}function Nt(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Rt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function At(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=u([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=yn.call(this._weekdaysParse,r),-1!==n?n:null):"ddd"===e?(n=yn.call(this._shortWeekdaysParse,r),-1!==n?n:null):(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):"dddd"===e?-1!==(n=yn.call(this._weekdaysParse,r))?n:-1!==(n=yn.call(this._shortWeekdaysParse,r))?n:(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):"ddd"===e?-1!==(n=yn.call(this._shortWeekdaysParse,r))?n:-1!==(n=yn.call(this._weekdaysParse,r))?n:(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):-1!==(n=yn.call(this._minWeekdaysParse,r))?n:-1!==(n=yn.call(this._weekdaysParse,r))?n:(n=yn.call(this._shortWeekdaysParse,r),-1!==n?n:null)}function zt(t,e,i){var o,n,s;if(this._weekdaysParseExact)return At.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(n=u([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function Lt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Tt(t,this.localeData()),this.add(t-e,"d")):e}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Bt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Pt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=En),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ht(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tn),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Pn),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yt(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],h=[],d=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),h.push(s),d.push(o),d.push(n),d.push(s);for(r.sort(t),a.sort(t),h.sort(t),d.sort(t),e=0;e<7;e++)a[e]=Z(a[e]),h[e]=Z(h[e]),d[e]=Z(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Gt(){return this.hours()%12||12}function Vt(){return this.hours()||24}function Ut(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function Jt(t){for(var e,i,o,n,s=0;s0;){if(o=$t(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&w(n,i,!0)>=e-1)break;e--}s++}return null}function $t(e){var i=null;if(!zn[e]&&void 0!==t&&t&&t.exports)try{i=In._abbr;!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Qt(i)}catch(t){}return zn[e]}function Qt(t,e){var i;return t&&(i=s(e)?ie(t):te(t,e))&&(In=i),In._abbr}function te(t,e){if(null!==e){var i=An;if(e.abbr=t,null!=zn[t])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=zn[t]._config;else if(null!=e.parentLocale){if(null==zn[e.parentLocale])return Ln[e.parentLocale]||(Ln[e.parentLocale]=[]),Ln[e.parentLocale].push({name:t,config:e}),null;i=zn[e.parentLocale]._config}return zn[t]=new O(C(i,e)),Ln[t]&&Ln[t].forEach(function(t){te(t.name,t.config)}),Qt(t),zn[t]}return delete zn[t],null}function ee(t,e){if(null!=e){var i,o=An;null!=zn[t]&&(o=zn[t]._config),e=C(o,e),i=new O(e),i.parentLocale=zn[t],zn[t]=i,Qt(t)}else null!=zn[t]&&(null!=zn[t].parentLocale?zn[t]=zn[t].parentLocale:null!=zn[t]&&delete zn[t]);return zn[t]}function ie(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return In;if(!i(t)){if(e=$t(t))return e;t=[t]}return Jt(t)}function oe(){return Io(zn)}function ne(t){var e,i=t._a;return i&&-2===p(t).overflow&&(e=i[ln]<0||i[ln]>11?ln:i[un]<1||i[un]>ht(i[dn],i[ln])?un:i[cn]<0||i[cn]>24||24===i[cn]&&(0!==i[pn]||0!==i[fn]||0!==i[mn])?cn:i[pn]<0||i[pn]>59?pn:i[fn]<0||i[fn]>59?fn:i[mn]<0||i[mn]>999?mn:-1,p(t)._overflowDayOfYear&&(eun)&&(e=un),p(t)._overflowWeeks&&-1===e&&(e=vn),p(t)._overflowWeekday&&-1===e&&(e=gn),p(t).overflow=e),t}function se(t,e,i){return null!=t?t:null!=e?e:i}function re(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function ae(t){var e,i,o,n,s=[];if(!t._d){for(o=re(t),t._w&&null==t._a[un]&&null==t._a[ln]&&he(t),null!=t._dayOfYear&&(n=se(t._a[dn],o[dn]),(t._dayOfYear>Q(n)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),i=_t(n,0,t._dayOfYear),t._a[ln]=i.getUTCMonth(),t._a[un]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[cn]&&0===t._a[pn]&&0===t._a[fn]&&0===t._a[mn]&&(t._nextDay=!0,t._a[cn]=0),t._d=(t._useUTC?_t:bt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[cn]=24),t._w&&void 0!==t._w.d&&t._w.d!==t._d.getDay()&&(p(t).weekdayMismatch=!0)}}function he(t){var e,i,o,n,s,r,a,h;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)s=1,r=4,i=se(e.GG,t._a[dn],kt(De(),1,4).year),o=se(e.W,1),((n=se(e.E,1))<1||n>7)&&(h=!0);else{s=t._locale._week.dow,r=t._locale._week.doy;var d=kt(De(),s,r);i=se(e.gg,t._a[dn],d.year),o=se(e.w,d.week),null!=e.d?((n=e.d)<0||n>6)&&(h=!0):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s}o<1||o>St(i,s,r)?p(t)._overflowWeeks=!0:null!=h?p(t)._overflowWeekday=!0:(a=xt(i,o,n,s,r),t._a[dn]=a.year,t._dayOfYear=a.dayOfYear)}function de(t){var e,i,o,n,s,r,a=t._i,h=Fn.exec(a)||Bn.exec(a);if(h){for(p(t).iso=!0,e=0,i=Hn.length;e0&&p(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Wo[s]?(o?p(t).empty=!1:p(t).unusedTokens.push(s),$(s,o,t)):t._strict&&!o&&p(t).unusedTokens.push(s);p(t).charsLeftOver=h-d,a.length>0&&p(t).unusedInput.push(a),t._a[cn]<=12&&!0===p(t).bigHour&&t._a[cn]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[cn]=ye(t._locale,t._a[cn],t._meridiem),ae(t),ne(t)}function ye(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function be(t){var e,i,o,n,s;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ue(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=xe(t),t._a){var e=t._isUTC?u(t._a):De(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qe(){return!!this.isValid()&&!this._isUTC}function Xe(){return!!this.isValid()&&this._isUTC}function Ze(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ke(t,e){var i,o,n,s=t,a=null;return Ne(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:r(t)?(s={},e?s[e]=t:s.milliseconds=t):(a=Jn.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:_(a[un])*i,h:_(a[cn])*i,m:_(a[pn])*i,s:_(a[fn])*i,ms:_(Re(1e3*a[mn]))*i}):(a=$n.exec(t))?(i="-"===a[1]?-1:(a[1],1),s={y:Je(a[2],i),M:Je(a[3],i),w:Je(a[4],i),d:Je(a[5],i),h:Je(a[6],i),m:Je(a[7],i),s:Je(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=Qe(De(s.from),De(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Ie(s),Ne(t)&&d(t,"_locale")&&(o._locale=t._locale),o}function Je(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function $e(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Qe(t,e){var i;return t.isValid()&&e.isValid()?(e=Le(e,t),t.isBefore(e)?i=$e(t,e):(i=$e(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ti(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(S(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Ke(i,o),ei(this,n,t),this}}function ei(t,i,o,n){var s=i._milliseconds,r=Re(i._days),a=Re(i._months);t.isValid()&&(n=null==n||n,a&&pt(t,ot(t,"Month")+a*o),r&&nt(t,"Date",ot(t,"Date")+r*o),s&&t._d.setTime(t._d.valueOf()+s*o),n&&e.updateOffset(t,r||a))}function ii(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function oi(t,i){var o=t||De(),n=Le(o,this).startOf("day"),s=e.calendarFormat(this,n)||"sameElse",r=i&&(D(i[s])?i[s].call(this,o):i[s]);return this.format(r||this.localeData().calendar(s,this,De(o)))}function ni(){return new g(this)}function si(t,e){var i=y(t)?t:De(t);return!(!this.isValid()||!i.isValid())&&(e=z(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()9999?G(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):D(Date.prototype.toISOString)?this.toDate().toISOString():G(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function mi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=e+'[")]';return this.format(i+o+"-MM-DD[T]HH:mm:ss.SSS"+n)}function vi(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var i=G(this,t);return this.localeData().postformat(i)}function gi(t,e){return this.isValid()&&(y(t)&&t.isValid()||De(t).isValid())?Ke({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function yi(t){return this.from(De(),t)}function bi(t,e){return this.isValid()&&(y(t)&&t.isValid()||De(t).isValid())?Ke({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _i(t){return this.to(De(),t)}function wi(t){var e;return void 0===t?this._locale._abbr:(e=ie(t),null!=e&&(this._locale=e),this)}function xi(){return this._locale}function ki(t){switch(t=z(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function Si(t){return void 0===(t=z(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Di(){return this._d.valueOf()-6e4*(this._offset||0)}function Mi(){return Math.floor(this.valueOf()/1e3)}function Ci(){return new Date(this.valueOf())}function Oi(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ei(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ti(){return this.isValid()?this.toISOString():null}function Pi(){return f(this)}function Ii(){return l({},p(this))}function Ni(){return p(this).overflow}function Ri(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(t,e){H(0,[t,t.length],0,e)}function zi(t){return ji.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Li(t){return ji.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Fi(){return St(this.year(),1,4)}function Bi(){var t=this.localeData()._week;return St(this.year(),t.dow,t.doy)}function ji(t,e,i,o,n){var s;return null==t?kt(this,o,n).year:(s=St(t,o,n),e>s&&(e=s),Hi.call(this,t,e,i,o,n))}function Hi(t,e,i,o,n){var s=xt(t,e,i,o,n),r=_t(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Wi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Yi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Gi(t,e){e[mn]=_(1e3*("0."+t))}function Vi(){return this._isUTC?"UTC":""}function Ui(){return this._isUTC?"Coordinated Universal Time":""}function qi(t){return De(1e3*t)}function Xi(){return De.apply(null,arguments).parseZone()}function Zi(t){return t}function Ki(t,e,i,o){var n=ie(),s=u().set(o,e);return n[i](s,t)}function Ji(t,e,i){if(r(t)&&(e=t,t=void 0),t=t||"",null!=e)return Ki(t,e,i,"month");var o,n=[];for(o=0;o<12;o++)n[o]=Ki(t,o,i,"month");return n}function $i(t,e,i,o){"boolean"==typeof t?(r(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,r(e)&&(i=e,e=void 0),e=e||"");var n=ie(),s=t?n._week.dow:0;if(null!=i)return Ki(e,(i+s)%7,o,"day");var a,h=[];for(a=0;a<7;a++)h[a]=Ki(e,(a+s)%7,o,"day");return h}function Qi(t,e){return Ji(t,e,"months")}function to(t,e){return Ji(t,e,"monthsShort")}function eo(t,e,i){return $i(t,e,i,"weekdays")}function io(t,e,i){return $i(t,e,i,"weekdaysShort")}function oo(t,e,i){return $i(t,e,i,"weekdaysMin")}function no(){var t=this._data;return this._milliseconds=ds(this._milliseconds),this._days=ds(this._days),this._months=ds(this._months),t.milliseconds=ds(t.milliseconds),t.seconds=ds(t.seconds),t.minutes=ds(t.minutes),t.hours=ds(t.hours),t.months=ds(t.months),t.years=ds(t.years),this}function so(t,e,i,o){var n=Ke(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function ro(t,e){return so(this,t,e,1)}function ao(t,e){return so(this,t,e,-1)}function ho(t){return t<0?Math.floor(t):Math.ceil(t)}function lo(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*ho(co(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=b(s/1e3),h.seconds=t%60,e=b(t/60),h.minutes=e%60,i=b(e/60),h.hours=i%24,r+=b(i/24),n=b(uo(r)),a+=n, +r-=ho(co(n)),o=b(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function uo(t){return 4800*t/146097}function co(t){return 146097*t/4800}function po(t){if(!this.isValid())return NaN;var e,i,o=this._milliseconds;if("month"===(t=z(t))||"year"===t)return e=this._days+o/864e5,i=this._months+uo(e),"month"===t?i:i/12;switch(e=this._days+Math.round(co(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function fo(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN}function mo(t){return function(){return this.as(t)}}function vo(){return Ke(this)}function go(t){return t=z(t),this.isValid()?this[t+"s"]():NaN}function yo(t){return function(){return this.isValid()?this._data[t]:NaN}}function bo(){return b(this.days()/7)}function _o(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function wo(t,e,i){var o=Ke(t).abs(),n=Ds(o.as("s")),s=Ds(o.as("m")),r=Ds(o.as("h")),a=Ds(o.as("d")),h=Ds(o.as("M")),d=Ds(o.as("y")),l=n<=Ms.ss&&["s",n]||n0,l[4]=i,_o.apply(null,l)}function xo(t){return void 0===t?Ds:"function"==typeof t&&(Ds=t,!0)}function ko(t,e){return void 0!==Ms[t]&&(void 0===e?Ms[t]:(Ms[t]=e,"s"===t&&(Ms.ss=e-1),!0))}function So(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=wo(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Do(t){return(t>0)-(t<0)||+t}function Mo(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,o=Cs(this._milliseconds)/1e3,n=Cs(this._days),s=Cs(this._months);t=b(o/60),e=b(t/60),o%=60,t%=60,i=b(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o?o.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var p=c<0?"-":"",f=Do(this._months)!==Do(c)?"-":"",m=Do(this._days)!==Do(c)?"-":"",v=Do(this._milliseconds)!==Do(c)?"-":"";return p+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(h?m+h+"D":"")+(d||l||u?"T":"")+(d?v+d+"H":"")+(l?v+l+"M":"")+(u?v+u+"S":"")}var Co,Oo;Oo=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;o68?1900:2e3)};var yn,bn=it("FullYear",!0);yn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:m()}),Xn=function(){return Date.now?Date.now():+new Date},Zn=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ae("Z",":"),Ae("ZZ",""),U("Z",nn),U("ZZ",nn),K(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ze(nn,t)});var Kn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Jn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,$n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Ke.fn=Ie.prototype,Ke.invalid=Pe;var Qn=ti(1,"add"),ts=ti(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var es=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ai("gggg","weekYear"),Ai("ggggg","weekYear"),Ai("GGGG","isoWeekYear"),Ai("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),U("G",en),U("g",en),U("GG",Xo,Go),U("gg",Xo,Go),U("GGGG",$o,Uo),U("gggg",$o,Uo),U("GGGGG",Qo,qo),U("ggggg",Qo,qo),J(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=_(t)}),J(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),U("Q",Yo),K("Q",function(t,e){e[ln]=3*(_(t)-1)}),H("D",["DD",2],"Do","date"),A("date","D"),F("date",9),U("D",Xo),U("DD",Xo,Go),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),K(["D","DD"],un),K("Do",function(t,e){e[un]=_(t.match(Xo)[0],10)});var is=it("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),U("DDD",Jo),U("DDDD",Vo),K(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),H("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),U("m",Xo),U("mm",Xo,Go),K(["m","mm"],pn);var os=it("Minutes",!1);H("s",["ss",2],0,"second"),A("second","s"),F("second",15),U("s",Xo),U("ss",Xo,Go),K(["s","ss"],fn);var ns=it("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),U("S",Jo,Yo),U("SS",Jo,Go),U("SSS",Jo,Vo);var ss;for(ss="SSSS";ss.length<=9;ss+="S")U(ss,tn);for(ss="S";ss.length<=9;ss+="S")K(ss,Gi);var rs=it("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var as=g.prototype;as.add=Qn,as.calendar=oi,as.clone=ni,as.diff=ui,as.endOf=Si,as.format=vi,as.from=gi,as.fromNow=yi,as.to=bi,as.toNow=_i,as.get=st,as.invalidAt=Ni,as.isAfter=si,as.isBefore=ri,as.isBetween=ai,as.isSame=hi,as.isSameOrAfter=di,as.isSameOrBefore=li,as.isValid=Pi,as.lang=es,as.locale=wi,as.localeData=xi,as.max=qn,as.min=Un,as.parsingFlags=Ii,as.set=rt,as.startOf=ki,as.subtract=ts,as.toArray=Oi,as.toObject=Ei,as.toDate=Ci,as.toISOString=fi,as.inspect=mi,as.toJSON=Ti,as.toString=pi,as.unix=Mi,as.valueOf=Di,as.creationData=Ri,as.year=bn,as.isLeapYear=et,as.weekYear=zi,as.isoWeekYear=Li,as.quarter=as.quarters=Wi,as.month=ft,as.daysInMonth=mt,as.week=as.weeks=Ot,as.isoWeek=as.isoWeeks=Et,as.weeksInYear=Bi,as.isoWeeksInYear=Fi,as.date=is,as.day=as.days=Lt,as.weekday=Ft,as.isoWeekday=Bt,as.dayOfYear=Yi,as.hour=as.hours=Rn,as.minute=as.minutes=os,as.second=as.seconds=ns,as.millisecond=as.milliseconds=rs,as.utcOffset=Be,as.utc=He,as.local=We,as.parseZone=Ye,as.hasAlignedHourOffset=Ge,as.isDST=Ve,as.isLocal=qe,as.isUtcOffset=Xe,as.isUtc=Ze,as.isUTC=Ze,as.zoneAbbr=Vi,as.zoneName=Ui,as.dates=k("dates accessor is deprecated. Use date instead.",is),as.months=k("months accessor is deprecated. Use month instead",ft),as.years=k("years accessor is deprecated. Use year instead",bn),as.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",je),as.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ue);var hs=O.prototype;hs.calendar=E,hs.longDateFormat=T,hs.invalidDate=P,hs.ordinal=I,hs.preparse=Zi,hs.postformat=Zi,hs.relativeTime=N,hs.pastFuture=R,hs.set=M,hs.months=dt,hs.monthsShort=lt,hs.monthsParse=ct,hs.monthsRegex=gt,hs.monthsShortRegex=vt,hs.week=Dt,hs.firstDayOfYear=Ct,hs.firstDayOfWeek=Mt,hs.weekdays=It,hs.weekdaysMin=Rt,hs.weekdaysShort=Nt,hs.weekdaysParse=zt,hs.weekdaysRegex=jt,hs.weekdaysShortRegex=Ht,hs.weekdaysMinRegex=Wt,hs.isPM=Xt,hs.meridiem=Zt,Qt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qt),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ie);var ds=Math.abs,ls=mo("ms"),us=mo("s"),cs=mo("m"),ps=mo("h"),fs=mo("d"),ms=mo("w"),vs=mo("M"),gs=mo("y"),ys=yo("milliseconds"),bs=yo("seconds"),_s=yo("minutes"),ws=yo("hours"),xs=yo("days"),ks=yo("months"),Ss=yo("years"),Ds=Math.round,Ms={ss:44,s:45,m:45,h:22,d:26,M:11},Cs=Math.abs,Os=Ie.prototype;return Os.isValid=Te,Os.abs=no,Os.add=ro,Os.subtract=ao,Os.as=po,Os.asMilliseconds=ls,Os.asSeconds=us,Os.asMinutes=cs,Os.asHours=ps,Os.asDays=fs,Os.asWeeks=ms,Os.asMonths=vs,Os.asYears=gs,Os.valueOf=fo,Os._bubble=lo,Os.clone=vo,Os.get=go,Os.milliseconds=ys,Os.seconds=bs,Os.minutes=_s,Os.hours=ws,Os.days=xs,Os.weeks=bo,Os.months=ks,Os.years=Ss,Os.humanize=So,Os.toISOString=Mo,Os.toString=Mo,Os.toJSON=Mo,Os.locale=wi,Os.localeData=xi,Os.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mo),Os.lang=es,H("X",0,0,"unix"),H("x",0,0,"valueOf"),U("x",en),U("X",sn),K("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),K("x",function(t,e,i){i._d=new Date(_(t))}),e.version="2.19.1",function(t){Co=t}(De),e.fn=as,e.min=Ce,e.max=Oe,e.now=Xn,e.utc=u,e.unix=qi,e.months=Qi,e.isDate=a,e.locale=Qt,e.invalid=m,e.duration=Ke,e.isMoment=y,e.weekdays=eo,e.parseZone=Xi,e.localeData=ie,e.isDuration=Ne,e.monthsShort=to,e.weekdaysMin=oo,e.defineLocale=te,e.updateLocale=ee,e.locales=oe,e.weekdaysShort=io,e.normalizeUnits=z,e.relativeTimeRounding=xo,e.relativeTimeThreshold=ko,e.calendarFormat=ii,e.prototype=as,e})}).call(e,i(155)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=156},function(t,e,i){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){n<16&&(e[o+n++]=u[t])});n<16;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(d<0&&void 0===t.clockseq&&(r=r+1&16383),(d<0||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;p<6;p++)s[n+p]=c[p];return e||o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:void 0!==e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;c<256;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,i(158))},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Graph3d=i(161),e.graph3d={Camera:i(95),Filter:i(96),Point2d:i(91),Point3d:i(34),Slider:i(92),StepNumber:i(93)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){var o=i(7),n=o.JSON||(o.JSON={stringify:JSON.stringify});t.exports=function(t){return n.stringify.apply(n,arguments)}},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.dataGroup=new _,this.dataPoints=null,this.create(),f.setDefaults(o.DEFAULTS,this),this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.setOptions(i),this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(90),a=function(t){return t&&t.__esModule?t:{default:t}}(r),h=i(44),d=i(2),l=i(34),u=i(91),c=i(92),p=i(93),f=i(94),m=i(15).default,v=i(15),g=v.printStyle,y=i(172),b=y.allOptions,_=i(173);o.STYLE=f.STYLE;o.DEFAULTS={width:"400px",height:"400px",filterLabel:"time",legendLabel:"value",xLabel:"x",yLabel:"y",zLabel:"z",xValueLabel:function(t){return t},yValueLabel:function(t){return t},zValueLabel:function(t){return t},showXAxis:!0,showYAxis:!0,showZAxis:!0,showGrid:!0,showPerspective:!0,showShadow:!1,keepAspectRatio:!0,verticalRatio:.5,dotSizeRatio:.02,dotSizeMinFraction:.5,dotSizeMaxFraction:2.5,showAnimationControls:void 0,animationInterval:1e3,animationPreload:!1,animationAutoStart:void 0,axisColor:"#4D4D4D",gridColor:"#D3D3D3",xCenter:"55%",yCenter:"50%",style:o.STYLE.DOT,tooltip:!1,tooltipStyle:{content:{padding:"10px",border:"1px solid #4d4d4d",color:"#1a1a1a",background:"rgba(255,255,255,0.7)",borderRadius:"2px",boxShadow:"5px 5px 10px rgba(128,128,128,0.5)"},line:{height:"40px",width:"0",borderLeft:"1px solid #4d4d4d"},dot:{height:"0",width:"0",border:"5px solid #4d4d4d",borderRadius:"5px"}},dataColor:{fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},cameraPosition:{horizontal:1,vertical:.5,distance:1.7},showLegend:void 0,backgroundColor:void 0,xBarWidth:void 0,yBarWidth:void 0,valueMin:void 0,valueMax:void 0,xMin:void 0,xMax:void 0,xStep:void 0,yMin:void 0,yMax:void 0,yStep:void 0,zMin:void 0,zMax:void 0,zStep:void 0},h(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/this.xRange.range(),1/this.yRange.range(),1/this.zRange.range()),this.keepAspectRatio&&(this.scale.x0&&(r[n-1].pointNext=r[n]);return r},o.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},o=function(t){e._onTouchStart(t)},n=function(t){e._onWheel(t)},s=function(t){e._onTooltip(t)},r=function(t){e._onClick(t)};d.addEventListener(this.frame.canvas,"mousedown",i),d.addEventListener(this.frame.canvas,"touchstart",o),d.addEventListener(this.frame.canvas,"mousewheel",n),d.addEventListener(this.frame.canvas,"mousemove",s),d.addEventListener(this.frame.canvas,"click",r),this.containerElement.appendChild(this.frame)},o.prototype._setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},o.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},o.prototype.animationStart=function(){if(this.animationAutoStart&&this.dataGroup.dataFilter){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()}},o.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},o.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},o.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},o.prototype._readData=function(t){this.dataPoints=this.dataGroup.initializeData(this,t,this.style),this._initializeRanges(),this._redrawFilter()},o.prototype.setData=function(t){void 0!==t&&null!==t&&(this._readData(t),this.redraw(),this.animationStart())},o.prototype.setOptions=function(t){if(void 0!==t){!0===m.validate(t,b)&&console.log("%cErrors have been found in the supplied options object.",g),this.animationStop(),f.setOptions(t,this),this.setPointDrawingMethod(),this._setSize(this.width,this.height),this.setData(this.dataGroup.getDataTable()),this.animationStart()}},o.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case o.STYLE.BAR:t=o.prototype._redrawBarGraphPoint;break;case o.STYLE.BARCOLOR:t=o.prototype._redrawBarColorGraphPoint;break;case o.STYLE.BARSIZE:t=o.prototype._redrawBarSizeGraphPoint;break;case o.STYLE.DOT:t=o.prototype._redrawDotGraphPoint;break;case o.STYLE.DOTLINE:t=o.prototype._redrawDotLineGraphPoint;break;case o.STYLE.DOTCOLOR:t=o.prototype._redrawDotColorGraphPoint;break;case o.STYLE.DOTSIZE:t=o.prototype._redrawDotSizeGraphPoint;break;case o.STYLE.SURFACE:t=o.prototype._redrawSurfaceGraphPoint;break;case o.STYLE.GRID:t=o.prototype._redrawGridGraphPoint;break;case o.STYLE.LINE:t=o.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},o.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},o.prototype._getContext=function(){var t=this.frame.canvas,e=t.getContext("2d");return e.lineJoin="round",e.lineCap="round",e},o.prototype._redrawClear=function(){var t=this.frame.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height)},o.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},o.prototype._getLegendWidth=function(){var t;if(this.style===o.STYLE.DOTSIZE){t=this._dotSize()*this.dotSizeMaxFraction}else t=this.style===o.STYLE.BARSIZE?this.xBarWidth:20;return t},o.prototype._redrawLegend=function(){if(!0===this.showLegend&&this.style!==o.STYLE.LINE&&this.style!==o.STYLE.BARSIZE){var t=this.style===o.STYLE.BARSIZE||this.style===o.STYLE.DOTSIZE,e=this.style===o.STYLE.DOTSIZE||this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),n=this.margin,s=this._getLegendWidth(),r=this.frame.clientWidth-this.margin,a=r-s,h=n+i,d=this._getContext();if(d.lineWidth=1,d.font="14px arial",!1===t){var l,c=i;for(l=0;l0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelY=function(t,e,i,o,n){void 0===n&&(n=0);var s=this._convert3Dto2D(e);Math.cos(2*o)<0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelZ=function(t,e,i,o){void 0===o&&(o=0);var n=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,n.x-o,n.y)},o.prototype._line3d=function(t,e,i,o){var n=this._convert3Dto2D(e),s=this._convert3Dto2D(i);this._line(t,n,s,o)},o.prototype._redrawAxis=function(){var t,e,i,o,n,s,r,a,h,d,c,f=this._getContext();f.font=24/this.camera.getArmLength()+"px arial";var m,v=.025/this.scale.x,g=.025/this.scale.y,y=5/this.camera.getArmLength(),b=this.camera.getArmRotation().horizontal,_=new u(Math.cos(b),Math.sin(b)),w=this.xRange,x=this.yRange,k=this.zRange;for(f.lineWidth=1,o=void 0===this.defaultXStep,i=new p(w.min,w.max,this.xStep,o),i.start(!0);!i.end();){var S=i.getCurrent();if(this.showGrid?(t=new l(S,x.min,k.min),e=new l(S,x.max,k.min),this._line3d(f,t,e,this.gridColor)):this.showXAxis&&(t=new l(S,x.min,k.min),e=new l(S,x.min+v,k.min),this._line3d(f,t,e,this.axisColor),t=new l(S,x.max,k.min),e=new l(S,x.max-v,k.min),this._line3d(f,t,e,this.axisColor)),this.showXAxis){r=_.x>0?x.min:x.max,m=new l(S,r,k.min);var D=" "+this.xValueLabel(S)+" ";this.drawAxisLabelX(f,m,D,b,y)}i.next()}for(f.lineWidth=1,o=void 0===this.defaultYStep,i=new p(x.min,x.max,this.yStep,o),i.start(!0);!i.end();){var M=i.getCurrent();if(this.showGrid?(t=new l(w.min,M,k.min),e=new l(w.max,M,k.min),this._line3d(f,t,e,this.gridColor)):this.showYAxis&&(t=new l(w.min,M,k.min),e=new l(w.min+g,M,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,M,k.min),e=new l(w.max-g,M,k.min),this._line3d(f,t,e,this.axisColor)),this.showYAxis){s=_.y>0?w.min:w.max,m=new l(s,M,k.min);var C=" "+this.yValueLabel(M)+" ";this.drawAxisLabelY(f,m,C,b,y)}i.next()}if(this.showZAxis){for(f.lineWidth=1,o=void 0===this.defaultZStep,i=new p(k.min,k.max,this.zStep,o),i.start(!0),s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max;!i.end();){var O=i.getCurrent(),E=new l(s,r,O),T=this._convert3Dto2D(E);e=new u(T.x-y,T.y),this._line(f,T,e,this.axisColor);var P=this.zValueLabel(O)+" ";this.drawAxisLabelZ(f,E,P,5),i.next()}f.lineWidth=1,t=new l(s,r,k.min),e=new l(s,r,k.max),this._line3d(f,t,e,this.axisColor)}if(this.showXAxis){var I,N;f.lineWidth=1,I=new l(w.min,x.min,k.min),N=new l(w.max,x.min,k.min),this._line3d(f,I,N,this.axisColor),I=new l(w.min,x.max,k.min),N=new l(w.max,x.max,k.min),this._line3d(f,I,N,this.axisColor)}this.showYAxis&&(f.lineWidth=1,t=new l(w.min,x.min,k.min),e=new l(w.min,x.max,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,x.min,k.min),e=new l(w.max,x.max,k.min),this._line3d(f,t,e,this.axisColor));var R=this.xLabel;R.length>0&&this.showXAxis&&(c=.1/this.scale.y,s=(w.max+3*w.min)/4,r=_.x>0?x.min-c:x.max+c,n=new l(s,r,k.min),this.drawAxisLabelX(f,n,R,b));var A=this.yLabel;A.length>0&&this.showYAxis&&(d=.1/this.scale.x,s=_.y>0?w.min-d:w.max+d,r=(x.max+3*x.min)/4,n=new l(s,r,k.min),this.drawAxisLabelY(f,n,A,b));var z=this.zLabel;z.length>0&&this.showZAxis&&(h=30,s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max,a=(k.max+3*k.min)/4,n=new l(s,r,a),this.drawAxisLabelZ(f,n,z,h))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-this.eye.z/this.camera.getArmLength()*this.dataColor.strokeWidth:this.dataColor.strokeWidth},o.prototype._redrawBar=function(t,e,i,o,n,s){var r,a=this,h=e.point,d=this.zRange.min,u=[{point:new l(h.x-i,h.y-o,h.z)},{point:new l(h.x+i,h.y-o,h.z)},{point:new l(h.x+i,h.y+o,h.z)},{point:new l(h.x-i,h.y+o,h.z)}],c=[{point:new l(h.x-i,h.y-o,d)},{point:new l(h.x+i,h.y-o,d)},{point:new l(h.x+i,h.y+o,d)},{point:new l(h.x-i,h.y+o,d)}];u.forEach(function(t){t.screen=a._convert3Dto2D(t.point)}),c.forEach(function(t){t.screen=a._convert3Dto2D(t.point)});var p=[{corners:u,center:l.avg(c[0].point,c[2].point)},{corners:[u[0],u[1],c[1],c[0]],center:l.avg(c[1].point,c[0].point)},{corners:[u[1],u[2],c[2],c[1]],center:l.avg(c[2].point,c[1].point)},{corners:[u[2],u[3],c[3],c[2]],center:l.avg(c[3].point,c[2].point)},{corners:[u[3],u[0],c[0],c[3]],center:l.avg(c[0].point,c[3].point)}];e.surfaces=p;for(var f=0;f0}if(a){var p,f=(e.point.z+i.point.z+o.point.z+n.point.z)/4,m=240*(1-(f-this.zRange.min)*this.scale.z/this.verticalRatio);this.showShadow?(p=Math.min(1+u.x/c/2,1),s=this._hsv2rgb(m,1,p),r=s):(p=1,s=this._hsv2rgb(m,1,p),r=this.axisColor)}else s="gray",r=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var v=[e,i,n,o];this._polygon(t,v,s,r)}},o.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var o=(e.point.z+i.point.z)/2,n=240*(1-(o-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(n,1,1),this._line(t,e.screen,i.screen)}},o.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},o.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},o.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t0?1:t<0?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=null,s=null,r=null,a=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){n=this.dataPoints[i];var h=n.surfaces;if(h)for(var d=h.length-1;d>=0;d--){var l=h[d],c=l.corners,p=[c[0].screen,c[1].screen,c[2].screen],f=[c[2].screen,c[3].screen,c[0].screen];if(this._insideTriangle(a,p)||this._insideTriangle(a,f))return n}}else for(i=0;i"+this.xLabel+":"+t.point.x+""+this.yLabel+":"+t.point.y+""+this.zLabel+":"+t.point.z+"",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,h=o.offsetWidth,d=o.offsetHeight,l=t.screen.x-n/2;l=Math.min(Math.max(l,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=l+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-h/2+"px",o.style.top=t.screen.y-d/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},o.prototype.setCameraPosition=function(t){f.setCameraPosition(t,this),this.redraw()},o.prototype.setSize=function(t,e){this._setSize(t,e),this.redraw()},t.exports=o},function(t,e,i){i(163),t.exports=i(7).Object.assign},function(t,e,i){var o=i(17);o(o.S+o.F,"Object",{assign:i(164)})},function(t,e,i){var o=i(33),n=i(63),s=i(42),r=i(41),a=i(78),h=Object.assign;t.exports=!h||i(28)(function(){var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach(function(t){e[t]=t}),7!=h({},t)[i]||Object.keys(h({},e)).join("")!=o})?function(t,e){for(var i=r(t),h=arguments.length,d=1,l=n.f,u=s.f;h>d;)for(var c,p=a(arguments[d++]),f=l?o(p).concat(l(p)):o(p),m=f.length,v=0;m>v;)u.call(p,c=f[v++])&&(i[c]=p[c]);return i}:h},function(t,e,i){t.exports={default:i(166),__esModule:!0}},function(t,e,i){i(167),t.exports=i(7).Math.sign},function(t,e,i){var o=i(17);o(o.S,"Math",{sign:i(168)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,i){t.exports={default:i(170),__esModule:!0}},function(t,e,i){i(171);var o=i(7).Object;t.exports=function(t,e,i){return o.defineProperty(t,e,i)}},function(t,e,i){var o=i(17);o(o.S+o.F*!i(21),"Object",{defineProperty:i(20).f})},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var o="string",n="boolean",s="number",r={fill:{string:o},stroke:{string:o},strokeWidth:{number:s},__type__:{string:o,object:"object",undefined:"undefined"}},a={animationAutoStart:{boolean:n,undefined:"undefined"},animationInterval:{number:s},animationPreload:{boolean:n},axisColor:{string:o},backgroundColor:r,xBarWidth:{number:s,undefined:"undefined"},yBarWidth:{number:s,undefined:"undefined"},cameraPosition:{distance:{number:s},horizontal:{number:s},vertical:{number:s},__type__:{object:"object"}},xCenter:{string:o},yCenter:{string:o},dataColor:r,dotSizeMinFraction:{number:s},dotSizeMaxFraction:{number:s},dotSizeRatio:{number:s},filterLabel:{string:o},gridColor:{string:o},onclick:{function:"function"},keepAspectRatio:{boolean:n},xLabel:{string:o},yLabel:{string:o},zLabel:{string:o},legendLabel:{string:o},xMin:{number:s,undefined:"undefined"},yMin:{number:s,undefined:"undefined"},zMin:{number:s,undefined:"undefined"},xMax:{number:s,undefined:"undefined"},yMax:{number:s,undefined:"undefined"},zMax:{number:s,undefined:"undefined"},showAnimationControls:{boolean:n,undefined:"undefined"},showGrid:{boolean:n},showLegend:{boolean:n,undefined:"undefined"},showPerspective:{boolean:n},showShadow:{boolean:n},showXAxis:{boolean:n},showYAxis:{boolean:n},showZAxis:{boolean:n},xStep:{number:s,undefined:"undefined"},yStep:{number:s,undefined:"undefined"},zStep:{number:s,undefined:"undefined"},style:{number:s,string:["bar","bar-color","bar-size","dot","dot-line","dot-color","dot-size","line","grid","surface"]},tooltip:{boolean:n,function:"function"},tooltipStyle:{content:{color:{string:o},background:{string:o},border:{string:o},borderRadius:{string:o},boxShadow:{string:o},padding:{string:o},__type__:{object:"object"}},line:{borderLeft:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},dot:{border:{string:o},borderRadius:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},__type__:{object:"object"}},xValueLabel:{function:"function"},yValueLabel:{function:"function"},zValueLabel:{function:"function"},valueMax:{number:s,undefined:"undefined"},valueMin:{number:s,undefined:"undefined"},verticalRatio:{number:s},height:{string:o},width:{string:o},__type__:{object:"object"}};e.allOptions=a},function(t,e,i){function o(){this.dataTable=null}var n=i(11),s=i(12),r=i(174),a=i(96),h=i(94),d=i(34);o.prototype.initializeData=function(t,e,i){if(void 0!==e){Array.isArray(e)&&(e=new n(e));var o;if(!(e instanceof n||e instanceof s))throw new Error("Array, DataSet, or DataView expected");if(o=e.get(),0!=o.length){this.style=i,this.dataSet&&this.dataSet.off("*",this._onChange),this.dataSet=e,this.dataTable=o;var r=this;this._onChange=function(){t.setData(r.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z";var h=t.hasBars(i);if(h&&(void 0!==t.defaultXBarWidth?this.xBarWidth=t.defaultXBarWidth:this.xBarWidth=this.getSmallestDifference(o,this.colX)||1,void 0!==t.defaultYBarWidth?this.yBarWidth=t.defaultYBarWidth:this.yBarWidth=this.getSmallestDifference(o,this.colY)||1),this._initializeRange(o,this.colX,t,h),this._initializeRange(o,this.colY,t,h),this._initializeRange(o,this.colZ,t,!1),o[0].hasOwnProperty("style")){this.colValue="style";var d=this.getColumnRange(o,this.colValue);this._setRangeDefaults(d,t.defaultValueMin,t.defaultValueMax),this.valueRange=d}this.getDataTable()[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new a(this,"filter",t),this.dataFilter.setOnLoadCallback(function(){t.redraw()}));return this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.getDataTable())}}},o.prototype._collectRangeSettings=function(t,e){if(-1==["x","y","z"].indexOf(t))throw new Error("Column '"+t+"' invalid");var i=t.toUpperCase();return{barWidth:this[t+"BarWidth"],min:e["default"+i+"Min"],max:e["default"+i+"Max"],step:e["default"+i+"Step"],range_label:t+"Range",step_label:t+"Step"}},o.prototype._initializeRange=function(t,e,i,o){var n=this._collectRangeSettings(e,i),s=this.getColumnRange(t,e);o&&"z"!=e&&s.expand(n.barWidth/2),this._setRangeDefaults(s,n.min,n.max),this[n.range_label]=s,this[n.step_label]=void 0!==n.step?n.step:s.range()/5},o.prototype.getDistinctValues=function(t,e){void 0===e&&(e=this.dataTable);for(var i=[],o=0;os)&&(o=s)}return o},o.prototype.getColumnRange=function(t,e){for(var i=new r,o=0;o0&&(e[i-1].pointNext=e[i]);return e},o.prototype._checkValueField=function(t){if(this.style===h.STYLE.BARCOLOR||this.style===h.STYLE.BARSIZE||this.style===h.STYLE.DOTCOLOR||this.style===h.STYLE.DOTSIZE){if(void 0===this.colValue)throw new Error("Expected data to have field 'style' for graph style '"+this.style+"'");if(void 0===t[0][this.colValue])throw new Error("Expected data to have field '"+this.colValue+"' for graph style '"+this.style+"'")}},t.exports=o},function(t,e,i){function o(){this.min=void 0,this.max=void 0}o.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.maxi)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},o.prototype.range=function(){return this.max-this.min},o.prototype.center=function(){return(this.min+this.max)/2},t.exports=o},function(t,e,i){var o,n,s;!function(i){n=[],o=i,void 0!==(s="function"==typeof o?o.apply(e,n):o)&&(t.exports=s)}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(l(t,i[e],i),!0)}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ft(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==gt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function S(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=R(o);e.timeStamp=_t(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=L(a,h),P(i,e),e.offsetDirection=z(e.deltaX,e.deltaY);var d=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=bt(d.x)>bt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?B(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==Pt||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=It&&(h>Ot||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=A(h,d,l);o=u.x,n=u.y,i=bt(u.x)>bt(u.y)?u.x:u.y,s=z(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;i=bt(e)?t<0?Rt:At:e<0?zt:Lt}function L(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function B(t,e){return F(e[1],e[0],Wt)+F(t[1],t[0],Wt)}function j(t,e){return L(e[0],e[1],Wt)/L(t[0],t[1],Wt)}function H(){this.evEl=Gt,this.evWin=Vt,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=Xt,this.evWin=Zt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Jt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(Pt|It)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Tt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;n-1&&o.splice(t,1)};setTimeout(n,ee)}}function K(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;o=fe&&e(i.options.event+tt(o))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return ot.prototype.attrTest.call(this,t)&&(this.state&ce||!(this.state&ce)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(st,ot,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ce)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(rt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(Pt|It)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&Pt)return me;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&Pt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=_t(),this.manager.emit(this.options.event,this._input)))}}),c(at,ot,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ce)}}),c(ht,ot,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ft|Bt,pointers:1},getTouchAction:function(){return nt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ft|Bt)?e=t.overallVelocity:i&Ft?e=t.overallVelocityX:i&Bt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Pt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(dt,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanced+i?s+=h()+u-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,o-i),{shouldScroll:r,scrollOffset:s,itemTop:l}}var a=i(9),h=i(2),d=i(11),l=i(12),u=i(64),c=i(65),p=i(45),f=i(67),m=i(46),v=i(99),g=i(15).printStyle,y=i(105).allOptions,b=i(105).configureOptions,_=i(71).default,w=i(15).default;o.prototype=new c,o.prototype._createConfigurator=function(){return new _(this,this.dom.container,b)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){if(!0===w.validate(t,y)&&console.log("%cErrors have been found in the supplied options object.",g),c.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e),this.setSelection(i)}}},o.prototype.setItems=function(t){var e;e=t?t instanceof d||t instanceof l?t:new d(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},o.prototype.setGroups=function(t){var e;if(t){var i=function(t){return!1!==t.visible};e=t instanceof d||t instanceof l?new l(t,{filter:i}):new d(t.filter(i))}else e=null;this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||es)&&(s=i)}),null!==n&&null!==s){var a=this,h=this.itemSet.items[i[0]],d=-1*this._getScrollTop(),l=null,u=function(t,e,i){var o=r(a,h);if(l||(l=o),l.itemTop!=o.itemTop||l.shouldScroll){l.itemTop!=o.itemTop&&o.shouldScroll&&(l=o,d=-1*a._getScrollTop());var n=d,s=l.scrollOffset,u=i?s:n+(s-n)*t;a._setScrollTop(-u),e||a._redraw()}},c=function(){var t=r(a,h);t.shouldScroll&&t.itemTop!=l.itemTop&&(a._setScrollTop(-t.scrollOffset),a._redraw())},p=function(){c(),setTimeout(c,100)},f=(n+s)/2,m=Math.max(this.range.end-this.range.start,1.1*(s-n)),v=!e||void 0===e.animation||e.animation;v||(l={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(f-m/2,f+m/2,{animation:v},p,u)}}},o.prototype.fit=function(t,e){var i,o=!t||void 0===t.animation||t.animation,n=this.itemsData&&this.itemsData.getDataSet();1===n.length&&void 0===n.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:o},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:o},e))},o.prototype.getItemRange=function(){var t=this.getDataRange(),e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,o=null,r=null;if(null!=e&&null!=i){var a=i-e;a<=0&&(a=10);var d=a/this.props.center.width,l={},u=0;h.forEach(this.itemSet.items,function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),u=l[e].length}});if(u>0)for(var c=0;ci&&(i=h,r=t)}.bind(this)),o&&r){var p=o.getWidthLeft()+10,f=r.getWidthRight()+10,m=this.props.center.width-p-f;m>0&&(this.options.rtl?(e=n(o)-f*a/m,i=s(r)+p*a/m):(e=n(o)-p*a/m,i=s(r)+f*a/m))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=h.convert(i.start,"Date").valueOf(),n=h.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||oe)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e,i=t.center?t.center.x:t.clientX,o=t.center?t.center.y:t.clientY;e=this.options.rtl?h.getAbsoluteRight(this.dom.centerContainer)-i:i-h.getAbsoluteLeft(this.dom.centerContainer);var n=o-h.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=m.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),c=this._toTime(e),p=d?d(c,l,u):c,f=h.getTarget(t),v=null;return null!=s?v="item":null!=a?v="custom-time":h.hasParent(f,this.timeAxis.dom.foreground)?v="axis":this.timeAxis2&&h.hasParent(f,this.timeAxis2.dom.foreground)?v="axis":h.hasParent(f,this.itemSet.dom.labelSet)?v="group-label":h.hasParent(f,this.currentTime.bar)?v="current-time":h.hasParent(f,this.dom.center)&&(v="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:v,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:e,y:n,time:c,snappedTime:p}},o.prototype.toggleRollingMode=function(){this.range.rolling?this.range.stopRolling():(void 0==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(10),u=i(37),c=i(2),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,a.default)(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return(0,d.default)(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,o=this._isColorString(t);if(void 0!==o&&(t=o),!0===c.isString(t)){if(!0===c.isValidRGB(t)){var n=t.substr(4).substr(0,t.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(!0===c.isValidRGBA(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===c.isValidHex(t)){var a=c.hexToRGB(t);i={r:a.r,g:a.g,b:a.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var h=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+(0,s.default)(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=c.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=c.extend({},t)),this.color=t;var e=c.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=c.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=c.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=c.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d") +;this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new l(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),u.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var a=2*Math.PI/360,h=1/this.r,d=void 0;for(s=0;s<360;s++)for(r=0;rr?r:t,e=null==e?r:e0&&l.push(u.screenToValue(n)),!p.hidden&&this.itemsData.length>0&&l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new g(this,this.dom.container,v)},t.exports=o},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Network=i(182),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(122)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){function o(t,e,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:d,clickToUse:!1},s.extend(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new g(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new y(this.body,this.canvas),this.renderer=new v(this.body,this.canvas),this.physics=new f(this.body),this.layoutEngine=new w(this.body),this.clustering=new m(this.body),this.manipulation=new x(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new c(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new p(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new T(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}i(183);var n=i(44),s=i(2),r=i(114),a=i(115),h=i(97),d=i(184),l=i(116).default,u=i(186).default,c=i(187).default,p=i(214).default,f=i(220).default,m=i(227).default,v=i(229).default,g=i(230).default,y=i(231).default,b=i(232).default,_=i(234).default,w=i(235).default,x=i(237).default,k=i(71).default,S=i(15).default,D=i(15),M=D.printStyle,C=i(122),O=C.allOptions,E=C.configureOptions,T=i(238).default;n(o.prototype),o.prototype.setOptions=function(t){var e=this;if(void 0!==t){!0===S.validate(t,O)&&console.log("%cErrors have been found in the supplied options object.",M);var i=["locale","locales","clickToUse"];if(s.selectiveDeepExtend(i,this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new k(this,this.body.container,E,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var o={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};s.deepExtend(o.nodes,this.nodesHandler.options),s.deepExtend(o.edges,this.edgesHandler.options),s.deepExtend(o.layout,this.layoutEngine.options),s.deepExtend(o.interaction,this.selectionHandler.options),s.deepExtend(o.interaction,this.renderer.options),s.deepExtend(o.interaction,this.interactionHandler.options),s.deepExtend(o.manipulation,this.manipulation.options),s.deepExtend(o.physics,this.physics.options),s.deepExtend(o.global,this.canvas.options),s.deepExtend(o.global,this.options),this.configurator.setModuleOptions(o)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new h(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in t)t.hasOwnProperty(i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=t[n.fromId],r=t[n.toId],a=void 0!==s&&void 0!==r,h=!this.clustering._isClusteredEdge(o)&&!1===n.options.hidden&&a&&!1===s.options.hidden&&!1===r.options.hidden;h&&this.body.edgeIndices.push(n.id)}},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var e=r.DOTToGraph(t.dot);return void this.setData(e)}if(t&&t.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=a.parseGephi(t.gephi);return void this.setData(i)}this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&delete this.body.nodes[t];for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&delete this.body.edges[e];s.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,o=void 0,n=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),o=void 0===o?s:Math.max(s,o),n+=s)}if(void 0!==i&&void 0!==o)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,o,n)},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},o.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},o.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},o.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},o.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},o.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},o.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},o.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},o.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},o.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},o.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},o.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},o.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},o.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},o.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},o.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},o.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},o.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},o.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},o.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},o.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},o.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},o.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},o.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},o.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},o.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},o.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},o.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},o.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},o.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},o.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},o.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},o.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},o.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},o.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},o.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},o.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},o.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},o.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},o.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},o.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},o.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t},t.exports=o},function(t,e,i){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;o<10;o++){var n=o%2==0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;i-2*n<0&&(n=i/2),o-2*n<0&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(t,e,i,o){var n=i/2*.5522848,s=o/2*.5522848,r=t+i,a=e+o,h=t+i/2,d=e+o/2;this.beginPath(),this.moveTo(t,d),this.bezierCurveTo(t,d-s,h-n,e,h,e),this.bezierCurveTo(h+n,e,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+n,a,h,a),this.bezierCurveTo(h-n,a,t,d+s,t,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=i,s=o*(1/3),r=n/2*.5522848,a=s/2*.5522848,h=t+n,d=e+s,l=t+n/2,u=e+s/2,c=e+(o-s/2),p=e+o;this.beginPath(),this.moveTo(h,u),this.bezierCurveTo(h,u+a,l+r,d,l,d),this.bezierCurveTo(l-r,d,t,u+a,t,u),this.bezierCurveTo(t,u-a,l-r,e,l,e),this.bezierCurveTo(l+r,e,h,u-a,h,u),this.lineTo(h,c),this.bezierCurveTo(h,c+a,l+r,p,l,p),this.bezierCurveTo(l-r,p,t,c+a,t,c),this.lineTo(t,u)},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=r<0?-c:c,t+=c,e+=h*c,!0===u?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(t,e,i){this.beginPath();var o=2*Math.PI/6;this.moveTo(t+i,e);for(var n=1;n<6;n++)this.lineTo(t+i*Math.cos(o*n),e+i*Math.sin(o*n));this.closePath()})},function(t,e,i){e.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},e.en_EN=e.en,e.en_US=e.en,e.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},e.de_DE=e.de,e.es={edit:"Editar",del:"Eliminar selección",back:"Átras",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},e.it_IT=e.it,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl,e["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},e["pt-BR"]=e["pt-br"],e.pt_BR=e["pt-br"],e.pt_br=e["pt-br"],e.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},e.ru_RU=e.ru,e.cn={edit:"编辑",del:"åˆ é™¤é€‰å®š",back:"返回",addNode:"æ·»åŠ èŠ‚ç‚¹",addEdge:"æ·»åŠ è¿žæŽ¥çº¿",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"æ— æ³•å°†è¿žæŽ¥çº¿è¿žæŽ¥åˆ°ç¾¤é›†ã€‚",deleteClusterError:"æ— æ³•åˆ é™¤ç¾¤é›†ã€‚",editClusterError:"æ— æ³•ç¼–è¾‘ç¾¤é›†ã€‚"},e.zh_CN=e.cn},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(){(0,s.default)(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return(0,a.default)(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),o=Math.floor(e/4),n=Math.floor(e/8),s=Math.floor(e/16),r=Math.floor(t/2),a=Math.floor(t/4),h=Math.floor(t/8),d=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,r,i],[r,0,a,o],[r,o,h,n],[5*h,o,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i2){e*=.5;for(var r=0;e>2&&r=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,o,n,s)}else t.drawImage(this.image,i,o,n,s)}}]),t}();e.default=h},function(t,e,i){ +function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=function(){function t(){(0,s.default)(this,t),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},h.extend(this.options,this.defaultOptions)}return(0,a.default)(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var i in t)if(t.hasOwnProperty(i)&&-1===e.indexOf(i)){var o=t[i];this.add(i,o)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.groups[t];if(void 0===i&&e)if(!1===this.options.useDefaultGroups&&this.groupsArray.length>0){var o=this.groupIndex%this.groupsArray.length;this.groupIndex++,i={},i.color=this.groups[this.groupsArray[o]],this.groups[t]=i}else{var n=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,i={},i.color=this.defaultGroups[n],this.groups[t]=i}return i}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e.default=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(47).default,c=function(){function t(e,i,o,n){var r=this;if((0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.layoutEngine=n,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(t,e){r.add(e.items)},update:function(t,e){r.update(e.items,e.data,e.oldData)},remove:function(t,e){r.remove(e.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=h.bridgeObject(this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.nodesListeners,function(e,i){t.body.data.nodes&&t.body.data.nodes.off(i,e)}),delete t.body.functions.createNode,delete t.nodesListeners.add,delete t.nodesListeners.update,delete t.nodesListeners.remove,delete t.nodesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){if(u.parseOptions(this.options,t),void 0!==t.shape)for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&this.body.nodes[e].updateShape();if(void 0!==t.font)for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&(this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh());if(void 0!==t.size)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&this.body.nodes[o].needsRefresh();void 0===t.hidden&&void 0===t.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if(t instanceof d||t instanceof l)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new d,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new d}if(i&&h.forEach(this.nodesListeners,function(t,e){i.off(e,t)}),this.body.nodes={},this.body.data.nodes){var o=this;h.forEach(this.nodesListeners,function(t,e){o.body.data.nodes.on(e,t)});var n=this.body.data.nodes.getIds();this.add(n,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:u)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h.forEach(this.body.nodes,function(i,o){var n=t.body.data.nodes.get(o);void 0!==n&&(!0===e&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(n))})}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Array.isArray(t)){for(var i=0;i0)for(var r=0;r0)for(var p=0;p0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.position/.test(t.substr(i.position,3))?i.mono||i.ital||!//.test(t.substr(i.position,3))?!i.mono&&//.test(t.substr(i.position,6))?(i.emitBlock(),i.mono=!0,i.modStack.unshift("mono"),i.position+=5):!i.mono&&"bold"===i.mod()&&/<\/b>/.test(t.substr(i.position,4))?(i.emitBlock(),i.bold=!1,i.modStack.shift(),i.position+=3):!i.mono&&"ital"===i.mod()&&/<\/i>/.test(t.substr(i.position,4))?(i.emitBlock(),i.ital=!1,i.modStack.shift(),i.position+=3):"mono"===i.mod()&&/<\/code>/.test(t.substr(i.position,7))?(i.emitBlock(),i.mono=!1,i.modStack.shift(),i.position+=6):i.add(o):(i.emitBlock(),i.ital=!0,i.modStack.unshift("ital"),i.position+=2):(i.emitBlock(),i.bold=!0,i.modStack.unshift("bold"),i.position+=2):/&/.test(o)?/</.test(t.substr(i.position,4))?(i.add("<"),i.position+=3):/&/.test(t.substr(i.position,5))?(i.add("&"),i.position+=4):i.add("&"):i.add(o),i.position++}return i.emitBlock(),e}},{key:"splitMarkdownBlocks",value:function(t){var e=[],i={bold:!1,ital:!1,mono:!1,beginable:!0,spacing:!1,position:0,buffer:"",modStack:[]};for(i.mod=function(){return 0===this.modStack.length?"normal":this.modStack[0]},i.modName=function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":i.bold&&i.ital?"boldital":i.bold?"bold":i.ital?"ital":void 0},i.emitBlock=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",i=0;i1&&void 0!==arguments[1]?arguments[1]:"normal",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t.replace(/^( +)/g,"$1\r"),t=t.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var o=t.split("\r");o.length>0;){var n=this.getLongestFit(o);if(0===n){var s=o[0],r=this.getLongestFitWord(s);this.lines.newLine(s.slice(0,r),e),o[0]=s.slice(r)}else{var a=n;" "===o[n-1]?n--:" "===o[a]&&a++;var h=o.slice(0,n).join("");n==o.length&&i?this.lines.append(h,e):this.lines.newLine(h,e),o=o.slice(a)}}}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(90),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=function(){function t(e){(0,a.default)(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return(0,d.default)(t,[{key:"_add",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var o=e;void 0!==e&&""!==e||(o=" ");var n=this.measureText(o,i),r=(0,s.default)({},n.values);r.text=e,r.width=n.width,r.mod=i,void 0!==e&&""!==e||(r.width=0),this.lines[t].blocks.push(r),this.lines[t].width+=r.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;tt&&(t=o.width),e+=o.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.width=o.width+this.margin.right+this.margin.left,this.height=o.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.roundRect(this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"updateBoundingBox",value:function(t,e,i,o,n){this._updateBoundingBox(t,e,i,o,n);var s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(m.default);e.default=v},function(t,e,i){i(195),t.exports=i(7).Object.getPrototypeOf},function(t,e,i){var o=i(41),n=i(85);i(87)("getPrototypeOf",function(){return function(t){return n(o(t))}})},function(t,e,i){t.exports={default:i(197),__esModule:!0}},function(t,e,i){i(198),t.exports=i(7).Object.setPrototypeOf},function(t,e,i){var o=i(17);o(o.S,"Object",{setPrototypeOf:i(199).set})},function(t,e,i){var o=i(32),n=i(27),s=function(t,e){if(n(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{o=i(80)(Function.call,i(89).f(Object.prototype,"__proto__").set,2),o(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,i){return s(t,i),e?t.__proto__=i:o(t,i),t}}({},!1):void 0),check:s}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=Math.max(o.width+this.margin.right+this.margin.left,o.height+this.margin.top+this.margin.bottom);this.options.size=n/2,this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),this.updateBoundingBox(e,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,i,o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,this.height=o,void(this.radius=.5*this.width)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),t.save(),t.clip(),this._drawImageAtPosition(t,s),t.restore(),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=o.width+this.margin.right+this.margin.left;this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.database(e-this.width/2,i-this.height/2,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"diamond",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"circle",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),this.options.size}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.height=2*o.height,this.width=o.width+o.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-.5*this.width,this.top=i-.5*this.height,this.initContextForDraw(t,s),t.ellipse_vis(this.left,this.top,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,e,i,o,n)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){if(this.resize(t,o,n),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=i-this.height/2,this._icon(t,e,i,o,n,s),void 0!==this.options.label){this.labelModule.draw(t,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,o)}this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){if(this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0){this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5)}}},{key:"_icon",value:function(t,e,i,o,n,s){var r=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+r+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,s),t.fillText(this.options.icon.code,e,i),this.disableShadow(t,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,void(this.height=o)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){if(this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,!0===this.options.shapeProperties.useBorderWithImage){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.beginPath(),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),t.fill(),this.performStroke(t,s),t.closePath()}this._drawImageAtPosition(t,s),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this._updateBoundingBox(t,e),void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)} +}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"square",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"hexagon",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"star",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.textSize=this.labelModule.getTextSize(t,e,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.enableShadow(t,s),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n),this.disableShadow(t,s),this.updateBoundingBox(e,i,t,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangle",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangleDown",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(74).default,c=function(){function t(e,i,o){var n=this;(0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.body.functions.createEdge=this.create.bind(this),this.edgesListeners={add:function(t,e){n.add(e.items)},update:function(t,e){n.update(e.items)},remove:function(t,e){n.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},selectionWidth:1.5,selfReferenceSize:20,shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},h.deepExtend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("_forceDisableDynamicCurves",function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===e&&(e="continuous");var o=!1;for(var n in t.body.edges)if(t.body.edges.hasOwnProperty(n)){var s=t.body.edges[n],r=t.body.data.edges._data[n];if(void 0!==r){var a=r.smooth;void 0!==a&&!0===a.enabled&&"dynamic"===a.type&&(void 0===e?s.setOptions({smooth:!1}):s.setOptions({smooth:{type:e}}),o=!0)}}!0===i&&!0===o&&t.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){t.reconnectEdges()}),this.body.emitter.on("refreshEdges",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.edgesListeners,function(e,i){t.body.data.edges&&t.body.data.edges.off(i,e)}),delete t.body.functions.createEdge,delete t.edgesListeners.add,delete t.edgesListeners.update,delete t.edgesListeners.remove,delete t.edgesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){u.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var i in this.body.edges)this.body.edges.hasOwnProperty(i)&&(e=this.body.edges[i].updateEdgeType()||e);if(void 0!==t.font)for(var o in this.body.edges)this.body.edges.hasOwnProperty(o)&&this.body.edges[o].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(t instanceof d||t instanceof l)this.body.data.edges=t;else if(Array.isArray(t))this.body.data.edges=new d,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new d}if(o&&h.forEach(this.edgesListeners,function(t,e){o.off(e,t)}),this.body.edges={},this.body.data.edges){h.forEach(this.edgesListeners,function(t,i){e.body.data.edges.on(i,t)});var n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;n1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var i=this.body.edges;h.forEach(t,function(t){var e=i[t];void 0!==e&&e.remove()}),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;h.forEach(this.body.edges,function(e,i){var o=t.body.data.edges._data[i];void 0!==o&&e.setOptions(o)})}},{key:"create",value:function(t){return new u(t,this.body,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,i=this.body.edges;for(t in e)e.hasOwnProperty(t)&&(e[t].edges=[]);for(t in i)if(i.hasOwnProperty(t)){var o=i[t];o.from=null,o.to=null,o.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var i=this.body.edges[t];void 0!==i.fromId&&e.push(i.fromId),void 0!==i.toId&&e.push(i.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];h.forEach(this.body.edges,function(i,o){var n=t.body.nodes[i.toId],s=t.body.nodes[i.fromId];void 0!==n&&!0===n.isCluster||void 0!==s&&!0===s.isCluster||void 0!==n&&void 0!==s||e.push(o)}),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.edges,e=this.body.data.edges,i=[];e.forEach(function(e,o){void 0===t[o]&&i.push(o)}),this.add(i,!0)}}]),t}();e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(3),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(4),p=o(c),f=i(5),m=o(f),v=i(216),g=o(v),y=function(t){function e(t,i,o){return(0,d.default)(this,e),(0,p.default)(this,(e.__proto__||(0,a.default)(e)).call(this,t,i,o))}return(0,m.default)(e,t),(0,u.default)(e,[{key:"_line",value:function(t,e,i){var o=i[0],n=i[1];this._bezierCurve(t,e,o,n)}},{key:"_getViaCoordinates",value:function(){var t=this.from.x-this.to.x,e=this.from.y-this.to.y,i=void 0,o=void 0,n=void 0,s=void 0,r=this.options.smooth.roundness;return(Math.abs(t)>Math.abs(e)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,r){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),h=(0,s.default)(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,r,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=(0,s.default)(e,2),o=i[0],n=i[1],r=t,a=[];return a[0]=Math.pow(1-r,3),a[1]=3*r*Math.pow(1-r,2),a[2]=3*Math.pow(r,2)*(1-r),a[3]=Math.pow(r,3),{x:a[0]*this.fromPoint.x+a[1]*o.x+a[2]*n.x+a[3]*this.toPoint.x,y:a[0]*this.fromPoint.y+a[1]*o.y+a[2]*n.y+a[3]*this.toPoint.y}}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r,a){var h=1e9,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=t,m=e,v=[0,0,0,0];for(l=1;l<10;l++)u=.1*l,v[0]=Math.pow(1-u,3),v[1]=3*u*Math.pow(1-u,2),v[2]=3*Math.pow(u,2)*(1-u),v[3]=Math.pow(u,3),c=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,c,p,n,s),h=d1&&void 0!==arguments[1]?arguments[1]:this.via,i=t,o=void 0,n=void 0;if(this.from===this.to){var r=this._getCircleData(this.from),a=(0,s.default)(r,3),h=a[0],d=a[1],l=a[2],u=2*Math.PI*(1-i);o=h+l*Math.sin(u),n=d+l-l*(1-Math.cos(u))}else o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToBezierEdge(t,e,i,o,n,s,this.via)}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t=void 0,e=void 0,i=this.options.smooth.roundness,o=this.options.smooth.type,n=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if("discrete"===o||"diagonalCross"===o){var r=void 0,a=void 0;r=a=n<=s?i*s:i*n,this.from.x>this.to.x&&(r=-r),this.from.y>=this.to.y&&(a=-a),t=this.from.x+r,e=this.from.y+a,"discrete"===o&&(n<=s?t=nthis.to.x&&(_=-_),this.from.y>=this.to.y&&(w=-w),t=this.from.x+_,e=this.from.y+w,n<=s?t=this.from.x<=this.to.x?this.to.xt?this.to.x:t:e=this.from.y>=this.to.y?this.to.y>e?this.to.y:e:this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,o,n,s,r)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t;return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(118),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,o=this.from;t.id===this.from.id&&(i=this.from,o=this.to);var n=Math.atan2(i.y-o.y,i.x-o.x),s=i.x-o.x,r=i.y-o.y,a=Math.sqrt(s*s+r*r),h=t.distanceToBorder(e,n),d=(a-h)/a,l={};return l.x=(1-d)*o.x+d*i.x,l.y=(1-d)*o.y+d*i.y,l}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToLine(t,e,i,o,n,s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(120).default,u=i(221).default,c=i(222).default,p=i(223).default,f=i(224).default,m=i(121).default,v=i(225).default,g=i(226).default,y=i(2),b=i(119).default,_=function(){function t(e){(0,a.default)(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0},y.extend(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return(0,d.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",function(){t.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){t.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){t.stopSimulation(),t.ready=!1}),this.body.emitter.on("disablePhysics",function(){t.physicsEnabled=!1,t.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()}),this.body.emitter.on("startSimulation",function(){!0===t.ready&&t.startSimulation()}),this.body.emitter.on("stopSimulation",function(){t.stopSimulation()}),this.body.emitter.on("destroy",function(){t.stopSimulation(!1),t.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){t.updatePhysicsData()})}},{key:"setOptions",value:function(t){void 0!==t&&(!1===t?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):!0===t?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,y.selectiveNotDeepExtend(["stabilization"],this.options,t),y.mergeOptions(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation()),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new v(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new g(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new u(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new c(this.body,this.physicsBody,t),this.edgesSolver=new f(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new l(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=this.simulationStep.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Date.now();this.physicsTick(),(Date.now()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,i=0,o=0;oo&&(t=t>0?o:-o),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],i=this.physicsBody.forces[t],o=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:o.x,vy:o.y},!1===e.options.fixed.x?(o.x=this.calculateComponentVelocity(o.x,i.x,e.options.mass),e.x+=o.x*this.timestep):(i.x=0,o.x=0),!1===e.options.fixed.y?(o.y=this.calculateComponentVelocity(o.y,i.y,e.options.mass),e.y+=o.y*this.timestep):(i.y=0,o.y=0),Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(t.hasOwnProperty(e)&&t[e].x&&t[e].y){var i=t[e].options.fixed;this.freezeCache[e]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;if("number"!=typeof e&&(e=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0===this.physicsBody.physicsNodeIndices.length)return void(this.ready=!0);this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,setTimeout(function(){return t._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(6),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(2),p=i(76).default,f=i(228).default,m=i(74).default,v=i(47).default,g=function(){function t(e){var i=this;(0,d.default)(this,t),this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},c.extend(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){i.clusteredNodes={},i.clusteredEdges={}})}return(0,u.default)(t,[{key:"clusterByHubsize",value:function(t,e){void 0===t?t=this._getHubSize():"object"===(void 0===t?"undefined":(0,a.default)(t))&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],o=0;o=t&&i.push(n.id)}for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{},i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var o={},n={};c.forEach(this.body.nodes,function(i,s){var r=p.cloneOptions(i);!0===e.joinCondition(r)&&(o[s]=i,c.forEach(i.edges,function(e){void 0===t.clusteredEdges[e.id]&&(n[e.id]=e)}))}),this._cluster(o,n,e,i)}},{key:"clusterByEdgeCount",value:function(t,e){var i=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var n=[],r={},a=void 0,h=void 0,d=void 0,l=0;l0&&(0,s.default)(m).length>0&&!0===b)if(c=function(){for(var t=0;t1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];e=this._checkOptions(e,o),void 0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);var n={},r={},a=o.id,h=p.cloneOptions(o);n[a]=o;for(var d=0;d-1&&(r[g.id]=g)}this._cluster(n,r,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,o){for(var n=void 0,r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=(0,s.default)(t),c=[],p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(0!=(0,s.default)(t).length&&(1!=(0,s.default)(t).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){for(var n in t)if(t.hasOwnProperty(n)&&void 0!==this.clusteredNodes[n])return;var r=c.deepExtend({},i.clusterNodeProperties);if(void 0!==i.processProperties){var a=[];for(var h in t)if(t.hasOwnProperty(h)){var d=p.cloneOptions(t[h]);a.push(d)}var l=[];for(var u in e)if(e.hasOwnProperty(u)&&"clusterEdge:"!==u.substr(0,12)){var m=p.cloneOptions(e[u],"edge");l.push(m)}if(!(r=i.processProperties(r,a,l)))throw new Error("The processProperties function does not return properties!")}void 0===r.id&&(r.id="cluster:"+c.randomUUID());var v=r.id;void 0===r.label&&(r.label="cluster");var g=void 0;void 0===r.x&&(g=this._getClusterPosition(t),r.x=g.x),void 0===r.y&&(void 0===g&&(g=this._getClusterPosition(t)),r.y=g.y),r.id=v;var y=this.body.functions.createNode(r,f);y.containedNodes=t,y.containedEdges=e,y.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[r.id]=y,this._clusterEdges(t,e,r,i.clusterEdgeProperties),r.id=void 0,!0===o&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(t){void 0===this.clusteredEdges[t.id]&&(this.clusteredEdges[t.id]={physics:t.options.physics})}},{key:"_restoreEdge",value:function(t){var e=this.clusteredEdges[t.id];void 0!==e&&(t.setOptions({physics:e.physics}),delete this.clusteredEdges[t.id])}},{key:"isCluster",value:function(t){return void 0!==this.body.nodes[t]?!0===this.body.nodes[t].isCluster:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(t){for(var e=(0,s.default)(t),i=t[e[0]].x,o=t[e[0]].x,n=t[e[0]].y,r=t[e[0]].y,a=void 0,h=1;ho?a.x:o,n=a.yr?a.y:r;return{x:.5*(i+o),y:.5*(n+r)}}},{key:"openCluster",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var o=this.body.nodes[t];if(void 0===o)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==o.isCluster||void 0===o.containedNodes||void 0===o.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var n=this.findNode(t),s=n.indexOf(t)-1;if(s>=0){var r=n[s];return this.body.nodes[r]._openChildCluster(t),delete this.body.nodes[t],void(!0===i&&this.body.emitter.emit("_dataChanged"))}var a=o.containedNodes,h=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var d={},l={x:o.x,y:o.y};for(var u in a)if(a.hasOwnProperty(u)){var p=this.body.nodes[u];d[u]={x:p.x,y:p.y}}var f=e.releaseFunction(l,d);for(var m in a)if(a.hasOwnProperty(m)){var v=this.body.nodes[m];void 0!==f[m]&&(v.x=void 0===f[m].x?o.x:f[m].x,v.y=void 0===f[m].y?o.y:f[m].y)}}else c.forEach(a,function(t){!1===t.options.fixed.x&&(t.x=o.x),!1===t.options.fixed.y&&(t.y=o.y)});for(var g in a)if(a.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[g]}for(var b=[],_=0;_0&&n<100;){var s=e.pop();if(void 0!==s){var r=this.body.edges[s];if(void 0!==r){n++;var a=r.clusteringEdgeReplacingIds;if(void 0===a)o.push(s);else for(var h=0;ho&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}},{key:"_createClusteredEdge",value:function(t,e,i,o,n){var s=p.cloneOptions(i,"edge");c.deepExtend(s,o),s.from=t,s.to=e,s.id="clusterEdge:"+c.randomUUID(),void 0!==n&&c.deepExtend(s,n);var r=this.body.functions.createEdge(s);return r.clusteringEdgeReplacingIds=[i.id],r.connect(),this.body.edges[r.id]=r,r}},{key:"_clusterEdges",value:function(t,e,i,o){if(e instanceof m){var n=e,s={};s[n.id]=n,e=s}if(t instanceof v){var r=t,a={};a[r.id]=r,t=a}if(void 0===i||null===i)throw new Error("_clusterEdges: parameter clusterNode required");void 0===o&&(o=i.clusterEdgeProperties),this._createClusterEdges(t,e,i,o);for(var h in e)if(e.hasOwnProperty(h)&&void 0!==this.body.edges[h]){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var l in t)t.hasOwnProperty(l)&&(this.clusteredNodes[l]={clusterId:i.id,node:this.body.nodes[l]},this.body.nodes[l].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var i=e.clusterId;if(void 0!==i)return this.body.nodes[i]}}}},{key:"_filter",value:function(t,e){var i=[];return c.forEach(t,function(t){e(t)&&i.push(t)}),i}},{key:"_updateState",value:function(){var t=this,e=void 0,i=[],o=[],n=function(e){c.forEach(t.body.nodes,function(t){!0===t.isCluster&&e(t)})};for(e in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(e)){var r=this.body.nodes[e];void 0===r&&i.push(e)}n(function(t){for(var e=0;e0}e.endPointsValid()&&n||o.push(i)}),n(function(e){c.forEach(o,function(i){delete e.containedEdges[i],c.forEach(e.edges,function(n,s){if(n.id===i)return void(e.edges[s]=null);n.clusteringEdgeReplacingIds=t._filter(n.clusteringEdgeReplacingIds,function(t){return-1===o.indexOf(t)})}),e.edges=t._filter(e.edges,function(t){return null!==t})})}),c.forEach(o,function(e){delete t.clusteredEdges[e]}),c.forEach(o,function(e){delete t.body.edges[e]});var h=(0,s.default)(this.body.edges);c.forEach(h,function(e){var i=t.body.edges[e],o=t._isClusteredNode(i.fromId)||t._isClusteredNode(i.toId);if(o!==t._isClusteredEdge(i.id)){if(!o)throw new Error("remove edge from clustering not implemented!");var n=t._getClusterNodeForNode(i.fromId);void 0!==n&&t._clusterEdges(t.body.nodes[i.fromId],i,n);var s=t._getClusterNodeForNode(i.toId);void 0!==s&&t._clusterEdges(t.body.nodes[i.toId],i,s)}});for(var d=!1,l=!0;l;)!function(){var e=[];n(function(t){var i=(0,s.default)(t.containedNodes).length,o=!0===t.options.allowSingleNodeCluster;(o&&i<1||!o&&i<2)&&e.push(t.id)});for(var i=0;i0,d=d||l}();d&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}();e.default=g},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(2),m=i(47).default,v=function(t){function e(t,i,o,n,r,h){(0,a.default)(this,e);var d=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o,n,r,h));return d.isCluster=!0,d.containedNodes={},d.containedEdges={},d}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_openChildCluster",value:function(t){var e=this,i=this.body.nodes[t];if(void 0===this.containedNodes[t])throw new Error("node with id: "+t+" not in current cluster");if(!i.isCluster)throw new Error("node with id: "+t+" is not a cluster");delete this.containedNodes[t],f.forEach(i.edges,function(t){delete e.containedEdges[t.id]}),f.forEach(i.containedNodes,function(t,i){e.containedNodes[i]=t}),i.containedNodes={},f.forEach(i.containedEdges,function(t,i){e.containedEdges[i]=t}),i.containedEdges={},f.forEach(i.edges,function(t){f.forEach(e.edges,function(i){var o=i.clusteringEdgeReplacingIds.indexOf(t.id);-1!==o&&(f.forEach(t.clusteringEdgeReplacingIds,function(t){i.clusteringEdgeReplacingIds.push(t),e.body.edges[t].edgeReplacedById=i.id}),i.clusteringEdgeReplacingIds.splice(o,1))})}),i.edges=[]}}]),e}(m);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(){var t;void 0!==window&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===t?function(t){t()}:t}Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),r=o(s),a=i(1),h=o(a),d=i(2),l=function(){function t(e,i){(0,r.default)(this,t),n(),this.body=e,this.canvas=i,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideNodesOnDrag:!1},d.extend(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return(0,h.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("dragStart",function(){t.dragging=!0}),this.body.emitter.on("dragEnd",function(){t.dragging=!1}),this.body.emitter.on("_resizeNodes",function(){t._resizeNodes()}),this.body.emitter.on("_redraw",function(){!1===t.renderingActive&&t._redraw()}),this.body.emitter.on("_blockRedraw",function(){t.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){t.allowRedraw=!0,t.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()}),this.body.emitter.on("_stopRendering",function(){t.renderRequests-=1,t.renderingActive=t.renderRequests>0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,!0===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];d.selectiveDeepExtend(e,this.options,t)}}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var i=void 0,o=window;return!0===this.requiresTimeout?i=o.setTimeout(t,e):o.requestAnimationFrame&&(i=o.requestAnimationFrame(t)),i}}},{key:"_startRendering",value:function(){!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(this._renderStep.bind(this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame(function(){t._redraw(!1)},0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var e=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&this._drawEdges(e),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),!0===t&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=this.canvas.DOMtoCanvas({x:-20,y:-20}),a=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),h={top:r.y,left:r.x,bottom:a.y,right:a.x},d=0;d0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new h(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:h.DIRECTION_ALL}),d.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new h(this.frame),d.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(s),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var r=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s), +this.frame.canvas.width!==r&&(this.frame.canvas.width=r,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return!0===i&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(76).default,l=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",this.fit.bind(this)),this.body.emitter.on("animationFinished",function(){o.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",this.releaseNode.bind(this))}return(0,a.default)(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),!0===e){var n=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];!0===r.predefinedPosition&&(n+=1)}if(n>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=d.getRange(this.body.nodes,t.nodes);o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;o*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=d.getRange(this.body.nodes,t.nodes);var a=1.1*Math.abs(i.maxX-i.minX),h=1.1*Math.abs(i.maxY-i.minY),l=this.canvas.frame.canvas.clientWidth/a,u=this.canvas.frame.canvas.clientHeight/h;o=l<=u?l:u}o>1?o=1:0===o&&(o=1);var c=d.findCenter(i),p={position:c,scale:o,animation:t.animation};this.moveTo(p)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0===t)return void(t={});void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(233).default,l=i(104).default,u=function(){function t(e,i,o){(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=o,this.navigationHandler=new d(e,i),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0},h.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];h.selectiveNotDeepExtend(e,this.options,t),h.mergeOptions(this.options,t,"keyboard"),t.tooltip&&(h.extend(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=h.parseColor(t.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-h.getAbsoluteLeft(this.canvas.frame.canvas),y:t.y-h.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(t){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.selectionHandler.getSelection(),n=!1;n=!0===i?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var s=this.selectionHandler.getSelection(),r=this._determineDifference(o,s),a=this._determineDifference(s,o);r.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,o),n=!0),r.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,o),n=!0),a.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",e,t),n=!0),a.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",e,t),n=!0),!0===n&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineDifference",value:function(t,e){var i=function(t,e){for(var i=[],o=0;o10&&(t=10);var o=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&!1===s){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],g=0;g0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new l(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var o=this.selectionHandler.getNodeAt(t);i=void 0!==o&&o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(10),d=i(37),l=i(35),u=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){o.activated=!0,o.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){o.activated=!1,o.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==o.keycharm&&o.keycharm.destroy()}),this.options={}}return(0,a.default)(t,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=l({container:window,preventDefault:!0}):this.keycharm=l({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(47).default,d=i(74).default,l=i(2),u=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},l.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){o.updateSelection()})}return(0,a.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){var e=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];l.selectiveDeepExtend(e,this.options,t)}}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&(e=!0,!0===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"_generateClickEvent",value:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this._initBaseEvent(e,i);if(!0===n)s.nodes=[],s.edges=[];else{var r=this.getSelection();s.nodes=r.nodes,s.edges=r.edges}void 0!==o&&(s.previousSelection=o),"click"==t&&(s.items=this.getClickedItems(i)),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof h&&!0===e&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),o=this._getAllNodesOverlappingWith(i);return o.length>0?!0===e?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),o=10,n=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,o=void 0;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties" +;if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],o=this.body.nodeIndices,n=this.body.nodes,s=o.length-1;s>=0;s--){var r=n[o[s]],a=r.getItemsOnPoint(e);i.push.apply(i,a)}for(var h=this.body.edgeIndices,d=this.body.edges,l=h.length-1;l>=0;l--){var u=d[h[l]],c=u.getItemsOnPoint(e);i.push.apply(i,c)}return i}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(6),a=o(r),h=i(8),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(76).default,v=i(236),g=v.HorizontalStrategy,y=v.VerticalStrategy,b=function(){function t(){(0,u.default)(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return(0,p.default)(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,i={};return function t(o){if(void 0!==i[o])return i[o];var n=e.levels[o];if(e.childrenReference[o]){var s=e.childrenReference[o];if(s.length>0)for(var r=0;r0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===o)return this.body.emitter.emit("refresh"),f.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===(0,a.default)(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var o=t.edges.smooth;void 0!==o.type&&"dynamic"!==o.type&&(i=o.type),this.optionsBackup.edges={smooth:void 0===o.enabled||o.enabled,type:void 0===o.type?"dynamic":o.type,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection},t.edges.smooth={enabled:void 0===o.enabled||o.enabled,type:i,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var e=t.length+50,i=0;i150){for(var s=t.length;t.length>150&&o<=10;){o+=1;var r=t.length;o%3==0?this.body.modules.clustering.clusterBridges(n):this.body.modules.clustering.clusterOutliers(n);if(r==t.length&&o%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}o>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var a=0;a0){var t=void 0,e=void 0,i=!1,o=!1;this.lastNodeOnLevel={},this.hierarchical=new b;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0!==t.options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):o=!0);if(!0===o&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===o){var n=this.options.hierarchical.sortMethod;"hubsize"===n?this._determineLevelsByHubsize():"directed"===n?this._determineLevelsDirected():"custom"===n&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&this.hierarchical.ensureLevel(s);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(e,i){var o=t.hierarchical.trees;for(var n in o)o.hasOwnProperty(n)&&o[n]===e&&t.direction.shift(n,i)},n=function(){for(var e=[],i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,o=1e9,n=1e9,r=1e9,a=-1e9;for(var h in e)if(e.hasOwnProperty(h)){var d=t.body.nodes[h],l=t.hierarchical.levels[d.id],u=t.direction.getPosition(d),c=t._getSpaceAroundNode(d,e),p=(0,s.default)(c,2),f=p[0],m=p[1];o=Math.min(f,o),n=Math.min(m,n),l<=i&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,o,n]},h=function(e,i){var o=t.hierarchical.getMaxLevel(e.id),n=t.hierarchical.getMaxLevel(i.id);return Math.min(o,n)},d=function(e,i,o){for(var n=t.hierarchical,s=0;s1)for(var h=0;h2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(i),d=t.direction.getPosition(o),l=Math.abs(d-s),u=t.options.hierarchical.nodeSpacing;if(l>u){var c={},p={};r(i,c),r(o,p);var f=h(i,o),m=a(c,f),v=a(p,f),g=m[1],y=v[0],b=v[2];if(Math.abs(g-y)>u){var _=g-y+u;_<-b+u&&(_=-b+u),_<0&&(t._shiftBlock(o.id,_),e=!0,!0===n&&t._centerParent(o))}}},u=function(o,n){for(var h=n.id,d=n.edges,l=t.hierarchical.levels[n.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;f0?p=Math.min(c,u-t.options.hierarchical.nodeSpacing):c<0&&(p=-Math.min(-c,l-t.options.hierarchical.nodeSpacing)),0!=p&&(t._shiftBlock(n.id,p),e=!0)}(_),_=b(o,d),function(i){var o=t.direction.getPosition(n),r=t._getSpaceAroundNode(n),a=(0,s.default)(r,2),h=a[0],d=a[1],l=i-o,u=o;l>0?u=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):l<0&&(u=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),u!==o&&(t.direction.setPosition(n,u),e=!0)}(_)};!0===this.options.hierarchical.blockShifting&&(function(i){var o=t.hierarchical.getLevels();o=o.reverse();for(var n=0;n0&&Math.abs(p)0&&(a=this.direction.getPosition(i[n-1])+r),this.direction.setPosition(s,a,e),this._validatePositionAndContinue(s,e,a),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i=this.hierarchical.childrenReference[t];if(void 0!==i){for(var o=[],n=0;ne&&void 0===this.positionedNodes[r.id]))return;var h=this.options.hierarchical.nodeSpacing,d=void 0;d=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(o[s-1])+h,this.direction.setPosition(r,d,a),this._validatePositionAndContinue(r,a,d)}var l=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[t],l,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var o=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-ot.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],o={},n=function i(n,s){if(void 0===o[n.id]){t.hierarchical.setTreeIndex(n,s),o[n.id]=!0;for(var r=void 0,a=t._getActiveEdges(n),h=0;h2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),m=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,d.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.x||void 0===e.x?0:t.x-e.x})}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),e}(f),v=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,d.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.y||void 0===e.y?0:t.y-e.y})}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),e}(f);e.HorizontalStrategy=v,e.VerticalStrategy=m},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(19),a=o(r),h=i(6),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(10),v=i(37),g=function(){function t(e,i,o){var n=this;(0,u.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=o,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},f.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){n._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}return(0,p.default)(t,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,f.deepExtend(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var t=this.selectionHandler._getSelectedNodeCount(),e=this.selectionHandler._getSelectedEdgeCount(),i=t+e,o=this.options.locales[this.options.locale],n=!1;!1!==this.options.addNode&&(this._createAddNodeButton(o),n=!0),!1!==this.options.addEdge&&(!0===n?this._createSeperator(1):n=!0,this._createAddEdgeButton(o)),1===t&&"function"==typeof this.options.editNode?(!0===n?this._createSeperator(2):n=!0,this._createEditNodeButton(o)):1===e&&0===t&&!1!==this.options.editEdge&&(!0===n?this._createSeperator(3):n=!0,this._createEditEdgeButton(o)),0!==i&&(t>0&&!1!==this.options.deleteNode?(!0===n&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&!1!==this.options.deleteEdge&&(!0===n&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var i=f.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"===(0,d.default)(this.options.editEdge)&&"function"==typeof this.options.editEdge.editWithoutDrag&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId)){var t=this.body.edges[this.edgeBeingEditedId];return void this._performEditEdge(t.from,t.to)}if(!0===this.guiEnabled){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var i=this.body.edges[this.edgeBeingEditedId],o=this._getNewTargetNode(i.from.x,i.from.y),n=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(o.id),this.temporaryIds.nodes.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(t){var e=i.edgeType.findBorderPositions(t);!1===o.selected&&(o.x=e.from.x,o.y=e.from.y),!1===n.selected&&(n.x=e.to.x,n.y=e.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i} +;if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=f.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+f.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},f.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(f.recursiveDOMDelete(this.editModeDiv),f.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){var e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=o,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+(0,a.default)((0,s.default)(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(!0===s.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=f.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+f.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(!0===s.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:f.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges._data[this.edgeBeingEditedId].label},n=this.options.editEdge;if("object"===(void 0===n?"undefined":(0,d.default)(n))&&(n=n.editWithoutDrag),"function"==typeof n){if(2!==n.length)throw new Error("The function for edit does not support two arguments (data, callback)");n(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e.default=g},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(239),u=o(l),c=function(){function t(e,i,o){(0,a.default)(this,t),this.body=e,this.springLength=i,this.springConstant=o,this.distanceSolver=new u.default}return(0,d.default)(t,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(o),this._createK_matrix(o),this._createE_matrix();for(var n=0,r=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),a=1e9,h=0,d=0,l=0,u=0,c=0;a>.01&&n1&&c<5;){c+=1,this._moveNode(h,d,l);var m=this._getEnergy(h),v=(0,s.default)(m,3);u=v[0],d=v[1],l=v[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;h0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("
                                                                                                                                  ").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}); \ No newline at end of file diff --git a/documentation/js/menu-wc.js b/documentation/js/menu-wc.js new file mode 100644 index 00000000..0851cf1b --- /dev/null +++ b/documentation/js/menu-wc.js @@ -0,0 +1,391 @@ +'use strict'; + +customElements.define('compodoc-menu', class extends HTMLElement { + constructor() { + super(); + this.isNormalMode = this.getAttribute('mode') === 'normal'; + } + + connectedCallback() { + this.render(this.isNormalMode); + } + + render(isNormalMode) { + let tp = lithtml.html(` + + `); + this.innerHTML = tp.strings; + } +}); \ No newline at end of file diff --git a/documentation/js/menu-wc_es5.js b/documentation/js/menu-wc_es5.js new file mode 100644 index 00000000..902225ea --- /dev/null +++ b/documentation/js/menu-wc_es5.js @@ -0,0 +1,60 @@ +'use strict'; + +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +customElements.define('compodoc-menu', /*#__PURE__*/function (_HTMLElement) { + _inherits(_class, _HTMLElement); + + var _super = _createSuper(_class); + + function _class() { + var _this; + + _classCallCheck(this, _class); + + _this = _super.call(this); + _this.isNormalMode = _this.getAttribute('mode') === 'normal'; + return _this; + } + + _createClass(_class, [{ + key: "connectedCallback", + value: function connectedCallback() { + this.render(this.isNormalMode); + } + }, { + key: "render", + value: function render(isNormalMode) { + var tp = lithtml.html("\n \n ")); + this.innerHTML = tp.strings; + } + }]); + + return _class; +}( /*#__PURE__*/_wrapNativeSuper(HTMLElement))); diff --git a/documentation/js/menu.js b/documentation/js/menu.js new file mode 100644 index 00000000..1d2b1def --- /dev/null +++ b/documentation/js/menu.js @@ -0,0 +1,319 @@ +document.addEventListener('DOMContentLoaded', function () { + var menuCollapsed = false, + mobileMenu = document.getElementById('mobile-menu'); + + var localContextInUrl = ''; + + if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') { + switch (COMPODOC_CURRENT_PAGE_CONTEXT) { + case 'additional-page': + localContextInUrl = 'additional-documentation'; + break; + case 'class': + localContextInUrl = 'classes'; + break; + case 'miscellaneous-functions': + case 'miscellaneous-variables': + case 'miscellaneous-typealiases': + case 'miscellaneous-enumerations': + localContextInUrl = 'miscellaneous'; + default: + break; + } + } + + function hasClass(el, cls) { + return el.className && new RegExp('(\\s|^)' + cls + '(\\s|$)').test(el.className); + } + + var processLink = function (link, url) { + if (url.charAt(0) !== '.') { + var prefix = ''; + switch (COMPODOC_CURRENT_PAGE_DEPTH) { + case 5: + prefix = '../../../../../'; + break; + case 4: + prefix = '../../../../'; + break; + case 3: + prefix = '../../../'; + break; + case 2: + prefix = '../../'; + break; + case 1: + prefix = '../'; + break; + case 0: + prefix = './'; + break; + } + link.setAttribute('href', prefix + url); + } + }; + + var processMenuLinks = function (links, dontAddClass) { + for (var i = 0; i < links.length; i++) { + var link = links[i]; + var linkHref = link.getAttribute('href'); + if (linkHref) { + var linkHrefFile = linkHref.substr(linkHref.lastIndexOf('/') + 1, linkHref.length); + if ( + linkHrefFile.toLowerCase() === COMPODOC_CURRENT_PAGE_URL.toLowerCase() && + link.innerHTML.indexOf('Getting started') == -1 && + !dontAddClass && + linkHref.toLowerCase().indexOf(localContextInUrl.toLowerCase()) !== -1 + ) { + link.classList.add('active'); + } + processLink(link, linkHref); + } + } + }; + var chapterLinks = document.querySelectorAll('[data-type="chapter-link"]'); + processMenuLinks(chapterLinks); + var entityLinks = document.querySelectorAll('[data-type="entity-link"]'); + processMenuLinks(entityLinks); + var indexLinks = document.querySelectorAll('[data-type="index-link"]'); + processMenuLinks(indexLinks, true); + var entityLogos = document.querySelectorAll('[data-type="compodoc-logo"]'); + var processLogos = function (entityLogo) { + for (var i = 0; i < entityLogos.length; i++) { + var entityLogo = entityLogos[i]; + if (entityLogo) { + var url = entityLogo.getAttribute('data-src'); + // Dark mode + logo + let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; + if (isDarkMode) { + url = 'images/compodoc-vectorise-inverted.png'; + } + if (url.charAt(0) !== '.') { + var prefix = ''; + switch (COMPODOC_CURRENT_PAGE_DEPTH) { + case 5: + prefix = '../../../../../'; + break; + case 4: + prefix = '../../../../'; + break; + case 3: + prefix = '../../../'; + break; + case 2: + prefix = '../../'; + break; + case 1: + prefix = '../'; + break; + case 0: + prefix = './'; + break; + } + entityLogo.src = prefix + url; + } + } + } + }; + processLogos(entityLogos); + + setTimeout(function () { + document.getElementById('btn-menu').addEventListener('click', function () { + if (menuCollapsed) { + mobileMenu.style.display = 'none'; + } else { + mobileMenu.style.display = 'block'; + document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden'; + } + menuCollapsed = !menuCollapsed; + }); + + /** + * Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here + */ + var Collapses = document.querySelectorAll('[data-toggle="collapse"]'); + for (var o = 0, cll = Collapses.length; o < cll; o++) { + var collapse = Collapses[o], + options = {}; + options.duration = collapse.getAttribute('data-duration'); + var c = new Collapse(collapse, options); + } + + // collapse menu + var classnameMenuToggler = document.getElementsByClassName('menu-toggler'), + faAngleUpClass = 'ion-ios-arrow-up', + faAngleDownClass = 'ion-ios-arrow-down', + toggleItemMenu = function (e) { + var element = $(e.target), + parent = element[0].parentNode, + parentLink, + elementIconChild; + if (parent) { + if (!$(parent).hasClass('linked')) { + e.preventDefault(); + } else { + parentLink = parent.parentNode; + if (parentLink && element.hasClass('link-name')) { + $(parentLink).trigger('click'); + } + } + elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0]; + if (!elementIconChild) { + elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0]; + } + if (elementIconChild) { + elementIconChild = $(elementIconChild); + if (elementIconChild.hasClass(faAngleUpClass)) { + elementIconChild.addClass(faAngleDownClass); + elementIconChild.removeClass(faAngleUpClass); + } else { + elementIconChild.addClass(faAngleUpClass); + elementIconChild.removeClass(faAngleDownClass); + } + } + } + }; + + for (var i = 0; i < classnameMenuToggler.length; i++) { + classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false); + } + + // Scroll to active link + var menus = document.querySelectorAll('.menu'), + i = 0, + len = menus.length, + activeMenu, + activeMenuClass, + activeLink; + + for (i; i < len; i++) { + if (getComputedStyle(menus[i]).display != 'none') { + activeMenu = menus[i]; + activeMenuClass = activeMenu.getAttribute('class').split(' ')[0]; + } + } + + if (activeMenu) { + activeLink = document.querySelector('.' + activeMenuClass + ' .active'); + if (activeLink) { + var linkType = activeLink.getAttribute('data-type'); + var linkContext = activeLink.getAttribute('data-context'); + if (linkType === 'entity-link') { + var parentLi = activeLink.parentNode, + parentUl, + parentChapterMenu; + if (parentLi) { + parentUl = parentLi.parentNode; + if (parentUl) { + parentChapterMenu = parentUl.parentNode; + if (parentChapterMenu) { + var toggler = parentChapterMenu.querySelector('.menu-toggler'), + elementIconChild = + toggler.getElementsByClassName(faAngleUpClass)[0]; + if (toggler && !elementIconChild) { + toggler.click(); + } + } + } + } + if (linkContext && linkContext === 'sub-entity') { + // Toggle also the master parent menu + var linkContextId = activeLink.getAttribute('data-context-id'); + var toggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' a .menu-toggler' + ); + if (toggler) { + toggler.click(); + } + if (linkContextId === 'additional') { + var mainToggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' div.menu-toggler' + ); + if (mainToggler) { + mainToggler.click(); + } + } + } + } else if (linkType === 'chapter-link') { + var linkContextId = activeLink.getAttribute('data-context-id'); + var toggler = activeLink.querySelector('.menu-toggler'); + if (toggler) { + toggler.click(); + } + if (linkContextId === 'additional') { + var mainToggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' div.menu-toggler' + ); + if (mainToggler) { + mainToggler.click(); + } + } + } + setTimeout(function () { + activeMenu.scrollTop = activeLink.offsetTop; + if ( + activeLink.innerHTML.toLowerCase().indexOf('readme') != -1 || + activeLink.innerHTML.toLowerCase().indexOf('overview') != -1 + ) { + activeMenu.scrollTop = 0; + } + }, 300); + } + } + // Dark mode toggle button + var useDark = window.matchMedia('(prefers-color-scheme: dark)'); + var darkModeState = useDark.matches; + var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input'); + var $darkModeToggles = document.querySelectorAll('.dark-mode-switch'); + var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state'); + + function checkToggle(check) { + for (var i = 0; i < $darkModeToggleSwitchers.length; i++) { + $darkModeToggleSwitchers[i].checked = check; + } + } + + function toggleDarkMode(state) { + if (window.localStorage) { + localStorage.setItem('compodoc_darkmode-state', state); + } + + checkToggle(state); + + const hasClass = document.body.classList.contains('dark'); + + if (state) { + for (var i = 0; i < $darkModeToggles.length; i++) { + $darkModeToggles[i].classList.add('dark'); + } + if (!hasClass) { + document.body.classList.add('dark'); + } + } else { + for (var i = 0; i < $darkModeToggles.length; i++) { + $darkModeToggles[i].classList.remove('dark'); + } + if (hasClass) { + document.body.classList.remove('dark'); + } + } + } + + useDark.addEventListener('change', function (evt) { + toggleDarkMode(evt.matches); + }); + if (darkModeStateLocal) { + darkModeState = darkModeStateLocal === 'true'; + } + toggleDarkMode(darkModeState); + + if ($darkModeToggles.length > 0) { + for (var i = 0; i < $darkModeToggleSwitchers.length; i++) { + $darkModeToggleSwitchers[i].addEventListener('change', function (event) { + darkModeState = !darkModeState; + toggleDarkMode(darkModeState); + }); + } + } + }, 0); +}); diff --git a/documentation/js/routes.js b/documentation/js/routes.js new file mode 100644 index 00000000..bfd875cc --- /dev/null +++ b/documentation/js/routes.js @@ -0,0 +1,280 @@ +document.addEventListener('DOMContentLoaded', function() { + + function htmlEntities(str) { + return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + } + + function foundLazyModuleWithPath(path) { + //path is like app/customers/customers.module#CustomersModule + var split = path.split('#'), + lazyModulePath = split[0], + lazyModuleName = split[1]; + return lazyModuleName; + } + + function getBB(selection) { + selection.each(function(d){d.bbox = this.getBBox();}) + } + + var test_cases, + test_case, + test_case_num, + engine; + + var tree = ROUTES_INDEX; + + function cleanStringChildren(obj) { + for (var property in obj) { + if (obj.hasOwnProperty(property)) { + if (property === 'children' && typeof obj[property] === 'object') { + for (var i = obj[property].length - 1; i >= 0 ; i--) { + if (typeof obj[property][i] === 'string') { + obj[property].splice(i, 1); + } + } + } + if (typeof obj[property] === 'object') { + cleanStringChildren(obj[property]); + } + } + } + } + cleanStringChildren(tree); + + engine = d3.layout.tree().setNodeSizes(true); + + engine.spacing(function(a, b) { + return a.parent == b.parent ? + 0 : engine.rootXSize(); + }) + + engine.nodeSize(function(d) { + return [document.getElementById(d.id).getBBox()["height"] + 70, document.getElementById(d.id).getBBox()["width"] + 30]; + }); + + var nodes = d3.layout.hierarchy()(tree), + + svg = d3.select("#body-routes").append('svg'), + svg_g = svg.append("g"), + svg_p = svg.append("g"), + last_id = 0, + + node = svg_g.selectAll(".node") + .data(nodes, function(d) { + return d.id || (d.id = ++last_id); + }) + .enter().append("g") + .attr("class", "node"); + + svg + .attr('id', 'main') + + svg_g + .attr("transform", "translate(20,0)") + .attr('id', 'main-group') + + svg_p + .attr("transform", "translate(20,0)") + .attr('id', 'paths') + + var infos_group = node.append("g") + .attr({ + "id": function(d) { + return d.id; + }, + dx: 0, + dy: 0, + }) + + //Node icon + infos_group.append("text") + .attr('font-family', 'Ionicons') + .attr("y", 5) + .attr("x", 0) + .attr('class', function(d) { + return d.children || d._children + ? "icon has-children" + : "icon"; + }) + .attr('font-size', function(d) { + return '15px' + }).text(function(d) { + return '\uf183' + }); + + //node infos + infos_group.append("svg:text") + .attr("x", function(d) { + return 0; + }) + .attr("y", function(d) { + return 10; + }) + .attr("dy", ".35em") + .attr('class', 'text') + .attr("text-anchor", function(d) { + return "start"; + }).html(function(d) { + // if kind === module name + module + // if kind === component component + path + var _name = ''; + if (d.kind === 'module') { + if (d.module) { + _name += '' + d.module + ''; + if (d.name) { + _name += '' + d.name + ''; + } + } else { + _name += '' + htmlEntities(d.name) + ''; + } + } else if (d.kind === 'component') { + _name += '' + d.path + '' + _name += '' + d.component + '' + if (d.outlet) { + _name += '<outlet> : ' + d.outlet + '' + } + } else { + _name += '/' + d.path + '' + if (d.component) { + _name += '' + d.component + '' + } + if (d.loadChildren) { + var moduleName = foundLazyModuleWithPath(d.loadChildren); + _name += '' + moduleName + '' + } + if (d.canActivate) { + _name += '✓ canActivate' + } + if (d.canDeactivate) { + _name += '×  canDeactivate' + } + if (d.canActivateChild) { + _name += '✓ canActivateChild' + } + if (d.canLoad) { + _name += '→ canLoad' + } + if (d.redirectTo) { + _name += '→ ' + d.redirectTo + '' + } + if (d.pathMatch) { + _name += '> ' + d.pathMatch + '' + } + if (d.outlet) { + _name += '<outlet> : ' + d.outlet + '' + } + } + return _name; + }) + .call(getBB); + + // + // Node lazy loaded ? + // + infos_group.append('svg:text') + .attr("y", function(d) { + return 45; + }) + .attr("x", function(d) { + return -18; + }) + .attr('font-family', 'Ionicons') + .attr('class', function(d) { + return "icon"; + }) + .attr('font-size', function(d) { + return '15px' + }).text(function(d) { + var _text = ''; + if (d.loadChildren) { + _text = '\uf4c1'; + } + if (d.guarded) { + _text = '\uf1b0'; + } + return _text; + }); + + //Node text background + infos_group.insert("rect","text") + .attr("width", function(d){ + return d.bbox.width; + }) + .attr("height", function(d){ + return d.bbox.height; + }) + .attr("y", function(d) { + return 15; + }) + .style("fill", "white") + .style("fill-opacity", 0.75); + + nodes = engine.nodes(tree); + + function node_extents(n) { + return [n.x - n.x_size / 2, n.y, + n.x + n.x_size / 2, n.y + n.y_size + ]; + } + var root_extents = node_extents(nodes[0]); + var xmin = root_extents[0], + ymin = root_extents[1], + xmax = root_extents[2], + ymax = root_extents[3], + area_sum = (xmax - xmin) * (ymax - ymin), + x_size_min = nodes[0].x_size, + y_size_min = nodes[0].y_size; + + nodes.slice(1).forEach(function(n) { + var ne = node_extents(n); + xmin = Math.min(xmin, ne[0]); + ymin = Math.min(ymin, ne[1]); + xmax = Math.max(xmax, ne[2]); + ymax = Math.max(ymax, ne[3]); + area_sum += (ne[2] - ne[0]) * (ne[3] - ne[1]); + x_size_min = Math.min(x_size_min, n.x_size); + y_size_min = Math.min(y_size_min, n.y_size); + }); + + var area_ave = area_sum / nodes.length; + var scale = 80 / Math.sqrt(area_ave); + + function svg_x(node_y) { + return (node_y - ymin); + } + + function svg_y(node_x) { + return (node_x - xmin) * scale; + } + + + var nodebox_right_margin = Math.min(x_size_min * scale, 10); + var nodebox_vertical_margin = Math.min(y_size_min * scale, 3); + + node.attr("transform", function(d) { + return "translate(" + svg_x(d.y) + "," + svg_y(d.x) + ")"; + }) + + var diagonal = d3.svg.diagonal() + .projection(function(d) { + return [svg_x(d.y), svg_y(d.x)]; + }); + + var links = engine.links(nodes); + var links = svg_p.selectAll(".link") + .data(links) + .enter().append("path") + .attr("class", "link") + .attr("d", diagonal); + + var _svg = document.getElementById('main'), + main_g = _svg.childNodes[0] + + _svg.removeChild(main_g); + _svg.appendChild(main_g); + + svg.attr({ + width: document.getElementById('main-group').getBBox()['width'] + 30, + height: document.getElementById('main-group').getBBox()['height'] + 50, + }); +}); diff --git a/documentation/js/search/lunr.min.js b/documentation/js/search/lunr.min.js new file mode 100644 index 00000000..cdc94cd3 --- /dev/null +++ b/documentation/js/search/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.9",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/documentation/js/search/search-lunr.js b/documentation/js/search/search-lunr.js new file mode 100644 index 00000000..35e7dde1 --- /dev/null +++ b/documentation/js/search/search-lunr.js @@ -0,0 +1,67 @@ +(function(compodoc) { + + function LunrSearchEngine() { + this.index = undefined; + this.store = {}; + this.name = 'LunrSearchEngine'; + } + + LunrSearchEngine.prototype.init = function() { + var that = this, + d = new promise.Promise(); + + that.index = lunr.Index.load(COMPODOC_SEARCH_INDEX.index); + that.store = COMPODOC_SEARCH_INDEX.store; + d.done(); + + return d; + }; + + LunrSearchEngine.prototype.search = function(q, offset, length) { + var that = this, + results = [], + d = new promise.Promise(); + + if (this.index) { + results = $.map(this.index.search('*' + q + '*'), function(result) { + var doc = that.store[result.ref]; + + return { + title: doc.title, + url: doc.url, + body: doc.summary || doc.body + }; + }); + } + + d.done({ + query: q, + results: length === 0 ? results : results.slice(0, length), + count: results.length + }); + + return d; + }; + + compodoc.addEventListener(compodoc.EVENTS.READY, function(event) { + var engine = new LunrSearchEngine(), + initialized = false; + + function query(q, offset, length) { + if (!initialized) throw new Error('Search has not been initialized'); + return engine.search(q, offset, length); + } + + compodoc.search = { + query: query + }; + + engine.init() + .then(function() { + initialized = true; + compodoc.dispatchEvent({ + type: compodoc.EVENTS.SEARCH_READY + }); + }); + }); +})(compodoc); diff --git a/documentation/js/search/search.js b/documentation/js/search/search.js new file mode 100644 index 00000000..6451d3d7 --- /dev/null +++ b/documentation/js/search/search.js @@ -0,0 +1,268 @@ +(function(compodoc) { + var usePushState = (typeof history.pushState !== 'undefined'), + + // DOM Elements + $body = $('body'), + $searchResults, + $searchInput, + $searchList, + $searchTitle, + $searchResultsCount, + $searchQuery, + $mainContainer, + $xsMenu; + + // Throttle search + function throttle(fn, wait) { + var timeout; + + return function() { + var ctx = this, args = arguments; + if (!timeout) { + timeout = setTimeout(function() { + timeout = undefined; + fn.apply(ctx, args); + }, wait); + } + }; + } + + function displayResults(res) { + var noResults = res.count == 0; + var groups = {}; + $searchResults.toggleClass('no-results', noResults); + + // Clear old results + $searchList.empty(); + + // Display title for research + $searchResultsCount.text(res.count); + $searchQuery.text(res.query); + + // Group result by context + res.results.forEach(function(res) { + var context = res.title.split(' - ')[0]; + if (typeof groups[context] === 'undefined') { + groups[context] = { + results: [res] + } + } else { + groups[context].results.push(res) + } + }); + + var sortedGroups = Object.keys(groups).sort(); + + for (var i = 0; i < sortedGroups.length; i++) { + var property = sortedGroups[i]; + + var $li = $('
                                                                                                                                • ', { + 'class': 'search-results-group' + }); + var finalPropertyLabel = ''; + var propertyLabels = property.split('-'); + + if (propertyLabels.length === 2 && propertyLabels[0] !== 'miscellaneous' && propertyLabels[0] !== 'additional') { + finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' - ' + propertyLabels[1].charAt(0).toUpperCase() + propertyLabels[1].substring(1) + ' (' + groups[property].results.length + ')'; + } else if (propertyLabels[0] === 'additional') { + finalPropertyLabel = 'Additional pages' + ' (' + groups[property].results.length + ')' + } else { + finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' (' + groups[property].results.length + ')' + } + var $groupTitle = $('

                                                                                                                                  ', { + 'text': finalPropertyLabel + }); + $groupTitle.appendTo($li); + + var $ulResults = $('

                                                                                                                                • `, - onGallery: `` + onGallery: `` }; diff --git a/projects/ng-gallery-demo/src/app/pages/gallery-example/gallery-example.component.html b/projects/ng-gallery-demo/src/app/pages/gallery-example/gallery-example.component.html index d317913e..b46afe12 100644 --- a/projects/ng-gallery-demo/src/app/pages/gallery-example/gallery-example.component.html +++ b/projects/ng-gallery-demo/src/app/pages/gallery-example/gallery-example.component.html @@ -62,7 +62,8 @@

                                                                                                                                  Example

                                                                                                                                  diff --git a/projects/ng-gallery-demo/src/app/pages/home/home.component.html b/projects/ng-gallery-demo/src/app/pages/home/home.component.html index 7f1a0c46..b3d1c838 100644 --- a/projects/ng-gallery-demo/src/app/pages/home/home.component.html +++ b/projects/ng-gallery-demo/src/app/pages/home/home.component.html @@ -14,9 +14,11 @@

                                                                                                                                  Simplifies the process of creating beautiful galleries.

                                                                                                                                  ngStyle.lg="height: 540px" itemAutosize="true" imageSize="contain" - autoPlay="true" thumbPosition="top" - thumbView="contain">
                                                                                                                                  + thumbs + loop + thumbCentralized + autoplay/>
                                                                                                                                  diff --git a/projects/ng-gallery-demo/src/app/pages/lab/lab.component.html b/projects/ng-gallery-demo/src/app/pages/lab/lab.component.html index cbf65a50..13e83924 100644 --- a/projects/ng-gallery-demo/src/app/pages/lab/lab.component.html +++ b/projects/ng-gallery-demo/src/app/pages/lab/lab.component.html @@ -7,35 +7,37 @@

                                                                                                                                  - - Sliding directions - - {{direction}} + + Orientation + + {{orientation}}
                                                                                                                                  @@ -113,9 +115,9 @@

                                                                                                                                  - Thumbnails View - - {{view}} + Thumbnails image size + + {{size}}
                                                                                                                                  @@ -123,7 +125,7 @@

                                                                                                                                  Thumbnails Position - + {{position}} @@ -141,7 +143,7 @@

                                                                                                                                  Dots Position - + {{position}} @@ -160,20 +162,20 @@

                                                                                                                                  Item autosize

                                                                                                                                  - Thumb autosize + Thumb autosize
                                                                                                                                  - Sliding duration - + Scroll duration +
                                                                                                                                  Player interval - +
                                                                                                                                  @@ -194,9 +196,11 @@

                                                                                                                                  - Nav Scroll Behavior - - {{behavior}} + Loading Attr + + + {{config.itemAutosize ? 'eager' : loadingAttr}} +
                                                                                                                                  @@ -210,39 +214,42 @@

                                                                                                                                  Show navigation

                                                                                                                                  - Show dots + Show dots
                                                                                                                                  Show counter
                                                                                                                                  - Show thumbnails + Show thumbnails +
                                                                                                                                  +
                                                                                                                                  + Centralize Thumbnails
                                                                                                                                  - Detach thumbnails + Detach thumbnails
                                                                                                                                  - Disable thumbnails' clicks + Disable thumbnails' clicks
                                                                                                                                  - Auto-play + Auto-play
                                                                                                                                  - Sliding Disabled + Disable Scroll
                                                                                                                                  - Thumb Sliding Disabled + Disable Thumb Scroll
                                                                                                                                  - Mouse Sliding Disabled + Disable Mouse Scroll
                                                                                                                                  - Thumb Mouse Sliding Disabled + Disable Thumb Mouse Scroll

                                                                                                                                  diff --git a/projects/ng-gallery-demo/src/app/pages/lab/lab.component.ts b/projects/ng-gallery-demo/src/app/pages/lab/lab.component.ts index 8b85d0d9..9855b088 100644 --- a/projects/ng-gallery-demo/src/app/pages/lab/lab.component.ts +++ b/projects/ng-gallery-demo/src/app/pages/lab/lab.component.ts @@ -6,9 +6,8 @@ import { GalleryItem, GalleryConfig, LoadingStrategy, - SlidingDirection, + Orientation, ThumbnailsPosition, - ThumbnailsView, GalleryComponent } from 'ng-gallery'; import { MatInputModule } from '@angular/material/input'; @@ -44,11 +43,10 @@ export class LabComponent implements OnInit { imageSizes = ['cover', 'contain']; thumbPositions = ['top', 'left', 'right', 'bottom']; loadingStrategies = ['default', 'lazy', 'preload']; - thumbModes = ['strict', 'free']; - thumbViews = ['default', 'contain']; - slidingDirections = ['vertical', 'horizontal']; + orientations = ['vertical', 'horizontal']; dotsCounterPositions = ['top', 'bottom']; scrollBehaviors = ['auto', 'smooth']; + loadingAttrs = ['eager', 'lazy']; player$ = new BehaviorSubject({ active: false }); itemClick$ = new BehaviorSubject({ active: false }); @@ -64,33 +62,34 @@ export class LabComponent implements OnInit { this.config = { nav: true, loop: true, - dots: true, - dotsPosition: 'bottom', + bullets: true, + bulletPosition: 'bottom', counterPosition: 'top', - resizeDebounceTime: 50, - slidingDuration: 468, - thumb: true, + resizeDebounceTime: 0, + scrollDuration: 468, + thumbs: true, counter: true, - autoPlay: false, - slidingDisabled: false, - thumbSlidingDisabled: false, - mouseSlidingDisabled: false, - thumbMouseSlidingDisabled: false, + autoplay: false, + disableScroll: false, + disableThumbScroll: false, + disableMouseScroll: false, + disableThumbMouseScroll: false, thumbWidth: 120, thumbHeight: 90, imageSize: 'contain', - disableThumb: false, - playerInterval: 3000, - thumbView: ThumbnailsView.Contain, + thumbImageSize: 'cover', + disableThumbs: false, + autoplayInterval: 3000, + thumbCentralized: false, thumbPosition: ThumbnailsPosition.Bottom, loadingStrategy: LoadingStrategy.Preload, - slidingDirection: SlidingDirection.Horizontal, + orientation: Orientation.Horizontal, autoHeight: false, itemAutosize: false, thumbAutosize: false, scrollBehavior: 'smooth', - navScrollBehavior: 'smooth', - debug: false + loadingAttr: 'lazy', + debug: true }; } diff --git a/projects/ng-gallery-demo/src/app/pages/lightbox-example/lightbox-example.component.ts b/projects/ng-gallery-demo/src/app/pages/lightbox-example/lightbox-example.component.ts index 37fd3f5f..b893b3be 100644 --- a/projects/ng-gallery-demo/src/app/pages/lightbox-example/lightbox-example.component.ts +++ b/projects/ng-gallery-demo/src/app/pages/lightbox-example/lightbox-example.component.ts @@ -61,7 +61,6 @@ export class LightboxExampleComponent implements OnInit, OnDestroy { ngOnDestroy() { this.gallery.ref('lightbox').destroy(); } - } const code = { @@ -74,7 +73,7 @@ galleryRef.load(items)`, `, ex: `import { Component, OnInit } from '@angular/core'; -import { NgFor, AsyncPipe } from '@angular/common'; +import { CommonModule } from '@angular/common'; import { GalleryModule, Gallery, GalleryItem } from 'ng-gallery'; import { LightboxModule } from 'ng-gallery/lightbox'; @@ -90,7 +89,7 @@ import { LightboxModule } from 'ng-gallery/lightbox'; \`, standalone: true, - imports: [LightboxModule, NgFor, AsyncPipe] + imports: [CommonModule, LightboxModule] }) export class AppComponent implements OnInit { diff --git a/projects/ng-gallery-demo/src/app/pages/templates-example/templates-example.component.html b/projects/ng-gallery-demo/src/app/pages/templates-example/templates-example.component.html index 6d92bcf1..d35fad36 100644 --- a/projects/ng-gallery-demo/src/app/pages/templates-example/templates-example.component.html +++ b/projects/ng-gallery-demo/src/app/pages/templates-example/templates-example.component.html @@ -13,21 +13,22 @@

                                                                                                                                  Custom Templates Example

                                                                                                                                  - - {{ item?.alt }} - + + {{ item?.alt }} + - - - + + + - - + + diff --git a/projects/ng-gallery-demo/src/main.server.ts b/projects/ng-gallery-demo/src/main.server.ts new file mode 100644 index 00000000..4b9d4d15 --- /dev/null +++ b/projects/ng-gallery-demo/src/main.server.ts @@ -0,0 +1,7 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { AppComponent } from './app/app.component'; +import { config } from './app/app.config.server'; + +const bootstrap = () => bootstrapApplication(AppComponent, config); + +export default bootstrap; diff --git a/projects/ng-gallery-demo/src/main.ts b/projects/ng-gallery-demo/src/main.ts index 5f51ca71..58f3ec93 100644 --- a/projects/ng-gallery-demo/src/main.ts +++ b/projects/ng-gallery-demo/src/main.ts @@ -1,49 +1,11 @@ -import { enableProdMode, importProvidersFrom } from '@angular/core'; -import { withInterceptorsFromDi, provideHttpClient } from '@angular/common/http'; -import { BrowserModule, bootstrapApplication } from '@angular/platform-browser'; -import { provideAnimations } from '@angular/platform-browser/animations'; -import { NgProgressRouterModule } from 'ngx-progressbar/router'; -import { NgProgressHttpModule } from 'ngx-progressbar/http'; -import { NgProgressModule } from 'ngx-progressbar'; -import { NG_SCROLLBAR_OPTIONS } from 'ngx-scrollbar'; -import { HIGHLIGHT_OPTIONS } from 'ngx-highlightjs'; -import { GALLERY_CONFIG, GalleryConfig } from 'ng-gallery'; - -import { AppRoutingModule } from './app/routing.module'; +import { enableProdMode } from '@angular/core'; +import { bootstrapApplication } from '@angular/platform-browser'; import { environment } from './environments/environment'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; if (environment.production) { enableProdMode(); } -bootstrapApplication(AppComponent, { - providers: [ - importProvidersFrom(BrowserModule, AppRoutingModule, NgProgressModule, NgProgressHttpModule, NgProgressRouterModule), - { - provide: GALLERY_CONFIG, - useValue: { - imageSize: 'cover' - } as GalleryConfig - }, - { - provide: HIGHLIGHT_OPTIONS, - useValue: { - coreLibraryLoader: () => import('highlight.js/lib/core'), - languages: { - typescript: () => import('highlight.js/lib/languages/typescript'), - css: () => import('highlight.js/lib/languages/css'), - xml: () => import('highlight.js/lib/languages/xml') - } - } - }, - { - provide: NG_SCROLLBAR_OPTIONS, - useValue: { - appearance: 'compact' - } - }, - provideAnimations(), - provideHttpClient(withInterceptorsFromDi()) - ] -}).catch(err => console.error(err)); +bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)); diff --git a/projects/ng-gallery-demo/tsconfig.server.json b/projects/ng-gallery-demo/tsconfig.server.json new file mode 100644 index 00000000..0f56b0af --- /dev/null +++ b/projects/ng-gallery-demo/tsconfig.server.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.app.json", + "compilerOptions": { + "outDir": "../../out-tsc/server", + "types": [ + "node" + ] + }, + "files": [ + "src/main.server.ts", + "server.ts" + ] +} diff --git a/projects/ng-gallery/.storybook/colors.mdx b/projects/ng-gallery/.storybook/colors.mdx new file mode 100644 index 00000000..65f13dbd --- /dev/null +++ b/projects/ng-gallery/.storybook/colors.mdx @@ -0,0 +1,33 @@ +{/* Colors.mdx */} + +import { Meta, ColorPalette, ColorItem } from '@storybook/blocks'; + + + + + + + + + diff --git a/projects/ng-gallery/.storybook/main.ts b/projects/ng-gallery/.storybook/main.ts new file mode 100644 index 00000000..69c0f813 --- /dev/null +++ b/projects/ng-gallery/.storybook/main.ts @@ -0,0 +1,18 @@ +import type { StorybookConfig } from "@storybook/angular"; + +const config: StorybookConfig = { + stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions" + ], + framework: { + name: "@storybook/angular", + options: {}, + }, + docs: { + autodocs: 'tag', + } +}; +export default config; diff --git a/projects/ng-gallery/.storybook/manager.js b/projects/ng-gallery/.storybook/manager.js new file mode 100644 index 00000000..baf80b25 --- /dev/null +++ b/projects/ng-gallery/.storybook/manager.js @@ -0,0 +1,6 @@ +import { addons } from '@storybook/manager-api'; +import theme from './theme'; + +addons.setConfig({ + theme: theme, +}); diff --git a/projects/ng-gallery/.storybook/preview.ts b/projects/ng-gallery/.storybook/preview.ts new file mode 100644 index 00000000..b7e6941d --- /dev/null +++ b/projects/ng-gallery/.storybook/preview.ts @@ -0,0 +1,20 @@ +import type { Preview } from "@storybook/angular"; +import { setCompodocJson } from "@storybook/addon-docs/angular"; + +import docJson from "../documentation.json"; +setCompodocJson(docJson); + +const preview: Preview = { + parameters: { + layout: 'fullscreen', + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/i, + } + } + }, +}; + +export default preview; diff --git a/projects/ng-gallery/.storybook/storybook-logo-dark.png b/projects/ng-gallery/.storybook/storybook-logo-dark.png new file mode 100644 index 00000000..e6540e5a Binary files /dev/null and b/projects/ng-gallery/.storybook/storybook-logo-dark.png differ diff --git a/projects/ng-gallery/.storybook/storybook-logo.png b/projects/ng-gallery/.storybook/storybook-logo.png new file mode 100644 index 00000000..3251a47d Binary files /dev/null and b/projects/ng-gallery/.storybook/storybook-logo.png differ diff --git a/projects/ng-gallery/.storybook/theme.js b/projects/ng-gallery/.storybook/theme.js new file mode 100644 index 00000000..ed5eec88 --- /dev/null +++ b/projects/ng-gallery/.storybook/theme.js @@ -0,0 +1,38 @@ +import { create } from '@storybook/theming/create'; + +export default create({ + base: 'dark', + // Typography + fontBase: '"Open Sans", sans-serif', + fontCode: 'monospace', + + brandTitle: 'Angular Gallery', + brandUrl: 'https://github.com/MurhafSousli/ngx-gallery', + brandImage: 'https://github.com/MurhafSousli/ngx-gallery/assets/8130692/f9a4a981-7a61-4f3d-9e00-06ec3b2efd1c', + brandTarget: '_self', + + // + colorPrimary: '#3a95ff', + colorSecondary: '#c2c6ce', + + // UI + // appBg: '#ffffff', + appContentBg: '#797979', + // appBorderColor: '#585C6D', + // appBorderRadius: 4, + + // Text colors + // textColor: '#10162F', + // textInverseColor: '#ffffff', + + // Toolbar default and active colors + // barTextColor: '#9E9E9E', + // barSelectedColor: '#585C6D', + // barBg: '#ffffff', + + // Form colors + // inputBg: '#ffffff', + // inputBorder: '#10162F', + // inputTextColor: '#10162F', + // inputBorderRadius: 2, +}); diff --git a/projects/ng-gallery/.storybook/tsconfig.json b/projects/ng-gallery/.storybook/tsconfig.json new file mode 100644 index 00000000..59daf738 --- /dev/null +++ b/projects/ng-gallery/.storybook/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.lib.json", + "compilerOptions": { + "types": ["node"], + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true + }, + "exclude": ["../src/test.ts", "../src/**/*.spec.ts"], + "include": ["../src/**/*", "./preview.ts"], + "files": ["./typings.d.ts"] +} diff --git a/projects/ng-gallery/.storybook/typings.d.ts b/projects/ng-gallery/.storybook/typings.d.ts new file mode 100644 index 00000000..f73d61b3 --- /dev/null +++ b/projects/ng-gallery/.storybook/typings.d.ts @@ -0,0 +1,4 @@ +declare module '*.md' { + const content: string; + export default content; +} diff --git a/projects/ng-gallery/README.md b/projects/ng-gallery/README.md index 59cac248..8a758cff 100644 --- a/projects/ng-gallery/README.md +++ b/projects/ng-gallery/README.md @@ -16,7 +16,13 @@ ___ -### The documentation is available at the [wiki page](https://github.com/MurhafSousli/ngx-gallery/wiki) 📚 +### Explore ngx-gallery Documentation + +- **For stable version (v11):** Visit our [wiki page](https://github.com/MurhafSousli/ngx-gallery/wiki) 📚. + +- **For the latest features (v12 Beta):** Check out our [storybook documentation](https://ngx-gallery-next.netlify.app/) + +We value your feedback and appreciate your support in testing this beta release! ___ diff --git a/projects/ng-gallery/documentation.json b/projects/ng-gallery/documentation.json new file mode 100644 index 00000000..d33aeaf3 --- /dev/null +++ b/projects/ng-gallery/documentation.json @@ -0,0 +1,14949 @@ +{ + "pipes": [], + "interfaces": [ + { + "name": "BezierEasingOptions", + "id": "interface-BezierEasingOptions-d5eb67d1ecb7e4a497bc40fcef2fe77cbb5c20ac2db236be86ebd414c779eaa102f061d231cd6f4b9e7eccafc0caec3de14b9637f33374309f5e2e1e76ff7548", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { _XAxis, _YAxis } from '@angular/cdk/scrolling';\r\n\r\nexport type SmoothScrollOptions = _XAxis & _YAxis & {\r\n behavior?: ScrollBehavior;\r\n}\r\n\r\nexport type SmoothScrollToOptions = _XAxis & _YAxis & {\r\n duration?: number;\r\n easing?: BezierEasingOptions;\r\n};\r\n\r\nexport interface SmoothScrollStep {\r\n scrollable: HTMLElement;\r\n startTime: number;\r\n startX: number;\r\n startY: number;\r\n x: number;\r\n y: number;\r\n duration: number;\r\n easing: (k: number) => number;\r\n currentX?: number;\r\n currentY?: number;\r\n}\r\n\r\nexport interface BezierEasingOptions {\r\n x1: number;\r\n y1: number;\r\n x2: number;\r\n y2: number;\r\n}\r\n", + "properties": [ + { + "name": "x1", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "x2", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "y1", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "y2", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 29 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "BulletsConfig", + "id": "interface-BulletsConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "bulletPosition", + "deprecated": false, + "deprecationMessage": "", + "type": "HorizontalPosition", + "optional": true, + "description": "", + "line": 44 + }, + { + "name": "bullets", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 41 + }, + { + "name": "bulletSize", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 43 + }, + { + "name": "disableBullets", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 42 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "CounterConfig", + "id": "interface-CounterConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "counter", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 48 + }, + { + "name": "counterPosition", + "deprecated": false, + "deprecationMessage": "", + "type": "HorizontalPosition", + "optional": true, + "description": "", + "line": 49 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "GalleryError", + "id": "interface-GalleryError-bccc61a9106233b10cea13d16a36070bc93ff42f88a7f805e345e1617af3cfd049400f126fa7362585b75441e4bc42e59899a526d56d21bee91bd073bec24a6c", + "file": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { GalleryAction, GalleryItemType } from './constants';\r\nimport { GalleryItemData } from '../components/templates/items.model';\r\n\r\nexport interface GalleryState {\r\n action?: GalleryAction;\r\n items?: GalleryItem[];\r\n behavior?: ScrollBehavior;\r\n currIndex?: number;\r\n hasNext?: boolean;\r\n hasPrev?: boolean;\r\n isPlaying?: boolean;\r\n}\r\n\r\nexport interface GalleryItem {\r\n data?: GalleryItemData;\r\n type?: GalleryItemType;\r\n}\r\n\r\nexport interface GalleryError {\r\n itemIndex: number;\r\n error: ErrorEvent;\r\n}\r\n", + "properties": [ + { + "name": "error", + "deprecated": false, + "deprecationMessage": "", + "type": "ErrorEvent", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "itemIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "GalleryItem", + "id": "interface-GalleryItem-bccc61a9106233b10cea13d16a36070bc93ff42f88a7f805e345e1617af3cfd049400f126fa7362585b75441e4bc42e59899a526d56d21bee91bd073bec24a6c", + "file": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { GalleryAction, GalleryItemType } from './constants';\r\nimport { GalleryItemData } from '../components/templates/items.model';\r\n\r\nexport interface GalleryState {\r\n action?: GalleryAction;\r\n items?: GalleryItem[];\r\n behavior?: ScrollBehavior;\r\n currIndex?: number;\r\n hasNext?: boolean;\r\n hasPrev?: boolean;\r\n isPlaying?: boolean;\r\n}\r\n\r\nexport interface GalleryItem {\r\n data?: GalleryItemData;\r\n type?: GalleryItemType;\r\n}\r\n\r\nexport interface GalleryError {\r\n itemIndex: number;\r\n error: ErrorEvent;\r\n}\r\n", + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemData", + "optional": true, + "description": "", + "line": 15 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": true, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "GalleryItemContext", + "id": "interface-GalleryItemContext-26e1a2a9cd6d60ca99303fc991011e44a915536a91e7fffb302ad20298ea1600095dac2bbb811adb2767e9c07b63f913c60fab3c81fff80a56796b65a8136cba", + "file": "projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { GalleryItemData } from '../components/templates/items.model';\r\nimport { GalleryItemType } from '../models/constants';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryItemDef]'\r\n})\r\nexport class GalleryItemDef {\r\n constructor(public templateRef: TemplateRef>) {\r\n }\r\n\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryItemDef,\r\n context: unknown\r\n ): context is GalleryItemContext {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface GalleryItemContext {\r\n /** Data for the row that this cell is located within. */\r\n $implicit?: T;\r\n\r\n /** Index of the item. */\r\n index?: number;\r\n\r\n /** The type of the item. */\r\n type?: GalleryItemType;\r\n\r\n /** True if this item is the active one. */\r\n active?: boolean;\r\n\r\n /** The number of total items. */\r\n count?: number;\r\n\r\n /** True if this item is first. */\r\n first?: boolean;\r\n\r\n /** True if this item is last. */\r\n last?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "$implicit", + "deprecated": false, + "deprecationMessage": "", + "type": "T", + "optional": true, + "description": "

                                                                                                                                  Data for the row that this cell is located within.

                                                                                                                                  \n", + "line": 25, + "rawdescription": "\nData for the row that this cell is located within." + }, + { + "name": "active", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "

                                                                                                                                  True if this item is the active one.

                                                                                                                                  \n", + "line": 34, + "rawdescription": "\nTrue if this item is the active one." + }, + { + "name": "count", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "

                                                                                                                                  The number of total items.

                                                                                                                                  \n", + "line": 37, + "rawdescription": "\nThe number of total items." + }, + { + "name": "first", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "

                                                                                                                                  True if this item is first.

                                                                                                                                  \n", + "line": 40, + "rawdescription": "\nTrue if this item is first." + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "

                                                                                                                                  Index of the item.

                                                                                                                                  \n", + "line": 28, + "rawdescription": "\nIndex of the item." + }, + { + "name": "last", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "

                                                                                                                                  True if this item is last.

                                                                                                                                  \n", + "line": 43, + "rawdescription": "\nTrue if this item is last." + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": true, + "description": "

                                                                                                                                  The type of the item.

                                                                                                                                  \n", + "line": 31, + "rawdescription": "\nThe type of the item." + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "GalleryState", + "id": "interface-GalleryState-bccc61a9106233b10cea13d16a36070bc93ff42f88a7f805e345e1617af3cfd049400f126fa7362585b75441e4bc42e59899a526d56d21bee91bd073bec24a6c", + "file": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { GalleryAction, GalleryItemType } from './constants';\r\nimport { GalleryItemData } from '../components/templates/items.model';\r\n\r\nexport interface GalleryState {\r\n action?: GalleryAction;\r\n items?: GalleryItem[];\r\n behavior?: ScrollBehavior;\r\n currIndex?: number;\r\n hasNext?: boolean;\r\n hasPrev?: boolean;\r\n isPlaying?: boolean;\r\n}\r\n\r\nexport interface GalleryItem {\r\n data?: GalleryItemData;\r\n type?: GalleryItemType;\r\n}\r\n\r\nexport interface GalleryError {\r\n itemIndex: number;\r\n error: ErrorEvent;\r\n}\r\n", + "properties": [ + { + "name": "action", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryAction", + "optional": true, + "description": "", + "line": 5 + }, + { + "name": "behavior", + "deprecated": false, + "deprecationMessage": "", + "type": "ScrollBehavior", + "optional": true, + "description": "", + "line": 7 + }, + { + "name": "currIndex", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 8 + }, + { + "name": "hasNext", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 9 + }, + { + "name": "hasPrev", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 10 + }, + { + "name": "isPlaying", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 11 + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItem[]", + "optional": true, + "description": "", + "line": 6 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "GalleryStateContext", + "id": "interface-GalleryStateContext-dc42fc50e33dfef0b09f6091971bf663a23f56cdc21288a1d462bdbc08634bd1b5b282ac3be9fcd63e7a7bf9dbb0caf078fe0cc1be3b3bee6b6030f88eb947cf", + "file": "projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryBoxDef]'\r\n})\r\nexport class GalleryBoxDef {\r\n\r\n constructor(public templateRef: TemplateRef) {\r\n }\r\n\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryBoxDef,\r\n context: unknown\r\n ): context is GalleryStateContext {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface GalleryStateContext {\r\n state?: GalleryState;\r\n config?: GalleryConfig;\r\n}\r\n", + "properties": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryState", + "optional": true, + "description": "", + "line": 26 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "Hit", + "id": "interface-Hit-9963e215a72986d46269a7e039737f6c6e55bc470c7ac76575d708b4130365d8f7c49083162f6e62f4513eb9bdb38e41e5a145ecf64a471b5a64bc6912546195", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PixabayModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit[];\r\n}\r\n\r\nexport interface Hit {\r\n id: number;\r\n pageURL: string;\r\n type: string;\r\n tags: string[];\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n views: number;\r\n downloads: number;\r\n favorites: number;\r\n likes: number;\r\n comments: number;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\nexport interface PixabayHDModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit2[];\r\n}\r\n\r\nexport interface Hit2 {\r\n id_hash: string;\r\n type: string;\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n largeImageURL: string;\r\n fullHDURL: string;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n imageURL: string;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\n", + "properties": [ + { + "name": "comments", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 25 + }, + { + "name": "downloads", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 22 + }, + { + "name": "favorites", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 23 + }, + { + "name": "id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "imageHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "imageSize", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "imageWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 18 + }, + { + "name": "likes", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 24 + }, + { + "name": "pageURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 9 + }, + { + "name": "previewHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "previewURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 12 + }, + { + "name": "previewWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "tags", + "deprecated": false, + "deprecationMessage": "", + "type": "string[]", + "optional": false, + "description": "", + "line": 11 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 10 + }, + { + "name": "user", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 27 + }, + { + "name": "user_id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 26 + }, + { + "name": "userImageURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 28 + }, + { + "name": "views", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 21 + }, + { + "name": "webformatHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "webformatURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "webformatWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 16 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "Hit2", + "id": "interface-Hit2-9963e215a72986d46269a7e039737f6c6e55bc470c7ac76575d708b4130365d8f7c49083162f6e62f4513eb9bdb38e41e5a145ecf64a471b5a64bc6912546195", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PixabayModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit[];\r\n}\r\n\r\nexport interface Hit {\r\n id: number;\r\n pageURL: string;\r\n type: string;\r\n tags: string[];\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n views: number;\r\n downloads: number;\r\n favorites: number;\r\n likes: number;\r\n comments: number;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\nexport interface PixabayHDModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit2[];\r\n}\r\n\r\nexport interface Hit2 {\r\n id_hash: string;\r\n type: string;\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n largeImageURL: string;\r\n fullHDURL: string;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n imageURL: string;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\n", + "properties": [ + { + "name": "fullHDURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 46 + }, + { + "name": "id_hash", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 37 + }, + { + "name": "imageHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 48 + }, + { + "name": "imageSize", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 49 + }, + { + "name": "imageURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 50 + }, + { + "name": "imageWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 47 + }, + { + "name": "largeImageURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 45 + }, + { + "name": "previewHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 41 + }, + { + "name": "previewURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 39 + }, + { + "name": "previewWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "user", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 52 + }, + { + "name": "user_id", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 51 + }, + { + "name": "userImageURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 53 + }, + { + "name": "webformatHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 44 + }, + { + "name": "webformatURL", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 42 + }, + { + "name": "webformatWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 43 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "ImageRegistry", + "id": "interface-ImageRegistry-1e866edcdaf413ff6b97d6c0d28de27c02d86d2541f0037c4ee618a37f046e7657dfe08ed0dfdffcc7fc468817c0fc1ddb92feaec87cc5069cccc55780a4f395", + "file": "projects/ng-gallery/src/lib/utils/img-manager.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { Injectable } from '@angular/core';\r\nimport { Observable, BehaviorSubject, filter, map, switchMap, EMPTY } from 'rxjs';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { ItemState } from '../components/templates/items.model';\r\n\r\ninterface ImageRegistry {\r\n state: Observable;\r\n target: HTMLImageElement;\r\n}\r\n\r\n@Injectable()\r\nexport class ImgManager {\r\n\r\n private readonly trigger$: BehaviorSubject = new BehaviorSubject(null);\r\n\r\n private readonly images: Map = new Map();\r\n\r\n getActiveItem(state$: Observable): Observable {\r\n return this.trigger$.pipe(\r\n switchMap(() => state$.pipe(\r\n switchMap((state: GalleryState) => {\r\n const img: ImageRegistry = this.images.get(state.currIndex);\r\n if (img) {\r\n return img.state.pipe(\r\n filter((state: ItemState) => state !== 'loading'),\r\n map(() => img.target)\r\n )\r\n }\r\n return EMPTY;\r\n })\r\n ))\r\n );\r\n }\r\n\r\n addItem(index: number, payload: ImageRegistry): void {\r\n this.images.set(index, payload);\r\n this.trigger$.next();\r\n }\r\n\r\n deleteItem(index: number): void {\r\n if (this.images.has(index)) {\r\n this.images.delete(index);\r\n this.trigger$.next();\r\n }\r\n }\r\n}\r\n", + "properties": [ + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 7 + }, + { + "name": "target", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLImageElement", + "optional": false, + "description": "", + "line": 8 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "NavConfig", + "id": "interface-NavConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "nav", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 36 + }, + { + "name": "navIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 37 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "PixabayHDModel", + "id": "interface-PixabayHDModel-9963e215a72986d46269a7e039737f6c6e55bc470c7ac76575d708b4130365d8f7c49083162f6e62f4513eb9bdb38e41e5a145ecf64a471b5a64bc6912546195", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PixabayModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit[];\r\n}\r\n\r\nexport interface Hit {\r\n id: number;\r\n pageURL: string;\r\n type: string;\r\n tags: string[];\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n views: number;\r\n downloads: number;\r\n favorites: number;\r\n likes: number;\r\n comments: number;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\nexport interface PixabayHDModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit2[];\r\n}\r\n\r\nexport interface Hit2 {\r\n id_hash: string;\r\n type: string;\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n largeImageURL: string;\r\n fullHDURL: string;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n imageURL: string;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\n", + "properties": [ + { + "name": "hits", + "deprecated": false, + "deprecationMessage": "", + "type": "Hit2[]", + "optional": false, + "description": "", + "line": 33 + }, + { + "name": "total", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "totalHits", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 32 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "PixabayModel", + "id": "interface-PixabayModel-9963e215a72986d46269a7e039737f6c6e55bc470c7ac76575d708b4130365d8f7c49083162f6e62f4513eb9bdb38e41e5a145ecf64a471b5a64bc6912546195", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface PixabayModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit[];\r\n}\r\n\r\nexport interface Hit {\r\n id: number;\r\n pageURL: string;\r\n type: string;\r\n tags: string[];\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n views: number;\r\n downloads: number;\r\n favorites: number;\r\n likes: number;\r\n comments: number;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\nexport interface PixabayHDModel {\r\n total: number;\r\n totalHits: number;\r\n hits: Hit2[];\r\n}\r\n\r\nexport interface Hit2 {\r\n id_hash: string;\r\n type: string;\r\n previewURL: string;\r\n previewWidth: number;\r\n previewHeight: number;\r\n webformatURL: string;\r\n webformatWidth: number;\r\n webformatHeight: number;\r\n largeImageURL: string;\r\n fullHDURL: string;\r\n imageWidth: number;\r\n imageHeight: number;\r\n imageSize: number;\r\n imageURL: string;\r\n user_id: number;\r\n user: string;\r\n userImageURL: string;\r\n}\r\n", + "properties": [ + { + "name": "hits", + "deprecated": false, + "deprecationMessage": "", + "type": "Hit[]", + "optional": false, + "description": "", + "line": 4 + }, + { + "name": "total", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 2 + }, + { + "name": "totalHits", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "PlayerConfig", + "id": "interface-PlayerConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "autoplay", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 53 + }, + { + "name": "autoplayInterval", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 54 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "SliderConfig", + "id": "interface-SliderConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "autoHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 62 + }, + { + "name": "boxTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": true, + "description": "", + "line": 71 + }, + { + "name": "disableMouseScroll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 60 + }, + { + "name": "disableScroll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 59 + }, + { + "name": "imageSize", + "deprecated": false, + "deprecationMessage": "", + "type": "ImageSize", + "optional": true, + "description": "", + "line": 68 + }, + { + "name": "imageTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": true, + "description": "", + "line": 73 + }, + { + "name": "itemAutosize", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 61 + }, + { + "name": "itemTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": true, + "description": "", + "line": 72 + }, + { + "name": "loadingAttr", + "deprecated": false, + "deprecationMessage": "", + "type": "LoadingAttr", + "optional": true, + "description": "", + "line": 70 + }, + { + "name": "loadingError", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 64 + }, + { + "name": "loadingIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 63 + }, + { + "name": "loadingStrategy", + "deprecated": false, + "deprecationMessage": "", + "type": "LoadingStrategy", + "optional": true, + "description": "", + "line": 69 + }, + { + "name": "loop", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 58 + }, + { + "name": "orientation", + "deprecated": false, + "deprecationMessage": "", + "type": "Orientation", + "optional": true, + "description": "", + "line": 67 + }, + { + "name": "scrollDuration", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 65 + }, + { + "name": "scrollEase", + "deprecated": false, + "deprecationMessage": "", + "type": "BezierEasingOptions", + "optional": true, + "description": "", + "line": 66 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "SliderState", + "id": "interface-SliderState-d22312f8a2fc91818c2306e7e2454008eef511221649d326d37fbdd06035ce34659a4234e92dad62f41e0298ff110bcd14a068c3054d8c83edefdd48daedc8f3", + "file": "projects/ng-gallery/src/lib/models/slider.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface SliderState {\r\n style: any;\r\n instant: boolean;\r\n}\r\n\r\nexport interface WorkerState {\r\n value: number;\r\n instant: boolean;\r\n}\r\n", + "properties": [ + { + "name": "instant", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 3 + }, + { + "name": "style", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "", + "line": 2 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "SmoothScrollStep", + "id": "interface-SmoothScrollStep-d5eb67d1ecb7e4a497bc40fcef2fe77cbb5c20ac2db236be86ebd414c779eaa102f061d231cd6f4b9e7eccafc0caec3de14b9637f33374309f5e2e1e76ff7548", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { _XAxis, _YAxis } from '@angular/cdk/scrolling';\r\n\r\nexport type SmoothScrollOptions = _XAxis & _YAxis & {\r\n behavior?: ScrollBehavior;\r\n}\r\n\r\nexport type SmoothScrollToOptions = _XAxis & _YAxis & {\r\n duration?: number;\r\n easing?: BezierEasingOptions;\r\n};\r\n\r\nexport interface SmoothScrollStep {\r\n scrollable: HTMLElement;\r\n startTime: number;\r\n startX: number;\r\n startY: number;\r\n x: number;\r\n y: number;\r\n duration: number;\r\n easing: (k: number) => number;\r\n currentX?: number;\r\n currentY?: number;\r\n}\r\n\r\nexport interface BezierEasingOptions {\r\n x1: number;\r\n y1: number;\r\n x2: number;\r\n y2: number;\r\n}\r\n", + "properties": [ + { + "name": "currentX", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "currentY", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "duration", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 19 + }, + { + "name": "easing", + "deprecated": false, + "deprecationMessage": "", + "type": "function", + "optional": false, + "description": "", + "line": 20 + }, + { + "name": "scrollable", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 13 + }, + { + "name": "startTime", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 14 + }, + { + "name": "startX", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 15 + }, + { + "name": "startY", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 16 + }, + { + "name": "x", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 17 + }, + { + "name": "y", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 18 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "ThumbConfig", + "id": "interface-ThumbConfig-6f9fdbcb39c24b0d29450ee3ef7d2371630be5c1f946773304ae58c3414ed67b990c7b6f65447311539eda65a179e0088235c46b7a44e65008d279b9ef79431e", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "import { InjectionToken, TemplateRef } from '@angular/core';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\n\r\nexport const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG');\r\n\r\ntype ImageSize = 'contain' | 'cover';\r\n\r\ntype Orientation = 'horizontal' | 'vertical';\r\n\r\ntype ThumbsPosition = 'top' | 'left' | 'right' | 'bottom';\r\n\r\ntype HorizontalPosition = 'top' | 'bottom';\r\n\r\ntype LoadingStrategy = 'preload' | 'lazy' | 'default';\r\n\r\ntype LoadingAttr = 'eager' | 'lazy';\r\n\r\ninterface ThumbConfig {\r\n thumbs?: boolean;\r\n thumbWidth?: number;\r\n thumbHeight?: number;\r\n thumbLoadingIcon?: string;\r\n thumbLoadingError?: string;\r\n disableThumbs?: boolean;\r\n detachThumbs?: boolean;\r\n thumbAutosize?: boolean;\r\n disableThumbScroll?: boolean;\r\n disableThumbMouseScroll?: boolean;\r\n thumbCentralized?: boolean;\r\n thumbPosition?: ThumbsPosition;\r\n thumbImageSize?: ImageSize;\r\n thumbTemplate?: TemplateRef;\r\n}\r\n\r\ninterface NavConfig {\r\n nav?: boolean;\r\n navIcon?: string;\r\n}\r\n\r\ninterface BulletsConfig {\r\n bullets?: boolean;\r\n disableBullets?: boolean;\r\n bulletSize?: number;\r\n bulletPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface CounterConfig {\r\n counter?: boolean;\r\n counterPosition?: HorizontalPosition;\r\n}\r\n\r\ninterface PlayerConfig {\r\n autoplay?: boolean;\r\n autoplayInterval?: number;\r\n}\r\n\r\ninterface SliderConfig {\r\n loop?: boolean;\r\n disableScroll?: boolean;\r\n disableMouseScroll?: boolean;\r\n itemAutosize?: boolean;\r\n autoHeight?: boolean;\r\n loadingIcon?: string;\r\n loadingError?: string;\r\n scrollDuration?: number;\r\n scrollEase?: BezierEasingOptions;\r\n orientation?: Orientation;\r\n imageSize?: ImageSize;\r\n loadingStrategy?: LoadingStrategy;\r\n loadingAttr?: LoadingAttr;\r\n boxTemplate?: TemplateRef;\r\n itemTemplate?: TemplateRef;\r\n imageTemplate?: TemplateRef;\r\n}\r\n\r\nexport type GalleryConfig = SliderConfig\r\n & ThumbConfig\r\n & NavConfig\r\n & BulletsConfig\r\n & CounterConfig\r\n & PlayerConfig\r\n & {\r\n scrollBehavior?: ScrollBehavior;\r\n resizeDebounceTime?: number;\r\n debug?: boolean;\r\n}\r\n", + "properties": [ + { + "name": "detachThumbs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 25 + }, + { + "name": "disableThumbMouseScroll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 28 + }, + { + "name": "disableThumbs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 24 + }, + { + "name": "disableThumbScroll", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 27 + }, + { + "name": "thumbAutosize", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 26 + }, + { + "name": "thumbCentralized", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 29 + }, + { + "name": "thumbHeight", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 21 + }, + { + "name": "thumbImageSize", + "deprecated": false, + "deprecationMessage": "", + "type": "ImageSize", + "optional": true, + "description": "", + "line": 31 + }, + { + "name": "thumbLoadingError", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 23 + }, + { + "name": "thumbLoadingIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": true, + "description": "", + "line": 22 + }, + { + "name": "thumbPosition", + "deprecated": false, + "deprecationMessage": "", + "type": "ThumbsPosition", + "optional": true, + "description": "", + "line": 30 + }, + { + "name": "thumbs", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": true, + "description": "", + "line": 19 + }, + { + "name": "thumbTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": true, + "description": "", + "line": 32 + }, + { + "name": "thumbWidth", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": true, + "description": "", + "line": 20 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + }, + { + "name": "WorkerState", + "id": "interface-WorkerState-d22312f8a2fc91818c2306e7e2454008eef511221649d326d37fbdd06035ce34659a4234e92dad62f41e0298ff110bcd14a068c3054d8c83edefdd48daedc8f3", + "file": "projects/ng-gallery/src/lib/models/slider.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "interface", + "sourceCode": "export interface SliderState {\r\n style: any;\r\n instant: boolean;\r\n}\r\n\r\nexport interface WorkerState {\r\n value: number;\r\n instant: boolean;\r\n}\r\n", + "properties": [ + { + "name": "instant", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 8 + }, + { + "name": "value", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 7 + } + ], + "indexSignatures": [], + "kind": 168, + "methods": [] + } + ], + "injectables": [ + { + "name": "Gallery", + "id": "injectable-Gallery-5a22f71c73e3d73bdb0d70d243c246ee81e6ad9ed4f2db3fed877932e3a5417d5f42141b52cd8a3e3759288dfdb43d47d607cc442701be17aa01e323801eae82", + "file": "projects/ng-gallery/src/lib/services/gallery.service.ts", + "properties": [ + { + "name": "_instances", + "defaultValue": "new Map()", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "

                                                                                                                                  Store gallery instances

                                                                                                                                  \n", + "line": 13, + "rawdescription": "\nStore gallery instances", + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "optional": false, + "description": "

                                                                                                                                  Global config

                                                                                                                                  \n", + "line": 16, + "rawdescription": "\nGlobal config" + } + ], + "methods": [ + { + "name": "debugConsole", + "args": [ + { + "name": "data", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "dotDotDotToken": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 56, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLogger for debugging\n", + "description": "

                                                                                                                                  Logger for debugging

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "any[]", + "deprecated": false, + "deprecationMessage": "", + "dotDotDotToken": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "deleteInstance", + "args": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "() => void", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nA destroyer function for each gallery instance\n", + "description": "

                                                                                                                                  A destroyer function for each gallery instance

                                                                                                                                  \n", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "destroyAll", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 42, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDestroy all gallery instances\n", + "description": "

                                                                                                                                  Destroy all gallery instances

                                                                                                                                  \n" + }, + { + "name": "ref", + "args": [ + { + "name": "id", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'root'" + }, + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "GalleryRef", + "typeParameters": [], + "line": 27, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGet or create gallery by ID\n", + "description": "

                                                                                                                                  Get or create gallery by ID

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": { + "pos": 676, + "end": 678, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "id" + }, + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "'root'", + "tagName": { + "pos": 670, + "end": 675, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "" + }, + { + "name": { + "pos": 692, + "end": 698, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "config" + }, + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "pos": 686, + "end": 691, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "" + } + ] + }, + { + "name": "resetAll", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 49, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset all gallery instances\n", + "description": "

                                                                                                                                  Reset all gallery instances

                                                                                                                                  \n" + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Inject, Injectable, Optional } from '@angular/core';\r\n\r\nimport { GalleryRef } from './gallery-ref';\r\nimport { GalleryConfig, GALLERY_CONFIG } from '../models/config.model';\r\nimport { defaultConfig } from '../utils/gallery.default';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class Gallery {\r\n\r\n /** Store gallery instances */\r\n private readonly _instances = new Map();\r\n\r\n /** Global config */\r\n config: GalleryConfig;\r\n\r\n constructor(@Optional() @Inject(GALLERY_CONFIG) config: GalleryConfig) {\r\n this.config = config ? { ...defaultConfig, ...config } : defaultConfig;\r\n }\r\n\r\n /**\r\n * Get or create gallery by ID\r\n * @param id\r\n * @param config\r\n */\r\n ref(id = 'root', config?: GalleryConfig): GalleryRef {\r\n if (this._instances.has(id)) {\r\n const galleryRef: GalleryRef = this._instances.get(id);\r\n if (config) {\r\n galleryRef.setConfig(config);\r\n }\r\n return galleryRef;\r\n } else {\r\n return this._instances.set(id, new GalleryRef({ ...this.config, ...config }, this.deleteInstance(id))).get(id);\r\n }\r\n }\r\n\r\n /**\r\n * Destroy all gallery instances\r\n */\r\n destroyAll() {\r\n this._instances.forEach((ref: GalleryRef) => ref.destroy());\r\n }\r\n\r\n /**\r\n * Reset all gallery instances\r\n */\r\n resetAll() {\r\n this._instances.forEach((ref: GalleryRef) => ref.reset());\r\n }\r\n\r\n /**\r\n * Logger for debugging\r\n */\r\n debugConsole(...data: any[]): void {\r\n if (this.config.debug) {\r\n console.log(...data)\r\n }\r\n }\r\n\r\n /**\r\n * A destroyer function for each gallery instance\r\n */\r\n private deleteInstance(id: string) {\r\n return () => {\r\n if (this._instances.has(id)) {\r\n this._instances.delete(id);\r\n }\r\n };\r\n }\r\n\r\n}\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "type": "injectable" + }, + { + "name": "ImgManager", + "id": "injectable-ImgManager-1e866edcdaf413ff6b97d6c0d28de27c02d86d2541f0037c4ee618a37f046e7657dfe08ed0dfdffcc7fc468817c0fc1ddb92feaec87cc5069cccc55780a4f395", + "file": "projects/ng-gallery/src/lib/utils/img-manager.ts", + "properties": [ + { + "name": "images", + "defaultValue": "new Map()", + "deprecated": false, + "deprecationMessage": "", + "type": "Map", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "trigger$", + "defaultValue": "new BehaviorSubject(null)", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "", + "line": 14, + "modifierKind": [ + 121, + 146 + ] + } + ], + "methods": [ + { + "name": "addItem", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "payload", + "type": "ImageRegistry", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "payload", + "type": "ImageRegistry", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "deleteItem", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getActiveItem", + "args": [ + { + "name": "state$", + "type": "Observable", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 18, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "state$", + "type": "Observable", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Injectable } from '@angular/core';\r\nimport { Observable, BehaviorSubject, filter, map, switchMap, EMPTY } from 'rxjs';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { ItemState } from '../components/templates/items.model';\r\n\r\ninterface ImageRegistry {\r\n state: Observable;\r\n target: HTMLImageElement;\r\n}\r\n\r\n@Injectable()\r\nexport class ImgManager {\r\n\r\n private readonly trigger$: BehaviorSubject = new BehaviorSubject(null);\r\n\r\n private readonly images: Map = new Map();\r\n\r\n getActiveItem(state$: Observable): Observable {\r\n return this.trigger$.pipe(\r\n switchMap(() => state$.pipe(\r\n switchMap((state: GalleryState) => {\r\n const img: ImageRegistry = this.images.get(state.currIndex);\r\n if (img) {\r\n return img.state.pipe(\r\n filter((state: ItemState) => state !== 'loading'),\r\n map(() => img.target)\r\n )\r\n }\r\n return EMPTY;\r\n })\r\n ))\r\n );\r\n }\r\n\r\n addItem(index: number, payload: ImageRegistry): void {\r\n this.images.set(index, payload);\r\n this.trigger$.next();\r\n }\r\n\r\n deleteItem(index: number): void {\r\n if (this.images.has(index)) {\r\n this.images.delete(index);\r\n this.trigger$.next();\r\n }\r\n }\r\n}\r\n", + "type": "injectable" + } + ], + "guards": [], + "interceptors": [], + "classes": [ + { + "name": "ActiveItemObserver", + "id": "class-ActiveItemObserver-9180d1fd42bb564fafb7790f26d07a9aac1ae69ddab5986cfb4e40bc313416ec17d3a9b8b461ae3d18fbb987444aeee96f71c95fa6d3f7147b560221fef2e46b", + "file": "projects/ng-gallery/src/lib/observers/active-item-observer.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { Observable, Subscriber, mergeMap, filter, map } from 'rxjs';\r\n\r\nexport class ActiveItemObserver {\r\n\r\n observe(root: HTMLElement, elements: HTMLElement[], rootMargin: string): Observable {\r\n return createIntersectionObserver(root, elements, rootMargin).pipe(\r\n map((entry: IntersectionObserverEntry) => {\r\n if (entry.isIntersecting) {\r\n entry.target.classList.add('g-item-highlight');\r\n return +entry.target.getAttribute('galleryIndex');\r\n } else {\r\n entry.target.classList.remove('g-item-highlight');\r\n return -1;\r\n }\r\n }),\r\n filter((index: number) => index !== -1)\r\n );\r\n }\r\n}\r\n\r\nfunction createIntersectionObserver(root: HTMLElement, elements: HTMLElement[], rootMargin: string): Observable {\r\n return new Observable((observer: Subscriber) => {\r\n const intersectionObserver: IntersectionObserver = new IntersectionObserver(\r\n (entries: IntersectionObserverEntry[]) => observer.next(entries),\r\n {\r\n root,\r\n rootMargin,\r\n threshold: 1\r\n }\r\n );\r\n elements.forEach((element: HTMLElement) => intersectionObserver.observe(element));\r\n return () => {\r\n elements.forEach((element: HTMLElement) => intersectionObserver.unobserve(element));\r\n intersectionObserver.disconnect();\r\n };\r\n }).pipe(\r\n mergeMap((entries: IntersectionObserverEntry[]) => entries)\r\n );\r\n}\r\n\r\n", + "properties": [], + "methods": [ + { + "name": "observe", + "args": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "elements", + "type": "HTMLElement[]", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 5, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "elements", + "type": "HTMLElement[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "GalleryRef", + "id": "class-GalleryRef-8ca5faf14b2f565232b54e8f226af10dede46ddefd46097283d024368d6c02b09ec52d9d6c770cc002b4d899679c38623f7948e4d6e8d322d95d70f337b837ba", + "file": "projects/ng-gallery/src/lib/services/gallery-ref.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { BehaviorSubject, Subject, Observable, filter } from 'rxjs';\r\nimport { defaultState } from '../utils/gallery.default';\r\nimport { GalleryError, GalleryItem, GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { GalleryAction } from '../models/constants';\r\nimport {\r\n IframeItem,\r\n IframeItemData,\r\n ImageItem,\r\n ImageItemData,\r\n VideoItem,\r\n VideoItemData,\r\n YoutubeItem,\r\n YoutubeItemData\r\n} from '../components/templates/items.model';\r\n\r\nconst filterActions = (actions: string[]) => {\r\n return filter((state: GalleryState) => actions.indexOf(state.action) > -1);\r\n};\r\n\r\nexport class GalleryRef {\r\n\r\n /** Stream that emits gallery state */\r\n private readonly _state: BehaviorSubject;\r\n\r\n /** Stream that emits gallery config */\r\n private readonly _config: BehaviorSubject;\r\n\r\n /** Stream that emits on item click */\r\n readonly itemClick: Subject = new Subject();\r\n\r\n /** Stream that emits on thumbnail click */\r\n readonly thumbClick: Subject = new Subject();\r\n\r\n /** Stream that emits on an error occurs */\r\n readonly error: Subject = new Subject();\r\n\r\n /** Gallery Events */\r\n\r\n /** Stream that emits gallery state */\r\n readonly state: Observable;\r\n\r\n /** Stream that emits gallery config */\r\n readonly config: Observable;\r\n\r\n get stateSnapshot(): GalleryState {\r\n return this._state.value;\r\n }\r\n\r\n get configSnapshot(): GalleryConfig {\r\n return this._config.value;\r\n }\r\n\r\n /** Stream that emits when gallery is initialized/reset */\r\n get initialized(): Observable {\r\n return this.state.pipe(filterActions([GalleryAction.INITIALIZED]));\r\n }\r\n\r\n /** Stream that emits when items is changed (items loaded, item added, item removed) */\r\n get itemsChanged(): Observable {\r\n return this.state.pipe(filterActions([GalleryAction.ITEMS_CHANGED]));\r\n }\r\n\r\n /** Stream that emits when current item is changed */\r\n get indexChanged(): Observable {\r\n return this.state.pipe(filterActions([GalleryAction.INDEX_CHANGED]));\r\n }\r\n\r\n /** Stream that emits when the player should start or stop */\r\n get playingChanged(): Observable {\r\n return this.state.pipe(filterActions([GalleryAction.PLAY, GalleryAction.STOP]));\r\n }\r\n\r\n constructor(config: GalleryConfig, private deleteInstance: () => void) {\r\n this._state = new BehaviorSubject(defaultState);\r\n this._config = new BehaviorSubject(config);\r\n this.state = this._state.asObservable();\r\n this.config = this._config.asObservable();\r\n }\r\n\r\n /**\r\n * Set gallery state\r\n */\r\n private setState(state: GalleryState): void {\r\n this._state.next({ ...this.stateSnapshot, ...state });\r\n }\r\n\r\n /**\r\n * Set gallery config\r\n */\r\n setConfig(config: GalleryConfig): void {\r\n this._config.next({ ...this._config.value, ...config });\r\n }\r\n\r\n /**\r\n * Add gallery item\r\n */\r\n add(item: GalleryItem, active?: boolean): void {\r\n const items: GalleryItem[] = [...this.stateSnapshot.items, item];\r\n this.setState({\r\n action: GalleryAction.ITEMS_CHANGED,\r\n items,\r\n hasNext: items.length > 1,\r\n currIndex: active ? items.length - 1 : this.stateSnapshot.currIndex\r\n });\r\n }\r\n\r\n /**\r\n * Add image item\r\n */\r\n addImage(data: ImageItemData, active?: boolean): void {\r\n this.add(new ImageItem(data), active);\r\n }\r\n\r\n /**\r\n * Add video item\r\n */\r\n addVideo(data: VideoItemData, active?: boolean): void {\r\n this.add(new VideoItem(data), active);\r\n }\r\n\r\n /**\r\n * Add iframe item\r\n */\r\n addIframe(data: IframeItemData, active?: boolean): void {\r\n this.add(new IframeItem(data), active);\r\n }\r\n\r\n /**\r\n * Add Youtube item\r\n */\r\n addYoutube(data: YoutubeItemData, active?: boolean): void {\r\n this.add(new YoutubeItem(data), active);\r\n }\r\n\r\n /**\r\n * Remove gallery item\r\n */\r\n remove(i: number): void {\r\n const state: GalleryState = this.stateSnapshot;\r\n const items: GalleryItem[] = [\r\n ...state.items.slice(0, i),\r\n ...state.items.slice(i + 1, state.items.length)\r\n ];\r\n this.setState({\r\n action: GalleryAction.ITEMS_CHANGED,\r\n currIndex: i < 1 ? state.currIndex : i - 1,\r\n items,\r\n hasNext: items.length > 1,\r\n hasPrev: i > 0\r\n });\r\n }\r\n\r\n /**\r\n * Load items and reset the state\r\n */\r\n load(items: GalleryItem[]): void {\r\n if (items) {\r\n this.setState({\r\n action: GalleryAction.ITEMS_CHANGED,\r\n items,\r\n hasNext: items.length > 1,\r\n hasPrev: false\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Set active item\r\n */\r\n set(i: number, behavior: ScrollBehavior = this._config.value.scrollBehavior): void {\r\n if (i < 0 || i >= this.stateSnapshot.items.length) {\r\n console.error(`[NgGallery]: Unable to set the active item because the given index (${ i }) is outside the items range!`);\r\n return;\r\n }\r\n if (i !== this.stateSnapshot.currIndex) {\r\n this.setState({\r\n behavior,\r\n action: GalleryAction.INDEX_CHANGED,\r\n currIndex: i,\r\n hasNext: i < this.stateSnapshot.items.length - 1,\r\n hasPrev: i > 0\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Next item\r\n */\r\n next(behavior: ScrollBehavior = this._config.value.scrollBehavior, loop: boolean = true): void {\r\n if (this.stateSnapshot.hasNext) {\r\n this.set(this.stateSnapshot.currIndex + 1, behavior);\r\n } else if (loop && this._config.value.loop) {\r\n this.set(0, behavior);\r\n }\r\n }\r\n\r\n /**\r\n * Prev item\r\n */\r\n prev(behavior: ScrollBehavior = this._config.value.scrollBehavior, loop: boolean = true): void {\r\n if (this.stateSnapshot.hasPrev) {\r\n this.set(this.stateSnapshot.currIndex - 1, behavior);\r\n } else if (loop && this._config.value.loop) {\r\n this.set(this.stateSnapshot.items.length - 1, behavior);\r\n }\r\n }\r\n\r\n /**\r\n * Start gallery player\r\n */\r\n play(interval?: number): void {\r\n if (interval) {\r\n this.setConfig({ autoplayInterval: interval });\r\n }\r\n this.setState({ action: GalleryAction.PLAY, behavior: 'auto', isPlaying: true });\r\n }\r\n\r\n /**\r\n * Stop gallery player\r\n */\r\n stop(): void {\r\n this.setState({ action: GalleryAction.STOP, isPlaying: false });\r\n }\r\n\r\n /**\r\n * Reset gallery to initial state\r\n */\r\n reset(): void {\r\n this.setState(defaultState);\r\n }\r\n\r\n /**\r\n * Destroy gallery\r\n */\r\n destroy(): void {\r\n this._state.complete();\r\n this._config.complete();\r\n this.itemClick.complete();\r\n this.thumbClick.complete();\r\n this.deleteInstance();\r\n }\r\n\r\n}\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "deleteInstance", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [] + } + ], + "line": 72, + "jsdoctags": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "deleteInstance", + "type": "function", + "deprecated": false, + "deprecationMessage": "", + "function": [], + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "_config", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits gallery config

                                                                                                                                  \n", + "line": 27, + "rawdescription": "\nStream that emits gallery config", + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "_state", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits gallery state

                                                                                                                                  \n", + "line": 24, + "rawdescription": "\nStream that emits gallery state", + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "

                                                                                                                                  Stream that emits gallery config

                                                                                                                                  \n", + "line": 44, + "rawdescription": "\nStream that emits gallery config", + "modifierKind": [ + 146 + ] + }, + { + "name": "error", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits on an error occurs

                                                                                                                                  \n", + "line": 36, + "rawdescription": "\nStream that emits on an error occurs", + "modifierKind": [ + 146 + ] + }, + { + "name": "itemClick", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits on item click

                                                                                                                                  \n", + "line": 30, + "rawdescription": "\nStream that emits on item click", + "modifierKind": [ + 146 + ] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "

                                                                                                                                  Stream that emits gallery state

                                                                                                                                  \n", + "line": 41, + "rawdescription": "\nStream that emits gallery state", + "modifierKind": [ + 146 + ] + }, + { + "name": "thumbClick", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits on thumbnail click

                                                                                                                                  \n", + "line": 33, + "rawdescription": "\nStream that emits on thumbnail click", + "modifierKind": [ + 146 + ] + } + ], + "methods": [ + { + "name": "add", + "args": [ + { + "name": "item", + "type": "GalleryItem", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 98, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd gallery item\n", + "description": "

                                                                                                                                  Add gallery item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "item", + "type": "GalleryItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addIframe", + "args": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 125, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd iframe item\n", + "description": "

                                                                                                                                  Add iframe item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addImage", + "args": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 111, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd image item\n", + "description": "

                                                                                                                                  Add image item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addVideo", + "args": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 118, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd video item\n", + "description": "

                                                                                                                                  Add video item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addYoutube", + "args": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd Youtube item\n", + "description": "

                                                                                                                                  Add Youtube item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "destroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 236, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDestroy gallery\n", + "description": "

                                                                                                                                  Destroy gallery

                                                                                                                                  \n" + }, + { + "name": "load", + "args": [ + { + "name": "items", + "type": "GalleryItem[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 157, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoad items and reset the state\n", + "description": "

                                                                                                                                  Load items and reset the state

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "items", + "type": "GalleryItem[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "next", + "args": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior" + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 190, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nNext item\n", + "description": "

                                                                                                                                  Next item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior", + "tagName": { + "text": "param" + } + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "play", + "args": [ + { + "name": "interval", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 212, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStart gallery player\n", + "description": "

                                                                                                                                  Start gallery player

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "interval", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "prev", + "args": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior" + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 201, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nPrev item\n", + "description": "

                                                                                                                                  Prev item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior", + "tagName": { + "text": "param" + } + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "true", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "remove", + "args": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 139, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRemove gallery item\n", + "description": "

                                                                                                                                  Remove gallery item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 229, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset gallery to initial state\n", + "description": "

                                                                                                                                  Reset gallery to initial state

                                                                                                                                  \n" + }, + { + "name": "set", + "args": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 171, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet active item\n", + "description": "

                                                                                                                                  Set active item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "this._config.value.scrollBehavior", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setConfig", + "args": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 91, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet gallery config\n", + "description": "

                                                                                                                                  Set gallery config

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setState", + "args": [ + { + "name": "state", + "type": "GalleryState", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 84, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet gallery state\n", + "description": "

                                                                                                                                  Set gallery state

                                                                                                                                  \n", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "state", + "type": "GalleryState", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "stop", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 222, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStop gallery player\n", + "description": "

                                                                                                                                  Stop gallery player

                                                                                                                                  \n" + } + ], + "indexSignatures": [], + "accessors": { + "stateSnapshot": { + "name": "stateSnapshot", + "getSignature": { + "name": "stateSnapshot", + "type": "", + "returnType": "GalleryState", + "line": 46 + } + }, + "configSnapshot": { + "name": "configSnapshot", + "getSignature": { + "name": "configSnapshot", + "type": "", + "returnType": "GalleryConfig", + "line": 50 + } + }, + "initialized": { + "name": "initialized", + "getSignature": { + "name": "initialized", + "type": "", + "returnType": "Observable", + "line": 55, + "rawdescription": "\nStream that emits when gallery is initialized/reset", + "description": "

                                                                                                                                  Stream that emits when gallery is initialized/reset

                                                                                                                                  \n" + } + }, + "itemsChanged": { + "name": "itemsChanged", + "getSignature": { + "name": "itemsChanged", + "type": "", + "returnType": "Observable", + "line": 60, + "rawdescription": "\nStream that emits when items is changed (items loaded, item added, item removed)", + "description": "

                                                                                                                                  Stream that emits when items is changed (items loaded, item added, item removed)

                                                                                                                                  \n" + } + }, + "indexChanged": { + "name": "indexChanged", + "getSignature": { + "name": "indexChanged", + "type": "", + "returnType": "Observable", + "line": 65, + "rawdescription": "\nStream that emits when current item is changed", + "description": "

                                                                                                                                  Stream that emits when current item is changed

                                                                                                                                  \n" + } + }, + "playingChanged": { + "name": "playingChanged", + "getSignature": { + "name": "playingChanged", + "type": "", + "returnType": "Observable", + "line": 70, + "rawdescription": "\nStream that emits when the player should start or stop", + "description": "

                                                                                                                                  Stream that emits when the player should start or stop

                                                                                                                                  \n" + } + } + }, + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "HorizontalAdapter", + "id": "class-HorizontalAdapter-eb710e0d3b83fd4b491767dfef480d144ffbdd900f8fd7afd235d91c9e823b114bf1d0cabd18feee71238affb19db805a660f75519c5489f4eb969418ec62fe3", + "file": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryConfig } from '../../models/config.model';\r\nimport { SliderAdapter } from './base-adapter';\r\nimport { SmoothScrollOptions } from '../../smooth-scroll';\r\n\r\ndeclare const Hammer: any;\r\n\r\nexport class HorizontalAdapter implements SliderAdapter {\r\n\r\n readonly hammerDirection: number = Hammer?.DIRECTION_HORIZONTAL;\r\n\r\n readonly scrollSnapType: string = 'x mandatory';\r\n\r\n get scrollValue(): number {\r\n return this.slider.scrollLeft;\r\n }\r\n\r\n get clientSize(): number {\r\n return this.slider.clientWidth;\r\n }\r\n\r\n get isContentLessThanContainer(): boolean {\r\n return this.clientSize >= this.slider.firstElementChild.clientWidth;\r\n }\r\n\r\n constructor(public slider: HTMLElement, public config: GalleryConfig) {\r\n }\r\n\r\n getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions {\r\n const position: number = el.offsetLeft - ((this.clientSize - el.clientWidth) / 2);\r\n return {\r\n behavior,\r\n start: position\r\n };\r\n }\r\n\r\n getRootMargin(): string {\r\n return `1000px 1px 1000px 1px`;\r\n }\r\n\r\n getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {\r\n const rootMargin: number = -1 * ((viewport.clientWidth - el.clientWidth) / 2) + 1;\r\n return `0px ${ rootMargin }px 0px ${ rootMargin }px`;\r\n }\r\n\r\n getCentralizerStartSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientWidth / 2);\r\n }\r\n\r\n getCentralizerEndSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientWidth / 2);\r\n }\r\n\r\n getHammerVelocity(e: any): number {\r\n return e.velocityX;\r\n }\r\n\r\n getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {\r\n return {\r\n behavior,\r\n left: value - e.deltaX\r\n };\r\n }\r\n\r\n // getDraggingProperty(e: MouseEvent): number {\r\n // return e.clientX;\r\n // }\r\n\r\n // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {\r\n // return {\r\n // behavior,\r\n // left: value - delta\r\n // };\r\n // }\r\n}\r\n\r\nexport class VerticalAdapter implements SliderAdapter {\r\n\r\n readonly hammerDirection: number = Hammer?.DIRECTION_VERTICAL;\r\n\r\n readonly scrollSnapType: string = 'y mandatory';\r\n\r\n get scrollValue(): number {\r\n return this.slider.scrollTop;\r\n }\r\n\r\n get clientSize(): number {\r\n return this.slider.clientHeight;\r\n }\r\n\r\n get isContentLessThanContainer(): boolean {\r\n return this.clientSize >= this.slider.firstElementChild.clientHeight;\r\n }\r\n\r\n constructor(public slider: HTMLElement, public config: GalleryConfig) {\r\n }\r\n\r\n getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions {\r\n const position: number = el.offsetTop - ((this.clientSize - el.clientHeight) / 2);\r\n return {\r\n behavior,\r\n top: position\r\n };\r\n }\r\n\r\n getRootMargin(): string {\r\n return `1px 1000px 1px 1000px`;\r\n }\r\n\r\n getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {\r\n const rootMargin: number = -1 * ((viewport.clientHeight - el.clientHeight) / 2) + 1;\r\n return `${ rootMargin }px 0px ${ rootMargin }px 0px`;\r\n }\r\n\r\n getCentralizerStartSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size = this.clientSize - this.slider.firstElementChild.clientHeight;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientHeight / 2);\r\n }\r\n\r\n getCentralizerEndSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size = this.clientSize - this.slider.firstElementChild.clientHeight;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientHeight / 2);\r\n }\r\n\r\n getHammerVelocity(e: any): number {\r\n return e.velocityY;\r\n }\r\n\r\n getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {\r\n return {\r\n behavior,\r\n top: value - e.deltaY\r\n };\r\n }\r\n\r\n // getDraggingProperty(e: MouseEvent): number {\r\n // return e.clientY;\r\n // }\r\n\r\n // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {\r\n // return {\r\n // behavior,\r\n // top: value - delta\r\n // };\r\n // }\r\n}\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "slider", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 23, + "jsdoctags": [ + { + "name": "slider", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [ + 123 + ] + }, + { + "name": "hammerDirection", + "defaultValue": "Hammer?.DIRECTION_HORIZONTAL", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 9, + "modifierKind": [ + 146 + ] + }, + { + "name": "scrollSnapType", + "defaultValue": "'x mandatory'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 11, + "modifierKind": [ + 146 + ] + }, + { + "name": "slider", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [ + 123 + ] + } + ], + "methods": [ + { + "name": "getCentralizerEndSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 53, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getCentralizerStartSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getElementRootMargin", + "args": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerValue", + "args": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ScrollToOptions", + "typeParameters": [], + "line": 65, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerVelocity", + "args": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRootMargin", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 36, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getScrollToValue", + "args": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "SmoothScrollOptions", + "typeParameters": [], + "line": 28, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "accessors": { + "scrollValue": { + "name": "scrollValue", + "getSignature": { + "name": "scrollValue", + "type": "number", + "returnType": "number", + "line": 13 + } + }, + "clientSize": { + "name": "clientSize", + "getSignature": { + "name": "clientSize", + "type": "number", + "returnType": "number", + "line": 17 + } + }, + "isContentLessThanContainer": { + "name": "isContentLessThanContainer", + "getSignature": { + "name": "isContentLessThanContainer", + "type": "boolean", + "returnType": "boolean", + "line": 21 + } + } + }, + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "SliderAdapter" + ] + }, + { + "name": "IframeItem", + "id": "class-IframeItem-34d4be651a4e6f718dde28f397ec99c82360d81641da65c47a5499e3490da86d487d6fffea17cd93fbe36c8452006119cbc339e396218d25a91dedb22a7e837b", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryItem } from '../../models/gallery.model';\r\nimport { GalleryItemType, GalleryItemTypes } from '../../models/constants';\r\n\r\nexport class ImageItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: ImageItemData;\r\n\r\n constructor(data: ImageItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Image;\r\n }\r\n}\r\n\r\nexport class VideoItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: VideoItemData;\r\n\r\n constructor(data: VideoItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Video;\r\n }\r\n}\r\n\r\nexport class IframeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: IframeItemData;\r\n\r\n constructor(data: IframeItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Iframe;\r\n }\r\n}\r\n\r\nexport class YoutubeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: YoutubeItemData;\r\n\r\n constructor(data: YoutubeItemData) {\r\n this.data = {\r\n ...data,\r\n ...{\r\n src: `https://youtube.com/embed/${ data.src }`,\r\n thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`\r\n }\r\n };\r\n this.type = GalleryItemTypes.Youtube;\r\n }\r\n}\r\n\r\ntype GalleryItemModel = {\r\n type?: GalleryItemType;\r\n src?: string | { url: string, type: string }[];\r\n thumb?: string;\r\n args?: any;\r\n};\r\n\r\nexport type ImageItemData = GalleryItemModel & {\r\n alt?: string;\r\n};\r\n\r\nexport type IframeItemData = GalleryItemModel & {\r\n params?: any;\r\n};\r\n\r\nexport type YoutubeItemData = IframeItemData & {\r\n autoplay?: boolean;\r\n};\r\n\r\nexport type VideoItemData = GalleryItemModel & {\r\n poster?: string;\r\n loop?: boolean;\r\n // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding\r\n mute?: true;\r\n disablePictureInPicture?: true;\r\n controls?: boolean;\r\n autoplay?: boolean;\r\n preload?: 'none' | 'metadata' | 'auto' | '';\r\n controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';\r\n disableRemotePlayback?: boolean;\r\n};\r\n\r\nexport type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;\r\n\r\nexport type ItemState = 'success' | 'loading' | 'failed';\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 26, + "jsdoctags": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "IframeItemData", + "optional": false, + "description": "", + "line": 26, + "modifierKind": [ + 146 + ] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": false, + "description": "", + "line": 25, + "modifierKind": [ + 146 + ] + } + ], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "GalleryItem" + ] + }, + { + "name": "ImageItem", + "id": "class-ImageItem-34d4be651a4e6f718dde28f397ec99c82360d81641da65c47a5499e3490da86d487d6fffea17cd93fbe36c8452006119cbc339e396218d25a91dedb22a7e837b", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryItem } from '../../models/gallery.model';\r\nimport { GalleryItemType, GalleryItemTypes } from '../../models/constants';\r\n\r\nexport class ImageItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: ImageItemData;\r\n\r\n constructor(data: ImageItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Image;\r\n }\r\n}\r\n\r\nexport class VideoItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: VideoItemData;\r\n\r\n constructor(data: VideoItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Video;\r\n }\r\n}\r\n\r\nexport class IframeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: IframeItemData;\r\n\r\n constructor(data: IframeItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Iframe;\r\n }\r\n}\r\n\r\nexport class YoutubeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: YoutubeItemData;\r\n\r\n constructor(data: YoutubeItemData) {\r\n this.data = {\r\n ...data,\r\n ...{\r\n src: `https://youtube.com/embed/${ data.src }`,\r\n thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`\r\n }\r\n };\r\n this.type = GalleryItemTypes.Youtube;\r\n }\r\n}\r\n\r\ntype GalleryItemModel = {\r\n type?: GalleryItemType;\r\n src?: string | { url: string, type: string }[];\r\n thumb?: string;\r\n args?: any;\r\n};\r\n\r\nexport type ImageItemData = GalleryItemModel & {\r\n alt?: string;\r\n};\r\n\r\nexport type IframeItemData = GalleryItemModel & {\r\n params?: any;\r\n};\r\n\r\nexport type YoutubeItemData = IframeItemData & {\r\n autoplay?: boolean;\r\n};\r\n\r\nexport type VideoItemData = GalleryItemModel & {\r\n poster?: string;\r\n loop?: boolean;\r\n // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding\r\n mute?: true;\r\n disablePictureInPicture?: true;\r\n controls?: boolean;\r\n autoplay?: boolean;\r\n preload?: 'none' | 'metadata' | 'auto' | '';\r\n controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';\r\n disableRemotePlayback?: boolean;\r\n};\r\n\r\nexport type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;\r\n\r\nexport type ItemState = 'success' | 'loading' | 'failed';\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 6, + "jsdoctags": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "ImageItemData", + "optional": false, + "description": "", + "line": 6, + "modifierKind": [ + 146 + ] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": false, + "description": "", + "line": 5, + "modifierKind": [ + 146 + ] + } + ], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "GalleryItem" + ] + }, + { + "name": "SliderAdapter", + "id": "class-SliderAdapter-ea6462dbf17682e1faf5e410cb58035c08652806b5846d639d21f0eee660d97a47244af46d5fc39dce6cdb8040b9bc4b6e221faa6d764716fd505e3fb8219a0e", + "file": "projects/ng-gallery/src/lib/components/adapters/base-adapter.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "export abstract class SliderAdapter {\r\n\r\n readonly abstract hammerDirection: number;\r\n\r\n readonly abstract scrollSnapType: string;\r\n\r\n abstract get scrollValue(): number;\r\n\r\n abstract get clientSize(): number;\r\n\r\n abstract get isContentLessThanContainer(): boolean;\r\n\r\n abstract getScrollToValue(el: Element, behavior: ScrollBehavior): ScrollToOptions;\r\n\r\n abstract getCentralizerStartSize(): number;\r\n\r\n abstract getCentralizerEndSize(): number;\r\n\r\n abstract getRootMargin(): string;\r\n\r\n abstract getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string;\r\n\r\n abstract getHammerVelocity(e): number;\r\n\r\n abstract getHammerValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions;\r\n\r\n // abstract getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions;\r\n\r\n // abstract getDraggingProperty(e: MouseEvent): number;\r\n}\r\n", + "properties": [ + { + "name": "hammerDirection", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 3, + "modifierKind": [ + 146, + 126 + ] + }, + { + "name": "scrollSnapType", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 5, + "modifierKind": [ + 146, + 126 + ] + } + ], + "methods": [ + { + "name": "getCentralizerEndSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ] + }, + { + "name": "getCentralizerStartSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ] + }, + { + "name": "getElementRootMargin", + "args": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 21, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ], + "jsdoctags": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerValue", + "args": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "delta", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ScrollToOptions", + "typeParameters": [], + "line": 25, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ], + "jsdoctags": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "delta", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerVelocity", + "args": [ + { + "name": "e", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 23, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ], + "jsdoctags": [ + { + "name": "e", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRootMargin", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ] + }, + { + "name": "getScrollToValue", + "args": [ + { + "name": "el", + "type": "Element", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ScrollToOptions", + "typeParameters": [], + "line": 13, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 126 + ], + "jsdoctags": [ + { + "name": "el", + "type": "Element", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "accessors": { + "scrollValue": { + "name": "scrollValue", + "getSignature": { + "name": "scrollValue", + "type": "number", + "returnType": "number", + "line": 7 + } + }, + "clientSize": { + "name": "clientSize", + "getSignature": { + "name": "clientSize", + "type": "number", + "returnType": "number", + "line": 9 + } + }, + "isContentLessThanContainer": { + "name": "isContentLessThanContainer", + "getSignature": { + "name": "isContentLessThanContainer", + "type": "boolean", + "returnType": "boolean", + "line": 11 + } + } + }, + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [] + }, + { + "name": "VerticalAdapter", + "id": "class-VerticalAdapter-eb710e0d3b83fd4b491767dfef480d144ffbdd900f8fd7afd235d91c9e823b114bf1d0cabd18feee71238affb19db805a660f75519c5489f4eb969418ec62fe3", + "file": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryConfig } from '../../models/config.model';\r\nimport { SliderAdapter } from './base-adapter';\r\nimport { SmoothScrollOptions } from '../../smooth-scroll';\r\n\r\ndeclare const Hammer: any;\r\n\r\nexport class HorizontalAdapter implements SliderAdapter {\r\n\r\n readonly hammerDirection: number = Hammer?.DIRECTION_HORIZONTAL;\r\n\r\n readonly scrollSnapType: string = 'x mandatory';\r\n\r\n get scrollValue(): number {\r\n return this.slider.scrollLeft;\r\n }\r\n\r\n get clientSize(): number {\r\n return this.slider.clientWidth;\r\n }\r\n\r\n get isContentLessThanContainer(): boolean {\r\n return this.clientSize >= this.slider.firstElementChild.clientWidth;\r\n }\r\n\r\n constructor(public slider: HTMLElement, public config: GalleryConfig) {\r\n }\r\n\r\n getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions {\r\n const position: number = el.offsetLeft - ((this.clientSize - el.clientWidth) / 2);\r\n return {\r\n behavior,\r\n start: position\r\n };\r\n }\r\n\r\n getRootMargin(): string {\r\n return `1000px 1px 1000px 1px`;\r\n }\r\n\r\n getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {\r\n const rootMargin: number = -1 * ((viewport.clientWidth - el.clientWidth) / 2) + 1;\r\n return `0px ${ rootMargin }px 0px ${ rootMargin }px`;\r\n }\r\n\r\n getCentralizerStartSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientWidth / 2);\r\n }\r\n\r\n getCentralizerEndSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size: number = this.clientSize - this.slider.firstElementChild.clientWidth;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientWidth / 2);\r\n }\r\n\r\n getHammerVelocity(e: any): number {\r\n return e.velocityX;\r\n }\r\n\r\n getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {\r\n return {\r\n behavior,\r\n left: value - e.deltaX\r\n };\r\n }\r\n\r\n // getDraggingProperty(e: MouseEvent): number {\r\n // return e.clientX;\r\n // }\r\n\r\n // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {\r\n // return {\r\n // behavior,\r\n // left: value - delta\r\n // };\r\n // }\r\n}\r\n\r\nexport class VerticalAdapter implements SliderAdapter {\r\n\r\n readonly hammerDirection: number = Hammer?.DIRECTION_VERTICAL;\r\n\r\n readonly scrollSnapType: string = 'y mandatory';\r\n\r\n get scrollValue(): number {\r\n return this.slider.scrollTop;\r\n }\r\n\r\n get clientSize(): number {\r\n return this.slider.clientHeight;\r\n }\r\n\r\n get isContentLessThanContainer(): boolean {\r\n return this.clientSize >= this.slider.firstElementChild.clientHeight;\r\n }\r\n\r\n constructor(public slider: HTMLElement, public config: GalleryConfig) {\r\n }\r\n\r\n getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions {\r\n const position: number = el.offsetTop - ((this.clientSize - el.clientHeight) / 2);\r\n return {\r\n behavior,\r\n top: position\r\n };\r\n }\r\n\r\n getRootMargin(): string {\r\n return `1px 1000px 1px 1000px`;\r\n }\r\n\r\n getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string {\r\n const rootMargin: number = -1 * ((viewport.clientHeight - el.clientHeight) / 2) + 1;\r\n return `${ rootMargin }px 0px ${ rootMargin }px 0px`;\r\n }\r\n\r\n getCentralizerStartSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size = this.clientSize - this.slider.firstElementChild.clientHeight;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.firstElementChild?.clientHeight / 2);\r\n }\r\n\r\n getCentralizerEndSize(): number {\r\n if (this.isContentLessThanContainer) {\r\n const size = this.clientSize - this.slider.firstElementChild.clientHeight;\r\n return size / 2;\r\n }\r\n return (this.clientSize / 2) - (this.slider.firstElementChild.lastElementChild?.clientHeight / 2);\r\n }\r\n\r\n getHammerVelocity(e: any): number {\r\n return e.velocityY;\r\n }\r\n\r\n getHammerValue(value: number, e: any, behavior: ScrollBehavior): ScrollToOptions {\r\n return {\r\n behavior,\r\n top: value - e.deltaY\r\n };\r\n }\r\n\r\n // getDraggingProperty(e: MouseEvent): number {\r\n // return e.clientY;\r\n // }\r\n\r\n // getDraggingValue(value: number, delta: number, behavior: ScrollBehavior): ScrollToOptions {\r\n // return {\r\n // behavior,\r\n // top: value - delta\r\n // };\r\n // }\r\n}\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "slider", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 100, + "jsdoctags": [ + { + "name": "slider", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "config", + "type": "GalleryConfig", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "optional": false, + "description": "", + "line": 102, + "modifierKind": [ + 123 + ] + }, + { + "name": "hammerDirection", + "defaultValue": "Hammer?.DIRECTION_VERTICAL", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "optional": false, + "description": "", + "line": 86, + "modifierKind": [ + 146 + ] + }, + { + "name": "scrollSnapType", + "defaultValue": "'y mandatory'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 88, + "modifierKind": [ + 146 + ] + }, + { + "name": "slider", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 102, + "modifierKind": [ + 123 + ] + } + ], + "methods": [ + { + "name": "getCentralizerEndSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 130, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getCentralizerStartSize", + "args": [], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 122, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getElementRootMargin", + "args": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 117, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "viewport", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerValue", + "args": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "ScrollToOptions", + "typeParameters": [], + "line": 142, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHammerVelocity", + "args": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 138, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getRootMargin", + "args": [], + "optional": false, + "returnType": "string", + "typeParameters": [], + "line": 113, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "getScrollToValue", + "args": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "SmoothScrollOptions", + "typeParameters": [], + "line": 105, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "indexSignatures": [], + "accessors": { + "scrollValue": { + "name": "scrollValue", + "getSignature": { + "name": "scrollValue", + "type": "number", + "returnType": "number", + "line": 90 + } + }, + "clientSize": { + "name": "clientSize", + "getSignature": { + "name": "clientSize", + "type": "number", + "returnType": "number", + "line": 94 + } + }, + "isContentLessThanContainer": { + "name": "isContentLessThanContainer", + "getSignature": { + "name": "isContentLessThanContainer", + "type": "boolean", + "returnType": "boolean", + "line": 98 + } + } + }, + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "SliderAdapter" + ] + }, + { + "name": "VideoItem", + "id": "class-VideoItem-34d4be651a4e6f718dde28f397ec99c82360d81641da65c47a5499e3490da86d487d6fffea17cd93fbe36c8452006119cbc339e396218d25a91dedb22a7e837b", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryItem } from '../../models/gallery.model';\r\nimport { GalleryItemType, GalleryItemTypes } from '../../models/constants';\r\n\r\nexport class ImageItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: ImageItemData;\r\n\r\n constructor(data: ImageItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Image;\r\n }\r\n}\r\n\r\nexport class VideoItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: VideoItemData;\r\n\r\n constructor(data: VideoItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Video;\r\n }\r\n}\r\n\r\nexport class IframeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: IframeItemData;\r\n\r\n constructor(data: IframeItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Iframe;\r\n }\r\n}\r\n\r\nexport class YoutubeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: YoutubeItemData;\r\n\r\n constructor(data: YoutubeItemData) {\r\n this.data = {\r\n ...data,\r\n ...{\r\n src: `https://youtube.com/embed/${ data.src }`,\r\n thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`\r\n }\r\n };\r\n this.type = GalleryItemTypes.Youtube;\r\n }\r\n}\r\n\r\ntype GalleryItemModel = {\r\n type?: GalleryItemType;\r\n src?: string | { url: string, type: string }[];\r\n thumb?: string;\r\n args?: any;\r\n};\r\n\r\nexport type ImageItemData = GalleryItemModel & {\r\n alt?: string;\r\n};\r\n\r\nexport type IframeItemData = GalleryItemModel & {\r\n params?: any;\r\n};\r\n\r\nexport type YoutubeItemData = IframeItemData & {\r\n autoplay?: boolean;\r\n};\r\n\r\nexport type VideoItemData = GalleryItemModel & {\r\n poster?: string;\r\n loop?: boolean;\r\n // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding\r\n mute?: true;\r\n disablePictureInPicture?: true;\r\n controls?: boolean;\r\n autoplay?: boolean;\r\n preload?: 'none' | 'metadata' | 'auto' | '';\r\n controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';\r\n disableRemotePlayback?: boolean;\r\n};\r\n\r\nexport type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;\r\n\r\nexport type ItemState = 'success' | 'loading' | 'failed';\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 16, + "jsdoctags": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "VideoItemData", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [ + 146 + ] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": false, + "description": "", + "line": 15, + "modifierKind": [ + 146 + ] + } + ], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "GalleryItem" + ] + }, + { + "name": "YoutubeItem", + "id": "class-YoutubeItem-34d4be651a4e6f718dde28f397ec99c82360d81641da65c47a5499e3490da86d487d6fffea17cd93fbe36c8452006119cbc339e396218d25a91dedb22a7e837b", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "class", + "sourceCode": "import { GalleryItem } from '../../models/gallery.model';\r\nimport { GalleryItemType, GalleryItemTypes } from '../../models/constants';\r\n\r\nexport class ImageItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: ImageItemData;\r\n\r\n constructor(data: ImageItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Image;\r\n }\r\n}\r\n\r\nexport class VideoItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: VideoItemData;\r\n\r\n constructor(data: VideoItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Video;\r\n }\r\n}\r\n\r\nexport class IframeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: IframeItemData;\r\n\r\n constructor(data: IframeItemData) {\r\n this.data = data;\r\n this.type = GalleryItemTypes.Iframe;\r\n }\r\n}\r\n\r\nexport class YoutubeItem implements GalleryItem {\r\n readonly type: GalleryItemType;\r\n readonly data: YoutubeItemData;\r\n\r\n constructor(data: YoutubeItemData) {\r\n this.data = {\r\n ...data,\r\n ...{\r\n src: `https://youtube.com/embed/${ data.src }`,\r\n thumb: data.thumb ? data.thumb : `//img.youtube.com/vi/${ data.src }/default.jpg`\r\n }\r\n };\r\n this.type = GalleryItemTypes.Youtube;\r\n }\r\n}\r\n\r\ntype GalleryItemModel = {\r\n type?: GalleryItemType;\r\n src?: string | { url: string, type: string }[];\r\n thumb?: string;\r\n args?: any;\r\n};\r\n\r\nexport type ImageItemData = GalleryItemModel & {\r\n alt?: string;\r\n};\r\n\r\nexport type IframeItemData = GalleryItemModel & {\r\n params?: any;\r\n};\r\n\r\nexport type YoutubeItemData = IframeItemData & {\r\n autoplay?: boolean;\r\n};\r\n\r\nexport type VideoItemData = GalleryItemModel & {\r\n poster?: string;\r\n loop?: boolean;\r\n // The only option for boolean video attributes is 'true', because false will still be evaluated to true in attributes binding\r\n mute?: true;\r\n disablePictureInPicture?: true;\r\n controls?: boolean;\r\n autoplay?: boolean;\r\n preload?: 'none' | 'metadata' | 'auto' | '';\r\n controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';\r\n disableRemotePlayback?: boolean;\r\n};\r\n\r\nexport type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData;\r\n\r\nexport type ItemState = 'success' | 'loading' | 'failed';\r\n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 36, + "jsdoctags": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "properties": [ + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "type": "YoutubeItemData", + "optional": false, + "description": "", + "line": 36, + "modifierKind": [ + 146 + ] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryItemType", + "optional": false, + "description": "", + "line": 35, + "modifierKind": [ + 146 + ] + } + ], + "methods": [], + "indexSignatures": [], + "inputsClass": [], + "outputsClass": [], + "hostBindings": [], + "hostListeners": [], + "implements": [ + "GalleryItem" + ] + } + ], + "directives": [ + { + "name": "AutoplayDirective", + "id": "directive-AutoplayDirective-4af5917269fb330e83f2fcd8f86865c4d4d199976809347176711bbb3406e1b4bd8c3e81d2a5b0acf44d19904d49b06e8b98cfa68168f5eb655308373ef1edec", + "file": "projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, Input, AfterViewInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';\r\nimport { Subscription, delay, of, switchMap, tap, EMPTY } from 'rxjs';\r\nimport { ImgManager } from '../utils/img-manager';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryRef } from '../services/gallery-ref';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n@Directive({\r\n selector: 'gallery-core[autoplay]',\r\n standalone: true\r\n})\r\nexport class AutoplayDirective implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n private _currentSubscription: Subscription;\r\n\r\n private _galleryRef: GalleryRef;\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Input() galleryId: string;\r\n\r\n constructor(private _gallery: Gallery, private _imgManager: ImgManager) {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._galleryRef = this._gallery.ref(this.galleryId);\r\n this._subscribe();\r\n if (this.config.autoplay) {\r\n this._galleryRef.play();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this._galleryRef && changes.config?.currentValue.autoplay !== changes.config?.previousValue.autoplay) {\r\n this.config.autoplay ? this._galleryRef.play() : this._galleryRef.stop();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribe();\r\n }\r\n\r\n\r\n private _subscribe(): void {\r\n this._unsubscribe();\r\n\r\n this._currentSubscription = this._galleryRef.playingChanged.pipe(\r\n switchMap((state: GalleryState) => {\r\n if (state.isPlaying) {\r\n return this._imgManager.getActiveItem(this._galleryRef.state).pipe(\r\n switchMap(() => of({}).pipe(\r\n delay(this.config.autoplayInterval),\r\n tap(() => {\r\n if (this._galleryRef.stateSnapshot.hasNext) {\r\n this._galleryRef.next(this.config.scrollBehavior);\r\n } else {\r\n this._galleryRef.set(0, this.config.scrollBehavior);\r\n }\r\n })\r\n ))\r\n );\r\n }\r\n return EMPTY;\r\n })\r\n ).subscribe();\r\n }\r\n\r\n private _unsubscribe(): void {\r\n this._currentSubscription?.unsubscribe();\r\n }\r\n}\r\n", + "selector": "gallery-core[autoplay]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 19, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 21, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_currentSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 15, + "modifierKind": [ + 121 + ] + }, + { + "name": "_galleryRef", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryRef", + "optional": false, + "description": "", + "line": 17, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_subscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "_unsubscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 69, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 26, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 34, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 40, + "deprecated": false, + "deprecationMessage": "" + } + ], + "implements": [ + "AfterViewInit", + "OnChanges", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_imgManager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_imgManager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "GalleryBoxDef", + "id": "directive-GalleryBoxDef-dc42fc50e33dfef0b09f6091971bf663a23f56cdc21288a1d462bdbc08634bd1b5b282ac3be9fcd63e7a7bf9dbb0caf078fe0cc1be3b3bee6b6030f88eb947cf", + "file": "projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryBoxDef]'\r\n})\r\nexport class GalleryBoxDef {\r\n\r\n constructor(public templateRef: TemplateRef) {\r\n }\r\n\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryBoxDef,\r\n context: unknown\r\n ): context is GalleryStateContext {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface GalleryStateContext {\r\n state?: GalleryState;\r\n config?: GalleryConfig;\r\n}\r\n", + "selector": "[galleryBoxDef]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "templateRef", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef", + "optional": false, + "description": "", + "line": 12, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngTemplateContextGuard", + "args": [ + { + "name": "directive", + "type": "GalleryBoxDef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "GalleryStateContext", + "typeParameters": [], + "line": 17, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "directive", + "type": "GalleryBoxDef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "templateRef", + "type": "TemplateRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 10, + "jsdoctags": [ + { + "name": "templateRef", + "type": "TemplateRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "GalleryImageDef", + "id": "directive-GalleryImageDef-ed5ba58045d4decff0e07e755dc0c225ab926051f1c25b914bd812eb0fb9a3969ead4cfbf96f0f1a82b37db87c29887edd98a66211d3949fe201fda6c8006b70", + "file": "projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { ImageItemData } from '../components/templates/items.model';\r\nimport { GalleryItemContext } from './gallery-item-def.directive';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryImageDef]'\r\n})\r\nexport class GalleryImageDef {\r\n\r\n constructor(public templateRef: TemplateRef>) {\r\n }\r\n\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryImageDef,\r\n context: unknown\r\n ): context is GalleryItemContext {\r\n return true;\r\n }\r\n}\r\n", + "selector": "[galleryImageDef]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "templateRef", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef>", + "optional": false, + "description": "", + "line": 11, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngTemplateContextGuard", + "args": [ + { + "name": "directive", + "type": "GalleryImageDef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "GalleryItemContext", + "typeParameters": [], + "line": 16, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "directive", + "type": "GalleryImageDef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "GalleryItemDef", + "id": "directive-GalleryItemDef-26e1a2a9cd6d60ca99303fc991011e44a915536a91e7fffb302ad20298ea1600095dac2bbb811adb2767e9c07b63f913c60fab3c81fff80a56796b65a8136cba", + "file": "projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { GalleryItemData } from '../components/templates/items.model';\r\nimport { GalleryItemType } from '../models/constants';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryItemDef]'\r\n})\r\nexport class GalleryItemDef {\r\n constructor(public templateRef: TemplateRef>) {\r\n }\r\n\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryItemDef,\r\n context: unknown\r\n ): context is GalleryItemContext {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface GalleryItemContext {\r\n /** Data for the row that this cell is located within. */\r\n $implicit?: T;\r\n\r\n /** Index of the item. */\r\n index?: number;\r\n\r\n /** The type of the item. */\r\n type?: GalleryItemType;\r\n\r\n /** True if this item is the active one. */\r\n active?: boolean;\r\n\r\n /** The number of total items. */\r\n count?: number;\r\n\r\n /** True if this item is first. */\r\n first?: boolean;\r\n\r\n /** True if this item is last. */\r\n last?: boolean;\r\n}\r\n", + "selector": "[galleryItemDef]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "templateRef", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef>", + "optional": false, + "description": "", + "line": 10, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngTemplateContextGuard", + "args": [ + { + "name": "directive", + "type": "GalleryItemDef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "GalleryItemContext", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "directive", + "type": "GalleryItemDef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "GalleryThumbDef", + "id": "directive-GalleryThumbDef-b6a21582967ca97fc62641838641bac7ceab9261c6d740a6cf2fee519d0caf4895136246fe2c47f8e521708a79f78b24ff01d43714a993eec105c40ea6f36666", + "file": "projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, TemplateRef } from '@angular/core';\r\nimport { ImageItemData } from '../components/templates/items.model';\r\nimport { GalleryItemContext } from './gallery-item-def.directive';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[galleryThumbDef]'\r\n})\r\nexport class GalleryThumbDef {\r\n\r\n constructor(public templateRef: TemplateRef>) {\r\n }\r\n // Make sure the template checker knows the type of the context with which the\r\n // template of this directive will be rendered\r\n static ngTemplateContextGuard(\r\n directive: GalleryThumbDef,\r\n context: unknown\r\n ): context is GalleryItemContext {\r\n return true;\r\n }\r\n}\r\n", + "selector": "[galleryThumbDef]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "templateRef", + "deprecated": false, + "deprecationMessage": "", + "type": "TemplateRef>", + "optional": false, + "description": "", + "line": 11, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngTemplateContextGuard", + "args": [ + { + "name": "directive", + "type": "GalleryThumbDef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "GalleryItemContext", + "typeParameters": [], + "line": 15, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 124 + ], + "jsdoctags": [ + { + "name": "directive", + "type": "GalleryThumbDef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "context", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 9, + "jsdoctags": [ + { + "name": "templateRef", + "type": "TemplateRef>", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "HammerSliding", + "id": "directive-HammerSliding-8e4f574e588240c89e9cb6a7a2e9074c48787b2109fc5d8a6facd287445d7e14e5da8c94ceed35201f55257548d74ea42709b688f2e6ec0a65caa754d6104759", + "file": "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import {\r\n Directive,\r\n Inject,\r\n Input,\r\n Output,\r\n OnChanges,\r\n OnDestroy,\r\n SimpleChanges,\r\n NgZone,\r\n ElementRef,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { SliderAdapter } from '../components/adapters';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { Orientation } from '../models/constants';\r\nimport { GalleryItemComponent } from '../components/gallery-item.component';\r\nimport { GalleryThumbComponent } from '../components/gallery-thumb.component';\r\n\r\ndeclare const Hammer: any;\r\n\r\n@Directive({\r\n selector: '[hammerSliding]',\r\n standalone: true\r\n})\r\nexport class HammerSliding implements OnChanges, OnDestroy {\r\n\r\n /** HammerJS instance */\r\n private _hammer: any;\r\n\r\n get _viewport(): HTMLElement {\r\n return this._el.nativeElement;\r\n }\r\n\r\n @Input('hammerSliding') enabled: boolean;\r\n\r\n @Input() galleryId: string;\r\n\r\n @Input() items: GalleryItemComponent[] | GalleryThumbComponent[];\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Input() state: GalleryState;\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Output() activeIndexChange: EventEmitter = new EventEmitter();\r\n\r\n @Output() isSlidingChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(@Inject(DOCUMENT) private _document: Document,\r\n private _el: ElementRef,\r\n private _dir: Directionality,\r\n private _platform: Platform,\r\n private _zone: NgZone) {\r\n }\r\n\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.enabled && changes.enabled?.currentValue !== changes.enabled?.previousValue) {\r\n this.enabled ? this._subscribe() : this._unsubscribe();\r\n }\r\n if (!changes.adapter?.firstChange && changes.adapter?.currentValue !== changes.adapter?.previousValue) {\r\n this.enabled ? this._subscribe() : this._unsubscribe();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribe();\r\n }\r\n\r\n private _subscribe(): void {\r\n this._unsubscribe();\r\n\r\n if (!this._platform.ANDROID && !this._platform.IOS && typeof Hammer !== 'undefined') {\r\n this._zone.runOutsideAngular(() => {\r\n\r\n const direction: number = this.adapter.hammerDirection;\r\n this._hammer = new Hammer(this._el.nativeElement, { inputClass: Hammer.MouseInput });\r\n this._hammer.get('pan').set({ direction });\r\n\r\n let offset: number;\r\n\r\n // Set panOffset for sliding on pan start event\r\n this._hammer.on('panstart', () => {\r\n this._zone.run(() => {\r\n this.isSlidingChange.emit(true);\r\n });\r\n\r\n offset = this.adapter.scrollValue;\r\n this._viewport.classList.add('g-sliding');\r\n this._viewport.style.setProperty('--slider-scroll-snap-type', 'none');\r\n });\r\n\r\n this._hammer.on('panmove', (e: any) => this._viewport.scrollTo(this.adapter.getHammerValue(offset, e, 'auto')));\r\n\r\n this._hammer.on('panend', (e: any) => {\r\n this._document.onselectstart = null;\r\n this._viewport.classList.remove('g-sliding');\r\n const index: number = this.getIndexOnMouseUp(e);\r\n\r\n this._zone.run(() => {\r\n this.isSlidingChange.emit(false);\r\n this.activeIndexChange.emit(index);\r\n });\r\n });\r\n });\r\n }\r\n }\r\n\r\n private _unsubscribe(): void {\r\n this._hammer?.destroy();\r\n }\r\n\r\n private getIndexOnMouseUp(e: any): number {\r\n // Check if scrolled item is great enough to navigate\r\n const currElement: Element = this.items[this.state.currIndex].nativeElement;\r\n\r\n // Find the gallery item element in the center elements\r\n const elementAtCenter: Element = this.getElementFromViewportCenter();\r\n\r\n // Check if center item can be taken from element using\r\n if (elementAtCenter && elementAtCenter !== currElement) {\r\n return +elementAtCenter.getAttribute('galleryIndex');\r\n }\r\n\r\n const velocity: number = this.adapter.getHammerVelocity(e);\r\n // Check if velocity is great enough to navigate\r\n if (Math.abs(velocity) > 0.3) {\r\n if (this.config.orientation === Orientation.Horizontal) {\r\n if (velocity > 0) {\r\n return this._dir.value === 'rtl' ? this.state.currIndex + 1 : this.state.currIndex - 1;\r\n }\r\n return this._dir.value === 'rtl' ? this.state.currIndex - 1 : this.state.currIndex + 1;\r\n } else {\r\n return velocity > 0 ? this.state.currIndex - 1 : this.state.currIndex + 1;\r\n }\r\n }\r\n\r\n // Reset position to the current index\r\n return -1;\r\n }\r\n\r\n private getElementFromViewportCenter(): Element {\r\n // Get slider position relative to the document\r\n const sliderRect: DOMRect = this._viewport.getBoundingClientRect();\r\n // Try look for the center item using `elementsFromPoint` function\r\n const centerElements: Element[] = this._document.elementsFromPoint(\r\n sliderRect.x + (sliderRect.width / 2),\r\n sliderRect.y + (sliderRect.height / 2)\r\n );\r\n // Find the gallery item element in the center elements\r\n return centerElements.find((element: Element) => {\r\n return element.getAttribute('galleryId') === this.galleryId;\r\n });\r\n }\r\n}\r\n", + "selector": "[hammerSliding]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 48, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 40, + "type": "string", + "decorators": [] + }, + { + "name": "hammerSliding", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "boolean", + "decorators": [] + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "line": 42, + "type": "GalleryItemComponent[] | GalleryThumbComponent[]", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "line": 46, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "activeIndexChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 50, + "type": "EventEmitter" + }, + { + "name": "isSlidingChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 52, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_hammer", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "

                                                                                                                                  HammerJS instance

                                                                                                                                  \n", + "line": 32, + "rawdescription": "\nHammerJS instance", + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_subscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 75, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "_unsubscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 114, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "getElementFromViewportCenter", + "args": [], + "optional": false, + "returnType": "Element", + "typeParameters": [], + "line": 147, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "getIndexOnMouseUp", + "args": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "number", + "typeParameters": [], + "line": 118, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "e", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 62, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 71, + "deprecated": false, + "deprecationMessage": "" + } + ], + "implements": [ + "OnChanges", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_platform", + "type": "Platform", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 52, + "jsdoctags": [ + { + "name": "_document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_platform", + "type": "Platform", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_viewport": { + "name": "_viewport", + "getSignature": { + "name": "_viewport", + "type": "", + "returnType": "HTMLElement", + "line": 34 + } + } + } + }, + { + "name": "ImgRecognizer", + "id": "directive-ImgRecognizer-4c9d5a8c7a08b40e1e9d439399a05aec404513b8e889a789020d8e5175a205f816481633114970e3a3acc2b03986c1cf8e9d84cea50aec93a0147c934632f8ab", + "file": "projects/ng-gallery/src/lib/utils/img-recognizer.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, Input, HostListener, OnInit, OnDestroy, ElementRef } from '@angular/core';\r\nimport { ImgManager } from './img-manager';\r\nimport { GalleryItemComponent } from '../components/gallery-item.component';\r\n\r\n@Directive({\r\n selector: 'img[galleryImage]',\r\n standalone: true\r\n})\r\nexport class ImgRecognizer implements OnInit, OnDestroy {\r\n\r\n @Input('galleryImage') index: number;\r\n\r\n @HostListener('load', ['$event'])\r\n onLoad() {\r\n this.item.state$.next('success');\r\n }\r\n\r\n @HostListener('error', ['$event'])\r\n onError() {\r\n this.item.state$.next('failed');\r\n }\r\n\r\n constructor(private el: ElementRef, private manager: ImgManager, private item: GalleryItemComponent) {\r\n if (item) {\r\n // Mark the gallery-item component as an image item\r\n item.isItemContainImage = true;\r\n } else {\r\n throw new Error('[NgGallery]: galleryImage directive should be only used inside gallery item templates!')\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.manager.addItem(this.index, {\r\n state: this.item.state$.asObservable(),\r\n target: this.el.nativeElement\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.manager.deleteItem(this.index);\r\n }\r\n}\r\n", + "selector": "img[galleryImage]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "galleryImage", + "deprecated": false, + "deprecationMessage": "", + "line": 11, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [ + { + "name": "error", + "args": [], + "argsDecorator": [ + "$event" + ], + "deprecated": false, + "deprecationMessage": "", + "line": 19 + }, + { + "name": "load", + "args": [], + "argsDecorator": [ + "$event" + ], + "deprecated": false, + "deprecationMessage": "", + "line": 14 + } + ], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 32, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "onError", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 19, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'error', ['$event']" + } + ], + "modifierKind": [ + 167 + ] + }, + { + "name": "onLoad", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 14, + "deprecated": false, + "deprecationMessage": "", + "decorators": [ + { + "name": "HostListener", + "stringifiedArguments": "'load', ['$event']" + } + ], + "modifierKind": [ + 167 + ] + } + ], + "implements": [ + "OnInit", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "manager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "GalleryItemComponent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 21, + "jsdoctags": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "manager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "item", + "type": "GalleryItemComponent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "ItemIntersectionObserver", + "id": "directive-ItemIntersectionObserver-0a3b2b78df343b3cbe0b7519ff88f8d37ab36f127b1e40cfba7e23f28b9ba9f67efdf206d6dcf1eb069ec9912a4641df91af4d5f9368d7b020c4a2a653f054cf", + "file": "projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, Input, Output, OnChanges, OnDestroy, NgZone, EventEmitter } from '@angular/core';\r\nimport { Subscription, combineLatest, filter, switchMap } from 'rxjs';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { ActiveItemObserver } from './active-item-observer';\r\nimport { resizeObservable } from '../utils/resize-observer';\r\nimport { SliderAdapter } from '../components/adapters';\r\nimport { GalleryItemComponent } from '../components/gallery-item.component';\r\nimport { ItemState } from '../components/templates/items.model';\r\n\r\n@Directive({\r\n selector: '[itemIntersectionObserver]',\r\n standalone: true\r\n})\r\nexport class ItemIntersectionObserver implements OnChanges, OnDestroy {\r\n\r\n private _currentSubscription: Subscription;\r\n\r\n private _sensor: ActiveItemObserver = new ActiveItemObserver();\r\n\r\n private get _viewport(): HTMLElement {\r\n return this._item.nativeElement.parentElement.parentElement;\r\n }\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Input('itemIntersectionObserverDisabled') disabled: boolean;\r\n\r\n @Output() activeIndexChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(private _zone: NgZone, private _item: GalleryItemComponent) {\r\n }\r\n\r\n ngOnChanges(): void {\r\n (this.config.itemAutosize && !this.disabled) ? this._subscribe() : this._unsubscribe();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribe();\r\n }\r\n\r\n private _subscribe(): void {\r\n this._unsubscribe();\r\n\r\n if (!!this.adapter) {\r\n this._zone.runOutsideAngular(() => {\r\n this._currentSubscription = combineLatest([\r\n resizeObservable(this._viewport),\r\n resizeObservable(this._item.nativeElement)\r\n ]).pipe(\r\n switchMap(() => this._item.state$),\r\n filter((state: ItemState) => state !== 'loading'),\r\n switchMap(() => {\r\n const rootMargin: string = this.adapter.getElementRootMargin(this._viewport, this._item.nativeElement);\r\n if (this.config.debug) {\r\n this._item.nativeElement.style.setProperty('--item-intersection-margin', `\"VIEWPORT(${ this._viewport.clientWidth }x${ this._viewport.clientHeight }) ITEM(${ this._item.nativeElement.clientWidth }x${ this._item.nativeElement.clientHeight }) INTERSECTION(${ rootMargin })\"`);\r\n }\r\n\r\n return this._sensor.observe(\r\n this._viewport,\r\n [this._item.nativeElement],\r\n rootMargin\r\n );\r\n }\r\n )\r\n ).subscribe((index: number) => {\r\n this._zone.run(() => this.activeIndexChange.emit(index));\r\n });\r\n });\r\n }\r\n }\r\n\r\n private _unsubscribe(): void {\r\n this._currentSubscription?.unsubscribe();\r\n }\r\n}\r\n", + "selector": "[itemIntersectionObserver]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "itemIntersectionObserverDisabled", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "activeIndexChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_currentSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [ + 121 + ] + }, + { + "name": "_sensor", + "defaultValue": "new ActiveItemObserver()", + "deprecated": false, + "deprecationMessage": "", + "type": "ActiveItemObserver", + "optional": false, + "description": "", + "line": 18, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_subscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "_unsubscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 74, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "ngOnChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + } + ], + "implements": [ + "OnChanges", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_item", + "type": "GalleryItemComponent", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 30, + "jsdoctags": [ + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_item", + "type": "GalleryItemComponent", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_viewport": { + "name": "_viewport", + "getSignature": { + "name": "_viewport", + "type": "", + "returnType": "HTMLElement", + "line": 20 + } + } + } + }, + { + "name": "SliderIntersectionObserver", + "id": "directive-SliderIntersectionObserver-59296fab6cf19b998ffcf73bd65f51d466a277818639722ee281fa993055678cbb9b8fa77f5f0234106cbc02d5a6dbc972d06329fa5eeb06598776d1d6bf0228", + "file": "projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import { Directive, Input, Output, OnChanges, OnDestroy, NgZone, ElementRef, EventEmitter } from '@angular/core';\r\nimport { skip, Subscription } from 'rxjs';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { ActiveItemObserver } from './active-item-observer';\r\nimport { SliderAdapter } from '../components/adapters';\r\nimport { GalleryItemComponent } from '../components/gallery-item.component';\r\n\r\n@Directive({\r\n selector: '[sliderIntersectionObserver]',\r\n standalone: true\r\n})\r\nexport class SliderIntersectionObserver implements OnChanges, OnDestroy {\r\n\r\n private _currentSubscription: Subscription;\r\n\r\n private _sensor: ActiveItemObserver = new ActiveItemObserver();\r\n\r\n private get _viewport(): HTMLElement {\r\n return this._el.nativeElement;\r\n }\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Input() items: GalleryItemComponent[];\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Input('sliderIntersectionObserverDisabled') disabled: boolean;\r\n\r\n @Output() activeIndexChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(private _zone: NgZone, private _el: ElementRef) {\r\n }\r\n\r\n ngOnChanges(): void {\r\n (this.config.itemAutosize || this.disabled) ? this._unsubscribe() : this._subscribe();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribe();\r\n }\r\n\r\n private _subscribe(): void {\r\n this._unsubscribe();\r\n\r\n if (!!this.adapter && !!this.items?.length) {\r\n const rootMargin: string = this.adapter.getRootMargin();\r\n if (this.config.debug) {\r\n this._viewport.style.setProperty('--intersection-margin', `\"INTERSECTION(${ rootMargin })\"`);\r\n }\r\n\r\n this._zone.runOutsideAngular(() => {\r\n this._currentSubscription = this._sensor.observe(\r\n this._viewport,\r\n this.items.map((item: GalleryItemComponent) => item.nativeElement),\r\n rootMargin\r\n ).subscribe((index: number) => {\r\n this._zone.run(() => this.activeIndexChange.emit(index));\r\n });\r\n });\r\n }\r\n }\r\n\r\n private _unsubscribe(): void {\r\n this._currentSubscription?.unsubscribe();\r\n }\r\n}\r\n", + "selector": "[sliderIntersectionObserver]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 22, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "line": 24, + "type": "GalleryItemComponent[]", + "decorators": [] + }, + { + "name": "sliderIntersectionObserverDisabled", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "activeIndexChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_currentSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 14, + "modifierKind": [ + 121 + ] + }, + { + "name": "_sensor", + "defaultValue": "new ActiveItemObserver()", + "deprecated": false, + "deprecationMessage": "", + "type": "ActiveItemObserver", + "optional": false, + "description": "", + "line": 16, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_subscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 43, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "_unsubscribe", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 64, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "ngOnChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 35, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + } + ], + "implements": [ + "OnChanges", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 30, + "jsdoctags": [ + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_viewport": { + "name": "_viewport", + "getSignature": { + "name": "_viewport", + "type": "", + "returnType": "HTMLElement", + "line": 18 + } + } + } + }, + { + "name": "SliderResizeObserver", + "id": "directive-SliderResizeObserver-e9e0114bce4aa05a4e4454ec9d6bc082f728bc27ce0c56ff97ca48b841d05577d1734afbcd0dc58c53953763bb0b005c4442de9d4b6f0cd556443d328614d8d1", + "file": "projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import {\r\n Directive,\r\n Input,\r\n Output,\r\n NgZone,\r\n ElementRef,\r\n AfterViewChecked,\r\n OnInit,\r\n OnChanges,\r\n OnDestroy,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport {\r\n Observable,\r\n Subscription,\r\n of,\r\n tap,\r\n take,\r\n filter,\r\n fromEvent,\r\n switchMap,\r\n debounceTime,\r\n firstValueFrom,\r\n distinctUntilChanged,\r\n EMPTY,\r\n animationFrameScheduler\r\n} from 'rxjs';\r\nimport { ImgManager } from '../utils/img-manager';\r\nimport { resizeObservable } from '../utils/resize-observer';\r\nimport { SliderAdapter } from '../components/adapters';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryRef } from '../services/gallery-ref';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { GalleryState } from '../models/gallery.model';\r\n\r\n@Directive({\r\n selector: '[sliderResizeObserver]',\r\n standalone: true\r\n})\r\nexport class SliderResizeObserver implements AfterViewChecked, OnChanges, OnInit, OnDestroy {\r\n\r\n private _resizeObserver: ResizeObserver;\r\n\r\n private _autoHeightSubscription: Subscription;\r\n\r\n private _resizeSubscription: Subscription;\r\n\r\n private _shouldSkip: boolean;\r\n\r\n // Stream that emits after the transition to the new height is completed\r\n private _afterHeightChanged$: Observable;\r\n\r\n private get _viewport(): HTMLElement {\r\n return this._el.nativeElement;\r\n }\r\n\r\n private get _galleryCore(): HTMLElement {\r\n return this._el.nativeElement.parentElement.parentElement.parentElement;\r\n }\r\n\r\n private get _isAutoHeight(): boolean {\r\n return this.config.autoHeight &&\r\n !this.config.itemAutosize &&\r\n this.config.orientation === 'horizontal' &&\r\n (this.config.thumbPosition === 'top' || this.config.thumbPosition === 'bottom');\r\n }\r\n\r\n @Input() galleryId: string;\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Output() isResizingChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(private _el: ElementRef,\r\n private _zone: NgZone,\r\n private _gallery: Gallery,\r\n private _imgManager: ImgManager) {\r\n }\r\n\r\n ngOnInit(): void {\r\n const galleryRef: GalleryRef = this._gallery.ref(this.galleryId);\r\n\r\n // Check if height has transition for the auto-height feature\r\n const transitionDuration: string = getComputedStyle(this._viewport).getPropertyValue('transition-duration');\r\n if (parseFloat(transitionDuration) === 0) {\r\n this._afterHeightChanged$ = of(null);\r\n } else {\r\n this._afterHeightChanged$ = fromEvent(this._viewport, 'transitionend');\r\n }\r\n\r\n this._zone.runOutsideAngular(() => {\r\n\r\n // Detect if the size of the slider has changed detecting current index on scroll\r\n this._resizeSubscription = resizeObservable(this._viewport, (observer: ResizeObserver) => this._resizeObserver = observer).pipe(\r\n // Check if resize should skip due to re-observing the slider\r\n filter(() => !this._shouldSkip || !(this._shouldSkip = false)),\r\n // Immediately set visibility to hidden to avoid changing the active item caused by appearance of other items when size is expanded\r\n tap(() => this.setResizingState()),\r\n debounceTime(this.config.resizeDebounceTime, animationFrameScheduler),\r\n tap(async (entry: ResizeObserverEntry) => {\r\n // Update CSS variables with the proper values\r\n this.updateSliderSize();\r\n\r\n if (this._isAutoHeight) {\r\n const img: HTMLImageElement = await firstValueFrom(this._imgManager.getActiveItem(galleryRef.state));\r\n // If img height is identical to the viewport height then skip\r\n if (img.height === this._viewport.clientHeight) {\r\n this.resetResizingState();\r\n } else {\r\n // Unobserve the slider while the height is being changed\r\n this.setResizingState({ unobserve: true });\r\n // Change the height\r\n this._galleryCore.style.setProperty('--slider-height', `${ img.height }px`);\r\n // Wait until height transition ends\r\n await firstValueFrom(this._afterHeightChanged$);\r\n this.resetResizingState({\r\n // Mark to skip first emit after re-observing the slider if height content rect height and client height are identical\r\n shouldSkip: entry.contentRect.height === this._viewport.clientHeight,\r\n observe: true\r\n });\r\n }\r\n } else {\r\n requestAnimationFrame(() => this.resetResizingState({ shouldSkip: true }));\r\n }\r\n })\r\n ).subscribe();\r\n });\r\n }\r\n\r\n ngOnChanges(): void {\r\n this._isAutoHeight ? this._subscribeAutoHeight() : this._unsubscribeAutoHeight();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._resizeSubscription?.unsubscribe();\r\n this._unsubscribeAutoHeight();\r\n }\r\n\r\n ngAfterViewChecked(): void {\r\n this.updateSliderSize();\r\n }\r\n\r\n private updateSliderSize(): void {\r\n // Update slider width and height CSS variables\r\n this._galleryCore.style.setProperty('--slider-width', `${ this._viewport.clientWidth }px`);\r\n\r\n // Only update height if auto-height is false, because when it's true, another function will take care of it\r\n if (!this.config.autoHeight) {\r\n this._galleryCore.style.setProperty('--slider-height', `${ this._viewport.clientHeight }px`);\r\n }\r\n\r\n this.updateCentralizeCSSVariables();\r\n }\r\n\r\n private updateCentralizeCSSVariables(): void {\r\n if (this.config.itemAutosize) {\r\n this._galleryCore.style.setProperty('--slider-centralize-start-size', `${ this.adapter.getCentralizerStartSize() }px`);\r\n this._galleryCore.style.setProperty('--slider-centralize-end-size', `${ this.adapter.getCentralizerEndSize() }px`);\r\n }\r\n }\r\n\r\n private _subscribeAutoHeight(): void {\r\n this._unsubscribeAutoHeight();\r\n\r\n this._shouldSkip = false;\r\n this._zone.runOutsideAngular(() => {\r\n\r\n const galleryRef: GalleryRef = this._gallery.ref(this.galleryId);\r\n\r\n // TODO: Why is galleryRef.state emits when screen size changes?\r\n const state: Observable = galleryRef.state.pipe(distinctUntilChanged((a: GalleryState, b: GalleryState) => a.currIndex === b.currIndex))\r\n this._autoHeightSubscription = this._imgManager.getActiveItem(state).pipe(\r\n switchMap((img: HTMLImageElement) => {\r\n this.setResizingState({ unobserve: true });\r\n this._galleryCore.style.setProperty('--slider-height', `${ img.clientHeight }px`);\r\n\r\n // Check if the new item height is equal to the current height, there will be no transition,\r\n // So reset resizing state\r\n if (img.height === this._viewport.clientHeight) {\r\n this.resetResizingState({ shouldSkip: true, observe: true });\r\n return EMPTY;\r\n }\r\n return this._afterHeightChanged$.pipe(\r\n tap(() => this.resetResizingState({ shouldSkip: true, observe: true })),\r\n take(1)\r\n );\r\n })\r\n ).subscribe();\r\n });\r\n }\r\n\r\n private _unsubscribeAutoHeight(): void {\r\n this._autoHeightSubscription?.unsubscribe();\r\n }\r\n\r\n private setResizingState({ unobserve }: { unobserve?: boolean } = {}): void {\r\n this._zone.run(() => {\r\n this.isResizingChange.emit(true);\r\n })\r\n this._viewport.classList.add('g-resizing');\r\n if (unobserve) {\r\n // Unobserve the slider while the height is being changed\r\n this._resizeObserver.unobserve(this._viewport);\r\n }\r\n }\r\n\r\n private resetResizingState({ shouldSkip, observe }: { shouldSkip?: boolean, observe?: boolean } = {}): void {\r\n this._zone.run(() => {\r\n this.isResizingChange.emit(false);\r\n })\r\n this._viewport.classList.remove('g-resizing');\r\n this._shouldSkip = shouldSkip;\r\n if (observe) {\r\n this._resizeObserver.observe(this._viewport);\r\n }\r\n }\r\n}\r\n", + "selector": "[sliderResizeObserver]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 70, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 72, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 68, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "isResizingChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 74, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_afterHeightChanged$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "", + "line": 51, + "modifierKind": [ + 121 + ] + }, + { + "name": "_autoHeightSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 44, + "modifierKind": [ + 121 + ] + }, + { + "name": "_resizeObserver", + "deprecated": false, + "deprecationMessage": "", + "type": "ResizeObserver", + "optional": false, + "description": "", + "line": 42, + "modifierKind": [ + 121 + ] + }, + { + "name": "_resizeSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 46, + "modifierKind": [ + 121 + ] + }, + { + "name": "_shouldSkip", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 48, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_subscribeAutoHeight", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 164, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "_unsubscribeAutoHeight", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 194, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "ngAfterViewChecked", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 141, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 132, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 136, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 82, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resetResizingState", + "args": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "{}" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 209, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "{}", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "setResizingState", + "args": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "{}" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 198, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "type": "literal type", + "deprecated": false, + "deprecationMessage": "", + "defaultValue": "{}", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "updateCentralizeCSSVariables", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 157, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "updateSliderSize", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 145, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + } + ], + "implements": [ + "AfterViewChecked", + "OnChanges", + "OnInit", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_imgManager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 74, + "jsdoctags": [ + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_imgManager", + "type": "ImgManager", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_viewport": { + "name": "_viewport", + "getSignature": { + "name": "_viewport", + "type": "", + "returnType": "HTMLElement", + "line": 53 + } + }, + "_galleryCore": { + "name": "_galleryCore", + "getSignature": { + "name": "_galleryCore", + "type": "", + "returnType": "HTMLElement", + "line": 57 + } + }, + "_isAutoHeight": { + "name": "_isAutoHeight", + "getSignature": { + "name": "_isAutoHeight", + "type": "boolean", + "returnType": "boolean", + "line": 61 + } + } + } + }, + { + "name": "SmoothScroll", + "id": "directive-SmoothScroll-5bb27d460fc4a4e1ca2570fbc891c51a47834c7c6604af768ac261f9e520115f379926565a009c6aad180f99b311899a56030c3dcf739ffbf2539d9d56d6c38d", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import {\r\n Directive,\r\n Inject,\r\n Input,\r\n Output,\r\n NgZone,\r\n OnInit,\r\n OnDestroy,\r\n ElementRef,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { Dir } from '@angular/cdk/bidi';\r\nimport { _Bottom, _Left, _Right, _Top, _Without } from '@angular/cdk/scrolling';\r\nimport { getRtlScrollAxisType, RtlScrollAxisType } from '@angular/cdk/platform';\r\nimport {\r\n Observable,\r\n Subject,\r\n Subscriber,\r\n Subscription,\r\n of,\r\n take,\r\n merge,\r\n expand,\r\n fromEvent,\r\n switchMap,\r\n takeUntil,\r\n takeWhile,\r\n finalize\r\n} from 'rxjs';\r\nimport BezierEasing from './bezier-easing';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { SmoothScrollOptions, SmoothScrollStep, SmoothScrollToOptions } from './index';\r\nimport { SliderAdapter } from '../components/adapters';\r\n\r\ndeclare const Hammer: any;\r\n\r\n@Directive({\r\n selector: '[smoothScroll]',\r\n standalone: true,\r\n providers: [Dir]\r\n})\r\nexport class SmoothScroll implements OnInit, OnDestroy {\r\n\r\n /** HammerJS instance */\r\n private _hammer: any;\r\n\r\n private readonly _scrollController: Subject = new Subject();\r\n\r\n private readonly _finished: Subject = new Subject();\r\n\r\n private readonly _el: HTMLElement;\r\n\r\n private _isInterruptedByMouse: boolean;\r\n\r\n private _subscription: Subscription;\r\n\r\n private get _w(): Window {\r\n return this._document.defaultView;\r\n }\r\n\r\n /**\r\n * Timing method\r\n */\r\n private get _now(): () => number {\r\n return this._w.performance?.now?.bind(this._w.performance) || Date.now;\r\n }\r\n\r\n @Input()\r\n set smoothScroll(value: SmoothScrollOptions) {\r\n if (value) {\r\n this._zone.runOutsideAngular(() => {\r\n this.scrollTo(value);\r\n });\r\n }\r\n }\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Input('smoothScrollInterruptOnMousemove') interruptOnMousemove: boolean;\r\n\r\n @Output() isScrollingChange: EventEmitter = new EventEmitter();\r\n\r\n constructor(@Inject(DOCUMENT) private _document: Document,\r\n private _zone: NgZone,\r\n private _dir: Dir,\r\n _el: ElementRef) {\r\n this._el = _el.nativeElement;\r\n }\r\n\r\n ngOnInit(): void {\r\n this._subscription = this._scrollController.pipe(\r\n switchMap((context: SmoothScrollStep) => {\r\n this._zone.run(() => {\r\n this.isScrollingChange.emit(true);\r\n });\r\n\r\n this._el.classList.add('g-scrolling');\r\n this._el.style.setProperty('--slider-scroll-snap-type', 'none');\r\n\r\n // Scroll each step recursively\r\n return of(null).pipe(\r\n expand(() => this._step(context).pipe(\r\n takeWhile((currContext: SmoothScrollStep) => this._isFinished(currContext)),\r\n takeUntil(this._finished)\r\n )),\r\n finalize(() => this.resetElement()),\r\n takeUntil(this._interrupted()),\r\n );\r\n })\r\n ).subscribe();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription?.unsubscribe();\r\n this._scrollController.complete();\r\n }\r\n\r\n /**\r\n * changes scroll position inside an element\r\n */\r\n private _scrollElement(x: number, y: number): void {\r\n this._el.scrollLeft = x;\r\n this._el.scrollTop = y;\r\n }\r\n\r\n private resetElement(): void {\r\n this._zone.run(() => {\r\n this.isScrollingChange.emit(false);\r\n });\r\n\r\n this._el.classList.remove('g-scrolling');\r\n if (!this._isInterruptedByMouse) {\r\n this._el.style.setProperty('--slider-scroll-snap-type', this.adapter.scrollSnapType);\r\n }\r\n this._isInterruptedByMouse = false;\r\n }\r\n\r\n /**\r\n * Checks if smooth scroll has reached, cleans up the smooth scroll stream and resolves its promise\r\n */\r\n private _isFinished(context: SmoothScrollStep): boolean {\r\n if (context.currentX !== context.x || context.currentY !== context.y) {\r\n return true;\r\n }\r\n this._finished.next();\r\n return false;\r\n }\r\n\r\n /**\r\n * Terminates an ongoing smooth scroll\r\n */\r\n private _interrupted(): Observable {\r\n let interrupt$: Observable;\r\n if (this.interruptOnMousemove && typeof Hammer !== 'undefined') {\r\n this._hammer = new Hammer(this._el, { inputClass: Hammer.MouseInput });\r\n this._hammer.get('pan').set({ direction: this.adapter.hammerDirection });\r\n\r\n // For gallery thumb slider, dragging thumbnails should cancel the ongoing scroll\r\n interrupt$ = merge(\r\n new Observable((subscriber: Subscriber) => {\r\n this._hammer.on('panstart', () => {\r\n this._isInterruptedByMouse = true;\r\n subscriber.next();\r\n subscriber.complete();\r\n });\r\n return () => {\r\n this._hammer.destroy();\r\n }\r\n }),\r\n fromEvent(this._el, 'wheel', { passive: true, capture: true }),\r\n fromEvent(this._el, 'touchmove', { passive: true, capture: true }),\r\n )\r\n } else {\r\n interrupt$ = merge(\r\n fromEvent(this._el, 'wheel', { passive: true, capture: true }),\r\n fromEvent(this._el, 'touchmove', { passive: true, capture: true }),\r\n )\r\n }\r\n return interrupt$.pipe(take(1));\r\n }\r\n\r\n /**\r\n * A function called recursively that, given a context, steps through scrolling\r\n */\r\n private _step(context: SmoothScrollStep): Observable {\r\n return new Observable((subscriber: Subscriber) => {\r\n let elapsed: number = (this._now() - context.startTime) / context.duration;\r\n\r\n // avoid elapsed times higher than one\r\n elapsed = elapsed > 1 ? 1 : elapsed;\r\n\r\n // apply easing to elapsed time\r\n const value: number = context.easing(elapsed);\r\n\r\n context.currentX = context.startX + (context.x - context.startX) * value;\r\n context.currentY = context.startY + (context.y - context.startY) * value;\r\n\r\n this._scrollElement(context.currentX, context.currentY);\r\n // Proceed to the step\r\n requestAnimationFrame(() => {\r\n subscriber.next(context);\r\n subscriber.complete();\r\n });\r\n });\r\n }\r\n\r\n private _applyScrollToOptions(options: SmoothScrollToOptions): void {\r\n if (!options.duration) {\r\n this._scrollElement(options.left, options.top);\r\n }\r\n\r\n const context: SmoothScrollStep = {\r\n scrollable: this._el,\r\n startTime: this._now(),\r\n startX: this._el.scrollLeft,\r\n startY: this._el.scrollTop,\r\n x: options.left == null ? this._el.scrollLeft : ~~options.left,\r\n y: options.top == null ? this._el.scrollTop : ~~options.top,\r\n duration: options.duration,\r\n easing: BezierEasing(options.easing.x1, options.easing.y1, options.easing.x2, options.easing.y2)\r\n };\r\n\r\n this._scrollController.next(context);\r\n }\r\n\r\n /**\r\n * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\r\n * method, since browsers are not consistent about what scrollLeft means in RTL. For this method\r\n * left and right always refer to the left and right side of the scrolling container irrespective\r\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\r\n * in an RTL context.\r\n * @param params specified the offsets to scroll to.\r\n */\r\n scrollTo(params: SmoothScrollOptions): void {\r\n const isRtl: boolean = this._dir.value === 'rtl';\r\n const rtlScrollAxisType: RtlScrollAxisType = getRtlScrollAxisType();\r\n\r\n const options: SmoothScrollToOptions = {\r\n ...params,\r\n ...({\r\n // Rewrite start & end offsets as right or left offsets.\r\n left: params.left == null ? (isRtl ? params.end : params.start) : params.left,\r\n right: params.right == null ? (isRtl ? params.start : params.end) : params.right\r\n } as _Without<_Bottom & _Top>),\r\n duration: params.behavior === 'smooth' ? this.config.scrollDuration : 0,\r\n easing: this.config.scrollEase,\r\n };\r\n\r\n // Rewrite the bottom offset as a top offset.\r\n if (options.bottom != null) {\r\n (options as _Without<_Bottom> & _Top).top = this._el.scrollHeight - this._el.clientHeight - options.bottom;\r\n }\r\n\r\n // Rewrite the right offset as a left offset.\r\n if (isRtl && rtlScrollAxisType !== RtlScrollAxisType.NORMAL) {\r\n if (options.left != null) {\r\n (options as _Without<_Left> & _Right).right = this._el.scrollWidth - this._el.clientWidth - options.left;\r\n }\r\n\r\n if (rtlScrollAxisType === RtlScrollAxisType.INVERTED) {\r\n options.left = options.right;\r\n } else if (rtlScrollAxisType === RtlScrollAxisType.NEGATED) {\r\n options.left = options.right ? -options.right : options.right;\r\n }\r\n } else {\r\n if (options.right != null) {\r\n (options as _Without<_Right> & _Left).left = this._el.scrollWidth - this._el.clientWidth - options.right;\r\n }\r\n }\r\n return this._applyScrollToOptions(options);\r\n }\r\n}\r\n", + "selector": "[smoothScroll]", + "providers": [ + { + "name": "Dir" + } + ], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 78, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 80, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "smoothScroll", + "deprecated": false, + "deprecationMessage": "", + "line": 70, + "type": "SmoothScrollOptions", + "decorators": [] + }, + { + "name": "smoothScrollInterruptOnMousemove", + "deprecated": false, + "deprecationMessage": "", + "line": 82, + "type": "boolean", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "isScrollingChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 84, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_el", + "deprecated": false, + "deprecationMessage": "", + "type": "HTMLElement", + "optional": false, + "description": "", + "line": 52, + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "_finished", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 50, + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "_hammer", + "deprecated": false, + "deprecationMessage": "", + "type": "any", + "optional": false, + "description": "

                                                                                                                                  HammerJS instance

                                                                                                                                  \n", + "line": 46, + "rawdescription": "\nHammerJS instance", + "modifierKind": [ + 121 + ] + }, + { + "name": "_isInterruptedByMouse", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 54, + "modifierKind": [ + 121 + ] + }, + { + "name": "_scrollController", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "", + "line": 48, + "modifierKind": [ + 121, + 146 + ] + }, + { + "name": "_subscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 56, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "_applyScrollToOptions", + "args": [ + { + "name": "options", + "type": "SmoothScrollToOptions", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 210, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "options", + "type": "SmoothScrollToOptions", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_interrupted", + "args": [], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 155, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nTerminates an ongoing smooth scroll\n", + "description": "

                                                                                                                                  Terminates an ongoing smooth scroll

                                                                                                                                  \n", + "modifierKind": [ + 121 + ] + }, + { + "name": "_isFinished", + "args": [ + { + "name": "context", + "type": "SmoothScrollStep", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "boolean", + "typeParameters": [], + "line": 144, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nChecks if smooth scroll has reached, cleans up the smooth scroll stream and resolves its promise\n", + "description": "

                                                                                                                                  Checks if smooth scroll has reached, cleans up the smooth scroll stream and resolves its promise

                                                                                                                                  \n", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "context", + "type": "SmoothScrollStep", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_scrollElement", + "args": [ + { + "name": "x", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "y", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nchanges scroll position inside an element\n", + "description": "

                                                                                                                                  changes scroll position inside an element

                                                                                                                                  \n", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "x", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "y", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "_step", + "args": [ + { + "name": "context", + "type": "SmoothScrollStep", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "Observable", + "typeParameters": [], + "line": 188, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nA function called recursively that, given a context, steps through scrolling\n", + "description": "

                                                                                                                                  A function called recursively that, given a context, steps through scrolling

                                                                                                                                  \n", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "context", + "type": "SmoothScrollStep", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 116, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 93, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "resetElement", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + }, + { + "name": "scrollTo", + "args": [ + { + "name": "params", + "type": "SmoothScrollOptions", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 237, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nScrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\nmethod, since browsers are not consistent about what scrollLeft means in RTL. For this method\nleft and right always refer to the left and right side of the scrolling container irrespective\nof the layout direction. start and end refer to left and right in an LTR context and vice-versa\nin an RTL context.\n", + "description": "

                                                                                                                                  Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\nmethod, since browsers are not consistent about what scrollLeft means in RTL. For this method\nleft and right always refer to the left and right side of the scrolling container irrespective\nof the layout direction. start and end refer to left and right in an LTR context and vice-versa\nin an RTL context.

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": { + "pos": 7268, + "end": 7274, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "params" + }, + "type": "SmoothScrollOptions", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "pos": 7262, + "end": 7267, + "flags": 8421376, + "modifierFlagsCache": 0, + "transformFlags": 0, + "kind": 79, + "escapedText": "param" + }, + "comment": "

                                                                                                                                  specified the offsets to scroll to.

                                                                                                                                  \n" + } + ] + } + ], + "implements": [ + "OnInit", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_dir", + "type": "Dir", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 84, + "jsdoctags": [ + { + "name": "_document", + "type": "Document", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_dir", + "type": "Dir", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_w": { + "name": "_w", + "getSignature": { + "name": "_w", + "type": "", + "returnType": "Window", + "line": 58 + } + }, + "_now": { + "name": "_now", + "getSignature": { + "name": "_now", + "type": "function", + "returnType": "number", + "line": 65, + "rawdescription": "\n\nTiming method\n", + "description": "

                                                                                                                                  Timing method

                                                                                                                                  \n" + } + }, + "smoothScroll": { + "name": "smoothScroll", + "setSignature": { + "name": "smoothScroll", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "value", + "type": "SmoothScrollOptions", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 70, + "jsdoctags": [ + { + "name": "value", + "type": "SmoothScrollOptions", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + } + }, + { + "name": "ThumbResizeObserver", + "id": "directive-ThumbResizeObserver-f4bec87bd1f6547135d967c65145c4e86b8754ad467189493e94811d9da357a949c08d5fe3245e0461721df30064e502335e86e3f947efa7efe6026daf1c754d", + "file": "projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts", + "type": "directive", + "description": "", + "rawdescription": "\n", + "sourceCode": "import {\r\n Directive,\r\n Input,\r\n Output,\r\n OnInit,\r\n OnChanges,\r\n OnDestroy,\r\n NgZone,\r\n ElementRef,\r\n SimpleChanges,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { Subscription, tap, auditTime, animationFrameScheduler, debounceTime } from 'rxjs';\r\nimport { resizeObservable } from '../utils/resize-observer';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { SliderAdapter } from '../components/adapters';\r\n\r\n@Directive({\r\n selector: '[thumbResizeObserver]',\r\n standalone: true\r\n})\r\nexport class ThumbResizeObserver implements OnChanges, OnInit, OnDestroy {\r\n\r\n private _resizeSubscription: Subscription;\r\n\r\n private get _viewport(): HTMLElement {\r\n return this._el.nativeElement;\r\n }\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n @Input() adapter: SliderAdapter;\r\n\r\n @Output('thumbResizeObserver') resized: EventEmitter = new EventEmitter();\r\n\r\n constructor(private _el: ElementRef, private _zone: NgZone) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this._zone.runOutsideAngular(() => {\r\n this._resizeSubscription = resizeObservable(this._viewport).pipe(\r\n debounceTime(this.config.resizeDebounceTime, animationFrameScheduler),\r\n tap(() => {\r\n this.updateSliderSize();\r\n this.resized.emit();\r\n })\r\n ).subscribe();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!changes.config.firstChange) {\r\n this.updateSliderSize();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._resizeSubscription?.unsubscribe();\r\n }\r\n\r\n private updateSliderSize(): void {\r\n this._viewport.style.setProperty('--thumb-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px');\r\n this._viewport.style.setProperty('--thumb-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px');\r\n }\r\n}\r\n", + "selector": "[thumbResizeObserver]", + "providers": [], + "hostDirectives": [], + "standalone": true, + "inputsClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "SliderAdapter", + "decorators": [] + }, + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 30, + "type": "GalleryConfig", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "thumbResizeObserver", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "EventEmitter" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "propertiesClass": [ + { + "name": "_resizeSubscription", + "deprecated": false, + "deprecationMessage": "", + "type": "Subscription", + "optional": false, + "description": "", + "line": 24, + "modifierKind": [ + 121 + ] + } + ], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 51, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 57, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "updateSliderSize", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 61, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ] + } + ], + "implements": [ + "OnChanges", + "OnInit", + "OnDestroy" + ], + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 34, + "jsdoctags": [ + { + "name": "_el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_zone", + "type": "NgZone", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "_viewport": { + "name": "_viewport", + "getSignature": { + "name": "_viewport", + "type": "", + "returnType": "HTMLElement", + "line": 26 + } + } + } + } + ], + "components": [ + { + "name": "CustomTemplateComponent", + "id": "component-CustomTemplateComponent-edc20b249ca659a17182a73d77c5802966c041e6796635ca5eccfcf01cc1194a0dca3423b64343dbbc632f79b7ecd2f2cf149030699a28aaa0985a9b731db844", + "file": "projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "custom-templates-example", + "styleUrls": [], + "styles": [ + "\n .item-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 3em auto 0;\n width: 100%;\n max-width: 500px;\n padding: 20px 25px;\n text-align: justify;\n letter-spacing: 1px;\n filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));\n background: #ffffffd9;\n color: black;\n border-radius: 8px;\n }\n " + ], + "template": "\n \n
                                                                                                                                  \n {{ item?.alt }}\n
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "line": 44, + "type": "GalleryItem[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryModule", + "type": "module" + } + ], + "description": "

                                                                                                                                  This section demonstrate how to extend the image template, like displaying a text over the image item

                                                                                                                                  \n", + "rawdescription": "\n\nThis section demonstrate how to extend the image template, like displaying a text over the image item\n", + "type": "component", + "sourceCode": "import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { GalleryModule, GalleryItem, } from 'ng-gallery';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * This section demonstrate how to extend the image template, like displaying a text over the image item\r\n */\r\n@Component({\r\n selector: 'custom-templates-example',\r\n template: `\r\n \r\n \r\n
                                                                                                                                  \r\n {{ item?.alt }}\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .item-text {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n margin: 3em auto 0;\r\n width: 100%;\r\n max-width: 500px;\r\n padding: 20px 25px;\r\n text-align: justify;\r\n letter-spacing: 1px;\r\n filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));\r\n background: #ffffffd9;\r\n color: black;\r\n border-radius: 8px;\r\n }\r\n `],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [CommonModule, GalleryModule]\r\n})\r\nexport class CustomTemplateComponent {\r\n\r\n @Input() items: GalleryItem[];\r\n\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "\n .item-text {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 3em auto 0;\n width: 100%;\n max-width: 500px;\n padding: 20px 25px;\n text-align: justify;\n letter-spacing: 1px;\n filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));\n background: #ffffffd9;\n color: black;\n border-radius: 8px;\n }\n \n" + }, + { + "name": "GalleryBulletsComponent", + "id": "component-GalleryBulletsComponent-d6ea477fcfc6a33a12079db8a4ff27220eb72e6c2be718c39876bb3c5343d921414e3e0be1152a782a07ce92979f0a0612c538d6b94ddf3121d80d759299b90d", + "file": "projects/ng-gallery/src/lib/components/gallery-bullets.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-bullets", + "styleUrls": [ + "./gallery-bullets.scss" + ], + "styles": [], + "template": "
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 28, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 26, + "type": "string", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "line": 27, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "gallery", + "deprecated": false, + "deprecationMessage": "", + "type": "Gallery", + "optional": false, + "description": "", + "line": 30, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n@Component({\r\n selector: 'gallery-bullets',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-bullets.scss'],\r\n template: `\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [CommonModule]\r\n})\r\nexport class GalleryBulletsComponent {\r\n\r\n @Input() galleryId: string;\r\n @Input() state: GalleryState;\r\n @Input() config: GalleryConfig;\r\n\r\n constructor(public gallery: Gallery) {\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n position: absolute;\r\n left: 50%;\r\n z-index: 99;\r\n transform: translateX(-50%);\r\n display: flex;\r\n gap: 6px;\r\n top: var(--bullets-top);\r\n bottom: var(--bullets-bottom);\r\n}\r\n\r\n:host,\r\n.g-bullet,\r\n.g-bullet-inner {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.g-bullet {\r\n cursor: var(--bullets-cursor);\r\n z-index: 20;\r\n\r\n &:hover .g-bullet-inner {\r\n opacity: var(--bullets-hover-opacity);\r\n }\r\n}\r\n\r\n.g-bullet-active .g-bullet-inner {\r\n opacity: var(--bullets-active-opacity);\r\n}\r\n\r\n.g-bullet-inner {\r\n background-color: var(--g-overlay-color);\r\n opacity: var(--bullets-opacity);\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 50%;\r\n transition: opacity linear 150ms;\r\n}\r\n", + "styleUrl": "./gallery-bullets.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 28, + "jsdoctags": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + { + "name": "GalleryComponent", + "id": "component-GalleryComponent-f3b9b0d77cae1496c5a5c79a0e7db4e8fedbebb04a0a06c6e0f96b3d2c5070592a99c09c2dcac483b020014785602acb85805507536bb2891fbd5a2bdf8e4238", + "file": "projects/ng-gallery/src/lib/components/gallery.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [ + { + "name": "ImgManager" + } + ], + "selector": "gallery", + "styleUrls": [ + "./gallery.scss" + ], + "styles": [], + "template": "\n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "required": false, + "name": "autoHeight", + "defaultValue": "this._gallery.config.autoHeight", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAutomatically adjusts the gallery's height to fit the content\n", + "description": "

                                                                                                                                  Automatically adjusts the gallery's height to fit the content

                                                                                                                                  \n", + "line": 121, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "autoplay", + "defaultValue": "this._gallery.config.autoplay", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAutomatically cycle through items at time interval\n", + "description": "

                                                                                                                                  Automatically cycle through items at time interval

                                                                                                                                  \n", + "line": 126, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "autoplayInterval", + "defaultValue": "this._gallery.config.autoplayInterval", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the interval used for the autoplay feature\n", + "description": "

                                                                                                                                  Sets the interval used for the autoplay feature

                                                                                                                                  \n", + "line": 181, + "type": "number", + "decorators": [] + }, + { + "name": "bulletPosition", + "defaultValue": "this._gallery.config.bulletPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the bullets navigation position\n", + "description": "

                                                                                                                                  Sets the bullets navigation position

                                                                                                                                  \n", + "line": 216, + "type": "\"top\" | \"bottom\"", + "decorators": [] + }, + { + "required": false, + "name": "bullets", + "defaultValue": "this._gallery.config.bullets", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplays the navigation bullets\n", + "description": "

                                                                                                                                  Displays the navigation bullets

                                                                                                                                  \n", + "line": 77, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "bulletSize", + "defaultValue": "this._gallery.config.bulletSize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the size of the bullets navigation\n", + "description": "

                                                                                                                                  Sets the size of the bullets navigation

                                                                                                                                  \n", + "line": 166, + "type": "number", + "decorators": [] + }, + { + "required": false, + "name": "counter", + "defaultValue": "this._gallery.config.counter", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplays the counter or pagination\n", + "description": "

                                                                                                                                  Displays the counter or pagination

                                                                                                                                  \n", + "line": 97, + "type": "boolean", + "decorators": [] + }, + { + "name": "counterPosition", + "defaultValue": "this._gallery.config.counterPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the counter navigation position\n", + "description": "

                                                                                                                                  Sets the counter navigation position

                                                                                                                                  \n", + "line": 221, + "type": "\"top\" | \"bottom\"", + "decorators": [] + }, + { + "required": false, + "name": "debug", + "defaultValue": "this._gallery.config.debug", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nShow visuals that helps debugging the component\n", + "description": "

                                                                                                                                  Show visuals that helps debugging the component

                                                                                                                                  \n", + "line": 87, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "detachThumbs", + "defaultValue": "this._gallery.config.detachThumbs", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDe-attaching the thumbnails from the main slider\nIf enabled - thumbnails won't automatically scroll to the active thumbnails\n", + "description": "

                                                                                                                                  De-attaching the thumbnails from the main slider\nIf enabled - thumbnails won't automatically scroll to the active thumbnails

                                                                                                                                  \n", + "line": 103, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableBullets", + "defaultValue": "this._gallery.config.disableBullets", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables bullets' clicks\n", + "description": "

                                                                                                                                  Disables bullets' clicks

                                                                                                                                  \n", + "line": 136, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableMouseScroll", + "defaultValue": "this._gallery.config.disableMouseScroll", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables sliding using the mouse\n", + "description": "

                                                                                                                                  Disables sliding using the mouse

                                                                                                                                  \n", + "line": 156, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableScroll", + "defaultValue": "this._gallery.config.disableScroll", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables sliding using mousewheel, touchpad, scroll and gestures on touch devices\n", + "description": "

                                                                                                                                  Disables sliding using mousewheel, touchpad, scroll and gestures on touch devices

                                                                                                                                  \n", + "line": 141, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableThumbMouseScroll", + "defaultValue": "this._gallery.config.disableThumbMouseScroll", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables sliding of thumbnails using the mouse\n", + "description": "

                                                                                                                                  Disables sliding of thumbnails using the mouse

                                                                                                                                  \n", + "line": 161, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableThumbs", + "defaultValue": "this._gallery.config.disableThumbs", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables thumbnails' clicks\n", + "description": "

                                                                                                                                  Disables thumbnails' clicks

                                                                                                                                  \n", + "line": 131, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "disableThumbScroll", + "defaultValue": "this._gallery.config.disableThumbScroll", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisables sliding of thumbnails using touchpad, scroll and gestures on touch devices\n", + "description": "

                                                                                                                                  Disables sliding of thumbnails using touchpad, scroll and gestures on touch devices

                                                                                                                                  \n", + "line": 146, + "type": "boolean", + "decorators": [] + }, + { + "name": "id", + "defaultValue": "'root'", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nThe gallery instance unique id, required if more multiple gallery instances\n", + "description": "

                                                                                                                                  The gallery instance unique id, required if more multiple gallery instances

                                                                                                                                  \n", + "line": 62, + "type": "string", + "decorators": [] + }, + { + "name": "imageSize", + "defaultValue": "this._gallery.config.imageSize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the object-fit style applied on items' images\n", + "description": "

                                                                                                                                  Sets the object-fit style applied on items' images

                                                                                                                                  \n", + "line": 206, + "type": "\"cover\" | \"contain\"", + "decorators": [] + }, + { + "required": false, + "name": "itemAutosize", + "defaultValue": "this._gallery.config.itemAutosize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFits each item size to its content, This option should be used with:\n- Does not work if `autoHeight` is turned on\n- Does not work properly unless `loadingAttr=\"eager\"`\n- Does not work properly unless `loadingStrategy=\"preload\"`\n", + "description": "

                                                                                                                                  Fits each item size to its content, This option should be used with:

                                                                                                                                  \n
                                                                                                                                    \n
                                                                                                                                  • Does not work if autoHeight is turned on
                                                                                                                                  • \n
                                                                                                                                  • Does not work properly unless loadingAttr="eager"
                                                                                                                                  • \n
                                                                                                                                  • Does not work properly unless loadingStrategy="preload"
                                                                                                                                  • \n
                                                                                                                                  \n", + "line": 116, + "type": "boolean", + "decorators": [] + }, + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoads the items array into the gallery\n", + "description": "

                                                                                                                                  Loads the items array into the gallery

                                                                                                                                  \n", + "line": 67, + "type": "GalleryItem[]", + "decorators": [] + }, + { + "name": "loadingAttr", + "defaultValue": "this._gallery.config.loadingAttr", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the loading attribute applied on the items' images\n", + "description": "

                                                                                                                                  Sets the loading attribute applied on the items' images

                                                                                                                                  \n", + "line": 231, + "type": "\"eager\" | \"lazy\"", + "decorators": [] + }, + { + "name": "loadingStrategy", + "defaultValue": "this._gallery.config.loadingStrategy", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the loading strategy used for displaying the items\n- `lazy` renders only the active item\n- `default` renders only the active item, the previous item and the next item\n- `preload` renders all the items, this option is required for `thumbAutoSize` is enabled\n", + "description": "

                                                                                                                                  Sets the loading strategy used for displaying the items

                                                                                                                                  \n
                                                                                                                                    \n
                                                                                                                                  • lazy renders only the active item
                                                                                                                                  • \n
                                                                                                                                  • default renders only the active item, the previous item and the next item
                                                                                                                                  • \n
                                                                                                                                  • preload renders all the items, this option is required for thumbAutoSize is enabled
                                                                                                                                  • \n
                                                                                                                                  \n", + "line": 239, + "type": "\"preload\" | \"lazy\" | \"default\"", + "decorators": [] + }, + { + "required": false, + "name": "loop", + "defaultValue": "this._gallery.config.loop", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nEnables loop cycling\n", + "description": "

                                                                                                                                  Enables loop cycling

                                                                                                                                  \n", + "line": 82, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "nav", + "defaultValue": "this._gallery.config.nav", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplays the navigation buttons\n", + "description": "

                                                                                                                                  Displays the navigation buttons

                                                                                                                                  \n", + "line": 72, + "type": "boolean", + "decorators": [] + }, + { + "name": "orientation", + "defaultValue": "this._gallery.config.orientation", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the sliding direction\n", + "description": "

                                                                                                                                  Sets the sliding direction

                                                                                                                                  \n", + "line": 226, + "type": "\"horizontal\" | \"vertical\"", + "decorators": [] + }, + { + "required": false, + "name": "resizeDebounceTime", + "defaultValue": "this._gallery.config.resizeDebounceTime", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the debounce time used to throttle the gallery update after it is resized\n", + "description": "

                                                                                                                                  Sets the debounce time used to throttle the gallery update after it is resized

                                                                                                                                  \n", + "line": 191, + "type": "number", + "decorators": [] + }, + { + "name": "scrollBehavior", + "defaultValue": "this._gallery.config.scrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the scroll behavior when the active item is changed\n", + "description": "

                                                                                                                                  Sets the scroll behavior when the active item is changed

                                                                                                                                  \n", + "line": 196, + "type": "ScrollBehavior", + "decorators": [] + }, + { + "required": false, + "name": "scrollDuration", + "defaultValue": "this._gallery.config.scrollDuration", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the duration used for smooth navigation between the items\n", + "description": "

                                                                                                                                  Sets the duration used for smooth navigation between the items

                                                                                                                                  \n", + "line": 186, + "type": "number", + "decorators": [] + }, + { + "name": "scrollEase", + "defaultValue": "this._gallery.config.scrollEase", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the ease function used for smooth navigation between the items\n", + "description": "

                                                                                                                                  Sets the ease function used for smooth navigation between the items

                                                                                                                                  \n", + "line": 201, + "type": "BezierEasingOptions", + "decorators": [] + }, + { + "required": false, + "name": "thumbAutosize", + "defaultValue": "this._gallery.config.thumbAutosize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nFits each thumbnail size to its content\n", + "description": "

                                                                                                                                  Fits each thumbnail size to its content

                                                                                                                                  \n", + "line": 108, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "thumbCentralized", + "defaultValue": "this._gallery.config.thumbCentralized", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nForce centralizing the active thumbnail\n", + "description": "

                                                                                                                                  Force centralizing the active thumbnail

                                                                                                                                  \n", + "line": 151, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "thumbHeight", + "defaultValue": "this._gallery.config.thumbHeight", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the thumbnail's height\n", + "description": "

                                                                                                                                  Sets the thumbnail's height

                                                                                                                                  \n", + "line": 176, + "type": "number", + "decorators": [] + }, + { + "name": "thumbImageSize", + "defaultValue": "this._gallery.config.thumbImageSize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the object-fit style applied on thumbnails' images\n", + "description": "

                                                                                                                                  Sets the object-fit style applied on thumbnails' images

                                                                                                                                  \n", + "line": 211, + "type": "\"cover\" | \"contain\"", + "decorators": [] + }, + { + "name": "thumbPosition", + "defaultValue": "this._gallery.config.thumbPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the thumbnails position, it also sets the sliding direction of the thumbnails accordingly\n", + "description": "

                                                                                                                                  Sets the thumbnails position, it also sets the sliding direction of the thumbnails accordingly

                                                                                                                                  \n", + "line": 244, + "type": "\"top\" | \"left\" | \"right\" | \"bottom\"", + "decorators": [] + }, + { + "required": false, + "name": "thumbs", + "defaultValue": "this._gallery.config.thumbs", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nDisplays the thumbnails\n", + "description": "

                                                                                                                                  Displays the thumbnails

                                                                                                                                  \n", + "line": 92, + "type": "boolean", + "decorators": [] + }, + { + "required": false, + "name": "thumbWidth", + "defaultValue": "this._gallery.config.thumbWidth", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSets the thumbnail's width\n", + "description": "

                                                                                                                                  Sets the thumbnail's width

                                                                                                                                  \n", + "line": 171, + "type": "number", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when an error occurs, this would emit for loading errors of image and video items only\n", + "description": "

                                                                                                                                  Stream that emits when an error occurs, this would emit for loading errors of image and video items only

                                                                                                                                  \n", + "line": 288, + "type": "EventEmitter" + }, + { + "name": "indexChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when index is changed\n", + "description": "

                                                                                                                                  Stream that emits when index is changed

                                                                                                                                  \n", + "line": 278, + "type": "EventEmitter" + }, + { + "name": "itemClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when an item is clicked\n", + "description": "

                                                                                                                                  Stream that emits when an item is clicked

                                                                                                                                  \n", + "line": 263, + "type": "EventEmitter" + }, + { + "name": "itemsChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when items array is changed\n", + "description": "

                                                                                                                                  Stream that emits when items array is changed

                                                                                                                                  \n", + "line": 283, + "type": "EventEmitter" + }, + { + "name": "playingChange", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when player state is changed\n", + "description": "

                                                                                                                                  Stream that emits when player state is changed

                                                                                                                                  \n", + "line": 273, + "type": "EventEmitter" + }, + { + "name": "thumbClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStream that emits when a thumbnail is clicked\n", + "description": "

                                                                                                                                  Stream that emits when a thumbnail is clicked

                                                                                                                                  \n", + "line": 268, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "galleryRef", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryRef", + "optional": false, + "description": "

                                                                                                                                  The gallery reference instance

                                                                                                                                  \n", + "line": 57, + "rawdescription": "\n\nThe gallery reference instance\n" + } + ], + "methodsClass": [ + { + "name": "add", + "args": [ + { + "name": "item", + "type": "GalleryItem", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 451, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd gallery item, it can be any item, suitable to add item with a custom template\n", + "description": "

                                                                                                                                  Add gallery item, it can be any item, suitable to add item with a custom template

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "item", + "type": "GalleryItem", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addIframe", + "args": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 472, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd iframe item\n", + "description": "

                                                                                                                                  Add iframe item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "IframeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addImage", + "args": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 458, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd image item\n", + "description": "

                                                                                                                                  Add image item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "ImageItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addVideo", + "args": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 465, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd video item\n", + "description": "

                                                                                                                                  Add video item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "VideoItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "addYoutube", + "args": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 479, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nAdd Youtube item\n", + "description": "

                                                                                                                                  Add Youtube item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "data", + "type": "YoutubeItemData", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "active", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "load", + "args": [ + { + "name": "items", + "type": "GalleryItem[]", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 444, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nLoad items and reset the state\n", + "description": "

                                                                                                                                  Load items and reset the state

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "items", + "type": "GalleryItem[]", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "next", + "args": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 493, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGo to next item\n", + "description": "

                                                                                                                                  Go to next item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "play", + "args": [ + { + "name": "interval", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 521, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStart the player\n", + "description": "

                                                                                                                                  Start the player

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "interval", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "prev", + "args": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 500, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nGo to prev item\n", + "description": "

                                                                                                                                  Go to prev item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + }, + { + "name": "loop", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "remove", + "args": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 486, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nRemove gallery item by index\n", + "description": "

                                                                                                                                  Remove gallery item by index

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "reset", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 514, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nReset to initial state\n", + "description": "

                                                                                                                                  Reset to initial state

                                                                                                                                  \n" + }, + { + "name": "set", + "args": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 507, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nSet active item\n", + "description": "

                                                                                                                                  Set active item

                                                                                                                                  \n", + "jsdoctags": [ + { + "name": "i", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "stop", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 528, + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\n\nStop the player\n", + "description": "

                                                                                                                                  Stop the player

                                                                                                                                  \n" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryCoreComponent", + "type": "component" + }, + { + "name": "AutoplayDirective", + "type": "directive" + } + ], + "description": "

                                                                                                                                  Gallery component

                                                                                                                                  \n", + "rawdescription": "\n\nGallery component\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n ContentChild,\r\n booleanAttribute,\r\n numberAttribute,\r\n EventEmitter,\r\n OnInit,\r\n AfterContentInit,\r\n OnChanges,\r\n OnDestroy,\r\n SimpleChanges,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Subscription } from 'rxjs';\r\nimport { GalleryCoreComponent } from './gallery-core.component';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryRef } from '../services/gallery-ref';\r\nimport { GalleryError, GalleryItem, GalleryState } from '../models/gallery.model';\r\nimport { IframeItemData, ImageItemData, VideoItemData, YoutubeItemData } from './templates/items.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { BezierEasingOptions } from '../smooth-scroll';\r\nimport { GalleryImageDef } from '../directives/gallery-image-def.directive';\r\nimport { GalleryThumbDef } from '../directives/gallery-thumb-def.directive';\r\nimport { GalleryItemDef } from '../directives/gallery-item-def.directive';\r\nimport { GalleryBoxDef } from '../directives/gallery-box-def.directive';\r\nimport { ImgManager } from '../utils/img-manager';\r\nimport { AutoplayDirective } from '../autoplay/autoplay.directive';\r\n\r\n/**\r\n * Gallery component\r\n */\r\n@Component({\r\n selector: 'gallery',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery.scss'],\r\n template: `\r\n \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryCoreComponent, AutoplayDirective],\r\n providers: [ImgManager]\r\n})\r\nexport class GalleryComponent implements OnInit, AfterContentInit, OnChanges, OnDestroy {\r\n\r\n /**\r\n * The gallery reference instance\r\n */\r\n galleryRef: GalleryRef;\r\n\r\n /**\r\n * The gallery instance unique id, required if more multiple gallery instances\r\n */\r\n @Input() id: string = 'root';\r\n\r\n /**\r\n * Loads the items array into the gallery\r\n */\r\n @Input() items: GalleryItem [];\r\n\r\n /**\r\n * Displays the navigation buttons\r\n */\r\n @Input({ transform: booleanAttribute }) nav: boolean = this._gallery.config.nav;\r\n\r\n /**\r\n * Displays the navigation bullets\r\n */\r\n @Input({ transform: booleanAttribute }) bullets: boolean = this._gallery.config.bullets;\r\n\r\n /**\r\n * Enables loop cycling\r\n */\r\n @Input({ transform: booleanAttribute }) loop: boolean = this._gallery.config.loop;\r\n\r\n /**\r\n * Show visuals that helps debugging the component\r\n */\r\n @Input({ transform: booleanAttribute }) debug: boolean = this._gallery.config.debug;\r\n\r\n /**\r\n * Displays the thumbnails\r\n */\r\n @Input({ transform: booleanAttribute }) thumbs: boolean = this._gallery.config.thumbs;\r\n\r\n /**\r\n * Displays the counter or pagination\r\n */\r\n @Input({ transform: booleanAttribute }) counter: boolean = this._gallery.config.counter;\r\n\r\n /**\r\n * De-attaching the thumbnails from the main slider\r\n * If enabled - thumbnails won't automatically scroll to the active thumbnails\r\n */\r\n @Input({ transform: booleanAttribute }) detachThumbs: boolean = this._gallery.config.detachThumbs;\r\n\r\n /**\r\n * Fits each thumbnail size to its content\r\n */\r\n @Input({ transform: booleanAttribute }) thumbAutosize: boolean = this._gallery.config.thumbAutosize;\r\n\r\n /**\r\n * Fits each item size to its content, This option should be used with:\r\n * - Does not work if `autoHeight` is turned on\r\n * - Does not work properly unless `loadingAttr=\"eager\"`\r\n * - Does not work properly unless `loadingStrategy=\"preload\"`\r\n */\r\n @Input({ transform: booleanAttribute }) itemAutosize: boolean = this._gallery.config.itemAutosize;\r\n\r\n /**\r\n * Automatically adjusts the gallery's height to fit the content\r\n */\r\n @Input({ transform: booleanAttribute }) autoHeight: boolean = this._gallery.config.autoHeight;\r\n\r\n /**\r\n * Automatically cycle through items at time interval\r\n */\r\n @Input({ transform: booleanAttribute }) autoplay: boolean = this._gallery.config.autoplay;\r\n\r\n /**\r\n * Disables thumbnails' clicks\r\n */\r\n @Input({ transform: booleanAttribute }) disableThumbs: boolean = this._gallery.config.disableThumbs;\r\n\r\n /**\r\n * Disables bullets' clicks\r\n */\r\n @Input({ transform: booleanAttribute }) disableBullets: boolean = this._gallery.config.disableBullets;\r\n\r\n /**\r\n * Disables sliding using mousewheel, touchpad, scroll and gestures on touch devices\r\n */\r\n @Input({ transform: booleanAttribute }) disableScroll: boolean = this._gallery.config.disableScroll;\r\n\r\n /**\r\n * Disables sliding of thumbnails using touchpad, scroll and gestures on touch devices\r\n */\r\n @Input({ transform: booleanAttribute }) disableThumbScroll: boolean = this._gallery.config.disableThumbScroll;\r\n\r\n /**\r\n * Force centralizing the active thumbnail\r\n */\r\n @Input({ transform: booleanAttribute }) thumbCentralized: boolean = this._gallery.config.thumbCentralized;\r\n\r\n /**\r\n * Disables sliding using the mouse\r\n */\r\n @Input({ transform: booleanAttribute }) disableMouseScroll: boolean = this._gallery.config.disableMouseScroll;\r\n\r\n /**\r\n * Disables sliding of thumbnails using the mouse\r\n */\r\n @Input({ transform: booleanAttribute }) disableThumbMouseScroll: boolean = this._gallery.config.disableThumbMouseScroll;\r\n\r\n /**\r\n * Sets the size of the bullets navigation\r\n */\r\n @Input({ transform: numberAttribute }) bulletSize: number = this._gallery.config.bulletSize;\r\n\r\n /**\r\n * Sets the thumbnail's width\r\n */\r\n @Input({ transform: numberAttribute }) thumbWidth: number = this._gallery.config.thumbWidth;\r\n\r\n /**\r\n * Sets the thumbnail's height\r\n */\r\n @Input({ transform: numberAttribute }) thumbHeight: number = this._gallery.config.thumbHeight;\r\n\r\n /**\r\n * Sets the interval used for the autoplay feature\r\n */\r\n @Input({ transform: numberAttribute }) autoplayInterval: number = this._gallery.config.autoplayInterval;\r\n\r\n /**\r\n * Sets the duration used for smooth navigation between the items\r\n */\r\n @Input({ transform: numberAttribute }) scrollDuration: number = this._gallery.config.scrollDuration;\r\n\r\n /**\r\n * Sets the debounce time used to throttle the gallery update after it is resized\r\n */\r\n @Input({ transform: numberAttribute }) resizeDebounceTime: number = this._gallery.config.resizeDebounceTime;\r\n\r\n /**\r\n * Sets the scroll behavior when the active item is changed\r\n */\r\n @Input() scrollBehavior: ScrollBehavior = this._gallery.config.scrollBehavior;\r\n\r\n /**\r\n * Sets the ease function used for smooth navigation between the items\r\n */\r\n @Input() scrollEase: BezierEasingOptions = this._gallery.config.scrollEase;\r\n\r\n /**\r\n * Sets the object-fit style applied on items' images\r\n */\r\n @Input() imageSize: 'cover' | 'contain' = this._gallery.config.imageSize;\r\n\r\n /**\r\n * Sets the object-fit style applied on thumbnails' images\r\n */\r\n @Input() thumbImageSize: 'cover' | 'contain' = this._gallery.config.thumbImageSize;\r\n\r\n /**\r\n * Sets the bullets navigation position\r\n */\r\n @Input() bulletPosition: 'top' | 'bottom' = this._gallery.config.bulletPosition;\r\n\r\n /**\r\n * Sets the counter navigation position\r\n */\r\n @Input() counterPosition: 'top' | 'bottom' = this._gallery.config.counterPosition;\r\n\r\n /**\r\n * Sets the sliding direction\r\n */\r\n @Input() orientation: 'horizontal' | 'vertical' = this._gallery.config.orientation;\r\n\r\n /**\r\n * Sets the loading attribute applied on the items' images\r\n */\r\n @Input() loadingAttr: 'eager' | 'lazy' = this._gallery.config.loadingAttr;\r\n\r\n /**\r\n * Sets the loading strategy used for displaying the items\r\n * - `lazy` renders only the active item\r\n * - `default` renders only the active item, the previous item and the next item\r\n * - `preload` renders all the items, this option is required for `thumbAutoSize` is enabled\r\n */\r\n @Input() loadingStrategy: 'preload' | 'lazy' | 'default' = this._gallery.config.loadingStrategy;\r\n\r\n /**\r\n * Sets the thumbnails position, it also sets the sliding direction of the thumbnails accordingly\r\n */\r\n @Input() thumbPosition: 'top' | 'left' | 'right' | 'bottom' = this._gallery.config.thumbPosition;\r\n\r\n /**\r\n * Destroy gallery ref on component destroy event\r\n * This intended to be used and disabled from the lightbox component\r\n * @ignore\r\n * */\r\n @Input() destroyRef: boolean = true;\r\n\r\n /**\r\n * Skip initializing the config with components inputs (Lightbox mode)\r\n * This intended to be used and enabled from the lightbox component\r\n * @ignore\r\n */\r\n @Input() skipInitConfig: boolean = false;\r\n\r\n /**\r\n * Stream that emits when an item is clicked\r\n */\r\n @Output() itemClick: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stream that emits when a thumbnail is clicked\r\n */\r\n @Output() thumbClick: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stream that emits when player state is changed\r\n */\r\n @Output() playingChange: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stream that emits when index is changed\r\n */\r\n @Output() indexChange: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stream that emits when items array is changed\r\n */\r\n @Output() itemsChange: EventEmitter = new EventEmitter();\r\n\r\n /**\r\n * Stream that emits when an error occurs, this would emit for loading errors of image and video items only\r\n */\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n /** @ignore */\r\n @ContentChild(GalleryItemDef) private _galleryItemDef: GalleryItemDef;\r\n /** @ignore */\r\n @ContentChild(GalleryImageDef) private _galleryImageDef: GalleryImageDef;\r\n /** @ignore */\r\n @ContentChild(GalleryThumbDef) private _galleryThumbDef: GalleryThumbDef;\r\n /** @ignore */\r\n @ContentChild(GalleryBoxDef) private _galleryBoxDef: GalleryBoxDef;\r\n\r\n /** @ignore */\r\n private _itemClick$: Subscription;\r\n /** @ignore */\r\n private _thumbClick$: Subscription;\r\n /** @ignore */\r\n private _itemChange$: Subscription;\r\n /** @ignore */\r\n private _indexChange$: Subscription;\r\n /** @ignore */\r\n private _playingChange$: Subscription;\r\n\r\n constructor(private _gallery: Gallery) {\r\n }\r\n\r\n /** @ignore */\r\n private getConfig(): GalleryConfig {\r\n return {\r\n nav: this.nav,\r\n bullets: this.bullets,\r\n loop: this.loop,\r\n debug: this.debug,\r\n thumbs: this.thumbs,\r\n counter: this.counter,\r\n autoplay: this.autoplay,\r\n bulletSize: this.bulletSize,\r\n imageSize: this.imageSize,\r\n thumbImageSize: this.thumbImageSize,\r\n scrollBehavior: this.scrollBehavior,\r\n thumbCentralized: this.thumbCentralized,\r\n thumbWidth: this.thumbWidth,\r\n thumbHeight: this.thumbHeight,\r\n scrollEase: this.scrollEase,\r\n bulletPosition: this.bulletPosition,\r\n loadingAttr: this.loadingAttr,\r\n detachThumbs: this.detachThumbs,\r\n thumbPosition: this.thumbPosition,\r\n autoplayInterval: this.autoplayInterval,\r\n counterPosition: this.counterPosition,\r\n loadingStrategy: this.loadingStrategy,\r\n scrollDuration: this.scrollDuration,\r\n orientation: this.orientation,\r\n resizeDebounceTime: this.resizeDebounceTime,\r\n disableBullets: this.disableBullets,\r\n disableThumbs: this.disableThumbs,\r\n disableScroll: this.disableScroll,\r\n disableThumbScroll: this.disableThumbScroll,\r\n disableMouseScroll: this.disableMouseScroll,\r\n disableThumbMouseScroll: this.disableThumbMouseScroll,\r\n thumbAutosize: this.thumbAutosize,\r\n itemAutosize: this.itemAutosize,\r\n autoHeight: this.autoHeight\r\n };\r\n }\r\n\r\n\r\n /** @ignore */\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this.galleryRef) {\r\n this.galleryRef.setConfig(this.getConfig());\r\n\r\n if (changes.items && changes.items.currentValue !== changes.items.previousValue) {\r\n this.load(this.items);\r\n }\r\n }\r\n }\r\n\r\n\r\n /** @ignore */\r\n ngOnInit(): void {\r\n // Get gallery instance by id\r\n if (this.skipInitConfig) {\r\n this.galleryRef = this._gallery.ref(this.id);\r\n } else {\r\n this.galleryRef = this._gallery.ref(this.id, this.getConfig());\r\n }\r\n\r\n // Load gallery items\r\n this.load(this.items);\r\n\r\n // Subscribes to events on demand\r\n if (this.indexChange.observed) {\r\n this._indexChange$ = this.galleryRef.indexChanged.subscribe((state: GalleryState) => this.indexChange.emit(state));\r\n }\r\n if (this.itemsChange.observed) {\r\n this._itemChange$ = this.galleryRef.itemsChanged.subscribe((state: GalleryState) => this.itemsChange.emit(state));\r\n }\r\n if (this.playingChange.observed) {\r\n this._playingChange$ = this.galleryRef.playingChanged.subscribe((state: GalleryState) => this.playingChange.emit(state));\r\n }\r\n }\r\n\r\n /** @ignore */\r\n ngAfterContentInit(): void {\r\n const templateConfig: GalleryConfig = {};\r\n if (this._galleryItemDef) {\r\n templateConfig.itemTemplate = this._galleryItemDef.templateRef;\r\n }\r\n if (this._galleryImageDef) {\r\n templateConfig.imageTemplate = this._galleryImageDef.templateRef;\r\n }\r\n if (this._galleryThumbDef) {\r\n templateConfig.thumbTemplate = this._galleryThumbDef.templateRef;\r\n }\r\n if (this._galleryBoxDef) {\r\n templateConfig.boxTemplate = this._galleryBoxDef.templateRef;\r\n }\r\n if (Object.keys(templateConfig).length) {\r\n this.galleryRef.setConfig(templateConfig);\r\n }\r\n }\r\n\r\n /** @ignore */\r\n ngOnDestroy(): void {\r\n this._itemClick$?.unsubscribe();\r\n this._thumbClick$?.unsubscribe();\r\n this._itemChange$?.unsubscribe();\r\n this._indexChange$?.unsubscribe();\r\n this._playingChange$?.unsubscribe();\r\n if (this.destroyRef) {\r\n this.galleryRef?.destroy();\r\n }\r\n }\r\n\r\n /** @ignore */\r\n onItemClick(i: number): void {\r\n this.itemClick.emit(i);\r\n this.galleryRef.itemClick.next(i);\r\n }\r\n\r\n /** @ignore */\r\n onThumbClick(i: number): void {\r\n this.galleryRef.set(i);\r\n this.thumbClick.emit(i);\r\n this.galleryRef.thumbClick.next(i);\r\n }\r\n\r\n /** @ignore */\r\n onError(err: GalleryError): void {\r\n this.error.emit(err);\r\n this.galleryRef.error.next(err);\r\n }\r\n\r\n /**\r\n * Load items and reset the state\r\n */\r\n load(items: GalleryItem[]): void {\r\n this.galleryRef.load(items);\r\n }\r\n\r\n /**\r\n * Add gallery item, it can be any item, suitable to add item with a custom template\r\n */\r\n add(item: GalleryItem, active?: boolean): void {\r\n this.galleryRef.add(item, active);\r\n }\r\n\r\n /**\r\n * Add image item\r\n */\r\n addImage(data: ImageItemData, active?: boolean): void {\r\n this.galleryRef.addImage(data, active);\r\n }\r\n\r\n /**\r\n * Add video item\r\n */\r\n addVideo(data: VideoItemData, active?: boolean): void {\r\n this.galleryRef.addVideo(data, active);\r\n }\r\n\r\n /**\r\n * Add iframe item\r\n */\r\n addIframe(data: IframeItemData, active?: boolean): void {\r\n this.galleryRef.addIframe(data, active);\r\n }\r\n\r\n /**\r\n * Add Youtube item\r\n */\r\n addYoutube(data: YoutubeItemData, active?: boolean): void {\r\n this.galleryRef.addYoutube(data, active);\r\n }\r\n\r\n /**\r\n * Remove gallery item by index\r\n */\r\n remove(i: number): void {\r\n this.galleryRef.remove(i);\r\n }\r\n\r\n /**\r\n * Go to next item\r\n */\r\n next(behavior?: ScrollBehavior, loop?: boolean): void {\r\n this.galleryRef.next(behavior, loop);\r\n }\r\n\r\n /**\r\n * Go to prev item\r\n */\r\n prev(behavior?: ScrollBehavior, loop?: boolean): void {\r\n this.galleryRef.prev(behavior, loop);\r\n }\r\n\r\n /**\r\n * Set active item\r\n */\r\n set(i: number, behavior?: ScrollBehavior): void {\r\n this.galleryRef.set(i, behavior);\r\n }\r\n\r\n /**\r\n * Reset to initial state\r\n */\r\n reset(): void {\r\n this.galleryRef.reset();\r\n }\r\n\r\n /**\r\n * Start the player\r\n */\r\n play(interval?: number): void {\r\n this.galleryRef.play(interval);\r\n }\r\n\r\n /**\r\n * Stop the player\r\n */\r\n stop(): void {\r\n this.galleryRef.stop();\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n position: relative;\r\n overflow: hidden;\r\n z-index: 1;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: black;\r\n\r\n --g-height-transition: height 468ms cubic-bezier(0.42, 0, 0.58, 1);\r\n --g-nav-drop-shadow: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));\r\n --g-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);\r\n --g-font-color: #000;\r\n --g-overlay-color: #fff;\r\n --g-gutter-size: 1px;\r\n\r\n &[gallerize] {\r\n --g-item-cursor: pointer;\r\n }\r\n}\r\n", + "styleUrl": "./gallery.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 308, + "jsdoctags": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit", + "AfterContentInit", + "OnChanges", + "OnDestroy" + ] + }, + { + "name": "GalleryCoreComponent", + "id": "component-GalleryCoreComponent-514605865ce30ecc993dd769363ed85b2b4a73ad2e35e255bc6bf494a7fd417d17686b154afdb47ec6e1e2bfd947a7bf4bc8f1e5bbe16561c1540101ac9d6de1", + "file": "projects/ng-gallery/src/lib/components/gallery-core.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-core", + "styleUrls": [ + "./gallery-core.scss", + "../styles/debug.scss" + ], + "styles": [], + "template": "\n\n
                                                                                                                                  \n \n\n 1\"\n [state]=\"state\"\n [config]=\"config\"\n [galleryId]=\"galleryId\"/>\n\n \n\n \n\n \n\n
                                                                                                                                  \n \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 71, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 69, + "type": "string", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "line": 70, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 74, + "type": "EventEmitter" + }, + { + "name": "itemClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 72, + "type": "EventEmitter" + }, + { + "name": "thumbClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 73, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [ + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 154, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "attr.autoHeight", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery autoHeight styles", + "description": "

                                                                                                                                  Set gallery autoHeight styles

                                                                                                                                  \n", + "line": 132, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.bulletDisabled", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet bullets' clicks", + "description": "

                                                                                                                                  Set bullets' clicks

                                                                                                                                  \n", + "line": 92, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.bulletPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery bullets position", + "description": "

                                                                                                                                  Set gallery bullets position

                                                                                                                                  \n", + "line": 97, + "type": "\"top\" | \"bottom\"", + "decorators": [] + }, + { + "name": "attr.counterPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery counter position", + "description": "

                                                                                                                                  Set gallery counter position

                                                                                                                                  \n", + "line": 112, + "type": "\"top\" | \"bottom\"", + "decorators": [] + }, + { + "name": "attr.debug", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet debug style", + "description": "

                                                                                                                                  Set debug style

                                                                                                                                  \n", + "line": 147, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.dir", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet direction", + "description": "

                                                                                                                                  Set direction

                                                                                                                                  \n", + "line": 142, + "type": "Direction", + "decorators": [] + }, + { + "name": "attr.imageSize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery image size property", + "description": "

                                                                                                                                  Set gallery image size property

                                                                                                                                  \n", + "line": 102, + "type": "\"cover\" | \"contain\"", + "decorators": [] + }, + { + "name": "attr.itemAutosize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet items autosize styles", + "description": "

                                                                                                                                  Set items autosize styles

                                                                                                                                  \n", + "line": 127, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.orientation", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet sliding direction", + "description": "

                                                                                                                                  Set sliding direction

                                                                                                                                  \n", + "line": 82, + "type": "\"horizontal\" | \"vertical\"", + "decorators": [] + }, + { + "name": "attr.scrollDisabled", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nDisable sliding using sliding via touchpad, mousewheel and gestures", + "description": "

                                                                                                                                  Disable sliding using sliding via touchpad, mousewheel and gestures

                                                                                                                                  \n", + "line": 117, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.thumbAutosize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery thumb autosize styles", + "description": "

                                                                                                                                  Set gallery thumb autosize styles

                                                                                                                                  \n", + "line": 137, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.thumbDisabled", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nDisable thumbnails' clicks", + "description": "

                                                                                                                                  Disable thumbnails' clicks

                                                                                                                                  \n", + "line": 87, + "type": "boolean", + "decorators": [] + }, + { + "name": "attr.thumbImageSize", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet gallery thumb image size property", + "description": "

                                                                                                                                  Set gallery thumb image size property

                                                                                                                                  \n", + "line": 107, + "type": "\"contain\" | \"cover\"", + "decorators": [] + }, + { + "name": "attr.thumbPosition", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nSet thumbnails position", + "description": "

                                                                                                                                  Set thumbnails position

                                                                                                                                  \n", + "line": 77, + "type": "\"top\" | \"left\" | \"right\" | \"bottom\"", + "decorators": [] + }, + { + "name": "attr.thumbScrollDisabled", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nDisable thumb sliding using sliding via touchpad, mousewheel and gestures", + "description": "

                                                                                                                                  Disable thumb sliding using sliding via touchpad, mousewheel and gestures

                                                                                                                                  \n", + "line": 122, + "type": "boolean", + "decorators": [] + } + ], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryThumbsComponent", + "type": "component" + }, + { + "name": "GallerySliderComponent", + "type": "component" + }, + { + "name": "GalleryNavComponent", + "type": "component" + }, + { + "name": "GalleryBulletsComponent", + "type": "component" + }, + { + "name": "GalleryCounterComponent", + "type": "component" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n HostBinding,\r\n EventEmitter,\r\n OnChanges,\r\n SimpleChanges,\r\n ElementRef,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { coerceCssPixelValue } from '@angular/cdk/coercion';\r\nimport { Direction, Directionality } from '@angular/cdk/bidi';\r\nimport { GalleryCounterComponent } from './gallery-counter.component';\r\nimport { GalleryBulletsComponent } from './gallery-bullets.component';\r\nimport { GalleryNavComponent } from './gallery-nav.component';\r\nimport { GallerySliderComponent } from './gallery-slider.component';\r\nimport { GalleryThumbsComponent } from './gallery-thumbs.component';\r\nimport { GalleryError, GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n@Component({\r\n selector: 'gallery-core',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-core.scss', '../styles/debug.scss'],\r\n template: `\r\n \r\n\r\n
                                                                                                                                  \r\n \r\n\r\n 1\"\r\n [state]=\"state\"\r\n [config]=\"config\"\r\n [galleryId]=\"galleryId\"/>\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryThumbsComponent, GallerySliderComponent, GalleryNavComponent, GalleryBulletsComponent, GalleryCounterComponent]\r\n})\r\nexport class GalleryCoreComponent implements OnChanges {\r\n\r\n @Input() galleryId: string;\r\n @Input() state: GalleryState;\r\n @Input() config: GalleryConfig;\r\n @Output() itemClick: EventEmitter = new EventEmitter();\r\n @Output() thumbClick: EventEmitter = new EventEmitter();\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n /** Set thumbnails position */\r\n @HostBinding('attr.thumbPosition') get thumbPosition(): 'top' | 'left' | 'right' | 'bottom' {\r\n return this.config.thumbPosition;\r\n }\r\n\r\n /** Set sliding direction */\r\n @HostBinding('attr.orientation') get orientation(): 'horizontal' | 'vertical' {\r\n return this.config.orientation;\r\n }\r\n\r\n /** Disable thumbnails' clicks */\r\n @HostBinding('attr.thumbDisabled') get disableThumb(): boolean {\r\n return this.config.disableThumbs;\r\n }\r\n\r\n /** Set bullets' clicks */\r\n @HostBinding('attr.bulletDisabled') get bulletDisabled(): boolean {\r\n return this.config.disableBullets;\r\n }\r\n\r\n /** Set gallery bullets position */\r\n @HostBinding('attr.bulletPosition') get bulletPosition(): 'top' | 'bottom' {\r\n return this.config.bulletPosition;\r\n }\r\n\r\n /** Set gallery image size property */\r\n @HostBinding('attr.imageSize') get imageSize(): 'cover' | 'contain' {\r\n return this.config.imageSize;\r\n }\r\n\r\n /** Set gallery thumb image size property */\r\n @HostBinding('attr.thumbImageSize') get thumbImageSize(): 'contain' | 'cover' {\r\n return this.config.thumbImageSize;\r\n }\r\n\r\n /** Set gallery counter position */\r\n @HostBinding('attr.counterPosition') get counterPosition(): 'top' | 'bottom' {\r\n return this.config.counterPosition;\r\n }\r\n\r\n /** Disable sliding using sliding via touchpad, mousewheel and gestures */\r\n @HostBinding('attr.scrollDisabled') get scrollDisabled(): boolean {\r\n return this.config.disableScroll;\r\n }\r\n\r\n /** Disable thumb sliding using sliding via touchpad, mousewheel and gestures */\r\n @HostBinding('attr.thumbScrollDisabled') get thumbScrollDisabled(): boolean {\r\n return this.config.disableThumbScroll;\r\n }\r\n\r\n /** Set items autosize styles */\r\n @HostBinding('attr.itemAutosize') get itemAutosize(): boolean {\r\n return this.config.itemAutosize;\r\n }\r\n\r\n /** Set gallery autoHeight styles */\r\n @HostBinding('attr.autoHeight') get autoHeight(): boolean {\r\n return this.config.autoHeight;\r\n }\r\n\r\n /** Set gallery thumb autosize styles */\r\n @HostBinding('attr.thumbAutosize') get thumbAutosize(): boolean {\r\n return this.config.thumbAutosize;\r\n }\r\n\r\n /** Set direction */\r\n @HostBinding('attr.dir') get direction(): Direction {\r\n return this.dir.value;\r\n }\r\n\r\n /** Set debug style */\r\n @HostBinding('attr.debug') get debug(): boolean {\r\n return this.config.debug;\r\n }\r\n\r\n constructor(private el: ElementRef, private dir: Directionality) {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n if (changes.config.currentValue?.thumbWidth !== changes.config.previousValue?.thumbWidth) {\r\n this.el.nativeElement.style.setProperty('--g-thumb-width', coerceCssPixelValue(changes.config.currentValue.thumbWidth));\r\n }\r\n if (changes.config.currentValue?.thumbHeight !== changes.config.previousValue?.thumbHeight) {\r\n this.el.nativeElement.style.setProperty('--g-thumb-height', coerceCssPixelValue(changes.config.currentValue.thumbHeight));\r\n }\r\n }\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n position: relative;\r\n overflow: hidden;\r\n display: flex;\r\n gap: var(--g-gutter-size);\r\n width: 100%;\r\n height: 500px;\r\n min-height: 100%;\r\n max-height: 100%;\r\n\r\n &[thumbPosition='top'] {\r\n flex-direction: column;\r\n }\r\n\r\n &[thumbPosition='left'] {\r\n flex-direction: row;\r\n }\r\n\r\n &[thumbPosition='right'] {\r\n flex-direction: row-reverse;\r\n }\r\n\r\n &[thumbPosition='bottom'] {\r\n flex-direction: column-reverse;\r\n }\r\n\r\n // Gallery auto-height variables\r\n &[autoHeight='true'][itemAutoSize='false'][orientation='horizontal'] {\r\n &[thumbPosition='top'], &[thumbPosition='bottom'] {\r\n // if auto-height, use fit-content\r\n height: fit-content;\r\n --g-item-height: auto !important;\r\n --g-item-max-height: auto;\r\n }\r\n }\r\n\r\n // Gallery image variables\r\n --image-object-fit: unset;\r\n\r\n &[imageSize='contain'] gallery-slider,\r\n &[thumbImageSize='contain'] gallery-thumbs {\r\n --image-object-fit: contain;\r\n }\r\n\r\n &[imageSize='cover'] gallery-slider,\r\n &[thumbImageSize='cover'] gallery-thumbs {\r\n --image-object-fit: cover;\r\n }\r\n\r\n // Gallery thumbs variables\r\n --slider-thumb-height: unset;\r\n --slider-thumb-width: unset;\r\n --thumb-slider-left: unset;\r\n --thumb-slider-overflow: unset;\r\n --thumb-slider-flex-direction: unset;\r\n --g-thumb-width: unset;\r\n --g-thumb-height: unset;\r\n --g-thumb-cursor: pointer;\r\n\r\n &[thumbPosition='top'],\r\n &[thumbPosition='bottom'] {\r\n --thumb-slider-top: 0;\r\n --thumb-slider-overflow: auto hidden;\r\n --thumb-slider-flex-direction: row;\r\n --g-thumb-height: 100%;\r\n\r\n &[thumbAutosize=\"true\"] {\r\n --g-thumb-width: auto !important;\r\n }\r\n }\r\n\r\n &[thumbPosition='left'],\r\n &[thumbPosition='right'] {\r\n --thumb-slider-left: 0;\r\n --thumb-slider-overflow: hidden auto;\r\n --thumb-slider-flex-direction: column;\r\n --g-thumb-width: 100%;\r\n\r\n &[thumbAutosize=\"true\"] {\r\n --g-thumb-height: auto !important;\r\n }\r\n }\r\n\r\n &[thumbDisbled='true'] {\r\n --g-thumb-cursor: default;\r\n }\r\n\r\n &[thumbScrollDisabled='true'] {\r\n --thumb-slider-overflow: hidden !important;\r\n }\r\n\r\n // Gallery slider variables\r\n --slider-scroll-snap-type: unset;\r\n --slider-overflow: unset;\r\n --slider-flex-direction: unset;\r\n --slider-width: unset;\r\n --slider-height: unset;\r\n --slider-content-width: unset;\r\n --slider-content-height: unset;\r\n\r\n &[orientation='horizontal'] {\r\n --slider-overflow: auto hidden;\r\n --slider-scroll-snap-type: x mandatory;\r\n --slider-flex-direction: row;\r\n --slider-content-height: 100%;\r\n }\r\n\r\n &[orientation='vertical'] {\r\n --slider-overflow: hidden auto;\r\n --slider-scroll-snap-type: y mandatory;\r\n --slider-flex-direction: column;\r\n --slider-content-width: 100%;\r\n }\r\n\r\n &[scrollDisabled='true'] {\r\n --slider-overflow: hidden !important;\r\n }\r\n\r\n // Gallery items variables\r\n --g-item-width: unset;\r\n --g-item-height: unset;\r\n --g-item-max-height: var(--slider-height);\r\n\r\n &[orientation='horizontal'] {\r\n --g-item-width: var(--slider-width);\r\n --g-item-height: 100%;\r\n\r\n &[itemAutoSize='true'] {\r\n --g-item-width: auto;\r\n }\r\n }\r\n\r\n &[orientation='vertical'] {\r\n --g-item-width: 100%;\r\n --g-item-height: var(--slider-height);\r\n\r\n &[itemAutoSize='true'] {\r\n --g-item-height: auto;\r\n }\r\n }\r\n\r\n // Gallery bullets variables\r\n --bullets-top: unset;\r\n --bullets-bottom: unset;\r\n --bullets-cursor: pointer;\r\n --bullets-opacity: 0.4;\r\n --bullets-hover-opacity: 1;\r\n --bullets-active-opacity: 1;\r\n\r\n &[bulletPosition='top'] {\r\n --bullets-top: 15px;\r\n }\r\n\r\n &[bulletPosition='bottom'] {\r\n --bullets-bottom: 15px;\r\n }\r\n\r\n &[bulletDisabled='true'] {\r\n --bullets-cursor: default;\r\n --bullets-hover-opacity: var(--bullets-opacity);\r\n }\r\n\r\n // Gallery position variables\r\n --counter-top: unset;\r\n --counter-bottom: unset;\r\n --counter-border-radius: unset;\r\n\r\n &[counterPosition='top'] {\r\n --counter-top: 0;\r\n --counter-border-radius: 0 0 4px 4px;\r\n }\r\n\r\n &[counterPosition='bottom'] {\r\n --counter-bottom: 0;\r\n --counter-border-radius: 4px 4px 0 0;\r\n }\r\n\r\n // Gallery nav variables\r\n --nav-space: 8px;\r\n --nav-hover-space: 6.4px;\r\n --nav-next-right: unset;\r\n --nav-next-hover-right: unset;\r\n --nav-next-left: unset;\r\n --nav-next-hover-left: unset;\r\n\r\n &[dir='ltr'] {\r\n --nav-next-transform: translateY(-50%) perspective(1px);\r\n --nav-next-right: var(--nav-space);\r\n --nav-next-hover-right: var(--nav-hover-space);\r\n\r\n --nav-prev-transform: translateY(-50%) perspective(1px) scale(-1, -1);\r\n --nav-prev-left: var(--nav-space);\r\n --nav-prev-hover-left: var(--nav-hover-space);\r\n }\r\n\r\n &[dir='rtl'] {\r\n --nav-next-transform: translateY(-50%) perspective(1px) scale(-1, -1);\r\n --nav-next-left: var(--nav-space);\r\n --nav-next-hover-left: var(--nav-hover-space);\r\n\r\n --nav-prev-transform: translateY(-50%) perspective(1px);\r\n --nav-prev-right: var(--nav-space);\r\n --nav-prev-hover-right: var(--nav-hover-space);\r\n }\r\n}\r\n\r\n.g-box {\r\n overflow: hidden;\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n order: 1;\r\n flex: 1;\r\n}\r\n\r\n.g-box-template {\r\n position: absolute;\r\n z-index: 10;\r\n}\r\n", + "styleUrl": "./gallery-core.scss" + }, + { + "data": ":host[debug='true'] {\r\n ::ng-deep {\r\n .g-sliding, .g-resizing, .g-scrolling {\r\n gallery-item.g-item-highlight {\r\n visibility: hidden;\r\n }\r\n }\r\n }\r\n\r\n ::ng-deep {\r\n gallery-slider {\r\n &:after, &:before {\r\n position: absolute;\r\n content: '';\r\n z-index: 12;\r\n }\r\n\r\n &:before {\r\n width: 100%;\r\n height: 0;\r\n border-top: 1px dashed lime;\r\n }\r\n\r\n &:after {\r\n height: 100%;\r\n width: 0;\r\n border-left: 1px dashed lime;\r\n }\r\n\r\n gallery-item {\r\n outline: 1px solid darkorange;\r\n\r\n &.g-item-highlight {\r\n &:after {\r\n content: '';\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n border: 3px solid lime;\r\n box-sizing: border-box;\r\n z-index: 10;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .g-sliding {\r\n .g-slider-sliding {\r\n display: block;\r\n }\r\n }\r\n\r\n .g-scrolling {\r\n .g-slider-scrolling {\r\n display: block;\r\n }\r\n }\r\n\r\n .g-resizing {\r\n .g-slider-resizing {\r\n display: block;\r\n }\r\n }\r\n\r\n .g-slider-debug {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n display: flex;\r\n gap: 5px;\r\n padding: 10px;\r\n\r\n .g-slider-resizing {\r\n background: rgba(245, 76, 40);\r\n }\r\n\r\n .g-slider-scrolling {\r\n background: rgb(255, 133, 36);\r\n }\r\n\r\n .g-slider-sliding {\r\n background: rgb(31, 108, 185);\r\n }\r\n\r\n div, &:before {\r\n display: none;\r\n color: white;\r\n font-family: monospace;\r\n z-index: 12;\r\n padding: 2px 6px;\r\n border-radius: 3px;\r\n }\r\n }\r\n }\r\n\r\n &[itemAutoSize='false'] {\r\n ::ng-deep {\r\n .g-slider-debug {\r\n &:before {\r\n content: var(--intersection-margin);\r\n background: rgba(236, 236, 236, 0.84);\r\n color: #363636;\r\n display: block;\r\n }\r\n }\r\n }\r\n }\r\n\r\n &[itemAutoSize='true'] {\r\n ::ng-deep {\r\n gallery-item {\r\n &:before {\r\n position: absolute;\r\n margin: 10px;\r\n content: var(--item-intersection-margin);\r\n background: rgba(236, 236, 236, 0.84);\r\n color: #363636;\r\n display: block;\r\n width: 270px;\r\n font-family: monospace;\r\n z-index: 12;\r\n padding: 2px 6px;\r\n border-radius: 3px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n", + "styleUrl": "../styles/debug.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 149, + "jsdoctags": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnChanges" + ], + "accessors": { + "thumbPosition": { + "name": "thumbPosition", + "getSignature": { + "name": "thumbPosition", + "type": "", + "returnType": "\"top\" | \"left\" | \"right\" | \"bottom\"", + "line": 77, + "rawdescription": "\nSet thumbnails position", + "description": "

                                                                                                                                  Set thumbnails position

                                                                                                                                  \n" + } + }, + "orientation": { + "name": "orientation", + "getSignature": { + "name": "orientation", + "type": "", + "returnType": "\"horizontal\" | \"vertical\"", + "line": 82, + "rawdescription": "\nSet sliding direction", + "description": "

                                                                                                                                  Set sliding direction

                                                                                                                                  \n" + } + }, + "disableThumb": { + "name": "disableThumb", + "getSignature": { + "name": "disableThumb", + "type": "boolean", + "returnType": "boolean", + "line": 87, + "rawdescription": "\nDisable thumbnails' clicks", + "description": "

                                                                                                                                  Disable thumbnails' clicks

                                                                                                                                  \n" + } + }, + "bulletDisabled": { + "name": "bulletDisabled", + "getSignature": { + "name": "bulletDisabled", + "type": "boolean", + "returnType": "boolean", + "line": 92, + "rawdescription": "\nSet bullets' clicks", + "description": "

                                                                                                                                  Set bullets' clicks

                                                                                                                                  \n" + } + }, + "bulletPosition": { + "name": "bulletPosition", + "getSignature": { + "name": "bulletPosition", + "type": "", + "returnType": "\"top\" | \"bottom\"", + "line": 97, + "rawdescription": "\nSet gallery bullets position", + "description": "

                                                                                                                                  Set gallery bullets position

                                                                                                                                  \n" + } + }, + "imageSize": { + "name": "imageSize", + "getSignature": { + "name": "imageSize", + "type": "", + "returnType": "\"cover\" | \"contain\"", + "line": 102, + "rawdescription": "\nSet gallery image size property", + "description": "

                                                                                                                                  Set gallery image size property

                                                                                                                                  \n" + } + }, + "thumbImageSize": { + "name": "thumbImageSize", + "getSignature": { + "name": "thumbImageSize", + "type": "", + "returnType": "\"contain\" | \"cover\"", + "line": 107, + "rawdescription": "\nSet gallery thumb image size property", + "description": "

                                                                                                                                  Set gallery thumb image size property

                                                                                                                                  \n" + } + }, + "counterPosition": { + "name": "counterPosition", + "getSignature": { + "name": "counterPosition", + "type": "", + "returnType": "\"top\" | \"bottom\"", + "line": 112, + "rawdescription": "\nSet gallery counter position", + "description": "

                                                                                                                                  Set gallery counter position

                                                                                                                                  \n" + } + }, + "scrollDisabled": { + "name": "scrollDisabled", + "getSignature": { + "name": "scrollDisabled", + "type": "boolean", + "returnType": "boolean", + "line": 117, + "rawdescription": "\nDisable sliding using sliding via touchpad, mousewheel and gestures", + "description": "

                                                                                                                                  Disable sliding using sliding via touchpad, mousewheel and gestures

                                                                                                                                  \n" + } + }, + "thumbScrollDisabled": { + "name": "thumbScrollDisabled", + "getSignature": { + "name": "thumbScrollDisabled", + "type": "boolean", + "returnType": "boolean", + "line": 122, + "rawdescription": "\nDisable thumb sliding using sliding via touchpad, mousewheel and gestures", + "description": "

                                                                                                                                  Disable thumb sliding using sliding via touchpad, mousewheel and gestures

                                                                                                                                  \n" + } + }, + "itemAutosize": { + "name": "itemAutosize", + "getSignature": { + "name": "itemAutosize", + "type": "boolean", + "returnType": "boolean", + "line": 127, + "rawdescription": "\nSet items autosize styles", + "description": "

                                                                                                                                  Set items autosize styles

                                                                                                                                  \n" + } + }, + "autoHeight": { + "name": "autoHeight", + "getSignature": { + "name": "autoHeight", + "type": "boolean", + "returnType": "boolean", + "line": 132, + "rawdescription": "\nSet gallery autoHeight styles", + "description": "

                                                                                                                                  Set gallery autoHeight styles

                                                                                                                                  \n" + } + }, + "thumbAutosize": { + "name": "thumbAutosize", + "getSignature": { + "name": "thumbAutosize", + "type": "boolean", + "returnType": "boolean", + "line": 137, + "rawdescription": "\nSet gallery thumb autosize styles", + "description": "

                                                                                                                                  Set gallery thumb autosize styles

                                                                                                                                  \n" + } + }, + "direction": { + "name": "direction", + "getSignature": { + "name": "direction", + "type": "", + "returnType": "Direction", + "line": 142, + "rawdescription": "\nSet direction", + "description": "

                                                                                                                                  Set direction

                                                                                                                                  \n" + } + }, + "debug": { + "name": "debug", + "getSignature": { + "name": "debug", + "type": "boolean", + "returnType": "boolean", + "line": 147, + "rawdescription": "\nSet debug style", + "description": "

                                                                                                                                  Set debug style

                                                                                                                                  \n" + } + } + } + }, + { + "name": "GalleryCounterComponent", + "id": "component-GalleryCounterComponent-c248b3b0b6b8f0d3298ca31037cb1a504376fe2b67f55c2275da836b4d13b5540ae785d4fa76ddfce225a78c2490a8e8140bb2cd4138e8ebc19b17083481a5f7", + "file": "projects/ng-gallery/src/lib/components/gallery-counter.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-counter", + "styleUrls": [ + "./gallery-counter.scss" + ], + "styles": [], + "template": "
                                                                                                                                  {{ (state.currIndex + 1) + ' / ' + state.items.length }}
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "line": 14, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\r\nimport { GalleryState } from '../models/gallery.model';\r\n\r\n@Component({\r\n selector: 'gallery-counter',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-counter.scss'],\r\n template: `\r\n
                                                                                                                                  {{ (state.currIndex + 1) + ' / ' + state.items.length }}
                                                                                                                                  \r\n `,\r\n standalone: true\r\n})\r\nexport class GalleryCounterComponent {\r\n @Input() state: GalleryState;\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".g-counter {\r\n font-weight: bold;\r\n user-select: none;\r\n opacity: 0.6;\r\n transition: opacity linear 150ms;\r\n z-index: 50;\r\n position: absolute;\r\n left: 50%;\r\n transform: translateX(-50%) perspective(1px);\r\n font-size: 12px;\r\n padding: 4px 10px;\r\n color: var(--g-font-color);\r\n background-color: var(--g-overlay-color);\r\n box-shadow: var(--g-box-shadow);\r\n\r\n top: var(--counter-top);\r\n bottom: var(--counter-bottom);\r\n border-radius: var(--counter-border-radius);\r\n\r\n &:hover {\r\n opacity: 0.8;\r\n }\r\n}\r\n", + "styleUrl": "./gallery-counter.scss" + } + ], + "stylesData": "" + }, + { + "name": "GalleryIframeComponent", + "id": "component-GalleryIframeComponent-f80fe77d8a6d367c9515bf9b4da61d8c7535dc721032b9dc75e5bd532552daf36798da47e8ddfa9c551a720e012b267c2553c4a2ca0aab949041ccb52847a902", + "file": "projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-iframe", + "styleUrls": [], + "styles": [], + "template": "\n\n \n\n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "autoplay", + "deprecated": false, + "deprecationMessage": "", + "line": 52, + "type": "boolean", + "decorators": [] + }, + { + "name": "loadingAttr", + "deprecated": false, + "deprecationMessage": "", + "line": 54, + "type": "\"eager\" | \"lazy\"", + "decorators": [] + }, + { + "name": "pause", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "boolean", + "decorators": [] + }, + { + "name": "src", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "iframe", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 56, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'iframe'" + } + ], + "modifierKind": [ + 167 + ] + }, + { + "name": "iframeSrc", + "deprecated": false, + "deprecationMessage": "", + "type": "SafeResourceUrl", + "optional": false, + "description": "", + "line": 31 + }, + { + "name": "videoSrc", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 32 + } + ], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "NgIf" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, ViewChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgIf } from '@angular/common';\r\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\r\n\r\n@Component({\r\n selector: 'gallery-iframe',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n \r\n \r\n \r\n `,\r\n standalone: true,\r\n imports: [NgIf]\r\n})\r\nexport class GalleryIframeComponent {\r\n\r\n iframeSrc: SafeResourceUrl;\r\n videoSrc: string;\r\n\r\n @Input('src') set src(src: string) {\r\n this.videoSrc = src;\r\n this.iframeSrc = this._sanitizer.bypassSecurityTrustResourceUrl(src);\r\n }\r\n\r\n @Input('pause') set pauseVideo(shouldPause: boolean) {\r\n if (this.iframe?.nativeElement) {\r\n if (shouldPause) {\r\n const iframe: HTMLIFrameElement = this.iframe.nativeElement;\r\n iframe.src = null;\r\n\r\n if (!this.autoplay && this.videoSrc) {\r\n this.iframeSrc = this._sanitizer.bypassSecurityTrustResourceUrl(this.videoSrc);\r\n }\r\n }\r\n }\r\n }\r\n\r\n @Input() autoplay: boolean;\r\n\r\n @Input() loadingAttr: 'eager' | 'lazy';\r\n\r\n @ViewChild('iframe') iframe: ElementRef;\r\n\r\n constructor(private _sanitizer: DomSanitizer) {\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 56, + "jsdoctags": [ + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "src": { + "name": "src", + "setSignature": { + "name": "src", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "src", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 34, + "jsdoctags": [ + { + "name": "src", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + "pauseVideo": { + "name": "pauseVideo", + "setSignature": { + "name": "pauseVideo", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "shouldPause", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 39, + "jsdoctags": [ + { + "name": "shouldPause", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + } + }, + { + "name": "GalleryImageComponent", + "id": "component-GalleryImageComponent-2ecb40ba37998297cbb5c07d50509e1eb10d2408f3d8cf25b5736c7999f6701872985ee34f4f7483a0fd99bdfcf71149ac5b4d41b1ed2b2f467734f089840705", + "file": "projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-image", + "styleUrls": [ + "./gallery-image.scss" + ], + "styles": [], + "template": "\n\n \n \n \n \n \n \n\n
                                                                                                                                  \n
                                                                                                                                  \n \n \n

                                                                                                                                  \n
                                                                                                                                  \n

                                                                                                                                  \n
                                                                                                                                  \n \n

                                                                                                                                  \n
                                                                                                                                  \n

                                                                                                                                  \n

                                                                                                                                  Unable to load the image!

                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n\n \n
                                                                                                                                  \n
                                                                                                                                  \n \n
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "alt", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nImage alt", + "description": "

                                                                                                                                  Image alt

                                                                                                                                  \n", + "line": 101, + "type": "string", + "decorators": [] + }, + { + "name": "errorIcon", + "defaultValue": "imageFailedSvg", + "deprecated": false, + "deprecationMessage": "", + "line": 116, + "type": "string", + "decorators": [] + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "line": 95, + "type": "number", + "decorators": [] + }, + { + "name": "isThumbnail", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nIs thumbnail", + "description": "

                                                                                                                                  Is thumbnail

                                                                                                                                  \n", + "line": 93, + "type": "boolean", + "decorators": [] + }, + { + "name": "loadingAttr", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nImage loading attribute", + "description": "

                                                                                                                                  Image loading attribute

                                                                                                                                  \n", + "line": 98, + "type": "\"eager\" | \"lazy\"", + "decorators": [] + }, + { + "name": "loadingError", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nCustom error template", + "description": "

                                                                                                                                  Custom error template

                                                                                                                                  \n", + "line": 112, + "type": "string", + "decorators": [] + }, + { + "name": "loadingIcon", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nCustom loader template", + "description": "

                                                                                                                                  Custom loader template

                                                                                                                                  \n", + "line": 107, + "type": "string", + "decorators": [] + }, + { + "name": "src", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nImage source URL", + "description": "

                                                                                                                                  Image source URL

                                                                                                                                  \n", + "line": 104, + "type": "string", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when an error occurs", + "description": "

                                                                                                                                  Stream that emits when an error occurs

                                                                                                                                  \n", + "line": 120, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "errorSvg", + "deprecated": false, + "deprecationMessage": "", + "type": "SafeHtml", + "optional": false, + "description": "", + "line": 117 + }, + { + "name": "errorTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "SafeHtml", + "optional": false, + "description": "

                                                                                                                                  Custom error safe template

                                                                                                                                  \n", + "line": 114, + "rawdescription": "\nCustom error safe template" + }, + { + "name": "loaderTemplate", + "deprecated": false, + "deprecationMessage": "", + "type": "SafeHtml", + "optional": false, + "description": "

                                                                                                                                  Custom loader safe template

                                                                                                                                  \n", + "line": 109, + "rawdescription": "\nCustom loader safe template" + }, + { + "name": "state", + "defaultValue": "'loading'", + "deprecated": false, + "deprecationMessage": "", + "type": "ItemState", + "optional": false, + "description": "", + "line": 90 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 129, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "attr.imageState", + "deprecated": false, + "deprecationMessage": "", + "line": 122, + "type": "string", + "decorators": [] + } + ], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "NgSwitch" + }, + { + "name": "NgSwitchCase" + }, + { + "name": "NgIf" + }, + { + "name": "ImgRecognizer" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n HostBinding,\r\n EventEmitter,\r\n OnInit,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { NgSwitch, NgSwitchCase, NgIf } from '@angular/common';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { animate, style, transition, trigger } from '@angular/animations';\r\nimport { imageFailedSvg } from './svg-assets';\r\nimport { ImgRecognizer } from '../../utils/img-recognizer';\r\nimport { ItemState } from './items.model';\r\n\r\n@Component({\r\n selector: 'gallery-image',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-image.scss'],\r\n animations: [\r\n trigger('fadeIn', [\r\n transition('* => success', [\r\n style({ opacity: 0 }),\r\n animate('300ms ease-in', style({ opacity: 1 }))\r\n ])\r\n ])\r\n ],\r\n template: `\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n \r\n

                                                                                                                                  \r\n
                                                                                                                                  \r\n

                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n

                                                                                                                                  \r\n
                                                                                                                                  \r\n

                                                                                                                                  \r\n

                                                                                                                                  Unable to load the image!

                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n\r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [NgSwitch, NgSwitchCase, NgIf, ImgRecognizer]\r\n})\r\n\r\nexport class GalleryImageComponent implements OnInit {\r\n\r\n state: ItemState = 'loading';\r\n\r\n /** Is thumbnail */\r\n @Input() isThumbnail: boolean;\r\n\r\n @Input() index: number;\r\n\r\n /** Image loading attribute */\r\n @Input() loadingAttr: 'eager' | 'lazy';\r\n\r\n /** Image alt */\r\n @Input() alt: string;\r\n\r\n /** Image source URL */\r\n @Input() src: string;\r\n\r\n /** Custom loader template */\r\n @Input() loadingIcon: string;\r\n /** Custom loader safe template */\r\n loaderTemplate: SafeHtml;\r\n\r\n /** Custom error template */\r\n @Input() loadingError: string;\r\n /** Custom error safe template */\r\n errorTemplate: SafeHtml;\r\n\r\n @Input() errorIcon: string = imageFailedSvg;\r\n errorSvg: SafeHtml;\r\n\r\n /** Stream that emits when an error occurs */\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n @HostBinding('attr.imageState') get imageState(): string {\r\n return this.state;\r\n }\r\n\r\n constructor(private _sanitizer: DomSanitizer) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.loadingIcon) {\r\n this.loaderTemplate = this._sanitizer.bypassSecurityTrustHtml(this.loadingIcon);\r\n }\r\n if (this.loadingError) {\r\n this.errorTemplate = this._sanitizer.bypassSecurityTrustHtml(this.loadingError);\r\n }\r\n if (this.errorIcon) {\r\n this.errorSvg = this._sanitizer.bypassSecurityTrustHtml(this.errorIcon);\r\n }\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n display: flex;\r\n width: 100%;\r\n height: 100%;\r\n max-height: 100%;\r\n max-width: 100%;\r\n transition: opacity 300ms cubic-bezier(0.5, 0, 0.5, 1);\r\n opacity: var(--g-thumb-opacity);\r\n\r\n &[imageState='success'] {\r\n align-self: center;\r\n }\r\n\r\n ::ng-deep {\r\n svg {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n }\r\n}\r\n\r\n.gallery-image-error {\r\n width: 100px;\r\n height: 100px;\r\n}\r\n\r\n.gallery-thumb-error {\r\n width: 40px;\r\n height: 40px;\r\n}\r\n\r\nimg.g-image-item {\r\n object-fit: var(--image-object-fit);\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n max-height: 100%;\r\n max-width: 100%;\r\n}\r\n\r\n.g-image-error-message {\r\n position: absolute;\r\n z-index: 10;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n color: white;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n}\r\n\r\nh2, h4 {\r\n color: coral;\r\n margin: 0;\r\n}\r\n\r\nh2 {\r\n font-size: 3.5em;\r\n margin-bottom: 0.3em;\r\n}\r\n\r\nh4 {\r\n font-size: 1.6em;\r\n}\r\n\r\n.g-loading {\r\n position: absolute;\r\n transform: translate3d(-50%, -50%, 0);\r\n left: 50%;\r\n top: 50%;\r\n width: 80px;\r\n height: 80px;\r\n}\r\n\r\n// Thumbnail loading\r\n\r\n$loading-color: #fff !default;\r\n$placeholder-ng: #262626 !default;\r\n\r\n.g-active-thumb {\r\n .g-thumb-loading {\r\n background-color: #464646;\r\n }\r\n}\r\n\r\n.g-thumb-loading {\r\n position: relative;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: $placeholder-ng;\r\n\r\n &::before {\r\n content: \"\";\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 50%;\r\n z-index: 1;\r\n width: 500%;\r\n margin-left: -250%;\r\n animation: phAnimation .8s linear infinite;\r\n background: linear-gradient(to right, rgba($loading-color, 0) 46%, rgba($loading-color, .35) 50%, rgba($loading-color, 0) 54%) 50% 50%;\r\n }\r\n}\r\n\r\n@keyframes phAnimation {\r\n 0% {\r\n transform: translate3d(-30%, 0, 0);\r\n }\r\n 100% {\r\n transform: translate3d(30%, 0, 0);\r\n }\r\n}\r\n", + "styleUrl": "./gallery-image.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 124, + "jsdoctags": [ + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ], + "accessors": { + "imageState": { + "name": "imageState", + "getSignature": { + "name": "imageState", + "type": "string", + "returnType": "string", + "line": 122 + } + } + } + }, + { + "name": "GalleryItemComponent", + "id": "component-GalleryItemComponent-658b2eb839084d173eb340b21ce8e09f3515d46388ee03d9a284ac032974bcf745aac1a4b30c49fb4bc4ba7764ec7dc22475b6432ecf70d2d669140c172fba24", + "file": "projects/ng-gallery/src/lib/components/gallery-item.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-item", + "styleUrls": [ + "./gallery-item.scss" + ], + "styles": [], + "template": "\n \n \n\n
                                                                                                                                  \n \n
                                                                                                                                  \n
                                                                                                                                  \n\n \n\n \n\n \n\n \n
                                                                                                                                  \n \n
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery config", + "description": "

                                                                                                                                  Gallery config

                                                                                                                                  \n", + "line": 84, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "count", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nThe number of total items", + "description": "

                                                                                                                                  The number of total items

                                                                                                                                  \n", + "line": 90, + "type": "number", + "decorators": [] + }, + { + "name": "currIndex", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery current index", + "description": "

                                                                                                                                  Gallery current index

                                                                                                                                  \n", + "line": 93, + "type": "number", + "decorators": [] + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's data, this object contains the data required to display the content (e.g. src path)", + "description": "

                                                                                                                                  Item's data, this object contains the data required to display the content (e.g. src path)

                                                                                                                                  \n", + "line": 99, + "type": "GalleryItemData", + "decorators": [] + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's index in the gallery", + "description": "

                                                                                                                                  Item's index in the gallery

                                                                                                                                  \n", + "line": 87, + "type": "number", + "decorators": [] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's type 'image', 'video', 'youtube', 'iframe'", + "description": "

                                                                                                                                  Item's type 'image', 'video', 'youtube', 'iframe'

                                                                                                                                  \n", + "line": 96, + "type": "GalleryItemType", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when an error occurs", + "description": "

                                                                                                                                  Stream that emits when an error occurs

                                                                                                                                  \n", + "line": 102, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "isItemContainImage", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "

                                                                                                                                  A flag that indicates if the item is type of image, it can be a custom template by the user,\nThe img recognizer directive will set it to true

                                                                                                                                  \n", + "line": 81, + "rawdescription": "\nA flag that indicates if the item is type of image, it can be a custom template by the user,\nThe img recognizer directive will set it to true" + }, + { + "name": "state$", + "defaultValue": "new BehaviorSubject('loading')", + "deprecated": false, + "deprecationMessage": "", + "type": "BehaviorSubject", + "optional": false, + "description": "

                                                                                                                                  A stream that indicates that the height was emitted after the image is loaded, used only for gallery image types

                                                                                                                                  \n", + "line": 77, + "rawdescription": "\nA stream that indicates that the height was emitted after the image is loaded, used only for gallery image types", + "modifierKind": [ + 146 + ] + }, + { + "name": "Types", + "defaultValue": "GalleryItemTypes", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "optional": false, + "description": "", + "line": 74, + "modifierKind": [ + 146 + ] + } + ], + "methodsClass": [ + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 188, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "attr.galleryIndex", + "deprecated": false, + "deprecationMessage": "", + "line": 108, + "type": "number", + "decorators": [] + }, + { + "name": "attr.itemState", + "deprecated": false, + "deprecationMessage": "", + "line": 112, + "type": "ItemState", + "decorators": [] + }, + { + "name": "class.g-active-item", + "deprecated": false, + "deprecationMessage": "", + "line": 104, + "type": "boolean", + "decorators": [] + } + ], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryImageComponent", + "type": "component" + }, + { + "name": "GalleryVideoComponent", + "type": "component" + }, + { + "name": "GalleryIframeComponent", + "type": "component" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n HostBinding,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n AfterViewInit,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { GalleryItemContext } from '../directives/gallery-item-def.directive';\r\nimport { GalleryIframeComponent } from './templates/gallery-iframe.component';\r\nimport { GalleryVideoComponent } from './templates/gallery-video.component';\r\nimport { GalleryImageComponent } from './templates/gallery-image.component';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { GalleryItemType, GalleryItemTypes, LoadingStrategy } from '../models/constants';\r\nimport { GalleryItemData, ImageItemData, ItemState, VideoItemData, YoutubeItemData } from './templates/items.model';\r\n\r\n@Component({\r\n selector: 'gallery-item',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-item.scss'],\r\n template: `\r\n \r\n \r\n \r\n\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryImageComponent, GalleryVideoComponent, GalleryIframeComponent]\r\n})\r\nexport class GalleryItemComponent implements AfterViewInit {\r\n\r\n readonly Types = GalleryItemTypes;\r\n\r\n /** A stream that indicates that the height was emitted after the image is loaded, used only for gallery image types */\r\n readonly state$: BehaviorSubject = new BehaviorSubject('loading');\r\n\r\n /** A flag that indicates if the item is type of image, it can be a custom template by the user,\r\n * The img recognizer directive will set it to true*/\r\n isItemContainImage: boolean;\r\n\r\n /** Gallery config */\r\n @Input() config: GalleryConfig;\r\n\r\n /** Item's index in the gallery */\r\n @Input() index: number;\r\n\r\n /** The number of total items */\r\n @Input() count: number;\r\n\r\n /** Gallery current index */\r\n @Input() currIndex: number;\r\n\r\n /** Item's type 'image', 'video', 'youtube', 'iframe' */\r\n @Input() type: GalleryItemType;\r\n\r\n /** Item's data, this object contains the data required to display the content (e.g. src path) */\r\n @Input() data: GalleryItemData;\r\n\r\n /** Stream that emits when an error occurs */\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n @HostBinding('class.g-active-item') get isActive(): boolean {\r\n return this.index === this.currIndex;\r\n }\r\n\r\n @HostBinding('attr.galleryIndex') get isIndexAttr(): number {\r\n return this.index;\r\n }\r\n\r\n @HostBinding('attr.itemState') get itemState(): ItemState {\r\n return this.state$.value;\r\n }\r\n\r\n get imageContext(): GalleryItemContext {\r\n return {\r\n $implicit: this.imageData,\r\n index: this.index,\r\n type: this.type,\r\n active: this.isActive,\r\n count: this.count,\r\n first: this.index === 0,\r\n last: this.index === this.count - 1\r\n };\r\n }\r\n\r\n get itemContext(): GalleryItemContext {\r\n return {\r\n $implicit: this.data,\r\n index: this.index,\r\n type: this.type,\r\n active: this.isActive,\r\n count: this.count,\r\n first: this.index === 0,\r\n last: this.index === this.count - 1\r\n };\r\n }\r\n\r\n get nativeElement(): HTMLElement {\r\n return this.el.nativeElement;\r\n }\r\n\r\n get isAutoPlay(): boolean {\r\n if (this.isActive) {\r\n if (this.type === GalleryItemTypes.Video || this.type === GalleryItemTypes.Youtube) {\r\n return this.videoData.autoplay;\r\n }\r\n }\r\n }\r\n\r\n get youtubeSrc(): string {\r\n let autoplay: 1 | 0 = 0;\r\n if (this.isActive && this.type === GalleryItemTypes.Youtube && (this.data as YoutubeItemData).autoplay) {\r\n autoplay = 1;\r\n }\r\n const url: URL = new URL(this.data.src as string);\r\n url.search = new URLSearchParams({\r\n wmode: 'transparent',\r\n ...(this.data as YoutubeItemData).params,\r\n autoplay\r\n }).toString();\r\n return url.href;\r\n }\r\n\r\n get load(): boolean {\r\n switch (this.config.loadingStrategy) {\r\n case LoadingStrategy.Preload:\r\n return true;\r\n case LoadingStrategy.Lazy:\r\n return this.currIndex === this.index;\r\n default:\r\n return this.currIndex === this.index || this.currIndex === this.index - 1 || this.currIndex === this.index + 1;\r\n }\r\n }\r\n\r\n get imageData(): ImageItemData {\r\n return this.data;\r\n }\r\n\r\n get videoData(): VideoItemData {\r\n return this.data;\r\n }\r\n\r\n constructor(private el: ElementRef) {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // If item does not contain an image, then set the state to DONE\r\n if (!this.isItemContainImage) {\r\n this.state$.next('success');\r\n }\r\n }\r\n}\r\n\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n cursor: var(--g-item-cursor);\r\n height: var(--g-item-height);\r\n width: var(--g-item-width);\r\n max-height: var(--g-item-max-height);\r\n max-width: var(--slider-width);\r\n z-index: 10;\r\n position: relative;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n flex: 0 0 auto;\r\n scroll-snap-align: center;\r\n\r\n // Disable highlighting the elements on mouse move or click\r\n user-select: none;\r\n -webkit-user-drag: none;\r\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\r\n\r\n // In itemAutoSize is true, item size will be zero until it is loaded, fallback to the slider size\r\n &[itemState='loading'] {\r\n width: var(--slider-width);\r\n height: var(--slider-height);\r\n }\r\n\r\n > * {\r\n height: 100%;\r\n }\r\n\r\n ::ng-deep {\r\n video, iframe {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n }\r\n}\r\n\r\ngallery-image {\r\n width: var(--g-item-width);\r\n height: var(--g-item-height);\r\n}\r\n\r\n.g-template {\r\n position: absolute;\r\n z-index: 10;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n color: white;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n}\r\n", + "styleUrl": "./gallery-item.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 183, + "jsdoctags": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "AfterViewInit" + ], + "accessors": { + "isActive": { + "name": "isActive", + "getSignature": { + "name": "isActive", + "type": "boolean", + "returnType": "boolean", + "line": 104 + } + }, + "isIndexAttr": { + "name": "isIndexAttr", + "getSignature": { + "name": "isIndexAttr", + "type": "number", + "returnType": "number", + "line": 108 + } + }, + "itemState": { + "name": "itemState", + "getSignature": { + "name": "itemState", + "type": "", + "returnType": "ItemState", + "line": 112 + } + }, + "imageContext": { + "name": "imageContext", + "getSignature": { + "name": "imageContext", + "type": "", + "returnType": "GalleryItemContext", + "line": 116 + } + }, + "itemContext": { + "name": "itemContext", + "getSignature": { + "name": "itemContext", + "type": "", + "returnType": "GalleryItemContext", + "line": 128 + } + }, + "nativeElement": { + "name": "nativeElement", + "getSignature": { + "name": "nativeElement", + "type": "", + "returnType": "HTMLElement", + "line": 140 + } + }, + "isAutoPlay": { + "name": "isAutoPlay", + "getSignature": { + "name": "isAutoPlay", + "type": "boolean", + "returnType": "boolean", + "line": 144 + } + }, + "youtubeSrc": { + "name": "youtubeSrc", + "getSignature": { + "name": "youtubeSrc", + "type": "string", + "returnType": "string", + "line": 152 + } + }, + "load": { + "name": "load", + "getSignature": { + "name": "load", + "type": "boolean", + "returnType": "boolean", + "line": 166 + } + }, + "imageData": { + "name": "imageData", + "getSignature": { + "name": "imageData", + "type": "", + "returnType": "ImageItemData", + "line": 177 + } + }, + "videoData": { + "name": "videoData", + "getSignature": { + "name": "videoData", + "type": "", + "returnType": "VideoItemData", + "line": 181 + } + } + } + }, + { + "name": "GalleryNavComponent", + "id": "component-GalleryNavComponent-46e7626ad70c440670b8f602a5fec6ba6bcd1a7d8e5c34268aecdd68c82e1d1e0b21e5b6d3d83feaf9c2e67cdfeb1770ab4458dcd2b918546f1c4d7bb5294360", + "file": "projects/ng-gallery/src/lib/components/gallery-nav.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-nav", + "styleUrls": [ + "./gallery-nav.scss" + ], + "styles": [], + "template": "\n\n\n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 36, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "string", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "dir", + "deprecated": false, + "deprecationMessage": "", + "type": "Directionality", + "optional": false, + "description": "", + "line": 38, + "modifierKind": [ + 123 + ] + }, + { + "name": "gallery", + "deprecated": false, + "deprecationMessage": "", + "type": "Gallery", + "optional": false, + "description": "", + "line": 38, + "modifierKind": [ + 123 + ] + }, + { + "name": "navIcon", + "deprecated": false, + "deprecationMessage": "", + "type": "SafeHtml", + "optional": false, + "description": "", + "line": 33 + } + ], + "methodsClass": [ + { + "name": "leftButton", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 49, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 41, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "rightButton", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 45, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryState } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\n\r\n@Component({\r\n selector: 'gallery-nav',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-nav.scss'],\r\n template: `\r\n \r\n\r\n \r\n `,\r\n standalone: true,\r\n imports: [CommonModule]\r\n})\r\nexport class GalleryNavComponent implements OnInit {\r\n\r\n navIcon: SafeHtml;\r\n @Input('galleryId') id: string;\r\n @Input() state: GalleryState;\r\n @Input() config: GalleryConfig;\r\n\r\n constructor(public gallery: Gallery, private _sanitizer: DomSanitizer, public dir: Directionality) {\r\n }\r\n\r\n ngOnInit() {\r\n this.navIcon = this._sanitizer.bypassSecurityTrustHtml(this.config.navIcon);\r\n }\r\n\r\n rightButton() {\r\n\r\n }\r\n\r\n leftButton(): void {\r\n\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ".g-nav-next,\r\n.g-nav-prev {\r\n position: absolute;\r\n top: 50%;\r\n display: flex;\r\n padding: 16px 8px;\r\n cursor: pointer;\r\n z-index: 999;\r\n opacity: 0.6;\r\n transition: opacity linear 150ms, right linear 150ms, left linear 150ms;\r\n\r\n &:hover {\r\n opacity: 1;\r\n }\r\n\r\n ::ng-deep {\r\n svg {\r\n filter: var(--g-nav-drop-shadow);\r\n width: 28px;\r\n height: 28px;\r\n fill: #fff;\r\n }\r\n }\r\n}\r\n\r\n.g-nav-next {\r\n left: var(--nav-next-left);\r\n right: var(--nav-next-right);\r\n transform: var(--nav-next-transform);\r\n\r\n &:hover {\r\n left: var(--nav-next-hover-left);\r\n right: var(--nav-next-hover-right);\r\n }\r\n}\r\n\r\n.g-nav-prev {\r\n left: var(--nav-prev-left);\r\n right: var(--nav-prev-right);\r\n transform: var(--nav-prev-transform);\r\n\r\n &:hover {\r\n left: var(--nav-prev-hover-left);\r\n right: var(--nav-prev-hover-right);\r\n }\r\n}\r\n", + "styleUrl": "./gallery-nav.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 36, + "jsdoctags": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "_sanitizer", + "type": "DomSanitizer", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "dir", + "type": "Directionality", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit" + ] + }, + { + "name": "GallerySliderComponent", + "id": "component-GallerySliderComponent-8c5299b832f327bb20359ed9075c3ec50aa6d90b2a6dc31208ee1747da2edc10ae1f3542d9d4b43fefd90bb4361807e128b9f30704b3507f4fc014135c17251a", + "file": "projects/ng-gallery/src/lib/components/gallery-slider.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-slider", + "styleUrls": [ + "./gallery-slider.scss" + ], + "styles": [], + "template": "
                                                                                                                                  \n
                                                                                                                                  \n \n
                                                                                                                                  \n\n
                                                                                                                                  \n
                                                                                                                                  RESIZING
                                                                                                                                  \n
                                                                                                                                  SCROLLING
                                                                                                                                  \n
                                                                                                                                  SLIDING
                                                                                                                                  \n
                                                                                                                                  \n
                                                                                                                                  \n\n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery config", + "description": "

                                                                                                                                  Gallery config

                                                                                                                                  \n", + "line": 104, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery ID", + "description": "

                                                                                                                                  Gallery ID

                                                                                                                                  \n", + "line": 98, + "type": "string", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery state", + "description": "

                                                                                                                                  Gallery state

                                                                                                                                  \n", + "line": 101, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when an error occurs", + "description": "

                                                                                                                                  Stream that emits when an error occurs

                                                                                                                                  \n", + "line": 110, + "type": "EventEmitter" + }, + { + "name": "itemClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when item is clicked", + "description": "

                                                                                                                                  Stream that emits when item is clicked

                                                                                                                                  \n", + "line": 107, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "type": "SliderAdapter", + "optional": false, + "description": "

                                                                                                                                  Slider adapter

                                                                                                                                  \n", + "line": 86, + "rawdescription": "\nSlider adapter" + }, + { + "name": "isResizing", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 95 + }, + { + "name": "isScrolling", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 91 + }, + { + "name": "isSliding", + "deprecated": false, + "deprecationMessage": "", + "type": "boolean", + "optional": false, + "description": "", + "line": 93 + }, + { + "name": "items", + "defaultValue": "new QueryList()", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 115, + "decorators": [ + { + "name": "ViewChildren", + "stringifiedArguments": "GalleryItemComponent" + } + ], + "modifierKind": [ + 167 + ] + }, + { + "name": "items$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "

                                                                                                                                  Stream that emits the item components once they're initialized

                                                                                                                                  \n", + "line": 89, + "rawdescription": "\nStream that emits the item components once they're initialized" + }, + { + "name": "position$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits the slider position

                                                                                                                                  \n", + "line": 83, + "rawdescription": "\nStream that emits the slider position", + "modifierKind": [ + 146 + ] + }, + { + "name": "sliderEl", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "

                                                                                                                                  Slider ElementRef

                                                                                                                                  \n", + "line": 113, + "rawdescription": "\nSlider ElementRef", + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'slider', {static: true}" + } + ], + "modifierKind": [ + 167 + ] + } + ], + "methodsClass": [ + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 154, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 124, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onActiveIndexChange", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 167, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "scrollToIndex", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 176, + "deprecated": false, + "deprecationMessage": "", + "modifierKind": [ + 121 + ], + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "trackByFn", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 163, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "item", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryItemComponent", + "type": "component" + }, + { + "name": "SmoothScroll" + }, + { + "name": "HammerSliding" + }, + { + "name": "SliderIntersectionObserver" + }, + { + "name": "ItemIntersectionObserver" + }, + { + "name": "SliderResizeObserver" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n ViewChild,\r\n ViewChildren,\r\n EventEmitter,\r\n AfterViewInit,\r\n OnChanges,\r\n SimpleChanges,\r\n ElementRef,\r\n QueryList,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Observable, Subject, map, startWith } from 'rxjs';\r\nimport { Gallery } from '../services/gallery.service';\r\nimport { GalleryState, GalleryError } from '../models/gallery.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { Orientation } from '../models/constants';\r\nimport { SliderAdapter, HorizontalAdapter, VerticalAdapter } from './adapters';\r\nimport { SmoothScroll, SmoothScrollOptions } from '../smooth-scroll';\r\nimport { HammerSliding } from '../gestures/hammer-sliding.directive';\r\nimport { SliderIntersectionObserver } from '../observers/slider-intersection-observer.directive';\r\nimport { ItemIntersectionObserver } from '../observers/item-intersection-observer.directive';\r\nimport { GalleryItemComponent } from './gallery-item.component';\r\nimport { SliderResizeObserver } from '../observers/slider-resize-observer.directive';\r\n\r\n@Component({\r\n selector: 'gallery-slider',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-slider.scss'],\r\n template: `\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n\r\n
                                                                                                                                  \r\n
                                                                                                                                  RESIZING
                                                                                                                                  \r\n
                                                                                                                                  SCROLLING
                                                                                                                                  \r\n
                                                                                                                                  SLIDING
                                                                                                                                  \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryItemComponent, SmoothScroll, HammerSliding, SliderIntersectionObserver, ItemIntersectionObserver, SliderResizeObserver]\r\n})\r\nexport class GallerySliderComponent implements AfterViewInit, OnChanges {\r\n\r\n /** Stream that emits the slider position */\r\n readonly position$: Subject = new Subject();\r\n\r\n /** Slider adapter */\r\n adapter: SliderAdapter;\r\n\r\n /** Stream that emits the item components once they're initialized */\r\n items$: Observable;\r\n\r\n isScrolling: boolean;\r\n\r\n isSliding: boolean;\r\n\r\n isResizing: boolean;\r\n\r\n /** Gallery ID */\r\n @Input() galleryId: string;\r\n\r\n /** Gallery state */\r\n @Input() state: GalleryState;\r\n\r\n /** Gallery config */\r\n @Input() config: GalleryConfig;\r\n\r\n /** Stream that emits when item is clicked */\r\n @Output() itemClick: EventEmitter = new EventEmitter();\r\n\r\n /** Stream that emits when an error occurs */\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n /** Slider ElementRef */\r\n @ViewChild('slider', { static: true }) sliderEl: ElementRef;\r\n\r\n @ViewChildren(GalleryItemComponent) items: QueryList = new QueryList();\r\n\r\n get slider(): HTMLElement {\r\n return this.sliderEl.nativeElement;\r\n }\r\n\r\n constructor(private _gallery: Gallery) {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n if (changes.config.currentValue?.orientation !== changes.config.previousValue?.orientation) {\r\n switch (this.config.orientation) {\r\n case Orientation.Horizontal:\r\n this.adapter = new HorizontalAdapter(this.slider, this.config);\r\n break;\r\n case Orientation.Vertical:\r\n this.adapter = new VerticalAdapter(this.slider, this.config);\r\n break;\r\n }\r\n }\r\n if (!changes.config.firstChange) {\r\n // Keep the correct sliding position when direction changes\r\n requestAnimationFrame(() => {\r\n this.scrollToIndex(this.state.currIndex, 'auto');\r\n });\r\n }\r\n }\r\n\r\n // Scroll to current index\r\n if (changes.state) {\r\n if (changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) {\r\n requestAnimationFrame(() => {\r\n this.scrollToIndex(this.state.currIndex, changes.state.firstChange ? 'auto' : this.state.behavior);\r\n });\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.items.notifyOnChanges();\r\n this.items$ = this.items.changes.pipe(\r\n // In some cases, items is not notified at first, need to force start the stream\r\n startWith(null),\r\n map(() => this.items.toArray())\r\n );\r\n }\r\n\r\n trackByFn(index: number, item: any) {\r\n return item.type;\r\n }\r\n\r\n onActiveIndexChange(index: number): void {\r\n if (index === -1) {\r\n // Reset active index position\r\n this.scrollToIndex(this.state.currIndex, 'smooth');\r\n } else {\r\n this._gallery.ref(this.galleryId).set(index, 'smooth');\r\n }\r\n }\r\n\r\n private scrollToIndex(index: number, behavior: ScrollBehavior): void {\r\n const el: HTMLElement = this.items.get(index)?.nativeElement;\r\n if (el) {\r\n const pos: SmoothScrollOptions = this.adapter.getScrollToValue(el, behavior || this.config.scrollBehavior);\r\n this.position$.next(pos);\r\n }\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n overflow: hidden;\r\n order: 1;\r\n flex: 1;\r\n}\r\n\r\n.g-slider {\r\n display: flex;\r\n align-items: center;\r\n transition: var(--g-height-transition);\r\n min-height: 100%;\r\n min-width: 100%;\r\n max-height: 100%;\r\n max-width: 100%;\r\n height: var(--slider-height, 100%);\r\n width: var(--slider-width, 100%);\r\n\r\n overflow: var(--slider-overflow);\r\n scroll-snap-type: var(--slider-scroll-snap-type);\r\n flex-direction: var(--slider-flex-direction);\r\n\r\n scrollbar-width: none;\r\n\r\n &::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n &.g-sliding, &.g-scrolling {\r\n // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse\r\n .g-slider-content {\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n &[centralised=\"true\"] {\r\n &:before, &:after {\r\n content: '';\r\n }\r\n\r\n &:before {\r\n flex: 0 0 var(--slider-centralize-start-size);\r\n }\r\n\r\n &:after {\r\n flex: 0 0 var(--slider-centralize-end-size);\r\n }\r\n }\r\n}\r\n\r\n.g-slider-content {\r\n flex: 0 0 auto;\r\n display: flex;\r\n align-items: center;\r\n gap: 1px;\r\n width: var(--slider-content-width, unset);\r\n height: var(--slider-content-height, unset);\r\n flex-direction: var(--slider-flex-direction);\r\n}\r\n", + "styleUrl": "./gallery-slider.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 119, + "jsdoctags": [ + { + "name": "_gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "AfterViewInit", + "OnChanges" + ], + "accessors": { + "slider": { + "name": "slider", + "getSignature": { + "name": "slider", + "type": "", + "returnType": "HTMLElement", + "line": 117 + } + } + } + }, + { + "name": "GalleryThumbComponent", + "id": "component-GalleryThumbComponent-319cc5375529a354d03dd248985279976b8f789f3f0ac96bd512add0afb24bbc9369c7922a86b7d84ec489068c9e7143c3d0ca5668ce2a70f90d12d9868f6436", + "file": "projects/ng-gallery/src/lib/components/gallery-thumb.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-thumb", + "styleUrls": [ + "./gallery-thumb.scss" + ], + "styles": [], + "template": "\n\n
                                                                                                                                  \n \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "count", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nThe number of total items", + "description": "

                                                                                                                                  The number of total items

                                                                                                                                  \n", + "line": 44, + "type": "number", + "decorators": [] + }, + { + "name": "currIndex", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery current index", + "description": "

                                                                                                                                  Gallery current index

                                                                                                                                  \n", + "line": 47, + "type": "number", + "decorators": [] + }, + { + "name": "data", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's data, this object contains the data required to display the content (e.g. src path)", + "description": "

                                                                                                                                  Item's data, this object contains the data required to display the content (e.g. src path)

                                                                                                                                  \n", + "line": 53, + "type": "ImageItemData", + "decorators": [] + }, + { + "name": "index", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's index in the gallery", + "description": "

                                                                                                                                  Item's index in the gallery

                                                                                                                                  \n", + "line": 41, + "type": "number", + "decorators": [] + }, + { + "name": "type", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nItem's type 'image', 'video', 'youtube', 'iframe'", + "description": "

                                                                                                                                  Item's type 'image', 'video', 'youtube', 'iframe'

                                                                                                                                  \n", + "line": 50, + "type": "GalleryItemType", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "line": 55, + "type": "EventEmitter" + } + ], + "propertiesClass": [], + "methodsClass": [], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [ + { + "name": "attr.galleryIndex", + "deprecated": false, + "deprecationMessage": "", + "line": 61, + "type": "number", + "decorators": [] + }, + { + "name": "class.g-active-thumb", + "deprecated": false, + "deprecationMessage": "", + "line": 57, + "type": "boolean", + "decorators": [] + } + ], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryImageComponent", + "type": "component" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n HostBinding,\r\n EventEmitter,\r\n ElementRef,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { GalleryItemContext } from '../directives/gallery-item-def.directive';\r\nimport { GalleryImageComponent } from './templates/gallery-image.component';\r\nimport { ImageItemData } from './templates/items.model';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { GalleryItemType } from '../models/constants';\r\n\r\n@Component({\r\n selector: 'gallery-thumb',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-thumb.scss'],\r\n template: `\r\n \r\n\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryImageComponent]\r\n})\r\nexport class GalleryThumbComponent {\r\n\r\n @Input() config: GalleryConfig;\r\n\r\n /** Item's index in the gallery */\r\n @Input() index: number;\r\n\r\n /** The number of total items */\r\n @Input() count: number;\r\n\r\n /** Gallery current index */\r\n @Input() currIndex: number;\r\n\r\n /** Item's type 'image', 'video', 'youtube', 'iframe' */\r\n @Input() type: GalleryItemType;\r\n\r\n /** Item's data, this object contains the data required to display the content (e.g. src path) */\r\n @Input() data: ImageItemData;\r\n\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n @HostBinding('class.g-active-thumb') get isActive() {\r\n return this.index === this.currIndex;\r\n }\r\n\r\n @HostBinding('attr.galleryIndex') get isIndexAttr(): number {\r\n return this.index;\r\n }\r\n\r\n get imageContext(): GalleryItemContext {\r\n return {\r\n $implicit: this.data,\r\n index: this.index,\r\n type: this.type,\r\n active: this.isActive,\r\n count: this.count,\r\n first: this.index === 0,\r\n last: this.index === this.count - 1\r\n }\r\n }\r\n\r\n get nativeElement(): HTMLElement {\r\n return this.el.nativeElement;\r\n }\r\n\r\n constructor(private el: ElementRef) {\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n cursor: var(--g-thumb-cursor);\r\n height: var(--g-thumb-height);\r\n width: var(--g-thumb-width);\r\n max-height: var(--g-thumb-height);\r\n max-width: var(--g-thumb-width);\r\n align-self: center;\r\n background: black;\r\n position: relative;\r\n display: flex;\r\n overflow: hidden;\r\n flex-direction: column;\r\n flex: 0 0 auto;\r\n scroll-snap-align: center;\r\n // Disable highlighting the elements on mouse move or click\r\n user-select: none;\r\n -webkit-user-drag: none;\r\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\r\n\r\n --g-thumb-opacity: 0.5;\r\n\r\n &.g-active-thumb {\r\n --g-thumb-opacity: 1;\r\n }\r\n}\r\n\r\n.g-template {\r\n position: absolute;\r\n z-index: 10;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n color: white;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-direction: column;\r\n}\r\n", + "styleUrl": "./gallery-thumb.scss" + } + ], + "stylesData": "", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 79, + "jsdoctags": [ + { + "name": "el", + "type": "ElementRef", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "accessors": { + "isActive": { + "name": "isActive", + "getSignature": { + "name": "isActive", + "type": "", + "returnType": "", + "line": 57 + } + }, + "isIndexAttr": { + "name": "isIndexAttr", + "getSignature": { + "name": "isIndexAttr", + "type": "number", + "returnType": "number", + "line": 61 + } + }, + "imageContext": { + "name": "imageContext", + "getSignature": { + "name": "imageContext", + "type": "", + "returnType": "GalleryItemContext", + "line": 65 + } + }, + "nativeElement": { + "name": "nativeElement", + "getSignature": { + "name": "nativeElement", + "type": "", + "returnType": "HTMLElement", + "line": 77 + } + } + } + }, + { + "name": "GalleryThumbsComponent", + "id": "component-GalleryThumbsComponent-de19f00cdfd53eb5cbb332ead8da65e2cafd15883a14cfea3cbf114e4219ce6927795a87f8565ae004edbd11823b07479c9871236e2a1cd241dfd6a1bea65647", + "file": "projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-thumbs", + "styleUrls": [ + "./gallery-thumbs.scss" + ], + "styles": [], + "template": "
                                                                                                                                  \n
                                                                                                                                  \n \n
                                                                                                                                  \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "config", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery config", + "description": "

                                                                                                                                  Gallery config

                                                                                                                                  \n", + "line": 79, + "type": "GalleryConfig", + "decorators": [] + }, + { + "name": "galleryId", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery ID", + "description": "

                                                                                                                                  Gallery ID

                                                                                                                                  \n", + "line": 73, + "type": "string", + "decorators": [] + }, + { + "name": "state", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nGallery state", + "description": "

                                                                                                                                  Gallery state

                                                                                                                                  \n", + "line": 76, + "type": "GalleryState", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when an error occurs", + "description": "

                                                                                                                                  Stream that emits when an error occurs

                                                                                                                                  \n", + "line": 85, + "type": "EventEmitter" + }, + { + "name": "thumbClick", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when thumb is clicked", + "description": "

                                                                                                                                  Stream that emits when thumb is clicked

                                                                                                                                  \n", + "line": 82, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "adapter", + "deprecated": false, + "deprecationMessage": "", + "type": "SliderAdapter", + "optional": false, + "description": "

                                                                                                                                  Slider adapter

                                                                                                                                  \n", + "line": 67, + "rawdescription": "\nSlider adapter" + }, + { + "name": "items", + "defaultValue": "new QueryList()", + "deprecated": false, + "deprecationMessage": "", + "type": "QueryList", + "optional": false, + "description": "", + "line": 90, + "decorators": [ + { + "name": "ViewChildren", + "stringifiedArguments": "GalleryThumbComponent" + } + ], + "modifierKind": [ + 167 + ] + }, + { + "name": "items$", + "deprecated": false, + "deprecationMessage": "", + "type": "Observable", + "optional": false, + "description": "

                                                                                                                                  Stream that emits the thumb components once they're initialized

                                                                                                                                  \n", + "line": 70, + "rawdescription": "\nStream that emits the thumb components once they're initialized" + }, + { + "name": "position$", + "defaultValue": "new Subject()", + "deprecated": false, + "deprecationMessage": "", + "type": "Subject", + "optional": false, + "description": "

                                                                                                                                  Stream that emits the slider position

                                                                                                                                  \n", + "line": 64, + "rawdescription": "\nStream that emits the slider position", + "modifierKind": [ + 146 + ] + }, + { + "name": "sliderEl", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "

                                                                                                                                  Slider ElementRef

                                                                                                                                  \n", + "line": 88, + "rawdescription": "\nSlider ElementRef", + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'slider', {static: true}" + } + ], + "modifierKind": [ + 167 + ] + } + ], + "methodsClass": [ + { + "name": "ngAfterViewInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 130, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnChanges", + "args": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 96, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "changes", + "type": "SimpleChanges", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "onActiveIndexChange", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 143, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "scrollToIndex", + "args": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 152, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "value", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "behavior", + "type": "ScrollBehavior", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "trackByFn", + "args": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "item", + "type": "any", + "deprecated": false, + "deprecationMessage": "" + } + ], + "optional": false, + "returnType": "any", + "typeParameters": [], + "line": 139, + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": [ + { + "name": "index", + "type": "number", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "item", + "type": "any", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "GalleryThumbComponent", + "type": "component" + }, + { + "name": "SmoothScroll" + }, + { + "name": "HammerSliding" + }, + { + "name": "ThumbResizeObserver" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import {\r\n Component,\r\n Input,\r\n Output,\r\n ViewChild,\r\n ViewChildren,\r\n EventEmitter,\r\n AfterViewInit,\r\n OnChanges,\r\n QueryList,\r\n SimpleChanges,\r\n ElementRef,\r\n ChangeDetectionStrategy\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Observable, Subject, map, startWith } from 'rxjs';\r\nimport { GalleryConfig } from '../models/config.model';\r\nimport { GalleryState, GalleryError } from '../models/gallery.model';\r\nimport { ThumbnailsPosition } from '../models/constants';\r\nimport { VerticalAdapter, HorizontalAdapter, SliderAdapter } from './adapters';\r\nimport { SmoothScroll, SmoothScrollOptions } from '../smooth-scroll';\r\nimport { GalleryThumbComponent } from './gallery-thumb.component';\r\nimport { HammerSliding } from '../gestures/hammer-sliding.directive';\r\nimport { ThumbResizeObserver } from '../observers/thumb-resize-observer.directive';\r\n\r\n@Component({\r\n selector: 'gallery-thumbs',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n styleUrls: ['./gallery-thumbs.scss'],\r\n template: `\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n standalone: true,\r\n imports: [CommonModule, GalleryThumbComponent, SmoothScroll, HammerSliding, ThumbResizeObserver]\r\n})\r\nexport class GalleryThumbsComponent implements AfterViewInit, OnChanges {\r\n\r\n /** Stream that emits the slider position */\r\n readonly position$: Subject = new Subject();\r\n\r\n /** Slider adapter */\r\n adapter: SliderAdapter;\r\n\r\n /** Stream that emits the thumb components once they're initialized */\r\n items$: Observable;\r\n\r\n /** Gallery ID */\r\n @Input() galleryId: string;\r\n\r\n /** Gallery state */\r\n @Input() state: GalleryState;\r\n\r\n /** Gallery config */\r\n @Input() config: GalleryConfig;\r\n\r\n /** Stream that emits when thumb is clicked */\r\n @Output() thumbClick: EventEmitter = new EventEmitter();\r\n\r\n /** Stream that emits when an error occurs */\r\n @Output() error: EventEmitter = new EventEmitter();\r\n\r\n /** Slider ElementRef */\r\n @ViewChild('slider', { static: true }) sliderEl: ElementRef;\r\n\r\n @ViewChildren(GalleryThumbComponent) items: QueryList = new QueryList();\r\n\r\n get slider(): HTMLElement {\r\n return this.sliderEl.nativeElement;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n // Sets sliding direction\r\n if (changes.config.currentValue?.thumbPosition !== changes.config.previousValue?.thumbPosition) {\r\n switch (this.config.thumbPosition) {\r\n case ThumbnailsPosition.Right:\r\n case ThumbnailsPosition.Left:\r\n this.adapter = new VerticalAdapter(this.slider, this.config);\r\n break;\r\n case ThumbnailsPosition.Top:\r\n case ThumbnailsPosition.Bottom:\r\n this.adapter = new HorizontalAdapter(this.slider, this.config);\r\n break;\r\n }\r\n\r\n if (!changes.config.firstChange) {\r\n // Keep the correct sliding position when direction changes\r\n requestAnimationFrame(() => {\r\n this.scrollToIndex(this.state.currIndex, 'auto');\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (changes.state && (changes.state.firstChange || !this.config.detachThumbs)) {\r\n if (changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) {\r\n // Scroll slide to item when current index changes.\r\n requestAnimationFrame(() => {\r\n this.scrollToIndex(this.state.currIndex, changes.state?.firstChange ? 'auto' : 'smooth');\r\n });\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.items.notifyOnChanges();\r\n this.items$ = this.items.changes.pipe(\r\n // In some cases, items is not notified at first, need to force start the stream\r\n startWith(null),\r\n map(() => this.items.toArray())\r\n );\r\n }\r\n\r\n trackByFn(index: number, item: any) {\r\n return item.type;\r\n }\r\n\r\n onActiveIndexChange(index: number): void {\r\n if (index === -1) {\r\n // Reset active index position\r\n this.scrollToIndex(this.state.currIndex, 'smooth');\r\n } else {\r\n this.scrollToIndex(index, 'smooth');\r\n }\r\n }\r\n\r\n scrollToIndex(value: number, behavior: ScrollBehavior): void {\r\n const el: HTMLElement = this.items.get(value)?.nativeElement;\r\n if (el) {\r\n const pos: SmoothScrollOptions = this.adapter.getScrollToValue(el, behavior);\r\n this.position$.next(pos);\r\n }\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": [ + { + "data": ":host {\r\n max-height: 100%;\r\n max-width: 100%;\r\n display: block;\r\n z-index: 100;\r\n}\r\n\r\n.g-slider {\r\n display: flex;\r\n align-items: center;\r\n transition: var(--g-height-transition);\r\n max-height: 100%;\r\n min-width: 100%;\r\n height: var(--thumb-slider-height);\r\n width: var(--thumb-slider-width);\r\n\r\n top: var(--thumb-slider-top);\r\n left: var(--thumb-slider-left);\r\n overflow: var(--thumb-slider-overflow);\r\n scroll-snap-type: var(--slider-scroll-snap-type);\r\n flex-direction: var(--thumb-slider-flex-direction);\r\n\r\n scrollbar-width: none;\r\n\r\n &::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse\r\n &.g-sliding {\r\n // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse\r\n .g-slider-content {\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n &[centralised=\"true\"] {\r\n &:before, &:after {\r\n content: '';\r\n }\r\n\r\n &:before {\r\n flex: 0 0 var(--thumb-centralize-start-size);\r\n }\r\n\r\n &:after {\r\n flex: 0 0 var(--thumb-centralize-end-size);\r\n }\r\n }\r\n}\r\n\r\n.g-slider-content {\r\n flex: 0 0 auto;\r\n display: flex;\r\n flex-direction: var(--thumb-slider-flex-direction);\r\n align-items: center;\r\n gap: 1px;\r\n}\r\n", + "styleUrl": "./gallery-thumbs.scss" + } + ], + "stylesData": "", + "implements": [ + "AfterViewInit", + "OnChanges" + ], + "accessors": { + "slider": { + "name": "slider", + "getSignature": { + "name": "slider", + "type": "", + "returnType": "HTMLElement", + "line": 92 + } + } + } + }, + { + "name": "GalleryVideoComponent", + "id": "component-GalleryVideoComponent-8373f3076bce537ab094b2f99b71fead7a20a6fa2e14f19abf4fa0edfd03f4d2d2465bbe8caf0ae8429a916cd68da813b72cc2466caf5d0b8d718d54c16c1475", + "file": "projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "gallery-video", + "styleUrls": [], + "styles": [], + "template": "\n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "controls", + "deprecated": false, + "deprecationMessage": "", + "line": 36, + "type": "boolean", + "decorators": [] + }, + { + "name": "controlsList", + "deprecated": false, + "deprecationMessage": "", + "line": 37, + "type": "\"nodownload\" | \"nofullscreen\" | \"noremoteplayback\"", + "decorators": [] + }, + { + "name": "disablePictureInPicture", + "deprecated": false, + "deprecationMessage": "", + "line": 39, + "type": "boolean", + "decorators": [] + }, + { + "name": "disableRemotePlayback", + "deprecated": false, + "deprecationMessage": "", + "line": 38, + "type": "boolean", + "decorators": [] + }, + { + "name": "loop", + "deprecated": false, + "deprecationMessage": "", + "line": 35, + "type": "boolean", + "decorators": [] + }, + { + "name": "mute", + "deprecated": false, + "deprecationMessage": "", + "line": 34, + "type": "boolean", + "decorators": [] + }, + { + "name": "pause", + "deprecated": false, + "deprecationMessage": "", + "line": 41, + "type": "boolean", + "decorators": [] + }, + { + "name": "play", + "deprecated": false, + "deprecationMessage": "", + "line": 50, + "type": "boolean", + "decorators": [] + }, + { + "name": "poster", + "deprecated": false, + "deprecationMessage": "", + "line": 33, + "type": "string", + "decorators": [] + }, + { + "name": "src", + "deprecated": false, + "deprecationMessage": "", + "line": 32, + "type": "string | literal type[]", + "decorators": [] + } + ], + "outputsClass": [ + { + "name": "error", + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "rawdescription": "\nStream that emits when an error occurs", + "description": "

                                                                                                                                  Stream that emits when an error occurs

                                                                                                                                  \n", + "line": 60, + "type": "EventEmitter" + } + ], + "propertiesClass": [ + { + "name": "video", + "deprecated": false, + "deprecationMessage": "", + "type": "ElementRef", + "optional": false, + "description": "", + "line": 62, + "decorators": [ + { + "name": "ViewChild", + "stringifiedArguments": "'video', {static: true}" + } + ], + "modifierKind": [ + 167 + ] + }, + { + "name": "videoSources", + "deprecated": false, + "deprecationMessage": "", + "type": "literal type[]", + "optional": false, + "description": "", + "line": 30 + } + ], + "methodsClass": [ + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 64, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "NgFor" + }, + { + "name": "NgIf" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, Output, EventEmitter, OnInit, ViewChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgFor, NgIf } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'gallery-video',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n \r\n `,\r\n standalone: true,\r\n imports: [NgFor, NgIf]\r\n})\r\nexport class GalleryVideoComponent implements OnInit {\r\n\r\n videoSources: { url: string, type?: string }[];\r\n\r\n @Input() src: string | { url: string, type?: string }[];\r\n @Input() poster: string;\r\n @Input() mute: boolean;\r\n @Input() loop: boolean;\r\n @Input() controls: boolean;\r\n @Input() controlsList: 'nodownload' | 'nofullscreen' | 'noremoteplayback';\r\n @Input() disableRemotePlayback: boolean;\r\n @Input() disablePictureInPicture: boolean;\r\n\r\n @Input('pause') set pauseVideo(shouldPause: boolean) {\r\n if (this.video.nativeElement) {\r\n const video: HTMLVideoElement = this.video.nativeElement;\r\n if (shouldPause && !video.paused) {\r\n video.pause();\r\n }\r\n }\r\n }\r\n\r\n @Input('play') set playVideo(shouldPlay: boolean) {\r\n if (this.video.nativeElement) {\r\n const video: HTMLVideoElement = this.video.nativeElement;\r\n if (shouldPlay) {\r\n video.play();\r\n }\r\n }\r\n }\r\n\r\n /** Stream that emits when an error occurs */\r\n @Output() error = new EventEmitter();\r\n\r\n @ViewChild('video', { static: true }) video: ElementRef;\r\n\r\n ngOnInit() {\r\n if (this.src instanceof Array) {\r\n // If video has multiple sources\r\n this.videoSources = [...this.src];\r\n } else {\r\n this.videoSources = [{ url: this.src }];\r\n }\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "", + "implements": [ + "OnInit" + ], + "accessors": { + "pauseVideo": { + "name": "pauseVideo", + "setSignature": { + "name": "pauseVideo", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "shouldPause", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 41, + "jsdoctags": [ + { + "name": "shouldPause", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + }, + "playVideo": { + "name": "playVideo", + "setSignature": { + "name": "playVideo", + "type": "void", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "shouldPlay", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "void", + "line": 50, + "jsdoctags": [ + { + "name": "shouldPlay", + "type": "boolean", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + } + } + }, + { + "name": "LightboxExampleComponent", + "id": "component-LightboxExampleComponent-be406b9330227251e0d998f2d72189e3754f9e897029bddef8bf4ff2fa3efde370dc6248ccca9152a1768d358fda481c7b7a5427015371160f96d042bba32940", + "file": "projects/ng-gallery/src/stories/lightbox/lightbox-example.ts", + "changeDetection": "ChangeDetectionStrategy.OnPush", + "encapsulation": [], + "entryComponents": [], + "inputs": [], + "outputs": [], + "providers": [], + "selector": "lightbox-example", + "styleUrls": [], + "styles": [ + "\n .container {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin: 0 auto;\n padding: 20px;\n max-width: 768px;\n }\n img {\n height: 90px;\n width: 125px;\n object-fit: cover;\n }\n " + ], + "template": "
                                                                                                                                  \n \n
                                                                                                                                  \n", + "templateUrl": [], + "viewProviders": [], + "hostDirectives": [], + "inputsClass": [ + { + "name": "items", + "deprecated": false, + "deprecationMessage": "", + "line": 42, + "type": "GalleryItem[]", + "decorators": [] + } + ], + "outputsClass": [], + "propertiesClass": [ + { + "name": "gallery", + "deprecated": false, + "deprecationMessage": "", + "type": "Gallery", + "optional": false, + "description": "", + "line": 44, + "modifierKind": [ + 123 + ] + }, + { + "name": "galleryId", + "defaultValue": "'lightbox'", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "optional": false, + "description": "", + "line": 38 + }, + { + "name": "galleryRef", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryRef", + "optional": false, + "description": "", + "line": 40 + }, + { + "name": "lightbox", + "deprecated": false, + "deprecationMessage": "", + "type": "Lightbox", + "optional": false, + "description": "", + "line": 44, + "modifierKind": [ + 123 + ] + } + ], + "methodsClass": [ + { + "name": "ngOnDestroy", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 57, + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "ngOnInit", + "args": [], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 47, + "deprecated": false, + "deprecationMessage": "" + } + ], + "deprecated": false, + "deprecationMessage": "", + "hostBindings": [], + "hostListeners": [], + "standalone": true, + "imports": [ + { + "name": "CommonModule", + "type": "module" + }, + { + "name": "LightboxModule", + "type": "module" + } + ], + "description": "", + "rawdescription": "\n", + "type": "component", + "sourceCode": "import { Component, Input, OnDestroy, OnInit, ChangeDetectionStrategy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Gallery, GalleryItem, GalleryRef } from 'ng-gallery';\r\nimport { Lightbox, LightboxModule } from 'ng-gallery/lightbox';\r\n\r\n@Component({\r\n selector: 'lightbox-example',\r\n template: `\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .container {\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 3px;\r\n margin: 0 auto;\r\n padding: 20px;\r\n max-width: 768px;\r\n }\r\n img {\r\n height: 90px;\r\n width: 125px;\r\n object-fit: cover;\r\n }\r\n `],\r\n imports: [CommonModule, LightboxModule],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class LightboxExampleComponent implements OnInit, OnDestroy {\r\n\r\n galleryId: string = 'lightbox';\r\n\r\n galleryRef: GalleryRef;\r\n\r\n @Input() items: GalleryItem[];\r\n\r\n constructor(public gallery: Gallery, public lightbox: Lightbox) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.galleryRef = this.gallery.ref('lightbox', {\r\n thumbPosition: 'top',\r\n imageSize: 'cover',\r\n autoHeight: false\r\n });\r\n\r\n this.galleryRef.load(this.items);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.galleryRef.destroy();\r\n }\r\n}\r\n", + "assetsDirs": [], + "styleUrlsData": "", + "stylesData": "\n .container {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin: 0 auto;\n padding: 20px;\n max-width: 768px;\n }\n img {\n height: 90px;\n width: 125px;\n object-fit: cover;\n }\n \n", + "constructorObj": { + "name": "constructor", + "description": "", + "deprecated": false, + "deprecationMessage": "", + "args": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "lightbox", + "type": "Lightbox", + "deprecated": false, + "deprecationMessage": "" + } + ], + "line": 42, + "jsdoctags": [ + { + "name": "gallery", + "type": "Gallery", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "lightbox", + "type": "Lightbox", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + "implements": [ + "OnInit", + "OnDestroy" + ] + } + ], + "modules": [ + { + "name": "GalleryModule", + "id": "module-GalleryModule-90f9d1f7efe4d47d235a2518dd69bdc5f50065fdc02b9aa3ebc79e364b001092de31ebe30487e7678eb04ad320c7ad562149c0fa066e2545945bf214e26ec8ed", + "description": "", + "deprecationMessage": "", + "deprecated": false, + "file": "projects/ng-gallery/src/lib/gallery.module.ts", + "methods": [], + "sourceCode": "import { NgModule } from '@angular/core';\r\nimport { GalleryComponent } from './components/gallery.component';\r\nimport { GalleryImageDef } from './directives/gallery-image-def.directive';\r\nimport { GalleryThumbDef } from './directives/gallery-thumb-def.directive';\r\nimport { GalleryItemDef } from './directives/gallery-item-def.directive';\r\nimport { GalleryBoxDef } from './directives/gallery-box-def.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n GalleryComponent,\r\n GalleryItemDef,\r\n GalleryImageDef,\r\n GalleryThumbDef,\r\n GalleryBoxDef\r\n ],\r\n exports: [\r\n GalleryComponent,\r\n GalleryItemDef,\r\n GalleryImageDef,\r\n GalleryThumbDef,\r\n GalleryBoxDef\r\n ]\r\n})\r\nexport class GalleryModule {\r\n}\r\n", + "children": [ + { + "type": "providers", + "elements": [] + }, + { + "type": "declarations", + "elements": [] + }, + { + "type": "imports", + "elements": [ + { + "name": "GalleryBoxDef" + }, + { + "name": "GalleryComponent" + }, + { + "name": "GalleryImageDef" + }, + { + "name": "GalleryItemDef" + }, + { + "name": "GalleryThumbDef" + } + ] + }, + { + "type": "exports", + "elements": [ + { + "name": "GalleryBoxDef" + }, + { + "name": "GalleryComponent" + }, + { + "name": "GalleryImageDef" + }, + { + "name": "GalleryItemDef" + }, + { + "name": "GalleryThumbDef" + } + ] + }, + { + "type": "bootstrap", + "elements": [] + }, + { + "type": "classes", + "elements": [] + } + ] + } + ], + "miscellaneous": { + "variables": [ + { + "name": "API_KEY", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'560162-704dd2880c027f22c62ab7941'" + }, + { + "name": "AutoHeightExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "AutoplayExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('airplane') }),\r\n ]\r\n}" + }, + { + "name": "BoxTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  This is fixed overlay template
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .my-box {\r\n width: 200px;\r\n height: 50px;\r\n color: white;\r\n }\r\n img {\r\n position: absolute;\r\n z-index: 999;\r\n width: 40px;\r\n height: 40px;\r\n top: 20px;\r\n left: 20px;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + }, + { + "name": "BulletExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('football') }),\r\n ]\r\n}" + }, + { + "name": "CounterExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('patterns') }),\r\n ]\r\n}" + }, + { + "name": "defaultConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "defaultValue": "{\r\n nav: true,\r\n loop: false,\r\n bullets: false,\r\n thumbs: false,\r\n debug: false,\r\n bulletSize: 6,\r\n counter: false,\r\n autoplay: false,\r\n thumbWidth: 120,\r\n thumbHeight: 90,\r\n disableBullets: false,\r\n disableThumbs: false,\r\n disableScroll: false,\r\n disableThumbScroll: false,\r\n disableMouseScroll: false,\r\n disableThumbMouseScroll: false,\r\n autoplayInterval: 3000,\r\n scrollDuration: 468,\r\n scrollEase: {\r\n x1: 0.42,\r\n y1: 0,\r\n x2: 0.58,\r\n y2: 1\r\n },\r\n thumbCentralized: false,\r\n thumbAutosize: false,\r\n itemAutosize: false,\r\n autoHeight: false,\r\n scrollBehavior: 'smooth',\r\n resizeDebounceTime: 0,\r\n loadingAttr: LoadingAttr.Lazy,\r\n imageSize: ImageSize.Contain,\r\n thumbImageSize: ImageSize.Cover,\r\n bulletPosition: BulletsPosition.Bottom,\r\n counterPosition: CounterPosition.Top,\r\n thumbPosition: ThumbnailsPosition.Bottom,\r\n loadingStrategy: LoadingStrategy.Preload,\r\n orientation: Orientation.Horizontal,\r\n navIcon: ``,\r\n // navIcon: ``,\r\n loadingIcon: ``\r\n}" + }, + { + "name": "defaultState", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryState", + "defaultValue": "{\r\n action: GalleryAction.INITIALIZED,\r\n isPlaying: false,\r\n hasNext: false,\r\n hasPrev: false,\r\n currIndex: 0,\r\n items: []\r\n}", + "rawdescription": "Initial state", + "description": "

                                                                                                                                  Initial state

                                                                                                                                  \n" + }, + { + "name": "filterActions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/services/gallery-ref.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(actions: string[]) => {\r\n return filter((state: GalleryState) => actions.indexOf(state.action) > -1);\r\n}" + }, + { + "name": "float32ArraySupported", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "typeof Float32Array === 'function'" + }, + { + "name": "GallerizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .container {\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 3px;\r\n margin: 0 auto;\r\n padding: 20px;\r\n max-width: 768px;\r\n }\r\n img {\r\n height: 90px;\r\n width: 125px;\r\n object-fit: cover;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "GallerizeGalleryExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "GALLERY_CONFIG", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "InjectionToken", + "defaultValue": "new InjectionToken('GALLERY_CONFIG')" + }, + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + }, + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + }, + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + }, + { + "name": "imageFailedSvg", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/components/templates/svg-assets.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\r\n\r\n \r\n\\t\r\n \r\n \r\n \r\n\r\n\r\n`" + }, + { + "name": "ImageSizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "ImageTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n {{ item?.alt }}\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + }, + { + "name": "ItemAutosizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "ItemTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n img {\r\n object-fit: cover;\r\n border: 10px white solid;\r\n width: 400px;\r\n height: 400px;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImagesForCustomTemplate('sand') }),\r\n ]\r\n}" + }, + { + "name": "kSampleStepSize", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "1.0 / (kSplineTableSize - 1.0)" + }, + { + "name": "kSplineTableSize", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "11" + }, + { + "name": "Lab", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: {\r\n ...args,\r\n items,\r\n },\r\n template: `\r\n \r\n `,\r\n }),\r\n loaders: [\r\n async () => ({\r\n items: await getHDImages('jet fighter')\r\n }),\r\n ]\r\n}", + "rawdescription": "First Example for gallery", + "description": "

                                                                                                                                  First Example for gallery

                                                                                                                                  \n" + }, + { + "name": "LightboxExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters: {\r\n docs: {\r\n source: {\r\n code: `\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n },\r\n },\r\n },\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/Gallery',\r\n component: GalleryComponent,\r\n tags: ['autodocs'],\r\n render: (args: GalleryComponent) => ({\r\n props: {\r\n ...args,\r\n },\r\n }),\r\n decorators: [\r\n applicationConfig({\r\n providers: [provideAnimations()]\r\n })\r\n ],\r\n args: {\r\n id: 'root',\r\n scrollBehavior: 'smooth',\r\n imageSize: ImageSize.Contain,\r\n thumbImageSize: ImageSize.Cover,\r\n bulletPosition: BulletsPosition.Bottom,\r\n counterPosition: CounterPosition.Top,\r\n orientation: Orientation.Horizontal,\r\n loadingAttr: LoadingAttr.Lazy,\r\n loadingStrategy: LoadingStrategy.Default,\r\n thumbPosition: ThumbnailsPosition.Bottom,\r\n scrollEase: {\r\n x1: 0.42,\r\n y1: 0,\r\n x2: 0.58,\r\n y2: 1\r\n },\r\n bulletSize: 6,\r\n thumbWidth: 120,\r\n thumbHeight: 90,\r\n autoplayInterval: 3000,\r\n scrollDuration: 468,\r\n resizeDebounceTime: 0,\r\n nav: true,\r\n bullets: true,\r\n disableBullets: false,\r\n loop: true,\r\n debug: false,\r\n thumbs: true,\r\n counter: true,\r\n autoplay: false,\r\n autoHeight: false,\r\n itemAutosize: false,\r\n disableThumbs: false,\r\n detachThumbs: false,\r\n thumbAutosize: false,\r\n disableScroll: false,\r\n thumbCentralized: false,\r\n disableThumbScroll: false,\r\n disableMouseScroll: false,\r\n disableThumbMouseScroll: false,\r\n },\r\n // Disables the long useless control description\r\n argTypes: {\r\n scrollBehavior: {\r\n control: 'radio',\r\n options: ['smooth', 'auto'],\r\n table: {\r\n defaultValue: { summary: 'smooth' }\r\n }\r\n },\r\n imageSize: {\r\n table: {\r\n defaultValue: { summary: 'contain' }\r\n }\r\n },\r\n thumbImageSize: {\r\n table: {\r\n defaultValue: { summary: 'cover' }\r\n }\r\n },\r\n bulletPosition: {\r\n table: {\r\n defaultValue: { summary: 'bottom' }\r\n }\r\n },\r\n counterPosition: {\r\n table: {\r\n defaultValue: { summary: 'top' }\r\n }\r\n },\r\n orientation: {\r\n table: {\r\n defaultValue: { summary: 'horizontal' }\r\n }\r\n },\r\n loadingAttr: {\r\n table: {\r\n defaultValue: { summary: 'lazy' }\r\n }\r\n },\r\n loadingStrategy: {\r\n table: {\r\n defaultValue: { summary: 'default' }\r\n }\r\n },\r\n thumbPosition: {\r\n table: {\r\n defaultValue: { summary: 'bottom' }\r\n }\r\n },\r\n thumbCentralized: {\r\n table: {\r\n defaultValue: { summary: 'default' }\r\n }\r\n },\r\n scrollEase: {\r\n table: {\r\n defaultValue: { summary: '{ x1: 0.42, y1: 0, x2: 0.58, y2: 1 }' }\r\n }\r\n },\r\n nav: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n thumbs: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n loop: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n counter: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n bulletSize: {\r\n table: {\r\n defaultValue: { summary: 6 }\r\n }\r\n },\r\n thumbWidth: {\r\n table: {\r\n defaultValue: { summary: 120 }\r\n }\r\n },\r\n thumbHeight: {\r\n table: {\r\n defaultValue: { summary: 90 }\r\n }\r\n },\r\n autoplayInterval: {\r\n table: {\r\n defaultValue: { summary: 3000 }\r\n }\r\n },\r\n scrollDuration: {\r\n table: {\r\n defaultValue: { summary: 468 }\r\n }\r\n },\r\n resizeDebounceTime: {\r\n table: {\r\n defaultValue: { summary: 0 }\r\n }\r\n },\r\n error: {\r\n control: false\r\n },\r\n indexChange: {\r\n control: false\r\n },\r\n itemsChange: {\r\n control: false\r\n },\r\n itemClick: {\r\n control: false\r\n },\r\n thumbClick: {\r\n control: false\r\n },\r\n playingChange: {\r\n control: false\r\n },\r\n galleryRef: {\r\n control: false\r\n },\r\n load: {\r\n control: false\r\n },\r\n add: {\r\n control: false\r\n },\r\n addImage: {\r\n control: false\r\n },\r\n addVideo: {\r\n control: false\r\n },\r\n addIframe: {\r\n control: false\r\n },\r\n addYoutube: {\r\n control: false\r\n },\r\n remove: {\r\n control: false\r\n },\r\n next: {\r\n control: false\r\n },\r\n prev: {\r\n control: false\r\n },\r\n set: {\r\n control: false\r\n },\r\n reset: {\r\n control: false\r\n },\r\n play: {\r\n control: false\r\n },\r\n stop: {\r\n control: false\r\n }\r\n }\r\n}" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/CustomTemplates',\r\n component: CustomTemplateComponent,\r\n // tags: ['autodocs'],\r\n render: (args: CustomTemplateComponent) => ({\r\n props: {\r\n ...args,\r\n },\r\n }),\r\n decorators: [\r\n moduleMetadata({\r\n imports: [GalleryModule],\r\n }),\r\n applicationConfig({\r\n providers: [provideAnimations()],\r\n }),\r\n ]\r\n}" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/Lightbox',\r\n component: LightboxExampleComponent,\r\n decorators: [\r\n moduleMetadata({\r\n imports: [LightboxModule],\r\n }),\r\n applicationConfig({\r\n providers: [provideAnimations()],\r\n }),\r\n ]\r\n}" + }, + { + "name": "NavExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('lions') }),\r\n ]\r\n}" + }, + { + "name": "NavWithLoopExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "NEWTON_ITERATIONS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "4", + "rawdescription": "https://github.com/gre/bezier-easing\r\nBezierEasing - use bezier curve for transition easing function\r\nby Gaëtan Renaudeau 2014 - 2015 – MIT License", + "description": "

                                                                                                                                  https://github.com/gre/bezier-easing\nBezierEasing - use bezier curve for transition easing function\nby Gaëtan Renaudeau 2014 - 2015 – MIT License

                                                                                                                                  \n" + }, + { + "name": "NEWTON_MIN_SLOPE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "0.001" + }, + { + "name": "preview", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/.storybook/preview.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Preview", + "defaultValue": "{\n parameters: {\n layout: 'fullscreen',\n actions: { argTypesRegex: \"^on[A-Z].*\" },\n controls: {\n matchers: {\n color: /(background|color)$/i,\n date: /Date$/i,\n }\n }\n },\n}" + }, + { + "name": "SliderBehaviorExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('chips') }),\r\n ]\r\n}" + }, + { + "name": "SliderDirectionExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "SliderExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('chips') }),\r\n ]\r\n}" + }, + { + "name": "SUBDIVISION_MAX_ITERATIONS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "10" + }, + { + "name": "SUBDIVISION_PRECISION", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "0.0000001" + }, + { + "name": "ThumbAutosizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('roads') }),\r\n ]\r\n}" + }, + { + "name": "ThumbDetachedExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('flowers') }),\r\n ]\r\n}" + }, + { + "name": "ThumbPositionExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('street') }),\r\n ]\r\n}" + }, + { + "name": "ThumbTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n {{ thumb?.alt }}\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + }, + { + "name": "ThumbViewExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('landscape') }),\r\n ]\r\n}" + } + ], + "functions": [ + { + "name": "A", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "B", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "bezier", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mY1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mY2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mY1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mY2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "binarySubdivide", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aB", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aB", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "C", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "calcBezier", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "createIntersectionObserver", + "file": "projects/ng-gallery/src/lib/observers/active-item-observer.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "elements", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Observable", + "jsdoctags": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "elements", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHDImages", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Promise", + "jsdoctags": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHDImagesForCustomTemplate", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Promise", + "jsdoctags": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSlope", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "LinearEasing", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "x", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "x", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "newtonRaphsonIterate", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aGuessT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aGuessT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "resizeObservable", + "file": "projects/ng-gallery/src/lib/utils/resize-observer.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setter", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "returnType": "Observable", + "jsdoctags": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "setter", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + } + ], + "typealiases": [ + { + "name": "GalleryConfig", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "GalleryItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "ImageItemData | VideoItemData | IframeItemData | YoutubeItemData", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "GalleryItemModel", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "literal type", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 184 + }, + { + "name": "GalleryItemType", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "GalleryItemTypes | string", + "file": "projects/ng-gallery/src/lib/models/constants.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "HorizontalPosition", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"top\" | \"bottom\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "IframeItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "ImageItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "ImageSize", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"contain\" | \"cover\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "ItemState", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"success\" | \"loading\" | \"failed\"", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "LoadingAttr", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"eager\" | \"lazy\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "LoadingStrategy", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"preload\" | \"lazy\" | \"default\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "Orientation", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"horizontal\" | \"vertical\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "SmoothScrollOptions", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "SmoothScrollToOptions", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + }, + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + }, + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + }, + { + "name": "ThumbsPosition", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"top\" | \"left\" | \"right\" | \"bottom\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "VideoItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "YoutubeItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + } + ], + "enumerations": [ + { + "name": "BulletsPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "CounterPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "GalleryAction", + "childs": [ + { + "name": "INITIALIZED", + "deprecated": false, + "deprecationMessage": "", + "value": "initialized" + }, + { + "name": "ITEMS_CHANGED", + "deprecated": false, + "deprecationMessage": "", + "value": "itemsChanged" + }, + { + "name": "INDEX_CHANGED", + "deprecated": false, + "deprecationMessage": "", + "value": "indexChanged" + }, + { + "name": "PLAY", + "deprecated": false, + "deprecationMessage": "", + "value": "play" + }, + { + "name": "STOP", + "deprecated": false, + "deprecationMessage": "", + "value": "stop" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "GalleryItemTypes", + "childs": [ + { + "name": "Image", + "deprecated": false, + "deprecationMessage": "", + "value": "image" + }, + { + "name": "Video", + "deprecated": false, + "deprecationMessage": "", + "value": "video" + }, + { + "name": "Youtube", + "deprecated": false, + "deprecationMessage": "", + "value": "youtube" + }, + { + "name": "Iframe", + "deprecated": false, + "deprecationMessage": "", + "value": "iframe" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "ImageSize", + "childs": [ + { + "name": "Cover", + "deprecated": false, + "deprecationMessage": "", + "value": "cover" + }, + { + "name": "Contain", + "deprecated": false, + "deprecationMessage": "", + "value": "contain" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "LoadingAttr", + "childs": [ + { + "name": "Eager", + "deprecated": false, + "deprecationMessage": "", + "value": "eager" + }, + { + "name": "Lazy", + "deprecated": false, + "deprecationMessage": "", + "value": "lazy" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "LoadingStrategy", + "childs": [ + { + "name": "Preload", + "deprecated": false, + "deprecationMessage": "", + "value": "preload" + }, + { + "name": "Lazy", + "deprecated": false, + "deprecationMessage": "", + "value": "lazy" + }, + { + "name": "Default", + "deprecated": false, + "deprecationMessage": "", + "value": "default" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "Orientation", + "childs": [ + { + "name": "Horizontal", + "deprecated": false, + "deprecationMessage": "", + "value": "horizontal" + }, + { + "name": "Vertical", + "deprecated": false, + "deprecationMessage": "", + "value": "vertical" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "ThumbnailsPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Left", + "deprecated": false, + "deprecationMessage": "", + "value": "left" + }, + { + "name": "Right", + "deprecated": false, + "deprecationMessage": "", + "value": "right" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + } + ], + "groupedVariables": { + "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts": [ + { + "name": "API_KEY", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "string", + "defaultValue": "'560162-704dd2880c027f22c62ab7941'" + } + ], + "projects/ng-gallery/src/stories/basic/Gallery.stories.ts": [ + { + "name": "AutoHeightExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "AutoplayExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('airplane') }),\r\n ]\r\n}" + }, + { + "name": "BulletExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('football') }),\r\n ]\r\n}" + }, + { + "name": "CounterExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('patterns') }),\r\n ]\r\n}" + }, + { + "name": "ImageSizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "ItemAutosizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "Lab", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: {\r\n ...args,\r\n items,\r\n },\r\n template: `\r\n \r\n `,\r\n }),\r\n loaders: [\r\n async () => ({\r\n items: await getHDImages('jet fighter')\r\n }),\r\n ]\r\n}", + "rawdescription": "First Example for gallery", + "description": "

                                                                                                                                  First Example for gallery

                                                                                                                                  \n" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/Gallery',\r\n component: GalleryComponent,\r\n tags: ['autodocs'],\r\n render: (args: GalleryComponent) => ({\r\n props: {\r\n ...args,\r\n },\r\n }),\r\n decorators: [\r\n applicationConfig({\r\n providers: [provideAnimations()]\r\n })\r\n ],\r\n args: {\r\n id: 'root',\r\n scrollBehavior: 'smooth',\r\n imageSize: ImageSize.Contain,\r\n thumbImageSize: ImageSize.Cover,\r\n bulletPosition: BulletsPosition.Bottom,\r\n counterPosition: CounterPosition.Top,\r\n orientation: Orientation.Horizontal,\r\n loadingAttr: LoadingAttr.Lazy,\r\n loadingStrategy: LoadingStrategy.Default,\r\n thumbPosition: ThumbnailsPosition.Bottom,\r\n scrollEase: {\r\n x1: 0.42,\r\n y1: 0,\r\n x2: 0.58,\r\n y2: 1\r\n },\r\n bulletSize: 6,\r\n thumbWidth: 120,\r\n thumbHeight: 90,\r\n autoplayInterval: 3000,\r\n scrollDuration: 468,\r\n resizeDebounceTime: 0,\r\n nav: true,\r\n bullets: true,\r\n disableBullets: false,\r\n loop: true,\r\n debug: false,\r\n thumbs: true,\r\n counter: true,\r\n autoplay: false,\r\n autoHeight: false,\r\n itemAutosize: false,\r\n disableThumbs: false,\r\n detachThumbs: false,\r\n thumbAutosize: false,\r\n disableScroll: false,\r\n thumbCentralized: false,\r\n disableThumbScroll: false,\r\n disableMouseScroll: false,\r\n disableThumbMouseScroll: false,\r\n },\r\n // Disables the long useless control description\r\n argTypes: {\r\n scrollBehavior: {\r\n control: 'radio',\r\n options: ['smooth', 'auto'],\r\n table: {\r\n defaultValue: { summary: 'smooth' }\r\n }\r\n },\r\n imageSize: {\r\n table: {\r\n defaultValue: { summary: 'contain' }\r\n }\r\n },\r\n thumbImageSize: {\r\n table: {\r\n defaultValue: { summary: 'cover' }\r\n }\r\n },\r\n bulletPosition: {\r\n table: {\r\n defaultValue: { summary: 'bottom' }\r\n }\r\n },\r\n counterPosition: {\r\n table: {\r\n defaultValue: { summary: 'top' }\r\n }\r\n },\r\n orientation: {\r\n table: {\r\n defaultValue: { summary: 'horizontal' }\r\n }\r\n },\r\n loadingAttr: {\r\n table: {\r\n defaultValue: { summary: 'lazy' }\r\n }\r\n },\r\n loadingStrategy: {\r\n table: {\r\n defaultValue: { summary: 'default' }\r\n }\r\n },\r\n thumbPosition: {\r\n table: {\r\n defaultValue: { summary: 'bottom' }\r\n }\r\n },\r\n thumbCentralized: {\r\n table: {\r\n defaultValue: { summary: 'default' }\r\n }\r\n },\r\n scrollEase: {\r\n table: {\r\n defaultValue: { summary: '{ x1: 0.42, y1: 0, x2: 0.58, y2: 1 }' }\r\n }\r\n },\r\n nav: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n thumbs: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n loop: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n counter: {\r\n table: {\r\n defaultValue: { summary: true }\r\n }\r\n },\r\n bulletSize: {\r\n table: {\r\n defaultValue: { summary: 6 }\r\n }\r\n },\r\n thumbWidth: {\r\n table: {\r\n defaultValue: { summary: 120 }\r\n }\r\n },\r\n thumbHeight: {\r\n table: {\r\n defaultValue: { summary: 90 }\r\n }\r\n },\r\n autoplayInterval: {\r\n table: {\r\n defaultValue: { summary: 3000 }\r\n }\r\n },\r\n scrollDuration: {\r\n table: {\r\n defaultValue: { summary: 468 }\r\n }\r\n },\r\n resizeDebounceTime: {\r\n table: {\r\n defaultValue: { summary: 0 }\r\n }\r\n },\r\n error: {\r\n control: false\r\n },\r\n indexChange: {\r\n control: false\r\n },\r\n itemsChange: {\r\n control: false\r\n },\r\n itemClick: {\r\n control: false\r\n },\r\n thumbClick: {\r\n control: false\r\n },\r\n playingChange: {\r\n control: false\r\n },\r\n galleryRef: {\r\n control: false\r\n },\r\n load: {\r\n control: false\r\n },\r\n add: {\r\n control: false\r\n },\r\n addImage: {\r\n control: false\r\n },\r\n addVideo: {\r\n control: false\r\n },\r\n addIframe: {\r\n control: false\r\n },\r\n addYoutube: {\r\n control: false\r\n },\r\n remove: {\r\n control: false\r\n },\r\n next: {\r\n control: false\r\n },\r\n prev: {\r\n control: false\r\n },\r\n set: {\r\n control: false\r\n },\r\n reset: {\r\n control: false\r\n },\r\n play: {\r\n control: false\r\n },\r\n stop: {\r\n control: false\r\n }\r\n }\r\n}" + }, + { + "name": "NavExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('lions') }),\r\n ]\r\n}" + }, + { + "name": "NavWithLoopExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "SliderBehaviorExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('chips') }),\r\n ]\r\n}" + }, + { + "name": "SliderDirectionExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('tigers') }),\r\n ]\r\n}" + }, + { + "name": "SliderExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('chips') }),\r\n ]\r\n}" + }, + { + "name": "ThumbAutosizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('roads') }),\r\n ]\r\n}" + }, + { + "name": "ThumbDetachedExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('flowers') }),\r\n ]\r\n}" + }, + { + "name": "ThumbPositionExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('street') }),\r\n ]\r\n}" + }, + { + "name": "ThumbViewExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters:{ controls:{ exclude:/.*/g } },\r\n render: (args: GalleryComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: ``\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('landscape') }),\r\n ]\r\n}" + } + ], + "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts": [ + { + "name": "BoxTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  This is fixed overlay template
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .my-box {\r\n width: 200px;\r\n height: 50px;\r\n color: white;\r\n }\r\n img {\r\n position: absolute;\r\n z-index: 999;\r\n width: 40px;\r\n height: 40px;\r\n top: 20px;\r\n left: 20px;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + }, + { + "name": "ImageTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n {{ item?.alt }}\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + }, + { + "name": "ItemTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n img {\r\n object-fit: cover;\r\n border: 10px white solid;\r\n width: 400px;\r\n height: 400px;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImagesForCustomTemplate('sand') }),\r\n ]\r\n}" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/CustomTemplates',\r\n component: CustomTemplateComponent,\r\n // tags: ['autodocs'],\r\n render: (args: CustomTemplateComponent) => ({\r\n props: {\r\n ...args,\r\n },\r\n }),\r\n decorators: [\r\n moduleMetadata({\r\n imports: [GalleryModule],\r\n }),\r\n applicationConfig({\r\n providers: [provideAnimations()],\r\n }),\r\n ]\r\n}" + }, + { + "name": "ThumbTemplateExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: CustomTemplateComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n
                                                                                                                                  \r\n {{ thumb?.alt }}\r\n
                                                                                                                                  \r\n
                                                                                                                                  \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('sea') }),\r\n ]\r\n}" + } + ], + "projects/ng-gallery/src/lib/utils/gallery.default.ts": [ + { + "name": "defaultConfig", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryConfig", + "defaultValue": "{\r\n nav: true,\r\n loop: false,\r\n bullets: false,\r\n thumbs: false,\r\n debug: false,\r\n bulletSize: 6,\r\n counter: false,\r\n autoplay: false,\r\n thumbWidth: 120,\r\n thumbHeight: 90,\r\n disableBullets: false,\r\n disableThumbs: false,\r\n disableScroll: false,\r\n disableThumbScroll: false,\r\n disableMouseScroll: false,\r\n disableThumbMouseScroll: false,\r\n autoplayInterval: 3000,\r\n scrollDuration: 468,\r\n scrollEase: {\r\n x1: 0.42,\r\n y1: 0,\r\n x2: 0.58,\r\n y2: 1\r\n },\r\n thumbCentralized: false,\r\n thumbAutosize: false,\r\n itemAutosize: false,\r\n autoHeight: false,\r\n scrollBehavior: 'smooth',\r\n resizeDebounceTime: 0,\r\n loadingAttr: LoadingAttr.Lazy,\r\n imageSize: ImageSize.Contain,\r\n thumbImageSize: ImageSize.Cover,\r\n bulletPosition: BulletsPosition.Bottom,\r\n counterPosition: CounterPosition.Top,\r\n thumbPosition: ThumbnailsPosition.Bottom,\r\n loadingStrategy: LoadingStrategy.Preload,\r\n orientation: Orientation.Horizontal,\r\n navIcon: ``,\r\n // navIcon: ``,\r\n loadingIcon: ``\r\n}" + }, + { + "name": "defaultState", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "GalleryState", + "defaultValue": "{\r\n action: GalleryAction.INITIALIZED,\r\n isPlaying: false,\r\n hasNext: false,\r\n hasPrev: false,\r\n currIndex: 0,\r\n items: []\r\n}", + "rawdescription": "Initial state", + "description": "

                                                                                                                                  Initial state

                                                                                                                                  \n" + } + ], + "projects/ng-gallery/src/lib/services/gallery-ref.ts": [ + { + "name": "filterActions", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/services/gallery-ref.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "(actions: string[]) => {\r\n return filter((state: GalleryState) => actions.indexOf(state.action) > -1);\r\n}" + } + ], + "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts": [ + { + "name": "float32ArraySupported", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "typeof Float32Array === 'function'" + }, + { + "name": "kSampleStepSize", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "1.0 / (kSplineTableSize - 1.0)" + }, + { + "name": "kSplineTableSize", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "11" + }, + { + "name": "NEWTON_ITERATIONS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "4", + "rawdescription": "https://github.com/gre/bezier-easing\r\nBezierEasing - use bezier curve for transition easing function\r\nby Gaëtan Renaudeau 2014 - 2015 – MIT License", + "description": "

                                                                                                                                  https://github.com/gre/bezier-easing\nBezierEasing - use bezier curve for transition easing function\nby Gaëtan Renaudeau 2014 - 2015 – MIT License

                                                                                                                                  \n" + }, + { + "name": "NEWTON_MIN_SLOPE", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "0.001" + }, + { + "name": "SUBDIVISION_MAX_ITERATIONS", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "10" + }, + { + "name": "SUBDIVISION_PRECISION", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "number", + "defaultValue": "0.0000001" + } + ], + "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts": [ + { + "name": "GallerizeExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n styles: [`\r\n .container {\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 3px;\r\n margin: 0 auto;\r\n padding: 20px;\r\n max-width: 768px;\r\n }\r\n img {\r\n height: 90px;\r\n width: 125px;\r\n object-fit: cover;\r\n }\r\n `]\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "GallerizeGalleryExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n template: `\r\n \r\n `\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "LightboxExample", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Story", + "defaultValue": "{\r\n parameters: {\r\n docs: {\r\n source: {\r\n code: `\r\n
                                                                                                                                  \r\n \r\n
                                                                                                                                  \r\n `,\r\n },\r\n },\r\n },\r\n render: (args: LightboxExampleComponent, { loaded: { items } }) => ({\r\n props: { ...args, items, },\r\n }),\r\n loaders: [\r\n async () => ({ items: await getHDImages('ship') }),\r\n ]\r\n}" + }, + { + "name": "meta", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Meta", + "defaultValue": "{\r\n title: 'Documentations/Lightbox',\r\n component: LightboxExampleComponent,\r\n decorators: [\r\n moduleMetadata({\r\n imports: [LightboxModule],\r\n }),\r\n applicationConfig({\r\n providers: [provideAnimations()],\r\n }),\r\n ]\r\n}" + } + ], + "projects/ng-gallery/src/lib/models/config.model.ts": [ + { + "name": "GALLERY_CONFIG", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "InjectionToken", + "defaultValue": "new InjectionToken('GALLERY_CONFIG')" + } + ], + "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts": [ + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + } + ], + "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts": [ + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + } + ], + "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts": [ + { + "name": "Hammer", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "any" + } + ], + "projects/ng-gallery/src/lib/components/templates/svg-assets.ts": [ + { + "name": "imageFailedSvg", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/src/lib/components/templates/svg-assets.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "", + "defaultValue": "`\r\n\r\n \r\n\\t\r\n \r\n \r\n \r\n\r\n\r\n`" + } + ], + "projects/ng-gallery/.storybook/preview.ts": [ + { + "name": "preview", + "ctype": "miscellaneous", + "subtype": "variable", + "file": "projects/ng-gallery/.storybook/preview.ts", + "deprecated": false, + "deprecationMessage": "", + "type": "Preview", + "defaultValue": "{\n parameters: {\n layout: 'fullscreen',\n actions: { argTypesRegex: \"^on[A-Z].*\" },\n controls: {\n matchers: {\n color: /(background|color)$/i,\n date: /Date$/i,\n }\n }\n },\n}" + } + ] + }, + "groupedFunctions": { + "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts": [ + { + "name": "A", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "B", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "bezier", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mY1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mY2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mY1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mY2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "binarySubdivide", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aB", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aB", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "C", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "calcBezier", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getSlope", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aA2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "LinearEasing", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "x", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "x", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "newtonRaphsonIterate", + "file": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "aGuessT", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "" + } + ], + "jsdoctags": [ + { + "name": "aX", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "aGuessT", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX1", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "mX2", + "type": "", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "projects/ng-gallery/src/lib/observers/active-item-observer.ts": [ + { + "name": "createIntersectionObserver", + "file": "projects/ng-gallery/src/lib/observers/active-item-observer.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "elements", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Observable", + "jsdoctags": [ + { + "name": "root", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "elements", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "rootMargin", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts": [ + { + "name": "getHDImages", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Promise", + "jsdoctags": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + }, + { + "name": "getHDImagesForCustomTemplate", + "file": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "" + } + ], + "returnType": "Promise", + "jsdoctags": [ + { + "name": "key", + "type": "string", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + } + ] + } + ], + "projects/ng-gallery/src/lib/utils/resize-observer.ts": [ + { + "name": "resizeObservable", + "file": "projects/ng-gallery/src/lib/utils/resize-observer.ts", + "ctype": "miscellaneous", + "subtype": "function", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "args": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "" + }, + { + "name": "setter", + "deprecated": false, + "deprecationMessage": "", + "optional": true + } + ], + "returnType": "Observable", + "jsdoctags": [ + { + "name": "el", + "type": "HTMLElement", + "deprecated": false, + "deprecationMessage": "", + "tagName": { + "text": "param" + } + }, + { + "name": "setter", + "deprecated": false, + "deprecationMessage": "", + "optional": true, + "tagName": { + "text": "param" + } + } + ] + } + ] + }, + "groupedEnumerations": { + "projects/ng-gallery/src/lib/models/constants.ts": [ + { + "name": "BulletsPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "CounterPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "GalleryAction", + "childs": [ + { + "name": "INITIALIZED", + "deprecated": false, + "deprecationMessage": "", + "value": "initialized" + }, + { + "name": "ITEMS_CHANGED", + "deprecated": false, + "deprecationMessage": "", + "value": "itemsChanged" + }, + { + "name": "INDEX_CHANGED", + "deprecated": false, + "deprecationMessage": "", + "value": "indexChanged" + }, + { + "name": "PLAY", + "deprecated": false, + "deprecationMessage": "", + "value": "play" + }, + { + "name": "STOP", + "deprecated": false, + "deprecationMessage": "", + "value": "stop" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "GalleryItemTypes", + "childs": [ + { + "name": "Image", + "deprecated": false, + "deprecationMessage": "", + "value": "image" + }, + { + "name": "Video", + "deprecated": false, + "deprecationMessage": "", + "value": "video" + }, + { + "name": "Youtube", + "deprecated": false, + "deprecationMessage": "", + "value": "youtube" + }, + { + "name": "Iframe", + "deprecated": false, + "deprecationMessage": "", + "value": "iframe" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "ImageSize", + "childs": [ + { + "name": "Cover", + "deprecated": false, + "deprecationMessage": "", + "value": "cover" + }, + { + "name": "Contain", + "deprecated": false, + "deprecationMessage": "", + "value": "contain" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "LoadingAttr", + "childs": [ + { + "name": "Eager", + "deprecated": false, + "deprecationMessage": "", + "value": "eager" + }, + { + "name": "Lazy", + "deprecated": false, + "deprecationMessage": "", + "value": "lazy" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "LoadingStrategy", + "childs": [ + { + "name": "Preload", + "deprecated": false, + "deprecationMessage": "", + "value": "preload" + }, + { + "name": "Lazy", + "deprecated": false, + "deprecationMessage": "", + "value": "lazy" + }, + { + "name": "Default", + "deprecated": false, + "deprecationMessage": "", + "value": "default" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "Orientation", + "childs": [ + { + "name": "Horizontal", + "deprecated": false, + "deprecationMessage": "", + "value": "horizontal" + }, + { + "name": "Vertical", + "deprecated": false, + "deprecationMessage": "", + "value": "vertical" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + }, + { + "name": "ThumbnailsPosition", + "childs": [ + { + "name": "Top", + "deprecated": false, + "deprecationMessage": "", + "value": "top" + }, + { + "name": "Left", + "deprecated": false, + "deprecationMessage": "", + "value": "left" + }, + { + "name": "Right", + "deprecated": false, + "deprecationMessage": "", + "value": "right" + }, + { + "name": "Bottom", + "deprecated": false, + "deprecationMessage": "", + "value": "bottom" + } + ], + "ctype": "miscellaneous", + "subtype": "enum", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "projects/ng-gallery/src/lib/models/constants.ts" + } + ] + }, + "groupedTypeAliases": { + "projects/ng-gallery/src/lib/models/config.model.ts": [ + { + "name": "GalleryConfig", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "HorizontalPosition", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"top\" | \"bottom\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "ImageSize", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"contain\" | \"cover\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "LoadingAttr", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"eager\" | \"lazy\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "LoadingStrategy", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"preload\" | \"lazy\" | \"default\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "Orientation", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"horizontal\" | \"vertical\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "ThumbsPosition", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"top\" | \"left\" | \"right\" | \"bottom\"", + "file": "projects/ng-gallery/src/lib/models/config.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + } + ], + "projects/ng-gallery/src/lib/components/templates/items.model.ts": [ + { + "name": "GalleryItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "ImageItemData | VideoItemData | IframeItemData | YoutubeItemData", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "GalleryItemModel", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "literal type", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 184 + }, + { + "name": "IframeItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "ImageItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "ItemState", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "\"success\" | \"loading\" | \"failed\"", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + }, + { + "name": "VideoItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "YoutubeItemData", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + } + ], + "projects/ng-gallery/src/lib/models/constants.ts": [ + { + "name": "GalleryItemType", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "GalleryItemTypes | string", + "file": "projects/ng-gallery/src/lib/models/constants.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 189 + } + ], + "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts": [ + { + "name": "SmoothScrollOptions", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + }, + { + "name": "SmoothScrollToOptions", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "", + "file": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 190 + } + ], + "projects/ng-gallery/src/stories/basic/Gallery.stories.ts": [ + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + } + ], + "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts": [ + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + } + ], + "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts": [ + { + "name": "Story", + "ctype": "miscellaneous", + "subtype": "typealias", + "rawtype": "StoryObj", + "file": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "kind": 180 + } + ] + } + }, + "routes": [], + "coverage": { + "count": 9, + "status": "low", + "files": [ + { + "filePath": "projects/ng-gallery/.storybook/preview.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "preview", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "AutoplayDirective", + "coveragePercent": 0, + "coverageCount": "0/11", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/adapters/base-adapter.ts", + "type": "class", + "linktype": "classe", + "name": "SliderAdapter", + "coveragePercent": 0, + "coverageCount": "0/10", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "type": "class", + "linktype": "classe", + "name": "HorizontalAdapter", + "coveragePercent": 0, + "coverageCount": "0/13", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "type": "class", + "linktype": "classe", + "name": "VerticalAdapter", + "coveragePercent": 0, + "coverageCount": "0/13", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/adapters/main-adapters.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "Hammer", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-bullets.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryBulletsComponent", + "coveragePercent": 0, + "coverageCount": "0/6", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-core.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryCoreComponent", + "coveragePercent": 62, + "coverageCount": "15/24", + "status": "good" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-counter.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryCounterComponent", + "coveragePercent": 0, + "coverageCount": "0/2", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-item.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryItemComponent", + "coveragePercent": 56, + "coverageCount": "9/16", + "status": "good" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-nav.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryNavComponent", + "coveragePercent": 0, + "coverageCount": "0/11", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-slider.component.ts", + "type": "component", + "linktype": "component", + "name": "GallerySliderComponent", + "coveragePercent": 45, + "coverageCount": "9/20", + "status": "medium" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-thumb.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryThumbComponent", + "coveragePercent": 45, + "coverageCount": "5/11", + "status": "medium" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryThumbsComponent", + "coveragePercent": 56, + "coverageCount": "9/16", + "status": "good" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/gallery.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryComponent", + "coveragePercent": 98, + "coverageCount": "57/58", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/gallery-iframe.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryIframeComponent", + "coveragePercent": 0, + "coverageCount": "0/9", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryImageComponent", + "coveragePercent": 52, + "coverageCount": "9/17", + "status": "good" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/gallery-video.component.ts", + "type": "component", + "linktype": "component", + "name": "GalleryVideoComponent", + "coveragePercent": 6, + "coverageCount": "1/15", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "type": "class", + "linktype": "classe", + "name": "IframeItem", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "type": "class", + "linktype": "classe", + "name": "ImageItem", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "type": "class", + "linktype": "classe", + "name": "VideoItem", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/items.model.ts", + "type": "class", + "linktype": "classe", + "name": "YoutubeItem", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/components/templates/svg-assets.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "imageFailedSvg", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "GalleryBoxDef", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-box-def.directive.ts", + "type": "interface", + "linktype": "interface", + "name": "GalleryStateContext", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-image-def.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "GalleryImageDef", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "GalleryItemDef", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-item-def.directive.ts", + "type": "interface", + "linktype": "interface", + "name": "GalleryItemContext", + "coveragePercent": 87, + "coverageCount": "7/8", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/directives/gallery-thumb-def.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "GalleryThumbDef", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "HammerSliding", + "coveragePercent": 5, + "coverageCount": "1/17", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "Hammer", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "BulletsConfig", + "coveragePercent": 0, + "coverageCount": "0/5", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "CounterConfig", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "NavConfig", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "PlayerConfig", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "SliderConfig", + "coveragePercent": 0, + "coverageCount": "0/17", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "interface", + "linktype": "interface", + "name": "ThumbConfig", + "coveragePercent": 0, + "coverageCount": "0/15", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/config.model.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "GALLERY_CONFIG", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "type": "interface", + "linktype": "interface", + "name": "GalleryError", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "type": "interface", + "linktype": "interface", + "name": "GalleryItem", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/gallery.model.ts", + "type": "interface", + "linktype": "interface", + "name": "GalleryState", + "coveragePercent": 0, + "coverageCount": "0/8", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/slider.model.ts", + "type": "interface", + "linktype": "interface", + "name": "SliderState", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/models/slider.model.ts", + "type": "interface", + "linktype": "interface", + "name": "WorkerState", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/active-item-observer.ts", + "type": "class", + "linktype": "classe", + "name": "ActiveItemObserver", + "coveragePercent": 0, + "coverageCount": "0/2", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/active-item-observer.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "createIntersectionObserver", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "ItemIntersectionObserver", + "coveragePercent": 0, + "coverageCount": "0/12", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "SliderIntersectionObserver", + "coveragePercent": 0, + "coverageCount": "0/13", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "SliderResizeObserver", + "coveragePercent": 0, + "coverageCount": "0/21", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "ThumbResizeObserver", + "coveragePercent": 0, + "coverageCount": "0/10", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/services/gallery-ref.ts", + "type": "class", + "linktype": "classe", + "name": "GalleryRef", + "coveragePercent": 92, + "coverageCount": "23/25", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/services/gallery-ref.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "filterActions", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/services/gallery.service.ts", + "type": "injectable", + "linktype": "injectable", + "name": "Gallery", + "coveragePercent": 77, + "coverageCount": "7/9", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "A", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "B", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "bezier", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "binarySubdivide", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "C", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "calcBezier", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "getSlope", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "LinearEasing", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "newtonRaphsonIterate", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "float32ArraySupported", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "kSampleStepSize", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "kSplineTableSize", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "NEWTON_ITERATIONS", + "coveragePercent": 100, + "coverageCount": "1/1", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "NEWTON_MIN_SLOPE", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "SUBDIVISION_MAX_ITERATIONS", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/bezier-easing.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "SUBDIVISION_PRECISION", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts", + "type": "directive", + "linktype": "directive", + "name": "SmoothScroll", + "coveragePercent": 27, + "coverageCount": "6/22", + "status": "medium" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "Hammer", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "type": "interface", + "linktype": "interface", + "name": "BezierEasingOptions", + "coveragePercent": 0, + "coverageCount": "0/5", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts", + "type": "interface", + "linktype": "interface", + "name": "SmoothScrollStep", + "coveragePercent": 0, + "coverageCount": "0/11", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "defaultConfig", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/gallery.default.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "defaultState", + "coveragePercent": 100, + "coverageCount": "1/1", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/img-manager.ts", + "type": "injectable", + "linktype": "injectable", + "name": "ImgManager", + "coveragePercent": 0, + "coverageCount": "0/6", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/img-manager.ts", + "type": "interface", + "linktype": "interface", + "name": "ImageRegistry", + "coveragePercent": 0, + "coverageCount": "0/3", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/img-recognizer.ts", + "type": "directive", + "linktype": "directive", + "name": "ImgRecognizer", + "coveragePercent": 0, + "coverageCount": "0/9", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/lib/utils/resize-observer.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "resizeObservable", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "AutoHeightExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "AutoplayExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "BulletExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "CounterExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ImageSizeExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ItemAutosizeExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "Lab", + "coveragePercent": 100, + "coverageCount": "1/1", + "status": "very-good" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "meta", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "NavExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "NavWithLoopExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "SliderBehaviorExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "SliderDirectionExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "SliderExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ThumbAutosizeExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ThumbDetachedExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ThumbPositionExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/basic/Gallery.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ThumbViewExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "BoxTemplateExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ImageTemplateExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ItemTemplateExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "meta", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "ThumbTemplateExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts", + "type": "component", + "linktype": "component", + "name": "CustomTemplateComponent", + "coveragePercent": 50, + "coverageCount": "1/2", + "status": "medium" + }, + { + "filePath": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "GallerizeExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "GallerizeGalleryExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "LightboxExample", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "meta", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/lightbox/lightbox-example.ts", + "type": "component", + "linktype": "component", + "name": "LightboxExampleComponent", + "coveragePercent": 0, + "coverageCount": "0/9", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "type": "interface", + "linktype": "interface", + "name": "Hit", + "coveragePercent": 0, + "coverageCount": "0/22", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "type": "interface", + "linktype": "interface", + "name": "Hit2", + "coveragePercent": 0, + "coverageCount": "0/18", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "type": "interface", + "linktype": "interface", + "name": "PixabayHDModel", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.model.ts", + "type": "interface", + "linktype": "interface", + "name": "PixabayModel", + "coveragePercent": 0, + "coverageCount": "0/4", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "getHDImages", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "type": "function", + "linktype": "miscellaneous", + "linksubtype": "function", + "name": "getHDImagesForCustomTemplate", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + }, + { + "filePath": "projects/ng-gallery/src/stories/pixabay/pixabay.service.ts", + "type": "variable", + "linktype": "miscellaneous", + "linksubtype": "variable", + "name": "API_KEY", + "coveragePercent": 0, + "coverageCount": "0/1", + "status": "low" + } + ] + } +} \ No newline at end of file diff --git a/projects/ng-gallery/lightbox/src/gallerize.directive.ts b/projects/ng-gallery/lightbox/src/gallerize.directive.ts index 6177e040..9ccec6dd 100644 --- a/projects/ng-gallery/lightbox/src/gallerize.directive.ts +++ b/projects/ng-gallery/lightbox/src/gallerize.directive.ts @@ -9,9 +9,8 @@ import { Host, NgZone, ElementRef, - PLATFORM_ID } from '@angular/core'; -import { DOCUMENT, isPlatformBrowser } from '@angular/common'; +import { DOCUMENT } from '@angular/common'; import { Gallery, GalleryRef, ImageItem, GalleryComponent, GalleryState, GalleryItem } from 'ng-gallery'; import { Subject, Subscription, from, tap, map, switchMap, finalize, debounceTime, EMPTY } from 'rxjs'; @@ -35,7 +34,7 @@ const enum GallerizeMode { export class GallerizeDirective implements OnInit, OnDestroy { /** Default gallery id */ - private _galleryId = 'lightbox'; + private _galleryId: string = 'lightbox'; /** Gallerize mode */ private readonly _mode: GallerizeMode; @@ -43,7 +42,7 @@ export class GallerizeDirective implements OnInit, OnDestroy { /** If host element is a HTMLElement, will use the following variables: */ /** Stream that emits to fire the detection stream the image elements has changed */ - private _observer$: any; + private _observer$: MutationObserver; /** Stream that emits when image is discover */ private _detector$: Subject; @@ -60,26 +59,23 @@ export class GallerizeDirective implements OnInit, OnDestroy { @Input() gallerize: string; /** The selector used to query images elements */ - @Input() selector = 'img'; + @Input() selector: string = 'img'; constructor(private _zone: NgZone, private _el: ElementRef, private _gallery: Gallery, private _lightbox: Lightbox, - @Inject(PLATFORM_ID) platform: Object, @Inject(DOCUMENT) private _document: any, @Host() @Self() @Optional() private _galleryCmp: GalleryComponent) { // Set gallerize mode - if (isPlatformBrowser(platform)) { - this._mode = _galleryCmp ? GallerizeMode.Gallery : GallerizeMode.Detector; - } + this._mode = _galleryCmp ? GallerizeMode.Gallery : GallerizeMode.Detector; } - ngOnInit() { + ngOnInit(): void { this._zone.runOutsideAngular(() => { this._galleryId = this.gallerize || this._galleryId; - const ref = this._gallery.ref(this._galleryId); + const ref: GalleryRef = this._gallery.ref(this._galleryId); switch (this._mode) { case GallerizeMode.Detector: @@ -91,7 +87,7 @@ export class GallerizeDirective implements OnInit, OnDestroy { }); } - ngOnDestroy() { + ngOnDestroy(): void { switch (this._mode) { case GallerizeMode.Detector: this._detector$.complete(); @@ -105,7 +101,7 @@ export class GallerizeDirective implements OnInit, OnDestroy { /** Gallery mode: means `gallerize` directive is used on `` component * Adds a click event to each gallery item so it opens in lightbox */ - private galleryMode(galleryRef: GalleryRef) { + private galleryMode(galleryRef: GalleryRef): void { // Clone its items to the new gallery instance this._itemClick$ = this._galleryCmp.galleryRef.itemClick.subscribe((i: number) => this._lightbox.open(i, this._galleryId)); this._itemChange$ = this._galleryCmp.galleryRef.itemsChanged.subscribe((state: GalleryState) => galleryRef.load(state.items)); @@ -113,7 +109,7 @@ export class GallerizeDirective implements OnInit, OnDestroy { /** Detector mode: means `gallerize` directive is used on a normal HTMLElement * Detects images and adds a click event to each image, so it opens in the lightbox */ - private detectorMode(galleryRef: GalleryRef) { + private detectorMode(galleryRef: GalleryRef): void { this._detector$ = new Subject(); // Query image elements this._detector$.pipe( diff --git a/projects/ng-gallery/package.json b/projects/ng-gallery/package.json index cf388ebc..daab11b3 100644 --- a/projects/ng-gallery/package.json +++ b/projects/ng-gallery/package.json @@ -1,6 +1,6 @@ { "name": "ng-gallery", - "version": "11.0.0", + "version": "12.0.0-beta.0", "homepage": "https://ngx-gallery.netlify.com/", "author": { "name": "Murhaf Sousli", diff --git a/projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts b/projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts new file mode 100644 index 00000000..a30c57da --- /dev/null +++ b/projects/ng-gallery/src/lib/autoplay/autoplay.directive.ts @@ -0,0 +1,72 @@ +import { Directive, Input, AfterViewInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; +import { Subscription, delay, of, switchMap, tap, EMPTY } from 'rxjs'; +import { ImgManager } from '../utils/img-manager'; +import { Gallery } from '../services/gallery.service'; +import { GalleryRef } from '../services/gallery-ref'; +import { GalleryState } from '../models/gallery.model'; +import { GalleryConfig } from '../models/config.model'; + +@Directive({ + selector: 'gallery-core[autoplay]', + standalone: true +}) +export class AutoplayDirective implements AfterViewInit, OnChanges, OnDestroy { + + private _currentSubscription: Subscription; + + private _galleryRef: GalleryRef; + + @Input() config: GalleryConfig; + + @Input() galleryId: string; + + constructor(private _gallery: Gallery, private _imgManager: ImgManager) { + } + + ngAfterViewInit(): void { + this._galleryRef = this._gallery.ref(this.galleryId); + this._subscribe(); + if (this.config.autoplay) { + this._galleryRef.play(); + } + } + + ngOnChanges(changes: SimpleChanges): void { + if (this._galleryRef && changes.config?.currentValue.autoplay !== changes.config?.previousValue.autoplay) { + this.config.autoplay ? this._galleryRef.play() : this._galleryRef.stop(); + } + } + + ngOnDestroy(): void { + this._unsubscribe(); + } + + + private _subscribe(): void { + this._unsubscribe(); + + this._currentSubscription = this._galleryRef.playingChanged.pipe( + switchMap((state: GalleryState) => { + if (state.isPlaying) { + return this._imgManager.getActiveItem(this._galleryRef.state).pipe( + switchMap(() => of({}).pipe( + delay(this.config.autoplayInterval), + tap(() => { + if (this._galleryRef.stateSnapshot.hasNext) { + this._galleryRef.next(this.config.scrollBehavior); + } else { + this._galleryRef.set(0, this.config.scrollBehavior); + } + }) + )) + ); + } + return EMPTY; + }) + ).subscribe(); + } + + private _unsubscribe(): void { + this._currentSubscription?.unsubscribe(); + } +} diff --git a/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts b/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts index cc5d09ce..0fc529d6 100644 --- a/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts +++ b/projects/ng-gallery/src/lib/components/adapters/base-adapter.ts @@ -16,9 +16,9 @@ export abstract class SliderAdapter { abstract getCentralizerEndSize(): number; - abstract getRoomMargin(): string; + abstract getRootMargin(): string; - abstract getElementRoomMargin(viewport: HTMLElement, el: HTMLElement): string; + abstract getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string; abstract getHammerVelocity(e): number; diff --git a/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts b/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts index b3f95a97..6cc804ba 100644 --- a/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts +++ b/projects/ng-gallery/src/lib/components/adapters/main-adapters.ts @@ -1,6 +1,6 @@ import { GalleryConfig } from '../../models/config.model'; import { SliderAdapter } from './base-adapter'; -import { SmoothScrollToOptions } from '../../smooth-scroll'; +import { SmoothScrollOptions } from '../../smooth-scroll'; declare const Hammer: any; @@ -19,26 +19,25 @@ export class HorizontalAdapter implements SliderAdapter { } get isContentLessThanContainer(): boolean { - return this.slider.clientWidth >= this.slider.firstElementChild.clientWidth; + return this.clientSize >= this.slider.firstElementChild.clientWidth; } constructor(public slider: HTMLElement, public config: GalleryConfig) { } - getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions { + getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions { const position: number = el.offsetLeft - ((this.clientSize - el.clientWidth) / 2); return { - start: position, - duration: behavior === 'smooth' ? this.config.slidingDuration : 0, - easing: this.config.slidingEase + behavior, + start: position }; } - getRoomMargin(): string { - return `0px 1px 0px 1px`; + getRootMargin(): string { + return `1000px 1px 1000px 1px`; } - getElementRoomMargin(viewport: HTMLElement, el: HTMLElement): string { + getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string { const rootMargin: number = -1 * ((viewport.clientWidth - el.clientWidth) / 2) + 1; return `0px ${ rootMargin }px 0px ${ rootMargin }px`; } @@ -97,26 +96,25 @@ export class VerticalAdapter implements SliderAdapter { } get isContentLessThanContainer(): boolean { - return this.slider.clientHeight >= this.slider.firstElementChild.clientHeight; + return this.clientSize >= this.slider.firstElementChild.clientHeight; } constructor(public slider: HTMLElement, public config: GalleryConfig) { } - getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollToOptions { + getScrollToValue(el: HTMLElement, behavior: ScrollBehavior): SmoothScrollOptions { const position: number = el.offsetTop - ((this.clientSize - el.clientHeight) / 2); return { - top: position, - duration: behavior === 'smooth' ? this.config.slidingDuration : 0, - easing: this.config.slidingEase + behavior, + top: position }; } - getRoomMargin(): string { - return `1px 0px 1px 0px`; + getRootMargin(): string { + return `1px 1000px 1px 1000px`; } - getElementRoomMargin(viewport: HTMLElement, el: HTMLElement): string { + getElementRootMargin(viewport: HTMLElement, el: HTMLElement): string { const rootMargin: number = -1 * ((viewport.clientHeight - el.clientHeight) / 2) + 1; return `${ rootMargin }px 0px ${ rootMargin }px 0px`; } diff --git a/projects/ng-gallery/src/lib/components/gallery-dots.component.ts b/projects/ng-gallery/src/lib/components/gallery-bullets.component.ts similarity index 60% rename from projects/ng-gallery/src/lib/components/gallery-dots.component.ts rename to projects/ng-gallery/src/lib/components/gallery-bullets.component.ts index 7ec73643..88358a34 100644 --- a/projects/ng-gallery/src/lib/components/gallery-dots.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-bullets.component.ts @@ -5,22 +5,24 @@ import { GalleryState } from '../models/gallery.model'; import { GalleryConfig } from '../models/config.model'; @Component({ - selector: 'gallery-dots', + selector: 'gallery-bullets', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-bullets.scss'], template: ` -
                                                                                                                                  -
                                                                                                                                  + [class.g-bullet-active]="i === state.currIndex" + [style.width.px]="config?.bulletSize" + [style.height.px]="config?.bulletSize" + (click)="config.disableBullets ? null : gallery.ref(this.galleryId).set(i)"> +
                                                                                                                                  `, standalone: true, imports: [CommonModule] }) -export class GalleryDotsComponent { +export class GalleryBulletsComponent { + @Input() galleryId: string; @Input() state: GalleryState; @Input() config: GalleryConfig; diff --git a/projects/ng-gallery/src/lib/components/gallery-bullets.scss b/projects/ng-gallery/src/lib/components/gallery-bullets.scss new file mode 100644 index 00000000..1b728cfe --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-bullets.scss @@ -0,0 +1,40 @@ +:host { + position: absolute; + left: 50%; + z-index: 99; + transform: translateX(-50%); + display: flex; + gap: 6px; + top: var(--bullets-top); + bottom: var(--bullets-bottom); +} + +:host, +.g-bullet, +.g-bullet-inner { + display: flex; + justify-content: center; + align-items: center; +} + +.g-bullet { + cursor: var(--bullets-cursor); + z-index: 20; + + &:hover .g-bullet-inner { + opacity: var(--bullets-hover-opacity); + } +} + +.g-bullet-active .g-bullet-inner { + opacity: var(--bullets-active-opacity); +} + +.g-bullet-inner { + background-color: var(--g-overlay-color); + opacity: var(--bullets-opacity); + width: 100%; + height: 100%; + border-radius: 50%; + transition: opacity linear 150ms; +} diff --git a/projects/ng-gallery/src/lib/components/gallery-core.component.ts b/projects/ng-gallery/src/lib/components/gallery-core.component.ts index 9bee6938..9e7a646d 100644 --- a/projects/ng-gallery/src/lib/components/gallery-core.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-core.component.ts @@ -1,7 +1,19 @@ -import { Component, Input, Output, HostBinding, ChangeDetectionStrategy, EventEmitter } from '@angular/core'; +import { + Component, + Input, + Output, + HostBinding, + EventEmitter, + OnChanges, + SimpleChanges, + ElementRef, + ChangeDetectionStrategy +} from '@angular/core'; import { CommonModule } from '@angular/common'; +import { coerceCssPixelValue } from '@angular/cdk/coercion'; +import { Direction, Directionality } from '@angular/cdk/bidi'; import { GalleryCounterComponent } from './gallery-counter.component'; -import { GalleryDotsComponent } from './gallery-dots.component'; +import { GalleryBulletsComponent } from './gallery-bullets.component'; import { GalleryNavComponent } from './gallery-nav.component'; import { GallerySliderComponent } from './gallery-slider.component'; import { GalleryThumbsComponent } from './gallery-thumbs.component'; @@ -11,16 +23,18 @@ import { GalleryConfig } from '../models/config.model'; @Component({ selector: 'gallery-core', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-core.scss', '../styles/debug.scss'], template: ` - - + (error)="error.emit($event)"/>
                                                                                                                                  - - + [galleryId]="galleryId"/> - - + - + [state]="state"/>
                                                                                                                                  - +
                                                                                                                                  `, standalone: true, - imports: [CommonModule, GalleryThumbsComponent, GallerySliderComponent, GalleryNavComponent, GalleryDotsComponent, GalleryCounterComponent] + imports: [CommonModule, GalleryThumbsComponent, GallerySliderComponent, GalleryNavComponent, GalleryBulletsComponent, GalleryCounterComponent] }) -export class GalleryCoreComponent { +export class GalleryCoreComponent implements OnChanges { @Input() galleryId: string; @Input() state: GalleryState; @Input() config: GalleryConfig; - @Output() itemClick = new EventEmitter(); - @Output() thumbClick = new EventEmitter(); - @Output() error = new EventEmitter(); + @Output() itemClick: EventEmitter = new EventEmitter(); + @Output() thumbClick: EventEmitter = new EventEmitter(); + @Output() error: EventEmitter = new EventEmitter(); /** Set thumbnails position */ @HostBinding('attr.thumbPosition') get thumbPosition(): 'top' | 'left' | 'right' | 'bottom' { @@ -67,61 +79,86 @@ export class GalleryCoreComponent { } /** Set sliding direction */ - @HostBinding('attr.slidingDirection') get slidingDirection(): 'horizontal' | 'vertical' { - return this.config.slidingDirection; + @HostBinding('attr.orientation') get orientation(): 'horizontal' | 'vertical' { + return this.config.orientation; + } + + /** Disable thumbnails' clicks */ + @HostBinding('attr.thumbDisabled') get disableThumb(): boolean { + return this.config.disableThumbs; } - /** Disable thumbnails clicks */ - @HostBinding('attr.disableThumb') get disableThumb(): boolean { - return this.config.disableThumb; + /** Set bullets' clicks */ + @HostBinding('attr.bulletDisabled') get bulletDisabled(): boolean { + return this.config.disableBullets; } - /** Set gallery image size */ + /** Set gallery bullets position */ + @HostBinding('attr.bulletPosition') get bulletPosition(): 'top' | 'bottom' { + return this.config.bulletPosition; + } + + /** Set gallery image size property */ @HostBinding('attr.imageSize') get imageSize(): 'cover' | 'contain' { return this.config.imageSize; } + /** Set gallery thumb image size property */ @HostBinding('attr.thumbImageSize') get thumbImageSize(): 'contain' | 'cover' { return this.config.thumbImageSize; } - /** Set gallery dots position */ - @HostBinding('attr.dotsPosition') get dotsPosition(): 'top' | 'bottom' { - return this.config.dotsPosition; - } - /** Set gallery counter position */ @HostBinding('attr.counterPosition') get counterPosition(): 'top' | 'bottom' { return this.config.counterPosition; } - /** Set gallery counter position */ - @HostBinding('attr.slidingDisabled') get slidingDisabled(): boolean { - return this.config.slidingDisabled; + /** Disable sliding using sliding via touchpad, mousewheel and gestures */ + @HostBinding('attr.scrollDisabled') get scrollDisabled(): boolean { + return this.config.disableScroll; } - /** Set gallery counter position */ - @HostBinding('attr.thumbSlidingDisabled') get thumbSlidingDisabled(): boolean { - return this.config.thumbSlidingDisabled; + /** Disable thumb sliding using sliding via touchpad, mousewheel and gestures */ + @HostBinding('attr.thumbScrollDisabled') get thumbScrollDisabled(): boolean { + return this.config.disableThumbScroll; } - /** Set gallery slider itemAutosize style */ + /** Set items autosize styles */ @HostBinding('attr.itemAutosize') get itemAutosize(): boolean { return this.config.itemAutosize; } - /** Set gallery slider autoHeight style */ + /** Set gallery autoHeight styles */ @HostBinding('attr.autoHeight') get autoHeight(): boolean { return this.config.autoHeight; } - /** Set gallery slider thumbAutosize style */ + /** Set gallery thumb autosize styles */ @HostBinding('attr.thumbAutosize') get thumbAutosize(): boolean { return this.config.thumbAutosize; } + /** Set direction */ + @HostBinding('attr.dir') get direction(): Direction { + return this.dir.value; + } + /** Set debug style */ @HostBinding('attr.debug') get debug(): boolean { return this.config.debug; } + + constructor(private el: ElementRef, private dir: Directionality) { + } + + ngOnChanges(changes: SimpleChanges): void { + if (changes.config) { + if (changes.config.currentValue?.thumbWidth !== changes.config.previousValue?.thumbWidth) { + this.el.nativeElement.style.setProperty('--g-thumb-width', coerceCssPixelValue(changes.config.currentValue.thumbWidth)); + } + if (changes.config.currentValue?.thumbHeight !== changes.config.previousValue?.thumbHeight) { + this.el.nativeElement.style.setProperty('--g-thumb-height', coerceCssPixelValue(changes.config.currentValue.thumbHeight)); + } + } + } } diff --git a/projects/ng-gallery/src/lib/components/gallery-core.scss b/projects/ng-gallery/src/lib/components/gallery-core.scss new file mode 100644 index 00000000..df1257a5 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-core.scss @@ -0,0 +1,219 @@ +:host { + position: relative; + overflow: hidden; + display: flex; + gap: var(--g-gutter-size); + width: 100%; + height: 500px; + min-height: 100%; + max-height: 100%; + + &[thumbPosition='top'] { + flex-direction: column; + } + + &[thumbPosition='left'] { + flex-direction: row; + } + + &[thumbPosition='right'] { + flex-direction: row-reverse; + } + + &[thumbPosition='bottom'] { + flex-direction: column-reverse; + } + + // Gallery auto-height variables + &[autoHeight='true'][itemAutoSize='false'][orientation='horizontal'] { + &[thumbPosition='top'], &[thumbPosition='bottom'] { + // if auto-height, use fit-content + height: fit-content; + --g-item-height: auto !important; + --g-item-max-height: auto; + } + } + + // Gallery image variables + --image-object-fit: unset; + + &[imageSize='contain'] gallery-slider, + &[thumbImageSize='contain'] gallery-thumbs { + --image-object-fit: contain; + } + + &[imageSize='cover'] gallery-slider, + &[thumbImageSize='cover'] gallery-thumbs { + --image-object-fit: cover; + } + + // Gallery thumbs variables + --slider-thumb-height: unset; + --slider-thumb-width: unset; + --thumb-slider-left: unset; + --thumb-slider-overflow: unset; + --thumb-slider-flex-direction: unset; + --g-thumb-width: unset; + --g-thumb-height: unset; + --g-thumb-cursor: pointer; + + &[thumbPosition='top'], + &[thumbPosition='bottom'] { + --thumb-slider-top: 0; + --thumb-slider-overflow: auto hidden; + --thumb-slider-flex-direction: row; + --g-thumb-height: 100%; + + &[thumbAutosize="true"] { + --g-thumb-width: auto !important; + } + } + + &[thumbPosition='left'], + &[thumbPosition='right'] { + --thumb-slider-left: 0; + --thumb-slider-overflow: hidden auto; + --thumb-slider-flex-direction: column; + --g-thumb-width: 100%; + + &[thumbAutosize="true"] { + --g-thumb-height: auto !important; + } + } + + &[thumbDisbled='true'] { + --g-thumb-cursor: default; + } + + &[thumbScrollDisabled='true'] { + --thumb-slider-overflow: hidden !important; + } + + // Gallery slider variables + --slider-scroll-snap-type: unset; + --slider-overflow: unset; + --slider-flex-direction: unset; + --slider-width: unset; + --slider-height: unset; + --slider-content-width: unset; + --slider-content-height: unset; + + &[orientation='horizontal'] { + --slider-overflow: auto hidden; + --slider-scroll-snap-type: x mandatory; + --slider-flex-direction: row; + --slider-content-height: 100%; + } + + &[orientation='vertical'] { + --slider-overflow: hidden auto; + --slider-scroll-snap-type: y mandatory; + --slider-flex-direction: column; + --slider-content-width: 100%; + } + + &[scrollDisabled='true'] { + --slider-overflow: hidden !important; + } + + // Gallery items variables + --g-item-width: unset; + --g-item-height: unset; + --g-item-max-height: var(--slider-height); + + &[orientation='horizontal'] { + --g-item-width: var(--slider-width); + --g-item-height: 100%; + + &[itemAutoSize='true'] { + --g-item-width: auto; + } + } + + &[orientation='vertical'] { + --g-item-width: 100%; + --g-item-height: var(--slider-height); + + &[itemAutoSize='true'] { + --g-item-height: auto; + } + } + + // Gallery bullets variables + --bullets-top: unset; + --bullets-bottom: unset; + --bullets-cursor: pointer; + --bullets-opacity: 0.4; + --bullets-hover-opacity: 1; + --bullets-active-opacity: 1; + + &[bulletPosition='top'] { + --bullets-top: 15px; + } + + &[bulletPosition='bottom'] { + --bullets-bottom: 15px; + } + + &[bulletDisabled='true'] { + --bullets-cursor: default; + --bullets-hover-opacity: var(--bullets-opacity); + } + + // Gallery position variables + --counter-top: unset; + --counter-bottom: unset; + --counter-border-radius: unset; + + &[counterPosition='top'] { + --counter-top: 0; + --counter-border-radius: 0 0 4px 4px; + } + + &[counterPosition='bottom'] { + --counter-bottom: 0; + --counter-border-radius: 4px 4px 0 0; + } + + // Gallery nav variables + --nav-space: 8px; + --nav-hover-space: 6.4px; + --nav-next-right: unset; + --nav-next-hover-right: unset; + --nav-next-left: unset; + --nav-next-hover-left: unset; + + &[dir='ltr'] { + --nav-next-transform: translateY(-50%) perspective(1px); + --nav-next-right: var(--nav-space); + --nav-next-hover-right: var(--nav-hover-space); + + --nav-prev-transform: translateY(-50%) perspective(1px) scale(-1, -1); + --nav-prev-left: var(--nav-space); + --nav-prev-hover-left: var(--nav-hover-space); + } + + &[dir='rtl'] { + --nav-next-transform: translateY(-50%) perspective(1px) scale(-1, -1); + --nav-next-left: var(--nav-space); + --nav-next-hover-left: var(--nav-hover-space); + + --nav-prev-transform: translateY(-50%) perspective(1px); + --nav-prev-right: var(--nav-space); + --nav-prev-hover-right: var(--nav-hover-space); + } +} + +.g-box { + overflow: hidden; + position: relative; + display: flex; + flex-direction: column; + order: 1; + flex: 1; +} + +.g-box-template { + position: absolute; + z-index: 10; +} diff --git a/projects/ng-gallery/src/lib/components/gallery-counter.component.ts b/projects/ng-gallery/src/lib/components/gallery-counter.component.ts index b486746b..b828d031 100644 --- a/projects/ng-gallery/src/lib/components/gallery-counter.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-counter.component.ts @@ -2,8 +2,9 @@ import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; import { GalleryState } from '../models/gallery.model'; @Component({ - selector: 'gallery-counter', + selector: 'gallery-counter', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-counter.scss'], template: `
                                                                                                                                  {{ (state.currIndex + 1) + ' / ' + state.items.length }}
                                                                                                                                  `, diff --git a/projects/ng-gallery/src/lib/components/gallery-counter.scss b/projects/ng-gallery/src/lib/components/gallery-counter.scss new file mode 100644 index 00000000..f5eadc11 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-counter.scss @@ -0,0 +1,23 @@ +.g-counter { + font-weight: bold; + user-select: none; + opacity: 0.6; + transition: opacity linear 150ms; + z-index: 50; + position: absolute; + left: 50%; + transform: translateX(-50%) perspective(1px); + font-size: 12px; + padding: 4px 10px; + color: var(--g-font-color); + background-color: var(--g-overlay-color); + box-shadow: var(--g-box-shadow); + + top: var(--counter-top); + bottom: var(--counter-bottom); + border-radius: var(--counter-border-radius); + + &:hover { + opacity: 0.8; + } +} diff --git a/projects/ng-gallery/src/lib/components/gallery-item.component.ts b/projects/ng-gallery/src/lib/components/gallery-item.component.ts index 09f9e27f..e560dc7c 100644 --- a/projects/ng-gallery/src/lib/components/gallery-item.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-item.component.ts @@ -4,33 +4,33 @@ import { Input, Output, EventEmitter, - AfterViewChecked, ElementRef, - ChangeDetectorRef, + AfterViewInit, ChangeDetectionStrategy } from '@angular/core'; -import { Platform } from '@angular/cdk/platform'; import { CommonModule } from '@angular/common'; +import { BehaviorSubject } from 'rxjs'; import { GalleryItemContext } from '../directives/gallery-item-def.directive'; import { GalleryIframeComponent } from './templates/gallery-iframe.component'; import { GalleryVideoComponent } from './templates/gallery-video.component'; import { GalleryImageComponent } from './templates/gallery-image.component'; import { GalleryConfig } from '../models/config.model'; -import { LoadingStrategy, GalleryItemType, GalleryItemTypes, ThumbnailsPosition } from '../models/constants'; -import { GalleryItemData, ImageItemData, VideoItemData, YoutubeItemData } from './templates/items.model'; +import { GalleryItemType, GalleryItemTypes, LoadingStrategy } from '../models/constants'; +import { GalleryItemData, ImageItemData, ItemState, VideoItemData, YoutubeItemData } from './templates/items.model'; @Component({ selector: 'gallery-item', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-item.scss'], template: `
                                                                                                                                  @@ -69,12 +69,16 @@ import { GalleryItemData, ImageItemData, VideoItemData, YoutubeItemData } from ' standalone: true, imports: [CommonModule, GalleryImageComponent, GalleryVideoComponent, GalleryIframeComponent] }) -export class GalleryItemComponent implements AfterViewChecked { +export class GalleryItemComponent implements AfterViewInit { readonly Types = GalleryItemTypes; - /** A flag that ensure that the height was emitted after tbe image is loaded, used only for gallery image types */ - private imageLoadingState: 'IN_PROGRESS' | 'DONE' = 'IN_PROGRESS'; + /** A stream that indicates that the height was emitted after the image is loaded, used only for gallery image types */ + readonly state$: BehaviorSubject = new BehaviorSubject('loading'); + + /** A flag that indicates if the item is type of image, it can be a custom template by the user, + * The img recognizer directive will set it to true*/ + isItemContainImage: boolean; /** Gallery config */ @Input() config: GalleryConfig; @@ -95,7 +99,7 @@ export class GalleryItemComponent implements AfterViewChecked { @Input() data: GalleryItemData; /** Stream that emits when an error occurs */ - @Output() error = new EventEmitter(); + @Output() error: EventEmitter = new EventEmitter(); @HostBinding('class.g-active-item') get isActive(): boolean { return this.index === this.currIndex; @@ -105,8 +109,8 @@ export class GalleryItemComponent implements AfterViewChecked { return this.index; } - @HostBinding('attr.imageState') get imageState(): 'IN_PROGRESS' | 'DONE' { - return this.imageLoadingState; + @HostBinding('attr.itemState') get itemState(): ItemState { + return this.state$.value; } get imageContext(): GalleryItemContext { @@ -118,7 +122,7 @@ export class GalleryItemComponent implements AfterViewChecked { count: this.count, first: this.index === 0, last: this.index === this.count - 1 - } + }; } get itemContext(): GalleryItemContext { @@ -130,10 +134,10 @@ export class GalleryItemComponent implements AfterViewChecked { count: this.count, first: this.index === 0, last: this.index === this.count - 1 - } + }; } - get element(): HTMLElement { + get nativeElement(): HTMLElement { return this.el.nativeElement; } @@ -150,7 +154,7 @@ export class GalleryItemComponent implements AfterViewChecked { if (this.isActive && this.type === GalleryItemTypes.Youtube && (this.data as YoutubeItemData).autoplay) { autoplay = 1; } - const url = new URL(this.data.src as string); + const url: URL = new URL(this.data.src as string); url.search = new URLSearchParams({ wmode: 'transparent', ...(this.data as YoutubeItemData).params, @@ -178,61 +182,14 @@ export class GalleryItemComponent implements AfterViewChecked { return this.data; } - constructor(private el: ElementRef, private cd: ChangeDetectorRef, private _platform: Platform) { + constructor(private el: ElementRef) { } - ngAfterViewChecked(): void { - const height: number = this.getHeight(); - if (this._platform.isBrowser) { - this.element.style.setProperty('--g-item-width', `${ this.getWidth() }px`); - this.element.style.setProperty('--g-item-height', `${ height }px`); - } - if (this.currIndex === this.index) { - // Auto-height feature, only allowed when sliding direction is horizontal - const isThumbPositionHorizontal: boolean = - this.config.thumbPosition === ThumbnailsPosition.Top - || this.config.thumbPosition === ThumbnailsPosition.Bottom; - - if (this.config.autoHeight && height && isThumbPositionHorizontal) { - // Change slider height - this.element.parentElement.parentElement.style.height = `${ height }px`; - } - } - } - - onItemLoaded(): void { - if (this.imageLoadingState === 'IN_PROGRESS') { - this.imageLoadingState = 'DONE'; - // Detect changes to re-calculate item size - this.cd.detectChanges(); - } - } - - private getWidth(): number { - if (this.config.slidingDirection === 'horizontal') { - const firstElementChild: Element = this.element?.firstElementChild; - if (this.config.itemAutosize && this.imageLoadingState === 'DONE' && firstElementChild?.clientWidth) { - return firstElementChild.clientWidth; - } - } - return this.element.parentElement.parentElement.clientWidth; - } - - private getHeight(): number { - const firstElementChild: Element = this.element.firstElementChild; - if (firstElementChild) { - if (this.config.autoHeight) { - if (this.imageLoadingState === 'DONE' && firstElementChild.clientHeight) { - return firstElementChild.clientHeight; - } - } - if (this.config.slidingDirection === 'vertical') { - if (this.config.itemAutosize && this.imageLoadingState === 'DONE' && firstElementChild.clientHeight) { - return firstElementChild.clientHeight; - } - } + ngAfterViewInit(): void { + // If item does not contain an image, then set the state to DONE + if (!this.isItemContainImage) { + this.state$.next('success'); } - return this.element.parentElement.parentElement.clientHeight; } } diff --git a/projects/ng-gallery/src/lib/components/gallery-item.scss b/projects/ng-gallery/src/lib/components/gallery-item.scss new file mode 100644 index 00000000..7b3c7564 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-item.scss @@ -0,0 +1,55 @@ +:host { + cursor: var(--g-item-cursor); + height: var(--g-item-height); + width: var(--g-item-width); + max-height: var(--g-item-max-height); + max-width: var(--slider-width); + z-index: 10; + position: relative; + overflow: hidden; + display: flex; + flex-direction: column; + flex: 0 0 auto; + scroll-snap-align: center; + + // Disable highlighting the elements on mouse move or click + user-select: none; + -webkit-user-drag: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + + // In itemAutoSize is true, item size will be zero until it is loaded, fallback to the slider size + &[itemState='loading'] { + width: var(--slider-width); + height: var(--slider-height); + } + + > * { + height: 100%; + } + + ::ng-deep { + video, iframe { + width: 100%; + height: 100%; + } + } +} + +gallery-image { + width: var(--g-item-width); + height: var(--g-item-height); +} + +.g-template { + position: absolute; + z-index: 10; + left: 0; + top: 0; + right: 0; + bottom: 0; + color: white; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} diff --git a/projects/ng-gallery/src/lib/components/gallery-nav.component.ts b/projects/ng-gallery/src/lib/components/gallery-nav.component.ts index 2549e070..ebce4ae7 100644 --- a/projects/ng-gallery/src/lib/components/gallery-nav.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-nav.component.ts @@ -1,6 +1,7 @@ -import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core'; +import { Component, Input, OnInit, ChangeDetectionStrategy } from '@angular/core'; import { CommonModule } from '@angular/common'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; +import { Directionality } from '@angular/cdk/bidi'; import { Gallery } from '../services/gallery.service'; import { GalleryState } from '../models/gallery.model'; import { GalleryConfig } from '../models/config.model'; @@ -8,19 +9,20 @@ import { GalleryConfig } from '../models/config.model'; @Component({ selector: 'gallery-nav', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-nav.scss'], template: ` `, standalone: true, @@ -29,14 +31,22 @@ import { GalleryConfig } from '../models/config.model'; export class GalleryNavComponent implements OnInit { navIcon: SafeHtml; - @Input() galleryId: string; + @Input('galleryId') id: string; @Input() state: GalleryState; @Input() config: GalleryConfig; - constructor(public gallery: Gallery, private _sanitizer: DomSanitizer) { + constructor(public gallery: Gallery, private _sanitizer: DomSanitizer, public dir: Directionality) { } ngOnInit() { this.navIcon = this._sanitizer.bypassSecurityTrustHtml(this.config.navIcon); } + + rightButton() { + + } + + leftButton(): void { + + } } diff --git a/projects/ng-gallery/src/lib/components/gallery-nav.scss b/projects/ng-gallery/src/lib/components/gallery-nav.scss new file mode 100644 index 00000000..ff611ff4 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-nav.scss @@ -0,0 +1,46 @@ +.g-nav-next, +.g-nav-prev { + position: absolute; + top: 50%; + display: flex; + padding: 16px 8px; + cursor: pointer; + z-index: 999; + opacity: 0.6; + transition: opacity linear 150ms, right linear 150ms, left linear 150ms; + + &:hover { + opacity: 1; + } + + ::ng-deep { + svg { + filter: var(--g-nav-drop-shadow); + width: 28px; + height: 28px; + fill: #fff; + } + } +} + +.g-nav-next { + left: var(--nav-next-left); + right: var(--nav-next-right); + transform: var(--nav-next-transform); + + &:hover { + left: var(--nav-next-hover-left); + right: var(--nav-next-hover-right); + } +} + +.g-nav-prev { + left: var(--nav-prev-left); + right: var(--nav-prev-right); + transform: var(--nav-prev-transform); + + &:hover { + left: var(--nav-prev-hover-left); + right: var(--nav-prev-hover-right); + } +} diff --git a/projects/ng-gallery/src/lib/components/gallery-slider.component.ts b/projects/ng-gallery/src/lib/components/gallery-slider.component.ts index 6a2f4226..fcccb073 100644 --- a/projects/ng-gallery/src/lib/components/gallery-slider.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-slider.component.ts @@ -2,66 +2,55 @@ import { Component, Input, Output, + ViewChild, + ViewChildren, EventEmitter, AfterViewInit, - AfterViewChecked, - OnDestroy, - OnInit, OnChanges, - ViewChild, - ViewChildren, SimpleChanges, - NgZone, ElementRef, QueryList, - ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { Platform } from '@angular/cdk/platform'; -import { - from, - distinctUntilChanged, - fromEvent, - mergeMap, - startWith, - tap, - debounceTime, - filter, - takeUntil, - switchMap, - Observable, - Subject, - Subscriber, - EMPTY, - animationFrameScheduler -} from 'rxjs'; +import { Observable, Subject, map, startWith } from 'rxjs'; import { Gallery } from '../services/gallery.service'; import { GalleryState, GalleryError } from '../models/gallery.model'; import { GalleryConfig } from '../models/config.model'; -import { SlidingDirection } from '../models/constants'; +import { Orientation } from '../models/constants'; import { SliderAdapter, HorizontalAdapter, VerticalAdapter } from './adapters'; -import { SmoothScrollManager } from '../smooth-scroll'; -import { resizeObservable } from '../utils/resize-observer'; +import { SmoothScroll, SmoothScrollOptions } from '../smooth-scroll'; +import { HammerSliding } from '../gestures/hammer-sliding.directive'; +import { SliderIntersectionObserver } from '../observers/slider-intersection-observer.directive'; +import { ItemIntersectionObserver } from '../observers/item-intersection-observer.directive'; import { GalleryItemComponent } from './gallery-item.component'; - -interface ScrollObserver { - value: number; - behavior: ScrollBehavior; - onEnd: Function; -} - -declare const Hammer: any; +import { SliderResizeObserver } from '../observers/slider-resize-observer.directive'; @Component({ selector: 'gallery-slider', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-slider.scss'], template: `
                                                                                                                                  + [attr.centralised]="config.itemAutosize" + [smoothScroll]="position$ | async" + [smoothScrollInterruptOnMousemove]="!config.disableMouseScroll" + sliderIntersectionObserver + [sliderIntersectionObserverDisabled]="isScrolling || isSliding || isResizing" + [hammerSliding]="!config.disableMouseScroll" + [adapter]="adapter" + [items]="items$ | async" + [config]="config" + [state]="state" + [galleryId]="galleryId" + (isScrollingChange)="isScrolling = $event" + (isSlidingChange)="isSliding = $event" + (activeIndexChange)="onActiveIndexChange($event)" + (isResizingChange)="isResizing = $event" + sliderResizeObserver>
                                                                                                                                  - - + (error)="error.emit({ itemIndex: i, error: $event })"/> +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  RESIZING
                                                                                                                                  +
                                                                                                                                  SCROLLING
                                                                                                                                  +
                                                                                                                                  SLIDING
                                                                                                                                  `, standalone: true, - imports: [CommonModule, GalleryItemComponent] + imports: [CommonModule, GalleryItemComponent, SmoothScroll, HammerSliding, SliderIntersectionObserver, ItemIntersectionObserver, SliderResizeObserver] }) -export class GallerySliderComponent implements OnInit, OnChanges, AfterViewInit, AfterViewChecked, OnDestroy { - - readonly scrollHandler$: Subject = new Subject(); +export class GallerySliderComponent implements AfterViewInit, OnChanges { - /** HammerJS instance */ - private _hammer: any; + /** Stream that emits the slider position */ + readonly position$: Subject = new Subject(); - private intersectionObserver: IntersectionObserver; + /** Slider adapter */ + adapter: SliderAdapter; - private visibleElements: Map = new Map(); + /** Stream that emits the item components once they're initialized */ + items$: Observable; - private readonly _destroyed$ = new Subject(); + isScrolling: boolean; - private _isPanning: boolean; + isSliding: boolean; - /** Slider adapter */ - adapter: SliderAdapter; + isResizing: boolean; /** Gallery ID */ @Input() galleryId: string; @@ -107,332 +104,80 @@ export class GallerySliderComponent implements OnInit, OnChanges, AfterViewInit, @Input() config: GalleryConfig; /** Stream that emits when item is clicked */ - @Output() itemClick = new EventEmitter(); + @Output() itemClick: EventEmitter = new EventEmitter(); /** Stream that emits when an error occurs */ - @Output() error = new EventEmitter(); + @Output() error: EventEmitter = new EventEmitter(); + /** Slider ElementRef */ @ViewChild('slider', { static: true }) sliderEl: ElementRef; - @ViewChildren(GalleryItemComponent) items = new QueryList(); + @ViewChildren(GalleryItemComponent) items: QueryList = new QueryList(); get slider(): HTMLElement { return this.sliderEl.nativeElement; } - constructor(private _el: ElementRef, - private _cd: ChangeDetectorRef, - private _zone: NgZone, - private _platform: Platform, - private _smoothScroll: SmoothScrollManager, - private _gallery: Gallery) { - - this.scrollHandler$.pipe( - debounceTime(0, animationFrameScheduler), - switchMap(({ value, behavior }: ScrollObserver) => { - this._gallery.debugConsole('[Gallery scrollHandler$] ', this.slider.style.scrollSnapType); - this.slider.style.scrollSnapType = 'unset'; - const el: HTMLElement = this.items.get(value)?.element; - - this._gallery.debugConsole('🤯 [Gallery scrollHandler$] scrollSnapType = unset, scrollTo element', !!el); - if (el) { - this.slider.classList.add('g-scrolling'); - const pos = this.adapter.getScrollToValue(el, behavior || this.config.scrollBehavior); - const index: number = +this.items.get(value)?.element.getAttribute('galleryIndex'); - this._gallery.debugConsole(`🚀 [Gallery scrollHandler$] Scroll start ===> index: ${ index }, position:`, pos); - this._gallery.debugConsole(`🚀 [Gallery scrollHandler$] slider scrollable`, this.adapter.scrollValue); - - return from(this._smoothScroll.scrollTo(this.slider, pos)).pipe( - tap(() => { - // Reset viewport properties on scroll end - this._isPanning = false; - this.slider.classList.remove('g-scrolling'); - this.slider.style.scrollSnapType = this.adapter.scrollSnapType; - this._gallery.debugConsole('✅ [Gallery scrollHandler$] Scroll end'); - }) - ); - } - this._gallery.debugConsole('😡 [Gallery scrollHandler$] Scroll element was not found!'); - return EMPTY; - }), - takeUntil(this._destroyed$) - ).subscribe(); + constructor(private _gallery: Gallery) { } ngOnChanges(changes: SimpleChanges): void { if (changes.config) { - if (changes.config.currentValue?.slidingDirection !== changes.config.previousValue?.slidingDirection) { - switch (this.config.slidingDirection) { - case SlidingDirection.Horizontal: + if (changes.config.currentValue?.orientation !== changes.config.previousValue?.orientation) { + switch (this.config.orientation) { + case Orientation.Horizontal: this.adapter = new HorizontalAdapter(this.slider, this.config); break; - case SlidingDirection.Vertical: + case Orientation.Vertical: this.adapter = new VerticalAdapter(this.slider, this.config); break; } - if (this._platform.isBrowser) { - if (!changes.config.firstChange) { - requestAnimationFrame(() => { - // Keep the correct sliding position when direction changes - this.scrollToIndex(this.state.currIndex, 'auto'); - }); - } - // Reactivate gestures - this.enableDisableGestures(); - } } - - if (this._platform.isBrowser && !changes.config.firstChange) { - if (changes.config.currentValue?.mouseSlidingDisabled !== changes.config.previousValue?.mouseSlidingDisabled) { - this.enableDisableGestures(); - } + if (!changes.config.firstChange) { + // Keep the correct sliding position when direction changes + requestAnimationFrame(() => { + this.scrollToIndex(this.state.currIndex, 'auto'); + }); } } // Scroll to current index - if (this._platform.isBrowser && changes.state && changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) { - requestAnimationFrame(() => { - this.scrollToIndex(this.state.currIndex, changes.state.firstChange ? 'auto' : this.state.behavior); - }); - } - } - - ngOnInit(): void { - if (this._platform.isBrowser) { - this._zone.runOutsideAngular(() => { - // We need to set the visibleElements in the viewport using intersection observer - this.createIntersectionObserver(this.slider).pipe( - tap((entry: IntersectionObserverEntry) => { - entry.target.classList.toggle('g-item-visible', entry.isIntersecting); - if (entry.isIntersecting) { - this.visibleElements.set(entry.target, entry); - } else { - this.visibleElements.delete(entry.target); - } - }), - takeUntil(this._destroyed$) - ).subscribe(); - - // Subscribe to slider scroll event - fromEvent(this.slider, 'scroll', { passive: true }).pipe( - debounceTime(50), - filter(() => !this._isPanning), - tap(() => this.onViewportScroll()), - takeUntil(this._destroyed$) - ).subscribe(); - - // Detect if the size of the slider has changed detecting current index on scroll - resizeObservable(this._el.nativeElement).pipe( - debounceTime(this.config.resizeDebounceTime), - tap(([entry]: ResizeObserverEntry[]) => this.onHostResize(entry)), - takeUntil(this._destroyed$) - ).subscribe(); - }); + if (changes.state) { + if (changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) { + requestAnimationFrame(() => { + this.scrollToIndex(this.state.currIndex, changes.state.firstChange ? 'auto' : this.state.behavior); + }); + } } } ngAfterViewInit(): void { - if (this._platform.isBrowser) { - this.items.notifyOnChanges(); - this.items.changes.pipe( - startWith(null), - tap(() => { - // Disconnect all and reconnect later - this.visibleElements.forEach((item: IntersectionObserverEntry) => { - this.intersectionObserver.unobserve(item.target); - }); - - // Connect with the new items - this.items.toArray().map((item: GalleryItemComponent) => { - this.intersectionObserver.observe(item.element); - }); - }), - takeUntil(this._destroyed$) - ).subscribe(); - } - } - - ngAfterViewChecked(): void { - if (this.config.itemAutosize && this._platform.isBrowser) { - this.slider.style.setProperty('--slider-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px'); - this.slider.style.setProperty('--slider-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px'); - } - } - - ngOnDestroy(): void { - this._destroyed$.next(); - this._destroyed$.complete(); - this.deactivateGestures(); + this.items.notifyOnChanges(); + this.items$ = this.items.changes.pipe( + // In some cases, items is not notified at first, need to force start the stream + startWith(null), + map(() => this.items.toArray()) + ); } trackByFn(index: number, item: any) { return item.type; } - private onHostResize(entry: ResizeObserverEntry): void { - const width: number = Math.ceil(entry.contentRect.width); - const height: number = Math.ceil(entry.contentRect.height); - this.slider.style.width = `${ width }px`; - this.slider.style.height = `${ height }px`; - this.scrollToIndex(this.state.currIndex, 'auto'); - // Detect changes on gallery-item components to re-calculate item size - this._cd.detectChanges(); - this._gallery.debugConsole('🦐 [Gallery OnHostResize]: set viewport width to absolute number'); - } - - private onViewportScroll(): void { - // Check if scrolled item is great enough to navigate - const currElement: Element = this.items.get(this.state.currIndex)?.element; - const elementAtCenter: Element = this.getElementFromViewportCenter(); - - if (elementAtCenter) { - // Check if the gallery-item element is not the active element - if (elementAtCenter !== currElement) { - this.tryScrollToElement(elementAtCenter as HTMLElement); - } + onActiveIndexChange(index: number): void { + if (index === -1) { + // Reset active index position + this.scrollToIndex(this.state.currIndex, 'smooth'); } else { - this._gallery.debugConsole('⁉ [Gallery onViewportScroll]: No center element was found'); - this.visibleElements.forEach((entry: IntersectionObserverEntry) => { - this.tryScrollToElement(entry.target as HTMLElement); - }); + this._gallery.ref(this.galleryId).set(index, 'smooth'); } } - private tryScrollToElement(elementAtCenter: HTMLElement): void { - const allowedMargin: number = 10; - const offsetDiff: number = (this.adapter.clientSize - this.adapter.getClientSize(elementAtCenter)) / 2; - const rangeStart: number = this.adapter.scrollValue + offsetDiff; - const rangeEnd: number = this.adapter.scrollValue + this.adapter.clientSize - offsetDiff; - const elStart: number = this.adapter.getOffsetSize(elementAtCenter); - const elEnd: number = elStart + this.adapter.getClientSize(elementAtCenter); - - const isStart: boolean = rangeStart + allowedMargin >= elStart && rangeStart - allowedMargin <= elStart; - const isEnd: boolean = rangeEnd + allowedMargin >= elEnd && rangeEnd - allowedMargin <= elEnd; - - // Reset position - this.slider.style.scrollSnapType = this.adapter.scrollSnapType; - - // Check if element is within the detection range - if (isStart && isEnd) { - // If element is within the range set it as the active gallery item - this._gallery.debugConsole('🍄 [Gallery onViewportScroll]: Set active gallery item'); - - const index: number = +elementAtCenter.getAttribute('galleryIndex'); - this._zone.run(() => this._gallery.ref(this.galleryId).set(index, 'smooth')); - } - } - - private scrollToIndex(value: number, behavior: ScrollBehavior, onEnd?: () => void): void { - this.scrollHandler$.next({ value, behavior, onEnd }); - } - - private enableDisableGestures(): void { - // Enable/Disable mouse sliding on desktop browser only - if (!this._platform.IOS && !this._platform.ANDROID) { - if (!this.config.mouseSlidingDisabled) { - this.activateGestures(); - } else { - this.deactivateGestures(); - } - } - } - - private activateGestures(): void { - if (typeof Hammer !== 'undefined') { - // Destroy hammer if a previous instance was created - this.deactivateGestures(); - - const direction: number = this.adapter.panDirection; - - // Activate gestures - this._zone.runOutsideAngular(() => { - this._hammer = new Hammer(this._el.nativeElement, { inputClass: Hammer.MouseInput }); - this._hammer.get('pan').set({ direction }); - - let panOffset: number; - - // Set panOffset for sliding on pan start event - this._hammer.on('panstart', () => { - this._smoothScroll.dismissOngoingScroll(this.slider); - panOffset = this.adapter.scrollValue; - // Disable scroll-snap-type functionality - this.slider.style.scrollSnapType = 'unset'; - this.slider.classList.add('g-sliding'); - this._isPanning = true; - }); - - this._hammer.on('panmove', (e: any) => this.slider.scrollTo(this.adapter.getPanValue(panOffset, e, 'auto'))); - - this._hammer.on('panend', (e: any) => this.onPanEnd(e)); - }); + private scrollToIndex(index: number, behavior: ScrollBehavior): void { + const el: HTMLElement = this.items.get(index)?.nativeElement; + if (el) { + const pos: SmoothScrollOptions = this.adapter.getScrollToValue(el, behavior || this.config.scrollBehavior); + this.position$.next(pos); } } - - private deactivateGestures(): void { - this._hammer?.destroy(); - } - - protected onPanEnd(e): void { - - this._gallery.debugConsole('🖱️ [Gallery]: onPanEnd', e); - - this.slider.classList.remove('g-sliding'); - const delta: number = this.adapter.getPanDelta(e); - const velocity: number = this.adapter.getPanVelocity(e); - - const galleryRef = this._gallery.ref(this.galleryId); - - this._zone.run(() => { - // Check if scrolled item is great enough to navigate - const currElement: Element = this.items.get(this.state.currIndex)?.element; - - // Find the gallery item element in the center elements - const elementAtCenter: Element = this.getElementFromViewportCenter(); - - // Check if center item can be taken from element using - if (elementAtCenter && elementAtCenter !== currElement) { - const index: number = +elementAtCenter.getAttribute('galleryIndex'); - this.scrollToIndex(index, 'smooth'); - return; - } - - // Check if delta is great enough to navigate - if (Math.abs(delta) > (currElement.clientWidth || this.adapter.clientSize) / 2) { - return delta > 0 ? galleryRef.prev('smooth', false) : galleryRef.next('smooth', false); - } - - // Check if velocity is great enough to navigate - if (Math.abs(velocity) > 0.3) { - return velocity > 0 ? galleryRef.prev('smooth', false) : galleryRef.next('smooth', false); - } - - // Reset position to the current index - this.scrollToIndex(this.state.currIndex, 'smooth'); - }); - } - - private getElementFromViewportCenter(): Element { - // Get slider position relative to the document - const sliderRect = this.slider.getBoundingClientRect(); - // Try look for the center item using `elementsFromPoint` function - const centerElements = document.elementsFromPoint(sliderRect.x + (sliderRect.width / 2), sliderRect.y + (sliderRect.height / 2)); - // Find the gallery item element in the center elements - const element = centerElements.find((element: Element) => element.localName === 'gallery-item' && element.getAttribute('galleryId') === this.galleryId); - - this._gallery.debugConsole('🪟 [Gallery]: getElementFromViewportCenter', element); - return element; - } - - private createIntersectionObserver(slider: HTMLElement): Observable { - return new Observable((observer: Subscriber) => { - this.intersectionObserver = new IntersectionObserver( - (entries: IntersectionObserverEntry[]) => observer.next(entries), - { root: slider } - ); - return () => this.intersectionObserver.disconnect(); - }).pipe( - mergeMap((entries: IntersectionObserverEntry[]) => entries), - distinctUntilChanged(), - ); - } } diff --git a/projects/ng-gallery/src/lib/components/gallery-slider.scss b/projects/ng-gallery/src/lib/components/gallery-slider.scss new file mode 100644 index 00000000..02adaddb --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-slider.scss @@ -0,0 +1,62 @@ +:host { + position: relative; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + order: 1; + flex: 1; +} + +.g-slider { + display: flex; + align-items: center; + transition: var(--g-height-transition); + min-height: 100%; + min-width: 100%; + max-height: 100%; + max-width: 100%; + height: var(--slider-height, 100%); + width: var(--slider-width, 100%); + + overflow: var(--slider-overflow); + scroll-snap-type: var(--slider-scroll-snap-type); + flex-direction: var(--slider-flex-direction); + + scrollbar-width: none; + + &::-webkit-scrollbar { + display: none; + } + + &.g-sliding, &.g-scrolling { + // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse + .g-slider-content { + pointer-events: none; + } + } + + &[centralised="true"] { + &:before, &:after { + content: ''; + } + + &:before { + flex: 0 0 var(--slider-centralize-start-size); + } + + &:after { + flex: 0 0 var(--slider-centralize-end-size); + } + } +} + +.g-slider-content { + flex: 0 0 auto; + display: flex; + align-items: center; + gap: 1px; + width: var(--slider-content-width, unset); + height: var(--slider-content-height, unset); + flex-direction: var(--slider-flex-direction); +} diff --git a/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts b/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts index 73ba2706..cae58bff 100644 --- a/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-thumb.component.ts @@ -1,4 +1,12 @@ -import { Component, Input, HostBinding, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; +import { + Component, + Input, + Output, + HostBinding, + EventEmitter, + ElementRef, + ChangeDetectionStrategy +} from '@angular/core'; import { CommonModule } from '@angular/common'; import { GalleryItemContext } from '../directives/gallery-item-def.directive'; import { GalleryImageComponent } from './templates/gallery-image.component'; @@ -9,6 +17,7 @@ import { GalleryItemType } from '../models/constants'; @Component({ selector: 'gallery-thumb', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-thumb.scss'], template: ` ) { + } } diff --git a/projects/ng-gallery/src/lib/components/gallery-thumb.scss b/projects/ng-gallery/src/lib/components/gallery-thumb.scss new file mode 100644 index 00000000..2fb702bf --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-thumb.scss @@ -0,0 +1,39 @@ +:host { + cursor: var(--g-thumb-cursor); + height: var(--g-thumb-height); + width: var(--g-thumb-width); + max-height: var(--g-thumb-height); + max-width: var(--g-thumb-width); + align-self: center; + background: black; + position: relative; + display: flex; + overflow: hidden; + flex-direction: column; + flex: 0 0 auto; + scroll-snap-align: center; + // Disable highlighting the elements on mouse move or click + user-select: none; + -webkit-user-drag: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + + --g-thumb-opacity: 0.5; + + &.g-active-thumb { + --g-thumb-opacity: 1; + } +} + +.g-template { + position: absolute; + z-index: 10; + left: 0; + top: 0; + right: 0; + bottom: 0; + color: white; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} diff --git a/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts b/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts index 22b2cf7b..4a8cdb0c 100644 --- a/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery-thumbs.component.ts @@ -2,69 +2,75 @@ import { Component, Input, Output, - AfterViewInit, - AfterViewChecked, - OnDestroy, - OnChanges, ViewChild, ViewChildren, + EventEmitter, + AfterViewInit, + OnChanges, QueryList, SimpleChanges, - NgZone, ElementRef, - EventEmitter, - ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { Platform } from '@angular/cdk/platform'; -import { Subject, debounceTime, takeUntil, tap } from 'rxjs'; +import { Observable, Subject, map, startWith } from 'rxjs'; import { GalleryConfig } from '../models/config.model'; import { GalleryState, GalleryError } from '../models/gallery.model'; -import { ThumbnailsPosition, ThumbnailsView } from '../models/constants'; -import { ThumbSliderAdapter, HorizontalThumbAdapter, VerticalThumbAdapter } from './adapters'; -import { SmoothScrollManager } from '../smooth-scroll'; -import { resizeObservable } from '../utils/resize-observer'; +import { ThumbnailsPosition } from '../models/constants'; +import { VerticalAdapter, HorizontalAdapter, SliderAdapter } from './adapters'; +import { SmoothScroll, SmoothScrollOptions } from '../smooth-scroll'; import { GalleryThumbComponent } from './gallery-thumb.component'; - -declare const Hammer: any; +import { HammerSliding } from '../gestures/hammer-sliding.directive'; +import { ThumbResizeObserver } from '../observers/thumb-resize-observer.directive'; @Component({ selector: 'gallery-thumbs', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-thumbs.scss'], template: `
                                                                                                                                  + [smoothScroll]="position$ | async" + [smoothScrollInterruptOnMousemove]="!config.disableThumbMouseScroll" + [attr.centralised]="config.thumbCentralized || adapter.isContentLessThanContainer" + [hammerSliding]="!config.disableThumbMouseScroll" + [galleryId]="galleryId" + [items]="items$ | async" + [state]="state" + [config]="config" + [adapter]="adapter" + (thumbResizeObserver)="scrollToIndex(state.currIndex, 'auto')" + (activeIndexChange)="onActiveIndexChange($event)">
                                                                                                                                  - + (click)="config.disableThumbs ? null : thumbClick.emit(i)" + (error)="error.emit({ itemIndex: i, error: $event })"/>
                                                                                                                                  `, standalone: true, - imports: [CommonModule, GalleryThumbComponent] + imports: [CommonModule, GalleryThumbComponent, SmoothScroll, HammerSliding, ThumbResizeObserver] }) -export class GalleryThumbsComponent implements AfterViewInit, AfterViewChecked, OnChanges, OnDestroy { +export class GalleryThumbsComponent implements AfterViewInit, OnChanges { - /** HammerJS instance */ - private _hammer: any; + /** Stream that emits the slider position */ + readonly position$: Subject = new Subject(); - /** Thumbnails view enum */ - readonly thumbnailsView = ThumbnailsView; + /** Slider adapter */ + adapter: SliderAdapter; - private readonly _destroyed$ = new Subject(); + /** Stream that emits the thumb components once they're initialized */ + items$: Observable; - /** Slider adapter */ - adapter: ThumbSliderAdapter; + /** Gallery ID */ + @Input() galleryId: string; /** Gallery state */ @Input() state: GalleryState; @@ -73,27 +79,20 @@ export class GalleryThumbsComponent implements AfterViewInit, AfterViewChecked, @Input() config: GalleryConfig; /** Stream that emits when thumb is clicked */ - @Output() thumbClick = new EventEmitter(); + @Output() thumbClick: EventEmitter = new EventEmitter(); /** Stream that emits when an error occurs */ - @Output() error = new EventEmitter(); + @Output() error: EventEmitter = new EventEmitter(); /** Slider ElementRef */ @ViewChild('slider', { static: true }) sliderEl: ElementRef; - @ViewChildren(GalleryThumbComponent, { read: ElementRef }) items = new QueryList>(); + @ViewChildren(GalleryThumbComponent) items: QueryList = new QueryList(); get slider(): HTMLElement { return this.sliderEl.nativeElement; } - constructor(private _el: ElementRef, - private _zone: NgZone, - private _smoothScroll: SmoothScrollManager, - private _cd: ChangeDetectorRef, - private _platform: Platform) { - } - ngOnChanges(changes: SimpleChanges): void { if (changes.config) { // Sets sliding direction @@ -101,37 +100,24 @@ export class GalleryThumbsComponent implements AfterViewInit, AfterViewChecked, switch (this.config.thumbPosition) { case ThumbnailsPosition.Right: case ThumbnailsPosition.Left: - this.adapter = new VerticalThumbAdapter(this.slider, this.config); + this.adapter = new VerticalAdapter(this.slider, this.config); break; case ThumbnailsPosition.Top: case ThumbnailsPosition.Bottom: - this.adapter = new HorizontalThumbAdapter(this.slider, this.config); + this.adapter = new HorizontalAdapter(this.slider, this.config); break; } - if (this._platform.isBrowser) { - if (!changes.config.firstChange) { - // Keep the correct sliding position when direction changes - requestAnimationFrame(() => { - this.scrollToIndex(this.state.currIndex, 'auto'); - }); - } - - // Reactivate gestures - this.enableDisableGestures(); + if (!changes.config.firstChange) { + // Keep the correct sliding position when direction changes + requestAnimationFrame(() => { + this.scrollToIndex(this.state.currIndex, 'auto'); + }); } } - if (this._platform.isBrowser) { - if (!changes.config.firstChange && changes.config.currentValue?.thumbMouseSlidingDisabled !== changes.config.previousValue?.thumbMouseSlidingDisabled) { - this.enableDisableGestures(); - } - - this.slider.style.setProperty('--thumb-height', `${ this.config.thumbHeight }px`); - this.slider.style.setProperty('--thumb-width', `${ this.config.thumbWidth }px`); - } } - if (this._platform.isBrowser && changes.state && (changes.state.firstChange || !this.config.thumbDetached)) { + if (changes.state && (changes.state.firstChange || !this.config.detachThumbs)) { if (changes.state.currentValue?.currIndex !== changes.state.previousValue?.currIndex) { // Scroll slide to item when current index changes. requestAnimationFrame(() => { @@ -142,101 +128,32 @@ export class GalleryThumbsComponent implements AfterViewInit, AfterViewChecked, } ngAfterViewInit(): void { - if (this._platform.isBrowser) { - // Workaround: opening a lightbox (centralised) with last index active, show in wrong position - setTimeout(() => this.scrollToIndex(this.state.currIndex, 'auto'), 200); - - this._zone.runOutsideAngular(() => { - // Update necessary calculation on host resize - resizeObservable(this._el.nativeElement).pipe( - debounceTime(this.config.resizeDebounceTime), - tap(() => { - // Update thumb centralize size - const el: HTMLElement = this.items.get(this.state.currIndex)?.nativeElement; - if (el) { - this.slider.style.setProperty('--thumb-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px'); - this.slider.style.setProperty('--thumb-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px'); - } - this._cd.detectChanges(); - this.scrollToIndex(this.state.currIndex, 'auto'); - }), - takeUntil(this._destroyed$) - ).subscribe(); - }); - } - } - - ngAfterViewChecked(): void { - const el: HTMLElement = this.items.get(this.state.currIndex)?.nativeElement; - if (el && this._platform.isBrowser) { - this.slider.style.setProperty('--thumb-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px'); - this.slider.style.setProperty('--thumb-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px'); - } - } - - ngOnDestroy(): void { - this.deactivateGestures(); - this._destroyed$.next(); - this._destroyed$.complete(); + this.items.notifyOnChanges(); + this.items$ = this.items.changes.pipe( + // In some cases, items is not notified at first, need to force start the stream + startWith(null), + map(() => this.items.toArray()) + ); } trackByFn(index: number, item: any) { return item.type; } - private scrollToIndex(value: number, behavior: ScrollBehavior): void { - this._zone.runOutsideAngular(() => { - this.slider.style.scrollSnapType = 'unset'; - - const el: HTMLElement = this.items.get(value)?.nativeElement; - if (el) { - this._smoothScroll.scrollTo(this.slider, this.adapter.getScrollToValue(el, behavior)).then(() => { - this.slider.style.scrollSnapType = this.adapter.scrollSnapType; - }); - } - }); - } - - private enableDisableGestures(): void { - if (!this._platform.IOS && !this._platform.ANDROID) { - // Enable/Disable mouse sliding on desktop browser only - if (!this.config.thumbMouseSlidingDisabled) { - this.activateGestures(); - } else { - this.deactivateGestures(); - } + onActiveIndexChange(index: number): void { + if (index === -1) { + // Reset active index position + this.scrollToIndex(this.state.currIndex, 'smooth'); + } else { + this.scrollToIndex(index, 'smooth'); } } - private activateGestures(): void { - if (typeof Hammer !== 'undefined' && !this.config.disableThumb) { - - const direction: number = this.adapter.panDirection; - - // Activate gestures - this._zone.runOutsideAngular(() => { - this._hammer = new Hammer(this._el.nativeElement, { inputClass: Hammer.MouseInput }); - this._hammer.get('pan').set({ direction }); - - let panOffset: number = 0; - - this._hammer.on('panstart', () => { - panOffset = this.adapter.scrollValue; - // Disable scroll-snap-type functionality - this.slider.style.scrollSnapType = 'unset'; - this.slider.classList.add('g-sliding'); - }); - this._hammer.on('panmove', (e) => this.slider.scrollTo(this.adapter.getPanValue(panOffset, e, 'auto'))); - this._hammer.on('panend', () => { - // Enable scroll-snap-type functionality - this.slider.style.scrollSnapType = this.adapter.scrollSnapType; - this.slider.classList.remove('g-sliding'); - }); - }); + scrollToIndex(value: number, behavior: ScrollBehavior): void { + const el: HTMLElement = this.items.get(value)?.nativeElement; + if (el) { + const pos: SmoothScrollOptions = this.adapter.getScrollToValue(el, behavior); + this.position$.next(pos); } } - - private deactivateGestures(): void { - this._hammer?.destroy(); - } } diff --git a/projects/ng-gallery/src/lib/components/gallery-thumbs.scss b/projects/ng-gallery/src/lib/components/gallery-thumbs.scss new file mode 100644 index 00000000..d9d5e290 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery-thumbs.scss @@ -0,0 +1,58 @@ +:host { + max-height: 100%; + max-width: 100%; + display: block; + z-index: 100; +} + +.g-slider { + display: flex; + align-items: center; + transition: var(--g-height-transition); + max-height: 100%; + min-width: 100%; + height: var(--thumb-slider-height); + width: var(--thumb-slider-width); + + top: var(--thumb-slider-top); + left: var(--thumb-slider-left); + overflow: var(--thumb-slider-overflow); + scroll-snap-type: var(--slider-scroll-snap-type); + flex-direction: var(--thumb-slider-flex-direction); + + scrollbar-width: none; + + &::-webkit-scrollbar { + display: none; + } + + // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse + &.g-sliding { + // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse + .g-slider-content { + pointer-events: none; + } + } + + &[centralised="true"] { + &:before, &:after { + content: ''; + } + + &:before { + flex: 0 0 var(--thumb-centralize-start-size); + } + + &:after { + flex: 0 0 var(--thumb-centralize-end-size); + } + } +} + +.g-slider-content { + flex: 0 0 auto; + display: flex; + flex-direction: var(--thumb-slider-flex-direction); + align-items: center; + gap: 1px; +} diff --git a/projects/ng-gallery/src/lib/components/gallery.component.ts b/projects/ng-gallery/src/lib/components/gallery.component.ts index 0ceb6827..d263bd76 100644 --- a/projects/ng-gallery/src/lib/components/gallery.component.ts +++ b/projects/ng-gallery/src/lib/components/gallery.component.ts @@ -3,16 +3,18 @@ import { Input, Output, ContentChild, + booleanAttribute, + numberAttribute, + EventEmitter, OnInit, AfterContentInit, OnChanges, OnDestroy, SimpleChanges, - EventEmitter, ChangeDetectionStrategy } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { Subscription, SubscriptionLike } from 'rxjs'; +import { Subscription } from 'rxjs'; import { GalleryCoreComponent } from './gallery-core.component'; import { Gallery } from '../services/gallery.service'; import { GalleryRef } from '../services/gallery-ref'; @@ -24,13 +26,19 @@ import { GalleryImageDef } from '../directives/gallery-image-def.directive'; import { GalleryThumbDef } from '../directives/gallery-thumb-def.directive'; import { GalleryItemDef } from '../directives/gallery-item-def.directive'; import { GalleryBoxDef } from '../directives/gallery-box-def.directive'; +import { ImgManager } from '../utils/img-manager'; +import { AutoplayDirective } from '../autoplay/autoplay.directive'; +/** + * Gallery component + */ @Component({ selector: 'gallery', changeDetection: ChangeDetectionStrategy.OnPush, - styleUrls: ['../styles/gallery.scss'], + styleUrls: ['./gallery.scss'], template: ` - `, standalone: true, - imports: [CommonModule, GalleryCoreComponent] + imports: [CommonModule, GalleryCoreComponent, AutoplayDirective], + providers: [ImgManager] }) export class GalleryComponent implements OnInit, AfterContentInit, OnChanges, OnDestroy { + /** + * The gallery reference instance + */ galleryRef: GalleryRef; - @Input() id: string; + + /** + * The gallery instance unique id, required if more multiple gallery instances + */ + @Input() id: string = 'root'; + + /** + * Loads the items array into the gallery + */ @Input() items: GalleryItem []; - @Input() nav: boolean = this._gallery.config.nav; - @Input() dots: boolean = this._gallery.config.dots; - @Input() loop: boolean = this._gallery.config.loop; - @Input() debug: boolean = this._gallery.config.debug; - @Input() thumb: boolean = this._gallery.config.thumb; - @Input() counter: boolean = this._gallery.config.counter; - @Input() dotsSize: number = this._gallery.config.dotsSize; - @Input() autoPlay: boolean = this._gallery.config.autoPlay; - @Input() thumbWidth: number = this._gallery.config.thumbWidth; - @Input() thumbHeight: number = this._gallery.config.thumbHeight; - @Input() disableThumb: boolean = this._gallery.config.disableThumb; + + /** + * Displays the navigation buttons + */ + @Input({ transform: booleanAttribute }) nav: boolean = this._gallery.config.nav; + + /** + * Displays the navigation bullets + */ + @Input({ transform: booleanAttribute }) bullets: boolean = this._gallery.config.bullets; + + /** + * Enables loop cycling + */ + @Input({ transform: booleanAttribute }) loop: boolean = this._gallery.config.loop; + + /** + * Show visuals that helps debugging the component + */ + @Input({ transform: booleanAttribute }) debug: boolean = this._gallery.config.debug; + + /** + * Displays the thumbnails + */ + @Input({ transform: booleanAttribute }) thumbs: boolean = this._gallery.config.thumbs; + + /** + * Displays the counter or pagination + */ + @Input({ transform: booleanAttribute }) counter: boolean = this._gallery.config.counter; + + /** + * De-attaching the thumbnails from the main slider + * If enabled - thumbnails won't automatically scroll to the active thumbnails + */ + @Input({ transform: booleanAttribute }) detachThumbs: boolean = this._gallery.config.detachThumbs; + + /** + * Fits each thumbnail size to its content + */ + @Input({ transform: booleanAttribute }) thumbAutosize: boolean = this._gallery.config.thumbAutosize; + + /** + * Fits each item size to its content, This option should be used with: + * - Does not work if `autoHeight` is turned on + * - Does not work properly unless `loadingAttr="eager"` + * - Does not work properly unless `loadingStrategy="preload"` + */ + @Input({ transform: booleanAttribute }) itemAutosize: boolean = this._gallery.config.itemAutosize; + + /** + * Automatically adjusts the gallery's height to fit the content + */ + @Input({ transform: booleanAttribute }) autoHeight: boolean = this._gallery.config.autoHeight; + + /** + * Automatically cycle through items at time interval + */ + @Input({ transform: booleanAttribute }) autoplay: boolean = this._gallery.config.autoplay; + + /** + * Disables thumbnails' clicks + */ + @Input({ transform: booleanAttribute }) disableThumbs: boolean = this._gallery.config.disableThumbs; + + /** + * Disables bullets' clicks + */ + @Input({ transform: booleanAttribute }) disableBullets: boolean = this._gallery.config.disableBullets; + + /** + * Disables sliding using mousewheel, touchpad, scroll and gestures on touch devices + */ + @Input({ transform: booleanAttribute }) disableScroll: boolean = this._gallery.config.disableScroll; + + /** + * Disables sliding of thumbnails using touchpad, scroll and gestures on touch devices + */ + @Input({ transform: booleanAttribute }) disableThumbScroll: boolean = this._gallery.config.disableThumbScroll; + + /** + * Force centralizing the active thumbnail + */ + @Input({ transform: booleanAttribute }) thumbCentralized: boolean = this._gallery.config.thumbCentralized; + + /** + * Disables sliding using the mouse + */ + @Input({ transform: booleanAttribute }) disableMouseScroll: boolean = this._gallery.config.disableMouseScroll; + + /** + * Disables sliding of thumbnails using the mouse + */ + @Input({ transform: booleanAttribute }) disableThumbMouseScroll: boolean = this._gallery.config.disableThumbMouseScroll; + + /** + * Sets the size of the bullets navigation + */ + @Input({ transform: numberAttribute }) bulletSize: number = this._gallery.config.bulletSize; + + /** + * Sets the thumbnail's width + */ + @Input({ transform: numberAttribute }) thumbWidth: number = this._gallery.config.thumbWidth; + + /** + * Sets the thumbnail's height + */ + @Input({ transform: numberAttribute }) thumbHeight: number = this._gallery.config.thumbHeight; + + /** + * Sets the interval used for the autoplay feature + */ + @Input({ transform: numberAttribute }) autoplayInterval: number = this._gallery.config.autoplayInterval; + + /** + * Sets the duration used for smooth navigation between the items + */ + @Input({ transform: numberAttribute }) scrollDuration: number = this._gallery.config.scrollDuration; + + /** + * Sets the debounce time used to throttle the gallery update after it is resized + */ + @Input({ transform: numberAttribute }) resizeDebounceTime: number = this._gallery.config.resizeDebounceTime; + + /** + * Sets the scroll behavior when the active item is changed + */ @Input() scrollBehavior: ScrollBehavior = this._gallery.config.scrollBehavior; - @Input() navScrollBehavior: ScrollBehavior = this._gallery.config.navScrollBehavior; - @Input() slidingDisabled: boolean = this._gallery.config.slidingDisabled; - @Input() thumbSlidingDisabled: boolean = this._gallery.config.thumbSlidingDisabled; - @Input() mouseSlidingDisabled: boolean = this._gallery.config.mouseSlidingDisabled; - @Input() thumbMouseSlidingDisabled: boolean = this._gallery.config.thumbMouseSlidingDisabled; - @Input() playerInterval: number = this._gallery.config.playerInterval; - @Input() slidingDuration: number = this._gallery.config.slidingDuration; - @Input() slidingEase: BezierEasingOptions = this._gallery.config.slidingEase; - @Input() resizeDebounceTime: number = this._gallery.config.resizeDebounceTime; + + /** + * Sets the ease function used for smooth navigation between the items + */ + @Input() scrollEase: BezierEasingOptions = this._gallery.config.scrollEase; + + /** + * Sets the object-fit style applied on items' images + */ @Input() imageSize: 'cover' | 'contain' = this._gallery.config.imageSize; + + /** + * Sets the object-fit style applied on thumbnails' images + */ @Input() thumbImageSize: 'cover' | 'contain' = this._gallery.config.thumbImageSize; - @Input() dotsPosition: 'top' | 'bottom' = this._gallery.config.dotsPosition; + + /** + * Sets the bullets navigation position + */ + @Input() bulletPosition: 'top' | 'bottom' = this._gallery.config.bulletPosition; + + /** + * Sets the counter navigation position + */ @Input() counterPosition: 'top' | 'bottom' = this._gallery.config.counterPosition; - @Input() slidingDirection: 'horizontal' | 'vertical' = this._gallery.config.slidingDirection; + + /** + * Sets the sliding direction + */ + @Input() orientation: 'horizontal' | 'vertical' = this._gallery.config.orientation; + + /** + * Sets the loading attribute applied on the items' images + */ @Input() loadingAttr: 'eager' | 'lazy' = this._gallery.config.loadingAttr; + + /** + * Sets the loading strategy used for displaying the items + * - `lazy` renders only the active item + * - `default` renders only the active item, the previous item and the next item + * - `preload` renders all the items, this option is required for `thumbAutoSize` is enabled + */ @Input() loadingStrategy: 'preload' | 'lazy' | 'default' = this._gallery.config.loadingStrategy; + + /** + * Sets the thumbnails position, it also sets the sliding direction of the thumbnails accordingly + */ @Input() thumbPosition: 'top' | 'left' | 'right' | 'bottom' = this._gallery.config.thumbPosition; - @Input() thumbView: 'default' | 'contain' = this._gallery.config.thumbView; - @Input() thumbDetached: boolean = this._gallery.config.thumbDetached; - @Input() thumbAutosize: boolean = this._gallery.config.thumbAutosize; - @Input() itemAutosize: boolean = this._gallery.config.itemAutosize; - @Input() autoHeight: boolean = this._gallery.config.autoHeight; - - // Inputs used by the lightbox - - /** Destroy gallery ref on component destroy event */ - @Input() destroyRef = true; - - /** Skip initializing the config with components inputs (Lightbox mode) */ - @Input() skipInitConfig = false; - - @Output() itemClick = new EventEmitter(); - @Output() thumbClick = new EventEmitter(); - @Output() playingChange = new EventEmitter(); - @Output() indexChange = new EventEmitter(); - @Output() itemsChange = new EventEmitter(); - @Output() error = new EventEmitter(); - - @ContentChild(GalleryItemDef) galleryItemDef: GalleryItemDef; - @ContentChild(GalleryImageDef) galleryImageDef: GalleryImageDef; - @ContentChild(GalleryThumbDef) galleryThumbDef: GalleryThumbDef; - @ContentChild(GalleryBoxDef) galleryBoxDef: GalleryBoxDef; - - private _itemClick$: SubscriptionLike = Subscription.EMPTY; - private _thumbClick$: SubscriptionLike = Subscription.EMPTY; - private _itemChange$: SubscriptionLike = Subscription.EMPTY; - private _indexChange$: SubscriptionLike = Subscription.EMPTY; - private _playingChange$: SubscriptionLike = Subscription.EMPTY; - private _playerListener$: SubscriptionLike = Subscription.EMPTY; + + /** + * Destroy gallery ref on component destroy event + * This intended to be used and disabled from the lightbox component + * @ignore + * */ + @Input() destroyRef: boolean = true; + + /** + * Skip initializing the config with components inputs (Lightbox mode) + * This intended to be used and enabled from the lightbox component + * @ignore + */ + @Input() skipInitConfig: boolean = false; + + /** + * Stream that emits when an item is clicked + */ + @Output() itemClick: EventEmitter = new EventEmitter(); + + /** + * Stream that emits when a thumbnail is clicked + */ + @Output() thumbClick: EventEmitter = new EventEmitter(); + + /** + * Stream that emits when player state is changed + */ + @Output() playingChange: EventEmitter = new EventEmitter(); + + /** + * Stream that emits when index is changed + */ + @Output() indexChange: EventEmitter = new EventEmitter(); + + /** + * Stream that emits when items array is changed + */ + @Output() itemsChange: EventEmitter = new EventEmitter(); + + /** + * Stream that emits when an error occurs, this would emit for loading errors of image and video items only + */ + @Output() error: EventEmitter = new EventEmitter(); + + /** @ignore */ + @ContentChild(GalleryItemDef) private _galleryItemDef: GalleryItemDef; + /** @ignore */ + @ContentChild(GalleryImageDef) private _galleryImageDef: GalleryImageDef; + /** @ignore */ + @ContentChild(GalleryThumbDef) private _galleryThumbDef: GalleryThumbDef; + /** @ignore */ + @ContentChild(GalleryBoxDef) private _galleryBoxDef: GalleryBoxDef; + + /** @ignore */ + private _itemClick$: Subscription; + /** @ignore */ + private _thumbClick$: Subscription; + /** @ignore */ + private _itemChange$: Subscription; + /** @ignore */ + private _indexChange$: Subscription; + /** @ignore */ + private _playingChange$: Subscription; constructor(private _gallery: Gallery) { } + /** @ignore */ private getConfig(): GalleryConfig { return { nav: this.nav, - dots: this.dots, + bullets: this.bullets, loop: this.loop, debug: this.debug, - thumb: this.thumb, + thumbs: this.thumbs, counter: this.counter, - autoPlay: this.autoPlay, - dotsSize: this.dotsSize, + autoplay: this.autoplay, + bulletSize: this.bulletSize, imageSize: this.imageSize, thumbImageSize: this.thumbImageSize, scrollBehavior: this.scrollBehavior, - navScrollBehavior: this.navScrollBehavior, - thumbView: this.thumbView, + thumbCentralized: this.thumbCentralized, thumbWidth: this.thumbWidth, thumbHeight: this.thumbHeight, - slidingEase: this.slidingEase, - disableThumb: this.disableThumb, - dotsPosition: this.dotsPosition, + scrollEase: this.scrollEase, + bulletPosition: this.bulletPosition, loadingAttr: this.loadingAttr, - thumbDetached: this.thumbDetached, + detachThumbs: this.detachThumbs, thumbPosition: this.thumbPosition, - playerInterval: this.playerInterval, + autoplayInterval: this.autoplayInterval, counterPosition: this.counterPosition, loadingStrategy: this.loadingStrategy, - slidingDuration: this.slidingDuration, - slidingDirection: this.slidingDirection, + scrollDuration: this.scrollDuration, + orientation: this.orientation, resizeDebounceTime: this.resizeDebounceTime, - slidingDisabled: this.slidingDisabled, - thumbSlidingDisabled: this.thumbSlidingDisabled, - mouseSlidingDisabled: this.mouseSlidingDisabled, - thumbMouseSlidingDisabled: this.thumbMouseSlidingDisabled, + disableBullets: this.disableBullets, + disableThumbs: this.disableThumbs, + disableScroll: this.disableScroll, + disableThumbScroll: this.disableThumbScroll, + disableMouseScroll: this.disableMouseScroll, + disableThumbMouseScroll: this.disableThumbMouseScroll, thumbAutosize: this.thumbAutosize, itemAutosize: this.itemAutosize, - autoHeight: this.autoHeight, + autoHeight: this.autoHeight }; } + + /** @ignore */ ngOnChanges(changes: SimpleChanges): void { if (this.galleryRef) { this.galleryRef.setConfig(this.getConfig()); @@ -159,6 +362,8 @@ export class GalleryComponent implements OnInit, AfterContentInit, OnChanges, On } } + + /** @ignore */ ngOnInit(): void { // Get gallery instance by id if (this.skipInitConfig) { @@ -170,9 +375,6 @@ export class GalleryComponent implements OnInit, AfterContentInit, OnChanges, On // Load gallery items this.load(this.items); - // Activate player listener - this._playerListener$ = this.galleryRef.activatePlayer().subscribe(); - // Subscribes to events on demand if (this.indexChange.observed) { this._indexChange$ = this.galleryRef.indexChanged.subscribe((state: GalleryState) => this.indexChange.emit(state)); @@ -183,108 +385,146 @@ export class GalleryComponent implements OnInit, AfterContentInit, OnChanges, On if (this.playingChange.observed) { this._playingChange$ = this.galleryRef.playingChanged.subscribe((state: GalleryState) => this.playingChange.emit(state)); } - - // Start playing if autoplay is set to true - if (this.autoPlay) { - this.play(); - } } + /** @ignore */ ngAfterContentInit(): void { const templateConfig: GalleryConfig = {}; - if (this.galleryItemDef) { - templateConfig.itemTemplate = this.galleryItemDef.templateRef; + if (this._galleryItemDef) { + templateConfig.itemTemplate = this._galleryItemDef.templateRef; } - if (this.galleryImageDef) { - templateConfig.imageTemplate = this.galleryImageDef.templateRef; + if (this._galleryImageDef) { + templateConfig.imageTemplate = this._galleryImageDef.templateRef; } - if (this.galleryThumbDef) { - templateConfig.thumbTemplate = this.galleryThumbDef.templateRef; + if (this._galleryThumbDef) { + templateConfig.thumbTemplate = this._galleryThumbDef.templateRef; } - if (this.galleryBoxDef) { - templateConfig.boxTemplate = this.galleryBoxDef.templateRef; + if (this._galleryBoxDef) { + templateConfig.boxTemplate = this._galleryBoxDef.templateRef; } if (Object.keys(templateConfig).length) { this.galleryRef.setConfig(templateConfig); } } + /** @ignore */ ngOnDestroy(): void { - this._itemClick$.unsubscribe(); - this._thumbClick$.unsubscribe(); - this._itemChange$.unsubscribe(); - this._indexChange$.unsubscribe(); - this._playingChange$.unsubscribe(); - this._playerListener$.unsubscribe(); + this._itemClick$?.unsubscribe(); + this._thumbClick$?.unsubscribe(); + this._itemChange$?.unsubscribe(); + this._indexChange$?.unsubscribe(); + this._playingChange$?.unsubscribe(); if (this.destroyRef) { - this.galleryRef.destroy(); + this.galleryRef?.destroy(); } } + /** @ignore */ onItemClick(i: number): void { this.itemClick.emit(i); this.galleryRef.itemClick.next(i); } + /** @ignore */ onThumbClick(i: number): void { this.galleryRef.set(i); this.thumbClick.emit(i); this.galleryRef.thumbClick.next(i); } + /** @ignore */ onError(err: GalleryError): void { this.error.emit(err); this.galleryRef.error.next(err); } + /** + * Load items and reset the state + */ load(items: GalleryItem[]): void { this.galleryRef.load(items); } + /** + * Add gallery item, it can be any item, suitable to add item with a custom template + */ add(item: GalleryItem, active?: boolean): void { this.galleryRef.add(item, active); } + /** + * Add image item + */ addImage(data: ImageItemData, active?: boolean): void { this.galleryRef.addImage(data, active); } + /** + * Add video item + */ addVideo(data: VideoItemData, active?: boolean): void { this.galleryRef.addVideo(data, active); } + /** + * Add iframe item + */ addIframe(data: IframeItemData, active?: boolean): void { this.galleryRef.addIframe(data, active); } + /** + * Add Youtube item + */ addYoutube(data: YoutubeItemData, active?: boolean): void { this.galleryRef.addYoutube(data, active); } + /** + * Remove gallery item by index + */ remove(i: number): void { this.galleryRef.remove(i); } + /** + * Go to next item + */ next(behavior?: ScrollBehavior, loop?: boolean): void { this.galleryRef.next(behavior, loop); } + /** + * Go to prev item + */ prev(behavior?: ScrollBehavior, loop?: boolean): void { this.galleryRef.prev(behavior, loop); } + /** + * Set active item + */ set(i: number, behavior?: ScrollBehavior): void { this.galleryRef.set(i, behavior); } + /** + * Reset to initial state + */ reset(): void { this.galleryRef.reset(); } + /** + * Start the player + */ play(interval?: number): void { this.galleryRef.play(interval); } + /** + * Stop the player + */ stop(): void { this.galleryRef.stop(); } diff --git a/projects/ng-gallery/src/lib/components/gallery.scss b/projects/ng-gallery/src/lib/components/gallery.scss new file mode 100644 index 00000000..dfe3bebb --- /dev/null +++ b/projects/ng-gallery/src/lib/components/gallery.scss @@ -0,0 +1,20 @@ +:host { + position: relative; + overflow: hidden; + z-index: 1; + display: flex; + justify-content: center; + align-items: center; + background-color: black; + + --g-height-transition: height 468ms cubic-bezier(0.42, 0, 0.58, 1); + --g-nav-drop-shadow: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); + --g-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); + --g-font-color: #000; + --g-overlay-color: #fff; + --g-gutter-size: 1px; + + &[gallerize] { + --g-item-cursor: pointer; + } +} diff --git a/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts b/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts index dedbf393..566739a2 100644 --- a/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts +++ b/projects/ng-gallery/src/lib/components/templates/gallery-image.component.ts @@ -11,10 +11,13 @@ import { NgSwitch, NgSwitchCase, NgIf } from '@angular/common'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { animate, style, transition, trigger } from '@angular/animations'; import { imageFailedSvg } from './svg-assets'; +import { ImgRecognizer } from '../../utils/img-recognizer'; +import { ItemState } from './items.model'; @Component({ selector: 'gallery-image', changeDetection: ChangeDetectionStrategy.OnPush, + styleUrls: ['./gallery-image.scss'], animations: [ trigger('fadeIn', [ transition('* => success', [ @@ -25,14 +28,28 @@ import { imageFailedSvg } from './svg-assets'; ], template: ` - + + + + + + +
                                                                                                                                  @@ -65,19 +82,18 @@ import { imageFailedSvg } from './svg-assets'; `, standalone: true, - imports: [NgSwitch, NgSwitchCase, NgIf] + imports: [NgSwitch, NgSwitchCase, NgIf, ImgRecognizer] }) export class GalleryImageComponent implements OnInit { - state: 'loading' | 'success' | 'failed' = 'loading'; - - /** Progress value */ - progress: number = 0; + state: ItemState = 'loading'; /** Is thumbnail */ @Input() isThumbnail: boolean; + @Input() index: number; + /** Image loading attribute */ @Input() loadingAttr: 'eager' | 'lazy'; @@ -103,8 +119,6 @@ export class GalleryImageComponent implements OnInit { /** Stream that emits when an error occurs */ @Output() error: EventEmitter = new EventEmitter(); - @Output() loaded: EventEmitter = new EventEmitter(); - @HostBinding('attr.imageState') get imageState(): string { return this.state; } diff --git a/projects/ng-gallery/src/lib/components/templates/gallery-image.scss b/projects/ng-gallery/src/lib/components/templates/gallery-image.scss new file mode 100644 index 00000000..9e106869 --- /dev/null +++ b/projects/ng-gallery/src/lib/components/templates/gallery-image.scss @@ -0,0 +1,118 @@ +:host { + display: flex; + width: 100%; + height: 100%; + max-height: 100%; + max-width: 100%; + transition: opacity 300ms cubic-bezier(0.5, 0, 0.5, 1); + opacity: var(--g-thumb-opacity); + + &[imageState='success'] { + align-self: center; + } + + ::ng-deep { + svg { + width: 100%; + height: 100%; + } + } +} + +.gallery-image-error { + width: 100px; + height: 100px; +} + +.gallery-thumb-error { + width: 40px; + height: 40px; +} + +img.g-image-item { + object-fit: var(--image-object-fit); + width: 100%; + height: 100%; + pointer-events: none; + max-height: 100%; + max-width: 100%; +} + +.g-image-error-message { + position: absolute; + z-index: 10; + left: 0; + top: 0; + right: 0; + bottom: 0; + color: white; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} + +h2, h4 { + color: coral; + margin: 0; +} + +h2 { + font-size: 3.5em; + margin-bottom: 0.3em; +} + +h4 { + font-size: 1.6em; +} + +.g-loading { + position: absolute; + transform: translate3d(-50%, -50%, 0); + left: 50%; + top: 50%; + width: 80px; + height: 80px; +} + +// Thumbnail loading + +$loading-color: #fff !default; +$placeholder-ng: #262626 !default; + +.g-active-thumb { + .g-thumb-loading { + background-color: #464646; + } +} + +.g-thumb-loading { + position: relative; + overflow: hidden; + width: 100%; + height: 100%; + background-color: $placeholder-ng; + + &::before { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 50%; + z-index: 1; + width: 500%; + margin-left: -250%; + animation: phAnimation .8s linear infinite; + background: linear-gradient(to right, rgba($loading-color, 0) 46%, rgba($loading-color, .35) 50%, rgba($loading-color, 0) 54%) 50% 50%; + } +} + +@keyframes phAnimation { + 0% { + transform: translate3d(-30%, 0, 0); + } + 100% { + transform: translate3d(30%, 0, 0); + } +} diff --git a/projects/ng-gallery/src/lib/components/templates/items.model.ts b/projects/ng-gallery/src/lib/components/templates/items.model.ts index 623cd4dc..67071479 100644 --- a/projects/ng-gallery/src/lib/components/templates/items.model.ts +++ b/projects/ng-gallery/src/lib/components/templates/items.model.ts @@ -80,3 +80,5 @@ export type VideoItemData = GalleryItemModel & { }; export type GalleryItemData = ImageItemData | VideoItemData | IframeItemData | YoutubeItemData; + +export type ItemState = 'success' | 'loading' | 'failed'; diff --git a/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts b/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts index 3fdcf367..3009431e 100644 --- a/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts +++ b/projects/ng-gallery/src/lib/gestures/hammer-sliding.directive.ts @@ -1,9 +1,24 @@ -import { Directive, Inject, Input, Output, OnChanges, OnDestroy, SimpleChanges, NgZone, ElementRef, EventEmitter } from '@angular/core'; +import { + Directive, + Inject, + Input, + Output, + OnChanges, + OnDestroy, + SimpleChanges, + NgZone, + ElementRef, + EventEmitter +} from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { Platform } from '@angular/cdk/platform'; +import { Directionality } from '@angular/cdk/bidi'; import { SliderAdapter } from '../components/adapters'; -import { GalleryConfig } from '../models/config.model'; import { GalleryState } from '../models/gallery.model'; +import { GalleryConfig } from '../models/config.model'; +import { Orientation } from '../models/constants'; +import { GalleryItemComponent } from '../components/gallery-item.component'; +import { GalleryThumbComponent } from '../components/gallery-thumb.component'; declare const Hammer: any; @@ -20,9 +35,11 @@ export class HammerSliding implements OnChanges, OnDestroy { return this._el.nativeElement; } - @Input('hammerSliding') galleryId: string; + @Input('hammerSliding') enabled: boolean; - @Input() items: HTMLElement[]; + @Input() galleryId: string; + + @Input() items: GalleryItemComponent[] | GalleryThumbComponent[]; @Input() adapter: SliderAdapter; @@ -32,16 +49,22 @@ export class HammerSliding implements OnChanges, OnDestroy { @Output() activeIndexChange: EventEmitter = new EventEmitter(); + @Output() isSlidingChange: EventEmitter = new EventEmitter(); + constructor(@Inject(DOCUMENT) private _document: Document, private _el: ElementRef, + private _dir: Directionality, private _platform: Platform, private _zone: NgZone) { } ngOnChanges(changes: SimpleChanges): void { - if (changes.config && changes.config.currentValue?.mouseSlidingDisabled !== changes.config.previousValue?.mouseSlidingDisabled) { - changes.config.currentValue.mouseSlidingDisabled ? this._unsubscribe() : this._subscribe(); + if (changes.enabled && changes.enabled?.currentValue !== changes.enabled?.previousValue) { + this.enabled ? this._subscribe() : this._unsubscribe(); + } + if (!changes.adapter?.firstChange && changes.adapter?.currentValue !== changes.adapter?.previousValue) { + this.enabled ? this._subscribe() : this._unsubscribe(); } } @@ -63,10 +86,13 @@ export class HammerSliding implements OnChanges, OnDestroy { // Set panOffset for sliding on pan start event this._hammer.on('panstart', () => { + this._zone.run(() => { + this.isSlidingChange.emit(true); + }); + offset = this.adapter.scrollValue; - // Disable scroll-snap-type functionality - this._viewport.style.scrollSnapType = 'unset'; this._viewport.classList.add('g-sliding'); + this._viewport.style.setProperty('--slider-scroll-snap-type', 'none'); }); this._hammer.on('panmove', (e: any) => this._viewport.scrollTo(this.adapter.getHammerValue(offset, e, 'auto'))); @@ -75,7 +101,11 @@ export class HammerSliding implements OnChanges, OnDestroy { this._document.onselectstart = null; this._viewport.classList.remove('g-sliding'); const index: number = this.getIndexOnMouseUp(e); - this._zone.run(() => this.activeIndexChange.emit(index)); + + this._zone.run(() => { + this.isSlidingChange.emit(false); + this.activeIndexChange.emit(index); + }); }); }); } @@ -87,7 +117,7 @@ export class HammerSliding implements OnChanges, OnDestroy { private getIndexOnMouseUp(e: any): number { // Check if scrolled item is great enough to navigate - const currElement: Element = this.items[this.state.currIndex]; + const currElement: Element = this.items[this.state.currIndex].nativeElement; // Find the gallery item element in the center elements const elementAtCenter: Element = this.getElementFromViewportCenter(); @@ -100,7 +130,14 @@ export class HammerSliding implements OnChanges, OnDestroy { const velocity: number = this.adapter.getHammerVelocity(e); // Check if velocity is great enough to navigate if (Math.abs(velocity) > 0.3) { - return velocity > 0 ? this.state.currIndex - 1 : this.state.currIndex + 1; + if (this.config.orientation === Orientation.Horizontal) { + if (velocity > 0) { + return this._dir.value === 'rtl' ? this.state.currIndex + 1 : this.state.currIndex - 1; + } + return this._dir.value === 'rtl' ? this.state.currIndex - 1 : this.state.currIndex + 1; + } else { + return velocity > 0 ? this.state.currIndex - 1 : this.state.currIndex + 1; + } } // Reset position to the current index diff --git a/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts b/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts new file mode 100644 index 00000000..db3041ec --- /dev/null +++ b/projects/ng-gallery/src/lib/gestures/mouse-sliding.directive.ts @@ -0,0 +1,142 @@ +// import { Directive, Inject, Input, Output, OnChanges, OnDestroy, SimpleChanges, NgZone, ElementRef, EventEmitter } from '@angular/core'; +// import { DOCUMENT } from '@angular/common'; +// import { Observable, Subscription, fromEvent, switchMap, take, takeUntil, tap } from 'rxjs'; +// import { SliderAdapter } from '../components/adapters'; +// import { GalleryConfig } from '../models/config.model'; +// import { GalleryState } from '../models/gallery.model'; +// +// @Directive({ +// selector: '[mouseSliding]', +// standalone: true +// }) +// export class MouseSliding implements OnChanges, OnDestroy { +// +// private _currentSubscription: Subscription; +// +// get _viewport(): HTMLElement { +// return this._el.nativeElement; +// } +// +// @Input('mouseSliding') galleryId: string; +// +// @Input() items: HTMLElement[]; +// +// @Input() adapter: SliderAdapter; +// +// @Input() state: GalleryState; +// +// @Input() config: GalleryConfig; +// +// @Output() activeIndexChange: EventEmitter = new EventEmitter(); +// +// constructor(@Inject(DOCUMENT) private _document: Document, +// private _zone: NgZone, +// private _el: ElementRef) { +// } +// +// +// ngOnChanges(changes: SimpleChanges): void { +// if (changes.config && changes.config.currentValue?.mouseScrollDisabled !== changes.config.previousValue?.mouseScrollDisabled) { +// changes.config.currentValue.mouseScrollDisabled ? this._unsubscribe() : this._subscribe(); +// } +// } +// +// ngOnDestroy(): void { +// this._unsubscribe(); +// } +// +// private _subscribe(): void { +// this._unsubscribe(); +// +// this._zone.runOutsideAngular(() => { +// this._currentSubscription = this.dragEvent().subscribe(); +// }); +// } +// +// private _unsubscribe(): void { +// this._currentSubscription?.unsubscribe(); +// } +// +// private dragEvent(): Observable { +// const mouseDown$: Observable = fromEvent(this._viewport, 'mousedown'); +// const mouseUp$: Observable = fromEvent(this._document, 'mouseup'); +// const mouseMove$: Observable = fromEvent(this._document, 'mousemove', { +// capture: true, +// passive: true +// }); +// +// let offset: number; +// let velocity: number; +// +// const dragStart: Observable = mouseDown$.pipe( +// tap((downEvent: MouseEvent) => { +// downEvent.preventDefault(); +// offset = this.adapter.scrollValue; +// this._viewport.style.scrollSnapType = 'unset'; +// this._viewport.classList.add('g-sliding'); +// this._document.onselectstart = () => false; +// }) +// ); +// +// const dragEnd: Observable = mouseUp$.pipe( +// tap((upEvent: MouseEvent) => { +// this._document.onselectstart = null; +// this._viewport.classList.remove('g-sliding'); +// const index: number = this.getIndexOnMouseUp(velocity); +// this._zone.run(() => this.activeIndexChange.emit(index)); +// }), +// take(1) +// ); +// +// return dragStart.pipe( +// switchMap((startEvent: MouseEvent) => { +// return mouseMove$.pipe( +// tap((moveEvent: MouseEvent) => { +// const start: number = this.adapter.getDraggingProperty(startEvent); +// const current: number = this.adapter.getDraggingProperty(moveEvent); +// const deltaTime: number = moveEvent.timeStamp - startEvent.timeStamp; +// const delta: number = current - start; +// velocity = delta / deltaTime; +// this._viewport.scrollTo(this.adapter.getDraggingValue(offset, delta, 'auto')); +// }), +// takeUntil(dragEnd) +// ); +// }) +// ); +// } +// +// private getIndexOnMouseUp(velocity: number): number { +// // Check if scrolled item is great enough to navigate +// const currElement: Element = this.items[this.state.currIndex]; +// +// // Find the gallery item element in the center elements +// const elementAtCenter: Element = this.getElementFromViewportCenter(); +// +// // Check if center item can be taken from element using +// if (elementAtCenter && elementAtCenter !== currElement) { +// return +elementAtCenter.getAttribute('galleryIndex'); +// } +// +// // Check if velocity is great enough to navigate +// if (Math.abs(velocity) > 0.3) { +// return velocity > 0 ? this.state.currIndex - 1 : this.state.currIndex + 1; +// } +// +// // Reset position to the current index +// return -1; +// } +// +// private getElementFromViewportCenter(): Element { +// // Get slider position relative to the document +// const sliderRect: DOMRect = this._viewport.getBoundingClientRect(); +// // Try look for the center item using `elementsFromPoint` function +// const centerElements: Element[] = this._document.elementsFromPoint( +// sliderRect.x + (sliderRect.width / 2), +// sliderRect.y + (sliderRect.height / 2) +// ); +// // Find the gallery item element in the center elements +// return centerElements.find((element: Element) => { +// return element.getAttribute('galleryId') === this.galleryId; +// }); +// } +// } diff --git a/projects/ng-gallery/src/lib/models/config.model.ts b/projects/ng-gallery/src/lib/models/config.model.ts index e02d89fd..acab8bb0 100644 --- a/projects/ng-gallery/src/lib/models/config.model.ts +++ b/projects/ng-gallery/src/lib/models/config.model.ts @@ -1,50 +1,86 @@ import { InjectionToken, TemplateRef } from '@angular/core'; import { BezierEasingOptions } from '../smooth-scroll'; -export const GALLERY_CONFIG = new InjectionToken('GALLERY_CONFIG'); +export const GALLERY_CONFIG: InjectionToken = new InjectionToken('GALLERY_CONFIG'); -export interface GalleryConfig { - scrollBehavior?: ScrollBehavior; - navScrollBehavior?: ScrollBehavior; +type ImageSize = 'contain' | 'cover'; + +type Orientation = 'horizontal' | 'vertical'; + +type ThumbsPosition = 'top' | 'left' | 'right' | 'bottom'; + +type HorizontalPosition = 'top' | 'bottom'; + +type LoadingStrategy = 'preload' | 'lazy' | 'default'; + +type LoadingAttr = 'eager' | 'lazy'; + +interface ThumbConfig { + thumbs?: boolean; + thumbWidth?: number; + thumbHeight?: number; + thumbLoadingIcon?: string; + thumbLoadingError?: string; + disableThumbs?: boolean; + detachThumbs?: boolean; + thumbAutosize?: boolean; + disableThumbScroll?: boolean; + disableThumbMouseScroll?: boolean; + thumbCentralized?: boolean; + thumbPosition?: ThumbsPosition; + thumbImageSize?: ImageSize; + thumbTemplate?: TemplateRef; +} + +interface NavConfig { nav?: boolean; - dots?: boolean; - loop?: boolean; - thumb?: boolean; navIcon?: string; +} + +interface BulletsConfig { + bullets?: boolean; + disableBullets?: boolean; + bulletSize?: number; + bulletPosition?: HorizontalPosition; +} + +interface CounterConfig { counter?: boolean; - dotsSize?: number; - autoPlay?: boolean; - thumbWidth?: number; - thumbHeight?: number; + counterPosition?: HorizontalPosition; +} + +interface PlayerConfig { + autoplay?: boolean; + autoplayInterval?: number; +} + +interface SliderConfig { + loop?: boolean; + disableScroll?: boolean; + disableMouseScroll?: boolean; + itemAutosize?: boolean; + autoHeight?: boolean; loadingIcon?: string; loadingError?: string; - thumbLoadingIcon?: string; - thumbLoadingError?: string; - disableThumb?: boolean; - slidingDuration?: number; - slidingEase?: BezierEasingOptions; - slidingDisabled?: boolean; - thumbSlidingDisabled?: boolean; - mouseSlidingDisabled?: boolean; - thumbMouseSlidingDisabled?: boolean; - resizeDebounceTime?: number; - playerInterval?: number; + scrollDuration?: number; + scrollEase?: BezierEasingOptions; + orientation?: Orientation; + imageSize?: ImageSize; + loadingStrategy?: LoadingStrategy; + loadingAttr?: LoadingAttr; boxTemplate?: TemplateRef; itemTemplate?: TemplateRef; imageTemplate?: TemplateRef; - thumbTemplate?: TemplateRef; - thumbDetached?: boolean; - imageSize?: 'cover' | 'contain'; - thumbImageSize?: 'cover' | 'contain'; - dotsPosition?: 'top' | 'bottom'; - counterPosition?: 'top' | 'bottom'; - slidingDirection?: 'horizontal' | 'vertical'; - loadingStrategy?: 'preload' | 'lazy' | 'default'; - loadingAttr?: 'eager' | 'lazy'; - thumbPosition?: 'top' | 'left' | 'right' | 'bottom'; - thumbView?: 'default' | 'contain'; - thumbAutosize?: boolean; - itemAutosize?: boolean; - autoHeight?: boolean; +} + +export type GalleryConfig = SliderConfig + & ThumbConfig + & NavConfig + & BulletsConfig + & CounterConfig + & PlayerConfig + & { + scrollBehavior?: ScrollBehavior; + resizeDebounceTime?: number; debug?: boolean; } diff --git a/projects/ng-gallery/src/lib/models/constants.ts b/projects/ng-gallery/src/lib/models/constants.ts index 18caeda2..84c8e7ab 100644 --- a/projects/ng-gallery/src/lib/models/constants.ts +++ b/projects/ng-gallery/src/lib/models/constants.ts @@ -29,7 +29,7 @@ export enum ThumbnailsPosition { Bottom = 'bottom' } -export enum DotsPosition { +export enum BulletsPosition { Top = 'top', Bottom = 'bottom' } @@ -39,7 +39,7 @@ export enum CounterPosition { Bottom = 'bottom' } -export enum SlidingDirection { +export enum Orientation { Horizontal = 'horizontal', Vertical = 'vertical' } @@ -51,9 +51,4 @@ export enum GalleryItemTypes { Iframe = 'iframe' } -export enum ThumbnailsView { - Default = 'default', - Contain = 'contain', -} - export type GalleryItemType = GalleryItemTypes | string; diff --git a/projects/ng-gallery/src/lib/observers/active-item-observer.ts b/projects/ng-gallery/src/lib/observers/active-item-observer.ts index 03013dd1..229c210a 100644 --- a/projects/ng-gallery/src/lib/observers/active-item-observer.ts +++ b/projects/ng-gallery/src/lib/observers/active-item-observer.ts @@ -20,7 +20,7 @@ export class ActiveItemObserver { function createIntersectionObserver(root: HTMLElement, elements: HTMLElement[], rootMargin: string): Observable { return new Observable((observer: Subscriber) => { - const intersectionObserver = new IntersectionObserver( + const intersectionObserver: IntersectionObserver = new IntersectionObserver( (entries: IntersectionObserverEntry[]) => observer.next(entries), { root, diff --git a/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts b/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts index 2956b2e3..02085b66 100644 --- a/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts +++ b/projects/ng-gallery/src/lib/observers/item-intersection-observer.directive.ts @@ -1,9 +1,11 @@ -import { Directive, Input, Output, ElementRef, OnChanges, EventEmitter, NgZone, OnDestroy } from '@angular/core'; -import { Subscription, switchMap } from 'rxjs'; +import { Directive, Input, Output, OnChanges, OnDestroy, NgZone, EventEmitter } from '@angular/core'; +import { Subscription, combineLatest, filter, switchMap } from 'rxjs'; import { GalleryConfig } from '../models/config.model'; import { ActiveItemObserver } from './active-item-observer'; import { resizeObservable } from '../utils/resize-observer'; import { SliderAdapter } from '../components/adapters'; +import { GalleryItemComponent } from '../components/gallery-item.component'; +import { ItemState } from '../components/templates/items.model'; @Directive({ selector: '[itemIntersectionObserver]', @@ -16,20 +18,22 @@ export class ItemIntersectionObserver implements OnChanges, OnDestroy { private _sensor: ActiveItemObserver = new ActiveItemObserver(); private get _viewport(): HTMLElement { - return this._el.nativeElement.parentElement.parentElement; + return this._item.nativeElement.parentElement.parentElement; } @Input() adapter: SliderAdapter; @Input() config: GalleryConfig; + @Input('itemIntersectionObserverDisabled') disabled: boolean; + @Output() activeIndexChange: EventEmitter = new EventEmitter(); - constructor(private _zone: NgZone, private _el: ElementRef) { + constructor(private _zone: NgZone, private _item: GalleryItemComponent) { } ngOnChanges(): void { - this.config.itemAutosize ? this._subscribe() : this._unsubscribe(); + (this.config.itemAutosize && !this.disabled) ? this._subscribe() : this._unsubscribe(); } ngOnDestroy(): void { @@ -41,12 +45,24 @@ export class ItemIntersectionObserver implements OnChanges, OnDestroy { if (!!this.adapter) { this._zone.runOutsideAngular(() => { - this._currentSubscription = resizeObservable(this._el.nativeElement).pipe( - switchMap(() => this._sensor.observe( + this._currentSubscription = combineLatest([ + resizeObservable(this._viewport), + resizeObservable(this._item.nativeElement) + ]).pipe( + switchMap(() => this._item.state$), + filter((state: ItemState) => state !== 'loading'), + switchMap(() => { + const rootMargin: string = this.adapter.getElementRootMargin(this._viewport, this._item.nativeElement); + if (this.config.debug) { + this._item.nativeElement.style.setProperty('--item-intersection-margin', `"VIEWPORT(${ this._viewport.clientWidth }x${ this._viewport.clientHeight }) ITEM(${ this._item.nativeElement.clientWidth }x${ this._item.nativeElement.clientHeight }) INTERSECTION(${ rootMargin })"`); + } + + return this._sensor.observe( this._viewport, - [this._el.nativeElement], - this.adapter.getElementRoomMargin(this._viewport, this._el.nativeElement) - ) + [this._item.nativeElement], + rootMargin + ); + } ) ).subscribe((index: number) => { this._zone.run(() => this.activeIndexChange.emit(index)); diff --git a/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts b/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts index 0e35967b..10593d2c 100644 --- a/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts +++ b/projects/ng-gallery/src/lib/observers/slider-intersection-observer.directive.ts @@ -3,6 +3,7 @@ import { skip, Subscription } from 'rxjs'; import { GalleryConfig } from '../models/config.model'; import { ActiveItemObserver } from './active-item-observer'; import { SliderAdapter } from '../components/adapters'; +import { GalleryItemComponent } from '../components/gallery-item.component'; @Directive({ selector: '[sliderIntersectionObserver]', @@ -20,17 +21,19 @@ export class SliderIntersectionObserver implements OnChanges, OnDestroy { @Input() adapter: SliderAdapter; - @Input() items: HTMLElement[]; + @Input() items: GalleryItemComponent[]; @Input() config: GalleryConfig; + @Input('sliderIntersectionObserverDisabled') disabled: boolean; + @Output() activeIndexChange: EventEmitter = new EventEmitter(); constructor(private _zone: NgZone, private _el: ElementRef) { } ngOnChanges(): void { - this.config.itemAutosize ? this._unsubscribe() : this._subscribe(); + (this.config.itemAutosize || this.disabled) ? this._unsubscribe() : this._subscribe(); } ngOnDestroy(): void { @@ -41,13 +44,16 @@ export class SliderIntersectionObserver implements OnChanges, OnDestroy { this._unsubscribe(); if (!!this.adapter && !!this.items?.length) { + const rootMargin: string = this.adapter.getRootMargin(); + if (this.config.debug) { + this._viewport.style.setProperty('--intersection-margin', `"INTERSECTION(${ rootMargin })"`); + } + this._zone.runOutsideAngular(() => { this._currentSubscription = this._sensor.observe( this._viewport, - this.items, - this.adapter.getRoomMargin() - ).pipe( - skip(1) + this.items.map((item: GalleryItemComponent) => item.nativeElement), + rootMargin ).subscribe((index: number) => { this._zone.run(() => this.activeIndexChange.emit(index)); }); diff --git a/projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts b/projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts new file mode 100644 index 00000000..2a20b979 --- /dev/null +++ b/projects/ng-gallery/src/lib/observers/slider-resize-observer.directive.ts @@ -0,0 +1,219 @@ +import { + Directive, + Input, + Output, + NgZone, + ElementRef, + AfterViewChecked, + OnInit, + OnChanges, + OnDestroy, + EventEmitter +} from '@angular/core'; +import { + Observable, + Subscription, + of, + tap, + take, + filter, + fromEvent, + switchMap, + debounceTime, + firstValueFrom, + distinctUntilChanged, + EMPTY, + animationFrameScheduler +} from 'rxjs'; +import { ImgManager } from '../utils/img-manager'; +import { resizeObservable } from '../utils/resize-observer'; +import { SliderAdapter } from '../components/adapters'; +import { Gallery } from '../services/gallery.service'; +import { GalleryRef } from '../services/gallery-ref'; +import { GalleryConfig } from '../models/config.model'; +import { GalleryState } from '../models/gallery.model'; + +@Directive({ + selector: '[sliderResizeObserver]', + standalone: true +}) +export class SliderResizeObserver implements AfterViewChecked, OnChanges, OnInit, OnDestroy { + + private _resizeObserver: ResizeObserver; + + private _autoHeightSubscription: Subscription; + + private _resizeSubscription: Subscription; + + private _shouldSkip: boolean; + + // Stream that emits after the transition to the new height is completed + private _afterHeightChanged$: Observable; + + private get _viewport(): HTMLElement { + return this._el.nativeElement; + } + + private get _galleryCore(): HTMLElement { + return this._el.nativeElement.parentElement.parentElement.parentElement; + } + + private get _isAutoHeight(): boolean { + return this.config.autoHeight && + !this.config.itemAutosize && + this.config.orientation === 'horizontal' && + (this.config.thumbPosition === 'top' || this.config.thumbPosition === 'bottom'); + } + + @Input() galleryId: string; + + @Input() adapter: SliderAdapter; + + @Input() config: GalleryConfig; + + @Output() isResizingChange: EventEmitter = new EventEmitter(); + + constructor(private _el: ElementRef, + private _zone: NgZone, + private _gallery: Gallery, + private _imgManager: ImgManager) { + } + + ngOnInit(): void { + const galleryRef: GalleryRef = this._gallery.ref(this.galleryId); + + // Check if height has transition for the auto-height feature + const transitionDuration: string = getComputedStyle(this._viewport).getPropertyValue('transition-duration'); + if (parseFloat(transitionDuration) === 0) { + this._afterHeightChanged$ = of(null); + } else { + this._afterHeightChanged$ = fromEvent(this._viewport, 'transitionend'); + } + + this._zone.runOutsideAngular(() => { + + // Detect if the size of the slider has changed detecting current index on scroll + this._resizeSubscription = resizeObservable(this._viewport, (observer: ResizeObserver) => this._resizeObserver = observer).pipe( + // Check if resize should skip due to re-observing the slider + filter(() => !this._shouldSkip || !(this._shouldSkip = false)), + // Immediately set visibility to hidden to avoid changing the active item caused by appearance of other items when size is expanded + tap(() => this.setResizingState()), + debounceTime(this.config.resizeDebounceTime, animationFrameScheduler), + tap(async (entry: ResizeObserverEntry) => { + // Update CSS variables with the proper values + this.updateSliderSize(); + + if (this._isAutoHeight) { + const img: HTMLImageElement = await firstValueFrom(this._imgManager.getActiveItem(galleryRef.state)); + // If img height is identical to the viewport height then skip + if (img.height === this._viewport.clientHeight) { + this.resetResizingState(); + } else { + // Unobserve the slider while the height is being changed + this.setResizingState({ unobserve: true }); + // Change the height + this._galleryCore.style.setProperty('--slider-height', `${ img.height }px`); + // Wait until height transition ends + await firstValueFrom(this._afterHeightChanged$); + this.resetResizingState({ + // Mark to skip first emit after re-observing the slider if height content rect height and client height are identical + shouldSkip: entry.contentRect.height === this._viewport.clientHeight, + observe: true + }); + } + } else { + requestAnimationFrame(() => this.resetResizingState({ shouldSkip: true })); + } + }) + ).subscribe(); + }); + } + + ngOnChanges(): void { + this._isAutoHeight ? this._subscribeAutoHeight() : this._unsubscribeAutoHeight(); + } + + ngOnDestroy(): void { + this._resizeSubscription?.unsubscribe(); + this._unsubscribeAutoHeight(); + } + + ngAfterViewChecked(): void { + this.updateSliderSize(); + } + + private updateSliderSize(): void { + // Update slider width and height CSS variables + this._galleryCore.style.setProperty('--slider-width', `${ this._viewport.clientWidth }px`); + + // Only update height if auto-height is false, because when it's true, another function will take care of it + if (!this.config.autoHeight) { + this._galleryCore.style.setProperty('--slider-height', `${ this._viewport.clientHeight }px`); + } + + this.updateCentralizeCSSVariables(); + } + + private updateCentralizeCSSVariables(): void { + if (this.config.itemAutosize) { + this._galleryCore.style.setProperty('--slider-centralize-start-size', `${ this.adapter.getCentralizerStartSize() }px`); + this._galleryCore.style.setProperty('--slider-centralize-end-size', `${ this.adapter.getCentralizerEndSize() }px`); + } + } + + private _subscribeAutoHeight(): void { + this._unsubscribeAutoHeight(); + + this._shouldSkip = false; + this._zone.runOutsideAngular(() => { + + const galleryRef: GalleryRef = this._gallery.ref(this.galleryId); + + // TODO: Why is galleryRef.state emits when screen size changes? + const state: Observable = galleryRef.state.pipe(distinctUntilChanged((a: GalleryState, b: GalleryState) => a.currIndex === b.currIndex)) + this._autoHeightSubscription = this._imgManager.getActiveItem(state).pipe( + switchMap((img: HTMLImageElement) => { + this.setResizingState({ unobserve: true }); + this._galleryCore.style.setProperty('--slider-height', `${ img.clientHeight }px`); + + // Check if the new item height is equal to the current height, there will be no transition, + // So reset resizing state + if (img.height === this._viewport.clientHeight) { + this.resetResizingState({ shouldSkip: true, observe: true }); + return EMPTY; + } + return this._afterHeightChanged$.pipe( + tap(() => this.resetResizingState({ shouldSkip: true, observe: true })), + take(1) + ); + }) + ).subscribe(); + }); + } + + private _unsubscribeAutoHeight(): void { + this._autoHeightSubscription?.unsubscribe(); + } + + private setResizingState({ unobserve }: { unobserve?: boolean } = {}): void { + this._zone.run(() => { + this.isResizingChange.emit(true); + }) + this._viewport.classList.add('g-resizing'); + if (unobserve) { + // Unobserve the slider while the height is being changed + this._resizeObserver.unobserve(this._viewport); + } + } + + private resetResizingState({ shouldSkip, observe }: { shouldSkip?: boolean, observe?: boolean } = {}): void { + this._zone.run(() => { + this.isResizingChange.emit(false); + }) + this._viewport.classList.remove('g-resizing'); + this._shouldSkip = shouldSkip; + if (observe) { + this._resizeObserver.observe(this._viewport); + } + } +} diff --git a/projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts b/projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts new file mode 100644 index 00000000..2952d096 --- /dev/null +++ b/projects/ng-gallery/src/lib/observers/thumb-resize-observer.directive.ts @@ -0,0 +1,65 @@ +import { + Directive, + Input, + Output, + OnInit, + OnChanges, + OnDestroy, + NgZone, + ElementRef, + SimpleChanges, + EventEmitter +} from '@angular/core'; +import { Subscription, tap, auditTime, animationFrameScheduler, debounceTime } from 'rxjs'; +import { resizeObservable } from '../utils/resize-observer'; +import { GalleryConfig } from '../models/config.model'; +import { SliderAdapter } from '../components/adapters'; + +@Directive({ + selector: '[thumbResizeObserver]', + standalone: true +}) +export class ThumbResizeObserver implements OnChanges, OnInit, OnDestroy { + + private _resizeSubscription: Subscription; + + private get _viewport(): HTMLElement { + return this._el.nativeElement; + } + + @Input() config: GalleryConfig; + + @Input() adapter: SliderAdapter; + + @Output('thumbResizeObserver') resized: EventEmitter = new EventEmitter(); + + constructor(private _el: ElementRef, private _zone: NgZone) { + } + + ngOnInit(): void { + this._zone.runOutsideAngular(() => { + this._resizeSubscription = resizeObservable(this._viewport).pipe( + debounceTime(this.config.resizeDebounceTime, animationFrameScheduler), + tap(() => { + this.updateSliderSize(); + this.resized.emit(); + }) + ).subscribe(); + }); + } + + ngOnChanges(changes: SimpleChanges): void { + if (!changes.config.firstChange) { + this.updateSliderSize(); + } + } + + ngOnDestroy(): void { + this._resizeSubscription?.unsubscribe(); + } + + private updateSliderSize(): void { + this._viewport.style.setProperty('--thumb-centralize-start-size', this.adapter.getCentralizerStartSize() + 'px'); + this._viewport.style.setProperty('--thumb-centralize-end-size', this.adapter.getCentralizerEndSize() + 'px'); + } +} diff --git a/projects/ng-gallery/src/lib/services/gallery-ref.ts b/projects/ng-gallery/src/lib/services/gallery-ref.ts index 6dcde27b..e8110af8 100644 --- a/projects/ng-gallery/src/lib/services/gallery-ref.ts +++ b/projects/ng-gallery/src/lib/services/gallery-ref.ts @@ -1,4 +1,4 @@ -import { BehaviorSubject, Subject, Observable, of, EMPTY, delay, filter, switchMap, tap } from 'rxjs'; +import { BehaviorSubject, Subject, Observable, filter } from 'rxjs'; import { defaultState } from '../utils/gallery.default'; import { GalleryError, GalleryItem, GalleryState } from '../models/gallery.model'; import { GalleryConfig } from '../models/config.model'; @@ -27,13 +27,13 @@ export class GalleryRef { private readonly _config: BehaviorSubject; /** Stream that emits on item click */ - readonly itemClick = new Subject(); + readonly itemClick: Subject = new Subject(); /** Stream that emits on thumbnail click */ - readonly thumbClick = new Subject(); + readonly thumbClick: Subject = new Subject(); /** Stream that emits on an error occurs */ - readonly error = new Subject(); + readonly error: Subject = new Subject(); /** Gallery Events */ @@ -71,11 +71,6 @@ export class GalleryRef { return this.state.pipe(filterActions([GalleryAction.PLAY, GalleryAction.STOP])); } - /** Stream that emits when the player should start or stop */ - private get playerActions(): Observable { - return this.state.pipe(filterActions([GalleryAction.PLAY, GalleryAction.STOP, GalleryAction.INDEX_CHANGED])); - } - constructor(config: GalleryConfig, private deleteInstance: () => void) { this._state = new BehaviorSubject(defaultState); this._config = new BehaviorSubject(config); @@ -83,20 +78,6 @@ export class GalleryRef { this.config = this._config.asObservable(); } - /** - * Activate player actions listener - */ - activatePlayer(): Observable { - return this.playerActions.pipe( - switchMap((e: GalleryState) => - e.isPlaying ? of({}).pipe( - delay(this._config.value.playerInterval), - tap(() => this.next(this._config.value.scrollBehavior)) - ) : EMPTY - ) - ); - } - /** * Set gallery state */ @@ -230,9 +211,9 @@ export class GalleryRef { */ play(interval?: number): void { if (interval) { - this.setConfig({ playerInterval: interval }); + this.setConfig({ autoplayInterval: interval }); } - this.setState({ action: GalleryAction.PLAY, isPlaying: true }); + this.setState({ action: GalleryAction.PLAY, behavior: 'auto', isPlaying: true }); } /** diff --git a/projects/ng-gallery/src/lib/services/gallery.service.ts b/projects/ng-gallery/src/lib/services/gallery.service.ts index b736a38e..0a8df755 100644 --- a/projects/ng-gallery/src/lib/services/gallery.service.ts +++ b/projects/ng-gallery/src/lib/services/gallery.service.ts @@ -26,9 +26,9 @@ export class Gallery { */ ref(id = 'root', config?: GalleryConfig): GalleryRef { if (this._instances.has(id)) { - const galleryRef = this._instances.get(id); + const galleryRef: GalleryRef = this._instances.get(id); if (config) { - galleryRef.setConfig({ ...this.config, ...config }); + galleryRef.setConfig(config); } return galleryRef; } else { diff --git a/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts b/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts index 5e1fb2ca..733c5e9b 100644 --- a/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts +++ b/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.directive.ts @@ -1,40 +1,58 @@ -import { Directive, Inject, Input, Optional, OnDestroy, ElementRef } from '@angular/core'; -import { SMOOTH_SCROLL_OPTIONS, SmoothScrollStep, SmoothScrollToOptions } from './index'; +import { + Directive, + Inject, + Input, + Output, + NgZone, + OnInit, + OnDestroy, + ElementRef, + EventEmitter +} from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { Dir } from '@angular/cdk/bidi'; import { _Bottom, _Left, _Right, _Top, _Without } from '@angular/cdk/scrolling'; -import { getRtlScrollAxisType, Platform, RtlScrollAxisType } from '@angular/cdk/platform'; +import { getRtlScrollAxisType, RtlScrollAxisType } from '@angular/cdk/platform'; import { Observable, Subject, Subscriber, Subscription, of, - tap, take, merge, expand, fromEvent, switchMap, takeUntil, - takeWhile + takeWhile, + finalize } from 'rxjs'; import BezierEasing from './bezier-easing'; +import { GalleryConfig } from '../models/config.model'; +import { SmoothScrollOptions, SmoothScrollStep, SmoothScrollToOptions } from './index'; +import { SliderAdapter } from '../components/adapters'; + +declare const Hammer: any; @Directive({ selector: '[smoothScroll]', standalone: true, providers: [Dir] }) -export class SmoothScroll implements OnDestroy { +export class SmoothScroll implements OnInit, OnDestroy { - // Default options - private readonly _defaultOptions: SmoothScrollToOptions; + /** HammerJS instance */ + private _hammer: any; private readonly _scrollController: Subject = new Subject(); + private readonly _finished: Subject = new Subject(); + private readonly _el: HTMLElement; + private _isInterruptedByMouse: boolean; + private _subscription: Subscription; private get _w(): Window { @@ -49,43 +67,46 @@ export class SmoothScroll implements OnDestroy { } @Input() - set smoothScroll(value: SmoothScrollToOptions) { + set smoothScroll(value: SmoothScrollOptions) { if (value) { - this.scrollTo(value); + this._zone.runOutsideAngular(() => { + this.scrollTo(value); + }); } } - @Input() scrollSnapType: string; + @Input() adapter: SliderAdapter; + + @Input() config: GalleryConfig; + + @Input('smoothScrollInterruptOnMousemove') interruptOnMousemove: boolean; + + @Output() isScrollingChange: EventEmitter = new EventEmitter(); constructor(@Inject(DOCUMENT) private _document: Document, - @Optional() @Inject(SMOOTH_SCROLL_OPTIONS) customDefaultOptions: SmoothScrollToOptions, - private _platform: Platform, + private _zone: NgZone, private _dir: Dir, _el: ElementRef) { this._el = _el.nativeElement; - this._defaultOptions = { - duration: 468, - easing: { - x1: 0.42, - y1: 0, - x2: 0.58, - y2: 1 - }, - ...customDefaultOptions, - }; } ngOnInit(): void { this._subscription = this._scrollController.pipe( switchMap((context: SmoothScrollStep) => { - this._el.style.scrollSnapType = 'unset'; + this._zone.run(() => { + this.isScrollingChange.emit(true); + }); + this._el.classList.add('g-scrolling'); + this._el.style.setProperty('--slider-scroll-snap-type', 'none'); // Scroll each step recursively return of(null).pipe( expand(() => this._step(context).pipe( - takeWhile((currContext: SmoothScrollStep) => this._isFinished(currContext)) + takeWhile((currContext: SmoothScrollStep) => this._isFinished(currContext)), + takeUntil(this._finished) )), + finalize(() => this.resetElement()), takeUntil(this._interrupted()), ); }) @@ -106,8 +127,15 @@ export class SmoothScroll implements OnDestroy { } private resetElement(): void { + this._zone.run(() => { + this.isScrollingChange.emit(false); + }); + this._el.classList.remove('g-scrolling'); - this._el.style.scrollSnapType = this.scrollSnapType; + if (!this._isInterruptedByMouse) { + this._el.style.setProperty('--slider-scroll-snap-type', this.adapter.scrollSnapType); + } + this._isInterruptedByMouse = false; } /** @@ -117,7 +145,7 @@ export class SmoothScroll implements OnDestroy { if (context.currentX !== context.x || context.currentY !== context.y) { return true; } - this.resetElement(); + this._finished.next(); return false; } @@ -125,13 +153,33 @@ export class SmoothScroll implements OnDestroy { * Terminates an ongoing smooth scroll */ private _interrupted(): Observable { - return merge( - fromEvent(this._el, 'wheel', { passive: true, capture: true }), - fromEvent(this._el, 'touchmove', { passive: true, capture: true }), - ).pipe( - tap(() => this.resetElement()), - take(1) - ); + let interrupt$: Observable; + if (this.interruptOnMousemove && typeof Hammer !== 'undefined') { + this._hammer = new Hammer(this._el, { inputClass: Hammer.MouseInput }); + this._hammer.get('pan').set({ direction: this.adapter.hammerDirection }); + + // For gallery thumb slider, dragging thumbnails should cancel the ongoing scroll + interrupt$ = merge( + new Observable((subscriber: Subscriber) => { + this._hammer.on('panstart', () => { + this._isInterruptedByMouse = true; + subscriber.next(); + subscriber.complete(); + }); + return () => { + this._hammer.destroy(); + } + }), + fromEvent(this._el, 'wheel', { passive: true, capture: true }), + fromEvent(this._el, 'touchmove', { passive: true, capture: true }), + ) + } else { + interrupt$ = merge( + fromEvent(this._el, 'wheel', { passive: true, capture: true }), + fromEvent(this._el, 'touchmove', { passive: true, capture: true }), + ) + } + return interrupt$.pipe(take(1)); } /** @@ -152,7 +200,10 @@ export class SmoothScroll implements OnDestroy { this._scrollElement(context.currentX, context.currentY); // Proceed to the step - requestAnimationFrame(() => subscriber.next(context)); + requestAnimationFrame(() => { + subscriber.next(context); + subscriber.complete(); + }); }); } @@ -181,45 +232,44 @@ export class SmoothScroll implements OnDestroy { * left and right always refer to the left and right side of the scrolling container irrespective * of the layout direction. start and end refer to left and right in an LTR context and vice-versa * in an RTL context. - * @param customOptions specified the offsets to scroll to. + * @param params specified the offsets to scroll to. */ - scrollTo(customOptions: SmoothScrollToOptions): void { - if (this._platform.isBrowser) { - const isRtl: boolean = this._dir.value === 'rtl'; - const rtlScrollAxisType: RtlScrollAxisType = getRtlScrollAxisType(); - - const options: SmoothScrollToOptions = { - ...(this._defaultOptions as _Without<_Bottom & _Top>), - ...customOptions, - ...({ - // Rewrite start & end offsets as right or left offsets. - left: customOptions.left == null ? (isRtl ? customOptions.end : customOptions.start) : customOptions.left, - right: customOptions.right == null ? (isRtl ? customOptions.start : customOptions.end) : customOptions.right - } as _Without<_Bottom & _Top>) - }; - - // Rewrite the bottom offset as a top offset. - if (options.bottom != null) { - (options as _Without<_Bottom> & _Top).top = this._el.scrollHeight - this._el.clientHeight - options.bottom; + scrollTo(params: SmoothScrollOptions): void { + const isRtl: boolean = this._dir.value === 'rtl'; + const rtlScrollAxisType: RtlScrollAxisType = getRtlScrollAxisType(); + + const options: SmoothScrollToOptions = { + ...params, + ...({ + // Rewrite start & end offsets as right or left offsets. + left: params.left == null ? (isRtl ? params.end : params.start) : params.left, + right: params.right == null ? (isRtl ? params.start : params.end) : params.right + } as _Without<_Bottom & _Top>), + duration: params.behavior === 'smooth' ? this.config.scrollDuration : 0, + easing: this.config.scrollEase, + }; + + // Rewrite the bottom offset as a top offset. + if (options.bottom != null) { + (options as _Without<_Bottom> & _Top).top = this._el.scrollHeight - this._el.clientHeight - options.bottom; + } + + // Rewrite the right offset as a left offset. + if (isRtl && rtlScrollAxisType !== RtlScrollAxisType.NORMAL) { + if (options.left != null) { + (options as _Without<_Left> & _Right).right = this._el.scrollWidth - this._el.clientWidth - options.left; } - // Rewrite the right offset as a left offset. - if (isRtl && rtlScrollAxisType !== RtlScrollAxisType.NORMAL) { - if (options.left != null) { - (options as _Without<_Left> & _Right).right = this._el.scrollWidth - this._el.clientWidth - options.left; - } - - if (rtlScrollAxisType === RtlScrollAxisType.INVERTED) { - options.left = options.right; - } else if (rtlScrollAxisType === RtlScrollAxisType.NEGATED) { - options.left = options.right ? -options.right : options.right; - } - } else { - if (options.right != null) { - (options as _Without<_Right> & _Left).left = this._el.scrollWidth - this._el.clientWidth - options.right; - } + if (rtlScrollAxisType === RtlScrollAxisType.INVERTED) { + options.left = options.right; + } else if (rtlScrollAxisType === RtlScrollAxisType.NEGATED) { + options.left = options.right ? -options.right : options.right; + } + } else { + if (options.right != null) { + (options as _Without<_Right> & _Left).left = this._el.scrollWidth - this._el.clientWidth - options.right; } - return this._applyScrollToOptions(options); } + return this._applyScrollToOptions(options); } } diff --git a/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts b/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts index b888fb34..2d8dc9ab 100644 --- a/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts +++ b/projects/ng-gallery/src/lib/smooth-scroll/smooth-scroll.model.ts @@ -1,14 +1,13 @@ -import { InjectionToken } from '@angular/core'; import { _XAxis, _YAxis } from '@angular/cdk/scrolling'; -export const SMOOTH_SCROLL_OPTIONS: InjectionToken = new InjectionToken('SMOOTH_SCROLL_OPTIONS'); - -export type SmoothScrollToOptions = _XAxis & _YAxis & SmoothScrollOptions; +export type SmoothScrollOptions = _XAxis & _YAxis & { + behavior?: ScrollBehavior; +} -export interface SmoothScrollOptions { +export type SmoothScrollToOptions = _XAxis & _YAxis & { duration?: number; easing?: BezierEasingOptions; -} +}; export interface SmoothScrollStep { scrollable: HTMLElement; diff --git a/projects/ng-gallery/src/lib/styles/core.scss b/projects/ng-gallery/src/lib/styles/core.scss deleted file mode 100644 index 0dcad846..00000000 --- a/projects/ng-gallery/src/lib/styles/core.scss +++ /dev/null @@ -1,163 +0,0 @@ -::ng-deep { - gallery { - position: relative; - z-index: 1; - overflow: hidden; - display: flex; - justify-content: center; - align-items: center; - background-color: black; - --g-height-transition: height 400ms linear; - --g-nav-drop-shadow: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); - --g-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6); - --g-font-color: #000; - --g-overlay-color: #fff; - - * { - box-sizing: border-box; - } - } - - gallery, - gallery-core { - position: relative; - overflow: hidden; - } - - gallery-core { - max-height: 100%; - min-height: 100%; - height: 500px; - } - - gallery-core, - .g-box, - .g-slider { - display: flex; - width: 100%; - max-height: 100%; - } - - .g-box, - gallery-slider { - overflow: hidden; - position: relative; - display: flex; - flex-direction: column; - order: 1; - flex: 1; - } - - gallery-core[autoHeight='true'] { - &[thumbPosition='top'], - &[thumbPosition='bottom'] { - // if auto-height, use fit-content - height: fit-content !important; - - .g-slider { - height: 100%; - } - - gallery-slider, gallery-core { - height: 100%; - } - } - - gallery-item { - min-height: 100%; - } - } - - - gallery-core[autoHeight='true'] { - &[slidingDirection='horizontal'] { - gallery-item { - //height: 100%; - height: unset; - max-height: unset; - min-height: unset; - - gallery-image { - height: 100%; - width: auto; - } - } - } - - &[slidingDirection='vertical'] { - gallery-item { - // Allow getting the real image height - height: unset; - max-height: unset; - min-height: unset; - - gallery-image { - width: 100%; - height: auto; - } - } - } - } - - gallery-core[autoHeight='false'] { - &[slidingDirection='horizontal'] { - gallery-item, .g-slider { - height: 100%; - } - } - } - - gallery-core[itemAutoSize='true'] { - &[slidingDirection='horizontal'] { - gallery-item { - gallery-image { - height: 100%; - width: auto; - } - } - } - - &[slidingDirection='vertical'] { - gallery-item { - // Allow getting the real image height - height: auto; - - gallery-image { - width: 100%; - height: auto; - } - } - } - } - - gallery-core[debug='true'] { - gallery-slider { - &:after, &:before { - position: absolute; - content: ''; - background: lime; - box-shadow: 0 0 5px lime; - z-index: 99999; - } - - &:before { - width: 100%; - height: 1px; - } - - &:after { - height: 100%; - width: 1px; - } - - gallery-item { - outline: 1px solid darkorange; - } - } - } - - .g-box-template { - position: absolute; - z-index: 10; - } -} diff --git a/projects/ng-gallery/src/lib/styles/counter.scss b/projects/ng-gallery/src/lib/styles/counter.scss deleted file mode 100644 index 2fce938e..00000000 --- a/projects/ng-gallery/src/lib/styles/counter.scss +++ /dev/null @@ -1,33 +0,0 @@ -::ng-deep { - gallery-core[counterPosition='top'] .g-counter { - top: 0; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - } - - gallery-core[counterPosition='bottom'] .g-counter { - bottom: 0; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } - - .g-counter { - font-weight: bold; - user-select: none; - opacity: 0.6; - transition: opacity linear 150ms; - z-index: 50; - position: absolute; - left: 50%; - transform: translateX(-50%) perspective(1px); - font-size: 12px; - padding: 4px 10px; - color: var(--g-font-color); - background-color: var(--g-overlay-color); - box-shadow: var(--g-box-shadow); - - &:hover { - opacity: 0.8; - } - } -} diff --git a/projects/ng-gallery/src/lib/styles/debug.scss b/projects/ng-gallery/src/lib/styles/debug.scss new file mode 100644 index 00000000..6d60c5fa --- /dev/null +++ b/projects/ng-gallery/src/lib/styles/debug.scss @@ -0,0 +1,128 @@ +:host[debug='true'] { + ::ng-deep { + .g-sliding, .g-resizing, .g-scrolling { + gallery-item.g-item-highlight { + visibility: hidden; + } + } + } + + ::ng-deep { + gallery-slider { + &:after, &:before { + position: absolute; + content: ''; + z-index: 12; + } + + &:before { + width: 100%; + height: 0; + border-top: 1px dashed lime; + } + + &:after { + height: 100%; + width: 0; + border-left: 1px dashed lime; + } + + gallery-item { + outline: 1px solid darkorange; + + &.g-item-highlight { + &:after { + content: ''; + position: absolute; + width: 100%; + height: 100%; + border: 3px solid lime; + box-sizing: border-box; + z-index: 10; + } + } + } + } + + .g-sliding { + .g-slider-sliding { + display: block; + } + } + + .g-scrolling { + .g-slider-scrolling { + display: block; + } + } + + .g-resizing { + .g-slider-resizing { + display: block; + } + } + + .g-slider-debug { + position: absolute; + top: 0; + left: 0; + display: flex; + gap: 5px; + padding: 10px; + + .g-slider-resizing { + background: rgba(245, 76, 40); + } + + .g-slider-scrolling { + background: rgb(255, 133, 36); + } + + .g-slider-sliding { + background: rgb(31, 108, 185); + } + + div, &:before { + display: none; + color: white; + font-family: monospace; + z-index: 12; + padding: 2px 6px; + border-radius: 3px; + } + } + } + + &[itemAutoSize='false'] { + ::ng-deep { + .g-slider-debug { + &:before { + content: var(--intersection-margin); + background: rgba(236, 236, 236, 0.84); + color: #363636; + display: block; + } + } + } + } + + &[itemAutoSize='true'] { + ::ng-deep { + gallery-item { + &:before { + position: absolute; + margin: 10px; + content: var(--item-intersection-margin); + background: rgba(236, 236, 236, 0.84); + color: #363636; + display: block; + width: 270px; + font-family: monospace; + z-index: 12; + padding: 2px 6px; + border-radius: 3px; + } + } + } + } +} diff --git a/projects/ng-gallery/src/lib/styles/dots.scss b/projects/ng-gallery/src/lib/styles/dots.scss deleted file mode 100644 index 8ee49fc5..00000000 --- a/projects/ng-gallery/src/lib/styles/dots.scss +++ /dev/null @@ -1,48 +0,0 @@ -::ng-deep { - gallery-core[dotsPosition='top'] gallery-dots { - top: 15px; - } - - gallery-core[dotsPosition='bottom'] gallery-dots { - bottom: 15px; - } - - gallery-dots { - position: absolute; - left: 50%; - z-index: 99; - transform: translateX(-50%); - display: flex; - gap: 6px; - } - - .g-dot { - cursor: pointer; - z-index: 20; - - &:hover .g-dot-inner { - opacity: 1; - } - } - - .g-dot-active .g-dot-inner { - opacity: 1; - } - - .g-dot-inner { - background-color: var(--g-overlay-color); - opacity: 0.4; - width: 100%; - height: 100%; - border-radius: 50%; - transition: opacity linear 150ms; - } - - gallery-dots, - .g-dot, - .g-dot-inner { - display: flex; - justify-content: center; - align-items: center; - } -} diff --git a/projects/ng-gallery/src/lib/styles/gallery.scss b/projects/ng-gallery/src/lib/styles/gallery.scss deleted file mode 100644 index b70e6c70..00000000 --- a/projects/ng-gallery/src/lib/styles/gallery.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import 'dots'; -@import 'navigations'; -@import 'slider'; -@import 'thumbnails'; -@import 'counter'; -@import 'templates'; -@import 'core'; diff --git a/projects/ng-gallery/src/lib/styles/navigations.scss b/projects/ng-gallery/src/lib/styles/navigations.scss deleted file mode 100644 index dd5a1ba8..00000000 --- a/projects/ng-gallery/src/lib/styles/navigations.scss +++ /dev/null @@ -1,52 +0,0 @@ -::ng-deep { - .g-nav-next, - .g-nav-prev { - position: absolute; - top: 50%; - display: flex; - padding: 16px 8px; - cursor: pointer; - z-index: 999; - opacity: 0.6; - transition: opacity linear 150ms, right linear 150ms, left linear 150ms; - - &:hover { - opacity: 1; - } - - svg { - filter: var(--g-nav-drop-shadow); - width: 28px; - height: 28px; - fill: #fff; - } - } - - .g-nav-next { - right: 0.5em; - transform: translateY(-50%) perspective(1px); - - &:hover { - right: 0.4em; - } - } - - .g-nav-prev { - left: 0.5em; - transform: translateY(-50%) perspective(1px) scale(-1, -1); //invert icon horizontally - - &:hover { - left: 0.4em; - } - } - - @media only screen and (max-width: 480px) { - .g-nav-next { - right: 0.2em; - } - - .g-nav-prev { - left: 0.2em; - } - } -} diff --git a/projects/ng-gallery/src/lib/styles/slider.scss b/projects/ng-gallery/src/lib/styles/slider.scss deleted file mode 100644 index 9d20e439..00000000 --- a/projects/ng-gallery/src/lib/styles/slider.scss +++ /dev/null @@ -1,104 +0,0 @@ -::ng-deep { - gallery-slider { - position: relative; - display: flex; - align-items: center; - justify-content: center; - - .g-slider[centralised="true"] { - &:before, &:after { - content: ''; - } - - &:before { - flex: 0 0 var(--slider-centralize-start-size); - } - - &:after { - flex: 0 0 var(--slider-centralize-end-size); - } - } - } - - .g-slider-content { - flex: 0 0 auto; - display: flex; - align-items: center; - gap: 1px; - } - - gallery-core[slidingDirection='horizontal'] { - gallery-slider { - .g-slider { - overflow-x: auto; - overflow-y: hidden; - scroll-snap-type: x mandatory; - flex-direction: row; - } - - .g-slider-content { - flex-direction: row; - height: 100%; - } - } - } - - gallery-core[slidingDirection='vertical'] { - gallery-slider { - .g-slider { - overflow-x: hidden; - overflow-y: auto; - scroll-snap-type: y mandatory; - flex-direction: column; - } - - .g-slider-content { - flex-direction: column; - width: 100%; - } - } - } - - /** Disable sliding */ - gallery-core[slidingDisabled='true'] { - .g-slider { - overflow: hidden !important; - } - } - - .g-slider { - display: flex; - align-items: center; - width: 100%; - transition: var(--g-height-transition); - - scrollbar-width: none; /* Firefox 64 */ - -ms-overflow-style: none; /* Internet Explorer 11 */ - &::-webkit-scrollbar { /** WebKit */ - display: none; - } - - // Disable mouse click on gallery items/thumbnails when the slider is being dragged using the mouse - &.g-sliding, &.g-scrolling { - .g-slider-content { - pointer-events: none; - } - } - - gallery-thumb, - gallery-item { - display: flex; - flex-direction: column; - flex: 0 0 auto; - scroll-snap-align: center; - // Disable highlighting the elements on mouse move or click - user-select: none; - -webkit-user-drag: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - - gallery-image[imageState='success'] { - align-self: center; - } - } - } -} diff --git a/projects/ng-gallery/src/lib/styles/templates.scss b/projects/ng-gallery/src/lib/styles/templates.scss deleted file mode 100644 index 7f4fc208..00000000 --- a/projects/ng-gallery/src/lib/styles/templates.scss +++ /dev/null @@ -1,149 +0,0 @@ -::ng-deep { - gallery[gallerize] { - gallery-item { - cursor: pointer; - } - } - - gallery-core { - gap: 1px; - } - - gallery-image { - img { - width: 100% !important; - } - } - - .gallery-image-error, - .gallery-thumb-error { - - svg { - width: 100%; - height: 100%; - } - } - - .gallery-thumb-error { - width: 40px; - height: 40px; - } - - .gallery-image-error { - width: 100px; - height: 100px; - } - - gallery-item, gallery-thumb { - position: relative; - display: block; - overflow: hidden; - - h2, h4 { - color: coral; - margin: 0; - } - - h2 { - font-size: 3.5em; - margin-bottom: 0.3em; - } - - h4 { - font-size: 1.6em; - } - - gallery-image { - transition: opacity 300ms cubic-bezier(0.5, 0, 0.5, 1); - } - } - - gallery-item { - --g-item-width: 'auto'; - --g-item-height: 100%; - height: var(--g-item-height); - width: var(--g-item-width); - max-height: var(--g-item-height); - max-width: 100%; - z-index: 10; - - gallery-image { - width: 100%; - height: 100%; - } - - &.g-active-item { - gallery-image { - opacity: 1; - } - } - - video, iframe { - position: absolute; - width: 100%; - height: 100%; - } - } - - gallery-thumb { - align-self: center; - cursor: pointer; - max-height: 100%; - - gallery-image { - opacity: 0.5; - } - - &.g-active-thumb { - gallery-image { - opacity: 1; - } - } - } - - gallery-image { - min-height: 100%; - display: flex; - } - - .g-image-item { - pointer-events: none; - max-height: 100%; - max-width: 100%; - } - - .g-template, .g-image-error-message { - position: absolute; - z-index: 10; - left: 0; - top: 0; - right: 0; - bottom: 0; - color: white; - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - } - - .g-loading { - position: absolute; - transform: translate3d(-50%, -50%, 0); - left: 50%; - top: 50%; - width: 80px; - height: 80px; - } - - gallery-core[imageSize='contain'] gallery-item .g-image-item { - object-fit: contain; - } - - gallery-core[imageSize='cover'] gallery-item .g-image-item { - object-fit: cover; - } - - gallery-core[thumbImageSize='cover'] gallery-thumb .g-image-item { - object-fit: cover; - } -} diff --git a/projects/ng-gallery/src/lib/styles/thumbnails.scss b/projects/ng-gallery/src/lib/styles/thumbnails.scss deleted file mode 100644 index 8d32e747..00000000 --- a/projects/ng-gallery/src/lib/styles/thumbnails.scss +++ /dev/null @@ -1,148 +0,0 @@ -::ng-deep { - gallery-thumbs { - max-height: 100%; - max-width: 100%; - display: block; - z-index: 100; - - .g-slider[centralised="true"] { - &:before, &:after { - content: ''; - } - - &:before { - flex: 0 0 var(--thumb-centralize-start-size); - } - - &:after { - flex: 0 0 var(--thumb-centralize-end-size); - } - } - - .g-slider gallery-thumb { - background: black; - height: var(--thumb-height); - width: var(--thumb-width); - max-height: var(--thumb-height); - max-width: var(--thumb-width); - - gallery-image, img { - width: 100%; - height: 100%; - } - } - } - - gallery-core[disableThumb='true'] { - gallery-thumb { - cursor: default; - } - } - - gallery-core[thumbPosition='top'], - gallery-core[thumbPosition='bottom'] { - gallery-thumbs { - .g-slider { - top: 0; - overflow-x: auto; - flex-direction: row; - } - - .g-slider-content { - flex-direction: row; - } - } - - &[thumbAutosize="true"] { - gallery-thumb { - width: initial; - max-width: unset; - } - } - } - - gallery-core[thumbPosition='left'], - gallery-core[thumbPosition='right'] { - gallery-thumbs { - .g-slider { - left: 0; - overflow-y: auto; - flex-direction: column; - } - - .g-slider-content { - flex-direction: column; - } - } - - &[thumbAutosize="true"] { - gallery-thumb { - height: initial; - max-height: unset; - } - } - } - - /** Disable sliding */ - gallery-core[thumbSlidingDisabled='true'] { - gallery-thumbs .g-slider { - overflow: hidden !important; - } - } - - gallery-core[thumbPosition='top'] { - flex-direction: column; - } - - gallery-core[thumbPosition='left'] { - flex-direction: row; - } - - gallery-core[thumbPosition='right'] { - flex-direction: row-reverse; - } - - gallery-core[thumbPosition='bottom'] { - flex-direction: column-reverse; - } - - $loading-color: #fff !default; - $placeholder-ng: #262626 !default; - - gallery-thumb.g-active-thumb { - .g-thumb-loading { - background-color: #464646; - } - } - - .g-thumb-loading { - position: relative; - overflow: hidden; - width: 100%; - height: 100%; - background-color: $placeholder-ng; - - &::before { - content: ""; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 50%; - z-index: 1; - width: 500%; - margin-left: -250%; - animation: phAnimation .8s linear infinite; - background: linear-gradient(to right, rgba($loading-color, 0) 46%, rgba($loading-color, .35) 50%, rgba($loading-color, 0) 54%) 50% 50%; - } - } - - @keyframes phAnimation { - 0% { - transform: translate3d(-30%, 0, 0); - } - 100% { - transform: translate3d(30%, 0, 0); - } - } -} diff --git a/projects/ng-gallery/src/lib/utils/gallery.default.ts b/projects/ng-gallery/src/lib/utils/gallery.default.ts index d3e01d20..20f40b73 100644 --- a/projects/ng-gallery/src/lib/utils/gallery.default.ts +++ b/projects/ng-gallery/src/lib/utils/gallery.default.ts @@ -2,11 +2,10 @@ import { ImageSize, GalleryAction, LoadingStrategy, - SlidingDirection, + Orientation, ThumbnailsPosition, - DotsPosition, + BulletsPosition, CounterPosition, - ThumbnailsView, LoadingAttr } from '../models/constants'; import { GalleryState } from '../models/gallery.model'; @@ -24,43 +23,43 @@ export const defaultState: GalleryState = { export const defaultConfig: GalleryConfig = { nav: true, - loop: true, - dots: false, - thumb: true, + loop: false, + bullets: false, + thumbs: false, debug: false, - dotsSize: 6, - counter: true, - autoPlay: false, + bulletSize: 6, + counter: false, + autoplay: false, thumbWidth: 120, thumbHeight: 90, - disableThumb: false, - slidingDisabled: false, - thumbSlidingDisabled: false, - mouseSlidingDisabled: false, - thumbMouseSlidingDisabled: false, - playerInterval: 3000, - slidingDuration: 468, - slidingEase: { + disableBullets: false, + disableThumbs: false, + disableScroll: false, + disableThumbScroll: false, + disableMouseScroll: false, + disableThumbMouseScroll: false, + autoplayInterval: 3000, + scrollDuration: 468, + scrollEase: { x1: 0.42, y1: 0, x2: 0.58, y2: 1 }, + thumbCentralized: false, thumbAutosize: false, itemAutosize: false, autoHeight: false, scrollBehavior: 'smooth', - navScrollBehavior: 'smooth', - resizeDebounceTime: 50, + resizeDebounceTime: 0, loadingAttr: LoadingAttr.Lazy, imageSize: ImageSize.Contain, thumbImageSize: ImageSize.Cover, - thumbView: ThumbnailsView.Default, - dotsPosition: DotsPosition.Bottom, + bulletPosition: BulletsPosition.Bottom, counterPosition: CounterPosition.Top, thumbPosition: ThumbnailsPosition.Bottom, loadingStrategy: LoadingStrategy.Preload, - slidingDirection: SlidingDirection.Horizontal, + orientation: Orientation.Horizontal, navIcon: ``, // navIcon: ``, loadingIcon: `` diff --git a/projects/ng-gallery/src/lib/utils/img-manager.ts b/projects/ng-gallery/src/lib/utils/img-manager.ts new file mode 100644 index 00000000..78caaff3 --- /dev/null +++ b/projects/ng-gallery/src/lib/utils/img-manager.ts @@ -0,0 +1,46 @@ +import { Injectable } from '@angular/core'; +import { Observable, BehaviorSubject, filter, map, switchMap, EMPTY } from 'rxjs'; +import { GalleryState } from '../models/gallery.model'; +import { ItemState } from '../components/templates/items.model'; + +interface ImageRegistry { + state: Observable; + target: HTMLImageElement; +} + +@Injectable() +export class ImgManager { + + private readonly trigger$: BehaviorSubject = new BehaviorSubject(null); + + private readonly images: Map = new Map(); + + getActiveItem(state$: Observable): Observable { + return this.trigger$.pipe( + switchMap(() => state$.pipe( + switchMap((state: GalleryState) => { + const img: ImageRegistry = this.images.get(state.currIndex); + if (img) { + return img.state.pipe( + filter((state: ItemState) => state !== 'loading'), + map(() => img.target) + ) + } + return EMPTY; + }) + )) + ); + } + + addItem(index: number, payload: ImageRegistry): void { + this.images.set(index, payload); + this.trigger$.next(); + } + + deleteItem(index: number): void { + if (this.images.has(index)) { + this.images.delete(index); + this.trigger$.next(); + } + } +} diff --git a/projects/ng-gallery/src/lib/utils/img-recognizer.ts b/projects/ng-gallery/src/lib/utils/img-recognizer.ts new file mode 100644 index 00000000..348f752e --- /dev/null +++ b/projects/ng-gallery/src/lib/utils/img-recognizer.ts @@ -0,0 +1,42 @@ +import { Directive, Input, HostListener, OnInit, OnDestroy, ElementRef } from '@angular/core'; +import { ImgManager } from './img-manager'; +import { GalleryItemComponent } from '../components/gallery-item.component'; + +@Directive({ + selector: 'img[galleryImage]', + standalone: true +}) +export class ImgRecognizer implements OnInit, OnDestroy { + + @Input('galleryImage') index: number; + + @HostListener('load', ['$event']) + onLoad() { + this.item.state$.next('success'); + } + + @HostListener('error', ['$event']) + onError() { + this.item.state$.next('failed'); + } + + constructor(private el: ElementRef, private manager: ImgManager, private item: GalleryItemComponent) { + if (item) { + // Mark the gallery-item component as an image item + item.isItemContainImage = true; + } else { + throw new Error('[NgGallery]: galleryImage directive should be only used inside gallery item templates!') + } + } + + ngOnInit(): void { + this.manager.addItem(this.index, { + state: this.item.state$.asObservable(), + target: this.el.nativeElement + }); + } + + ngOnDestroy(): void { + this.manager.deleteItem(this.index); + } +} diff --git a/projects/ng-gallery/src/lib/utils/resize-observer.ts b/projects/ng-gallery/src/lib/utils/resize-observer.ts index b7fa77d8..5a319c76 100644 --- a/projects/ng-gallery/src/lib/utils/resize-observer.ts +++ b/projects/ng-gallery/src/lib/utils/resize-observer.ts @@ -1,9 +1,15 @@ -import { Observable, Subscriber } from 'rxjs'; +import { Observable, Subscriber, mergeMap } from 'rxjs'; -export function resizeObservable(el: HTMLElement): Observable { +export function resizeObservable(el: HTMLElement, setter?: (ref: ResizeObserver) => void): Observable { return new Observable((subscriber: Subscriber) => { - const resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => subscriber.next(entries)); + const resizeObserver: ResizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => subscriber.next(entries)); resizeObserver.observe(el); + if (setter) { + setter(resizeObserver); + } return () => resizeObserver.disconnect(); - }); + }).pipe( + mergeMap((entries: ResizeObserverEntry[]) => entries) + ); } + diff --git a/projects/ng-gallery/src/stories/.eslintrc.json b/projects/ng-gallery/src/stories/.eslintrc.json new file mode 100644 index 00000000..57c1b324 --- /dev/null +++ b/projects/ng-gallery/src/stories/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/consistent-type-imports": ["error", { "disallowTypeAnnotations": false }] + } +} diff --git a/projects/ng-gallery/src/stories/GettingStarted.mdx b/projects/ng-gallery/src/stories/GettingStarted.mdx new file mode 100644 index 00000000..d15a1923 --- /dev/null +++ b/projects/ng-gallery/src/stories/GettingStarted.mdx @@ -0,0 +1,114 @@ +
                                                                                                                                  + Gallery Logo +

                                                                                                                                  Angular Gallery

                                                                                                                                  +
                                                                                                                                  + + +# Getting Started + +This library consists of 2 packages: + +- **ng-gallery:** This package includes a `` component and a gallery service. +- **ng-gallery/lightbox:** Within this package, you'll find a lightbox service and a `[lightbox]` directive, designed to facilitate the opening of the gallery within a modal window. +Additionally, this package offers a `[gallerize]` directive, which seamlessly integrates the images into the lightbox. + +## Installation + +The package can be installed alongside the `@angular/cdk` dependency using NPM. To do this, run the following command in your terminal: + +```bash +npm i ng-gallery @angular/cdk +``` + +## Usage + +The `GalleryModule` can be imported either globally in your application configuration or directly in your component imports. +It's important to note that importing the `provideAnimations` animation is required for the proper functioning of the gallery component. +Below is an example of setting up your Angular application: + +```ts +import { ApplicationConfig, importProvidersFrom } from '@angular/core'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { GalleryModule } from 'ng-gallery'; + +export const appConfig: ApplicationConfig = { + providers: [ + provideAnimations(), + importProvidersFrom(GalleryModule) + ] +}; +``` + +### Provide default options + +`DEFAULT_GALLERY_CONFIG` Injection token that can be used to provide the default options for the gallery. + +**Example** + + +```ts +import { ApplicationConfig } from '@angular/core'; +import { DEFAULT_GALLERY_CONFIG, GalleryConfig } from 'ng-gallery'; + +export const appConfig: ApplicationConfig = { + providers: [ + { + provide: DEFAULT_GALLERY_CONFIG, + useValue: { + imageSize: 'cover' + } as GalleryConfig + } + ] +}; +``` + +## Mouse Sliding (optional) + +The gallery relies on HammerJS to support dragging the slider using the mouse, if you don't want this feature you can skip installing HammerJS. + +*You can add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerjs), a CDN (such as the [Google CDN](https://developers.google.com/speed/libraries/#hammerjs)), or served directly from your app.* + +To install via npm, use the following command: + +**NPM** + +```bash +npm i hammerjs +``` + +After installing, import it in `main.ts` + +```ts +import 'hammerjs'; +``` + + +## Issues + +If you identify any errors in this module or have an idea for an improvement, please open an [issue](https://github.com/MurhafSousli/ngx-gallery/issues). + + + + diff --git a/projects/ng-gallery/src/stories/LoadItems.mdx b/projects/ng-gallery/src/stories/LoadItems.mdx new file mode 100644 index 00000000..0cd6438a --- /dev/null +++ b/projects/ng-gallery/src/stories/LoadItems.mdx @@ -0,0 +1,192 @@ +# Usage + +There are several ways for configuring gallery items. Here are some examples: + +## Basic Example with Template Binding + +The most straightforward way to load items into the gallery is by using an array of type `GalleryItem[]` and applying the template binding. + +```ts +import { Component, OnInit } from '@angular/core'; +import { GalleryModule, GalleryItem, ImageItem, VideoItem, YoutubeItem, IframeItem } from 'ng-gallery'; + +@Component({ + template: ` + + `, + standalone: true, + imports: [GalleryModule] +}) +export class AppComponent implements OnInit { + + images: GalleryItem[]; + + ngOnInit() { + // Set items array + this.images = [ + new ImageItem({ + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new VideoItem({ + src: 'VIDEO_URL', + poster: 'VIDEO_POSTER_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new YoutubeItem({ + src: 'VIDEO_ID' + }), + new IframeItem({ + src: 'IFRAME_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }) + ]; + } +} +``` + +## Accessing via Component Reference + +Alternatively, you can access the gallery by referencing the `GalleryComponent`. +To do this, acquire the component reference using `@ViewChild(GalleryComponent)` and then add items accordingly. + +```ts +import { Component, ViewChild } from '@angular/core'; +import { GalleryModule, GalleryComponent, ImageItem, VideoItem, YoutubeItem, IframeItem } from 'ng-gallery'; + +@Component({ + template: ` + + `, + standalone: true, + imports: [GalleryModule] +}) +export class AppComponent { + + @ViewChild(GalleryComponent) myGallery: GalleryComponent; + + // Add items individually + addItemIndividually() { + this.myGallery.addImage({ + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + + this.myGallery.addVideo({ + src: 'VIDEO_URL', + poster: 'VIDEO_POSTER_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + + this.myGallery.addYoutube({ + src: 'VIDEO_ID' + }); + + this.myGallery.addIframe({ + src: 'IFRAME_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + } + + // Load a new set of items + loadItems() { + const items: GalleryItem[] = [ + new ImageItem({ + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new VideoItem({ + src: 'VIDEO_URL', + poster: 'VIDEO_POSTER_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new YoutubeItem({ + src: 'VIDEO_ID' + }), + new IframeItem({ + src: 'IFRAME_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }) + ] + + this.myGallery.load(items); + } +} +``` + +## Accessing via `Gallery` Service + +To access the gallery from any location within your application, utilize the `Gallery` service to obtain the `GalleryRef` by its unique identifier. + +```ts +import { Component, OnInit } from '@angular/core'; +import { GalleryModule, Gallery, GalleryRef, GalleryItem, ImageItem, VideoItem, YoutubeItem, IframeItem } from 'ng-gallery'; + +@Component({ + template: ` + + `, + standalone: true, + imports: [GalleryModule] +}) +export class AppComponent implements OnInit { + + galleryRef: GalleryRef; + + constructor(private gallery: Gallery) { + } + + ngOnInit() { + // Get the galleryRef by id + this.galleryRef = this.gallery.ref('myGallery'); + } + + // Add items individually + addItemIndividually() { + this.galleryRef.addImage({ + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + + this.galleryRef.addVideo({ + src: 'VIDEO_URL', + poster: 'VIDEO_POSTER_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + + this.galleryRef.addYoutube({ + src: 'VIDEO_ID' + }); + + this.galleryRef.addIframe({ + src: 'IFRAME_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }); + } + + // Load a new set of items + loadItems() { + const items: GalleryItem[] = [ + new ImageItem({ + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new VideoItem({ + src: 'VIDEO_URL', + poster: 'VIDEO_POSTER_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }), + new YoutubeItem({ + src: 'VIDEO_ID' + }), + new IframeItem({ + src: 'IFRAME_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + }) + ] + this.galleryRef.load(items); + } +} +``` + +These methods provide flexibility in setting up and configuring the gallery in your application. diff --git a/projects/ng-gallery/src/stories/Responsiveness.mdx b/projects/ng-gallery/src/stories/Responsiveness.mdx new file mode 100644 index 00000000..a113dac0 --- /dev/null +++ b/projects/ng-gallery/src/stories/Responsiveness.mdx @@ -0,0 +1,54 @@ +# Responsiveness + +To modify the gallery configuration for smaller screens, including adjustments to thumbnail positioning and size, +[Angular CDK](https://material.angular.io/cdk/layout/overview) provides an effective solution. + + +**Example** + +```ts +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout'; +import { GalleryModule, GalleryConfig, ThumbnailPosition } from 'ng-gallery'; +import { Observable, map } from 'rxjs'; + +@Component({ + selector: 'gallery-example', + template: ` + + `, + standalone: true, + imports: [GalleryModule, CommonModule] +}) +class MyComponent { + + galleryConfig$: Observable; + + constructor(breakpointObserver: BreakpointObserver) { + + this.galleryConfig$ = breakpointObserver.observe([ + Breakpoints.HandsetPortrait + ]).pipe( + map(res => { + if (res.matches) { + return { + thumbPosition: ThumbnailPosition.Top, + thumbWidth: 80, + thumbHeight: 80 + }; + } + return { + thumbPosition: ThumbnailPosition.Left, + thumbWidth: 120, + thumbHeight: 90 + }; + }) + ); + } +} +``` diff --git a/projects/ng-gallery/src/stories/basic/Bullets.mdx b/projects/ng-gallery/src/stories/basic/Bullets.mdx new file mode 100644 index 00000000..811f5f5f --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Bullets.mdx @@ -0,0 +1,43 @@ +import { Meta, Canvas } from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Gallery Bullets + +The bullets offer a straightforward way to navigate in the gallery. + + + +## Bullets position + +There are 2 positioning choices are available for bullets: `top` and `bottom`. + +**Example** + +```html + +``` + + +## Customizing bullet Size + +To change bullets size, use the `bulletSize` input + + +## Disabling bullet Clicks + +To prevent navigating to new items by clicking on bullets, use the following attribute: + +```html + +``` + + + +## List of options related to gallery bullets + +- bullets +- bulletSize +- bulletPosition +- disableBullets diff --git a/projects/ng-gallery/src/stories/basic/Counter.mdx b/projects/ng-gallery/src/stories/basic/Counter.mdx new file mode 100644 index 00000000..8e4e4ee9 --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Counter.mdx @@ -0,0 +1,29 @@ +import { Meta, Canvas } from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Gallery Counter + +Indicates the number of the active value and the total amount of items in the gallery. + + + + + +## Counter position + +There are 2 choices for positioning the counter, `top` and `bottom`. + +**Example** + +```html + +``` + + + +## List of options related to gallery counter + +- counter +- counterPosition diff --git a/projects/ng-gallery/src/stories/basic/Gallery.stories.ts b/projects/ng-gallery/src/stories/basic/Gallery.stories.ts new file mode 100644 index 00000000..ee2569e9 --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Gallery.stories.ts @@ -0,0 +1,470 @@ +import type { Meta, StoryObj } from '@storybook/angular'; +import { applicationConfig } from '@storybook/angular'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { + CounterPosition, + BulletsPosition, + GalleryComponent, + ImageSize, + LoadingAttr, + LoadingStrategy, + Orientation, + ThumbnailsPosition +} from 'ng-gallery'; +import { getHDImages } from '../pixabay/pixabay.service'; + +import 'hammerjs'; + + +const meta: Meta = { + title: 'Documentations/Gallery', + component: GalleryComponent, + tags: ['autodocs'], + render: (args: GalleryComponent) => ({ + props: { + ...args, + }, + }), + decorators: [ + applicationConfig({ + providers: [provideAnimations()] + }) + ], + args: { + id: 'root', + scrollBehavior: 'smooth', + imageSize: ImageSize.Contain, + thumbImageSize: ImageSize.Cover, + bulletPosition: BulletsPosition.Bottom, + counterPosition: CounterPosition.Top, + orientation: Orientation.Horizontal, + loadingAttr: LoadingAttr.Lazy, + loadingStrategy: LoadingStrategy.Default, + thumbPosition: ThumbnailsPosition.Bottom, + scrollEase: { + x1: 0.42, + y1: 0, + x2: 0.58, + y2: 1 + }, + bulletSize: 6, + thumbWidth: 120, + thumbHeight: 90, + autoplayInterval: 3000, + scrollDuration: 468, + resizeDebounceTime: 0, + nav: true, + bullets: true, + disableBullets: false, + loop: true, + debug: false, + thumbs: true, + counter: true, + autoplay: false, + autoHeight: false, + itemAutosize: false, + disableThumbs: false, + detachThumbs: false, + thumbAutosize: false, + disableScroll: false, + thumbCentralized: false, + disableThumbScroll: false, + disableMouseScroll: false, + disableThumbMouseScroll: false, + }, + // Disables the long useless control description + argTypes: { + scrollBehavior: { + control: 'radio', + options: ['smooth', 'auto'], + table: { + defaultValue: { summary: 'smooth' } + } + }, + imageSize: { + table: { + defaultValue: { summary: 'contain' } + } + }, + thumbImageSize: { + table: { + defaultValue: { summary: 'cover' } + } + }, + bulletPosition: { + table: { + defaultValue: { summary: 'bottom' } + } + }, + counterPosition: { + table: { + defaultValue: { summary: 'top' } + } + }, + orientation: { + table: { + defaultValue: { summary: 'horizontal' } + } + }, + loadingAttr: { + table: { + defaultValue: { summary: 'lazy' } + } + }, + loadingStrategy: { + table: { + defaultValue: { summary: 'default' } + } + }, + thumbPosition: { + table: { + defaultValue: { summary: 'bottom' } + } + }, + thumbCentralized: { + table: { + defaultValue: { summary: 'default' } + } + }, + scrollEase: { + table: { + defaultValue: { summary: '{ x1: 0.42, y1: 0, x2: 0.58, y2: 1 }' } + } + }, + nav: { + table: { + defaultValue: { summary: true } + } + }, + thumbs: { + table: { + defaultValue: { summary: true } + } + }, + loop: { + table: { + defaultValue: { summary: true } + } + }, + counter: { + table: { + defaultValue: { summary: true } + } + }, + bulletSize: { + table: { + defaultValue: { summary: 6 } + } + }, + thumbWidth: { + table: { + defaultValue: { summary: 120 } + } + }, + thumbHeight: { + table: { + defaultValue: { summary: 90 } + } + }, + autoplayInterval: { + table: { + defaultValue: { summary: 3000 } + } + }, + scrollDuration: { + table: { + defaultValue: { summary: 468 } + } + }, + resizeDebounceTime: { + table: { + defaultValue: { summary: 0 } + } + }, + error: { + control: false + }, + indexChange: { + control: false + }, + itemsChange: { + control: false + }, + itemClick: { + control: false + }, + thumbClick: { + control: false + }, + playingChange: { + control: false + }, + galleryRef: { + control: false + }, + load: { + control: false + }, + add: { + control: false + }, + addImage: { + control: false + }, + addVideo: { + control: false + }, + addIframe: { + control: false + }, + addYoutube: { + control: false + }, + remove: { + control: false + }, + next: { + control: false + }, + prev: { + control: false + }, + set: { + control: false + }, + reset: { + control: false + }, + play: { + control: false + }, + stop: { + control: false + } + } +}; + +export default meta; +type Story = StoryObj; + + +/** First Example for gallery */ +export const Lab: Story = { + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { + ...args, + items, + }, + template: ` + + `, + }), + loaders: [ + async () => ({ + items: await getHDImages('jet fighter') + }), + ] +}; + + +export const ThumbPositionExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('street') }), + ] +}; + + +export const ThumbAutosizeExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('roads') }), + ] +}; + +export const ThumbDetachedExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('flowers') }), + ] +}; + +export const ThumbViewExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('landscape') }), + ] +}; + + +export const AutoplayExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('airplane') }), + ] +}; + + +export const BulletExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('football') }), + ] +}; + +export const CounterExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('basketball') }), + ] +}; + +export const NavExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('lions') }), + ] +}; + +export const SliderExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('chips') }), + ] +}; + +export const SliderBehaviorExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('chips') }), + ] +}; + +export const NavWithLoopExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('tigers') }), + ] +}; + +export const SliderDirectionExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('tigers') }), + ] +}; + +export const ImageSizeExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('tigers') }), + ] +}; + +export const AutoHeightExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('tigers') }), + ] +}; + +export const ItemAutosizeExample: Story = { + parameters:{ controls:{ exclude:/.*/g } }, + render: (args: GalleryComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: `` + }), + loaders: [ + async () => ({ items: await getHDImages('ship') }), + ] +}; + diff --git a/projects/ng-gallery/src/stories/basic/Navigation.mdx b/projects/ng-gallery/src/stories/basic/Navigation.mdx new file mode 100644 index 00000000..15bea6dc --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Navigation.mdx @@ -0,0 +1,20 @@ +import { Meta, Canvas } from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Gallery Nav + +This feature provide navigation buttons designed to facilitate movement between next and previous items. + + + + +### Navigation loop + + + + +## List of options related to gallery nav + +- nav diff --git a/projects/ng-gallery/src/stories/basic/Player.mdx b/projects/ng-gallery/src/stories/basic/Player.mdx new file mode 100644 index 00000000..3ed8a0f8 --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Player.mdx @@ -0,0 +1,101 @@ +import { Meta, Canvas } from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Gallery Player + +This feature facilitates automatic cycling through items like a slideshow. + +## Using the component inputs + +To initiate the player, use the `autoplay` input. +You can specify the player's interval using the `autoplayInterval` input, which accepts a value in milliseconds. The default interval is set to 3000. + + + + +You can also toggle playing by binding the input to a boolean value, as the following example: + +```html + +``` + + +## Using `GalleryComponent` reference + +Obtain the gallery component reference using `ViewChild(GalleryComponent)`. This reference grants access to the component's functions. + + +**Example** + +```ts +import { Component, ViewChild } from '@angular/core'; +import { GalleryModule, GalleryComponent } from 'ng-gallery'; + +@Component({ + template: ` + + `, + standalone: true, + imports: [GalleryModule] +}) +export class AppComponent { + + @ViewChild(GalleryComponent) myGallery: GalleryComponent; + + play() { + this.myGallery.play(); + } + + stop() { + this.myGallery.stop(); + } +} +``` + +## Using `GalleryRef` reference + +Alternatively, you can access the `GalleryRef` by its identifier, providing a flexible means to start or stop the player from any part of your code. + + +**Example** + +```ts +import { Component, OnInit } from '@angular/core'; +import { GalleryModule, Gallery, GalleryRef } from 'ng-gallery'; + +@Component({ + template: ` + + `, + standalone: true, + imports: [GalleryModule] +}) +export class AppComponent implements OnInit { + + myGalleryRef: GalleryRef; + + constructor(private gallery: Gallery) { + } + + ngOnInit() { + this.myGalleryRef = this.gallery.ref('myGallery'); + } + + play() { + this.myGalleryRef.play(); + } + + stop() { + this.myGalleryRef.stop(); + } +} +``` + + + +## List of options related to gallery player + +- autoplay +- autoplayInterval diff --git a/projects/ng-gallery/src/stories/basic/Slider.mdx b/projects/ng-gallery/src/stories/basic/Slider.mdx new file mode 100644 index 00000000..d98c125c --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Slider.mdx @@ -0,0 +1,127 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Slider + +In this section, we'll cover the main options of the main slider which contains the items + + + + +The slider navigates through items using scrolling mechanism, it can be scrolled using the mouse wheel, touchpad on desktop or gestures on touch devices. + +### Slide using mouse drag + +The slider can be scrolled using mouse drag which requires hammerjs + +> Sliding using mouse drag is optional, the gallery doesn't depend on hammerjs +> This feature is turned on by default when hammerjs is loaded in the app. +> You can turn off this feature by adding `mouseSlidingDisabled` attribute. + +**Example** + +```html +`` +``` + + +### Orientation + +There are two choices for the gallery orientation `horizontal` and `vertical`, the default is `horizontal`. + +**Example of a vertical orientation** + + + + + + +### Loading strategy + +There are 3 choices for loading strategy of the main slider + +- `default` renders only the active item, the previous item and the next item +- `lazy`: renders only the active item +- `preload` renders all the items, this option is required for `thumbAutoSize` is enabled + +**Note** + +> `preload` should be chosen if `itemAutoSize` is turned on + + + + +### Image size + +By default, the image in item is contained in the slide, to make the image covers the slide +Sets the object-fit style applied on items' images + + + + + + +### Auto-height + +Automatically adjusts the gallery's height to fit the content + + + + + + + +### Scroll behavior + +There are two distinct navigation modes to choose from: + +- **Smooth:** When you opt for the `smooth` mode which is the default, the gallery will smoothly scroll to the desired item, +with the scrolling duration determined by the `slidingDuration`. +- **Auto:** If you select the `auto` mode, the gallery will instantaneously transition to the desired item without any intermediate scrolling. + +**Example** + + + + + + +### Autosize feature + +When Use `autosize` attribute is set, it allows each thumbnail to fit its content size. + + +**Example** + + + + +You can turn on this feature like ` + +- In `horizontal` slide direction, item's width will automatically fit its content width. +- In `vertical` slide direction, item's height will automatically fit its content height. + +> **Note** +> - Does not work when `autoHeight` is on +> - Does not work properly unless `loadingAttr="eager"` +> - Does not work properly unless `loadingStrategy="preload"` + + + + +## List of options related to gallery main slider + +- orientation +- scrollEase +- scrollBehavior +- disableScroll +- disableMouseScroll +- loadingStrategy +- imageSize +- debug +- resizeDebounceTime +- autoHeight +- autoItemSize +- loop diff --git a/projects/ng-gallery/src/stories/basic/Thumbnails.mdx b/projects/ng-gallery/src/stories/basic/Thumbnails.mdx new file mode 100644 index 00000000..0d2abeb2 --- /dev/null +++ b/projects/ng-gallery/src/stories/basic/Thumbnails.mdx @@ -0,0 +1,89 @@ +import { Meta, Canvas } from "@storybook/addon-docs"; +import * as GalleryStories from "./Gallery.stories"; + + + +# Gallery Thumbnails + +Thumbnails are an integral part of the gallery component, offering multiple customization options for appearance and behavior. + + + +## Displaying thumbnails + +To display thumbnails, add the following attribute: + +```html + +``` + + +## Thumbnail position + +There are 4 positioning choices are available for thumbnails: `top`, `left`, `bottom` and `right`. + +The chosen position also dictates the slide direction: horizontal for `top` and `bottom`, and vertical for `left` and `right`. + + + + + +## Customizing thumbnail size + +Thumbnails can be resized using the `thumbWidth` and `thumbHeight` inputs: + +- For `top` or `bottom` positions, `thumbHeight` determines the height of the thumbnails' slider. +- For `left` or `right` positions, `thumbWidth` determines the width of the thumbnails' slider. + + +## Automatic thumbnail sizing + +The `thumbAutosize` attribute enables automatic thumbnail sizing, ensuring each thumbnail fits its content size. + +- In `top` or `bottom` positions, the width of each thumbnail adjusts to its content. +- In `left` or `right` positions, the height of each thumbnail adjusts to its content. + + + + +## Disabling thumbnail clicks + +To prevent navigating to new items by clicking on thumbnails, use the following attribute: + +```html + +``` + + + +## Detaching thumbnails + +Typically, thumbnails adjust to centralize the active item. To disable this behavior `detachThumbs` as follows: + + + + + +## Centralized thumbnails + +By default, the active thumbnail is centrally positioned in the slider. However, if it's located at the beginning or end, it remains in place. To enforce centralization, utilize the `thumbView` attribute: + + + + + +## List of options related to gallery thumbnails + +- thumbs +- thumbPosition +- thumbWidth +- thumbHeight +- thumbAutosize +- thumbCentralized +- thumbImageSize +- detachThumbs +- disableThumbs +- disableThumbMouseScroll +- disableThumbMouseScroll + +The API table is available [here](/docs/documentations-gallery--lab). diff --git a/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts b/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts new file mode 100644 index 00000000..69a31bb0 --- /dev/null +++ b/projects/ng-gallery/src/stories/custom-templates/CustomTemplates.stories.ts @@ -0,0 +1,119 @@ +import type { Meta, StoryObj } from '@storybook/angular'; +import { applicationConfig, moduleMetadata } from '@storybook/angular'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { GalleryModule } from 'ng-gallery'; +import { CustomTemplateComponent } from './custom-template.component'; +import { getHDImages, getHDImagesForCustomTemplate } from '../pixabay/pixabay.service'; + +import 'hammerjs'; + +const meta: Meta = { + title: 'Documentations/CustomTemplates', + component: CustomTemplateComponent, + // tags: ['autodocs'], + render: (args: CustomTemplateComponent) => ({ + props: { + ...args, + }, + }), + decorators: [ + moduleMetadata({ + imports: [GalleryModule], + }), + applicationConfig({ + providers: [provideAnimations()], + }), + ] +}; + +export default meta; +type Story = StoryObj; + +export const ImageTemplateExample: Story = { + render: (args: CustomTemplateComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` + +
                                                                                                                                  + {{ item?.alt }} +
                                                                                                                                  +
                                                                                                                                  + ` + }), + loaders: [ + async () => ({ items: await getHDImages('sea') }), + ] +}; + + +export const ItemTemplateExample: Story = { + render: (args: CustomTemplateComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` + +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + `, + styles: [` + img { + object-fit: cover; + border: 10px white solid; + width: 400px; + height: 400px; + } + `] + }), + loaders: [ + async () => ({ items: await getHDImagesForCustomTemplate('sand') }), + ] +}; + +export const ThumbTemplateExample: Story = { + render: (args: CustomTemplateComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` + +
                                                                                                                                  + {{ thumb?.alt }} +
                                                                                                                                  +
                                                                                                                                  + ` + }), + loaders: [ + async () => ({ items: await getHDImages('sea') }), + ] +}; + +export const BoxTemplateExample: Story = { + render: (args: CustomTemplateComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` + +
                                                                                                                                  +
                                                                                                                                  This is fixed overlay template
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + `, + styles: [` + .my-box { + width: 200px; + height: 50px; + color: white; + } + img { + position: absolute; + z-index: 999; + width: 40px; + height: 40px; + top: 20px; + left: 20px; + } + `] + }), + loaders: [ + async () => ({ items: await getHDImages('sea') }), + ] +}; diff --git a/projects/ng-gallery/src/stories/custom-templates/CustomTemplatesUsage.mdx b/projects/ng-gallery/src/stories/custom-templates/CustomTemplatesUsage.mdx new file mode 100644 index 00000000..0101d2ab --- /dev/null +++ b/projects/ng-gallery/src/stories/custom-templates/CustomTemplatesUsage.mdx @@ -0,0 +1,144 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as CustomTemplatesStories from "./CustomTemplates.stories"; + + + +# Custom Templates + + + + +The directives are: `*galleryItemDef`, `*galleryImageDef`, `*galleryThumbDef`, `*galleryBoxDef` + +## GalleryImageDef + +`*galleryImageDef`: applies only on image items - the image will still be displayed, but this adds an custom inner template, useful to add text overlay on top of the image. + + + + +**Example:** + +```html + + +
                                                                                                                                  + {{ item?.alt }} +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +``` + +## GalleryThumbDef + +`*galleryThumbDef`: applies on all thumbnails types, image will still displayed, but adds an custom inner template. + + + + +**Example:** the following adds a Youtube icon on Youtube thumbnail and video icon on video thumbnails: + +```html + + + + + + + + + + +``` + + +## GalleryItemDef + +`*galleryItemDef`: overrides gallery item template, useful if you want create your own gallery template for any type from scratch. + + + +**Example:** + +```html + +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +``` + + > When using `galleryItemDef` you will need to add the items differently + +```ts +galleryRef.add({ + type: 'my-image-template', + data: { + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + alt: 'Test' + } +}) + +// or using items array +const items: GalleryItem[] = [ + { + type: 'my-image-template' + data: { + src: 'IMAGE_SRC_URL', + thumb: 'IMAGE_THUMBNAIL_URL' + } + } + // more items +]; +``` + + +#### Additional context properties that comes with `GalleryItemDef`, `GalleryImageDef` and `GalleryThumbDef` are: + +```ts +{ + /** Index of the item. */ + index?: number; + + /** Type of the item, default ones are 'image', 'video', 'youtube', 'iframe' */ + type?: string; + + /** True if this item is the active one. */ + active?: boolean; + + /** The number of total items. */ + count?: number; + + /** True if this item is first. */ + first?: boolean; + + /** True if this item is last. */ + last?: boolean; +} +``` + +## GalleryBoxDef + +`*galleryBoxDef` Adds a single static template on top of the gallery items + + + +```html + +
                                                                                                                                  + {{ state.currIndex + 1 }} / {{ state.items.length }} +
                                                                                                                                  +
                                                                                                                                  +``` + +Available context variables are `state` and `config` + +> You can use these directives on DOM elements and components or even `ng-container` and `ng-template` diff --git a/projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts b/projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts new file mode 100644 index 00000000..bf055928 --- /dev/null +++ b/projects/ng-gallery/src/stories/custom-templates/custom-template.component.ts @@ -0,0 +1,46 @@ +import { Component, ChangeDetectionStrategy, Input } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { GalleryModule, GalleryItem, } from 'ng-gallery'; +import { Observable } from 'rxjs'; + +/** + * This section demonstrate how to extend the image template, like displaying a text over the image item + */ +@Component({ + selector: 'custom-templates-example', + template: ` + + +
                                                                                                                                  + {{ item?.alt }} +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + `, + styles: [` + .item-text { + position: absolute; + top: 0; + left: 0; + right: 0; + margin: 3em auto 0; + width: 100%; + max-width: 500px; + padding: 20px 25px; + text-align: justify; + letter-spacing: 1px; + filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3)); + background: #ffffffd9; + color: black; + border-radius: 8px; + } + `], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [CommonModule, GalleryModule] +}) +export class CustomTemplateComponent { + + @Input() items: GalleryItem[]; + +} diff --git a/projects/ng-gallery/src/stories/lightbox/CustomTemplates.mdx b/projects/ng-gallery/src/stories/lightbox/CustomTemplates.mdx new file mode 100644 index 00000000..f9d6bea8 --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/CustomTemplates.mdx @@ -0,0 +1,48 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as LightboxStories from "./Lightbox.stories"; + + + +# Custom templates with the Lightbox + +The usage is similar to usage of custom templates in the gallery, however, we need to get a reference to the template and pass it to the gallery config. + +**Example:** + +```ts +import {Component, ViewChild } from '@angular/core'; +import { Gallery, GalleryImageDef } from 'ng-gallery'; + +@Component({ ... }) +export class LightboxExampleComponent { + + // Reference to the image template + @ViewChild(GalleryImageDef) imageDef: GalleryImageDef; + + constructor(public gallery: Gallery) { + } + + ngAfterViewInit() { + this.gallery.ref('lightbox', { + imageTemplate: this.imageDef.templateRef + }).load(this.items); + } +} +``` + +in the template: + +```html +
                                                                                                                                  + {{ item.alt }} +
                                                                                                                                  +``` + +The templates can also be set using `galleryRef.setConfig()` as needed + +```ts +this.galleryRef.setConfig({ + thumbTemplate: this.thumbDef.templateRef, + boxTemplate: this.boxDef.templateRef +}); +``` diff --git a/projects/ng-gallery/src/stories/lightbox/Gallerize.mdx b/projects/ng-gallery/src/stories/lightbox/Gallerize.mdx new file mode 100644 index 00000000..26a843c4 --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/Gallerize.mdx @@ -0,0 +1,120 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as GalleryStories from "./Lightbox.stories"; + + + + +# Gallerize + + + +### Basic usage + +Wrap elements inside a `gallerize` directive + +```html +
                                                                                                                                  + + + + +
                                                                                                                                  +``` +You can also use normal element background instead of `img` + +```html +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +``` + +### Define image's full and thumbnail sources + +Use the attributes `imageSrc` and `thumbSrc` to set image full size and thumbnail size + +```html +
                                                                                                                                  + +
                                                                                                                                  +``` + +### Gallerize specific elements + +Use the input `[selector]` to gallerize specific elements + +```html +
                                                                                                                                  + +
                                                                                                                                  +``` + +### Multiple galleries + +To use multiple galleries, just set a unique id, e.g. `gallerize="gallery-123"` + +```html +

                                                                                                                                  Gallery 1

                                                                                                                                  + +
                                                                                                                                  + +
                                                                                                                                  + +

                                                                                                                                  Gallery 2

                                                                                                                                  + +
                                                                                                                                  + +
                                                                                                                                  +``` + +Here is a [multiple gallerize stackblitz](https://stackblitz.com/edit/ngx-gallery-multiple-gallerize). + +*** + +### Gallerize on `` component + +**Gallerize** can also be used on `` component, This will trigger the lightbox on a gallery item's click. + + + +Here is a [Gallerize on gallery stackblitz](https://stackblitz.com/edit/ngx-gallery-nqudkt?file=src%2Fapp%2Fhome%2Fhome.component.html) + +*** + +### Set custom config when using `gallerize` + + +```ts +GalleryModule.withConfig({ + thumbPosition: 'bottom' +}), +``` +Here is a demo https://stackblitz.com/edit/ngx-gallery-multiple-gallerize + +```ts +constructor(gallery: Gallery) { + gallery.ref('gallery-1').setConfig({ + thumbPosition: 'bottom' + }) +} +``` diff --git a/projects/ng-gallery/src/stories/lightbox/GettingStarted.mdx b/projects/ng-gallery/src/stories/lightbox/GettingStarted.mdx new file mode 100644 index 00000000..b9c6058c --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/GettingStarted.mdx @@ -0,0 +1,49 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as LightboxStories from "./Lightbox.stories"; + + + +## Installation + +**NPM** + +```bash +npm i ng-gallery @angular/cdk +``` + +## Usage + +- Import the CDK overlay-prebuilt CSS file in your global styles. + +```css +@import '~@angular/cdk/overlay-prebuilt.css'; +``` + + > If you're already using Material, you can skip importing the prebuilt overlay styles. + +- For lightbox usage, see [Lightbox Usage](https://github.com/MurhafSousli/ngx-gallery/wiki/Lightbox-Usage) | [Lightbox Usage Demo](https://ngx-gallery.netlify.app/#/lightbox). +- For gallerize usage, see [Gallerize usage](https://github.com/MurhafSousli/ngx-gallery/wiki/Gallerize-Examples) | [Gallerize Usage Demo](https://ngx-gallery.netlify.app/#/gallerize). + + + +### Global Configuration + +To set global configuration that applies on all lightbox overlays across the app, set the config value using `LIGHTBOX_CONFIG` token + +**Example:** + +```ts +import { LIGHTBOX_CONFIG, LightboxConfig } from 'ng-gallery/lightbox'; + +bootstrapApplication(AppComponent, { + providers: [ + { + provide: LIGHTBOX_CONFIG, + useValue: { + keyboardShortcuts: false, + exitAnimationTime: 1000 + } as LightboxConfig + } + ] +}) +``` diff --git a/projects/ng-gallery/src/stories/lightbox/Lightbox.mdx b/projects/ng-gallery/src/stories/lightbox/Lightbox.mdx new file mode 100644 index 00000000..63d530d6 --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/Lightbox.mdx @@ -0,0 +1,123 @@ +import {Meta, Canvas} from "@storybook/addon-docs"; +import * as LightboxStories from "./Lightbox.stories"; + + + +# Lightbox + + + +The usage of the lightbox is pretty straight forward + +### 1. Create gallery items + +```ts +// Assume you have the following data +const data = [ + { + srcUrl: 'https://preview.ibb.co/jrsA6R/img12.jpg', + previewUrl: 'https://preview.ibb.co/jrsA6R/img12.jpg' + }, + { + srcUrl: 'https://preview.ibb.co/kPE1D6/clouds.jpg', + previewUrl: 'https://preview.ibb.co/kPE1D6/clouds.jpg' + } +]; + +// Map the data to gallery image items +let items = data.map(item => + new ImageItem({ src: item.srcUrl, thumb: item.previewUrl }) +); +``` + +### 2. Load them in the gallery + +```ts +this.gallery.ref().load(this.items); +``` + +### 3. Add `[lightbox]` on each thumbnail in your template + +```html + +``` + +Now every image element click will open the lightbox to the proper item + +**Full example:** + +```ts +import { Component, OnInit } from '@angular/core'; +import { Gallery, GalleryItem } from '@ngx-gallery/core'; + +@Component({ + template: ` + + ` +}) +export class AppComponent implements OnInit { + + // Map the data to gallery image items + items: GalleryItem[] = data.map(item => + new ImageItem({ src: item.srcUrl, thumb: item.previewUrl }) + ); + + constructor(public gallery: Gallery) { + } + + ngOnInit() { + // Load items into the gallery + this.gallery.ref().load(this.items); + } +} +``` + +See [Lightbox Example](https://murhafsousli.github.io/ngx-gallery/#/lightbox), [Lightbox Stackblitz](https://stackblitz.com/edit/ngx-gallery-lightbox) + +### Open the lightbox manually + +```ts +import { Lightbox } from '@ngx-gallery/lightbox'; + +constructor(public lightbox: Lightbox) { +} + +openLightbox(index: number) { + this.lightbox.open(index); +} +``` + + +### For fullscreen mode + +By default fullscreen is obtained on small size screen (mobile) but you can set it as the default for all screen sizes + +**Example:** + +```ts +GalleryModule, +LightboxModule.withConfig({ + panelClass: 'fullscreen' +}) +``` + +Or straight through the open function + +```ts +openLightbox() { + this.lightbox.open(0, 'lightboxId', { + panelClass: 'fullscreen' + }); +} +``` +See [Lightbox-API](https://github.com/MurhafSousli/ngx-gallery/wiki/Lightbox-API) + +*** + +Moreover, There is a directive `[gallerize]` that loads the images from the template and opens the lightbox on thumbnails click, check [Galleries example](https://github.com/MurhafSousli/ngx-gallery/wiki/Gallerize-directive) + + diff --git a/projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts b/projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts new file mode 100644 index 00000000..06386972 --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/Lightbox.stories.ts @@ -0,0 +1,94 @@ +import type { Meta, StoryObj } from '@storybook/angular'; +import { applicationConfig, moduleMetadata } from '@storybook/angular'; +import { provideAnimations } from '@angular/platform-browser/animations'; +import { LightboxModule } from 'ng-gallery/lightbox'; +import { getHDImages } from '../pixabay/pixabay.service'; +import { LightboxExampleComponent } from './lightbox-example'; + +import 'hammerjs'; + +const meta: Meta = { + title: 'Documentations/Lightbox', + component: LightboxExampleComponent, + decorators: [ + moduleMetadata({ + imports: [LightboxModule], + }), + applicationConfig({ + providers: [provideAnimations()], + }), + ] +}; + +export default meta; +type Story = StoryObj; + + +export const LightboxExample: Story = { + parameters: { + docs: { + source: { + code: ` +
                                                                                                                                  + +
                                                                                                                                  + `, + }, + }, + }, + render: (args: LightboxExampleComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + }), + loaders: [ + async () => ({ items: await getHDImages('ship') }), + ] +}; + + +export const GallerizeExample: Story = { + render: (args: LightboxExampleComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` +
                                                                                                                                  + +
                                                                                                                                  + `, + styles: [` + .container { + display: flex; + flex-wrap: wrap; + gap: 3px; + margin: 0 auto; + padding: 20px; + max-width: 768px; + } + img { + height: 90px; + width: 125px; + object-fit: cover; + } + `] + }), + loaders: [ + async () => ({ items: await getHDImages('ship') }), + ] +}; + + +export const GallerizeGalleryExample: Story = { + render: (args: LightboxExampleComponent, { loaded: { items } }) => ({ + props: { ...args, items, }, + template: ` + + ` + }), + loaders: [ + async () => ({ items: await getHDImages('ship') }), + ] +}; diff --git a/projects/ng-gallery/src/stories/lightbox/lightbox-example.ts b/projects/ng-gallery/src/stories/lightbox/lightbox-example.ts new file mode 100644 index 00000000..819bc174 --- /dev/null +++ b/projects/ng-gallery/src/stories/lightbox/lightbox-example.ts @@ -0,0 +1,60 @@ +import { Component, Input, OnDestroy, OnInit, ChangeDetectionStrategy } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Gallery, GalleryItem, GalleryRef } from 'ng-gallery'; +import { Lightbox, LightboxModule } from 'ng-gallery/lightbox'; + +@Component({ + selector: 'lightbox-example', + template: ` +
                                                                                                                                  + +
                                                                                                                                  + `, + styles: [` + .container { + display: flex; + flex-wrap: wrap; + gap: 3px; + margin: 0 auto; + padding: 20px; + max-width: 768px; + } + img { + height: 90px; + width: 125px; + object-fit: cover; + } + `], + imports: [CommonModule, LightboxModule], + standalone: true, + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class LightboxExampleComponent implements OnInit, OnDestroy { + + galleryId: string = 'lightbox'; + + galleryRef: GalleryRef; + + @Input() items: GalleryItem[]; + + constructor(public gallery: Gallery, public lightbox: Lightbox) { + } + + ngOnInit(): void { + this.galleryRef = this.gallery.ref('lightbox', { + thumbPosition: 'top', + imageSize: 'cover', + autoHeight: false + }); + + this.galleryRef.load(this.items); + } + + ngOnDestroy(): void { + this.galleryRef.destroy(); + } +} diff --git a/projects/ng-gallery/src/stories/pixabay/pixabay.model.ts b/projects/ng-gallery/src/stories/pixabay/pixabay.model.ts new file mode 100644 index 00000000..845e3376 --- /dev/null +++ b/projects/ng-gallery/src/stories/pixabay/pixabay.model.ts @@ -0,0 +1,54 @@ +export interface PixabayModel { + total: number; + totalHits: number; + hits: Hit[]; +} + +export interface Hit { + id: number; + pageURL: string; + type: string; + tags: string[]; + previewURL: string; + previewWidth: number; + previewHeight: number; + webformatURL: string; + webformatWidth: number; + webformatHeight: number; + imageWidth: number; + imageHeight: number; + imageSize: number; + views: number; + downloads: number; + favorites: number; + likes: number; + comments: number; + user_id: number; + user: string; + userImageURL: string; +} +export interface PixabayHDModel { + total: number; + totalHits: number; + hits: Hit2[]; +} + +export interface Hit2 { + id_hash: string; + type: string; + previewURL: string; + previewWidth: number; + previewHeight: number; + webformatURL: string; + webformatWidth: number; + webformatHeight: number; + largeImageURL: string; + fullHDURL: string; + imageWidth: number; + imageHeight: number; + imageSize: number; + imageURL: string; + user_id: number; + user: string; + userImageURL: string; +} diff --git a/projects/ng-gallery/src/stories/pixabay/pixabay.service.ts b/projects/ng-gallery/src/stories/pixabay/pixabay.service.ts new file mode 100644 index 00000000..2b2b6009 --- /dev/null +++ b/projects/ng-gallery/src/stories/pixabay/pixabay.service.ts @@ -0,0 +1,30 @@ +import { ImageItem, GalleryItem } from 'ng-gallery'; +import { Hit2, PixabayHDModel } from './pixabay.model'; + +const API_KEY: string = '560162-704dd2880c027f22c62ab7941'; + +export function getHDImages(key: string): Promise { + const url: string = `https://pixabay.com/api/?key=${ API_KEY }&q=${ encodeURIComponent(key) }&response_group=high_resolution&editors_choice=true&per_page=18&image_type=photo`; + + return fetch(url).then((r: Response) => r.json()).then((data: PixabayHDModel) => { + return data.hits.map((item: Hit2, i: number) => { + return new ImageItem({ src: item.largeImageURL, thumb: item.previewURL, alt: `photo-${ i }` }) + }); + }) +} + +export function getHDImagesForCustomTemplate(key: string): Promise { + const url: string = `https://pixabay.com/api/?key=${ API_KEY }&q=${ encodeURIComponent(key) }&response_group=high_resolution&editors_choice=true&per_page=18&image_type=photo`; + + return fetch(url).then((r: Response) => r.json()).then((data: PixabayHDModel) => { + return data.hits.map((item: Hit2, i: number) => { + return { + type: 'custom', + data: { + src: item.largeImageURL, + thumb: item.previewURL, alt: `photo-${ i }` + } + } + }); + }) +}