taon-ui 21.0.31 → 21.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/browser/fesm2022/taon-ui-browser.mjs +811 -149
  2. package/browser/fesm2022/taon-ui-browser.mjs.map +1 -1
  3. package/browser/package.json +1 -1
  4. package/browser/types/taon-ui-browser.d.ts +257 -30
  5. package/browser-prod/fesm2022/{taon-ui-browser.mjs → taon-ui-browser-prod.mjs} +814 -150
  6. package/browser-prod/fesm2022/taon-ui-browser-prod.mjs.map +1 -0
  7. package/browser-prod/package.json +5 -5
  8. package/browser-prod/types/{taon-ui-browser.d.ts → taon-ui-browser-prod.d.ts} +255 -30
  9. package/lib/build-info._auto-generated_.d.ts +3 -1
  10. package/lib/build-info._auto-generated_.js +1 -1
  11. package/lib/build-info._auto-generated_.js.map +1 -1
  12. package/lib/env/env.angular-node-app.js +64 -0
  13. package/lib/env/env.angular-node-app.js.map +1 -1
  14. package/lib/env/env.docs-webapp.js +64 -0
  15. package/lib/env/env.docs-webapp.js.map +1 -1
  16. package/lib/env/env.electron-app.js +64 -0
  17. package/lib/env/env.electron-app.js.map +1 -1
  18. package/lib/env/env.mobile-app.js +64 -0
  19. package/lib/env/env.mobile-app.js.map +1 -1
  20. package/lib/env/env.npm-lib-and-cli-tool.js +64 -0
  21. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  22. package/lib/env/env.vscode-plugin.js +64 -0
  23. package/lib/env/env.vscode-plugin.js.map +1 -1
  24. package/lib/index._auto-generated_.d.ts +13 -1
  25. package/lib/index._auto-generated_.js +12 -0
  26. package/lib/index._auto-generated_.js.map +1 -1
  27. package/lib/layouts/taon-bootstrap-navbar/index.js +2 -2
  28. package/lib/package.json +1 -1
  29. package/lib/ui/directives/index.js +2 -2
  30. package/lib/ui/index.js +2 -2
  31. package/lib/ui/taon-auth/auth-button.component.d.ts +14 -0
  32. package/lib/ui/taon-auth/auth-dialog.component.d.ts +20 -0
  33. package/lib/ui/taon-auth/auth.guard.d.ts +9 -0
  34. package/lib/ui/taon-auth/google-auth.service.d.ts +9 -0
  35. package/lib/ui/taon-auth/session.service.d.ts +23 -0
  36. package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
  37. package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
  38. package/lib/ui/taon-iframe-sync/index.js +2 -2
  39. package/lib/ui/taon-kv-authorization/taon-kv-authorization.component.d.ts +22 -0
  40. package/lib/ui/taon-progress-bar/index.js +2 -2
  41. package/lib/ui/taon-rumble/taon-rumble.component.d.ts +19 -0
  42. package/lib/ui/taon-session-passcode/index.js +2 -2
  43. package/lib/ui/taon-simple-layout/taon-simple-layout.component.d.ts +15 -0
  44. package/lib/ui/taon-simple-layout/taon-simple-layout.model.d.ts +4 -0
  45. package/lib/ui/taon-simple-layout/taon-simple-layout.model.js +3 -0
  46. package/lib/ui/taon-simple-layout/taon-simple-layout.model.js.map +1 -0
  47. package/lib/ui/taon-simple-layout/taon-simple-layout.routes.d.ts +2 -0
  48. package/lib/ui/taon-stripe-buy-button/taon-stripe-buy-button.component.d.ts +27 -0
  49. package/lib/ui/taon-table/index.js +2 -2
  50. package/lib/ui/taon-youtube-video/taon-youtube-video.component.d.ts +45 -0
  51. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  52. package/lib-prod/build-info._auto-generated_.js +3 -1
  53. package/lib-prod/build-info._auto-generated_.js.map +1 -1
  54. package/lib-prod/env/env.angular-node-app.js +64 -0
  55. package/lib-prod/env/env.angular-node-app.js.map +1 -1
  56. package/lib-prod/env/env.docs-webapp.js +64 -0
  57. package/lib-prod/env/env.docs-webapp.js.map +1 -1
  58. package/lib-prod/env/env.electron-app.js +64 -0
  59. package/lib-prod/env/env.electron-app.js.map +1 -1
  60. package/lib-prod/env/env.mobile-app.js +64 -0
  61. package/lib-prod/env/env.mobile-app.js.map +1 -1
  62. package/lib-prod/env/env.npm-lib-and-cli-tool.js +64 -0
  63. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -1
  64. package/lib-prod/env/env.vscode-plugin.js +64 -0
  65. package/lib-prod/env/env.vscode-plugin.js.map +1 -1
  66. package/lib-prod/index._auto-generated_.d.ts +1 -0
  67. package/lib-prod/index._auto-generated_.js +12 -0
  68. package/lib-prod/index._auto-generated_.js.map +1 -1
  69. package/lib-prod/layouts/taon-bootstrap-navbar/index.d.ts +1 -1
  70. package/lib-prod/layouts/taon-bootstrap-navbar/index.js +1 -1
  71. package/lib-prod/package.json +1 -1
  72. package/lib-prod/ui/directives/index.d.ts +1 -1
  73. package/lib-prod/ui/directives/index.js +1 -1
  74. package/lib-prod/ui/index.d.ts +1 -1
  75. package/lib-prod/ui/index.js +1 -1
  76. package/lib-prod/ui/taon-github-fork-me-corner/index.d.ts +1 -1
  77. package/lib-prod/ui/taon-github-fork-me-corner/index.js +1 -1
  78. package/lib-prod/ui/taon-github-fork-me-ribbon/index.d.ts +1 -1
  79. package/lib-prod/ui/taon-github-fork-me-ribbon/index.js +1 -1
  80. package/lib-prod/ui/taon-iframe-sync/index.d.ts +1 -1
  81. package/lib-prod/ui/taon-iframe-sync/index.js +1 -1
  82. package/lib-prod/ui/taon-progress-bar/index.d.ts +1 -1
  83. package/lib-prod/ui/taon-progress-bar/index.js +1 -1
  84. package/lib-prod/ui/taon-session-passcode/index.d.ts +1 -1
  85. package/lib-prod/ui/taon-session-passcode/index.js +1 -1
  86. package/lib-prod/ui/taon-simple-layout/taon-simple-layout.model.d.ts +4 -0
  87. package/lib-prod/ui/taon-simple-layout/taon-simple-layout.model.js +2 -0
  88. package/lib-prod/ui/taon-simple-layout/taon-simple-layout.model.js.map +1 -0
  89. package/lib-prod/ui/taon-table/index.d.ts +1 -1
  90. package/lib-prod/ui/taon-table/index.js +1 -1
  91. package/package.json +1 -1
  92. package/scss/lib/ui/taon-auth/auth-button.component.scss +3 -0
  93. package/scss/lib/ui/taon-auth/auth-dialog.component.scss +48 -0
  94. package/scss/lib/ui/taon-rumble/taon-rumble.component.scss +96 -0
  95. package/scss/lib/ui/taon-simple-layout/taon-simple-layout.component.scss +28 -0
  96. package/scss/lib/ui/taon-youtube-video/taon-youtube-video.component.scss +99 -0
  97. package/src.js +20 -0
  98. package/websql/fesm2022/taon-ui-websql.mjs +811 -149
  99. package/websql/fesm2022/taon-ui-websql.mjs.map +1 -1
  100. package/websql/package.json +1 -1
  101. package/websql/types/taon-ui-websql.d.ts +257 -30
  102. package/websql-prod/fesm2022/{taon-ui-websql.mjs → taon-ui-websql-prod.mjs} +814 -150
  103. package/websql-prod/fesm2022/taon-ui-websql-prod.mjs.map +1 -0
  104. package/websql-prod/package.json +5 -5
  105. package/websql-prod/types/{taon-ui-websql.d.ts → taon-ui-websql-prod.d.ts} +255 -30
  106. package/browser-prod/fesm2022/taon-ui-browser.mjs.map +0 -1
  107. package/websql-prod/fesm2022/taon-ui-websql.mjs.map +0 -1
@@ -6,11 +6,11 @@ import { CdkStepperModule } from '@angular/cdk/stepper';
6
6
  import { CdkTableModule } from '@angular/cdk/table';
7
7
  import { CdkTreeModule } from '@angular/cdk/tree';
8
8
  import * as i0 from '@angular/core';
9
- import { NgModule, Input, ChangeDetectionStrategy, Component, Pipe, Directive, EventEmitter, HostListener, HostBinding, Output, Injectable, ViewChild, inject, DestroyRef, Self, ChangeDetectorRef, PLATFORM_ID, signal, effect } from '@angular/core';
9
+ import { NgModule, Input, ChangeDetectionStrategy, Component, Pipe, Directive, EventEmitter, HostListener, HostBinding, Output, Injectable, ViewChild, inject, DestroyRef, Self, ChangeDetectorRef, signal, computed, PLATFORM_ID, effect, input } from '@angular/core';
10
10
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
11
11
  import { MatBadgeModule } from '@angular/material/badge';
12
12
  import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
13
- import * as i6 from '@angular/material/button';
13
+ import * as i2$2 from '@angular/material/button';
14
14
  import { MatButtonModule } from '@angular/material/button';
15
15
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
16
16
  import * as i7 from '@angular/material/card';
@@ -20,62 +20,68 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
20
20
  import { MatChipsModule } from '@angular/material/chips';
21
21
  import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
22
22
  import { MatDatepickerModule } from '@angular/material/datepicker';
23
- import { MatDialogModule } from '@angular/material/dialog';
23
+ import * as i2$3 from '@angular/material/dialog';
24
+ import { MatDialogModule, MatDialogRef, MatDialog } from '@angular/material/dialog';
24
25
  import { MatDividerModule } from '@angular/material/divider';
25
26
  import { MatExpansionModule } from '@angular/material/expansion';
26
27
  import { MatGridListModule } from '@angular/material/grid-list';
27
28
  import * as i9 from '@angular/material/icon';
28
29
  import { MatIconModule } from '@angular/material/icon';
29
- import * as i2$3 from '@angular/material/input';
30
+ import * as i5$1 from '@angular/material/input';
30
31
  import { MatInputModule } from '@angular/material/input';
31
32
  import { MatListModule } from '@angular/material/list';
32
33
  import { MatMenuModule } from '@angular/material/menu';
33
34
  import { MatPaginatorModule } from '@angular/material/paginator';
35
+ import * as i6 from '@angular/material/progress-bar';
34
36
  import { MatProgressBarModule } from '@angular/material/progress-bar';
35
37
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
36
38
  import { MatRadioModule } from '@angular/material/radio';
37
39
  import { MatSelectModule } from '@angular/material/select';
38
40
  import * as i10 from '@angular/material/sidenav';
39
41
  import { MatSidenavModule } from '@angular/material/sidenav';
40
- import * as i1$3 from '@angular/material/slide-toggle';
42
+ import * as i1$4 from '@angular/material/slide-toggle';
41
43
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
42
44
  import { MatSliderModule } from '@angular/material/slider';
43
45
  import { MatSnackBarModule } from '@angular/material/snack-bar';
44
46
  import { MatSortModule } from '@angular/material/sort';
45
47
  import { MatStepperModule } from '@angular/material/stepper';
46
48
  import { MatTableModule } from '@angular/material/table';
47
- import * as i11 from '@angular/material/tabs';
49
+ import * as i3 from '@angular/material/tabs';
48
50
  import { MatTabsModule } from '@angular/material/tabs';
49
51
  import { MatToolbarModule } from '@angular/material/toolbar';
50
52
  import { MatTooltipModule } from '@angular/material/tooltip';
51
53
  import { MatTreeModule } from '@angular/material/tree';
52
- import * as i2 from '@angular/common';
53
- import { CommonModule, NgIf, isPlatformBrowser } from '@angular/common';
54
- import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
54
+ import * as i1 from '@angular/common';
55
+ import { CommonModule, NgIf, isPlatformBrowser, AsyncPipe, JsonPipe, NgStyle } from '@angular/common';
56
+ import * as i2 from '@ng-bootstrap/ng-bootstrap';
55
57
  import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap';
56
58
  import { ModalModule } from 'ngx-bootstrap/modal';
57
- import * as i1 from '@angular/platform-browser';
59
+ import * as i1$1 from '@angular/platform-browser';
58
60
  import { DomSanitizer } from '@angular/platform-browser';
59
61
  import { Log, Level } from 'ng2-logger/browser';
60
- import { _, Helpers, json5 } from 'tnp-core/browser';
62
+ import { _, Helpers, TaonStripeCloudflareWorker, json5 } from 'tnp-core/browser';
61
63
  import { __decorate, __metadata } from 'tslib';
62
- import * as i2$2 from '@angular/forms';
63
- import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
64
+ import * as i2$1 from '@angular/forms';
65
+ import { FormGroup, FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
64
66
  import * as i4 from 'ngx-scrollbar';
65
67
  import { NgScrollbarModule } from 'ngx-scrollbar';
66
- import { interval, tap, Subject, takeUntil, Subscription, defer, fromEvent, map, debounceTime, distinctUntilChanged as distinctUntilChanged$1, share } from 'rxjs';
67
- import * as i1$2 from 'static-columns/browser';
68
+ import { interval, tap, Subject, takeUntil, Observable, BehaviorSubject, map, distinctUntilChanged, shareReplay, take, Subscription, defer, fromEvent, debounceTime, share } from 'rxjs';
69
+ import * as i1$3 from 'static-columns/browser';
68
70
  import { StaticColumnsModule } from 'static-columns/browser';
69
71
  import { TaonAdminService, Symbols } from 'taon/browser';
70
72
  import { StorPropertyInLocalStorage, Stor } from 'taon-storage/browser';
71
73
  import { Resource, getDefaultModel } from 'ng2-rest/browser';
72
- import * as i1$1 from '@ngneat/hot-toast';
74
+ import * as i1$2 from '@ngneat/hot-toast';
73
75
  import axios from 'axios';
74
76
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
75
77
  import { PasswordModule } from 'primeng/password';
76
- import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
77
- import { distinctUntilChanged, takeUntil as takeUntil$1, filter } from 'rxjs/operators';
78
- import * as i3 from '@ng-matero/extensions/grid';
78
+ import * as i2$4 from '@angular/router';
79
+ import { Router, ActivatedRoute, NavigationEnd, RouterModule, RouterOutlet } from '@angular/router';
80
+ import { ButtonModule } from 'primeng/button';
81
+ import { MtxLoaderModule } from '@ng-matero/extensions/loader';
82
+ import { InputTextModule } from 'primeng/inputtext';
83
+ import { distinctUntilChanged as distinctUntilChanged$1, takeUntil as takeUntil$1, filter } from 'rxjs/operators';
84
+ import * as i3$1 from '@ng-matero/extensions/grid';
79
85
  import { MtxGridModule } from '@ng-matero/extensions/grid';
80
86
  import { MatFormFieldModule } from '@angular/material/form-field';
81
87
 
@@ -103,7 +109,7 @@ const CURRENT_PACKAGE_TAON_VERSION = 'v21';
103
109
  /**
104
110
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
105
111
  */
106
- const CURRENT_PACKAGE_VERSION = '21.0.31';
112
+ const CURRENT_PACKAGE_VERSION = '21.0.34';
107
113
  // THIS FILE IS GENERATED - DO NOT MODIFY
108
114
 
109
115
  function myOrgProj() { }
@@ -258,7 +264,7 @@ class TaonBootstrapNavbarComponent {
258
264
  }
259
265
  ngOnInit() { }
260
266
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonBootstrapNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
261
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonBootstrapNavbarComponent, isStandalone: true, selector: "taon-bootstrap-navbar", inputs: { isLoggedIn: "isLoggedIn", isCollapsed: "isCollapsed" }, ngImport: i0, template: "<nav class=\"navbar navbar-expand-lg\">\n <div class=\"container-fluid\">\n <a\n class=\"navbar-brand\"\n routerLink=\"/home\"\n routerLinkActive=\"active\">\n Home</a\n >\n <button\n class=\"navbar-toggler\"\n type=\"button\"\n (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n\n <div\n [ngbCollapse]=\"isCollapsed\"\n class=\"navbar-collapse\">\n <ul class=\"navbar-nav ms-auto\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/about\"\n routerLinkActive=\"active\"\n >O szkole</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/courses\"\n routerLinkActive=\"active\"\n >Kursy</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/opinions\"\n routerLinkActive=\"active\"\n >Opinie</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/instructors\"\n routerLinkActive=\"active\"\n >Lektorzy</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/contact\"\n routerLinkActive=\"active\"\n >Kontakt</a\n >\n </li>\n <ng-container *ngIf=\"isLoggedIn\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/test\"\n routerLinkActive=\"active\"\n ><b>Test plasuj\u0105cy</b></a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/grammar\"\n routerLinkActive=\"active\"\n >Gramatyka</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/vocabulary\"\n routerLinkActive=\"active\"\n >S\u0142ownictwo</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/reading\"\n routerLinkActive=\"active\"\n >Czytanie</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/movies\"\n routerLinkActive=\"active\"\n >Wideo</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/curiosities\"\n routerLinkActive=\"active\"\n >Ciekawostki</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/logout\"\n routerLinkActive=\"active\"\n >Wyloguj</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/profile\"\n routerLinkActive=\"active\"\n >Profil</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/admin\"\n routerLinkActive=\"active\"\n >Admin</a\n >\n </li>\n </ng-container>\n <ng-container *ngIf=\"!isLoggedIn\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n href=\"javascript:void(0)\"\n (click)=\"modalLoginRegister()\">\n <span class=\"glyphicon glyphicon-hand-right\"></span> Rejestracja /\n <span class=\"glyphicon glyphicon-user\"></span> Logowanie\n </a>\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n</nav>\n<ng-content />", styles: [":host{display:block}nav{font-variant-caps:all-small-caps}.navbar-collapse.in{overflow:hidden;max-height:none!important;height:auto!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: NgbCollapseModule }, { kind: "directive", type: i2$1.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "ngmodule", type: ModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
267
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonBootstrapNavbarComponent, isStandalone: true, selector: "taon-bootstrap-navbar", inputs: { isLoggedIn: "isLoggedIn", isCollapsed: "isCollapsed" }, ngImport: i0, template: "<nav class=\"navbar navbar-expand-lg\">\n <div class=\"container-fluid\">\n <a\n class=\"navbar-brand\"\n routerLink=\"/home\"\n routerLinkActive=\"active\">\n Home</a\n >\n <button\n class=\"navbar-toggler\"\n type=\"button\"\n (click)=\"isCollapsed = !isCollapsed\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n\n <div\n [ngbCollapse]=\"isCollapsed\"\n class=\"navbar-collapse\">\n <ul class=\"navbar-nav ms-auto\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/about\"\n routerLinkActive=\"active\"\n >O szkole</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/courses\"\n routerLinkActive=\"active\"\n >Kursy</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/opinions\"\n routerLinkActive=\"active\"\n >Opinie</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/instructors\"\n routerLinkActive=\"active\"\n >Lektorzy</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/contact\"\n routerLinkActive=\"active\"\n >Kontakt</a\n >\n </li>\n <ng-container *ngIf=\"isLoggedIn\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/test\"\n routerLinkActive=\"active\"\n ><b>Test plasuj\u0105cy</b></a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/grammar\"\n routerLinkActive=\"active\"\n >Gramatyka</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/vocabulary\"\n routerLinkActive=\"active\"\n >S\u0142ownictwo</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/reading\"\n routerLinkActive=\"active\"\n >Czytanie</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/movies\"\n routerLinkActive=\"active\"\n >Wideo</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/curiosities\"\n routerLinkActive=\"active\"\n >Ciekawostki</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/logout\"\n routerLinkActive=\"active\"\n >Wyloguj</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/profile\"\n routerLinkActive=\"active\"\n >Profil</a\n >\n </li>\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n routerLink=\"/admin\"\n routerLinkActive=\"active\"\n >Admin</a\n >\n </li>\n </ng-container>\n <ng-container *ngIf=\"!isLoggedIn\">\n <li class=\"nav-item\">\n <a\n class=\"nav-link\"\n href=\"javascript:void(0)\"\n (click)=\"modalLoginRegister()\">\n <span class=\"glyphicon glyphicon-hand-right\"></span> Rejestracja /\n <span class=\"glyphicon glyphicon-user\"></span> Logowanie\n </a>\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n</nav>\n<ng-content />", styles: [":host{display:block}nav{font-variant-caps:all-small-caps}.navbar-collapse.in{overflow:hidden;max-height:none!important;height:auto!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: NgbCollapseModule }, { kind: "directive", type: i2.NgbCollapse, selector: "[ngbCollapse]", inputs: ["animation", "ngbCollapse", "horizontal"], outputs: ["ngbCollapseChange", "shown", "hidden"], exportAs: ["ngbCollapse"] }, { kind: "ngmodule", type: ModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
262
268
  }
263
269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonBootstrapNavbarComponent, decorators: [{
264
270
  type: Component,
@@ -291,7 +297,7 @@ class SafePipe {
291
297
  throw new Error(`Invalid safe type specified: ${type}`);
292
298
  }
293
299
  }
294
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
300
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SafePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
295
301
  static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.9", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" }); }
296
302
  }
297
303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SafePipe, decorators: [{
@@ -300,7 +306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
300
306
  name: 'safe',
301
307
  standalone: true,
302
308
  }]
303
- }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
309
+ }], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
304
310
 
305
311
  //#region imports
306
312
  //#endregion
@@ -473,7 +479,7 @@ class TaonNotificationsService {
473
479
  const opt = this.options('info', options);
474
480
  return this.toast.info(opt.title);
475
481
  }
476
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonNotificationsService, deps: [{ token: i1$1.HotToastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
482
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonNotificationsService, deps: [{ token: i1$2.HotToastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
477
483
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonNotificationsService, providedIn: 'root' }); }
478
484
  }
479
485
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonNotificationsService, decorators: [{
@@ -481,7 +487,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
481
487
  args: [{
482
488
  providedIn: 'root',
483
489
  }]
484
- }], ctorParameters: () => [{ type: i1$1.HotToastService }] });
490
+ }], ctorParameters: () => [{ type: i1$2.HotToastService }] });
485
491
 
486
492
  //#region imports
487
493
  //#endregion
@@ -772,8 +778,8 @@ class TaonSessionPasscodeComponent {
772
778
  this.clear();
773
779
  }
774
780
  }
775
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonSessionPasscodeComponent, deps: [{ token: i0.ElementRef, self: true }, { token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
776
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonSessionPasscodeComponent, isStandalone: true, selector: "taon-session-passcode", inputs: { passcode: "passcode", message: "message" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n content=\"notranslate\"\n autocomplete=\"off\"\n (click)=\"focus()\"\n (ngSubmit)=\"submit(form.value)\"\n class=\"flex flex-column align-items-center w-full h-full\">\n <div class=\"flex align-content-center w-full justify-content-center mt-8\">\n <p\n class=\"p-3\"\n style=\"max-width: 400px; min-height: 100px\"\n [innerHtml]=\"safeMessage\"></p>\n </div>\n <input\n type=\"password\"\n class=\"text-5xl md:text-8xl pointer-events-none\"\n #taonpasscode\n (keyup)=\"onKeyup($event)\"\n formControlName=\"passcode\" />\n <!-- placeholder=\"Enter passcode\" -->\n</form>", styles: [":host{position:fixed;background-color:#9f9f9f57;z-index:99999;backdrop-filter:blur(50px);width:100%;height:100%;display:none}input{background:#fff;border-radius:6px;outline:0px;border:0px;color:gray;text-align:center;width:500px}\n"], dependencies: [{ kind: "ngmodule", type: PasswordModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }] }); }
781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonSessionPasscodeComponent, deps: [{ token: i0.ElementRef, self: true }, { token: i1$1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
782
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonSessionPasscodeComponent, isStandalone: true, selector: "taon-session-passcode", inputs: { passcode: "passcode", message: "message" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n content=\"notranslate\"\n autocomplete=\"off\"\n (click)=\"focus()\"\n (ngSubmit)=\"submit(form.value)\"\n class=\"flex flex-column align-items-center w-full h-full\">\n <div class=\"flex align-content-center w-full justify-content-center mt-8\">\n <p\n class=\"p-3\"\n style=\"max-width: 400px; min-height: 100px\"\n [innerHtml]=\"safeMessage\"></p>\n </div>\n <input\n type=\"password\"\n class=\"text-5xl md:text-8xl pointer-events-none\"\n #taonpasscode\n (keyup)=\"onKeyup($event)\"\n formControlName=\"passcode\" />\n <!-- placeholder=\"Enter passcode\" -->\n</form>", styles: [":host{position:fixed;background-color:#9f9f9f57;z-index:99999;backdrop-filter:blur(50px);width:100%;height:100%;display:none}input{background:#fff;border-radius:6px;outline:0px;border:0px;color:gray;text-align:center;width:500px}\n"], dependencies: [{ kind: "ngmodule", type: PasswordModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }] }); }
777
783
  }
778
784
  __decorate([
779
785
  (StorPropertyInLocalStorage.for(TaonSessionPasscodeComponent).withDefaultValue('')),
@@ -784,7 +790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
784
790
  args: [{ selector: 'taon-session-passcode', standalone: true, imports: [PasswordModule, CommonModule, ReactiveFormsModule, FormsModule], template: "<form\n [formGroup]=\"form\"\n content=\"notranslate\"\n autocomplete=\"off\"\n (click)=\"focus()\"\n (ngSubmit)=\"submit(form.value)\"\n class=\"flex flex-column align-items-center w-full h-full\">\n <div class=\"flex align-content-center w-full justify-content-center mt-8\">\n <p\n class=\"p-3\"\n style=\"max-width: 400px; min-height: 100px\"\n [innerHtml]=\"safeMessage\"></p>\n </div>\n <input\n type=\"password\"\n class=\"text-5xl md:text-8xl pointer-events-none\"\n #taonpasscode\n (keyup)=\"onKeyup($event)\"\n formControlName=\"passcode\" />\n <!-- placeholder=\"Enter passcode\" -->\n</form>", styles: [":host{position:fixed;background-color:#9f9f9f57;z-index:99999;backdrop-filter:blur(50px);width:100%;height:100%;display:none}input{background:#fff;border-radius:6px;outline:0px;border:0px;color:gray;text-align:center;width:500px}\n"] }]
785
791
  }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
786
792
  type: Self
787
- }] }, { type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }], propDecorators: { passcode: [{
793
+ }] }, { type: i1$1.DomSanitizer }, { type: i0.ChangeDetectorRef }], propDecorators: { passcode: [{
788
794
  type: Input
789
795
  }], message: [{
790
796
  type: Input
@@ -924,8 +930,8 @@ class TaonAdminModeConfigurationComponent {
924
930
  // back.click();
925
931
  // }
926
932
  }
927
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonAdminModeConfigurationComponent, deps: [{ token: i1$2.BreakpointsService }], target: i0.ɵɵFactoryTarget.Component }); }
928
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonAdminModeConfigurationComponent, isStandalone: true, selector: "taon-admin-mode-configuration", inputs: { taonAdminModeConfigurationData: "taonAdminModeConfigurationData" }, outputs: { taonAdminModeConfigurationDataChanged: "taonAdminModeConfigurationDataChanged" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true }], ngImport: i0, template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !taonAdminService.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <!-- #region admin tabs / header -->\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column\n width=\"200\"\n class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon-ui/assets/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !taonAdminService.draggablePopupModeFullScreen &&\n !taonAdminService.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"\n taonAdminService.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n <!-- #endregion -->\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"taonAdminService.keepWebsqlDbDataAfterReload\"\n (change)=\"\n taonAdminService.setKeepWebsqlDbDataAfterReload(\n $event.checked\n )\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n !taonAdminService.draggablePopupModeFullScreen &&\n !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n taonAdminService.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n taonAdminService.draggablePopupMode ||\n taonAdminService.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer\n #drawer\n style=\"width: 580px\"\n [opened]=\"opened\"\n [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!taonAdminService.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->", styles: ["section{display:block;padding:15px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: StaticColumnsModule }, { kind: "component", type: i1$2.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$2.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$2.DirectiveGrow, selector: "[grow]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgScrollbarModule }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar:not([externalViewport]), [ngScrollbar]", exportAs: ["ngScrollbar"] }, { kind: "ngmodule", type: TaonProgressBarModule }, { kind: "ngmodule", type: TaonNotificationsModule }, { kind: "ngmodule", type: TaonFullMaterialModule }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i7.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i10.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i10.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i11.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i11.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: // TODO import only partial things
933
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonAdminModeConfigurationComponent, deps: [{ token: i1$3.BreakpointsService }], target: i0.ɵɵFactoryTarget.Component }); }
934
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonAdminModeConfigurationComponent, isStandalone: true, selector: "taon-admin-mode-configuration", inputs: { taonAdminModeConfigurationData: "taonAdminModeConfigurationData" }, outputs: { taonAdminModeConfigurationDataChanged: "taonAdminModeConfigurationDataChanged" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true }], ngImport: i0, template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !taonAdminService.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <!-- #region admin tabs / header -->\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column\n width=\"200\"\n class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon-ui/assets/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !taonAdminService.draggablePopupModeFullScreen &&\n !taonAdminService.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"\n taonAdminService.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n <!-- #endregion -->\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"taonAdminService.keepWebsqlDbDataAfterReload\"\n (change)=\"\n taonAdminService.setKeepWebsqlDbDataAfterReload(\n $event.checked\n )\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n !taonAdminService.draggablePopupModeFullScreen &&\n !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n taonAdminService.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n taonAdminService.draggablePopupMode ||\n taonAdminService.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer\n #drawer\n style=\"width: 580px\"\n [opened]=\"opened\"\n [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!taonAdminService.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->", styles: ["section{display:block;padding:15px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: StaticColumnsModule }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgScrollbarModule }, { kind: "component", type: i4.NgScrollbar, selector: "ng-scrollbar:not([externalViewport]), [ngScrollbar]", exportAs: ["ngScrollbar"] }, { kind: "ngmodule", type: TaonProgressBarModule }, { kind: "ngmodule", type: TaonNotificationsModule }, { kind: "ngmodule", type: TaonFullMaterialModule }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i7.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i10.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i10.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: // TODO import only partial things
929
935
  // TaonDbAdminComponent,
930
936
  TaonSessionPasscodeComponent, selector: "taon-session-passcode", inputs: ["passcode", "message"] }] }); }
931
937
  }
@@ -958,7 +964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
958
964
  // TaonDbAdminComponent,
959
965
  TaonSessionPasscodeComponent,
960
966
  ], template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !taonAdminService.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <!-- #region admin tabs / header -->\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column\n width=\"200\"\n class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon-ui/assets/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !taonAdminService.draggablePopupModeFullScreen &&\n !taonAdminService.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"\n taonAdminService.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"!taonAdminService.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"taonAdminService.draggablePopupMode\"\n (click)=\"taonAdminService.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n <!-- #endregion -->\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': taonAdminService.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"taonAdminService.keepWebsqlDbDataAfterReload\"\n (change)=\"\n taonAdminService.setKeepWebsqlDbDataAfterReload(\n $event.checked\n )\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n !taonAdminService.draggablePopupModeFullScreen &&\n !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n taonAdminService.draggablePopupMode &&\n taonAdminService.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n taonAdminService.draggablePopupMode ||\n taonAdminService.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!taonAdminService.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer\n #drawer\n style=\"width: 580px\"\n [opened]=\"opened\"\n [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!taonAdminService.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n taonAdminService.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->", styles: ["section{display:block;padding:15px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"] }]
961
- }], ctorParameters: () => [{ type: i1$2.BreakpointsService }], propDecorators: { tabGroup: [{
967
+ }], ctorParameters: () => [{ type: i1$3.BreakpointsService }], propDecorators: { tabGroup: [{
962
968
  type: ViewChild,
963
969
  args: ['tabGroup']
964
970
  }], taonAdminModeConfigurationDataChanged: [{
@@ -970,6 +976,279 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
970
976
  args: ['window:resize', ['$event']]
971
977
  }] } });
972
978
 
979
+ class GoogleAuthService {
980
+ constructor(zone) {
981
+ this.zone = zone;
982
+ }
983
+ loadScript() {
984
+ return new Promise((resolve, reject) => {
985
+ if (window.google?.accounts?.id) {
986
+ resolve();
987
+ return;
988
+ }
989
+ const script = document.createElement('script');
990
+ script.src = 'https://accounts.google.com/gsi/client';
991
+ script.async = true;
992
+ script.defer = true;
993
+ script.onload = () => resolve();
994
+ script.onerror = () => reject();
995
+ document.head.appendChild(script);
996
+ });
997
+ }
998
+ renderButton(container, clientId, width) {
999
+ return new Observable(subscriber => {
1000
+ this.loadScript().then(() => {
1001
+ const google = window.google;
1002
+ google.accounts.id.initialize({
1003
+ client_id: clientId,
1004
+ auto_select: false,
1005
+ callback: (response) => {
1006
+ this.zone.run(() => {
1007
+ const payload = this.decodeJwt(response.credential);
1008
+ subscriber.next(payload);
1009
+ });
1010
+ },
1011
+ });
1012
+ google.accounts.id.disableAutoSelect();
1013
+ google.accounts.id.renderButton(container, {
1014
+ theme: 'outline',
1015
+ size: 'large',
1016
+ width,
1017
+ type: 'standard',
1018
+ });
1019
+ });
1020
+ });
1021
+ }
1022
+ decodeJwt(token) {
1023
+ const base64Url = token.split('.')[1];
1024
+ const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
1025
+ const jsonPayload = decodeURIComponent(atob(base64)
1026
+ .split('')
1027
+ .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))
1028
+ .join(''));
1029
+ return JSON.parse(jsonPayload);
1030
+ }
1031
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: GoogleAuthService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
1032
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: GoogleAuthService, providedIn: 'root' }); }
1033
+ }
1034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: GoogleAuthService, decorators: [{
1035
+ type: Injectable,
1036
+ args: [{ providedIn: 'root' }]
1037
+ }], ctorParameters: () => [{ type: i0.NgZone }] });
1038
+
1039
+ const STORAGE_KEY = 'auth_session_v1';
1040
+ class SessionService {
1041
+ constructor() {
1042
+ this.state$ = new BehaviorSubject(this.load());
1043
+ this.data$ = this.state$.asObservable();
1044
+ this.isLoggedIn$ = this.state$.pipe(map(s => !!s.isLoggedIn), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
1045
+ this.emailConfirmed$ = this.state$.pipe(map(s => !!s.emailVerified), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
1046
+ this.email$ = this.state$.pipe(map(s => s.email ?? ''), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
1047
+ }
1048
+ get snapshot() {
1049
+ return this.state$.value;
1050
+ }
1051
+ loginWithGoogle(data) {
1052
+ const next = {
1053
+ isLoggedIn: true,
1054
+ email: data.email,
1055
+ emailVerified: data.emailVerified,
1056
+ displayName: data.displayName,
1057
+ pictureUrl: data.pictureUrl,
1058
+ };
1059
+ this.state$.next(next);
1060
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
1061
+ }
1062
+ logout() {
1063
+ const next = { isLoggedIn: false };
1064
+ this.state$.next(next);
1065
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
1066
+ }
1067
+ load() {
1068
+ try {
1069
+ const raw = localStorage.getItem(STORAGE_KEY);
1070
+ if (!raw)
1071
+ return { isLoggedIn: false };
1072
+ return JSON.parse(raw);
1073
+ }
1074
+ catch {
1075
+ return { isLoggedIn: false };
1076
+ }
1077
+ }
1078
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1079
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SessionService, providedIn: 'root' }); }
1080
+ }
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: SessionService, decorators: [{
1082
+ type: Injectable,
1083
+ args: [{ providedIn: 'root' }]
1084
+ }] });
1085
+
1086
+ class AuthDialogComponent {
1087
+ constructor() {
1088
+ this.cdr = inject(ChangeDetectorRef);
1089
+ this.emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
1090
+ this.form = new FormGroup({
1091
+ email: new FormControl('', [
1092
+ Validators.required,
1093
+ Validators.pattern(this.emailRegex), // Use pattern instead of .email
1094
+ ]),
1095
+ });
1096
+ this.diableLoginByEmail = !(window.location.hostname === 'localhost');
1097
+ this.dialogRef = inject((MatDialogRef));
1098
+ this.googleAuth = inject(GoogleAuthService);
1099
+ this.session = inject(SessionService);
1100
+ this.googleButtonLoaded = false;
1101
+ }
1102
+ loginByEmail() {
1103
+ this.form.markAllAsTouched();
1104
+ this.form.updateValueAndValidity();
1105
+ if (this.form.invalid) {
1106
+ return;
1107
+ }
1108
+ const displayName = _.startCase((this.form.value.email || '').split('@')[0]);
1109
+ this.session.loginWithGoogle({
1110
+ email: this.form.value.email,
1111
+ emailVerified: true,
1112
+ displayName,
1113
+ // pictureUrl: payload.picture,
1114
+ });
1115
+ this.dialogRef.close();
1116
+ }
1117
+ ngOnInit() {
1118
+ //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
1119
+ //Add 'implements OnInit' to the class.
1120
+ if (this.diableLoginByEmail) {
1121
+ this.form.controls.email.disable();
1122
+ }
1123
+ }
1124
+ ngAfterViewInit() {
1125
+ if (!this.googleClientId) {
1126
+ console.warn('Google client id missing');
1127
+ return;
1128
+ }
1129
+ this.dialogRef.afterOpened().subscribe(() => {
1130
+ setTimeout(() => {
1131
+ const el = this.emailLoginBtn.nativeElement;
1132
+ const width = Math.floor(el.getBoundingClientRect().width);
1133
+ // el.style.width = `${width}px`;
1134
+ // console.log({ width });
1135
+ this.googleAuth
1136
+ .renderButton(this.googleBtn.nativeElement, this.googleClientId, width)
1137
+ .subscribe(payload => {
1138
+ const email = payload.email;
1139
+ const verified = !!payload.email_verified;
1140
+ this.googleButtonLoaded = true;
1141
+ this.cdr.markForCheck();
1142
+ if (email && verified) {
1143
+ this.session.loginWithGoogle({
1144
+ email,
1145
+ emailVerified: verified,
1146
+ displayName: payload.name,
1147
+ pictureUrl: payload.picture,
1148
+ });
1149
+ this.dialogRef.close();
1150
+ }
1151
+ });
1152
+ });
1153
+ });
1154
+ }
1155
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1156
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: AuthDialogComponent, isStandalone: true, selector: "app-auth-dialog", inputs: { googleClientId: "googleClientId" }, viewQueries: [{ propertyName: "emailLoginBtn", first: true, predicate: ["emailLoginBtn"], descendants: true, static: true }, { propertyName: "googleBtn", first: true, predicate: ["googleBtn"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"auth-dialog p-4\">\n <h4 class=\"mb-3\">Login or register</h4>\n\n <div\n class=\"w-full\"\n #emailLoginBtn>\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"loginByEmail()\"\n class=\"w-full\">\n <mat-form-field\n appearance=\"outline\"\n class=\"w-full email-field\">\n <mat-label *ngIf=\"!diableLoginByEmail\">Email</mat-label>\n\n <input\n matInput\n formControlName=\"email\"\n class=\"pl-1\"\n type=\"email\"\n [placeholder]=\"\n diableLoginByEmail ? 'Login by email (disabled)' : ''\n \" />\n\n <button\n mat-icon-button\n [disabled]=\"diableLoginByEmail\"\n matSuffix\n color=\"primary\">\n <mat-icon>mail</mat-icon>\n </button>\n <mat-error *ngIf=\"form.get('email')?.hasError('email')\">\n Please enter a valid email address\n </mat-error>\n </mat-form-field>\n </form>\n <div class=\"divider\">\n <span>or</span>\n </div>\n <!-- Placeholder for goole button -->\n <div\n #googleBtn\n class=\"google-container\">\n <span\n *ngIf=\"!googleButtonLoaded\"\n class=\"text-300 p-2\"\n >loading google button..</span\n >\n <mat-progress-bar\n *ngIf=\"!googleButtonLoaded\"\n mode=\"indeterminate\"\n class=\"auth-progress\" />\n </div>\n </div>\n <br />\n <!-- <mat-divider class=\"my-3\"></mat-divider> -->\n\n <div class=\"flex justify-content-end\">\n <button\n mat-button\n mat-dialog-close>\n Cancel\n </button>\n </div>\n</div>", styles: [".auth-dialog{width:100%}.google-container{width:100%;height:50px;border-color:#9ca3af!important}:host::ng-deep .email-field .mdc-notched-outline__trailing,:host::ng-deep .email-field .mdc-notched-outline__leading,:host::ng-deep .email-field .mdc-notched-outline__notch{border-color:#9ca3af!important}:host ::ng-deep .auth-progress .mdc-linear-progress__bar-inner{border-color:#9ca3af!important}.divider{display:flex;align-items:center;text-align:center;width:100%;margin:1rem 0}.divider:before,.divider:after{content:\"\";flex:1;border-bottom:1px solid #ccc}.divider span{padding:0 10px;color:#666;font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MtxLoaderModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1157
+ }
1158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthDialogComponent, decorators: [{
1159
+ type: Component,
1160
+ args: [{ selector: 'app-auth-dialog', standalone: true, imports: [
1161
+ CommonModule,
1162
+ MatDialogModule,
1163
+ MatButtonModule,
1164
+ MatIconModule,
1165
+ MatDividerModule,
1166
+ MatInputModule,
1167
+ MatProgressSpinnerModule,
1168
+ MatProgressBarModule,
1169
+ MtxLoaderModule,
1170
+ ButtonModule,
1171
+ InputTextModule,
1172
+ ReactiveFormsModule,
1173
+ FormsModule,
1174
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"auth-dialog p-4\">\n <h4 class=\"mb-3\">Login or register</h4>\n\n <div\n class=\"w-full\"\n #emailLoginBtn>\n <form\n [formGroup]=\"form\"\n (ngSubmit)=\"loginByEmail()\"\n class=\"w-full\">\n <mat-form-field\n appearance=\"outline\"\n class=\"w-full email-field\">\n <mat-label *ngIf=\"!diableLoginByEmail\">Email</mat-label>\n\n <input\n matInput\n formControlName=\"email\"\n class=\"pl-1\"\n type=\"email\"\n [placeholder]=\"\n diableLoginByEmail ? 'Login by email (disabled)' : ''\n \" />\n\n <button\n mat-icon-button\n [disabled]=\"diableLoginByEmail\"\n matSuffix\n color=\"primary\">\n <mat-icon>mail</mat-icon>\n </button>\n <mat-error *ngIf=\"form.get('email')?.hasError('email')\">\n Please enter a valid email address\n </mat-error>\n </mat-form-field>\n </form>\n <div class=\"divider\">\n <span>or</span>\n </div>\n <!-- Placeholder for goole button -->\n <div\n #googleBtn\n class=\"google-container\">\n <span\n *ngIf=\"!googleButtonLoaded\"\n class=\"text-300 p-2\"\n >loading google button..</span\n >\n <mat-progress-bar\n *ngIf=\"!googleButtonLoaded\"\n mode=\"indeterminate\"\n class=\"auth-progress\" />\n </div>\n </div>\n <br />\n <!-- <mat-divider class=\"my-3\"></mat-divider> -->\n\n <div class=\"flex justify-content-end\">\n <button\n mat-button\n mat-dialog-close>\n Cancel\n </button>\n </div>\n</div>", styles: [".auth-dialog{width:100%}.google-container{width:100%;height:50px;border-color:#9ca3af!important}:host::ng-deep .email-field .mdc-notched-outline__trailing,:host::ng-deep .email-field .mdc-notched-outline__leading,:host::ng-deep .email-field .mdc-notched-outline__notch{border-color:#9ca3af!important}:host ::ng-deep .auth-progress .mdc-linear-progress__bar-inner{border-color:#9ca3af!important}.divider{display:flex;align-items:center;text-align:center;width:100%;margin:1rem 0}.divider:before,.divider:after{content:\"\";flex:1;border-bottom:1px solid #ccc}.divider span{padding:0 10px;color:#666;font-size:14px}\n"] }]
1175
+ }], propDecorators: { googleClientId: [{
1176
+ type: Input,
1177
+ args: [{ required: true }]
1178
+ }], emailLoginBtn: [{
1179
+ type: ViewChild,
1180
+ args: ['emailLoginBtn', { static: true }]
1181
+ }], googleBtn: [{
1182
+ type: ViewChild,
1183
+ args: ['googleBtn', { static: true }]
1184
+ }] } });
1185
+
1186
+ class AuthButtonComponent {
1187
+ constructor() {
1188
+ this.session = inject(SessionService);
1189
+ this.dialog = inject(MatDialog);
1190
+ this.router = inject(Router);
1191
+ }
1192
+ openLogin() {
1193
+ this.dialog.open(AuthDialogComponent, {
1194
+ width: '410px',
1195
+ data: null,
1196
+ }).componentInstance.googleClientId = this.googleClientId;
1197
+ }
1198
+ goDashboard() {
1199
+ if (this.linkToDashboard) {
1200
+ this.router.navigateByUrl(this.linkToDashboard);
1201
+ }
1202
+ }
1203
+ logout() {
1204
+ this.session.logout();
1205
+ }
1206
+ ngOnInit() {
1207
+ //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
1208
+ //Add 'implements OnInit' to the class.
1209
+ // console.log('this.displayDashboardButton', this.displayDashboardButton);
1210
+ this.displayDashboardButton = _.isBoolean(this.displayDashboardButton)
1211
+ ? this.displayDashboardButton
1212
+ : true;
1213
+ }
1214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1215
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: AuthButtonComponent, isStandalone: true, selector: "taon-auth-button", inputs: { linkToDashboard: "linkToDashboard", googleClientId: "googleClientId", displayDashboardButton: "displayDashboardButton" }, ngImport: i0, template: "<div class=\"flex align-items-center gap-2\">\n <ng-container *ngIf=\"(session.isLoggedIn$ | async) === false; else loggedIn\">\n <button\n mat-button\n (click)=\"openLogin()\">\n Login\n </button>\n </ng-container>\n\n <ng-template #loggedIn>\n <button\n *ngIf=\"displayDashboardButton\"\n mat-button\n color=\"primary\"\n class=\"auth-btn\"\n (click)=\"goDashboard()\">\n <mat-icon>dashboard</mat-icon>\n Dashboard\n </button>\n\n <button\n mat-button\n class=\"ml-2\"\n (click)=\"logout()\">\n Logout ({{ (session.data$ | async)?.displayName }})\n </button>\n </ng-template>\n</div>", styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1216
+ }
1217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthButtonComponent, decorators: [{
1218
+ type: Component,
1219
+ args: [{ selector: 'taon-auth-button', standalone: true, imports: [CommonModule, MatButtonModule, ButtonModule, MatIconModule], template: "<div class=\"flex align-items-center gap-2\">\n <ng-container *ngIf=\"(session.isLoggedIn$ | async) === false; else loggedIn\">\n <button\n mat-button\n (click)=\"openLogin()\">\n Login\n </button>\n </ng-container>\n\n <ng-template #loggedIn>\n <button\n *ngIf=\"displayDashboardButton\"\n mat-button\n color=\"primary\"\n class=\"auth-btn\"\n (click)=\"goDashboard()\">\n <mat-icon>dashboard</mat-icon>\n Dashboard\n </button>\n\n <button\n mat-button\n class=\"ml-2\"\n (click)=\"logout()\">\n Logout ({{ (session.data$ | async)?.displayName }})\n </button>\n </ng-template>\n</div>", styles: [":host{display:inline-flex}\n"] }]
1220
+ }], propDecorators: { linkToDashboard: [{
1221
+ type: Input,
1222
+ args: [{ required: true }]
1223
+ }], googleClientId: [{
1224
+ type: Input,
1225
+ args: [{ required: true }]
1226
+ }], displayDashboardButton: [{
1227
+ type: Input
1228
+ }] } });
1229
+
1230
+ class AuthGuard {
1231
+ constructor(session, router) {
1232
+ this.session = session;
1233
+ this.router = router;
1234
+ }
1235
+ canActivate() {
1236
+ return this.session.isLoggedIn$.pipe(take(1), map(isLoggedIn => {
1237
+ if (isLoggedIn) {
1238
+ return true;
1239
+ }
1240
+ // redirect to home or login page
1241
+ return this.router.parseUrl('/');
1242
+ }));
1243
+ }
1244
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthGuard, deps: [{ token: SessionService }, { token: i2$4.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
1245
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
1246
+ }
1247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: AuthGuard, decorators: [{
1248
+ type: Injectable,
1249
+ args: [{ providedIn: 'root' }]
1250
+ }], ctorParameters: () => [{ type: SessionService }, { type: i2$4.Router }] });
1251
+
973
1252
  //#region imports
974
1253
  //#endregion
975
1254
  class TaonGithubForkMeCornerComponent {
@@ -1087,7 +1366,7 @@ class TaonIframeSyncComponent {
1087
1366
  }
1088
1367
  setupSync() {
1089
1368
  this.route.queryParamMap
1090
- .pipe(distinctUntilChanged((a, b) => a.get(this.queryParamKey) === b.get(this.queryParamKey)), takeUntil$1(this.destroy$))
1369
+ .pipe(distinctUntilChanged$1((a, b) => a.get(this.queryParamKey) === b.get(this.queryParamKey)), takeUntil$1(this.destroy$))
1091
1370
  .subscribe(() => this.sendNavigateIfReady());
1092
1371
  this.router.events
1093
1372
  .pipe(filter((e) => e instanceof NavigationEnd), takeUntil$1(this.destroy$))
@@ -1217,6 +1496,343 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
1217
1496
  type: Input
1218
1497
  }] } });
1219
1498
 
1499
+ class TaonKvAuthorizationComponent {
1500
+ constructor() {
1501
+ this.products = [];
1502
+ this.authorizedProducts = new EventEmitter();
1503
+ this.loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : []));
1504
+ this.authorizedProductsData = signal([], ...(ngDevMode ? [{ debugName: "authorizedProductsData" }] : []));
1505
+ }
1506
+ async ngOnInit() {
1507
+ const worker = new TaonStripeCloudflareWorker(this.url);
1508
+ const results = [];
1509
+ for (const product of this.products) {
1510
+ try {
1511
+ const authorized = await worker.checkAccess({
1512
+ clientEmail: this.email,
1513
+ productId: product.stripeProductId,
1514
+ });
1515
+ results.push({
1516
+ ...product,
1517
+ authorized,
1518
+ });
1519
+ }
1520
+ catch {
1521
+ results.push({
1522
+ ...product,
1523
+ authorized: false,
1524
+ });
1525
+ }
1526
+ }
1527
+ this.authorizedProductsData.set(results);
1528
+ this.loading.set(false);
1529
+ this.authorizedProducts.emit(results);
1530
+ }
1531
+ authorizedCount() {
1532
+ return this.authorizedProductsData().filter(p => p.authorized).length;
1533
+ }
1534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonKvAuthorizationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonKvAuthorizationComponent, isStandalone: true, selector: "taon-kv-authorization", inputs: { email: "email", url: "url", products: "products" }, outputs: { authorizedProducts: "authorizedProducts" }, ngImport: i0, template: "<div class=\"taon-kv-authorization\">\n <div *ngIf=\"loading()\">Loading authorization info...</div>\n\n <div *ngIf=\"!loading()\">\n <div *ngIf=\"authorizedCount() === 0\">You did not purchase any products</div>\n\n <div *ngIf=\"authorizedCount() > 0\">\n You purchased {{ authorizedCount() }} products\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1536
+ }
1537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonKvAuthorizationComponent, decorators: [{
1538
+ type: Component,
1539
+ args: [{ selector: 'taon-kv-authorization', standalone: true, imports: [CommonModule], template: "<div class=\"taon-kv-authorization\">\n <div *ngIf=\"loading()\">Loading authorization info...</div>\n\n <div *ngIf=\"!loading()\">\n <div *ngIf=\"authorizedCount() === 0\">You did not purchase any products</div>\n\n <div *ngIf=\"authorizedCount() > 0\">\n You purchased {{ authorizedCount() }} products\n </div>\n </div>\n</div>" }]
1540
+ }], propDecorators: { email: [{
1541
+ type: Input,
1542
+ args: [{ required: true }]
1543
+ }], url: [{
1544
+ type: Input,
1545
+ args: [{ required: true }]
1546
+ }], products: [{
1547
+ type: Input,
1548
+ args: [{ required: true }]
1549
+ }], authorizedProducts: [{
1550
+ type: Output
1551
+ }] } });
1552
+
1553
+ class TaonRumbleComponent {
1554
+ constructor() {
1555
+ this.sanitizer = inject(DomSanitizer);
1556
+ this.state = 'video-preview-open';
1557
+ this.paddlockClicked = new EventEmitter();
1558
+ this.previewClicked = new EventEmitter();
1559
+ // get embedUrl(): string {
1560
+ // return `https://rumble.com/embed/${this.clipId}`;
1561
+ // }
1562
+ this.embedUrl = computed(() => this.sanitizer.bypassSecurityTrustResourceUrl(`https://rumble.com/embed/${this.clipId}`), ...(ngDevMode ? [{ debugName: "embedUrl" }] : []));
1563
+ }
1564
+ onPreviewClick() {
1565
+ this.previewClicked.emit();
1566
+ }
1567
+ onPadlockClick(event) {
1568
+ event.stopPropagation();
1569
+ this.paddlockClicked.emit();
1570
+ }
1571
+ isPreview() {
1572
+ return (this.state === 'preview-picture' ||
1573
+ this.state === 'preview-picture-locked');
1574
+ }
1575
+ isLocked() {
1576
+ return this.state === 'preview-picture-locked';
1577
+ }
1578
+ isVideoOpen() {
1579
+ return this.state === 'video-preview-open';
1580
+ }
1581
+ isPrivate() {
1582
+ return this.state === 'video-preview-private';
1583
+ }
1584
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonRumbleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1585
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonRumbleComponent, isStandalone: true, selector: "taon-rumble", inputs: { title: "title", clipId: "clipId", picturePreviewUrl: "picturePreviewUrl", state: "state" }, outputs: { paddlockClicked: "paddlockClicked", previewClicked: "previewClicked" }, ngImport: i0, template: "<div class=\"taon-rumble\">\n <!-- PREVIEW MODE -->\n <div\n *ngIf=\"isPreview()\"\n class=\"preview\"\n (click)=\"onPreviewClick()\">\n <img\n class=\"preview-img\"\n [src]=\"picturePreviewUrl\"\n [alt]=\"title\" />\n\n <div class=\"title\">\n {{ title }}\n </div>\n\n <!-- PLAY BUTTON -->\n <div class=\"play-button\">\u25B6</div>\n\n <!-- LOCK -->\n <div\n *ngIf=\"isLocked()\"\n class=\"lock\"\n (click)=\"onPadlockClick($event)\">\n \uD83D\uDD12\n </div>\n </div>\n\n <!-- VIDEO OPEN -->\n <div\n *ngIf=\"isVideoOpen()\"\n class=\"video\">\n <iframe\n class=\"rumble-frame\"\n [src]=\"embedUrl()\"\n frameborder=\"0\"\n allowfullscreen>\n </iframe>\n </div>\n\n <!-- PRIVATE VIDEO -->\n <div\n *ngIf=\"isPrivate()\"\n class=\"private\">\n <div class=\"private-box\">\uD83D\uDD12 Private video</div>\n </div>\n</div>", styles: [".taon-rumble{width:100%;max-width:640px;margin:auto;position:relative;font-family:inherit}.preview{position:relative;cursor:pointer;overflow:hidden;border-radius:10px}.preview-img{width:100%;display:block}.title{position:absolute;left:0;bottom:0;right:0;padding:10px 14px;background:linear-gradient(transparent,#000c);color:#fff;font-size:14px}.play-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:40px;color:#fff;background:#00000080;width:70px;height:70px;display:flex;align-items:center;justify-content:center;border-radius:50%}.lock{position:absolute;top:10px;right:10px;font-size:20px;background:#0009;color:#fff;padding:6px 8px;border-radius:6px}.video{position:relative;padding-top:56.25%}.rumble-frame{position:absolute;top:0;left:0;width:100%;height:100%}.private{display:flex;align-items:center;justify-content:center;height:200px;background:#111;color:#fff}.private-box{opacity:.7}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1586
+ }
1587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonRumbleComponent, decorators: [{
1588
+ type: Component,
1589
+ args: [{ selector: 'taon-rumble', standalone: true, imports: [NgIf], template: "<div class=\"taon-rumble\">\n <!-- PREVIEW MODE -->\n <div\n *ngIf=\"isPreview()\"\n class=\"preview\"\n (click)=\"onPreviewClick()\">\n <img\n class=\"preview-img\"\n [src]=\"picturePreviewUrl\"\n [alt]=\"title\" />\n\n <div class=\"title\">\n {{ title }}\n </div>\n\n <!-- PLAY BUTTON -->\n <div class=\"play-button\">\u25B6</div>\n\n <!-- LOCK -->\n <div\n *ngIf=\"isLocked()\"\n class=\"lock\"\n (click)=\"onPadlockClick($event)\">\n \uD83D\uDD12\n </div>\n </div>\n\n <!-- VIDEO OPEN -->\n <div\n *ngIf=\"isVideoOpen()\"\n class=\"video\">\n <iframe\n class=\"rumble-frame\"\n [src]=\"embedUrl()\"\n frameborder=\"0\"\n allowfullscreen>\n </iframe>\n </div>\n\n <!-- PRIVATE VIDEO -->\n <div\n *ngIf=\"isPrivate()\"\n class=\"private\">\n <div class=\"private-box\">\uD83D\uDD12 Private video</div>\n </div>\n</div>", styles: [".taon-rumble{width:100%;max-width:640px;margin:auto;position:relative;font-family:inherit}.preview{position:relative;cursor:pointer;overflow:hidden;border-radius:10px}.preview-img{width:100%;display:block}.title{position:absolute;left:0;bottom:0;right:0;padding:10px 14px;background:linear-gradient(transparent,#000c);color:#fff;font-size:14px}.play-button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:40px;color:#fff;background:#00000080;width:70px;height:70px;display:flex;align-items:center;justify-content:center;border-radius:50%}.lock{position:absolute;top:10px;right:10px;font-size:20px;background:#0009;color:#fff;padding:6px 8px;border-radius:6px}.video{position:relative;padding-top:56.25%}.rumble-frame{position:absolute;top:0;left:0;width:100%;height:100%}.private{display:flex;align-items:center;justify-content:center;height:200px;background:#111;color:#fff}.private-box{opacity:.7}\n"] }]
1590
+ }], propDecorators: { title: [{
1591
+ type: Input,
1592
+ args: [{
1593
+ required: true,
1594
+ }]
1595
+ }], clipId: [{
1596
+ type: Input,
1597
+ args: [{
1598
+ required: true,
1599
+ }]
1600
+ }], picturePreviewUrl: [{
1601
+ type: Input,
1602
+ args: [{
1603
+ required: true,
1604
+ }]
1605
+ }], state: [{
1606
+ type: Input
1607
+ }], paddlockClicked: [{
1608
+ type: Output
1609
+ }], previewClicked: [{
1610
+ type: Output
1611
+ }] } });
1612
+
1613
+ var TaonThemeMode;
1614
+ (function (TaonThemeMode) {
1615
+ TaonThemeMode["AUTO"] = "auto";
1616
+ TaonThemeMode["LIGHT"] = "light";
1617
+ TaonThemeMode["DARK"] = "dark";
1618
+ })(TaonThemeMode || (TaonThemeMode = {}));
1619
+ class TaonThemeService {
1620
+ constructor() {
1621
+ this.TAON_THEME_KEY = 'taon-theme-mode';
1622
+ this.platformId = inject(PLATFORM_ID);
1623
+ this.isBrowser = isPlatformBrowser(this.platformId);
1624
+ this.mediaQuery = null;
1625
+ this.mode = signal(TaonThemeMode.AUTO, ...(ngDevMode ? [{ debugName: "mode" }] : []));
1626
+ this.isDark = signal(false, ...(ngDevMode ? [{ debugName: "isDark" }] : []));
1627
+ if (!this.isBrowser)
1628
+ return;
1629
+ this.mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
1630
+ // Load saved mode
1631
+ const saved = localStorage.getItem(this.TAON_THEME_KEY);
1632
+ if (saved) {
1633
+ this.mode.set(saved);
1634
+ }
1635
+ // React to system changes
1636
+ this.mediaQuery.addEventListener('change', e => {
1637
+ if (this.mode() === TaonThemeMode.AUTO) {
1638
+ this.apply(e.matches);
1639
+ }
1640
+ });
1641
+ // React to mode changes
1642
+ effect(() => {
1643
+ const currentMode = this.mode();
1644
+ localStorage.setItem(this.TAON_THEME_KEY, currentMode);
1645
+ const dark = currentMode === TaonThemeMode.AUTO
1646
+ ? (this.mediaQuery?.matches ?? false)
1647
+ : currentMode === TaonThemeMode.DARK;
1648
+ this.apply(dark);
1649
+ });
1650
+ }
1651
+ apply(dark) {
1652
+ this.isDark.set(dark);
1653
+ const root = document.documentElement;
1654
+ root.classList.toggle('dark-taon-theme', dark);
1655
+ root.classList.toggle('light-taon-theme', !dark);
1656
+ }
1657
+ setMode(mode) {
1658
+ this.mode.set(mode);
1659
+ }
1660
+ toogleAuto(auto) {
1661
+ if (auto) {
1662
+ this.mode.set(TaonThemeMode.AUTO);
1663
+ }
1664
+ else {
1665
+ this.mode.set(TaonThemeMode.LIGHT);
1666
+ }
1667
+ }
1668
+ setDark(yes) {
1669
+ if (yes) {
1670
+ this.mode.set(TaonThemeMode.DARK);
1671
+ }
1672
+ else {
1673
+ this.mode.set(TaonThemeMode.LIGHT);
1674
+ }
1675
+ }
1676
+ toggle() {
1677
+ this.setMode(this.isDark() ? TaonThemeMode.LIGHT : TaonThemeMode.DARK);
1678
+ }
1679
+ isAuto() {
1680
+ return this.mode() === TaonThemeMode.AUTO;
1681
+ }
1682
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1683
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, providedIn: 'root' }); }
1684
+ }
1685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, decorators: [{
1686
+ type: Injectable,
1687
+ args: [{ providedIn: 'root' }]
1688
+ }], ctorParameters: () => [] });
1689
+
1690
+ class TaonThemeComponent {
1691
+ constructor() {
1692
+ this.TaonThemeMode = TaonThemeMode;
1693
+ this.taonTheme = inject(TaonThemeService);
1694
+ }
1695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonThemeComponent, isStandalone: true, selector: "taon-theme", ngImport: i0, template: "<div class=\"p-4\">\n <h2>Theme settings</h2>\n\n <mat-slide-toggle\n class=\"p-2\"\n [checked]=\"taonTheme.isAuto()\"\n (change)=\"taonTheme.toogleAuto($event.checked)\">\n Sync colors with system\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"p-2\"\n [checked]=\"taonTheme.isDark()\"\n [disabled]=\"taonTheme.isAuto()\"\n (change)=\"taonTheme.setDark($event.checked)\">\n Dark mode\n </mat-slide-toggle>\n</div>", dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
1697
+ }
1698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeComponent, decorators: [{
1699
+ type: Component,
1700
+ args: [{ selector: 'taon-theme', imports: [MatSlideToggleModule], template: "<div class=\"p-4\">\n <h2>Theme settings</h2>\n\n <mat-slide-toggle\n class=\"p-2\"\n [checked]=\"taonTheme.isAuto()\"\n (change)=\"taonTheme.toogleAuto($event.checked)\">\n Sync colors with system\n </mat-slide-toggle>\n\n <mat-slide-toggle\n class=\"p-2\"\n [checked]=\"taonTheme.isDark()\"\n [disabled]=\"taonTheme.isAuto()\"\n (change)=\"taonTheme.setDark($event.checked)\">\n Dark mode\n </mat-slide-toggle>\n</div>" }]
1701
+ }] });
1702
+
1703
+ //#region imports
1704
+ //#endregion
1705
+ class TaonSimpleLayoutComponent {
1706
+ constructor() {
1707
+ this.router = inject(Router);
1708
+ this.dialog = inject(MatDialog);
1709
+ this.theme = inject(TaonThemeService);
1710
+ this.navItems = input(...(ngDevMode ? [undefined, { debugName: "navItems" }] : []));
1711
+ }
1712
+ navigateTo(item) {
1713
+ this.router.navigateByUrl(item.path);
1714
+ }
1715
+ openDialog(enterAnimationDuration, exitAnimationDuration) {
1716
+ this.dialog.open(TaonThemeComponent, {
1717
+ width: '400px',
1718
+ enterAnimationDuration,
1719
+ exitAnimationDuration,
1720
+ });
1721
+ }
1722
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonSimpleLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1723
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: TaonSimpleLayoutComponent, isStandalone: true, selector: "taon-simple-layout", inputs: { navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<header\n class=\"shadow-1 inline-flex w-full justify-content-end align-items-center flex-row\">\n <div class=\"flex-grow-1 align-items-center justify-content-center flex-row\">\n @if (navItems()?.length > 0) {\n <nav\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\">\n @for (item of navItems(); track item.path) {\n <a\n mat-tab-link\n href=\"javascript:void(0)\"\n [style.text-decoration]=\"\n (activePath === item.path && !forceShowBaseRootApp) ||\n ('/' === item.path && forceShowBaseRootApp)\n ? 'underline'\n : 'none'\n \"\n (click)=\"navigateTo(item)\">\n @if (item.path === '/') {\n <mat-icon\n aria-hidden=\"false\"\n aria-label=\"Example home icon\"\n fontIcon=\"home\"></mat-icon>\n } @else {\n {{ item.label }}\n }\n </a>\n }\n </nav>\n }\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div\n class=\"flex-grow-0 flex align-items-center justify-content-center flex-row\">\n <!-- <taon-theme class=\"right-0\" /> -->\n <ng-content select=\"[buttons]\"></ng-content>\n <button\n class=\"flex mr-2\"\n (click)=\"openDialog(200, 200)\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </button>\n </div>\n</header>\n\n<mat-tab-nav-panel\n #tabPanel\n class=\"pt-2\">\n <div class=\"projected-wrapper\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"fallback-message\">\n Please add your component inside\n <br />\n <pre>\n <code class=\"surface-100 block\">\n &lt;taon-simple-layout class=&quot;p-4&quot;&gt;\n &lt;header\n header\n class=&quot;flex-item&quot;&gt;\n &lt;img\n class=&quot;border-round&quot;\n src=&quot;assets/assets-for/taon-ui/assets/images/pluszka-logo.png&quot;\n height=&quot;50px&quot; /&gt;\n &lt;/header&gt;\n &lt;br /&gt;\n &lt;h3 class=&quot;text-blue-200&quot;&gt;Welcome to hamster store.&lt;/h3&gt;\n &lt;h3 class=&quot;text-blue-300&quot;&gt;Buy cheap hamster videos for free!&lt;/h3&gt;\n &lt;h3 class=&quot;text-blue-300&quot;&gt;Subscribe more hamsters video daily!&lt;/h3&gt;\n\n &lt;ng-container buttons&gt;\n &lt;button\n mat-button\n class=&quot;flex align-items-center&quot;&gt;\n Hello niga!\n &lt;/button&gt;\n &lt;/ng-container&gt;\n &lt;/taon-simple-layout&gt;\n </code>\n </pre>\n </div>\n</mat-tab-nav-panel>", styles: [":host{display:block}:host header{z-index:999}:host header nav{max-width:400px}.projected-wrapper:not(:empty)+.fallback-message{display:none}.projected-wrapper:empty{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatListModule }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i3.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i3.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i3.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: MatDialogModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1724
+ }
1725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonSimpleLayoutComponent, decorators: [{
1726
+ type: Component,
1727
+ args: [{ selector: 'taon-simple-layout', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1728
+ RouterOutlet,
1729
+ AsyncPipe,
1730
+ MatCardModule,
1731
+ MatIconModule,
1732
+ MatDividerModule,
1733
+ MatButtonModule,
1734
+ MatListModule,
1735
+ MatTabsModule,
1736
+ RouterModule,
1737
+ MatDialogModule,
1738
+ JsonPipe,
1739
+ TaonThemeComponent,
1740
+ ], template: "<header\n class=\"shadow-1 inline-flex w-full justify-content-end align-items-center flex-row\">\n <div class=\"flex-grow-1 align-items-center justify-content-center flex-row\">\n @if (navItems()?.length > 0) {\n <nav\n mat-tab-nav-bar\n [tabPanel]=\"tabPanel\">\n @for (item of navItems(); track item.path) {\n <a\n mat-tab-link\n href=\"javascript:void(0)\"\n [style.text-decoration]=\"\n (activePath === item.path && !forceShowBaseRootApp) ||\n ('/' === item.path && forceShowBaseRootApp)\n ? 'underline'\n : 'none'\n \"\n (click)=\"navigateTo(item)\">\n @if (item.path === '/') {\n <mat-icon\n aria-hidden=\"false\"\n aria-label=\"Example home icon\"\n fontIcon=\"home\"></mat-icon>\n } @else {\n {{ item.label }}\n }\n </a>\n }\n </nav>\n }\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div\n class=\"flex-grow-0 flex align-items-center justify-content-center flex-row\">\n <!-- <taon-theme class=\"right-0\" /> -->\n <ng-content select=\"[buttons]\"></ng-content>\n <button\n class=\"flex mr-2\"\n (click)=\"openDialog(200, 200)\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </button>\n </div>\n</header>\n\n<mat-tab-nav-panel\n #tabPanel\n class=\"pt-2\">\n <div class=\"projected-wrapper\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"fallback-message\">\n Please add your component inside\n <br />\n <pre>\n <code class=\"surface-100 block\">\n &lt;taon-simple-layout class=&quot;p-4&quot;&gt;\n &lt;header\n header\n class=&quot;flex-item&quot;&gt;\n &lt;img\n class=&quot;border-round&quot;\n src=&quot;assets/assets-for/taon-ui/assets/images/pluszka-logo.png&quot;\n height=&quot;50px&quot; /&gt;\n &lt;/header&gt;\n &lt;br /&gt;\n &lt;h3 class=&quot;text-blue-200&quot;&gt;Welcome to hamster store.&lt;/h3&gt;\n &lt;h3 class=&quot;text-blue-300&quot;&gt;Buy cheap hamster videos for free!&lt;/h3&gt;\n &lt;h3 class=&quot;text-blue-300&quot;&gt;Subscribe more hamsters video daily!&lt;/h3&gt;\n\n &lt;ng-container buttons&gt;\n &lt;button\n mat-button\n class=&quot;flex align-items-center&quot;&gt;\n Hello niga!\n &lt;/button&gt;\n &lt;/ng-container&gt;\n &lt;/taon-simple-layout&gt;\n </code>\n </pre>\n </div>\n</mat-tab-nav-panel>", styles: [":host{display:block}:host header{z-index:999}:host header nav{max-width:400px}.projected-wrapper:not(:empty)+.fallback-message{display:none}.projected-wrapper:empty{display:none}\n"] }]
1741
+ }], propDecorators: { navItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "navItems", required: false }] }] } });
1742
+
1743
+ //#endregion
1744
+ const TaonSimpleLayoutRoutes = [
1745
+ {
1746
+ path: '',
1747
+ component: TaonSimpleLayoutComponent,
1748
+ },
1749
+ // {
1750
+ // path: 'anothermodulepath',
1751
+ // loadChildren: () => import('anothermodule')
1752
+ // .then(m => m.AnotherLazyModule),
1753
+ // },
1754
+ ];
1755
+
1756
+ class TaonStripeBuyButtonComponent {
1757
+ constructor() {
1758
+ /**
1759
+ * optional label
1760
+ */
1761
+ this.label = 'Buy now';
1762
+ this.loading = false;
1763
+ }
1764
+ ngOnInit() {
1765
+ //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
1766
+ //Add 'implements OnInit' to the class.
1767
+ this.successUrl = _.isString(this.successUrl)
1768
+ ? this.successUrl
1769
+ : `${location.href.split('?')[0]}?success=true&productId=${this.productId}`;
1770
+ this.cancelUrl = _.isString(this.cancelUrl)
1771
+ ? this.cancelUrl
1772
+ : `${location.href.split('?')[0]}?cancel=true`;
1773
+ // console.log({successUrl:this.successUrl})
1774
+ // console.log({cancelUrl:this.cancelUrl})
1775
+ }
1776
+ async buy() {
1777
+ if (!this.priceId || !this.workerUrl || !this.email) {
1778
+ console.error('Missing stripe parameters');
1779
+ return;
1780
+ }
1781
+ this.loading = true;
1782
+ try {
1783
+ const resp = await fetch(`${this.workerUrl}/create-checkout-session`, {
1784
+ method: 'POST',
1785
+ headers: {
1786
+ 'Content-Type': 'application/json',
1787
+ },
1788
+ body: JSON.stringify({
1789
+ priceId: this.priceId,
1790
+ email: this.email,
1791
+ success_url: this.successUrl,
1792
+ cancel_url: this.cancelUrl,
1793
+ }),
1794
+ });
1795
+ const data = await resp.json();
1796
+ if (data?.url) {
1797
+ window.location.href = data.url;
1798
+ }
1799
+ else {
1800
+ console.error('Stripe checkout url missing', data);
1801
+ }
1802
+ }
1803
+ catch (err) {
1804
+ console.error('Stripe checkout error', err);
1805
+ }
1806
+ finally {
1807
+ this.loading = false;
1808
+ }
1809
+ }
1810
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonStripeBuyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1811
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonStripeBuyButtonComponent, isStandalone: true, selector: "taon-stripe-buy-button", inputs: { priceId: "priceId", productId: "productId", workerUrl: "workerUrl", email: "email", successUrl: "successUrl", cancelUrl: "cancelUrl", label: "label" }, ngImport: i0, template: "<button\n type=\"button\"\n matButton=\"filled\"\n (click)=\"buy()\"\n [disabled]=\"loading\">\n <span *ngIf=\"!loading\">\n {{ label }}\n </span>\n\n <span *ngIf=\"loading\"> Redirecting to Stripe... </span>\n</button>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] }); }
1812
+ }
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonStripeBuyButtonComponent, decorators: [{
1814
+ type: Component,
1815
+ args: [{ selector: 'taon-stripe-buy-button', imports: [CommonModule, MatButtonModule], template: "<button\n type=\"button\"\n matButton=\"filled\"\n (click)=\"buy()\"\n [disabled]=\"loading\">\n <span *ngIf=\"!loading\">\n {{ label }}\n </span>\n\n <span *ngIf=\"loading\"> Redirecting to Stripe... </span>\n</button>" }]
1816
+ }], propDecorators: { priceId: [{
1817
+ type: Input,
1818
+ args: [{ required: true }]
1819
+ }], productId: [{
1820
+ type: Input,
1821
+ args: [{ required: true }]
1822
+ }], workerUrl: [{
1823
+ type: Input,
1824
+ args: [{ required: true }]
1825
+ }], email: [{
1826
+ type: Input,
1827
+ args: [{ required: true }]
1828
+ }], successUrl: [{
1829
+ type: Input
1830
+ }], cancelUrl: [{
1831
+ type: Input
1832
+ }], label: [{
1833
+ type: Input
1834
+ }] } });
1835
+
1220
1836
  //#region imports
1221
1837
  //#endregion
1222
1838
  //#region constants
@@ -1265,7 +1881,7 @@ class TaonTableComponent {
1265
1881
  //#region hooks / on init
1266
1882
  async ngOnInit() {
1267
1883
  if (!this.hideSearch) {
1268
- this.searchInputChange$ = defer(() => fromEvent(this.search?.nativeElement, 'keyup')).pipe(map(c => c.target['value']), debounceTime(500), distinctUntilChanged$1(), share(), tap(data => {
1884
+ this.searchInputChange$ = defer(() => fromEvent(this.search?.nativeElement, 'keyup')).pipe(map(c => c.target['value']), debounceTime(500), distinctUntilChanged(), share(), tap(data => {
1269
1885
  console.log({ data });
1270
1886
  }));
1271
1887
  this.sub.add(this.searchInputChange$.subscribe());
@@ -1396,7 +2012,7 @@ class TaonTableComponent {
1396
2012
  log.i('context menu event', e);
1397
2013
  }
1398
2014
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonTableComponent, isStandalone: false, selector: "taon-table", inputs: { pageNumber: "pageNumber", pageSize: "pageSize", allowedColumns: "allowedColumns", expansionTemplate: "expansionTemplate", rows: "rows", entityCrudController: "entityCrudController", columns: "columns", pageSizeOptions: "pageSizeOptions", hideSearch: "hideSearch" }, outputs: { expansionChange: "expansionChange", addingItem: "addingItem" }, viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true, static: true }], ngImport: i0, template: "<br />\n<columns-container *ngIf=\"!hideSearch\">\n <column grow>\n <mat-form-field class=\"search-input\">\n <input\n matInput\n placeholder=\"Type to search table...\"\n #search />\n </mat-form-field>\n </column>\n <column [width]=\"80\">\n <button\n mat-fab\n [ngClass]=\"{ 'half-opacity': !search.value }\"\n class=\"undo-button\"\n color=\"secondary\"\n (click)=\"search.value = ''\">\n <mat-icon>close </mat-icon>\n </button>\n </column>\n\n <column [width]=\"80\">\n <button\n mat-fab\n (click)=\"addingItem.next()\"\n class=\"undo-button\"\n color=\"primary\">\n <mat-icon>add</mat-icon>\n </button>\n </column>\n</columns-container>\n\n<mtx-grid\n *ngIf=\"rows && columns\"\n [data]=\"rows\"\n [columns]=\"columns\"\n [expandable]=\"expandable\"\n [expansionTemplate]=\"expansionTemplate\"\n (expansionChange)=\"expansionRow($event)\"\n [length]=\"totalElements\"\n\n [pageOnFront]=\"false\"\n [pageIndex]=\"pageNumber - 1\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showPaginator]=\"showPaginator\"\n (page)=\"getNextPage($event)\">\n</mtx-grid>\n\n<!-- [loading]=\"isLoading\" -->", styles: [":host{min-height:250px}.search-input{width:100%}.undo-button{margin-left:10px}.half-opacity{opacity:.2}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3.MtxGrid, selector: "mtx-grid", inputs: ["displayedColumns", "columns", "data", "length", "loading", "trackBy", "columnResizable", "emptyValuePlaceholder", "pageOnFront", "showPaginator", "pageDisabled", "showFirstLastButtons", "pageIndex", "pageSize", "pageSizeOptions", "hidePageSize", "paginationTemplate", "sortOnFront", "sortActive", "sortDirection", "sortDisableClear", "sortDisabled", "sortStart", "rowHover", "rowStriped", "expandable", "expansionTemplate", "multiSelectable", "multiSelectionWithClick", "rowSelectable", "hideRowSelectionCheckbox", "disableRowClickSelection", "rowSelectionFormatter", "rowClassFormatter", "rowSelected", "cellSelectable", "showToolbar", "toolbarTitle", "toolbarTemplate", "columnHideable", "columnHideableChecked", "columnSortable", "columnPinnable", "columnPinOptions", "showColumnMenuButton", "columnMenuButtonText", "columnMenuButtonType", "columnMenuButtonColor", "columnMenuButtonClass", "columnMenuButtonIcon", "columnMenuButtonFontIcon", "columnMenuButtonSvgIcon", "showColumnMenuHeader", "columnMenuHeaderText", "columnMenuHeaderTemplate", "showColumnMenuFooter", "columnMenuFooterText", "columnMenuFooterTemplate", "noResultText", "noResultTemplate", "headerTemplate", "headerExtraTemplate", "cellTemplate", "useContentRowTemplate", "useContentHeaderRowTemplate", "useContentFooterRowTemplate", "showSummary", "summaryTemplate", "showSidebar", "sidebarTemplate", "showStatusbar", "statusbarTemplate"], outputs: ["page", "sortChange", "rowClick", "rowContextMenu", "expansionChange", "rowSelectedChange", "cellSelectedChange", "columnChange"], exportAs: ["mtxGrid"] }, { kind: "directive", type: i2$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1$2.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$2.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$2.DirectiveGrow, selector: "[grow]" }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
2015
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonTableComponent, isStandalone: false, selector: "taon-table", inputs: { pageNumber: "pageNumber", pageSize: "pageSize", allowedColumns: "allowedColumns", expansionTemplate: "expansionTemplate", rows: "rows", entityCrudController: "entityCrudController", columns: "columns", pageSizeOptions: "pageSizeOptions", hideSearch: "hideSearch" }, outputs: { expansionChange: "expansionChange", addingItem: "addingItem" }, viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true, static: true }], ngImport: i0, template: "<br />\n<columns-container *ngIf=\"!hideSearch\">\n <column grow>\n <mat-form-field class=\"search-input\">\n <input\n matInput\n placeholder=\"Type to search table...\"\n #search />\n </mat-form-field>\n </column>\n <column [width]=\"80\">\n <button\n mat-fab\n [ngClass]=\"{ 'half-opacity': !search.value }\"\n class=\"undo-button\"\n color=\"secondary\"\n (click)=\"search.value = ''\">\n <mat-icon>close </mat-icon>\n </button>\n </column>\n\n <column [width]=\"80\">\n <button\n mat-fab\n (click)=\"addingItem.next()\"\n class=\"undo-button\"\n color=\"primary\">\n <mat-icon>add</mat-icon>\n </button>\n </column>\n</columns-container>\n\n<mtx-grid\n *ngIf=\"rows && columns\"\n [data]=\"rows\"\n [columns]=\"columns\"\n [expandable]=\"expandable\"\n [expansionTemplate]=\"expansionTemplate\"\n (expansionChange)=\"expansionRow($event)\"\n [length]=\"totalElements\"\n\n [pageOnFront]=\"false\"\n [pageIndex]=\"pageNumber - 1\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showPaginator]=\"showPaginator\"\n (page)=\"getNextPage($event)\">\n</mtx-grid>\n\n<!-- [loading]=\"isLoading\" -->", styles: [":host{min-height:250px}.search-input{width:100%}.undo-button{margin-left:10px}.half-opacity{opacity:.2}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3$1.MtxGrid, selector: "mtx-grid", inputs: ["displayedColumns", "columns", "data", "length", "loading", "trackBy", "columnResizable", "emptyValuePlaceholder", "pageOnFront", "showPaginator", "pageDisabled", "showFirstLastButtons", "pageIndex", "pageSize", "pageSizeOptions", "hidePageSize", "paginationTemplate", "sortOnFront", "sortActive", "sortDirection", "sortDisableClear", "sortDisabled", "sortStart", "rowHover", "rowStriped", "expandable", "expansionTemplate", "multiSelectable", "multiSelectionWithClick", "rowSelectable", "hideRowSelectionCheckbox", "disableRowClickSelection", "rowSelectionFormatter", "rowClassFormatter", "rowSelected", "cellSelectable", "showToolbar", "toolbarTitle", "toolbarTemplate", "columnHideable", "columnHideableChecked", "columnSortable", "columnPinnable", "columnPinOptions", "showColumnMenuButton", "columnMenuButtonText", "columnMenuButtonType", "columnMenuButtonColor", "columnMenuButtonClass", "columnMenuButtonIcon", "columnMenuButtonFontIcon", "columnMenuButtonSvgIcon", "showColumnMenuHeader", "columnMenuHeaderText", "columnMenuHeaderTemplate", "showColumnMenuFooter", "columnMenuFooterText", "columnMenuFooterTemplate", "noResultText", "noResultTemplate", "headerTemplate", "headerExtraTemplate", "cellTemplate", "useContentRowTemplate", "useContentHeaderRowTemplate", "useContentFooterRowTemplate", "showSummary", "summaryTemplate", "showSidebar", "sidebarTemplate", "showStatusbar", "statusbarTemplate"], outputs: ["page", "sortChange", "rowClick", "rowContextMenu", "expansionChange", "rowSelectedChange", "cellSelectedChange", "columnChange"], exportAs: ["mtxGrid"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2$2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
1400
2016
  }
1401
2017
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonTableComponent, decorators: [{
1402
2018
  type: Component,
@@ -1473,130 +2089,176 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
1473
2089
  }]
1474
2090
  }] });
1475
2091
 
1476
- var TaonThemeMode;
1477
- (function (TaonThemeMode) {
1478
- TaonThemeMode["AUTO"] = "auto";
1479
- TaonThemeMode["LIGHT"] = "light";
1480
- TaonThemeMode["DARK"] = "dark";
1481
- })(TaonThemeMode || (TaonThemeMode = {}));
1482
- class TaonThemeService {
1483
- constructor() {
1484
- this.TAON_THEME_KEY = 'taon-theme-mode';
1485
- this.platformId = inject(PLATFORM_ID);
1486
- this.isBrowser = isPlatformBrowser(this.platformId);
1487
- this.mediaQuery = null;
1488
- this.mode = signal(TaonThemeMode.AUTO, ...(ngDevMode ? [{ debugName: "mode" }] : []));
1489
- this.isDark = signal(false, ...(ngDevMode ? [{ debugName: "isDark" }] : []));
1490
- if (!this.isBrowser)
2092
+ // declare global {
2093
+ // interface Window {
2094
+ // YT: any;
2095
+ // onYouTubeIframeAPIReady: () => void;
2096
+ // }
2097
+ // }
2098
+ function loadYoutubeApi() {
2099
+ return new Promise(resolve => {
2100
+ // @ts-ignore
2101
+ if (window.YT && window.YT.Player) {
2102
+ resolve();
1491
2103
  return;
1492
- this.mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
1493
- // Load saved mode
1494
- const saved = localStorage.getItem(this.TAON_THEME_KEY);
1495
- if (saved) {
1496
- this.mode.set(saved);
1497
2104
  }
1498
- // React to system changes
1499
- this.mediaQuery.addEventListener('change', e => {
1500
- if (this.mode() === TaonThemeMode.AUTO) {
1501
- this.apply(e.matches);
1502
- }
1503
- });
1504
- // React to mode changes
1505
- effect(() => {
1506
- const currentMode = this.mode();
1507
- localStorage.setItem(this.TAON_THEME_KEY, currentMode);
1508
- const dark = currentMode === TaonThemeMode.AUTO
1509
- ? (this.mediaQuery?.matches ?? false)
1510
- : currentMode === TaonThemeMode.DARK;
1511
- this.apply(dark);
2105
+ const tag = document.createElement('script');
2106
+ tag.src = 'https://www.youtube.com/iframe_api';
2107
+ document.body.appendChild(tag);
2108
+ // @ts-ignore
2109
+ window.onYouTubeIframeAPIReady = () => {
2110
+ resolve();
2111
+ };
2112
+ });
2113
+ }
2114
+ class TaonYoutubeVideoComponent {
2115
+ onRightClick(event) {
2116
+ // console.log(event);
2117
+ event.preventDefault();
2118
+ event.stopPropagation();
2119
+ }
2120
+ clicked(event) {
2121
+ event.stopPropagation();
2122
+ this.allowedToBeDisplayedVideoOveraly.set(false);
2123
+ this.cdr.detectChanges();
2124
+ // setTimeout(() => {
2125
+ // this.allowedToBeDisplayedVideoOveraly.set(true);
2126
+ // this.cdr.detectChanges();
2127
+ // }, 200);
2128
+ }
2129
+ restart() {
2130
+ this.postCommand('seekTo', [0, true]); // go to 0 seconds
2131
+ this.postCommand('playVideo');
2132
+ }
2133
+ async ngAfterViewInit() {
2134
+ if (this.state !== 'video-preview-private') {
2135
+ return;
2136
+ }
2137
+ await loadYoutubeApi();
2138
+ // @ts-ignore
2139
+ this.player = new window.YT.Player(this.iframeRef.nativeElement, {
2140
+ videoId: this.videoId,
2141
+ playerVars: {
2142
+ origin: window.location.origin,
2143
+ },
2144
+ events: {
2145
+ onStateChange: (event) => {
2146
+ this.handleStateChange(event.data);
2147
+ },
2148
+ },
1512
2149
  });
1513
2150
  }
1514
- apply(dark) {
1515
- this.isDark.set(dark);
1516
- const root = document.documentElement;
1517
- root.classList.toggle('dark-taon-theme', dark);
1518
- root.classList.toggle('light-taon-theme', !dark);
2151
+ handleStateChange(state) {
2152
+ // @ts-ignore
2153
+ // const YT = window.YT;
2154
+ // // @ts-ignore
2155
+ // console.log({ state, plauerstate: YT.PlayerState });
2156
+ // this.currentVideoState = Object.keys(this.PS).find(
2157
+ // c => this.PS[c] === state,
2158
+ // ) as any;
2159
+ // console.log('currentVideoState', this.currentVideoState);
1519
2160
  }
1520
- setMode(mode) {
1521
- this.mode.set(mode);
1522
- }
1523
- toogleAuto(auto) {
1524
- if (auto) {
1525
- this.mode.set(TaonThemeMode.AUTO);
1526
- }
1527
- else {
1528
- this.mode.set(TaonThemeMode.LIGHT);
1529
- }
1530
- }
1531
- setDark(yes) {
1532
- if (yes) {
1533
- this.mode.set(TaonThemeMode.DARK);
1534
- }
1535
- else {
1536
- this.mode.set(TaonThemeMode.LIGHT);
1537
- }
1538
- }
1539
- toggle() {
1540
- this.setMode(this.isDark() ? TaonThemeMode.LIGHT : TaonThemeMode.DARK);
2161
+ constructor(sanitizer) {
2162
+ this.sanitizer = sanitizer;
2163
+ this.PS = {
2164
+ UNSTARTED: -1,
2165
+ ENDED: 0,
2166
+ PLAYING: 1,
2167
+ PAUSED: 2,
2168
+ BUFFERING: 3,
2169
+ CUED: 5,
2170
+ };
2171
+ this.state = 'preview-picture';
2172
+ this.paddlockClicked = new EventEmitter();
2173
+ this.previewClicked = new EventEmitter();
2174
+ this.cdr = inject(ChangeDetectorRef);
2175
+ this.allowedToBeDisplayedVideoOveraly = signal(true, ...(ngDevMode ? [{ debugName: "allowedToBeDisplayedVideoOveraly" }] : []));
2176
+ this.videoIdSignal = signal('', ...(ngDevMode ? [{ debugName: "videoIdSignal" }] : []));
2177
+ this.previewImage = computed(() => `https://img.youtube.com/vi/${this.videoIdSignal()}/0.jpg`, ...(ngDevMode ? [{ debugName: "previewImage" }] : []));
2178
+ /**
2179
+ * > controls=0 Hides bottom control bar
2180
+ * > modestbranding=1 Reduces YouTube logo
2181
+ * > rel=0 Disables related videos from other channels
2182
+ * > disablekb=1 Disables keyboard controls
2183
+ * > fs=0 Disables fullscreen button
2184
+ * > playsinline=1 Prevents fullscreen auto behavior on iOS
2185
+ */
2186
+ this.embedUrl = computed(() => this.sanitizer.bypassSecurityTrustResourceUrl(`https://www.youtube.com/embed/${this.videoIdSignal()}?enablejsapi=1` +
2187
+ // (this.state === 'video-preview-private' ? `&controls=0` : '') +
2188
+ (this.state === 'video-preview-private' ? `&modestbranding=1` : '') +
2189
+ (this.state === 'video-preview-private' ? `&rel=0` : '') +
2190
+ // (this.state === 'video-preview-private' ? `&fs=0` : '') +
2191
+ // (this.state === 'video-preview-private' ? `&rel=0` : '') +
2192
+ `&disablekb=1` +
2193
+ `&playsinline=1` +
2194
+ `&origin=${window.location.origin}`), ...(ngDevMode ? [{ debugName: "embedUrl" }] : []));
2195
+ effect(() => { });
2196
+ }
2197
+ ngOnChanges() {
2198
+ this.videoIdSignal.set(this.videoId);
2199
+ }
2200
+ get containerStyle() {
2201
+ return this.height ? { height: this.height } : null;
2202
+ }
2203
+ get displayTitle() {
2204
+ return this.title;
2205
+ }
2206
+ onLockClick(event) {
2207
+ event.stopPropagation();
2208
+ this.paddlockClicked.emit();
2209
+ }
2210
+ onPreviewClick() {
2211
+ this.previewClicked.emit();
2212
+ }
2213
+ // private postCommand(command: string) {
2214
+ // this.iframeRef?.nativeElement.contentWindow?.postMessage(
2215
+ // JSON.stringify({
2216
+ // event: 'command',
2217
+ // func: command,
2218
+ // args: [],
2219
+ // }),
2220
+ // '*',
2221
+ // );
2222
+ // }
2223
+ postCommand(command, args = []) {
2224
+ const iframe = this.iframeRef?.nativeElement;
2225
+ if (!iframe)
2226
+ return;
2227
+ iframe.contentWindow?.postMessage(JSON.stringify({
2228
+ event: 'command',
2229
+ func: command,
2230
+ args: args,
2231
+ }), 'https://www.youtube.com');
1541
2232
  }
1542
- isAuto() {
1543
- return this.mode() === TaonThemeMode.AUTO;
2233
+ play() {
2234
+ this.postCommand('playVideo');
1544
2235
  }
1545
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1546
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, providedIn: 'root' }); }
1547
- }
1548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeService, decorators: [{
1549
- type: Injectable,
1550
- args: [{ providedIn: 'root' }]
1551
- }], ctorParameters: () => [] });
1552
-
1553
- class TaonThemeComponent {
1554
- constructor() {
1555
- this.TaonThemeMode = TaonThemeMode;
1556
- this.taonTheme = inject(TaonThemeService);
2236
+ pause() {
2237
+ this.postCommand('pauseVideo');
1557
2238
  }
1558
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1559
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonThemeComponent, isStandalone: true, selector: "taon-theme", ngImport: i0, template: `
1560
- <mat-slide-toggle
1561
- class="p-2"
1562
- [checked]="taonTheme.isAuto()"
1563
- (change)="taonTheme.toogleAuto($event.checked)">
1564
- Sync colors with system
1565
- </mat-slide-toggle>
1566
-
1567
- <mat-slide-toggle
1568
- class="p-2"
1569
- [checked]="taonTheme.isDark()"
1570
- [disabled]="taonTheme.isAuto()"
1571
- (change)="taonTheme.setDark($event.checked)">
1572
- Dark mode
1573
- </mat-slide-toggle>
1574
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
2239
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonYoutubeVideoComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
2240
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: TaonYoutubeVideoComponent, isStandalone: true, selector: "taon-youtube-video", inputs: { videoId: "videoId", title: "title", height: "height", state: "state" }, outputs: { paddlockClicked: "paddlockClicked", previewClicked: "previewClicked" }, viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["ytFrame"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"yt-container\"\n [ngClass]=\"state\"\n [ngStyle]=\"containerStyle\">\n <!-- PREVIEW IMAGE -->\n <img\n *ngIf=\"state === 'preview-picture' || state === 'preview-picture-locked'\"\n class=\"yt-media\"\n [src]=\"previewImage()\"\n [alt]=\"displayTitle\"\n (click)=\"onPreviewClick()\" />\n\n <!-- VIDEO -->\n <iframe\n #ytFrame\n *ngIf=\"state === 'video-preview-open' || state === 'video-preview-private'\"\n class=\"yt-media\"\n [src]=\"embedUrl()\"\n frameborder=\"0\"\n allowfullscreen>\n </iframe>\n\n <!-- PRIVATE OVERLAY -->\n <div\n (contextmenu)=\"onRightClick($event)\"\n (dblclick)=\"clicked($event)\"\n *ngIf=\"\n state === 'video-preview-private' && allowedToBeDisplayedVideoOveraly()\n \"\n (click)=\"clicked($event)\"\n class=\"yt-overlay-video\">\n <h1>Thanks for buying this video</h1>\n </div>\n\n <!-- LOCK OVERLAY -->\n <div\n *ngIf=\"state === 'preview-picture-locked'\"\n class=\"yt-overlay yt-lock\"\n (click)=\"onLockClick($event)\">\n <mat-icon>lock</mat-icon>\n </div>\n</div>\n\n<!-- CONTROLS BELOW VIDEO -->\n<!-- <div\n *ngIf=\"state === 'video-preview-private'\"\n class=\"yt-controls\">\n <button\n mat-icon-button\n (click)=\"play()\">\n <mat-icon>play_arrow</mat-icon>\n </button>\n\n <button\n mat-icon-button\n (click)=\"pause()\">\n <mat-icon>pause</mat-icon>\n </button>\n\n <button\n mat-icon-button\n (click)=\"restart()\">\n <mat-icon>replay</mat-icon>\n </button>\n</div> -->\n<div class=\"w-full mb-1\"></div>\n<div\n class=\"yt-title\"\n *ngIf=\"displayTitle\">\n {{ displayTitle }}\n</div>", styles: [".yt-container{position:relative;overflow:hidden;border-radius:8px;border:1px solid var(--surface-border)}.yt-container:not([style*=height]){aspect-ratio:16/9}.yt-media{width:100%;height:100%;display:block;object-fit:cover;position:relative;z-index:1}iframe.yt-media{border:none}.yt-overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center}.yt-overlay-video{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:#c8c8c880}.yt-lock{background:#0000008c;cursor:pointer}.yt-lock mat-icon{height:60px;width:60px;font-size:56px;color:#fff}.yt-private{background:transparent;pointer-events:all}.yt-title{margin-top:.5rem;font-size:.9rem;font-weight:500}.yt-play-button{width:80px;height:80px;border-radius:50%;background:#ff0000d9;display:flex;align-items:center;justify-content:center;transition:transform .2s ease}.yt-play-button mat-icon{font-size:48px;color:#fff;width:48px;height:48px}.yt-play-button:hover{transform:scale(1.1)}.yt-controls{display:flex;gap:8px;margin-top:8px}.yt-controls button{background:#00000014}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1575
2241
  }
1576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonThemeComponent, decorators: [{
2242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonYoutubeVideoComponent, decorators: [{
1577
2243
  type: Component,
1578
- args: [{
1579
- selector: 'taon-theme',
1580
- standalone: true,
1581
- imports: [MatSlideToggleModule],
1582
- template: `
1583
- <mat-slide-toggle
1584
- class="p-2"
1585
- [checked]="taonTheme.isAuto()"
1586
- (change)="taonTheme.toogleAuto($event.checked)">
1587
- Sync colors with system
1588
- </mat-slide-toggle>
1589
-
1590
- <mat-slide-toggle
1591
- class="p-2"
1592
- [checked]="taonTheme.isDark()"
1593
- [disabled]="taonTheme.isAuto()"
1594
- (change)="taonTheme.setDark($event.checked)">
1595
- Dark mode
1596
- </mat-slide-toggle>
1597
- `,
1598
- }]
1599
- }] });
2244
+ args: [{ selector: 'taon-youtube-video', standalone: true, imports: [NgIf, NgStyle, MatIconModule, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"yt-container\"\n [ngClass]=\"state\"\n [ngStyle]=\"containerStyle\">\n <!-- PREVIEW IMAGE -->\n <img\n *ngIf=\"state === 'preview-picture' || state === 'preview-picture-locked'\"\n class=\"yt-media\"\n [src]=\"previewImage()\"\n [alt]=\"displayTitle\"\n (click)=\"onPreviewClick()\" />\n\n <!-- VIDEO -->\n <iframe\n #ytFrame\n *ngIf=\"state === 'video-preview-open' || state === 'video-preview-private'\"\n class=\"yt-media\"\n [src]=\"embedUrl()\"\n frameborder=\"0\"\n allowfullscreen>\n </iframe>\n\n <!-- PRIVATE OVERLAY -->\n <div\n (contextmenu)=\"onRightClick($event)\"\n (dblclick)=\"clicked($event)\"\n *ngIf=\"\n state === 'video-preview-private' && allowedToBeDisplayedVideoOveraly()\n \"\n (click)=\"clicked($event)\"\n class=\"yt-overlay-video\">\n <h1>Thanks for buying this video</h1>\n </div>\n\n <!-- LOCK OVERLAY -->\n <div\n *ngIf=\"state === 'preview-picture-locked'\"\n class=\"yt-overlay yt-lock\"\n (click)=\"onLockClick($event)\">\n <mat-icon>lock</mat-icon>\n </div>\n</div>\n\n<!-- CONTROLS BELOW VIDEO -->\n<!-- <div\n *ngIf=\"state === 'video-preview-private'\"\n class=\"yt-controls\">\n <button\n mat-icon-button\n (click)=\"play()\">\n <mat-icon>play_arrow</mat-icon>\n </button>\n\n <button\n mat-icon-button\n (click)=\"pause()\">\n <mat-icon>pause</mat-icon>\n </button>\n\n <button\n mat-icon-button\n (click)=\"restart()\">\n <mat-icon>replay</mat-icon>\n </button>\n</div> -->\n<div class=\"w-full mb-1\"></div>\n<div\n class=\"yt-title\"\n *ngIf=\"displayTitle\">\n {{ displayTitle }}\n</div>", styles: [".yt-container{position:relative;overflow:hidden;border-radius:8px;border:1px solid var(--surface-border)}.yt-container:not([style*=height]){aspect-ratio:16/9}.yt-media{width:100%;height:100%;display:block;object-fit:cover;position:relative;z-index:1}iframe.yt-media{border:none}.yt-overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center}.yt-overlay-video{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;background:#c8c8c880}.yt-lock{background:#0000008c;cursor:pointer}.yt-lock mat-icon{height:60px;width:60px;font-size:56px;color:#fff}.yt-private{background:transparent;pointer-events:all}.yt-title{margin-top:.5rem;font-size:.9rem;font-weight:500}.yt-play-button{width:80px;height:80px;border-radius:50%;background:#ff0000d9;display:flex;align-items:center;justify-content:center;transition:transform .2s ease}.yt-play-button mat-icon{font-size:48px;color:#fff;width:48px;height:48px}.yt-play-button:hover{transform:scale(1.1)}.yt-controls{display:flex;gap:8px;margin-top:8px}.yt-controls button{background:#00000014}\n"] }]
2245
+ }], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { videoId: [{
2246
+ type: Input,
2247
+ args: [{ required: true }]
2248
+ }], title: [{
2249
+ type: Input
2250
+ }], height: [{
2251
+ type: Input
2252
+ }], state: [{
2253
+ type: Input
2254
+ }], paddlockClicked: [{
2255
+ type: Output
2256
+ }], previewClicked: [{
2257
+ type: Output
2258
+ }], iframeRef: [{
2259
+ type: ViewChild,
2260
+ args: ['ytFrame']
2261
+ }] } });
1600
2262
 
1601
2263
  // @ts-nocheck
1602
2264
  // This file is auto-generated during init process. Do not modify.
@@ -1608,5 +2270,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
1608
2270
  * Generated bundle index. Do not edit.
1609
2271
  */
1610
2272
 
1611
- export { APP_ID, BUILD_BASE_HREF, BUILD_FRAMEWORK_CLI_NAME, CURRENT_PACKAGE_TAON_VERSION, CURRENT_PACKAGE_VERSION, PROJECT_NPM_NAME, SafePipe, TaonAdminModeConfigurationComponent, TaonBootstrapNavbarComponent, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonGithubForkMeRibbonComponent, TaonGithubForkMeRibbonModule, TaonIframeSyncComponent, TaonInjectHTMLDirective, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonSessionPasscodeComponent, TaonTableComponent, TaonTableModule, TaonThemeComponent, TaonThemeMode, TaonThemeService, ViewMode, myOrgProj };
2273
+ export { APP_ID, AuthButtonComponent, AuthDialogComponent, AuthGuard, BUILD_BASE_HREF, BUILD_FRAMEWORK_CLI_NAME, CURRENT_PACKAGE_TAON_VERSION, CURRENT_PACKAGE_VERSION, GoogleAuthService, PROJECT_NPM_NAME, SafePipe, SessionService, TaonAdminModeConfigurationComponent, TaonBootstrapNavbarComponent, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonGithubForkMeRibbonComponent, TaonGithubForkMeRibbonModule, TaonIframeSyncComponent, TaonInjectHTMLDirective, TaonKvAuthorizationComponent, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonRumbleComponent, TaonSessionPasscodeComponent, TaonSimpleLayoutComponent, TaonSimpleLayoutRoutes, TaonStripeBuyButtonComponent, TaonTableComponent, TaonTableModule, TaonThemeComponent, TaonThemeMode, TaonThemeService, TaonYoutubeVideoComponent, ViewMode, myOrgProj };
1612
2274
  //# sourceMappingURL=taon-ui-browser.mjs.map